2

I want to list the versions of some python modules I am using. The problem is that the format of the version has two dots, for example 10.10.10 or 1.04.5. When I try \num{10.10.10} I get the error: duplicate-decimal-token.

Is there a way to use the \num command from siunitx to typeset these numbers? Any alternative?

13
  • Well, numbers are supposed to have only one dot (two parts)
    – user156344
    Commented Apr 24, 2019 at 15:08
  • 4
    What exactly do you expect \num to do with a version number? Commented Apr 24, 2019 at 15:14
  • 2
    But does \num{10.10} look any different from 10.10? Commented Apr 24, 2019 at 15:22
  • 1
    If Alan Munn solves your problem, why don't use just 10.10.10? It is totally not different at all!
    – user156344
    Commented Apr 24, 2019 at 15:30
  • 1
    @kbr85 siunitx's \num command is supposed to change 1000 to 1 000, 1000.0001 to 1 000.000 1 (add spaces). You literally killed this feature in this case. siunitx is totally useless here. Don't overuse it.
    – user156344
    Commented Apr 24, 2019 at 15:38

1 Answer 1

5

You can set the parse-numbers key to false for these numbers.

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\num[parse-numbers=false]{10.10.10.10}
\end{document}
1
  • That did it. I also voted up the answer but not enough privileges so far to change the displayed count. Thanks!!
    – kbr85
    Commented Apr 24, 2019 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .