# \cite spills over into the margin

As you can see at the picture, a citation spills over into the margin of my paper. How can I resolve the issue?

-
Use \begin{sloppypar}....\end{sloppypar} to that particular paragraph. – Harish Kumar Nov 19 '12 at 1:01
Can we please see how this particular citation is being produced? – Gonzalo Medina Nov 19 '12 at 1:06
Rephrase the sentence containing the citation to be on another place, for example the beginning of the sentence? – Kurt Nov 19 '12 at 1:08
I used this command ~\cite{<key>} @GonzaloMedina – Mazzy Nov 19 '12 at 1:08
Then, I suggest doing as Kurt said: if possible, rephrase the sentence so that the citation moves to another place (not the end of the line). – Gonzalo Medina Nov 19 '12 at 1:13

Other users have suggested general methods to deal with bad line breaks, namely

• loading the microtype package (should be done before resorting to other measures);
• enclosing the problematic paragraph in a sloppypar environment;
• rephrasing the paragraph (note that – due to TeX's line-breaking algorithm – shifting a single word might do).

In the case of numerical citations, I also suggest to simply allow line breaks before them, i.e., to replace the non-breaking space at the start of ~\cite{<key>} with a normal space.

-
I prefer \newcommand\spacecite{\penalty700\ \cite}, and than saying \spacecite{<key>} (with no space before). This makes LaTeX try to avoid line-break before \cite, but only to some extent. – yo' Nov 20 '12 at 9:15
@tohecz I like the idea -- is the penalty value 700 a rule of thumb? – lockstep Nov 20 '12 at 9:17
Certainly you want this penalty to be more than \pretolerance so that you more likely hyphenate than break before \cite. And you obviously want it less than \hbadness so that a line with a break at that place is not "bad". Then, the value is just a rule of thumb. – yo' Nov 20 '12 at 9:46

I actually have one more suggestion. It seems that the word before the \cite is in English, whereas the document is in Italian (thanks Guido to correcting me).

You can try adding this to your preamble (notice that the last language passed to babel is the default one):

\usepackage[english,italian]{babel}


Then, you can do the following that may help:

\foreignlanguage{english}{Telecommunications Union}~\cite{<key>}

-
it is in Italian not Spanish, and also in the text there is (ITU) between the text in English and the citation. – Guido Nov 20 '12 at 9:57
Yeah, it seems I overseen the abbreviation. Still, this argument may be valid for other people seeking help here ;) – yo' Nov 20 '12 at 10:00
Could the downvoter please explain to me what have I done wrong? – yo' Nov 20 '12 at 10:58