[OS X TeX] colorbox

Alain Schremmer Schremmer.Alain at verizon.net
Mon Feb 7 18:13:05 EST 2005


In the following, I am unable to let the fraction on the top line have 
the same size as the one on the second line which is made pleasantly 
smaller by the colorbox.
While it is of course of infinitesimal importance, I would be happy if 
someone could show me what I am missing.
Regards
--schremmer

\documentclass[11pt]{book}
        \usepackage{amsmath}
        \usepackage{color}
        \DeclareMathAlphabet{\denom}{OT1}{cmss}{sbc}{n}
\begin{document}
\begin{equation*}
\begin{split}
        8\;\denom{Dimes}
    &=    3\;\denom{Apples}\times1\;\frac{\denom{Dimes}}{\denom{Apple}} 
+ 4\;\denom{Dimes}
    \\   
    &=    
\colorbox{yellow}{$3\;\denom{Apples}$}\times\colorbox{yellow}{$2\;\frac{\denom{Dimes}}{\denom{Apple}}$} 
+1\;\denom{Dimes}
\end{split}
\end{equation*}
\end{document}




Christopher Allen wrote:

>> I had done quite a bit of experimentation and, indeed, "couldn't 
>> accept" that a command would take things "out of math mode".
>
>
> There are a few commands that do this, the most obvious one is 
> \text{}, specifically used to do so.
>
> There are also commands that will take you into math mode in a similar 
> fashion. For example, if you use \boxed{} in the middle of a 
> paragraph, whatever is put into the box is typeset in math mode.
>
> Chris
>
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
>
>
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list