TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I put a non-breaking space inside a \cite macro with several citations? \cite{ref1,~ref2} causes an error. If I leave the space out, one is inserted and this is causing the citation to span two lines. I am using bibstyle plain.

share|improve this question
Why do you want an unbreakable space after a comma? A comma at the end of a line is a perfect position for a line break! – Marc van Dongen Jan 25 '12 at 0:35
I am using bibstyle plain and I end up with [1, 2,\n 3, 4] which looks bad. – jaybee Jan 25 '12 at 10:16
@jaybee: well, when you have 4 references in one bracket (which is generally correct), I suggest to leave it as is, i.e. [1, 2,\n 3, 4], because the bracket is long and the lines would be too empty/full. The only other possibility is to re-phrase the text slightly, but this should be done in the final version. – yo' Jan 25 '12 at 23:38
up vote 7 down vote accepted

If it is an isolated thing (i.e. you need to do it once in your document), put \hbox{\cite{ref1, ref2}}

share|improve this answer

have you tried the option [space] with the package cite ?

share|improve this answer
This is more of a question/comment than an answer. – qubyte Jan 24 '12 at 10:59
@MarkS.Everitt On the other hand, it is somehow an answer (and probably a correct answer), just written down with a question mark in the end... – yo' Jan 25 '12 at 23:39
@tohecz: It's rude to answer a question with a question. ;) – qubyte Jan 26 '12 at 1:53

Assuming you don't use any packages that modify \cite & friends, a general solution is to change the definition of \@citex, namely, to replace the breakable space (accompanied by a penalty of 1000) with a non-breakable space. (Note: For convenience, I'm using the etoolbox package to do so.)


  ,\penalty\@m\ %



\bibitem{x} A bibitem.

\bibitem{y} Another bibitem.

share|improve this answer

Your Answer


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.