{cleveref} is a package that enhances LaTeX's {cross-referencing} features, allowing the format of references to be determined automatically according to the type of reference.

learn more… | top users | synonyms

39
votes
1answer
2k 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 ...
25
votes
1answer
1k 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. ...
24
votes
1answer
932 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 ...
21
votes
3answers
727 views

Can cleveref be made to use the Oxford comma for multiple citations?

Simple question: Is there a simple way to get cleveref to use the Oxford comma? \documentclass{article} \usepackage[standard]{ntheorem} \usepackage{cleveref} \begin{document} ...
18
votes
4answers
690 views

A problem with thmtools and cleveref

I am trying to use thmtools and cleveref and I am getting a quite peculiar error. Here's a minimal example. \documentclass{article} \usepackage{thmtools} \usepackage{cleveref} ...
17
votes
3answers
823 views

How to get more complete references

Sometimes when I work I write something like \begin{proposition} \label{my new result} ... \end{proposition} ... blah blah in Proposition \ref{my new result} blah... but then I realize that the ...
16
votes
3answers
1k views

Emacs, RefTeX and Cleveref – can they work together?

Trying to look for an answer in the net yielded only one questions and one answer which I could neither understand nor use. On tex.stackexchange I found only this question which was answered but I'm ...
15
votes
2answers
269 views

Crossreference in Ref Range [(1a-1e) to (1a-e)]

I am just a beginner in LaTeX, I am facing a problem in Ref Range, \documentclass{article} \usepackage{amsmath,amsfonts,amssymb,cleveref} \begin{document} \ref{eq1a,eq1b,eq1c,eq1d,eq1e} ...
15
votes
1answer
211 views

Strange behaviour of \sbox

This question consists of two related parts. I already solved the original problem but still don't understand where it came from or why the solution works. I use the subcaption package so I can place ...
14
votes
2answers
531 views

Error with cleveref + enumerate + tikz-qtree

I get an error in my document in the following circumstance: Using the cleveref package And the tikz-qtree package (for drawing syntax trees) Inside an enumerate environment Here's a MWE: ...
14
votes
4answers
894 views

Hyperref jumps to the wrong equation if the equation has a \tag and cleveref is used

The problem I'm writing a document where all of my equations are labeled, not by numbers, but by names, which I provide with amsmath's \tag command. I also use cleveref for ease of ...
13
votes
3answers
163 views

Question about the use of cleveref's \Crefrangeformat

I am trying to use the package cleveref to reference to a range of equations. I'd like to have the following result in the text: Eqs. (1)-(5) I want to be able to define the format once, using ...
13
votes
1answer
2k views

How to reference ranges rather than separate numbers?

I would like to do the following: Just type something like ... we describe this in sections \mycoolref{winter,spring,summer,fall} ... and it will be typeset as something like ... we describe ...
13
votes
3answers
509 views

Cleveref and named theorems

Is it possible with Cleverref to reference not only the number of an environment but the "name" (the thing that is passed to it in square brackets? In the following example I want to replace the line ...
13
votes
1answer
135 views

Using babel and cleveref causes unnecessary horizontal space in header

Update This bug has been fixed with version 0.18.9 of cleveref, which is currently on ctan. Question Babel and cleveref do not seem to work flawlessy together when they share the same language ...
12
votes
4answers
2k views

Not using abbreviations with cleveref

I’d like to use the cleveref package but I don’t like that it inserts most names as abbreviations; for instance, it will print “… fig. 2.1 …” instead of “… figure 2.1 …”. Is there a way of changing ...
12
votes
1answer
671 views

Using cleveref with enumitem's newlists

I'm trying to typeset a proof of a theorem, and I'd like to produce the following output: Case 3: my text goes here and it can wrap to another line, wherein I have subcases: Case 3.a: ...
11
votes
1answer
528 views

Getting cleveref to mark all of “Lemma 1” as a hyperlink, not just “1”

I recently discovered the very nice cleveref package, and really like. Works much better than autoref (from hyperref) for me. There is only one thing I don't like: If, for example, the \cref command ...
11
votes
1answer
179 views

Strip section number from equation range reference

I am trying to adjust equation range numbering from (1.10)-(1.15) to (1.10-15). By calling this in the preamble: \crefrangelabelformat{equation}{(#3#1#4-#5#2#6)} and then this in the document: ...
10
votes
2answers
575 views

Section based linguistic example numbering with brackets

I would like to have examples in my document look like this: Section 2 (2.1) This is an example. This is a reference to example (2.1). That is: the section number appears both next ...
10
votes
2answers
183 views

Two colors in one hyperlink

As usual writing a few documents. As one can see having too much color and gloss in a document is never good. Therefore having boxes, and a myriad of colors in the hyperlinks is a bad idea. I really ...
10
votes
2answers
6k views

Multiple items/equations in single eqref call

How can I reference multiple items/equations in a single \eqref call? I want, e.g., "In (1,2)..." instead of "In (1) and (2)...". I'd think I could do something like \begin{enumerate} \item blah ...
10
votes
1answer
117 views

Kerning in \Cref of cleveref

When I use the \Cref command of cleveref package, it doesn't apply the corresponding kerning: Here is a minimal example: \documentclass{scrartcl} \usepackage[thref]{ntheorem} \usepackage{cleveref} ...
10
votes
1answer
122 views

How can I get cleveref / enumitem to print, not 'item (e)', but 'Proposition 1 (e)'?

I currently make use of enumitem and cleveref to show references to theorems. Sometimes, I want to reference a point in a list inside of a theorem. It should show [Name of theorem type, e.g. ...
10
votes
1answer
976 views

cleveref and algorithm2e

I'm currently working on a document where I was using algorithm+algorithmic along with cleveref. With this everything worked perfectly. Now I had to replace algorithm+algorithmic with algorithm2e. ...
10
votes
1answer
442 views

showonlyrefs and cleveref

This question led to a new package: autonum I know that cleveref is not compatible with showonlyrefs as it says in the cleveref manual. But I have a book-length document that depends on ...
9
votes
3answers
280 views

Cleveref and breqn packages don't play nice together

I have been using the breqn and cleveref packages independently, and I think they are both excellent packages; but recently I have tried using them together, but it appears that cleveref cannot ...
9
votes
1answer
1k views

Referencing subequations with cleveref

I try to refer to the parent number of subequations with \cref from the cleveref package. However, I would like to change the output "eq. (...)" into "eqs. (...)" when I refer to parent numbers ...
9
votes
3answers
448 views

algorithm2e + cleveref: problem with wrong reference to line numbers

For some reason I do not understand, cleverefproduces wrong references to line numbers of listings produces with the algorithm2e package. I hope that I did not miss a simple solution ... My example ...
9
votes
2answers
146 views

Cleveref: Parentheses around references to subequations using \labelcref

Using the Cleveref package (v0.19) i have a problem with missing parentheses when referencing to subequations, using the \labelcref command. Here is a MWE: \documentclass{article} ...
9
votes
1answer
501 views

cleveref and appendix packages: appendix referenced as section

Using this example: \documentclass{scrartcl} \usepackage{lipsum} \usepackage{appendix} \usepackage{cleveref} \begin{document} \section{The first section}\label{sec:1} \lipsum[2] \section{The second ...
8
votes
2answers
730 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... ...
8
votes
2answers
188 views

How to strip “eq.” from cleveref?

How can I make cleveref output (1) instead of eq. (1) when referencing equations only?
8
votes
2answers
459 views

referencing main subequation

In the following example i labeled each subeqnation. \begin{subequations} \begin{gather} R_0 = 0 \label{subeqn:ini-cond-r} \\ N_0 = 0 \label{subeqn:ini-cond-n} \end{gather} ...
8
votes
1answer
597 views

Cleveref can't refer to line numbers in listings

Consider the following minimal example: \documentclass{article} \usepackage{listings} \usepackage{cleveref} % \crefname{lstnumber}{line}{Line} \begin{document} % \section{Section} ...
8
votes
1answer
192 views

cleveref doesn't print correct caption for listings

I want to set the caption for referenced listings: \documentclass{scrbook} \usepackage{listings} \usepackage{varioref} \usepackage{hyperref} \usepackage{cleveref} \begin{document} ...
8
votes
1answer
774 views

cleveref, autonum and labeling only referenced equations

User MMM recommended that I use the new autonum package in reply to my query. However, I am having some difficulty getting the package to work. Here is a minimal working example that compiles with ...
8
votes
1answer
286 views

Making refcheck work with cleveref

It seems that refcheck does not recognize references made by cleveref: \documentclass{article} \usepackage{amsmath} \usepackage{cleveref} \usepackage{refcheck} \begin{document} \begin{align} a ...
8
votes
1answer
4k views

Tex capacity exceeded sorry input stacksize=5000

I am getting this error while trying to build my tex file. As soon as I include the cleveref package, I get this error and it shows cleveref.sty with the cursor at the bolded part of the file. ...
8
votes
1answer
2k views

Is it possible to make a reference to a subfigure to appear Figure 2(a) with cleveref?

I am new here, and also new to LaTeX, so apologies if I have included too much or too little! I have been using the subfig package, and just today added in cleveref. The subfig package labels my ...
8
votes
1answer
38 views

eledmac and cleveref?

I'd like to use eledmac and cleveref in the same document, but I'm running into trouble with something like this: \documentclass{article} \usepackage{eledmac} \usepackage{cleveref} \begin{document} ...
7
votes
2answers
3k views

How do I get rid of particular pdftex warning message?

Here is a minimal example that showcases my problem: \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \usepackage{cleveref} \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma} ...
7
votes
2answers
440 views

Two labels in one caption possible?

In a lot of journals it is common to have single digit figure numbers and denote parts in the figures as (a), (b), and so on. I wanted to use a similar style. After reading the documentation to the ...
7
votes
1answer
397 views

Cleveref: AUCTeX and RefTeX set-up

How can I set up cleveref to work with AUCTeX and RefTeX? I have tried the advice on Emacs, RefTeX and Cleveref – can they work together? but it didn't work. Additionally, when I hit enter, \ref{} ...
7
votes
1answer
90 views

How to put numbers in parenthesis using cleveref

I am using the cleveref package for cross-referencing. When I use \cref{tab1} and \cref{fig1} I got the output as table 1 and fig. 1 respectively. I would instead like to get table ...
7
votes
1answer
217 views

Get \ref for equations working like \cite for contiguous references

When referencing a list of equations like see Eq.12, 13, 14 and 15 the \cite command behaviour, which allows a single list of references, should be preferred I think. Is there something equivalent for ...
7
votes
1answer
121 views

Using showkeys and cleveref together

I'd like to use showkeys to show me the labels of my definitions (this works) and the labels of the used references (this does not work). The reason for the latter problem is that I use the cleveref ...
7
votes
1answer
82 views

Cleveref range format for gb4e “(1a-c)"

I managed to get cross-referencing with cleveref to examples in the format "examples (1a-1c)" using \crefrangeformat{xnumi}{examples~(#3#1#4--#5#2#6)} but how can I get "examples (1a-c)"? I found ...
7
votes
1answer
759 views

Cleveref with counters with same name

I am trying to use the cleveref package. I have the following counters defined (hopefully this is the right way to do it!) \newtheorem{thm}{Theorem}[section] \newtheorem{lemma}[thm]{Lemma} ...
7
votes
1answer
163 views

Using cleveref for cross-referencing to exsheets questions

I really like the functionalities offered by exsheets, a package for typesetting exercise sheets and exam papers (and their solutions). One particularly nice feature is the possiblity of assigning ...