定理の注釈における脚注に関するn定理の制限を取り除く

定理の注釈における脚注に関するn定理の制限を取り除く

次の MWE に示されているように、定理の注釈内の脚注は のamsthm定理に適しています。

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

しかし、次のMで示されるようにいいえ私たちとこの答えntheorem脚注テキストが失われ、\footnotemark/\footnotetextトリックが必要になる の定理には当てはまりません。

\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}

定理のオプション引数に脚注を入れるのはあまり良い習慣ではないかもしれませんが、次の 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}

何らかの理由で、 に固執しておりntheorem、 に変更できません。 このの制限amsthmを回避する方法はありますか?ntheorem

答え1

footnoteパッケージをロードし、そのコマンドを使用して、(の) 定理が脚注を正しく処理するように\makesavenoteenv要求するだけで十分です。ntheorem

\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}

関連情報