I just ran into a problem using biblatex with a long author and title: The output extends past the right margin of my text, because biblatex does not insert a linebreak before the date. Please see the picture below for what exactly I am talking about.
The black box is because of the drafts option; although you can't really see that the text is longer than the other lines, this is clearly visible when I add other references (this is a minimal example). As you can see, I am using babel with ngerman, without this package, the date (Mar. 19, 2014
) works fine without overfull hboxes.
This is the code for the output above:
\documentclass[draft, 12pt]{article}
\usepackage[backend=bibtex, style=alphabetic]{biblatex}\addbibresource{bibliography.bib}
\usepackage{filecontents}
\begin{filecontents*}{bibliography.bib}
@ONLINE{first,
author = {Das ist der erste Autor},
title = {Viel zu lange Quellenangabe im Literaturverzeichnis},
date = "2014-03-19"
}
@ONLINE{second,
author = {Other Author},
title = {Reference},
date = "2014-03-19"
}
\end{filecontents*}
\usepackage[a4paper, hmargin={40mm, 20mm}]{geometry}
\usepackage[ngerman]{babel}
\usepackage{newtxtext}
\begin{document}
\cite{first}\cite{second}
{\renewcommand*{\bibfont}{\small}
\printbibliography
}
\end{document} % <-- this is line 23
Biblatex reports this warning:
Overfull \hbox (0.29396pt too wide) in paragraph at lines 23--23
[]\T1/ntxrx/m/n/10.95 Das ist der ers-te Au-tor. \T1/ntxrx/m/it/10.95 Viel zu lan-ge Quel-len-an-ga-be im Li-te-ra-tur-ver-zeich-nis\T1/ntxrx/m/n/10.95 . 19. März|
[]
I already tried using various options on biblatex and including microtype
, but none of them worked. I can't change the font, size and margins.
This problem only occurs when I also cite a second reference, therefore I included two of them in my MWE.
Do you have any ideas how to make biblatex either include a linebreak before the date or adjust the line in another way so that the text no longer extends past the right margin?
Best Answer
Add the following to your preamble:
This allows for an additional line-breaking pass with the amount of "tolerable" white space per line increased by 1em.
Alternatively, and as suggested by Ulrike Fischer, load the
microtype
package with thefinal
package option to ensure that the microtypographic features are activated even when using thedraft
class option.Both methods will cause the warning in your example to disappear.