如何在断脚注(从上一页继续)和另一个新脚注之间获得垂直空间?

如何在断脚注(从上一页继续)和另一个新脚注之间获得垂直空间?

我希望上一页的脚注和当前页的脚注之间有一个小的垂直空间。

我知道有一个命令\footnotesep可以分离脚注(如配置脚注位置和间距)。但是,这种解决方案在每一个脚注。但我希望仅在上一页的脚注和当前页的脚注之间留有垂直空间,如下所示:

------------------
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.

可以自动获得这种风格吗?

答案1

一种解决方案是在每个脚注的开头和结尾处放置一个标签。在脚注的开头,如果前一个脚注的标签不同,则表示该脚注被拆分。如果当前脚注从前一个脚注结束的页面开始,则插入垂直跳过。

\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

相关内容