# Overfull hbox in biblatex

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{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?

• I doubt that 0.29pt is really visible. Apart from this: add \usepackage[T1]{fontenc} and \usepackage[final]{microtype} (the final is there to overwrite your global draft). – Ulrike Fischer Apr 17 '14 at 9:41
• @UlrikeFischer this is just a minimal example, in the real document, it is about 1.6pt and it is visible in the printed version as well. But lockstep's answer already solved my problem. – pascalhein Apr 17 '14 at 9:44
• I wouldn't add the emergencystretch globally but only before the bibliography. – Ulrike Fischer Apr 17 '14 at 9:46

\emergencystretch=1em


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 the final package option to ensure that the microtypographic features are activated even when using the draft class option.

Both methods will cause the warning in your example to disappear.

• I think you just saved my PhD. – Jill-Jênn Vie Oct 5 '16 at 1:00
• I think \emergencystretch can appear anywhere, not only in the preamble. – John J. Camilleri Jul 19 '17 at 8:53
• This reduced my warnings from 3 to only 1 overfull hbox. Then I tried 2em, which only made everything worse. Finally, instead of \emergencystretch, I simply added \usepackage[T1]{fontenc} to the preamble and all warnings went away. All my bad boxes were overfull by less than 1 pt. – Waldir Leoncio Aug 15 '18 at 13:20
• Notice: Increasing the value of \emergencystretch can make things worse as stopping latex from hyphenating words and just stretching everything: Why my document is not hyphenating on words starting with upper case letter? (I am not using \uchyph=0) – user Jul 12 at 1:41