I'm working on a paper for an IFAC conference for which you're supposed to use their ifacconf.cls, resulting in a fairly standard layout. However, you get an error when you use subequations
(amsmath
) with twelve or more equations (L is the twelfth letter). It turns out that the class file redefines the \alph
output, so that \alph{12}
returns \ell
instead of l
:
\def\@alph#1{\ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or % line 1402
k\or \ell\or m\or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or
[...]
et\or eu\or ew\or ex\or ey\or ez\else\@ctrerr\fi} % line 1414
I guess the motivation for this is to avoid confusion from the similarity of lowercase l, uppercase i, and the number 1. However, they can't have tested this very thoroughly, since \ell
is a math-mode command; it's not very surprising this throws an error when used in an equation tag. Before taking the time to find the reason for this error I came up with a few workarounds. One obvious fix is of course to replace \ell
with \ensuremath{ell}
or simply l
in the class file, but this will not get you very far if you collaborate with people who don't know how (or don't have the necessary admin rights) to modify the class file. How is this issue best solved? I'm answering my own "question" here (I figure one possible fix per answer is the best way to go --- please correct me if I'm wrong), but would be very interested if anyone has better suggestions.
Here's an MWE that throws the error:
\documentclass{ifacconf}
\usepackage{amsmath}
\usepackage{natbib} % required by ifacconf.cls?
\begin{document}
\begin{subequations}
\begin{gather}
a = 1 \\
b = 2 \\
c = 3 \\
d = 4 \\
e = 5 \\
f = 6 \\
g = 7 \\
h = 8 \\
i = 9 \\
j = 10 \\
k = 11
\\l = 12 % comment out this line to compile successfully
\end{gather}
\end{subequations}
\end{document}