# What to do when a line in a bibliography entry overflows?

The usual solution to fix lines that overflow is to rewrite it. However, that hardly works with bibliography entries that experience the same problem.

So what can I do to fix it? I can't rewrite anything since the information needs to be "as-is". I can't provide a minimal example because if I take the entry that overflows in my document, then the problem fixes itself as the font, font size and margins change.

### EDIT

Even though I've accepted an answer, please submit more answers if you have a good approach for addressing this issue. Maybe it can assist someone else who have the same problem and don't want to resort to using "ragged right".

-

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)

-
Using `RaggedRight` fixed the problem nicely, and it doesn't look out of place even though the rest of the document text is justified. – gablin Feb 14 '12 at 9:27

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.

-

Your options in the order of work involved:

1. accept the overfulls and do nothing (if they aren't that bad that might be preferable)
2. Typeset the bibliography with ragged right (either using `ragged2e` package or just plain `\raggedright`)
3. 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.
4. 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 my 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.
5. Wait until you are fully finished writing yuor 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.
-