{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
29 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 ...
7
votes
1answer
186 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
33 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
40 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
47 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
69 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
26 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
45 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 ...
0
votes
0answers
51 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
33 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 ...
5
votes
2answers
118 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
46 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 ...
4
votes
1answer
60 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} ...
3
votes
1answer
60 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 ...
2
votes
1answer
76 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
49 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 ...
5
votes
1answer
49 views

Making \cpageref output commas instead of “and”

I can use \cpageref to output a list of page references. For example, the markup: You should check \cpageref{sec:section1,sec:section2,sec:section3}. ... renders as: You should check pages 3, 5 ...
5
votes
2answers
53 views

Help with a \newcommand not working with autonum

I am writing my thesis. To write math formulas I created the command \eq as follows. \newcommand{\eq}[1]{ \begin{equation} \begin{split} #1 \end{split} \end{equation}} However, now I want ...
3
votes
1answer
72 views

Are htlatex (TeX4HT) and cleveref compatible?

Simple question: When I use cleveref and \Cref{} or \cref{} I am able to compile the code and produce a PDF. When I use htlatex I get ?? in place of what I expect would be the object name and ...
4
votes
1answer
38 views

Which counter names does cleveref recognize by default?

The package cleveref includes the type of the reference along with the counter as the output of its \cref command. It also knows some counter names, for instance theorem, so that it does not need to ...
4
votes
2answers
83 views

Ask `\autoref` to display environment name without number

I'm using the memoir class and I define theorems with thmtools. Theorems often have a name, besides being numbered. I'm looking to write a \fullref command that outputs the name of the environment ...
0
votes
0answers
64 views

french: Table or Tableau, and small caps, or plain [closed]

There are already quite a few questions on how to change the name and style of the captions, this is not what my question is about. I'm looking for guidance on the right choices to make to comply ...
2
votes
2answers
50 views

Numbering tables sequentially [duplicate]

I would like to number my table so that I have, e.g. Theorem 1.3 Table 1.4 Lemma 1.5 How can I achieve this result? I am also using cleveref, so ideally \cref{ThatTable} would produce a linked ...
2
votes
1answer
50 views

Using Cleveref with LIPICs documentclass fails for theorem environments sharing the same counter

I want theorems and lemmas to be referred to in the text as "Theorem 1" and "Corollary 2", sharing the same counter. This works fine when I'm using the normal article documentclass, but fails when ...
6
votes
1answer
59 views

cref multiple labels don't grab the label type

I have a strange situation where cref is working great for single labels, i.e. \cref{eq:some equation} and for the first two multiple references of the form \cref{thm:first theorem,thm:second ...
3
votes
1answer
56 views

Can cleveref treat sections in other chapters as chapters?

I am using cleveref for my thesis. When referencing another chapter, if I put the label at the top of the chapter, it will say "chapter X", but if I put the label after defining a new section or ...
1
vote
1answer
65 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 ...
6
votes
1answer
68 views

Cleveref and ametsoc

I really like cleveref. And I've been using it when writing a manuscript with the ametsoc style file But there is at least one problem: The appendix letters (which must be manually assigned and ...
1
vote
1answer
32 views

Right language for reference to appendix

I used the package "cleveref" to make references to appendix, so that: \documentclass[...(various arguments)...]{scrbook} \usepackage{cleveref} .... .... \begin{document} ... As I show in ...
8
votes
1answer
81 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: ...
5
votes
1answer
79 views

Can I use cleveref and endnotes together?

I'm trying to setup my article with notes such that: Notes are not shown at the bottom of the page Notes are shown at the end of the article (no need to show them after each section or so) I can ...
0
votes
1answer
61 views

Figure reference numbers off by one with cleveref

I am having an issue with generating my dissertation using cleveref, where the figure references are references are off by one, such that the reference to figure 1.1 says Fig. 1.0. Anyone have any ...
4
votes
1answer
36 views

Is there a workaround to this cleveref/thmtools bug: they think, multiple references is sequential

I have a latex file that exhibits a cleveref/thmtools bug. In short: I have \cref{problem:5,problem:4,problem:2} in the file, and I expected to have, in the output problems 2.1, 2.2, and 1.3. ...
0
votes
1answer
52 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: ...
5
votes
1answer
81 views

enumitem: using label for a defined item

Whenever I try to label an item that is defined, it never seems to work. For example, consider the following: \documentclass{article} \usepackage{enumitem} \usepackage[noabbrev]{cleveref} ...
3
votes
1answer
54 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". ...
0
votes
1answer
40 views

change the reference format for subfigures

I am using \subfigures to plot multiple figures on two pages: \begin{subfigures} \setlength\figureheight{4cm} \setlength\figurewidth{5cm} \begin{figure}[htb] \centering \input{Figure2a_1.tikz} ...
4
votes
1answer
69 views

cleveref and cases packages clash

In the MWE below cleveref produces `section 1' instead of a reference to equation 2. What's the easiest fix? (other than using \eqref or (\ref)) \documentclass{article} \usepackage{cleveref} ...
4
votes
2answers
214 views

Cleveref reference name depending on label instead of counter?

Let's say I have this: \documentclass{article} \usepackage{cleveref} \begin{document} \section{Section One} \label{a:sec1} \cref{a:sec1} \section{Section Two} \label{b:sec2} \cref{b:sec2} ...
3
votes
1answer
75 views

Using \cref and custom labels for inference rule names

I have an array environment that is used to present inference rules (via a custom command). Now, these inference rules have names and i would like to refer to them using \label and \cref commands. I ...
4
votes
1answer
96 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 ...
2
votes
0answers
60 views

Include Chapter number in reference if target is in different chapter

I'm using a setup where the chapter numbers are in Roman and the normal referencing commands do not include a chapter reference: \renewcommand{\thechapter}{\Roman{chapter}} ...
0
votes
0answers
74 views

Why does hyperref return errors when options are included to this package?

When I include these options to the package hyperref I get error messages and the file doesn't compile! Please here is a minimal working environment: \documentclass[a4paper,10pt]{article} ...
6
votes
1answer
67 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 ...
3
votes
2answers
227 views

Change the output format of \cref from table to Table and from eq. to Equation

if you use \cref then you get references as eq. (1) / table (1) / fig. (1) but I want it to produce Equation 1 / Table 1 / Figure 1 how to I set this? I also want to know if it is possible to use ...
0
votes
0answers
45 views

Using cleveref for named referencing

This is what I have so far \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{tikz} \usepackage{tikz-cd} ...
0
votes
1answer
35 views

cleveref, ntheorem and lj-igpl

The cleveref package doesn't work properly with the lj-igpl package. There are many discussions about cleveref, however, none of them solves my problem. I am using the ntheorem package as well, but ...
2
votes
1answer
91 views

Generate HTML from document that uses autoref/cleveref

I have an existing document that was written using hyperref and natbib, and am trying to generate a website alongside the PDF that is already built. The document was written using autoref references ...
6
votes
1answer
123 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") ...
5
votes
1answer
147 views

How to reference an inequality with \cref?

I have inequalities being referenced by cref as equations. 1-) How can I change that? (and still have inequalities with the same numbering as equations) 2-) How can I change that and have ...