Some TeX Developments

Coding in the TeX world

siunitx: Default mode for printing

with 8 comments

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!

Written by Joseph Wright

November 18th, 2009 at 8:57 am

Posted in LaTeX,siunitx

8 Responses to 'siunitx: Default mode for printing'

Subscribe to comments with RSS or TrackBack to 'siunitx: Default mode for printing'.

  1. 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

  2. Hello Will,

    Yes, that is broadly the idea.

    Joseph

    Joseph Wright

    18 Nov 09 at 1:19 pm

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. Thanks ;)

    leo

    20 Nov 09 at 5:58 pm

Leave a Reply