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
1 vote
1 answer
120 views

How to use \labelformat for lstlisting (with listings package) so that \vref (of varioref package) gives "Listing 1.1 on page x"?

I want to reference listings (with listings package) via \vref (from varioref) analogous to figures. So I'm looking for the analogue to \labelformat{figure}{Figure~#1}. What is the name of the ...
Pyi Soe's user avatar
  • 311
5 votes
3 answers
148 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
3 votes
3 answers
264 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
  • 311
0 votes
1 answer
93 views

What is a robust user-defined way to define cross-references and adjunct values that work inside and outside environments?

This question is a follow-up on these two Why does \zifrefundefined fail on tcolorbox reference? \@nameuse fails on definition within tcolorbox What I want to achieve: I want to have an environment,...
Markus W.'s user avatar
  • 272
1 vote
1 answer
104 views

"pgf" and "pgfmorepages" cause varioref to be off by one page

I am trying to place a frame around several pages in a document I am creating. The frame works fine, "varioref" gets the page number wrong. \documentclass[10pt,letterpaper,notitlepage]{...
Gerard's user avatar
  • 71
1 vote
1 answer
175 views

Error "Extra \else" after \include file making use of vref/vpageref inside Beamer frame

Some background: I have been working on a 600 page LaTeX document (a scientific writing with a lot of math) for 15+ years. The source is trilingual (English, Norwegian and Spanish) with identical ...
Tore H-W's user avatar
  • 493
2 votes
1 answer
304 views

varioref doesn't use the right language

I have a document, which uses varioref. I chose the right language with babel and no matter if I choose one language or two, it always stays English instead of becoming German. I checked already this ...
MaestroGlanz's user avatar
  • 2,298
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
  • 447
1 vote
1 answer
176 views

Usage of hyperref, varioref and cleveref creates bug

Not really a question, more of a bug I seemed to have found and fixed. Consider the minimal code below. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{...
J. Schmidt's user avatar
3 votes
1 answer
75 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
2 votes
1 answer
48 views

How to produce the list environment header by cross-referencing an item by `\cref'

As suggested by the accepted answer in this question asked by me, I am using the same code snippet for my Examples environment. Now recently I learnt about the varioref and cleveref packages and ...
Subhajit Paul's user avatar
2 votes
1 answer
136 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
2 votes
1 answer
56 views

How to redefine a varioref macro?

I want the final line of this example's output \documentclass{article} \usepackage{blindtext} \usepackage{varioref} \begin{document} \label{text1start}\blindtext[5]\label{text1stop} \label{...
skiasaurus's user avatar
3 votes
1 answer
547 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
  • 733
1 vote
1 answer
48 views

Using varioref and cleveref, does cleveref diagnose a document that LaTeX always wants to re-run?

I've got a large document that LaTeX always wants to re-run. Using the technique described at How to diagnose a permanent "Label(s) may have changed" warning?, I traced the problem to some \...
Norman Ramsey's user avatar
2 votes
1 answer
48 views

Can't identify source of text boxes in template

I'm working with this template. I can't seem to figure out how to remove some of the unwanted boxes, e.g. under the Abstract, there's a grey box that reads "Add new section about results in Chapter 4" ...
cne's user avatar
  • 21
3 votes
1 answer
866 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
1 vote
0 answers
55 views

Conditional pageref for labels that are in another section and on a page far away

Currently I am experimenting with the cleverref and the varioref package. These packages are great, however, I would like to have a reference command with the following subtle behavior: If the label ...
Toni Dietze's user avatar
1 vote
1 answer
67 views

Produce reference which reads "section/graph etc. X on page X"

I am new to LaTeX, this question is basic, but I have tried to solve it to no avail. I don't understand the LaTeX lingo too well, so I'd appreciate an answer a complete beginner will get. Thank you. ...
dan1789's user avatar
  • 73
2 votes
2 answers
550 views

Have varioref output a \nameref instead of a \ref

According to the varioref package documentation: The implementation of \vref below produces only a \ref when reference and \label are on the same page. It will additionally produce one of the ...
Grodriguez's user avatar
  • 1,085
1 vote
1 answer
139 views

customization of references

Im working with a tex document with a lot of references. Im using: \usepackage{hyperref} \usepackage{varioref} \usepackage{cleveref} \hypersetup{colorlinks=true,citecolor=title,linkcolor=title,...
onmikkelsen's user avatar
2 votes
1 answer
360 views

How do we get to hyperlink an entire reference when using a mix of varioref, hyperref, cleverref and nameref?

Using a combination of the packages varioref, hyperref, cleverref and nameref we can get sophisticated cross references (technically 'references' to 'labels'), complete with hyperlinks. For example, ...
John Bentley's user avatar
0 votes
1 answer
555 views

Raising the hypertarget of chapter labels

When using twocolumn mode, it is a known issue that references to chapter headings point to the baseline rather than the chapter heading. In a previous question, I asked how to fix this for the ...
Hugh's user avatar
  • 2,364
4 votes
1 answer
205 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
6 votes
2 answers
256 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
3 votes
1 answer
419 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
5 votes
1 answer
630 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
  • 450
6 votes
1 answer
433 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
2 votes
1 answer
328 views

Compress "page" label with varioref and cleveref

In case of multiple cross-references of same kind (say sections), even if not consecutive, cleveref's \cref command compresses the references' labels by using the plural form: for instance, \cref{foo2,...
Denis Bitouzé's user avatar
1 vote
1 answer
222 views

tex4ht: Cannot compile document with \vref command

I use tex4ht to compile my document. In case if I use \vref command in my document, compilation fails with error: Undefined control sequence How to handle this situation?
Yulia Spryn's user avatar
6 votes
2 answers
611 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
5 votes
2 answers
664 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 Magalhães Cruz's user avatar
9 votes
2 answers
433 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
4 votes
1 answer
348 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
3 votes
1 answer
365 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
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
2 votes
1 answer
78 views

Selectively turn off varioref labelformats

varioref introduces the command \labelformat which can automatically render \ref{sec:...} as section~ etc. This feature is very useful for saving some typing and making everything flexible (especially ...
Gaussler's user avatar
  • 12.6k
1 vote
1 answer
395 views

ams math + AUCTeX + refTeX causing label references to always be \eqref not the desired \vref

As stated on the reftex documentation “Note that this is automatically done by the ‘amsmath.el’ style file of AUCTEX, see Section 7.8.2, page 38 – so if you use AUCTEX, this configuration will not be ...
zbeekman's user avatar
  • 201
1 vote
1 answer
731 views

varioref's \labelformat for own environment

I defined my own environment for short pseudo-algorithms, and I would like to use the \labelformat command to change the output of \vref. Varioref's documentation says: "The command takes two ...
causa prima's user avatar
3 votes
2 answers
258 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
  • 289k
0 votes
1 answer
348 views

compatibility cleveref and varioref amsmath [duplicate]

I try to use cleveref and varioref and ams* packages together. But I get some trouble, equations and sections label type seems to change and that does work well. Here is my example: \documentclass[...
R. N's user avatar
  • 938
3 votes
1 answer
151 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
1 answer
763 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
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
7 votes
2 answers
774 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
1 vote
1 answer
81 views

Change how hyperlinks are displayed

By using \usepackage{varioref} \usepackage{hyperref} \usepackage{cleveref} one automatically gets hyperlinks in a red box or a green box . Is it possible to change this? For example instead of ...
Aldebarando's user avatar
4 votes
1 answer
128 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,805
6 votes
2 answers
909 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
15 votes
2 answers
5k 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
  • 289
5 votes
1 answer
440 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,069