Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

Overfull hbox

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?

share|improve this question
1  
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 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 at 9:44
2  
I wouldn't add the emergencystretch globally but only before the bibliography. –  Ulrike Fischer Apr 17 at 9:46

1 Answer 1

up vote 6 down vote accepted

Add the following to your preamble:

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.