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'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?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
add comment

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.