biblatex:当后面跟着“ed”时,修改后的 bibnamedash 后面会有空格。

biblatex:当后面跟着“ed”时,修改后的 bibnamedash 后面会有空格。

我遇到了有关 bibnamedash 后的间距的问题,希望在这里找到帮助。

我已经修改了\bibnamedash\renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}}获得3-em破折号,这通常可以正常工作,但是当破折号后面跟着“ ed.”时,破折号和“ .”之间的空格ed会丢失。我在下面附上了一个最小的可运行示例。这是一个错误吗?有解决方法吗?

\documentclass[12pt]{article}

\begin{filecontents}{biblio.bib}
@incollection{Elster1997,
author = {Elster, Jon},
title = {The market and the forum},
subtitle = {Three varieties of political theory},
editor = {Bohman, James and Rehg, William},
location = {Cambridge, Massachusetts},
publisher = {The MIT Press},
year = {1997},
booktitle = {Deliberative democracy},
booksubtitle = {Essays on reason and politics},
pages = {3-33},
}
@collection{Elster1998,
editor = {Elster, Jon},
title = {Deliberative democracy},
location = {Cambridge},
publisher = {Cambridge University Press},
year = {1998},
}
\end{filecontents}

\usepackage[style=authoryear]{biblatex}

\renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}}

\addbibresource{biblio.bib}


\begin{document}

This is a test file for biblatex (\cite{Elster1997}; \cite{Elster1998}).

\printbibliography

\end{document}

答案1

的默认定义bibnamedash更复杂。您可以在文件中找到定义biblatex.def。为了解释解决方案,这里给出了定义:

\newcommand*{\bibnamedash}{%
  \ifdimless{\leftmargin}{0.75em}
    {\mbox{\textemdash\space}}
    {\makebox[\leftmargin][l]{%
       \ifdimless{\leftmargin}{1.25em}
         {\textendash}
     {\textemdash}}}}

您可以看到,的宽度bibnamedash与有关,leftmargin因此简单的定义为:\mbox{\textemdash\space}。这里可以忽略其他部分。因此,对于您的问题,您可以轻松完成:

\renewcommand{\bibnamedash}{\rule[3pt]{3em}{.6pt}\space}

相关内容