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.

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

share|improve this question

3 Answers 3

up vote 7 down vote accepted

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)

share|improve this answer
    
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.

share|improve this answer

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