{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

0
votes
0answers
12 views

Parenthesized subfigure references except when already in parenthesis

I would like to style my subfigure references as Fig. 1(a) in running text and (Fig. 1a) when parenthetical. The subfigure labels are created using this code. (I would prefer to use subcaption like in ...
3
votes
1answer
30 views

Is it possible to remove parenthesis from single cref references?

I am using cleveref to crossreference everything. Sometimes I write the reference inline like eq.(1). That is fine. But when it is enclosed in parenthesis it turns out like (eq.(2)). Which is not so ...
0
votes
0answers
5 views

Create cross-reference like “in the previous section” where appropriate [duplicate]

Is there a referencing command that will use the wording "the previous section" or "the next section" if appropriate, and default to "Section x.y" (as in cleveref)? \documentclass{scrartcl} ...
3
votes
2answers
47 views

Changing cleveref type for a single chapter

I have an appendix in my thesis that, due to fancyheader constraints, I define as \chapter* and not \appendix. However, now when I refer to it using \cref I get "chapter", I can change this manually, ...
0
votes
0answers
22 views

Varioref and Cleveref inconsistent while redefining page

I am trying to use cleveref and varioref. I read here how should be the correct order of loading the packages. Also saying that \vref and friends would become clever since cleveref changes the ...
5
votes
1answer
38 views

cleveref and aliascnt: referring to subequations and inequalities in a smart way

Preliminary Remark: A document may contain labels referring to equations and subequations, respectively. Moreover, some of the equations may actually represent inequalities. When using the cleveref ...
1
vote
1answer
24 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
23 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
31 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
47 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
77 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
54 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
39 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
12 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
20 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
75 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
53 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
21 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} ...
11
votes
4answers
237 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
69 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
64 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
78 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
34 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
17 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
110 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
52 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
31 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
83 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
56 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
71 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
62 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
321 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
98 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
234 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
50 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
73 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
56 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
90 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
53 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
154 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
106 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
66 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
145 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
70 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
110 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
67 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
86 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
59 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 ...