# Subequations with more than 26 items

I need any solution to this problem. I have a subequations environment with an align environment inside of it, and then a bunch of equations. A lot of equations. Actually more than 26. When I try to compile it, I only get a Counter too large error (I expected something like this).

Is there any way to work around this problem? I am okay with switching from letters to arabic numbers to identify subequations, I am okay with starting with aa, ab and so on, anything will do.

I am quite a notice to latex so please don't assume anything.

• – Werner Mar 11 '16 at 0:48

This is due to the sub-equations being numbers using \alph, and there are only 26 choice a, ..., z. You can use the alphalph package to increase this enumeration using a a, ..., z, aa, ..., zz, aaa, ..., style sequence.

The default subequation numbering uses \alph, which can be patched using etoolbox:

\documentclass{article}
\usepackage{amsmath}
\usepackage{alphalph,etoolbox}

% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\subequations}{\alph{equation}}{\alphalph{\value{equation}}}{}{}

\begin{document}

\begin{subequations}
\begin{align}
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c \\
f(x) &= ax^2 + bx + c
\end{align}
\end{subequations}

\end{document}