I often write documents with fairly lengthy discursive footnotes to discuss tangents or secondary issues without interrupting the flow of the main text. However, this can make it difficult to edit, since the body of the text is broken by sometimes-quite-long notes. What I would like is a way to move the text of the footnote (while still keeping it within the same file) away from the footnote mark without breaking the default placement rules for footnotes.
I have tried using \footnotemark and \footnotetext, like so:
Paragraph containing a footnote\footnotemark and some more text afterward.
\footnotetext{A very long footnote that now doesn't have to appear in the middle of a
sentence in my source file.}
However, this causes my footnote text to sometimes appear on a page following the footnote mark rather than always appearing on the same page as the mark. (Also it gets a bit messy when I have multiple notes in a paragraph.)
Is there a way to separate the footnote text from the location of the footnote mark within the source code while having the output come out as though the \footnote{was in the middle of the text}? (And preferably allowing for multiple footnotes per paragraph?) Apologies if there is an obvious answer; I've been searching around for a while now I and haven't found anything.
MWE (edited to wrap lines):
\documentclass{article}
\begin{document}
A paragraph that has a footnote\footnote{Like this one here but even longer and more
intrusive so that it makes reading and editing the text very difficult. It probably goes
on and on and might even have \\ multiple \\ long \\ paragraphs inside of it.} in the
middle of it. The footnote is placed correctly, but the source is difficult to read and
edit.
A paragraph with a footnote in the middle of it\footnotemark{} that then continues onto a
new page. The source is easy to read and edit, but the footnote lands in the wrong place.
\newpage
\footnotetext{A footnote that I would like to have appear on the same page as the
footnote mark, but without having the footnote text in the middle of my paragraph in the
source.}
\end{document}
Footnote
environment from my package,semantic-markup
. This way the note is in its own space and can be moved and edited easily. It does still disrupt the text, but this is a good reminder to me that the footnote will disrupt the text for the reader and that I should try to avoid long, discursive footnotes!