Open main menu

Changes

== Shaded background for part of a displayed equation ==
(see also [[Framed]])
 
To highlight part of a formula, you can give it a gray background using {{cmd|mframed}}: the following is the code you can use in mkii (see below what one has to do in mkiv):
 
<context source="yes">
\setuppapersize[A5]
\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>
In mkiv the code is slightly different: one may define {{cmd|graymath}} directly using {{cmd|definemathframed}}
1,005

edits