如何使用 biblatex 强制在多作者内联引用中换行?

如何使用 biblatex 强制在多作者内联引用中换行?

我正在完成我的论文,使用时会得到多个作者的丑陋内联引用biblatex

该问题尤其出现在双重姓氏的情况下,如附图所示:

在此处输入图片描述

如您所见,名称流入了边距。我正在使用biberauthoryear样式。

我尝试在序言中包含\defcounter{lownamepenalty}{0}和,但在干净构建之后它看起来仍然一样。\defcounter{highnamepenalty}{0}

有没有办法在作者列表的早期进行biblatexbiber行,或者我必须手动进行两次单独的多重引用?那看起来会很难看。

\parencite顺便说一下,我正在使用。

答案1

您遇到的问题与 并没有直接关系biblatex,而是与 TeX 的段落构建系统有关。因此,与其对引文本身进行处理,不如等到文档的最后阶段再调整各个段落。

一种方法是使用环境\sloppypar,它设置影响间距的各种因素,以便允许通常不好的段落。

\begin{sloppypar}
  ...
\end{sloppypar}

集合的两个因数sloppypar\emergencystretch\tolerance。参见

解释所有这些是如何工作的。但是\sloppypar为这些设置的值相当大,因此更细粒度的方法是使用环境emergency,如 Heiko Oberdiek 对此问题的回答中所定义:

\newenvironment{emergency}[1]{%
  \par
  \setlength{\emergencystretch}{#1}%
}{%
  \par
}

此环境为 设定了一个值\emergencystretch,该值可能足以完成工作。首先尝试较小的值,然后根据需要增加。

以下是一个小示例文档,用于展示其工作原理。我添加了一些参考书目项目,但正如您所看到的,它们并不是问题的直接根源。为了看到这一点,我还添加了一个可移动的单词“foo”,它将显示改写的效果。如果您调整边距或单词的位置或环境设置,emergency您可以看到它的全部作用。黑色标记显示溢出的框。

\documentclass[draft]{article}
\begin{filecontents}{\jobname.bib}

@article{fama-french:1997,
    Author = {Fama, Eugene F. and French, Kenneth R. },
    Journal = {Journal of Financial Economics},
    Pages = {153 - 193},
    Title = {Industry costs of equity},
    Volume = 43,
    Year = 1997}

@article{fama-french:1992,
    Author = {Fama,  Eugene F. and French, Kenneth},
    Journal = {The Journal of Finance},
    Pages = {427-465},
    Title = {The Cross-Section of Expected Stock Returns},
    Volume = 47,
    Year = 1992}

@article{fama-french:2002,
    Author = {Fama, Eugene F. and French, Kenneth R.},
    Journal = {The Journal of Finance},
    Pages = {637-659},
    Title = {The Equity Premium},
    Volume = 57,
    Year = 2002}

@book{Ribeiro-Gonsalves1992,
    Author = {Ribeiro-Gonsalves, Arturo},
    Publisher = {{MIT} Press},
    Title = {Um Livro},
    Year = {1992}}
\end{filecontents}

\usepackage[backend=biber,style=authoryear]{biblatex}
\addbibresource{\jobname.bib}

\usepackage[width=2in]{geometry}
% change margins to see different effects

\newenvironment{emergency}[1]{%
  \par
  \setlength{\emergencystretch}{#1}%
}{%
  \par
}

\def\foo{foo }
\def\bar{foo }
% comment out these next lines individually to see different effects
% uncommenting the line *adds* the word ‘foo’ to the text.
\def\foo{\relax}
\def\bar{\relax}

\begin{document}

Some text  that will make the \foo line wrap can we make  a bad  break  realization \bar still not giving  a   break \parencite{fama-french:1992,
fama-french:1997,
fama-french:2002,
Ribeiro-Gonsalves1992}.
And some more text afterwards.

\begin{emergency}{3.45pt}
Some text  that will make the \foo line wrap can we make  a bad  break  realization \bar still not giving  a   break \parencite{fama-french:1992,fama-french:1997,
fama-french:2002,
Ribeiro-Gonsalves1992}.
And some more text afterwards.
\end{emergency}

\begin{emergency}{3.5pt}
Some text  that will make the \foo line wrap can we make  a bad  break  realization \bar still not giving  a   break \parencite{fama-french:1992,fama-french:1997,
fama-french:2002,
Ribeiro-Gonsalves1992}.
And some more text afterwards.
\end{emergency}

\begin{sloppypar}
Some text  that will make the \foo line wrap can we make  a bad  break  realization \bar still not giving  a   break \parencite{fama-french:1992,fama-french:1997,
fama-french:2002,
Ribeiro-Gonsalves1992}.
And some more text afterwards.
\end{sloppypar}

\end{document}

代码输出

相关内容