Text FormattingSpacing problems with varioref

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
cbkschroeder
Posts: 55
Joined: Sun Nov 09, 2008 7:48 pm

Spacing problems with varioref

Post by cbkschroeder »

Hi,

I'm looking for clarification on an issue (which might actually be two) with the varioref package. \Vref seems to want to insert a small space between the start of the label name and the margin when it is called immediately after \subsection (and probably other?) commands. However, it's fine if it's the first thing on the line thereafter. To confuse things (read: me) furthermore, if one is then tempted to use \Vref* instead (because, by the documentation, there are spacing issues), one discovers that the space between the reference number and the next piece of text is eliminated! An example using some of my re-definitions:

Code: Select all

\documentclass[12pt]{article}

\usepackage{varioref}

\renewcommand\reftextbefore {(previous page)}
\renewcommand\reftextfacebefore {(page~\thevpagerefnum)}
\renewcommand\reftextafter {(next page)}
\renewcommand\reftextfaceafter {(page~\thevpagerefnum)}
\renewcommand{\reftextfaraway}[1]{(page~\pageref{#1})}

\labelformat{equation}{equation~#1}

\begin{document}

\section{First Section}

\begin{equation} \label{thebasics}
1+1=2.
\end{equation}

\pagebreak

\subsection{First Subsection}

Notice no indent here; no surprise.

\subsection{Second Subsection}

\Vref{thebasics} tells us that\ldots (notice small indent)\\
\Vref{thebasics} provides further insight in that\ldots (that seems fine)

\subsubsection{First Subsubsection}

\Vref*{thebasics} in quite profound, actually, because\ldots (where'd the space go?)

\end{document}
My impression is that there should be no indent at the beginning of the first line in the second subsection, and that there should be a space between the "1" and the "(" in the first line of the first subsubsection. Is this correct?

Incidentally, in my wanderings, the only thing I found that came close to this - I'm using MikTeX 2.8 - is:


https://bugzilla.redhat.com/show_bug.cgi?id=118821


Out of my varioref.sty file:
[2009/09/13 v1.4w package for extended references (FMi)]
I've attached pdfLaTeX output; dvi output is similar.

If I am doing something wrong, please let me know. In fact, please let me know of any thoughts you have here regarding this!

Thanks.
Attachments
vr.pdf
(33.27 KiB) Downloaded 270 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Post Reply