Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

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

Search the Archive

Re: Colored Output

  • To: mathgroup at
  • Subject: [mg87230] Re: [mg87193] Colored Output
  • From: Carl Woll <carlw at>
  • Date: Sat, 5 Apr 2008 04:20:46 -0500 (EST)
  • References: <> at wrote:

>I would like to have evaluated expression with some costants painted
>in a particular color, just to make reading easier.
>Say my input is
>and the output should be
>with colored "a", say magenta.
>Is this achievable, and how? which kind of attributed of the constant
>a should I set?
You can use MakeBoxes:

MakeBoxes[a, StandardForm] := StyleBox["a", Green]

Then, evaluate

D[a Sin[x], x]

If you're default output format type is TraditionalForm, then just 
substitute TraditionalForm for StandardForm in the MakeBoxes rule.

Carl Woll
Wolfram Research

  • Prev by Date: Help with Check Function Arguments & Options
  • Next by Date: Re: Mathematica to Tex
  • Previous by thread: Colored Output
  • Next by thread: Re: Colored Output