回忆录:如何制作包含多个段落的“\newfootnoteseries”?

回忆录:如何制作包含多个段落的“\newfootnoteseries”?

我有两层脚注,一层是普通脚注,一层是特别编辑脚注。我想将较长的文本放在两段编辑脚注中,但这行不通。

梅威瑟:

\documentclass{memoir}

\usepackage{xcolor}

\newfootnoteseries{E}
\renewcommand\thefootnoteE{\textcolor{red}{\Roman{footnoteE}}}
\let\editornote=\footnoteE

\begin{document}

Text%
\footnote{Footnote paragrah 1.
% -- removing this is fine
Footnote paragraph 2.}%
\editornote{Editor paragraph 1.
% -- removing this breaks
Editor paragraph 2.}

\end{document}

删除第二个时出现以下错误%

Runaway argument?
{\rule \z@ \footnotesep \ignorespaces {\@nameuse {foottextfontE}Edito\ETC.
./editornotes.tex:17: Paragraph ended before \@makefntextE was complete.
<to be read again> 
\par 
l.17 Editor paragraph 2.}

?

奇怪的是,多个段落在常规脚注中可以正常工作。

答案1

那这个呢?

\documentclass{memoir}

\usepackage{xcolor}

% \newfootnoteseries{E}
% \renewcommand\thefootnoteE{\textcolor{red}{\Roman{footnoteE}}}
% \let\editornote=\footnoteE

\newcounter{editorfn}

\makeatletter
\def\editornote{%
    \refstepcounter{editorfn}
    \xdef\@thefnmark{\roman{editorfn}} \@footnotetext
    }
\makeatother

\begin{document}

Text%
\footnote{Footnote paragrah 1.\\
% -- removing this is fine
Footnote paragraph 2.}%
\editornote{Editor paragraph 1.\\
% -- removing this breaks
Editor paragraph 2.}

\end{document}

答案2

看来,这\newfootnoteseries{E}造成了“短路”,\@makefntextE这是导致问题的原因。我已经memoir.cls在本地用修改过的版本进行了测试,似乎可以正常工作,但我不确定现在的流程是怎样的。有没有可以提交补丁的仓库?

由于我不熟悉它的内部运作,因此我也不能保证它不会干扰回忆录的其他部分。

以下是针对 v3.7h 版本 (2018/12/12) 的补丁

$ diff -p /usr/local/texlive/2019/texmf-dist/tex/latex/memoir/memoir.cls memoir.cls 
*** /usr/local/texlive/2019/texmf-dist/tex/latex/memoir/memoir.cls  Wed Dec 12 22:24:10 2018
--- memoir.cls  Fri May 17 15:41:06 2019
***************
*** 9362,9368 ****
    \m@makefootfootmark{#1}%                       -> \footfootmark#1
    \m@makemakefootmark{#1}%                       -> \makefootmark#1
    \m@makefootmarkstyle{#1}%                      -> \footmarkstyle#1
!   \@namedef{@makefntext#1}##1{\@nameuse{makefootmark#1} ##1}%
    \m@make@footstart{#1}%                         -> \@footstart#1
    \m@make@footgroup{#1}%                         -> \@footgroup#1
    \expandafter\newinsert\csname @mpfootins#1\endcsname% -> \@mpfootins#1
--- 9362,9368 ----
    \m@makefootfootmark{#1}%                       -> \footfootmark#1
    \m@makemakefootmark{#1}%                       -> \makefootmark#1
    \m@makefootmarkstyle{#1}%                      -> \footmarkstyle#1
!   \@namelongdef{@makefntext#1}##1{\@nameuse{makefootmark#1} ##1}%
    \m@make@footstart{#1}%                         -> \@footstart#1
    \m@make@footgroup{#1}%                         -> \@footgroup#1
    \expandafter\newinsert\csname @mpfootins#1\endcsname% -> \@mpfootins#1

我将在几周内推迟接受我自己的答案,看看是否会出现更好的答案。

相关内容