章节标题的脚注长度为几段

章节标题的脚注长度为几段

我在章节标题后附加了一个长脚注。它跨越了三个段落。Latex 会抱怨! Paragraph ended before \M@sect was complete.。如果必须这样做,最好的方法是什么?protect在脚注前使用 并通过 手动换行\\,但这样我就没有第二段和第三段的缩进?

\documentclass{memoir}
\begin{document}
\paragraph{I am a paragraph\footnote{This footnote has more than one paragraph.

This is the second paragraph.

This is the third paragraph}%end footnote
}%end paragraph
\end{document}

编辑:

尝试遵循芭芭拉的建议,我做了以下操作,这似乎在我的真实文件中产生了所需的结果,但在 MWE 中编号是关闭的,所以我担心我在这里仍然遗漏了一些东西:

\documentclass{memoir}
\begin{document}

\paragraph{I am a paragraph.\protect\footnotemark}
\footnotetext{This footnote has more than one paragraph.

This is the second paragraph.

This is the third paragraph.}
\end{document}

答案1

这里的“明显”方法是将其分成\footnotemark\footnotetext{...}。不幸的是,通过提供的示例,memoir脚注本身的脚注编号比应有的低一号。memoir\paragraph和脚注的代码进行合理详细的检查未能发现原因。

但还有另一种直接的方法来解决这个问题:将整个脚注保留在论点内\paragraph,但不要使用空行来分隔段落。而是用来\protect\endgraf表示划分。

这里我们阐述这两种方法。

\documentclass{memoir}
\setlength{\textheight}{2.25in}
\begin{document}
\thispagestyle{empty}
some text

\paragraph{I am a paragraph.\protect\footnote
{This footnote has more than one paragraph.\protect\endgraf
This is the second paragraph.\protect\endgraf
This is the third paragraph.}}

some text

\paragraph{I am a paragraph.\protect\footnotemark}
\footnotetext{This footnote has more than one paragraph.

This is the second paragraph.

This is the third paragraph.}

some text

\end{document}

示例代码的输出

答案2

\par欺骗 TeX,让它在分段命令的参数中看不到(或空白行)。

\documentclass{memoir}

\newcommand{\footnoted}[3]{%
  % #1 is the sectional command
  % #2 is the title
  % #3 is the footnote
  \long\def\next{#3}%
  #1[#2]{#2\footnote{\next}}%
}

\begin{document}

\footnoted\paragraph{I am a paragraph}
  {This footnote has more than one paragraph.

   This is the second paragraph.

   This is the third paragraph.}

\end{document}

答案3

\documentclass{memoir}
\begin{document}
\paragraph[zzz]{I am a paragraph\footnote{This footnote has more than one paragraph.
This is the second paragraph.
%
This is the third paragraph}%end footnote
}%end paragraph _heading_
stuff here
\end{document}

相关内容