# Getting rid of space after \vpageref

I want to use \vpageref and have a comma right after it. The problem is that a space is inserted even though I defined \reftextcurrent to be {}. In the example below I could fix this by adding the [] to \vpageref, but in my book this trick somehow does not work. Is the additional space a bug? How can I fix it?

\documentclass{article}
\usepackage{varioref}
\renewcommand{\reftextcurrent}{}

\begin{document}

\section{Test}

I have a problem with Figure~\ref{test}\vpageref[]{test}, which I cannot solve.

\begin{figure}[b]

\caption{A figure}
\label{test}
\end{figure}

\end{document}

-

Use the starred version \vpageref* or, even better, replace the \ref/\vpageref combo with \vref.

(The additional space before [!] \vpageref is an unfortunate design decision; see section 2.2. of the varioref manual for details.)

\documentclass{article}

\usepackage{varioref}

\renewcommand{\reftextcurrent}{}

\begin{document}

\section{Test}

I have a problem with Figure~\ref{test}\vpageref*{test}, which I cannot solve.

I have a problem with Figure~\vref{test}, which I cannot solve.

\begin{figure}[b]
\caption{A figure}
\label{test}
\end{figure}

\end{document}


-
Thanks! How silly not to take \vref in the first place. I use it at other places, but started with \ref and then thought about adding the page reference. Thanks anyway. Maybe we delete this question. Sort of embarrassing ... –  Stefan Müller Oct 11 '12 at 19:49
As an alternative (perhaps you've already written the book in a specific style, without knowing about \vpageref* or \vref...), you can
\renewcommand{\reftextcurrent}{\unskip}