Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: coloring only some substring

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55017] Re: coloring only some substring
  • From: "Kevin J. McCann" <kmccann at umbc.edu>
  • Date: Thu, 10 Mar 2005 05:24:17 -0500 (EST)
  • Organization: University of Maryland, Baltimore County
  • References: <d0jtph$mvg$1@smc.vnet.net> <d0mnk6$723$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Perhaps a little less cryptic is the following:

lst={"to","be","or","not","to","be","bottom"}

lst /. "to" -> StyleForm["to", FontColor -> RGBColor[0, 0, 1]]


Steve Luttrell wrote:
> lst={"to","be","or","not","to","be","bottom"}
> 
> lst /. "to" -> "\!\(\* StyleBox[\"to\",FontColor->RGBColor[1, 0, 0]]\)"
> 
> Steve Luttrell
> 
> <fartous at mail15.com> wrote in message news:d0jtph$mvg$1 at smc.vnet.net...
> 
>>hi
>>i have the list:
>>lst={"to","be","or","not","to","be","bottom"}
>>how to search for the string "to" and then to output the whole content of 
>>List
>>lst but with the substring "to" colored in red.
>>thanks
>>
>>jack
>>
> 
> 
> 


  • Prev by Date: InitializationCell
  • Next by Date: Re: RationalApproximation
  • Previous by thread: Re: coloring only some substring
  • Next by thread: coloring only some substring