How do you remove a space before a citation in LaTeX?
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.
\documentclass{article}
\usepackage{cite}
\begin{document}
Blah Blah (\hspace{1sp}\cite{All14})
\bibliography{Ref}
\bibliographystyle{alpha}
\end{document}
This is an old post, but I believe that the unwanted space is only a minor effect of a wrong approach, so I have also another suggestions:
Do not use
cite
. This package is to format numeric citations, so I think that have little utility with analpha
style where references are the bibtex keys. Without the package,(\cite{All14})
will work as expected.Do not use parenthesis. The reference already use brackets as delimiters, so a additional delimitation is completely superfluous.
OK, for some odd reason you need
cite
and references with double delimiters. In this case the delimiter format is controlled by\citeleft
and\citeright
. So, to obtain what you want you can use\renewcommand\citeleft{([}
and\renewcommand\citeright{])}
, so you only have to use\cite{All14}
to have([All14])
.
Besides, a little (opinion-based) comment: If possible, avoid bibkeys as references. It is not inelegant, but the next.