I'm using XeTeX and fontspec
, and I have selected old-style figures for my body text. Now I use the siunitx
package, and have set it up to use text fonts instead of math fonts. For the siunitx
values I want to use lining figures instead of old-style figures. How do I do this?
I have tried this, but it does not work:
\setromanfont[Numbers=OldStyle]{Arno Pro}
\usepackage{siunitx}
\sisetup{mode = text}
\sisetup{inter-unit-separator =\cdot}
\sisetup{detect-all}
<snip>
{\fontspec[Numbers={Lining}]{Arno Pro}\SI{10}{\kilo\volt\per\centi\metre}}
Furthermore, siunitx
uses the math font comma instead of the text font comma when using
\sisetup{output-decimal-marker ={,}}
Best Answer
Font detection in
siunitx
uses the document defaults unless you provide something else. So in your example your getting\rmfamily
. The key is to define a font command which will select what you want.I see that there is a second part to the question, asking about the
output-decimal-marker
option. As detailed in the manual, this is a math mode option. If you want to force this to be in text mode you need to use\text
: