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.

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

enter image description here

share|improve this question
1  
Use \begin{sloppypar}....\end{sloppypar} to that particular paragraph. –  Harish Kumar Nov 19 '12 at 1:01
2  
Can we please see how this particular citation is being produced? –  Gonzalo Medina Nov 19 '12 at 1:06
2  
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
4  
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
show 2 more comments

2 Answers

up vote 4 down vote accepted

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.

share|improve this answer
4  
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. –  tohecz 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
1  
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. –  tohecz Nov 20 '12 at 9:46
add comment

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>}
share|improve this answer
    
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 ;) –  tohecz Nov 20 '12 at 10:00
    
Could the downvoter please explain to me what have I done wrong? –  tohecz Nov 20 '12 at 10:58
add comment

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.