[Tex/LaTex] Footnotes without numbering

footnotesnumbering

I have used the following "no numbering command" for footnotes:

\let\thefootnote\relax\footnote{some text}

to insert a footnote without number (just once). However, now all my footnotes appear without numbers. What's the counter command to cancel the "no numbering command" after I put it?

Thanks

Best Answer

You have to save (using \let) the original definition and reinstate it afterwards. Also, I decrement the footnote counter, so that the blank footnote doesn't increment the index.

\documentclass{article}
\let\svthefootnote\thefootnote
\textheight 1in
\begin{document}
First Footnote,%
\let\thefootnote\relax\footnote{some text}
\addtocounter{footnote}{-1}\let\thefootnote\svthefootnote
next footnote\footnote{some more text}
\end{document}

enter image description here

Alternatively, you can use \footnotetext for the blank footnote, and then you don't have to reset the footnote counter (but you still have to reinstate the definition of \thefootnote).

\documentclass{article}
\let\svthefootnote\thefootnote
\textheight 1in
\begin{document}
First Footnote,%
\let\thefootnote\relax\footnotetext{some text}
\let\thefootnote\svthefootnote
next footnote\footnote{some more text}
\end{document}

Putting this all together, you can make it into a macro, \blankfootnote{}:

\documentclass{article}
\let\svthefootnote\thefootnote
\textheight 1in
\newcommand\blankfootnote[1]{%
  \let\thefootnote\relax\footnotetext{#1}%
  \let\thefootnote\svthefootnote%
}
\begin{document}
First Footnote,\blankfootnote{some text}
next footnote\footnote{some more text}
\end{document}

And now, for the coup de grace, one can redefine the definition of \footnote, so that the syntax \footnote[]{my footnote}, which would otherwise break LaTeX, now is made to call on \blankfootnote automagically. This way, you don't need to remember the separate command \blankfootnote, but rather just use \footnote with an explicitly blank optional argument:

\documentclass{article}
\let\svthefootnote\thefootnote
\textheight 1in
\newcommand\blankfootnote[1]{%
  \let\thefootnote\relax\footnotetext{#1}%
  \let\thefootnote\svthefootnote%
}
\let\svfootnote\footnote
\renewcommand\footnote[2][?]{%
  \if\relax#1\relax%
    \blankfootnote{#2}%
  \else%
    \if?#1\svfootnote{#2}\else\svfootnote[#1]{#2}\fi%
  \fi
}
\begin{document}
First Footnote,\footnote[]{some text}
next footnote\footnote{some more text}
Force footnote number 5 here\footnote[5]{special footnote}
\end{document}

enter image description here