The following code defines a macro \longfootnote[fn-label]{footnote text}
, which produces a footnote and assigns it a label which can be cross-referenced in the usual way using \ref
to produce a footnote mark.
\makeatletter
\def\longfootnote[#1]{%
\stepcounter{footnote}%
\@bsphack
\protected@write\@auxout{}%
{\string\newlabel{#1}{{%
\string\begingroup
\string\c@footnote \number\c@footnote\string\relax
\string\unrestored@protected@xdef\string\@thefnmark{%
\string\thefootnote}%
\string\endgroup
\string\@footnotemark
}{\thepage}}}%
\@esphack
\protected@xdef\@thefnmark{\thefootnote}
\@footnotetext}
\makeatother
This code is effectively a composition of of the code from \label
and \@xfootnotemark
from latex.ltx
, writing a label to the auxiliary file which consists of a footnotemark for the new footnote. If you use an editor which recompiles whenever the labels change, you should quickly obtain a new document in which references to the long footnotes appear properly.
Sample document.
\documentclass{article}
\usepackage[left=5mm,right=5mm,paperheight=55mm, paperwidth=62mm]{geometry}
\thispagestyle{empty}
\makeatletter
\def\longfootnote[#1]{%
\stepcounter{footnote}%
\@bsphack
\protected@write\@auxout{}%
{\string\newlabel{#1}{{%
\string\begingroup
\string\c@footnote \number\c@footnote\string\relax
\string\unrestored@protected@xdef\string\@thefnmark{%
\string\thefootnote}%
\string\endgroup
\string\@footnotemark
}{\thepage}}}%
\@esphack
\protected@xdef\@thefnmark{\thefootnote}
\@footnotetext}
\makeatother
\begin{document}
\section{A demonstration}
Here\footnote{foo} is\ref{c} a\ref{a} test\footnote{bar} paragraph.\ref{b}
\longfootnote[a]{baz}
\longfootnote[b]{gleep}
\longfootnote[c]{glorp}
\label{sec:test}
This text\footnote{fie} is a part of Section~\ref{sec:test}.
\end{document}
Result.

The long footnotes should not interfere with any other cross-referencing, as illustrated above.
\footnotemark
and\footnotetext
?hyperref
too.