# Footnote marker placement in heading of theorem/definition/etc.

I have a definition, and a footnote which refers to the whole definition.  So I’d ideally like an output looking something like:

Definition 1.53.   A footnote is a small aside, usually placed at the bottom of a page and marked by a tag in the main text.

3Some people think that footnotes are bad style.

Is there a good way to get this placement of the footnote marker?  Neither of the following comes out right (for obvious reasons):

\begin{definition}\footnote{Footnote text.} We define \ldots

\begin{definition}[\footnote{Footnote text.}] We define \ldots

I’m using amsthm, but answers for without that would be interesting too.

Change the definition of \thetheorem inside a group so as to include the desired footnote. (I use the \apptocmd command of the etoolbox package to amend the definition without looking up the particulars of the original.)

\documentclass{article}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

\usepackage{etoolbox}

\begin{document}

\begingroup
\apptocmd{\thetheorem}{\protect\footnote{A footnote.}}{}{}

\begin{theorem}
Some text.
\end{theorem}

\endgroup

\begin{theorem}
Some text.
\end{theorem}

\end{document}


EDIT: Interestingly, this only seems to work with amsthm.

• Redefining \thetheorem won't work well with the \label/\ref mechanism as the footnote will appear at each reference. You can get around this by replacing \protect\footnote{A footnote.} by \unless\ifx\protect\@unexpandable@protect\protect\footnote{A footnote.}\fi. – Philippe Goutet Dec 4 '10 at 1:05

I found what Philippe Goutet said in the comment to lockstep's answer to be true, namely that a footnote appears in references to the theorem too. Perhaps it is obvious to others how to implement Philippe's fix, but it wasn't to me: it seems that one also needs to add something like \makeatletter ... \makeatother somewhere. The following version of lockstep's answer thus works for me.

\documentclass{article}

\usepackage{amsthm}
\newtheorem{theorem}{Theorem}

\usepackage{etoolbox}

\begin{document}

\begingroup
\makeatletter
\apptocmd{\thetheorem}{\unless\ifx\protect\@unexpandable@protect\protect\footnote{A footnote.}\fi}{}{}
\makeatother

\begin{theorem}\label{mainthm}
Some text.
\end{theorem}

\endgroup

Compare the following to Theorem \ref{mainthm}.

\begin{theorem}
Some text.
\end{theorem}

\end{document}


The result: I don't know if there is some better place to insert the commands, but the above seems to work.

• Welcome to TeX.SX! You are right with \makeatletter...\makeatother. Perhaps you could add a screen shot of the output too? – user31729 Sep 10 '14 at 8:11
{"ft_lang_label":"__label__en","ft_lang_prob":0.8444164,"math_prob":0.729339,"size":627,"snap":"2020-10-2020-16","text_gpt3_token_len":151,"char_repetition_ratio":0.15730338,"word_repetition_ratio":0.0,"special_character_ratio":0.2200957,"punctuation_ratio":0.11382114,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95110595,"pos_list":[0,1,2],"im_url_duplicate_count":[null,4,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-27T21:16:24Z\",\"WARC-Record-ID\":\"<urn:uuid:779a38d1-2651-4e58-aa04-930ae1aad329>\",\"Content-Length\":\"147061\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fbca7af8-207d-4804-b4b8-6ad0c5063205>\",\"WARC-Concurrent-To\":\"<urn:uuid:0d90d998-df94-429d-a46f-f53a926a8a52>\",\"WARC-IP-Address\":\"151.101.65.69\",\"WARC-Target-URI\":\"https://tex.stackexchange.com/questions/6505/footnote-marker-placement-in-heading-of-theorem-definition-etc\",\"WARC-Payload-Digest\":\"sha1:7Q7X6ND36E2VRMFCDMBLOPRZGO6W4HSO\",\"WARC-Block-Digest\":\"sha1:WMU5CBT4DFPPLS3WYF7MVSQZKACRQ763\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875146809.98_warc_CC-MAIN-20200227191150-20200227221150-00109.warc.gz\"}"}