See the [[Colors]] section for more information on available colors and color usage.
== Shaded background for part of a displayed equation ==
To highlight part of a formula, you can give it a gray background using <cmd>framed</cmd>:
<texcode>
\setupcolors[state=start]
\def\graymath{\mframed[frame=off,
background=color,
backgroundcolor=gray,
backgroundoffset=3pt]}
\startformula
\ln (1+x) =\, \graymath{x - {x^2\over2}} \,+ {x^3\over3}-\cdots.
\stopformula
</texcode>
<context>
\setupcolors[state=start]
\def\graymath{\mframed[frame=off,
background=color,
backgroundcolor=gray,
backgroundoffset=3pt]}
\startformula
\ln (1+x) =\, \graymath{x - {x^2\over2}} \,+ {x^3\over3}-\cdots.
\stopformula
</context>
The <cmd>,</cmd> add a tiny bit of space to prevent the gray background from crowding the equals and plus sign.
= Similar topics =