我目前正在使用 quote-environment 和 footcite 命令,在 quote 環境的末尾顯示引文腳註。現在我透過修改引用環境添加了引號,如下所示:
\documentclass[a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage{lipsum}
\usepackage{needspace}
\renewenvironment{quote}
{
\list{\Large\glqq\hspace{-0.4em} \normalsize}
{\rightmargin\leftmargin}%
\item\relax\small\sl\ignorespaces
\needspace{4\baselineskip}
}
{\Large\grqq\normalsize \endlist}
\begin{document}
\lipsum[1]
\begin{quote}
\lipsum[1]\footnote{citationsreference}
\end{quote}
\lipsum[1]
\end{document}
現在引用區塊看起來像這樣:
現在腳註位於引號內,是我在重新定義 quote 環境時添加的。有誰知道,我如何在不手動檢查所有實例的情況下更改此設置,以便腳註位於引號的外部,即在引號的右側?任何不整潔等想法都是受歡迎的。
答案1
考慮以下相當不整潔的想法:您可以在本地重新定義\footnote
為不直接列印,而是儲存內容,並在\grqq
使用原始\footnote
命令的重命名副本後顯示腳註。
定義可以在 中完成,請注意,參數\renewenvironment
需要 double ,因為它不是環境的參數,而是環境中定義的命令的參數。##
如果沒有腳註,則應進行一些額外的考慮。您可以定義命令來顯示儲存的內容,預設不會執行任何操作,也可以重新定義該命令(如果\footnote
使用)(請注意它是多麼不整潔...)。
微量元素
\documentclass[a4paper]{article}
\usepackage[ngerman]{babel}
\usepackage{lipsum}
\usepackage{needspace}
\let\origfootnote\footnote
\renewenvironment{quote}
{
\list{\Large\glqq\hspace{-0.4em} \normalsize}
{\rightmargin\leftmargin}%
\item\relax\small\sl\ignorespaces
\needspace{4\baselineskip}%
\gdef\fnshowcontents{\relax}%
\def\footnote##1{\gdef\fnstoredcontents{##1}\gdef\fnshowcontents{\origfootnote{\fnstoredcontents}}}%
}
{\Large\grqq\normalsize\fnshowcontents\endlist}
\begin{document}
\lipsum[1]
\begin{quote}
\lipsum[1]\footnote{citationsreference}
\end{quote}
Regular footnote\footnote{printed immediately} as before.
\begin{quote}
\lipsum[2]
\end{quote}
\lipsum[1]
\end{document}
結果: