# How to properly format number in denominator with siunitx

I'm discussing fuel efficiency in liters per 100 kilometers (L/100 km). My first thought was to do the following:

\si[per-mode=symbol]{\liter\per\num{100}\kilo\meter}}
% renders: L/100km


However, that omits the space between 100 and km. Appending whitespace to the end of 100 has no effect, as I expected. However, adding whitespace outside of \num does work:

\si[per-mode=symbol]{\liter\per\num{100} \kilo\meter}}
% renders: L/100 km


But that seems clunky. Is there a better way? Nothing in the docs is catching my eye: ftp://ftp.tex.ac.uk/ctan%3A/macros/latex/exptl/siunitx/siunitx.pdf

• Remove \num ? But I think what you want is not standard because then it becomes arithmetic in words I would read it as L/100-many kilometers – percusse Mar 11 '14 at 20:29
• @percusse Exact same situation as with \num, unfortunately. I'm open to the idea that this is how you do it, but it seems like there'd be a better way given the depth of the package. – Paul H Mar 11 '14 at 20:31
• I get a space with \liter\per100 \kilo\meter. Note that num puts the contents in mathmode so spaces are ignored. And lastly I would use frac mode with no ambiguity – percusse Mar 11 '14 at 20:32
• @percusse so do I, but that seems equally clunky given how \SI{>> 5}{\metre} renders a space between the 5 and m – Paul H Mar 11 '14 at 20:34
• That's not a unit but the quantity hence the space in between. – percusse Mar 11 '14 at 20:36

There are at least a couple of ways of handling this. You could simple type things in in literal mode, or you could create a new unit to represent '100 km':

\documentclass{article}
\usepackage{siunitx}
\DeclareSIUnit{\Ckm}{\SI{100}{\km}}
\begin{document}

\si{l/100~km} \si[per-mode = symbol]{\litre\per\Ckm}

\end{document}

• +1, but why not \hkm as hecto-? In my language ckm is a heavy machine-gun. :-) – Przemysław Scherwentke May 29 '16 at 22:09
• @PrzemysławScherwentke Roman numeral representation – Joseph Wright May 30 '16 at 8:04