For TikZ and pgfplots I use :

\tikzset{/pgf/number format/.cd,use comma,1000 sep={\,}}

And all numbers are typeset accordingly, with no other command.

Is there a way to have the same convenience for a LaTeX document?

Not using any command such as \nombre{} nor \num{} but in something like for the math mode comma : Comma in math mode

  • 2
    Short answer here is going to be 'no', at least not 'safely'. Remember that while you only see the number of pgfplots, internally it can wrap it up in a formatting command (based on \pgfmathparse here). – Joseph Wright Apr 27 '14 at 8:59
  • 3
    LaTeX doesn't format your number automatically anyway. So you need to use an external mechanism to parse your number. That can be \num,\pgfmathprintnumber etc. – percusse Apr 27 '14 at 9:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.