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.

  • 1
    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
  • 2
    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
  • 1
    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
  • 2
    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.:-) – user10274 Nov 16 '12 at 8:59

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.

  • 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

If you are using inline citation in a paragraph then simply put a tilde(~) symbol with the text. For example,


If its figure or table, you can simply put full-stop in caption tag. For example,

\caption{[TEXT FOR YOUR FIGURE]~\cite{[CITATION]}.}

This will occur the citation to stick with the text.

  • 1
    I'm not certain that it answers the question. Adding a ~ will prevent the line to break between the last word of the text and the citation, but not between the citation and the dot at the end of the sentence. – Vincent Dec 26 '19 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.