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.

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:

\documentclass[a4paper,11pt,twocolumn]{jarticle}
\usepackage{evocomp}

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

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

share|improve this question
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.:-) –  Marc van Dongen Nov 16 '12 at 8:59

1 Answer 1

up vote 9 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:

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

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

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.