LaTeX error "Counter too large": cause and fix
A counter is printed in a format that has run out of signs. Letters end at 26 (\alph, \Alph), and footnote symbols end at 9 (\fnsymbol).
Why it happens
- Footnotes are marked with symbols through
\fnsymbol, and the document has a tenth footnote. - A second-level
enumeratelist, which is labelled (a), (b), (c), has more than 26 items. - After
\appendixthe sections are counted with letters, and there is a 27th one.
How to fix it
- Switch to a format without an upper limit:
\arabicfor numbers or\romanfor Roman numerals, for example\renewcommand{\thefootnote}{\arabic{footnote}}. - Keep symbols and restart the footnote counter on every page with
\usepackage[perpage,symbol]{footmisc}fromfootmisc. - Give a long list numbers as labels, with
enumitem:\begin{enumerate}[label=\arabic*.].
A document that produces the message
\documentclass{article}
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\begin{document}
One\footnote{1} two\footnote{2} three\footnote{3} four\footnote{4}
five\footnote{5} six\footnote{6} seven\footnote{7} eight\footnote{8}
nine\footnote{9} ten\footnote{10}
\end{document}The corrected document
\documentclass{article}
\renewcommand{\thefootnote}{\arabic{footnote}}
\begin{document}
One\footnote{1} two\footnote{2} three\footnote{3} four\footnote{4}
five\footnote{5} six\footnote{6} seven\footnote{7} eight\footnote{8}
nine\footnote{9} ten\footnote{10}
\end{document}Both documents were compiled with pdfLaTeX from TeX Live 2023. The first produces the message, the second compiles without an error.
Finding the line in the editor
The editor lists every error and warning of a compile run with file and line. Select an entry and the cursor jumps to that line. See Error list with jump to the line.
Related pages
- How-to Footnotes in LaTeX
- How-to Counters in LaTeX
- How-to Add an appendix in LaTeX
- Package
footmisc