Graphics, Figures & Tablessiunitx | Error: "invalid-token-in-number"

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
BdN3504
Posts: 5
Joined: Wed Sep 14, 2011 2:57 pm

siunitx | Error: "invalid-token-in-number"

Post by BdN3504 »

I get this error,
! siunitx error: "invalid-token-in-number"
!
! Invalid token '.' in numerical input.
trying to compile a document with a very long preamble.
The SI line

Code: Select all

\SI{0.0353}{\centi\metre}
causes the error. However, if i type this into a new file, i don't get any errors at all:

Code: Select all

\documentclass[a4paper]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[locale=DE,load-configurations=binary]{siunitx}
\begin{document}
\SI{0.0353}{\centi\metre}
\end{document}
I want to post the whole preamble of the document in question. I guess it's a bit too long for a snippet, so i posted it to pastie.org: http://www.pastie.org/2651192.
I am worried that another package is interfering with siunitx but i don't know which one it might be... Can you help me find out?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: siunitx | Error: "invalid-token-in-number"

Post by josephwright »

I have no problems with your preamble other than the luximono package, which is not in TeX Live (so I have to omit it). Please follow the usual advice for creating a MWE: start with your problematic file, and comment out lines to identify which are required to see the issue and which can safely be removed.
Joseph Wright
Post Reply