I have a large bibliography in which a few items are causing underfull hboxes due to a long URL. Answers to similar questions suggest a number of global options for fixing this; e.g.
Line breaking of URLs in bibliographies
However, I don't want a global solution (like applying \sloppy or \raggedright to the whole bibliography), because all the other bibliography items behave as I want them to.
In most cases, I have been able to resolve the issue by inserting a manual line break at the start of the url entry in the .bib file. However, in one case that isn't working. MWE:
\documentclass[natbib]{svmono}
\usepackage{url}
\begin{document}
\cite{koepke2009naturalness}
\bibliographystyle{harvard}
\bibliography{test}
\end{document}
test.bib
@article{koepke2009naturalness,
year={2009},
title={Naturalness in formal mathematics},
journal={\\\url{http://www.math.uni-bonn.de/people/koepke/Preprints/Naturalness_in_formal_mathematics.pdf}},
author={Koepke, Peter}
}
I've tried inserting \\ at various points inside the url; it breaks the line, but I still get an underfull hbox. How can I break the url in a way which doesn't cause an underfull hbox?
Edit: http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0 <-- svmono http://iccle.googlecode.com/svn-history/r2130/trunk/doc/harvard.bst <-- harvard.bst



harvard.bst?svmono.cls? – Qrrbrbirlbel Oct 17 '12 at 22:32journalfield should not be for a\url– Guido Oct 17 '12 at 23:08,, it looks good. The underfull box is still there, but I don't think you can avoid that with such long URLs. You have attfont and no space. What should LaTeX do wit that line in your opinion? – Qrrbrbirlbel Oct 17 '12 at 23:10\\\url{http://www.math.uni-bonn.de/people/koepke/\\Preprints/Naturalness_in_formal_mathematics.pdfI would expect the extra manual line break to prevent the underfull box.
– Mohan Oct 17 '12 at 23:29,? – Mohan Oct 17 '12 at 23:31jornaland theauthorfield. With{\url{http://www.math.uni-bonn.de/people/koepke/}\\\url{Preprints/Naturalness_in_formal_mathematics.pdf}}I don't have an underfull box. Either way,journalis for the journal's name, you can usenotefor the URL. – Qrrbrbirlbel Oct 17 '12 at 23:39