# Putting marks for split footnotes

Say, that you have a footnote which is printed in page 1 and 2. How can you put a mark, say $\rightarrow$ at the end of the footnote text in page 1 and at the start of the footnote text on page 2, automatically.

-
It's quite hard. It's very hard to change the line breaking around a page break so the decorations would need to be added outside the normal text block, you can't really add the continuation marker within the existing lines. Probably the easiest way is to add a special strut 1sp larger than a normal strut into the end of the footnote, then if the footnote box does not have that depth you know it was split so can add the markers. –  David Carlisle Oct 22 '12 at 9:26
@David: can you make this into an answer with some code so that I can accept it? –  Vafa Oct 22 '12 at 10:12
I made it an answer, it probably requires more code than I can really do during working hours. I won't be offended if you accept someone else's answer if they actually code it up:-) –  David Carlisle Oct 22 '12 at 10:17
While this does not answer your question, you might want to have a look at the fnbreak package, which "detects footnotes that are split over several pages, and writes a warning to the log file" (ibid.). –  Stephen Oct 25 '12 at 18:10

It's quite hard. It's very hard to change the line breaking around a page break so the decorations would need to be added outside the normal text block, you can't really add the continuation marker within the existing lines. Probably the easiest way is to add a special strut 1sp larger than a normal strut into the end of the footnote, then if the footnote box does not have that depth you know it was split so can add the markers

\documentclass{article}
\makeatletter

\newdimen\ftnflag

\let\old@makefntext\@makefntext
\def\@makefntext#1{\old@makefntext
#1%
\dp\strutbox\ftnflag
\@finalstrut\strutbox}%

\gdef \@makecol {%
\ifvoid\footins
\setbox\@outputbox \box\@cclv
\else
\setbox\@outputbox \vbox {%
\boxmaxdepth \@maxdepth
\unvbox \@cclv
\vskip \skip\footins
\color@begingroup
\normalcolor
\footnoterule
\ifx\splitftn\vbox
\hbox{\smash{\raise-\baselineskip\hbox{\llap{$\rightarrow$}}}}%
\fi
\global\let\splitftn=\null\relax
\typeout{dp \the\dp\footins, dpstrut \the \dp\strutbox}%
\ifdim\dp\footins<\ftnflag
\global\let\splitftn=\vbox
\fi
\unvbox \footins
\ifx\splitftn\vbox
\nobreak
\vskip-\ftnflag
\hbox{\rlap{\kern\textwidth$\rightarrow$}}%
\else
\fi
\color@endgroup
}%
\fi
\let\@elt\relax
\xdef\@freelist{\@freelist\@midlist}%
\global \let \@midlist \@empty
\@combinefloats
\ifvbox\@kludgeins
\@makespecialcolbox
\else
\setbox\@outputbox \vbox to\@colht {%
\@texttop
\dimen@ \dp\@outputbox
\unvbox \@outputbox
\vskip -\dimen@
\@textbottom
}%
\fi
\global \maxdepth \@maxdepth
}

\makeatother