{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
21 views

Forcing abbreviations with cleverref

As an apposite situation of this question, I would like to use cleveref, but it constantly prints unabbreviated text (Chapter, Section, etc.). Is there a way to force the abbreviated form (Chap., ...
1
vote
0answers
20 views

Using cleveref with 2 different styles

I like to style my \cref as following (Geophysical Prospecting): Type 1: Fig. 1, Fig. 1(a), Fig. 1(a,b), Figs 1 and 2 Type 2: (Fig. 1), (Fig. 1a), (Fig. 1a,b), (Figs 1 and 2) I have tried with ...
2
votes
1answer
26 views

Always getting upright numbers in references created with \cref, with italic-correction for conjunction between references

How do I make it so that I get upright numbers all the time in references created with \cref? I believe I'm supposed to do this with \crefdefaultlabelformat{#2\textup{#1}#3}. But in my example below, ...
2
votes
0answers
37 views

Cleveref: Change behaviour of \Cref to use the abbreviated form

The journal International Journal of Solids and Structures uses always capitalised and abbreviated form of references, i.e. Fig. 1, Eq. 1, even at the beginning of a sentence. I use the package ...
4
votes
1answer
69 views

Is there a way to divide ONE figure to reference the subparts of the figure?

I have a figure that basically consists of smaller figures. I don't want to split the big image apart to put it together with latex for convenience. Instead, I want to reference each subpart of the ...
1
vote
1answer
41 views

Change cross-reference name of enumerated items using cleveref

I feel this is a really basic question, but I haven't figured out a solution after searching for half an hour so maybe other people will find this question useful as well. I'm using the cleveref ...
2
votes
1answer
35 views

Referencing sublabels without subfloats

Suppose that I have a figure with different panels and I want to use the command \cref to reference each one of the panels. A way to do this is to use the packages subfig, subfigure, or subcaption. ...
1
vote
1answer
16 views

Combine mdframed, xparse and cleveref

Inspired by this post: Typesetting a definition, I wanted to define some fancy theorem-like environments. Contrary to the examples given in this post, I need a definition environment with a counter ...
1
vote
0answers
10 views

How to tell cleveref to use the correct label type [duplicate]

I'm trying to use cleveref to reference some figures, but it is incorrectly labelling them as sections. (i.e. It will say something like Section 5.12 instead of Figure 5.1 in the text) I'm also using ...
1
vote
1answer
18 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 ...
4
votes
1answer
73 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
1answer
42 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
18 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} ...
2
votes
1answer
29 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
59 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
2answers
60 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 ...
1
vote
0answers
66 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 ...
2
votes
1answer
31 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
16 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
102 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} ...
4
votes
1answer
49 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
76 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
50 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} ...
3
votes
1answer
67 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, ...
2
votes
1answer
52 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 ...
0
votes
1answer
168 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 ...
5
votes
1answer
93 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 ...
8
votes
1answer
226 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
49 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
68 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
86 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
47 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
121 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
92 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
61 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
140 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
67 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
95 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
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 ...
2
votes
1answer
85 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
56 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
67 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
65 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
88 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
52 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
106 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 ...
2
votes
2answers
62 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 ...