6

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.

5

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:

enter image description here

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.