7

The title basically says it all.

I use siunitx with

\usepackage[binary-units=true]{siunitx}
\sisetup{locale = DE}

For \SI{...}{\micro\ohm}, the \micro is output correctly (non-italic), and \ohm is output in italic. This happens both in text and in math mode.

My MWE is

\documentclass{publisher-custom}
\usepackage[binary-units=true]{siunitx}
\sisetup{locale = DE}

\begin{document}
\SI{1,09715247}{\micro\ohm}
\end{document}

How can I fix this as I'm unable to change (or post here) what's in the publisher's custom document class code?

Update:

I found these lines in the publisher's cls file grep'ing for [Oo]mega:

...
\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}
...
\DeclareMathSymbol{\varOmega}{\mathalpha}{operators}{"0A}
...

Does that help?

apriori
  • 953
  • 4
    You really should post a MWE here: I can't reproduce your output. Plus, the macro you should use is \micro, not plain \mu. – campa Aug 20 '15 at 13:22
  • 3
    Without the class publisher-custom the MWE will already on the first line. If you cannot make the class available, then use a standard class and add the stuff of the class, which is needed to reproduce the problem. My first guess would be font related stuff. – Heiko Oberdiek Aug 20 '15 at 13:52
  • Try if you can do %\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A} (comment out that line)! If you can still compile, you are good to go. – LaRiFaRi Aug 20 '15 at 13:56
  • LaRiFaRi: That works, but I need a solution that does not tinker with the cls file. – apriori Aug 20 '15 at 14:02
  • What about \DeclareMathSymbol{\Omega}{\mathalpha}{operators}{"0A} then? Seems to be a duplicate of Force upright Greek letters with isomath – moewe Aug 20 '15 at 14:09

2 Answers2

5

Answer to the updated question

The special class file uses:

\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}
\DeclareMathSymbol{\varOmega}{\mathalpha}{operators}{"0A}

Then \Omega is italics by default and \varOmega upright. Package siunitx uses \upOmega, if it is available to initialize the symbol for math-ohm, otherwise \Omega is used as \text{$\Omega$}, which results in an italics Ω. Whereas \mathrm{\Omega} would have given an upright Ω.

Since the upright ohm symbol is available as \varOmega, the macro \upOmega can be provided easily for package siunitx:

\documentclass{article}
\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}% italics
\DeclareMathSymbol{\varOmega}{\mathalpha}{operators}{"0A}% upright
\providecommand*{\upOmega}{\varOmega}% for siunitx
\usepackage[binary-units=true]{siunitx}
\sisetup{locale = DE}

\begin{document}
  \SI{1,09715247}{\micro\ohm}
\end{document}

Result

Answer to the first version of the question

I get an italic \mu. Probably you want to have \micro instead. The \ohm is upright:

\documentclass{article}
\usepackage[binary-units=true]{siunitx}
\sisetup{locale = DE}
\begin{document}
\si{\mu\ohm} vs.\@ \si{\micro\ohm}
\end{document}

Result

Heiko Oberdiek
  • 271,626
3

The designer of your document-class wants you to have italic upper-case Greeks which in my eyes is desirable according to ISO (but of course a matter of taste).

As your template is written as it is, I would not change this behaviour as I have suggested in comment. Just redefine the math-ohm from siunitx like so:

% arara: pdflatex

%\documentclass{publisher-custom}
\documentclass{article}
\usepackage{siunitx}
\sisetup{%
    ,binary-units=true
    ,locale = DE
    ,math-ohm  =\Omega
    }
\usepackage{lmodern}
% from your class definition
\DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}
\DeclareMathSymbol{\varOmega}{\mathalpha}{operators}{"0A}


\begin{document}
\si{\micro\ohm} and $\si{\micro\ohm}$ but $\mu\times\Omega$
\end{document}

enter image description here

LaRiFaRi
  • 43,807