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.

I have something like

\documentclass{article}
\usepackage{cite}
\begin{document}

Blah Blah (\cite{All14})

\bibliography{Ref}
\bibliographystyle{alpha}
\end{document}

But LaTeX keeps placing a space before my citation, i.e. my output looks like "Blah Blah ( [All14])". So, I modified it to Blah Blah (\hspace*{-3px}\cite{All14}). However, this seems to be a less than elegant solution. Is there a better way to eliminate this space?

share|improve this question

migrated from stackoverflow.com Mar 11 at 7:01

This question came from our site for professional and enthusiast programmers.

    
Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Mar 11 at 7:10

1 Answer 1

up vote 10 down vote accepted

The cite package tries to be clever and insert spaces before references when they are necessary. For example if you type

Here is some text\cite{xxx}.

then it will insert a space after "text". This behaviour can be turned off completely by

\usepackage[noadjust]{cite}

Alternatively, if you want this behaviour in general but have problems in isolated cases, you can insert a small space

(\hspace{1sp}\cite{All14} says...)

1sp is the smallest non-zero space in TeX, roughly 1/100 of the wavelength of light according to the TeX book.

Sample output

\documentclass{article}

\usepackage{cite}

\begin{document}

Blah Blah (\hspace{1sp}\cite{All14})

\bibliography{Ref}
\bibliographystyle{alpha}

\end{document}
share|improve this answer

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.