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.

When I use the \cite command for my citations, often LaTeX will overflow the margins for my lines, and the text looks pretty bad. How can I make LaTeX push long citations to the next line automatically?

share|improve this question
    
Here's a reference to the same question in 2004, but I don't get the answer tug.org/pipermail/tugindia/2004-September/002975.html –  Noli Sep 5 '10 at 23:01

5 Answers 5

up vote 21 down vote accepted

Without a minimal example (i.e., code that will show the problematic behaviour), one can only speculate. However, I've stumbled over this problem in the past, and it may (!) help if you add the following to your preamble:

\usepackage{breakcites}

See the breakcites page at CTAN for details. If it doesn't help, you'll have to provide a minimal example that (above all) shows your document class and your bibliography style.

share|improve this answer

The "general solution" for overfull boxes in paragraph mode runs as follows:

  1. Rewrite your text. Seriously. In some cases, this can be the only way to achieve "perfect" typesetting.

  2. Enable the microtype package. Surprisingly enough, this package reduces many occurrences of overfull lines.

  3. Wrap the paragraph with \begin{sloppypar}...\end{sloppypar}. This relaxes LaTeX's rules for how much interword space is acceptable; you'll get less "grey" paragraph, but at least it will stay within its margins.

  4. Finally, if this happens a lot, you can enable \sloppy for the entire document. With this mode in effect, well-typeset paragraphs will (almost almost always) remain just as well typeset, but "bad" paragraphs such as you're talking about will behave as if they were wrapped with sloppypar. I tend not to recommend this route as it can make you lazier about good typesetting—but depending on your document this is not necessarily a bad thing.

share|improve this answer
    
+1 for microtype, -1 for sloppypar and \sloppy (for me, this is only the last resort). –  0x6d64 Aug 25 '11 at 7:10
1  
What do you suggest besides microtype+rewriting? I suppose playing with other paragraph settings might get you what you want, but I doubt it would be any better than sloppypar. Note that sloppypar on an already good paragraph will not reduce its quality. –  Will Robertson Aug 25 '11 at 8:06

In order to split citation you must add both these packages, otherwise the citation will not properly split.

\usepackage[breaklinks=true]{hyperref}
\usepackage{breakcites}
share|improve this answer
1  
Welcome to TeX.SE. How does your answer differ materially from the one posted by @lockstep? Note that the original posting made no reference to the hyperref package being loaded; it may thus not be a good recommendation to suggest including \usepackage[breaklinks=true]{hyperref}. –  Mico Jan 5 at 16:22
    
Although @Mico is right in his comment, this actually solved my problem. +1! –  astabada Apr 15 at 10:37

Just use following command on your LaTeX file

\usepackage{cite}

if you are using LaTeX2e

share|improve this answer
1  
You mean "Just use the cite package.". Also everyone should use LaTeX2e. LaTeX2 is outdated since ages and LaTeX3 isn't around yet. –  Martin Scharrer Apr 27 '11 at 11:24

If you are using hyperref, it may help to put breaklinks=true in the options, e.g. \usepackage[breaklinks=true]{hyperref}.

I found this suggested here: [http://www.latex-community.org/forum/viewtopic.php?f=47&t=5455]

share|improve this answer
3  
If the driver does not support breaklinks, then the link area will be messed up. breaklinks is already enabled by default for drivers that support this feature. –  Heiko Oberdiek Sep 10 '13 at 16:38

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.