I want to symbolically cancel out units using the siunitx package. To do so I tried the cancel package as in the following minimal example:
\documentclass{article}
\usepackage{amsmath}
\usepackage[per=frac]{siunitx}
\usepackage{cancel}
\begin{document}
\begin{align*}
\frac{\SI{7}{\m}}{\SI{3}{\m}} = \frac{\SI{7}{\cancel \m}}{\SI{3}{\cancel \m}}
\end{align*}
\end{document}
But this gives me the following output, i.e. when using \cancel
the font of the unit changes which is not desired. Any idea how to fix this?
Edit: I tried @percusse's solution which works very well. But if I also add the option expproduct=cdot
to the package options, the problem reappears.
\cancel
, so unsurprisingly it treats things a bit oddly. – Joseph Wright♦ Oct 21 '12 at 8:28exponent-product=\cdot
worked. – student Oct 21 '12 at 8:41exponent-product
as well asper-mode
... – student Oct 21 '12 at 8:42