9

Is there a package out there that will allow me to write my footnotes not inline, but in separate file, and them simply refer to their keys?

E.g., instead of writing this:

My main text body\footnote{Really long footnote...
....
...
} text continues here.

I would like to be able to do something like this:

My main text body\footnote{a} text continues here.


\Footnote{A}{Really long footnote...
....
...}
  • @Speravir Have an upvote. – Andriy Drozdyuk Feb 19 '13 at 23:44
  • 1
    Just out of curiosity: what do you need this for? I mean, if you want "not to break the flow of the text" in your source, a better way would be to use the folding feature of Emacs to hide them (see http://www.gnu.org/software/auctex/manual/auctex/Folding.html; of course, not using Emacs to edit your files is a mistake beginners often make. Interestingly, it seems that vim did catch up with this one: http://stackoverflow.com/questions/5614219/is-there-a-way-to-fold-less-than-a-line-in-vim) – mbork Feb 20 '13 at 00:35
  • (In case someone didn't get that I was joking a bit: I consider this to be a good question (and have upvoted it), and didn't mean any offence to OP - I just think that if "not breaking the flow of text" is the reason, this is a suboptimal approach: I'd want to have my footnotes close to the place they are referring to, just maybe hidden.) – mbork Feb 20 '13 at 00:37
  • @mbork Hey, no offence taken! I would usually agree with you, but in my case some of the footnotes are so monstrous! that they really do break the flow of text (imagine paragraph long footnotes with multiple citations)! Thanks for fold commands, I do use emacs but seldom remember the tex-specific macros. – Andriy Drozdyuk Feb 20 '13 at 01:06

1 Answers1

9

Yes, there is at least one package: sep­foot­notes.

Abstract from the documentation:

The sepfootnotes package supports footnotes and endnotes from separate files. Basically, it provides \sepfootnotecontent and \sepfootnote: the former defines the content of a note; the latter typesets that note.

You can define your own footnote or endnote apparatus, as well.

Example, basically also taken from the documentation:

“How to typeset a footnote to Plato and an endnote to Homer from a separate file in no particular order”:

  • document.tex:

    \documentclass{article}
    \usepackage{sepfootnotes}
    \newfootnotes{F}
    \newendnotes{E}
    \input{mynotes}
    \begin{document}
    This was first brought up by the great Plato.\Enote{Plato}
    But an antecedent is to be found in Homer.\Fnote{Homer}
    \section*{Notes}
    \theEnotes
    \end{document}
    
  • mynotes.tex:

    \Fnotecontent{Homer}{The greatest of ancient poets.}
    \Enotecontent{Plato}{Socrates’s pupil.}
    
Speravir
  • 19,491