What to do when a line in a bibliography entry overflows?
try:
\begingroup
\sloppy
%\RaggedRight %% needs package ragged2e
\bibliographystyle{...}
\bibliography{..}
\endgroup
or similiar, if you are using biblatex
. It is always a good idea to set the bibliography ragged right if you have a lot of urls, which should always be set with \url{...}
(needs the package of the same name)
Your options, ordered by the amount of work involved, are:
- accept the overfulls and do nothing (if they aren't that bad that might be preferable)
- Typeset the bibliography with ragged right (either using
ragged2e
package or just plain\raggedright
) - Alternatively (same amount of work) set the bibliography somewhat loose, by increasing
\tolerance
and setting an\emergencystretch
. Avoid\sloppy
if possible as this will likely result in a few extremely bad lines, instead of a somewhat more loosely setting. - Edit your
bib
file(s) and include explicit hyphen possibilities (i.e.,\-
) in places where you want a break that is not taken. This should be non-destructive in other situations but depending on the reason for your overfull lines it may not solve the problem. You could also try adding something like\linebreak[3]
in certain places if you want to have a break being taken slightly earlier. - Wait until you are fully finished writing your text. Then take the
.bbl
file and edit it by adding hard\linebreak
or even\newline
commands into it. However, make sure that you save a copy of the changed file in case you forget and regenerate it from the BibTeX sources.
I've had such problems due to lack of hyphenation: the bibliography item was French, while my language setting was English. I fixed this by adding a \hyphenation
entry for the word that wouldn't break. Of course this only works for this specific issue.