# How do I make LaTeX push long citations to a new line?

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?

-
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
It is amazing that a poorly stated question (unclear, no MWE, etc.) can however attract so much beneficial attention to it. This is a sign of TeX community's good will. –  Ludenticus Feb 27 at 4:28
Perhaps the TeX community just has a better level of reading comprehension, concerning the question, and familiarity with LaTex –  Noli Feb 27 at 23:55

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.

-

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.

-
+1 for microtype, -1 for sloppypar and \sloppy (for me, this is only the last resort). –  0x6d64 Aug 25 '11 at 7:10
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}

-
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 '14 at 16:22
Although @Mico is right in his comment, this actually solved my problem. +1! –  astabada Apr 15 '14 at 10:37

Just use following command on your LaTeX file

\usepackage{cite}


if you are using LaTeX2e

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

-
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

I don't mean for this to be an answer, though it worked in my case and that is why I'm putting it here - in the odd chance it is helpful to someone else. I tried all these suggestions and I suppose I could have drastically reworded the paragraph but it was best as it was. It had two citations like this: \cite{citation1,citation2} and the second one (though order didn't appear to matter) always ran off into the margin in the bibliography. I finally wound up just putting \penalty-10000 inside the JabRef bib source file where I wanted the break - disappointing way of solving it for sure! Feel free to remove this if people do not think it is helpful.

-