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


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

Re: Different Color in ToString

From David Reiss <dbreiss@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Different Color in ToString
Date 2012-03-22 10:48 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jkf01n$8h2$1@smc.vnet.net> (permalink)
References <jkcbgl$qed$1@smc.vnet.net>

Show all headers | View raw


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

--David

On Mar 21, 6:45 am, Scott Colwell <scolw...@uoguelph.ca> wrote:
> 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,

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


Thread

Different Color in ToString Scott Colwell <scolwell@uoguelph.ca> - 2012-03-21 10:45 +0000
  Re: Different Color in ToString David Reiss <dbreiss@gmail.com> - 2012-03-22 10:48 +0000
  Re: Different Color in ToString Helen Read <readhpr@gmail.com> - 2012-03-22 10:49 +0000

csiph-web