bigfoot 包中的 \prevdepth 不正确

bigfoot 包中的 \prevdepth 不正确

在我的书中,我使用bigfoot包来做脚注。我想添加续行标记,手册告诉我需要重新定义命令\FN@beforebreak。但是,当我这样做时,我得到了一个错误。MWE:

\documentclass{article}
\usepackage{blindtext}
\usepackage{bigfoot}
\DeclareNewFootnote{default}

% fix bug in bigfoot 2015/08/30 2.1
% see https://tex.stackexchange.com/questions/471379/footnote-marks-missplaced-with-bigfoot/
\usepackage{xpatch}
\makeatletter
\patchcmd\FN@allmarks{266}{256}{}{\fail}
%% error
\renewcommand\FN@beforebreak{...}
\makeatother

\begin{document}
\Blindtext[2][1]\blindtext[1]\footnote{\Blindtext[2][1]}
\end{document}

这给了我一个错误

! Improper \prevdepth.
\FN@returnbest ...\maxdimen \fi \ifdim \prevdepth 
                                                  <\splitmaxdepth \hrule \@h...
l.20 \end{document}

它看起来像是大脚怪里的虫子,但我搞不懂?

答案1

我认为\FN@beforebreak应该包含垂直模式材料。更准确地说,不应该包含段落开头的材料。

\documentclass{article}
\usepackage{blindtext}
\usepackage{bigfoot}
\DeclareNewFootnote{default}

% fix bug in bigfoot 2015/08/30 2.1
% see https://tex.stackexchange.com/questions/471379/footnote-marks-missplaced-with-bigfoot/
\usepackage{xpatch}
\makeatletter
\patchcmd\FN@allmarks{266}{256}{}{\fail}
%% no error
\renewcommand\FN@beforebreak{\hbox{...}}
\makeatother

\begin{document}
\Blindtext[2][1]\blindtext[1]\footnote{\Blindtext[2][1]}
\end{document}

要在行末添加省略号,您可以尝试类似

\renewcommand\FN@beforebreak{%
  \vbox to 0pt{\vss\hbox to\hsize{\hss\rlap{\dots}}\vskip\baselineskip}%
}

相关内容