LaTeX
is very good in adjusting the numbering — and more importantly the references to it — when inserting new chapters, sections, etc.
Legal documents (and books), at least here in Germany, tend to insert these things by keeping the previous numbering intact, but using the number before the insertion followed by a small letter (a, b, c, …), to indicate that something has changed (either at the last minute, or — which is the really important case — from a previous edition).
Since I thought it rare that there would be more than one additional consecutive footnote, I tried the following (incredibly crude and dirty) hack, shown in the MWE:
\documentclass{article}
\newcommand{\myextrafootnote}[1]{\renewcommand{\thefootnote}{\arabic{footnote}a}\footnote[\thefootnote]{#1}\renewcommand{\thefootnote}{\arabic{footnote}}}%
\begin{document}
This is the old text\footnote{foo}, followed by the new insert\myextrafootnote{New Exciting Stuff!!}, followed by the old next one.\footnote{bar}
\end{document}
Sadly, it doesn't work as I had hoped. While the footnotes themselves look as they should:
the text gets the additional a
also added just before the footnotemark: as shown here:
Ideally, of course, the a
would also come from some form of counter (I tried that too, but it turned into lots of error messages about missing arguments, so I abandoned it and decided to better ask the experts…) so if there were more than one additional consecutive added footnote, it would still work correctly [and be less crude than it is now].
Best Answer
The optional argument of the
\footnote
command expects an integer containing the number of the footnote, not the textual representation of that number. So, you should useinstead of
Addition
So, where does the extra “a” come from? To understand this, let us examine step by step how the erroneous code
is digested by TeX. The macro
\thefootnote
expands (in the context in which the OP used it) to1a
, so (La)TeX sees the equivalent ofBut, as already said, it expects the optional argument to contain an integer value; this integer value is locally assigned to a dedicated counter (either
footnote
ormpfootnote
, depending on the context) inside the\@xfootnote
internal command. The code for this assignment is (equivalent to)that, in our case, becomes
But the
a
terminates the integer constant1
, and therefore also the assignment; at this point, thea
token is interpreted as a command to typeset an “a” character in horizontal (i.e., the current) mode. And here we are.