{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

4
votes
1answer
197 views

Cross-ref an equation using RefTeX, AUCTeX and cleveref

After an updated of AUCTeX (to 11.87) the solution that worked wonderful from this answer stopped working. In particular, I got the following error: reftex-reference: Wrong number of arguments: ...
5
votes
2answers
129 views

Listings, Cleverref, and Appendix: Weird Alignment

I'm using the packages listings and cleverref in my thesis. When I put a listing in the appendix, however, it seems to be somehow indented: \documentclass{article} \usepackage{listings} ...
15
votes
2answers
297 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} ...
4
votes
1answer
429 views

Reference to multiple labels with \cref

I need to refer to seven figures which are not continuous in sequence (say figures 5.3b, 5.3d, 5.3f, 5.4b, 5.4d, 5.5b, 5.5d). When I am using \cref{5-3-b,5-3-d,,5-3-f,5-4-b,5-4-d,5-5-b,,5-5-d} It ...
6
votes
2answers
120 views

How to get cleveref to treat separate theorem-types as one?

Introduction I'm using a somewhat complex theorem-environment setup which, perhaps, is finally getting me into trouble. I use memoir, cleveref and ntheorem. There is a global thmcounter that all ...
5
votes
2answers
161 views

IEEEtrantools clash with cleveref

I have two rather complex equations I would like to align at the two points to the left and to the right of the '=' sign. Elsewhere in the document I am using cleveref's \cref command, but that ...
1
vote
1answer
148 views

Display reference name, label number and target name with cleveref

I want to reference a section with cleveref like in the following example: \section{Foobar} \label{sec:foobar} See \cref{sec:foobar}. The output of this is: See section 1. But what I would ...
3
votes
0answers
87 views

Reference source code line in minted environment with cleveref

I'd like to reference lines in the minted environment (solved here for regular \ref) using cleveref. MWE: % !TEX TS-program = arara % arara: pdflatex: { shell: yes } % arara: pdflatex: { shell: yes ...
4
votes
2answers
320 views

tcolorbox: \newtcbtheorem referencing

Using \newtcbtheorem, how do we reference the created environment? \documentclass{article} \usepackage[most]{tcolorbox} \tcbuselibrary{theorems} \usepackage{cleveref} \crefname{exa}{example}{Example} ...
6
votes
2answers
119 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 ...
1
vote
1answer
163 views

Pagerefo on cref? Multiple pages?

I am using \cref to refer to different figures in the appendix: \cref{figure1,figure2,...} Now I want to create a \pageref{} to it, but I don't know how I can achieve this with multiple pages? So ...
5
votes
2answers
292 views

enumitem: referencing items in enumerate

Say we have a huge document with many sections, subsections, and subsubsections. In a few of these sections, we have enumerated environments. The package I am using is enumitem. One of the ...
11
votes
1answer
199 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: ...
3
votes
2answers
332 views

cleveref doesn't use correct capitalized name if used with amsthm?

It seems that the cleveref package does not capitalize properly when referring to a newtheorem if both \crefname and \Crefname have been defined. Or is it just me? Here is my MWE: ...
6
votes
1answer
122 views

What is the DRY way to get Theorem 1(a)?

I am typesetting a document with the memoir class and the cleveref package. Often I have a numbered theorem and enumerated parts. I would like to be able to refer to a part of a theorem as simply as ...
4
votes
1answer
110 views

Cleveref doesn't find the label

The following code gives me as reference the section and not the signpost. It is probably a beginner's mistake. \documentclass{article} \usepackage{tikz} \usepackage{mdframed} ...
2
votes
1answer
242 views

new command for including a custom string into \cref

In this thread here: Subfigure labelling for a single figure I suggested a solution how to include a custom string into the hyperlink created by the \cref command. I'd like to create a compact new ...
4
votes
1answer
208 views

Cross referencing tcolorbox with cleveref-package

Thanks to Thomas F. Sturm (http://tex.stackexchange.com/a/124688/15907) I have a little environment for creating nice looking source code in LaTeX. I started my enviroment with this here: ...
3
votes
1answer
139 views

Name formatting with cleveref - question about types

I want to customize the text that appears when I do a \cref{}, so for example, I want to make a link to section 0.1 but I want the text to say 'Summary' not section 0.1. I had this part working with ...
15
votes
1answer
223 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 ...
0
votes
1answer
80 views

Defaulting to clever references

I would like to redefine \ref to behave like \cref while still allowing \ref* to be used for the standard behavior of \ref. Here is my attempt to achieve this; I would like to use the commented lines ...
3
votes
1answer
105 views

Using a half-space with abbreviations in cleveref?

I'm using cleveref with abbreviated forms such as Fig. 1, and would like to have them typeset using a thin space/half-space rather than the ordinary non-breaking space. However, I'd only want this ...
3
votes
1answer
567 views

Defining cross-reference names for custom theorem environments in cleveref

I am concerned with the difference between this working example \documentclass{article} \usepackage{amsthm} \usepackage[capitalise]{cleveref} \newtheorem{thm}{Theorem} \begin{document} ...
9
votes
2answers
279 views

How to strip “eq.” from cleveref?

How can I make cleveref output (1) instead of eq. (1) when referencing equations only?
5
votes
1answer
61 views

How to disable sorting in cleveref for one instance?

I can disable reference sorting globally using the nosort or the compress package options, that's described in the docs. The same chapter explains how to disable compression for one instance of \cref. ...
10
votes
1answer
783 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 ...
7
votes
1answer
571 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{} ...
3
votes
1answer
221 views

Cleveref: cleveref appears to not be so clever (sorry for the pun but I couldn't help myself)

This didn't happen when I wasn't using cleveref. \documentclass{article} \usepackage{amsmath} \usepackage[retainorgcmds]{IEEEtrantools} \usepackage{hyperref} \usepackage[noabbrev]{cleveref} ...
7
votes
1answer
141 views

Using the cleveref package with hebrew and babel

I am trying to use the cleveref package with babel and Hebrew. I get the following error (on the second run of Latex): ERROR: Missing number, treated as zero. --- TeX said --- <to be read ...
3
votes
2answers
477 views

Extra “appendix” when referencing using cleveref in elsarticle

How do I get rid of the extra "appendix" appearing when I cross-reference an appendix section? Example output is "...see appendix Appendix A". MWE as follows: \documentclass[preprint,3p]{elsarticle} ...
1
vote
1answer
90 views

What is the counter name for verbments?

I'm trying to use the verbments package with the cleveref package. I need to find the name of the counter which is usually used for \ref{listing_label} to be able to define the name cleveref uses for ...
0
votes
0answers
29 views

Cleveref reference table as section [duplicate]

I am using cleveref for my references, and I just noticed that a reference to a table is actually resolved by cleveref into “section”. Is that indended behaviour? Is there maybe something wrong with ...
5
votes
1answer
72 views

Setting minimal number of references for cleveref's compression feature

I am using cleveref for cross-referencing. The default sort&compress option compresses three or more consecutive references into a range. I would like to get this compression already for two ...
4
votes
1answer
63 views

Automatic switching of arrows in references

I would like to use references in a way that an arrow is in front of the referenc and points in the direction depending on whether the referenced instance is a above or below the reference (→ chapter ...
5
votes
1answer
1k views

cleveref fails to reference algorithms

In the following example document, both \autoref and plain ref will correctly link and number an algorithm reference, but cleveref fails that task. It will just insert question marks instead. In ...
0
votes
0answers
35 views

Problem when using hyperref together with cleveref [duplicate]

As it says in the cleveref documentation hyperref must be loaded before cleveref. But at me I have to load at least one package between them and I would really like to know why. The not working ...
7
votes
1answer
142 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 ...
14
votes
3answers
754 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 ...
10
votes
2answers
213 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 ...
9
votes
1answer
6k 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. ...
10
votes
1answer
124 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} ...
3
votes
1answer
80 views

cleveref: \lcnamecref fails to work with theorem names that are not pre-defined

I'm using cleveref with the capitalise option, and I'd like to use the \lcnamecref command to give the name of one of my theorems in the text. But if this is not one of the theorem types pre-defined ...
9
votes
3answers
584 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 ...
6
votes
1answer
645 views

cref reference format for label type `' undefined

I have this error that I suspect comes from the fact that my tables and figures are in a slave file. It seems that cleveref does not manage to see the "class" of my float. I tried with varioref and I ...
2
votes
0answers
35 views

Problem with hyperref/cleveref interaction and specially tagged equations [duplicate]

I would like to resolve the infamous warning destination with the same identifier (name{equation.0.1}) has been already used, duplicate ignored in my MWE below. Reading around this site, the package ...
5
votes
1answer
380 views

\crefname for several layers of an enumerate: problem with enumitem

I want to use the \crefname macro from the cleveref package to set the label names on several layers of an enumerate environment. The following code works very well: \documentclass{article} ...
1
vote
1answer
826 views

\autoref with links that include only the number, but not the text, and have counter-dependent colors

I would like the functionality of hyperref's \autoref, but in a way that the link border box covers only the number and not the preceding text (e.g. "section"). This is normally possible with the ...
6
votes
1answer
592 views

Multiple labels in Cref

Following is a simple code to show my problem with the cleveref package. When using multiple labels it breaks on the second label... \documentclass[11pt]{article} ...
3
votes
1answer
104 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 ...
6
votes
1answer
845 views

Lightweight equivalent of \cref and \Cref

I'm trying to convert my LaTeX document to HTML using HeVeA and I'm facing a problem with cleveref package -- my LaTeX file uses \cref and \Cref heavily, but hevea doesn't support this package by ...