Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9194

Re: Different Color in ToString

From Scott Colwell <scolwell@uoguelph.ca>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Different Color in ToString
Date 2012-03-22 10:50 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jkf06h$8jm$1@smc.vnet.net> (permalink)

Show all headers | View raw


Works.  Thanks Tomas.

----- Original Message -----
From: "Tomas Garza" <tgarza10@msn.com>
To: scolwell@uoguelph.ca, mathgroup@smc.vnet.net
Sent: Wednesday, 21 March, 2012 11:24:13 AM
Subject: Re: Different Color in ToString


Try 


Row[{Style["There is ",Blue],Style[n,Red],Style[" numbers",Blue]}] 


-Tomas 




> Date: Wed, 21 Mar 2012 05:44:45 -0500 
> From: scolwell@uoguelph.ca 
> Subject: Different Color in ToString 
> To: mathgroup@smc.vnet.net 
> 
> Does anyone know how to change the color of the font in a ToString command. 
> 
> For example, in the following, the text should be blue, but the number 3 should be red. 
> 
> n = 3; 
> Text[Style["There is "<> ToString[Style[n, Red]] <> " numbers here", Blue]] 
> 
> Thank you, 
> 

-- 
Scott R. Colwell, Ph.D.
Associate Professor, Dept. of Mkt/Cons Studies
Adjunct Professor, Dept. of Psychology
MINS Building 201a
University of Guelph
Guelph, Ontario, Canada, N1G 2W1

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Different Color in ToString Scott Colwell <scolwell@uoguelph.ca> - 2012-03-22 10:50 +0000

csiph-web