6

I'm using \vref for labels in my text. I'd like to change it in the output form X on p. Y instead of X on page Y. How can I do it?

1 Answer 1

8

It seems you are using the varioref package. You have to redefine \reftextfaraway. Solution without babel:

\documentclass[twoside]{article}

\usepackage{varioref}

\renewcommand*{\reftextfaraway}[1]{on p.~\pageref{#1}}

\begin{document}

\section{foo}\label{sec:foo}

Some text.

\cleardoublepage

\section{bar}

See section~\vref{sec:foo}.

\end{document}

Solution with babel:

\documentclass[twoside]{article}

\usepackage[english]{babel}

\usepackage{varioref}

\addto\extrasenglish{%
  \renewcommand*{\reftextfaraway}[1]{on p.~\pageref{#1}}%
}

\begin{document}

\section{foo}\label{sec:foo}

Some text.

\cleardoublepage

\section{bar}

See section~\vref{sec:foo}.

\end{document}

Output for both solutions (page 3):

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .