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

2 Answers 2

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

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

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.
http://tex.stackexchange.com/questions/83265/cite-spills-over-into-the-margin
tex.stackexchange.com
crawl=CC-MAIN-2014-49
83543
application/http; msgtype=response
sha1:SVJZJDC7DYFC7CIKGGT45S7ZOWOGZE33
<urn:uuid:16538ec7-c7b8-4abb-b9cc-ed086d3e447a>
2014-11-26T05:44:57Z
198.252.206.16
sha1:KXKZHMTDWXCRIDSH55BXT3CF2WPMUSZU
<urn:uuid:2731eac6-825b-42d3-89ff-e1c2b617b9fb>
http://tex.stackexchange.com/questions/83265/cite-spills-over-into-the-margin
response
<urn:uuid:3b01f0a9-34f7-426d-b95d-2e17ec91dc7a>
robots: classic
hostname: ip-10-235-23-156.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2014-49
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for November 2014
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf