Skip to main content

Questions tagged [varioref]

{varioref} is a package providing commands for cross-referencing that distinguish whether the target is on the same page, an adjacent page or further away and modify the reference text accordingly.

Filter by
Sorted by
Tagged with
88 votes
1 answer
25k views

Difference between ref, varioref and cleveref. Decision for a thesis

How can one make a quick decision what the best "ref" for a thesis in pdflatex with hyperref is? After a few hours reading I do not know more than ref is used by everyone who does not know about the ...
Jonas Stein's user avatar
  • 8,929
42 votes
1 answer
12k views

Impact of hyperref, when varioref and cleveref are used

I think I may have found a bug in either hyperref, cleverefoder varioref but can't determine the details any further. If do not load hyperref in the following example, the result is fine. \...
Uwe Ziegenhagen's user avatar
28 votes
2 answers
2k views

Relative chapter references

(A follow-up of sorts on Variable chapter references, as per @werner 's suggestion) This is somewhere in between a request for comments and an actual question (as well as a summary of my experiences ...
mpr's user avatar
  • 3,646
18 votes
3 answers
6k views

varioref: \vref or \vpageref at page boundary (may loop)

Sometimes a have situations, where I'm not able to compile a document, because the varioref package result in a loop. Here is a MWE, which result not in an endless loop, but it demonstrate the issue (...
Micha's user avatar
  • 2,869
15 votes
2 answers
6k views

Splitting(!) one latex document into two pdf outputs including references

I have a quite huge thesis-latex-document with lots of references to the appendix. The whole document I would like to split into two pdf-files. That means: I would like to have the thesis and the ...
Kris's user avatar
  • 299
14 votes
1 answer
1k views

Lost labels using intertext with varioref and hyperref

I have a problem using \intertext together with \vref when hyperref is also used. Consider the following minimal example: \documentclass{article} \usepackage{amsmath, varioref} \usepackage{...
RolKau's user avatar
  • 465
14 votes
2 answers
3k views

cleveref & varioref : Missing \endcsname inserted

I read the excellent question Difference between ref, varioref and cleveref. Decision for a thesis and various doc on the net (the varioref package documentation) and tried to use it... but with many ...
madit's user avatar
  • 753
13 votes
1 answer
712 views

The LaTeX runs (with varioref) never settle down to a stable final state

This is something which has happened for real in a document where I am using varioref. The LaTeX runs never end, a text chunk keeps on being moved back and forth accross a page break (naturally with ...
user avatar
11 votes
2 answers
778 views

Customizing varioref to only add "... on page XX", and only when there is more than one page in between reference and figure

varioref is a nice package as it will, when referencing, add "... on the [facing/next/preceding/following] page" if the reference and figure (or whatever object is being reference) are located on ...
gablin's user avatar
  • 17.1k
9 votes
2 answers
5k views

\veqref{} command like \vref...from varioref package

1) The varioref package gives \vref, which gives output as follows... figure~\ref{fig:test} on page~\pageref{fig:test}. 2) The amsmath package gives \eqref{}, which gives output as follows... ...
sandu's user avatar
  • 7,970
9 votes
2 answers
441 views

Varioref and previous page

With the following MWE: \documentclass{article} \usepackage{thmtools} \usepackage{varioref} \usepackage{cleveref} \declaretheorem[name=Lemma,Refname={Lemma,Lemmas}]{lem} \begin{document} \begin{...
Zii8roZi's user avatar
  • 555
8 votes
1 answer
1k views

Variable chapter references

I'm looking to typeset certain references à la varioref thus so: if I reference chapter 3 from within chapter 2, I'd like the output to look like "...in the next chapter---" rather than "...in chapter ...
mpr's user avatar
  • 3,646
7 votes
2 answers
800 views

How to change cleveref references to 'verbal' varioref style?

I would like to use cleveref's automatic ref target type recognition but with the more verbal page reference of varioref. This is my MWE: \documentclass{report} \usepackage{varioref} %\...
VisorZ's user avatar
  • 173
7 votes
1 answer
518 views

Collapse "on page"s for multiple references in \vref

The code at the bottom produces See equations (1) and (2) on page 6 and on page 11. What I'd like is See equations (1) and (2) on pages 6 and 11. Otherwise it looks quite strange in my opinion....
letmaik's user avatar
  • 1,967
6 votes
3 answers
719 views

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 [] ...
Stefan Müller's user avatar
6 votes
2 answers
222 views

Referencing label with conditional page info

I would like to have an easy way to reference a label and if that label is not on the current page then its page should be printed in the reference like "See example 2.3 (p.4)". I tried the varioref ...
user764754's user avatar
6 votes
2 answers
265 views

\label-\ref consecutively numbered theorems using varioref

I hope all definitions, lemmas, theorems, propositions and corollaries are numbered consecutively. The code as below. My trouble is: when I reference, like \ref{<lemma 4>}, get 'definition 4'. ...
poorich's user avatar
  • 613
6 votes
2 answers
629 views

Conditional pageref for labels far away

Currently, within my thesis, I am numberings theorems (and remarks, etc.) with a global counter. This makes it difficult in the printed version to find the theorem if a reference is too far away from ...
matheburg's user avatar
  • 1,289
6 votes
1 answer
6k views

How to modify the label output in cleveref and varioref?

EDIT: The mentioned solution on the bottom of this page works perfectly for the label output. But now I am struggling with the distance of the \crefname and the counter. Instead of a space I would ...
Kris's user avatar
  • 299
6 votes
1 answer
1k views

Changing the output of \vref

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?
Laura's user avatar
  • 6,483
6 votes
1 answer
336 views

Centered captions containing \vref may not always appear as expected

I've noticed that when centered captions contains \vref to some reference, the captions may sometimes not become entirely centered. I see this especially in my document where there are two figures on ...
gablin's user avatar
  • 17.1k
6 votes
1 answer
1k views

Mixing cleveref, vref and ref: Argument of \@firstoftwo has an extra }

I am using varioref and cleveref together. This works pretty well. I had to add a hack though, which modifies the strings used by varioref (in german it should read "ab Seite X" ("starting on page X") ...
mfuglos's user avatar
  • 185
6 votes
2 answers
931 views

Varioref, cleveref and autonum together

I'm trying to mix varioref, cleveref and autonum to have the following behaviors: Automatic adding of reference type (i.e. adding "section" when referencing a section). -> cleveref; Adding the "on ...
Guillaum's user avatar
  • 115
6 votes
1 answer
442 views

\vref and \vpageref (from varioref) at page boundary are reported except if cleveref is used

The following MWE (borrowed from varioref: \vref or \vpageref at page boundary (may loop)) shows that \vref and \vpageref (from varioref) at page boundary are reported by errors (or warnings if \...
Denis Bitouzé's user avatar
5 votes
1 answer
198 views

Remove space before \reftextfaraway

I'm trying to change the format of \vref output (from the varioref package). I've added: % Change the format of vrefs \renewcommand*{\reftextfaraway}[1]{, page~\pageref{#1}} This is close, but not ...
Liam M's user avatar
  • 213
5 votes
3 answers
180 views

Varioref: How to make "on the following page" and similar into hyperlinks?

Using cleveref, varioref, and hyperref, I am producing such text as See Figure 9 on the following page. This example provides only a small hyperlink target: just the "9." But I have ...
Norman Ramsey's user avatar
5 votes
2 answers
685 views

varioref: change default "on the facing page" string

I would like to be able to change the varioref strings. In particular, the on the facing page one. It should not be a problem. The documentation clearly states various macros used, and I would think ...
Ricardo Cruz's user avatar
  • 1,780
5 votes
1 answer
665 views

Intelligent `\vref`

I want to use the package varioref, but using abbreviations ... (p.1) instead of ... on page 1. Unfortunately, I have also references in parentheses, where this would lead to unaesthetic/forbidden (?) ...
jofel's user avatar
  • 480
5 votes
1 answer
2k views

varioref hyperlinks go outside the text boundary

I'm using the varioref package to get descriptive references. When used with the hyperref package, the links will often go outside of the text boundary, as demonstrated in the MWE below. If I set ...
cmhughes's user avatar
  • 101k
5 votes
1 answer
459 views

Mix hyperref and varioref

I like that hyperref gives me results like \ref{eq:first-equation} % yields "equation (1)" and that varioref gives results like \vref{eq:first-equation} % yields "1 on the following page" but I ...
wchargin's user avatar
  • 3,139
5 votes
0 answers
61 views

Context sensitive cross reference using Cleveref and Varioref

I am blocked to make a command (called \pref{<cross-reference>}) for cross-references using cleveref and varioref. I would like it to be able to adapt to the context : First, I would like to be ...
Bastien's user avatar
  • 449
4 votes
2 answers
3k views

How to redefine \label, \ref and \pageref in a way compatible with varioref?

In order to prevent conflicts with labels when gathering exercices from a database, I need to redefine the commands \label, \ref and \pageref to add a local prefix to labels. Unfortunately, the ...
Éric Guirbal's user avatar
4 votes
1 answer
209 views

How can I ensure varioref generates unique labels when the document is split into separate files?

After adding the varioref package (to generate text like "Figure XX on page YY" from TeX input like \vref{fig:example}), I started seeing warnings like LaTeX Warning: Label `1@xvr' multiply defined. ...
rugplots's user avatar
4 votes
1 answer
358 views

Fancyref with fmtcount

When I use fancyref with the vario package option: \usepackage[vario]{fancyref} \newcommand{\figvref}[1]{\figurename~\vref{#1}} \newcommand{\tabvref}[1]{\tablename~\vref{#1}} The above would produce ...
Nicholas Hamilton's user avatar
4 votes
1 answer
2k views

\vref and input command

You've saved my life in some occasions, I am writing my master thesis and as I am working with MATLAB, I found a very useful MATLAB function which "translate" MATLAB images to TeX tikzpicture. I ...
brodegon's user avatar
  • 217
4 votes
1 answer
132 views

Gene-logic package and bizarre cross-referencing behavior

I am getting some bizarre behavior using the gn-logic (gene-logic) package with some of the various cross-referencing packages. In particular varioref and cleveref. Here is a MWE illustrating the ...
Dennis's user avatar
  • 3,875
3 votes
1 answer
1k views

'Smart' cross-referencing of paragraphs

I'm writing a large document where I'm using pretty much every level of sectioning from Part right down to paragraph. I've been using varioref in conjunction with hyperref and cleverref to '...
Joe Healey's user avatar
3 votes
2 answers
278 views

placing of floats referenced with varioref

In my text I use \vref{<label>} from the varioref package for referencing figures and tables. In most circumstances this works satisfactory. Exceptions are cases, when in a text line \vref ...
Zarko's user avatar
  • 299k
3 votes
1 answer
228 views

Switch off "on page" for varioref

For referencing I'm using the three packages \usepackage{varioref} \usepackage{hyperref} \usepackage{cleveref} In the text I cite with \vref, which is redefined by cleveref and does its job very ...
Dirk's user avatar
  • 2,728
3 votes
1 answer
635 views

Defining a new language in Cref

I am preparing a document whose main language is arabic, I am using babel+Lualatex I followed the procedure discussed in Redefine \cref for non-English languages However, it gives an error saying "...
Silva's user avatar
  • 743
3 votes
1 answer
389 views

Subequations with varioref and cleverref

Can somebody tell me why the references don't work in this example? \documentclass{article} \usepackage{varioref} \usepackage{hyperref} \usepackage{cleveref} \usepackage{amsmath} \begin{document} ...
wpoely86's user avatar
  • 133
3 votes
1 answer
840 views

Avoid space preceding a reference

I use \vref{something} to reference to figures. As long as this is in regular text everything is fine. But When I surround this with brackets like this (\vref{something}) then is the result is a ...
user3775792's user avatar
3 votes
1 answer
436 views

\vref uses wrong language in LyX as soon as I use two languages

I am using LyX fro writing a bi-lingual document, for wich I use the following custom package definition under "Settings -> Language": \usepackage[english,ngerman]{babel} As soon as I add the second ...
kiecodes's user avatar
  • 133
3 votes
1 answer
154 views

Varioref's "Preceding Page" broken when cleveref is loaded

I'm using varioref together with hyperref and cleveref. Everything works fine except that as soon as I load cleveref, varioref forgets about "on the preceding page" and simply uses "on page N". \...
David Woitkowski's user avatar
3 votes
3 answers
284 views

Does vref of varioref work with page numbers which are not built-in arabic?

I have page numbers which are not arabic. I use page numbers in Burmese, ၁, ၂, ၃, ၄, etc., which are equivalent to 1, 2, 3, 4. I use the following to turn default arabic page numbers to Burmese ...
Pyi Soe's user avatar
  • 330
3 votes
1 answer
97 views

How to show the chapter number when cross-referencing enumerated items via `\cref'

In my book, the exercise section is defined as follows: \newlist{exercise}{enumerate}{5} \setlist[exercise]{ label*=\thechapter.\arabic*., ref=\thechapter.\arabic*, before={% \...
Subhajit Paul's user avatar
3 votes
1 answer
169 views

Cleveref: add pagenumbers to labels

I want to use all of the functionality of cleveref, but I would like to add one thing. I want that after the label comes a subscript with the page number, an arrow to the left if it is the preceding ...
Alexander's user avatar
3 votes
1 answer
2k views

chktex disable warning about ~ for certain macros when using cleveref with varioref

Is there any way, other than adding per-line suppressions (i.e., %chktex 2) or per warning suppressions to get chktex to stop warning me when \vref and \eqref are preceded by spaces? I am running ...
zbeekman's user avatar
  • 201
3 votes
1 answer
516 views

Varioref does not refer to the same page in the right way, i.e. 'on this page'

I've got a problem with the varioref package: Whenever I want to refer to something that is on the same page as the reference, varioref normally printed something like 'X on this page' or 'X auf ...
Lustique's user avatar
  • 916
2 votes
2 answers
803 views

Test equality between number of the current page and the one of one reference indicated

In the following code, I have one problem with the test \ifthenelse{\equal{\pageref{#1}}{\thepage}}{...}{...}. Why doesn't this detect the equality hoped if the reference is in the same page where it ...
projetmbc's user avatar
  • 13.4k