6

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?

  • \DeclareSIUnit{\Electronmass}{\mathrm{m}_o} and \si{Electronmass} – user11232 Nov 28 '14 at 10:17
5

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}

enter image description here

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)? – DaPhil Dec 1 '14 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.