I've found (here in french https://fr.wikibooks.org/wiki/LaTeX/%C3%89crire_de_la_physique#Extension_siunitx) that I could use the package siunitx to write the unit but it doesn't work :

A minimal code to test :



\author{Cécile Moulin}


text text text


The error :

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
mappings.tex))) (./test.aux)
! Undefined control sequence.
\metre ->\ERROR 

l.18 \metre

I've tried with/without \( \) and with \meter too, it's the same

  • 2
    In order not to disturb the rest of the document the unit macros can only be used in the second argument to \SI{}{} or in the argument to \si{}. The first is used to typeset value+unit and the later is used to typeset just a unit. So use \si{\metre} instead of \metre. – daleif Jun 12 '17 at 14:02

Normally these units only work within \si{...} (and similar commands), but if you want to use them in normal text, you can use the free-standing-units=true of the siunitx package.




\si{\metre} % for the unit alone

\SI{42}{\metre} % for value and unit

\metre % this needs free-standing-units=true




  • Where can I find documentation about \SI{}{} ? I didn't find... So, the first part is for the value. What about nano and cie ? I have a unit which is '10 nm', so I think that the 10 is in the second part but is it true ? – Ccile Jun 12 '17 at 14:09
  • @Ccile You can find the documentation of siunitx at texdoc.net/texmf-dist/doc/latex/siunitx/siunitx.pdf -- for the 10 nm, please see my updated answer, \nano is prefix to meter. Why would 10 be the second part? – samcarter_is_at_topanswers.xyz Jun 12 '17 at 14:12
  • Ok, thanks. For 10 nm, you think it's better so or I can't do another way ? – Ccile Jun 12 '17 at 14:17
  • @Ccile Sorry, I don't understand your last comment, can you rephrase the question? – samcarter_is_at_topanswers.xyz Jun 12 '17 at 14:19
  • 1
    @Ccile The unit and the number should be separate \SI{10}{\nm} or \SI{10}{\nano\metre}. For exponents, do you mean \SI{10e-21}{\metre} perhaps? – Joseph Wright Jun 12 '17 at 14:26

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.