3

As shown by the following MWE, footnotes in theorems' notes work well for amsthm's theorems:

\documentclass{article}
\usepackage{amsthm}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}[Foo\footnote{Bar.}]
Baz.
\end{theorem}
\end{document}

but, as shown by the following MNWE and according to this answer, not for ntheorem's theorems where the footnote texts are lost and the \footnotemark/\footnotetext trick is required:

\documentclass{article}
\usepackage{ntheorem}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}[Foo\footnote{Bar.}]
Baz.
\end{theorem}
\begin{theorem}[Foo\footnotemark]
  \footnotetext{Bar.}
Baz.
\end{theorem}
\end{document}

While it may not be a very good practice to put footnotes in theorem optional arguments, it could be useful in some cases, e.g. for citations in footnote as in the following MWE:

\documentclass{article}
\usepackage{amsthm}
% \usepackage{ntheorem}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\newtheorem{theorem}{Theorem}
\begin{document}
\begin{theorem}[\citeauthor{knuth:ct}\footcite{knuth:ct}]
Baz.
\end{theorem}
\printbibliography
\end{document}

For some reasons, I'm stick to ntheorem and can't change it for amsthm. Any hope of a workaround to this ntheorem's limitation?

Denis Bitouzé
  • 9,652
  • 4
  • 27
  • 85
  • There are reasons why I prefer amsthm. ;-) – egreg Mar 21 '16 at 21:30
  • @egreg Without its limitations, you would prefer ntheorem, don't you? ;) – Denis Bitouzé Mar 21 '16 at 21:31
  • Not at all. ;-) – egreg Mar 21 '16 at 21:31
  • @egreg But, as pointed out in the linked answer, ntheorem can do more things (and interesting things) than amsthm: ntheorem is cool! :) – Denis Bitouzé Mar 21 '16 at 21:36
  • 3
    No, I don't agree; I can add endmarks very easily to environments created by amsthm and \qedhere usually performs better than the machinery set up by ntheorem to make it automatic. Anyway, the limitation is due to using \item[...] for typesetting the theorem label (including the note). You can reproduce the issue with \begin{enumerate}\item[x\footnote{y}]\end{enumerate}. – egreg Mar 21 '16 at 21:43

1 Answers1

1

It is enough to load the footnote package and, thanks to its \makesavenoteenv command, to ask for the (ntheorem's) theorems to handle footnotes correctly:

\documentclass{article}
\usepackage{ntheorem}
\usepackage{footnote}
\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\makesavenoteenv{theorem}
\makesavenoteenv{lemma}
\begin{document}
\begin{theorem}[\citeauthor{knuth:ct}\footcite{knuth:ct}]
Baz.
\end{theorem}
\begin{lemma}[\citeauthor{knuth:ct}\footcite{knuth:ct}]
Baz.
\end{lemma}
\printbibliography
\end{document}
Denis Bitouzé
  • 9,652
  • 4
  • 27
  • 85
  • 3
    Note that footnote has been unmaintained for several years and that it can introduce issues with other packages. – egreg Mar 22 '16 at 18:51