{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

1
vote
1answer
16 views

''Proof of Theorem x'' header trough modification of \ref

I had a problem that was solved in a previous question, and that now is coming back. The idea was to use \ref for internal links with color A, and \cref with nameinlink option in cleveref (!) and ...
3
votes
2answers
711 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
2answers
48 views

How to make a custom \crefformat dependent on language chosen with babel?

For my custom class I use the cleveref package and define new custom reference styles: \crefformat{figure}{Meine tolle Abbildung ~#2#1#3} Is there a way to make this command consider the language ...
3
votes
1answer
59 views

Cleveref-like command in ConTeXt

Following ConTeXt garden, I set up theorem environments like in the below MWE. I wonder if ConTeXt has a command similar to \cref from the LaTeX package cleveref which automatically adds "Corollary,", ...
2
votes
0answers
20 views

“destination with the same identifier” warning with shared counters, cleveref and amsart

The following mwe \documentclass{amsart} \usepackage{hyperref} \usepackage{cleveref} \newtheorem{theorem}{Theorem} \newtheorem{proposition}[theorem]{Proposition} \begin{document} ...
2
votes
1answer
15 views

IEEEtran cls and cleveref: the special case of IEEEeqnarray

How to properly reference equations in an IEEEeqnarray with the cleveref package? Here is possible MWE: \documentclass[a4paper,10pt,conference,twocolumn,twoside]{IEEEtran} ...
3
votes
1answer
181 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 ...
1
vote
0answers
20 views

Automatically insert “in the next [chapter/section/subsection]” if reference is sequential

I'm aware of the cleveref package \cref which adds the correct reference name (see: Automatically inserting "Section", "Subsection", etc). I have a few references which refer to ...
2
votes
1answer
40 views

Cross-reference to appendix sections in elsarticle document class

I am trying to reference a result given in the appendix, but cleveref is giving "Appendix Appendix" (doubling it). A way to solve this problem is to add \def\appendixname{} Not surprisingly, this ...
1
vote
0answers
46 views

Cleveref's \cpageref{} command leads to “Missing number, treated as zero” error, when used in a document using (at least) two page numbering schemes

Update: I have updated this question & the corresponding code. The minimal working example code was overhauled after receiving some valuable suggestions from @Johannes_B regarding how to make it ...
10
votes
2answers
531 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 ...
2
votes
1answer
20 views

Remove space in the default `\cref` command

I have my crefs defined as \crefname{section}{§}{§} \crefname{subsection}{§§}{§§} And when I reference it displays, for example, like § 4.5. I would like the middle space to dissapear and this ...
0
votes
0answers
13 views

Special cref display for sections and subsections in external documents

This is a variation of Special \cref display for \externaldocument where the solution by @David Carlisle takes us almost there. The question is how to get \cref to generate special prefixes for ...
4
votes
2answers
87 views

displaying ?? instead of the name of the lstlisting when using \cref

I change the name of the label of the lstlisting to Algorithm and it works fine for the caption. But when I use \cref, the instead of displaying algorithms 1 it shows ?? 1. \documentclass{scrreprt} ...
6
votes
1answer
111 views

No cleveref in beamer?

I am trying to get a math beamer presentation to work and it seems that cleveref is causing problems. The MWE below gives the error Paragraph ended before \@ynthm was complete In the documentation ...
0
votes
1answer
80 views

Put the § symbol before each section number [duplicate]

I'm writing a document (article class). I'm using the clever reference package to crossreference sections, and I have modified the references so the \cref{label} produces, for example if it's section ...
16
votes
5answers
3k 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 ...
3
votes
1answer
57 views

Special \cref display for \externaldocument

I am using cleveref pointing to equations within my document, as well as to a technical appendix in a separate file (loaded by \externaldocument) Setup Lets that the the first file was in main.tex, ...
4
votes
1answer
45 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} ...
0
votes
1answer
27 views

how to correctly customize section and equation using cleveref

I want to be able to change the standard way cleveref package makes reference to a section, or an equation. I thought the commands \crefformat{section}{\S#2#1#3} \crefformat{equation}{(#2#1#3)} ...
3
votes
2answers
69 views

cref table caption: works in body, not in lot

I am using cleveref package. In one of my table, i'm refering to an equation in the text. The reference works fine (also hyperref) in the caption just below the table. Unfortunately it doesn't work in ...
2
votes
1answer
46 views

Correct ordering of xr-hyper, hyperref, and cleveref

I want to use \cref, external documents, and hyperrefs. Take the following file, label it main1.tex and compile it: \documentclass{article} \usepackage[capitalise,noabbrev]{cleveref} ...
12
votes
2answers
7k 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. ...
2
votes
1answer
45 views

Distinguishing \ref and \cref through different colors

I have the following problem with the hyperref, and the cleverefpackages. I would like to distinguish internal links (e.g. sections, etc) from mathematical links (e.g. definitions, theorems, ...
0
votes
1answer
29 views

refer equations across chapters

I want to refer equations and figures from the previous chapters(showing in structure). I have to find the label from that chapter each time which is consuming more time. I want pop ups for all ...
4
votes
1answer
270 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
1answer
81 views

Referring with cleveref to a custom listing (\lstnewenvironment)

I use cleveref's \cref command for referencing, and \lstnewenvironment to create a new listing type. My document has multiple types of listings, each of them with their own counter. However, cleveref ...
6
votes
1answer
136 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} ...
8
votes
1answer
88 views

Cleveref isn't sorting nested lists properly

I wanted to use the cleveref to automatically sort cross-references, but for some reason it isn't sorting labels in nested enumerate environments properly. This is my reduced code: ...
6
votes
1answer
72 views

breqn not playing well with cleveref (or vice versa)

This is a little different from Cleveref and breqn packages don't play nice together, and may not have a simple answer. I was experimenting with breqn, and found some of my tagged equations were ...
8
votes
1answer
217 views

Is cleveref safe to use?

I have sometimes been warned against using cleveref because it makes very fundamental changes of some of the basic LaTeX commands, like \label. Is this concern justified, and what are the issues of ...
4
votes
1answer
208 views

\cref does not work for Section in emulateapj.cls

While \cref works quite well for me, it doesn't seem to recognise section labels when used in emulateapj.cls framework. Here's an example: ...
10
votes
1answer
1k 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} ...
4
votes
1answer
105 views

Trouble creating custom algorithm environment with separate counter

I am trying to create a custom algorithm environment for CUDA kernel code that runs on the GPU, but have little experience with custom LaTeX. It should have a separate counter, be referenced as Kernel ...
4
votes
1answer
47 views

Counter not incrementing when defining crefname with cleveref and algpseudocode

I am renaming the "line" label for lines in the algorithmic environment, since I am using the default label for lstlisting environment. As soon as I add define \crefname for it, the counter does not ...
3
votes
2answers
50 views

Refer to the “name” of an equation, while a List of Equations is generated using these names

I link two questions below because I use their solution, to number my equations and generate a list of my equations. My question about numbering equations: Number of Equation: 1, 1a, 1b Generate a ...
4
votes
1answer
55 views

Discrepancy between “thm” and “theorem”

The command \newtheorem{thm}{Theorem} and \newtheorem{theorem}{Theorem} produce different pdf bookmarks. \documentclass{article} \usepackage{hyperref} \usepackage{cleveref} ...
4
votes
2answers
83 views

Cleveref and pdf Bookmark

I'm making pdf bookmarks with hyperref and cleveref packages. However, the pdf bookmarks show the label I defined, rather than the theorem name the label refers to. Here's the code: ...
1
vote
1answer
40 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 ...
0
votes
2answers
90 views

How to reference chapter/section title when using cleveref

As the title says, how can you reference a chapter or section title when using cref? To be more clear: I do not want the label "section" or "chapter", I want the actual title of the chapter or ...
1
vote
1answer
226 views

amsmath package clash

Just this afternoon I seem to have a package clash that resulted in all my equation numbers disappearing. I seem to have resolved the issue by putting \usepackage{amsmath} at the top of the preamble ...
0
votes
0answers
72 views

How to use autoref or cleveref when the theorem environments are in the class file?

The journal LMCS provides a style, lmcs.cls, that contains definition of theorems environments : %%% Theorem environments % the following environments switch to a slanted font: \theoremstyle{plain} ...
4
votes
1answer
50 views

enumitem & cref: referencing different exercises with cref for different chapters

I am using scrbook along with enumitem for exercises and cref for cross referencing. In my style file, I have set the following new list % Rename enumerate from item to exercise ...
6
votes
2answers
131 views

Error (?): hyperref breaks \crefalias

The below code (exluding the line \usepackage{hyperref}) provides two theorem environments thm and Thm, which use two different theorem styles (with andwithout a line break right after the theorem ...
2
votes
1answer
63 views

cleveref for theorems with same type

I usually create theorem environments in pairs - one uses the ordinary theorem style, the other (whose name starts with a capital letter) uses the "break" style, which inserts a line break before the ...
7
votes
1answer
827 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{} ...
4
votes
1answer
88 views

how to use cleveref with IEEEeqnarray?

Here is the codes. I have 3 questions about the labeling by using the packages IEEEtrantools and cleveref together. \documentclass{amsart} \usepackage[colorlinks]{hyperref} ...
2
votes
1answer
79 views

Making broken references extra visible, redux: interacting with BibTeX (or BibLaTteX)

In Making broken references extra-visible, I asked how to make LaTex's normal ?? and [?] markers for broken references instead render as some super-annoying, colored text, so that in skimming a long ...
3
votes
1answer
66 views

Making broken \cleveref references extra-visible

In Making broken references extra-visible, I asked how to make LaTex's normal ?? and [?] markers for broken references instead render as some super-annoying, colored text, so that in skimming a long ...
3
votes
1answer
53 views

Cleveref does not sort self defined tags

Because I have many equations in my document and most of them do not need to be referred to, I always use \begin{align*}...\end{align*}. For the times I do need an equation number I have written a ...