I would like to redefine the electron mass unit in siunitx so that it is \mathrm{m}_0
instead of the default \mathrm{m}_\mathrm{e}
. How do I do that?
1 Answer
The definition of \electronmass
is
\DeclareSIUnit{\electronmass}{\text{\ensuremath{m_{\text{e}}}}}
Just change it.
\documentclass{article}
\usepackage{siunitx}
\DeclareSIUnit{\electronmass}{\text{\ensuremath{m_{0}}}}
\begin{document}
\SI{2}{\electronmass}
\end{document}
However, you must realize you're changing a standard symbol. And this shouldn't be done.
-
Even if I do not change a standard symbol and give it another name, your approach looks weird when I have an exponent for my unit, e.g. $\SI{2}{\electronmass^2}$ (the original symbols have that too...). Is that intentionally (and by this I mean should it be that way due to some convention)?– DaPhilCommented Dec 1, 2014 at 7:22
\DeclareSIUnit{\Electronmass}{\mathrm{m}_o}
and\si{Electronmass}