[OS X TeX] colorbox

Bruno Voisin bvoisin at me.com
Wed Jul 30 12:59:31 EDT 2008

Le 30 juil. 08 à 18:04, Peter Dyballa a écrit :

> Am 30.07.2008 um 14:03 schrieb Alain Schremmer:
>> In general, I want to be able to highlight specific spots in  
>> mathematical expressions.
> If it's just the arguments, an operator, a function name, then it's  
> easy: \colorbox{yellow}{<the stuff>}. But when you're going to high- 
> light a part a compound like \dfrac{}{}, then I'd use a local re- 
> definition, \dfracol{}{}{colour}, to colourise the fraction stroke.  
> This way automatically an appropriate area will filled with colour.
> [...]

The following may have already been suggested, as I didn't follow this  
thread closely, but you can also simply use the declarative form  
\color{[...]} of color change (works indifferently in text or math),  
together with the fact that LaTeX maintains a color stack, as in:




Black fraction line:

Yellow fraction line:




Just a request: if that kind of thing is meant for slide shows, please  
don't use yellow, impossible to see from more than a couple of meters  
away from the projection screen but unfortunately popular in  
Powerpoint presentations.

Bruno Voisin

More information about the MacOSX-TeX mailing list