I have been using \footnotemark
and \footnotetext
to write footnotes, primarily because its much easier to read and write paragraphs in TeX
without footnote text scattered in the middle of my sentences.
However this means i have to manually number each footnote myself. As i go back and forth, writing new paragraphs, or changing the ordering of my text, it means I have to renumber all subsequent footnotes.
Is there a way around this? Ideally I would like to give each footnote a unique identifier, and have the numbering handled automatically by the compiler.
Best Answer
If you're following this route, I would suggest using the
\label
-\ref
system and create your own macros to handle the labelling and cross-referencing. Here's one take on it that usesrefcount
to pass references as values to the footnote mechanism (which uses counters):Each
\fnmark{<label>}
is supplied with a label, which is then synchronized with a\fntext{<label>}{<text>}
somewhere else in the document. Since this uses the.aux
file to store references, you're going to have to compile at least twice to start with (all footnotes will be0
, as perrefcount
's\setrefcountdefault{0}
). However, subsequent runs will only require a single compile, until new footnotes are introduced, or the references change.