|
[Date Index]
[Thread Index]
[Author Index]
Re: colored alphabet for string output
- To: mathgroup at smc.vnet.net
- Subject: [mg48216] Re: colored alphabet for string output
- From: "Borut Levart" <bole79 at email.si>
- Date: Tue, 18 May 2004 04:16:37 -0400 (EDT)
- References: <c89pot$t2s$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I don't think you can join the differently formatted letters into a string
and expect them to stay individually formated.
You can say
StyleForm[ #, FontColor->Hue[ Random[] ] ]&/@myList
Bring down myList to single letters as string units and color them the same
way.
Output can also be achieved by Print.
Hope it helps a bit,
Borut > Europe > Slovenia > Ljubljana
"Curt Fischer" <crf3 at po.cwru.edu> wrote in message
news:c89pot$t2s$1 at smc.vnet.net...
> Dear Group:
>
> I have a long list of alphabetic strings. I would like to ouput this
list,
> with each of the letters of the string colored differently. How could I
do
> this?
>
> For example:
>
> myList = {"abcdefg","hijklmn","prstuv"};
>
> myList/.{x_String -> StringReplace[x, "a" -> StyleForm["a", FontColor ->
> Red]]}
>
> I was thinking to hodgepodge together statements like this, but it doesn't
> work because StringReplace requires objects with head String, and my
attempt
> has an object with head StyleForm.
>
> Any advice?
>
> --
> Curt Fischer
>
Prev by Date:
Re: colored alphabet for string output
Next by Date:
Fonts and Plot
Previous by thread:
Re: colored alphabet for string output
Next by thread:
Re: colored alphabet for string output
|