# charter and siunitx: either the kerning is bad, or the micro doesn't follow the surrounding text shape. What can I do?

I'm using Charter (with the mathdesign package) for my main text font. As mathdesign isn't doing a good job at kerning (see "NOP." and "DEF." in MWE), I'm additionally loading the charter package as suggested in this question.

In addition, I have quite a few units with \micro prefixes in the text. I would like my numbers and units to be in the same shape as the surrounding text. However, when loading the charter package in addition to mathdesign, the mu changes.

What can I do?

\documentclass{scrreprt}
\usepackage[bitstream-charter]{mathdesign}
%\usepackage{charter}
\usepackage[detect-all=true]{siunitx}

\begin{document}
Testing the kerning with two examples: NOP. DEF.

Testing the micro'': \SI{1}{\micro\metre}

\textit{in italic text: \SI{1}{\micro\metre}}

\end{document}


Example 1: bad kerning, nice detection of surroundings in siunitx

Example 2: better kerning, no detection of surroundings in siunitx

• Units are symbols and shouldn't change shape according to the context. – egreg Sep 26 '13 at 0:04
• Okay, I can accept that units shouldn't change shape (though 'siunitx' specifically has an option for this), but I find it distracting if the mu is italic and the and the m is not (and in example 2 the mu also doesn't match the m in x-height...) – TestTube Sep 26 '13 at 13:28
• My comment was only about the appearance of the symbols; I agree that the mu should be upright. – egreg Sep 26 '13 at 13:35

The normal Charter font (font family bch, which you load with the charter package) does not include an upright \textmu (this is the name of the µ in text mode). Also, it doesn't contain an Ω at all, which would therefore be selected from Computer Modern Roman. But you can access the glyphs provided by the mathdesign package with \fontfamily{mdbch}\textmu and \textohm. In math mode, on the other hand, you would always want the upright versions, which mathdesign makes available as \muup and \Omegaup.

So the following should do what you want, and it will also fix the situation if you choose to follow the advice to always set units upright:

\documentclass{scrreprt}
\usepackage[bitstream-charter]{mathdesign}
\usepackage{charter}
\usepackage{textcomp}
\usepackage[detect-all=true]{siunitx}
\sisetup{
math-micro=\muup,
math-ohm  =\Omegaup,
text-micro={\fontfamily{mdbch}\textmu},
text-ohm  ={\fontfamily{mdbch}\textohm}
}
\begin{document}
Testing the kerning with two examples: NOP. DEF.

With font switch: \SI{1}{\micro\metre}, \SI{1}{\ohm},
\textit{in italic text: \SI{1}{\micro\metre}, \SI{1}{\ohm}}

In math mode: $\SI{1}{\micro\metre}, \SI{1}{\ohm}$,
\textit{in italic math: $\SI{1}{\micro\metre}, \SI{1}{\ohm}$}

\sisetup{detect-all=false}
Always upright: \SI{1}{\micro\metre}, \SI{1}{\ohm},
\textit{in italic text: \SI{1}{\micro\metre}, \SI{1}{\ohm}}

In math mode: $\SI{1}{\micro\metre}, \SI{1}{\ohm}$,
\textit{in italic math: $\SI{1}{\micro\metre}, \SI{1}{\ohm}$}
\end{document}


• This works as desired. However - again ignoring the question of whether units should change shape - is there a way to get the '\Omega' of the unit '\ohm' to change shape as well? 'mathdesign' does not provide a '\textOmega' similar to '\textmu' but has both an '\Omegaup' and '\Omegait' symbol (for math mode). '\sisetup{text-ohm=\ensuremath{\Omega}}' obviously does not work... I'll probably use the convention of upright units even in italic text now, but would still like to know for the sake of completeness... – TestTube Sep 26 '13 at 14:09
• @TestTube The command is \textohm, see updated answer. – Robert Sep 26 '13 at 16:35
• I've looked at the 'mathdesign' documentation a couple of times today, but somehow managed to always overlook this... Thanks! – TestTube Sep 26 '13 at 18:03