MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: colored alphabet for string output


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