1

I am finishing my thesis and get ugly inline citations with multiple authors when using biblatex.

The issue arises especially with double last names as in the attached picture:

enter image description here

As you can see the name flows into the margin. I am using biber and the authoryear style.

I tried including \defcounter{lownamepenalty}{0} and \defcounter{highnamepenalty}{0} in the preamble, but it still looks the same after a clean build.

Is there any way to make biblatex (or biber) do a linebreak earlier on in the author list, or do I have to manually make two separate multicitations? That would look ugly.

I am using \parencite by the way.

niclas ericsson
  • 461
  • 4
  • 14

1 Answers1

2

The problem you are having is not directly related to biblatex, but to TeX's paragraph building system. So rather than do something to the citations themselves, it's really best to wait until the very final stages of your document and adjust individual paragraphs.

One way to do this is to use the \sloppypar environment, which sets various factors that affect the spacing so that normally bad paragraphs are allowed.

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

Two of the factors that sloppypar sets are \emergencystretch and \tolerance. See

for an explanation of how all these work. But the values that \sloppypar sets for these are quite large, so a more finegrained approach would be to use an emergency environment, as defined in Heiko Oberdiek's answer to this question:

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

This environment sets a value for \emergencystretch, which might be enough to do the job. Try small values first and increase as needed.

Here's a small sample document to show how this works. I've added some bibliography items, but as you will see, they are not directly the source of the problem. To see this, I've also added a moveable word 'foo' which will show the effects of rewording. If you play around with either the margins or the placement of the word or the settings for the emergency environment you can see it all in action. The black marks show the overfull boxes.

\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}

output of code

Alan Munn
  • 218,180
  • I see the value of the emergency environment. But in my case the sloppypar produced the exact same results. I guess it was just because of the lengths of the words and the paragraphs involved. – niclas ericsson Aug 21 '15 at 00:01
  • @niclasericsson Yes it's hard to come up with examples that would show the difference, although I'm sure they exist. The other advantage of the \emergency environment is that you can set the value to 0 if you reword the paragraph, whereas with \sloppypar you would need to remove the environment. – Alan Munn Aug 21 '15 at 00:43