0

I would like to have a small vertical space between the footnote continuing from a previous page and the footnote of the current page.

I know there is a command \footnotesep to separate the footnotes (as explained in Configuring footnote position and spacing). However, this solution introduce a vertical space between every footnote. Yet I would like a vertical space only between footnote from previous page, and footnotes from current page, as shown below:

------------------
a sample footnote continued form the previous page.

6. Next footnote coming immediately after the breaking footnote
7. Another footnote from current page, without vertical space before.

Is possible to get this style automatically?

3
  • 2
    As far as I can tell the duplicate candidate adresses this for all footnotes, not only those leaking out of their page.
    – T. Verron
    Nov 8, 2016 at 17:17
  • I've rephrased the question, in order to make it distinct from duplicate. @venkatesan Ramachandiran: Tell me if it match your initial intention.
    – ebosi
    Nov 9, 2016 at 9:50
  • This is what I got to say
    – RCV
    Nov 9, 2016 at 10:02

1 Answer 1

1

One solution is to put a label at the beginning and at the end of each footnote. At the beginning of a footnote, if the labels of the previous one are different, it means that it was split. If the current footnote starts on the page where the previous one ends, then insert a vertical skip.

\newcounter{footnotecount} % footnote counter
\newlength\splitfootnoteskip % skip added after a split footnote
% the following makes \splitfootnoteskip equal to \baselineskip inside footnotes
\begingroup
\footnotesize
\global\setlength\splitfootnoteskip{\baselineskip}
\endgroup
\makeatletter
% save the original definition of \@footnotetext
\let\kernel@footnotetext\@footnotetext
% and redefine it to insert labels
\renewcommand\@footnotetext[1]{%
  \check@splitfn
  \stepcounter{footnotecount}%
  \kernel@footnotetext{%
    \edef\next{\noexpand\label{fnstart\thefootnotecount}}\next
    \ignorespaces#1%
    \edef\next{\noexpand\label{fnend\thefootnotecount}}\next}}
% check whether the previous note was split
% if \c@footnotecount is 0, this is the first footnote.
% Otherwise, check whether both labels are defined and equal.
% If they are both defined but different, and the labels for the current
% footnote are defined, check whether the current footnote starts on the
% page where the previous one ends.
% If so, insert \vskip\splitfootnoteskip
\newcommand\check@splitfn{%
  \ifnum\c@footnotecount=\z@\else
    \begingroup
      \expandafter\let\expandafter\tempa\csname r@fnend\the\c@footnotecount\endcsname
      \ifx\tempa\relax\else
        \expandafter\ifx\csname r@fnstart\the\c@footnotecount\endcsname\tempa\else
          \count@=\c@footnotecount
          \advance\count@ 1\relax
          \expandafter\let\expandafter\tempb\csname r@fnstart\the\count@\endcsname
          \ifx\tempb\relax\else
            \edef\tempa{\expandafter\@secondoftwo\tempa}%
            \edef\tempb{\expandafter\@secondoftwo\tempb}%
            \ifx\tempa\tempb
              \insert\footins{\vskip\splitfootnoteskip}%
            \fi
          \fi
        \fi
      \fi
    \endgroup
  \fi
}
\makeatother
2
  • Tahnk you, it is working
    – RCV
    Dec 1, 2016 at 5:57
  • @venkatesanRamachandiran. Actually, my solution did not work completely. When the previous footnote is split, I forgot to check whether the current one starts on the page where the previous one ends. I edited my answer. Dec 1, 2016 at 8:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .