標題中的多段落腳註

標題中的多段落腳註

我不知道為什麼腳註不起作用。沒有\par.

\documentclass[a4paper, 12pt]{article}

\title{title%
\footnote{
    para1\par
    para2
}%
}
\author{author}

\begin{document}
\maketitle
text
\end{document}

答案1

至於為什麼它不起作用,請參閱:為什麼我們不總是使用 \long\def 而不是 \def 呢?

因此,要修復它,您可以重新定義\titleand \thanksfrom latex.ltxto be \long,然後允許段落中斷。

\makeatletter
\long\def\title#1{\gdef\@title{#1}}
\long\def\thanks#1{%
  \footnotemark
  \protected@xdef\@thanks{%
    \@thanks\protect\footnotetext[\the\c@footnote]{#1}}}
\makeatother

但更簡單的選擇是將腳註文字定義為單獨的宏,從而繞過錯誤檢查。

\documentclass[a4paper, 12pt]{article}

\def\titlefootnotetext{para1\par para2}

\title{title\thanks{\titlefootnotetext}}
\author{author}

\begin{document}
\maketitle
text
\end{document}

相關內容