Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Different Color in ToString

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125622] Re: Different Color in ToString
  • From: Adriano Pascoletti <adriano.pascoletti at uniud.it>
  • Date: Thu, 22 Mar 2012 05:50:47 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201203211044.FAA27057@smc.vnet.net>

Try

n = 3;
Text[Style[StringForm["There is `` numbers here", Style[n, Red]], Blue]]



Adriano Pascoletti

2012/3/21 Scott Colwell <scolwell at uoguelph.ca>

> 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,
>
>


  • Prev by Date: Re: Different Color in ToString
  • Next by Date: Re: Different Color in ToString
  • Previous by thread: Different Color in ToString
  • Next by thread: Re: Different Color in ToString