# Manyfoot for a journal in memoir

I have a document so far typed article, using manyfoot, also its perpage option, which I want to add to a journal of memoir class, together with more contributions by other authors. When taking this document as it is I, the first time I compile it it keeps stopping at footnote commands with Counter too large errors for many times, after that I have to run it another four or five times until it stops giving me Label(s) may have changed. Rerun to get cross-references right.-warnings. Now when I change the document type to memoir class, I get no errors on the first run, but the label warnings, which also don't stop even after ten runs. The document uses \footnote (about 25 occurances, probably not relevant(?)) , \footnoteA (about 50) and \footnoteB (about 250), set up as follows:

\usepackage[perpage,ruled,para]{manyfoot}
\DeclareNewFootnote{A}[alph]
\DeclareNewFootnote[para]{B}


In a MWE this problem did not appear, probably it needs a considerable amount of footnotes to arise. Is there a known incompatibility between manyfoot and memoir? Should I better switch to another package for dealing with the footnotes, or would memoir's builtin footnotes suffice?

Another point I'm concerned about here is that the footnote setup is done in the preamble. As I'm dealing with more contributions, some others also using manyfoot, this, as I understand it, would make it impossible for each of them to have their own footnote setup, which they need, unless I first compile them separately and glue them together with pdfpages, which again would make TOC and page numbering more difficult. I guess this is a general point affecting also other aspects apart from the footnotes...

• Since my (deleted) answer doesn't help you, please provide a MWE, so we don-t have to guess what's wrong in your document. – karlkoeller Mar 21 '15 at 17:26
• manyfoot is usually not advised: usually bigfoot is the better choice (syntax mostly identical); here it'd probably need to be combined with the alphalph package. But without an MWE, I'm not prepared to say more. – jon Mar 21 '15 at 19:31
• Thanks, using bigfoot solves it. alphalph doesn't seem to be needed, theres's no page with more than five or so alphabetical footnotes. – muk.li Mar 21 '15 at 22:18

## 1 Answer

The cause of the problem is the way \alph is defined in LaTeX. If you try to use more than 26 different letters, you get an error. If you have per-page footnotes, LaTeX doesn't know where the a page ends until it has collected too much material to fit on the page. After the first run, the "perpage" option remembers where the page breaks were, so the footnote marks settle down to their final values.

Presumably memoir is a bit smarter about doing this than article + manyfoot.

One workround is redefine \alph to remove the errors, and just generate something that is obviously wrong (so if you really do try to put more than 26 footnotes on a page, you will notice it!)

\makeatletter
\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
k\or l\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
y\or z\else ?a?\fi}
\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
K\or L\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
Y\or Z\else ?A?\fi}
\def\@fnsymbol#1{\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or
\mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger
\or \ddagger\ddagger \else ???\fi}}
\makeatother


That will give you the sequences a b c ... x y z ?a? ?a? ?a? ..., similarly for uppercase letters, and ??? for too many footnote symbols.

A shorter fix is to change the error message into a warning, but doing that means nothing appears in the document where the incorrect counters should be printed.

\makeatletter
\gdef\@ctrerr{%
\@latex@warning{Counter too large}}
\makeatother