1

By loading both mathpazo and eulervm, the units are written in the euler mathfont when using siunitx and not in upright roman font. Even if it's explicitly set in sisetup :

unit-math-rm=\mathrm

I'm using Mac TexLive 2016, all packages updated. When \mathrm is used regularly in math mode, it works as expected. So there must be some issue how siunitx uses \mathrm.

MWE:

\documentclass{article}
\usepackage{mathpazo}
%commenting eulervm out prints units right again
\usepackage[euler-digits]{eulervm}
\usepackage{siunitx}

\begin{document}
\SI{5}{m/s}
\end{document}

with eulervm

as opposed to

without eulervm

4
  • 1
    Does \sisetup{mode=text} give you the desired results? Commented Mar 29, 2017 at 14:16
  • @AndrewSwann: Yes, that works. I tested your proposition. You should transfer your comment into an answer.
    – user31729
    Commented Mar 29, 2017 at 14:23
  • OK I forgot that. I'm using the option euler-digits as well. And then text modes doesn't show the euler digits, which would be nice.
    – Abufari
    Commented Mar 29, 2017 at 14:25
  • @ChristianHupfer The canonical answer from the package author below is better. Commented Mar 29, 2017 at 15:08

1 Answer 1

4

This is 'by design': eulervm sets up letters in \mathnormal which are very different from \mathrm, so siunitx does

\sisetup{math-rm = \mathnormal}

at the start of the document unless the user has changed it from the standard value of \mathrm. You can override this at the start of the document:

\documentclass{article}
\usepackage{siunitx}
\usepackage{eulervm}
\AtBeginDocument{\sisetup{math-rm = \mathrm}}
\begin{document}
\SI{5}{m/s} $5\nobreak\,\mathrm{m}/\mathrm{s}$
\end{document}
1
  • Yes, by using \AtBeginDocument{\sisetup{unit-math-rm=\mathrm}} I get the expected result. Thank you, never would have thought of the \AtBeginDocument
    – Abufari
    Commented Mar 29, 2017 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .