9

I'm using siunitx to format units correctly. One of the units I need to use is litres - but the default l looks too much like a numerical 1 for me. I'd like to use a lower-case curly l (\ell will serve the purpose well).

The problem is, I don't seem to be able to redefine the existing unit macro. Creating a new macro does work though.

Code below.

\documentclass{article}
\usepackage{siunitx}
\DeclareSIUnit{\l}{\ell}
\DeclareSIUnit{\myl}{\ell}

\begin{document}
\si{\l} \si{\myl} $\ell$
\end{document}

Output: \l does not get redefined correctly

2
  • @mico This doesn't explain why the \si{\l} doesn't work as expected though. I'm still curious ;-) Mar 28, 2018 at 10:28
  • 1
    If you read section 5.11 of the siunitx manual, \l is an abbreviated unit (full list in table 21). Also, it might be worth (me) noting that by default, \litre will output l, and \liter will output L.
    – JustinT
    Mar 28, 2018 at 10:36

1 Answer 1

12

This is (possibly) really silly - but the comments above gave me the clue. The \l macro is an abbreviation of the \litre macro. Redefining \litre also redefines \l.

\documentclass{article}
\usepackage{siunitx}
\DeclareSIUnit{\litre}{\ell}

\begin{document}
\si{\l} $\ell$
\end{document}

\litre redefines \l

1
  • 1
    Section 5.11 of the siunitx manual. As standard, siunitx loads a set of abbreviated versions of the SI units (Table 21).
    – JustinT
    Mar 28, 2018 at 10:37

You must log in to answer this question.

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