$\rightarrow$
假设您有一个脚注,打印在第 1 页和第 2 页。您如何自动在第 1 页的脚注文本末尾和第 2 页的脚注文本开头添加标记?
答案1
这相当困难。很难改变分页符周围的换行符,因此需要在正常文本块之外添加装饰,您无法在现有行内添加续行标记。可能最简单的方法是在脚注1sp
末尾添加一个比正常支柱更大的特殊支柱,然后如果脚注框没有那么深,您就知道它被拆分了,因此可以添加标记
\documentclass{article}
\makeatletter
\newdimen\ftnflag
\AtBeginDocument{{\footnotesize\selectfont\global\ftnflag\dp\strutbox\global\advance\ftnflag1sp\relax}}
\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
\addtolength\textheight{-10\baselineskip}
\def\a{One two three four five six. }
\def\b{\a\a Red green blue}
\def\c{\b\b\b\footnote{\itshape\b \roman{footnote}\b\a\b\b\b}\a\b\par A B C D \b\a\a\a\a\a\a\b}
\begin{document}
\c\c\c\a\b\c\c\c\b\a\c
\end{document}