# How to delete previous symbol?

I want to remove all cites from document.

Document1:

....
\renewcommand{\cite}[1]{}
\begin{document}
input{document2}
\end{document}


Document2:

\begin{document}
... bla-bla-bla \cite{Blablaer2012}. Foo bar bar fooed...
\end{document}


And I get

bla-bla-bla .

How can I delete whitespace before? Maybe there is some command like \delprevsymbol?

The command \cite accepts also an optional argument, so you should take care also of that one:

\renewcommand{\cite}[2][]{\unskip\unpenalty}


should work. With \unskip you remove a preceding space, with \unpenalty also the penalty inserted when you write

text~\cite{foo}


(which is a recommended way).

There might be a problem if \cite is at the very start of a paragraph; a safer version might be

\renewcommand{\cite}[2][]{\ifhmode\unskip\unpenalty\fi}

• +1 I especially like the \ifhmode refinement. May 24, 2013 at 9:57