siunitx: Default mode for printing
A while ago, someone e-mailed me about siunitx and the current choice of fonts for printing. At the moment, the package uses the current maths font for both numbers and units. It was suggested that a better standard setting would be maths font for numbers, text font for units. I’m not going to alter this for version 1, but as I work on version 2 this is something worth considering. In most documents, the difference should not show up. However, I wonder what people think: I can see the logic to the request, but don’t fancy getting lots of complaints either. Comments welcome!
You mean the difference between \textrm and \mathrm, the current behaviour being the latter and the proposed behaviour being the former? I think I agree this would be an improvement, not that I’ve noticed it until now
Will Robertson
18 Nov 09 at 11:58 am
Hello Will,
Yes, that is broadly the idea.
Joseph
Joseph Wright
18 Nov 09 at 1:19 pm
I think it would be a great idea. Thanks for your good work, Joseph. I appreciate it!
Fadi Semmo
20 Nov 09 at 1:20 pm
Some things have come up in testing. Once I get to the point where a snapshot makes sense, I’ll include some discussion of the question.
Joseph Wright
20 Nov 09 at 1:57 pm
Sorry to ask here, do you think the error in this example is a bug?
\documentclass{memoir}
\usepackage{siunitx}
\setsecheadstyle{\normalfont\raggedright\MakeUppercase}
\begin{document}
\section{\num{2×2}}
\num{2×2}
\end{document}
leo
20 Nov 09 at 3:57 pm
Hello Leo,
Well, \num doesn’t do anything to the input until it typesets the argument, so I’m not exactly surprised. You see the same thing if you try:
\MakeUppercase{\num{2×2}}
without the section heading business. So I’d this reflects how TeX works, really: you make things upper case before doing the other processing, not after.
Joseph
Joseph Wright
20 Nov 09 at 4:49 pm
I should add that
\documentclass{memoir}
\usepackage{siunitx}
\setsecheadstyle{\normalfont\raggedright\MakeUppercase}
\sisetup{numprod=xX}
\begin{document}
\section{\num{2×2}}
\end{document}
works fine.
Joseph Wright
20 Nov 09 at 4:55 pm
Thanks
leo
20 Nov 09 at 5:58 pm