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.

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

When I end a sentence like this:

Here is something you should read \cite{name}.

Sometimes the end of the sentence coincies with the end of a row. In this case the next line begins with the dot at the end of the sentence.

Putting the dot before the \cite

Here is something you should read.\cite{name}

solves the problem, but I checked some scientific articles and they all put the dot after the \cite and do not get this adverse effect.

How can I prevent the dot to jump to the next line?

EDIT: A minimum working example:


----------------Here is something you should read\cite{lal}.

It seems that the problem is in the evocomp package I am using.

share|improve this question
You should see \hbox{paragraph~\ref{name}.} ? – T. Verron Nov 16 '12 at 8:22
@T.Verron This makes the dot stay where it should, but it makes the reference undefined – Martin Drozdik Nov 16 '12 at 8:26
We will need to see a minimal working example of your input: normally the full stop (period) would not get broken in the way you describe. It's also worth noting that what you describe sound more more citations (\cite) than cross-references, and these may come before or after punctuation depending upon the publisher's style. – Joseph Wright Nov 16 '12 at 8:28
Then Here is something you should read \hbox{\cite{name}.} should work (but the result may be awful, since it may push the cite on the next line as well). – T. Verron Nov 16 '12 at 8:40
Using \hbox{paragraph~\cite{name}} doesn't really work as it may disable hyphenation of the word paragraph. Putting the \hbox around the \cite also prevents it. In cases like this, I'd suggest rephrasing the sentence with the quotation or rewriting BibTeX or biblatex. (See also the last epigraph on Page 107 of the TeXBook.:-) – Marc van Dongen Nov 16 '12 at 8:59
up vote 10 down vote accepted

The code you pasted in pastebin defines the guts of \cite as follows:

\def\@cite#1#2{{$^{\mbox{\scriptsize $#1$}}$%
    \if@tempswa , #2\fi}$^{\mbox{\scriptsize $)$}}$ }

The last space, immediately before the final closing brace, has got to be a mistake. It separates the punctuation that follows, with the result that LaTeX can break the line there.

To fix the problem, do not edit the style in place. If you do, and submit your LaTeX source to the journal, they'll use the buggy style and your work will be for nought. (But do tell the creators of the style about the bug). What you should do is put the fixed version in the preamble of your document, after \usepackage{evocomp}, like this:

\def\@cite#1#2{{$^{\mbox{\scriptsize $#1$}}$%
    \if@tempswa , #2\fi}$^{\mbox{\scriptsize $)$}}$}

Do this and you won't need to mess with \hboxing your citations anymore-- they'll work as they're meant to.

share|improve this answer
Wow! That is very impressive. Also thank you for the advice on not meessing with the .sty! – Martin Drozdik Nov 17 '12 at 7:40

I had the same problem and know exactly what you mean. I found a simple solution:

~ inserts an "unbreakable" space (similar to an HTML  ) (in text or math mode);

just put this instead of a normal space in front of your \cite command and you'll get the result.

share|improve this answer
Welcome to TeX.SE! It would be helpful if you explained in more detail how inserting ~ (an unbreakable space) ahead of the \cite instruction helps prevent a line break between the citation call-out and the trailing punctuation mark. – Mico Jun 2 '15 at 8:45

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.