Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5964
| From | Don <donabc@comcast.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Strings with different Styles in a Grid |
| Date | 2011-10-28 09:42 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j8dteq$kfm$1@smc.vnet.net> (permalink) |
Here is a Grid of strings, with some strings having different styles.
Grid[{{Style["aa", Red, Bold], Style["bb", Green]}, {"cc", "dd"}}]
The "cc" string should be output with the first "c" in the color Blue and
in Bold, the second "c" should be in the color Red.
How does one "break apart" the "cc" string to give each "c" a different style
while still maintaining it as a single item for the Grid function?
Something like this, which is very intuitive, simply doesn't work
Grid[{{Style["aa", Red, Bold], Style["bb", Green]},
{{Style["c", Blue, Bold], Style["c", Red]}, "dd"}}]
And this, doesn't work either ...
Grid[{{Style["aa", Red, Bold], Style["bb", Green]},
{StringJoin[Style["c", Blue, Bold], Style["c", Red]], "dd"}}]
Thank you in advance.
Don
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Strings with different Styles in a Grid Don <donabc@comcast.net> - 2011-10-28 09:42 +0000 Re: Strings with different Styles in a Grid A Retey <awnl@gmx-topmail.de> - 2011-10-29 11:10 +0000 Re: Strings with different Styles in a Grid "Oleksandr Rasputinov" <oleksandr_rasputinov@hmamail.com> - 2011-10-29 11:28 +0000
csiph-web