MathGroup Archive 2004

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

Search the Archive

colored alphabet for string output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48188] colored alphabet for string output
  • From: "Curt Fischer" <crf3 at po.cwru.edu>
  • Date: Mon, 17 May 2004 03:21:57 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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: Precision of output
  • Next by Date: Re: Finding errors in my code?
  • Previous by thread: RE: Re: Precision of output
  • Next by thread: Re: colored alphabet for string output