fnpct autocite 导致 csquotes blockcquote 出现空格问题

fnpct autocite 导致 csquotes blockcquote 出现空格问题

在以下示例中,当引号后面直接出现句点时,使用fnpctbiblatex命令会导致出现不必要的空格。autocite

\documentclass{article}
\usepackage[ngerman]{babel}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @article{greenwade93,
        author  = "George D. Greenwade",
        title   = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
        year    = "1993",
        journal = "TUGBoat",
    }
    @book{goossens93,
        author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
        title     = "The LaTeX Companion",
        year      = "1993",
    }
\end{filecontents}

\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear-ibid,date=year,autocite=footnote,giveninits=true]{biblatex}

\SetCiteCommand{\autocite} % used by csquotes

\usepackage{fnpct}
\AdaptNoteOpt\autocite\multfootcite

\bibliography{\jobname}
\begin{document}
    \null
    \vfill
    \blockcquote[see][123]{greenwade93}{Famous quote}. But the period causes an unwanted space to appear.
    \blockcquote[see][123]{greenwade93}{Which is fixed by moving the period inside the quotation.} See?

    The problem is caused by \texttt{fnpct}.

    \texttt{fnpct} is needed to quote multiple authors at once, but in separate footnotes\autocite{greenwade93}\autocite{goossens93}
\end{document}

在此处输入图片描述

是否可以配置fnpct不在引号和句点之间添加空格?

答案1

据我所知,这里的问题是,将 的控制权移交\autocite给 会fnpct破坏\autocite删除前面空格的能力。根据biblatex的定义

Lorem \autocite{sigfridsson}.

Lorem\autocite{sigfridsson}.

\autocite由于出现问题,因此产生相同的输出\unspace。但是一旦fnpct掌控局面,这两条线的行为就会有所不同。

通常这不会有太大的问题,因为您可能永远不会在\footnote或之前留下空格。但是,像这样的命令\autocite的默认设置在调用前留一个空格(假设 的引用命令的通常定义是有意义的:许多命令需要在 前面留一个空格,这样它们就不会粘在 和 之前的文本上,而朋友可以很好地处理前面的空格)。您可以通过重新定义 明确地告诉不要在调用引用命令之前留下空格,另请参见第 30 页csquotes\blockcquote\autocitebiblatex\...cite\footcite\autocitecsquotes\mkccitationcsquotes文档

\renewcommand{\mkccitation}[1]{#1}

完整的 MWE

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=authoryear-ibid,date=year,autocite=footnote,giveninits=true]{biblatex}

\SetCiteCommand{\autocite}
\renewcommand{\mkccitation}[1]{#1}

\usepackage{fnpct}
\AdaptNoteOpt\autocite\multfootcite

\addbibresource{biblatex-examples.bib}
\begin{document}
    \null
    \vfill
    \blockcquote[see][123]{sigfridsson}{Famous quote}. But the period causes an unwanted space to appear.
    \blockcquote[see][123]{sigfridsson}{Which is fixed by moving the period inside the quotation.} See?

    The problem is caused by \texttt{fnpct}.

    \texttt{fnpct} is needed to quote multiple authors at once, but in separate footnotes\autocite{sigfridsson}\autocite{sigfridsson}

  Lorem \autocite{sigfridsson}.

  Lorem\autocite{sigfridsson}.
\end{document}

然后给出预期的输出。

示例的输出。<code>fnpct</code> 控制的脚注不会抑制先前的空格。<code>\blockcquote</code> 再次按预期显示。

我仍然无法上传输出图片。抱歉。如果您想添加结果图片,请随意添加。请参阅https://v1.overleaf.com/read/hgvsffpjwjbt用于演示。

相关内容