I'm new to LaTeX, and I'm having an issue with using \framebox
inside an equation (denoted with $$
signs at the beginning and the end).
The text that I'm trying to box is the following:
1.5 \times 10^{- 5} \; Pa
However, once I put a \framebox
around it, like so:
\framebox{1.5 \times 10^{- 5} \; Pa}
I get the following error:
./assignment1.tex:85: Missing $ inserted.
…where 85 points to the line where I put in the \framebox
. Any ideas why this is happening?
Best Answer
boxed
will not span an equation if it encloses an alignment point i.e.,&
. In such cases you can useAboxed
frommathtools
. See the example below for illustration. Further, to typeset units, better usesiunitx
.A useful read will be this Q and its A