33 votes

cleveref and algorithm2e

You only need to load algorithm2e before cleveref.
xuhdev's user avatar
  • 1,033
18 votes
Accepted

Change cross-reference name of enumerated items using cleveref

cleveref use the counters as type. The counters of enumerate are enumi, enumii, enumiii enumiv: (I wouldn't use spaces in label names, so I removed it) \documentclass{article} \usepackage{enumitem} \...
Ulrike Fischer's user avatar
17 votes
Accepted

cleveref and amsthm -- incorrect environment name

You just need to move the definitions of your theorem-like environments to after the loading of cleveref package: \documentclass{memoir} \usepackage{amsthm} \usepackage[capitalise]{cleveref} % ...
Andrew Swann's user avatar
  • 94.8k
17 votes
Accepted

What's the convention for label prefixes?

What are the modern conventions for prefixes? I want to use cleveref. The good news is that cleveref imposes no stylistic conventions and only two absolute constraints on how the arguments of \label ...
Mico's user avatar
  • 490k
15 votes
Accepted

Can \cref be made to ignore spaces?

Normalization with removal of spaces before and after label names and removing of empty entries. The following example uses the comma parser of package kvsetkeys for parsing the label name list of ...
Heiko Oberdiek's user avatar
15 votes
Accepted

Omit round brackets around equation numbers with cleveref

Using \creflabelformat as follows \creflabelformat{equation}{#2\textup{#1}#3} helps. \documentclass{scrreprt} \usepackage{mathtools} \usepackage{hyperref} \usepackage{cleveref} % see: https://tex....
TeXnician's user avatar
  • 33.2k
13 votes
Accepted

cleveref -- using both abbreviated and full form references?

Here is another approach requiring less delving in to the innards of cleveref. The idea is to change the name locally using \crefname. \documentclass{scrartcl} \usepackage[demo]{graphicx} \...
Andrew Swann's user avatar
  • 94.8k
13 votes
Accepted

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

From the (deleted) answer and comment by @Christian Hupfer and my own search, there are three possibilities: \renewcommand{\Cref}[1]{\cref{#1}} This does not work together with the poorman option ...
Hotschke's user avatar
  • 5,170
13 votes

How I can change "Figs. 1 and 3" to "Figs. 1 et 3"?

The cleveref package is babel-aware, so it suffices to load babel and add french to the cleveref options. In this example I've turned off the : shorthand defined for French because your labels have : ...
Alan Munn's user avatar
  • 213k
12 votes
Accepted

texlive 2016 hyperref/cleverref incompatibility

UPDATE This is fixed in hyperref release 6.83q 2016-06-24 The change to hyperref was to fix this issue https://github.com/ho-tex/hyperref/issues/11 which I have just re-opened, pointing here. ...
David Carlisle's user avatar
11 votes

Cleveref isn't sorting nested lists properly

Turns out @Karalga's explanation of the cause of this bug points in the right direction, but doesn't get to the bottom of the problem. Sorting of nested list labels was broken for two completely ...
Toby Cubitt's user avatar
  • 2,062
11 votes
Accepted

cleveref hyperlink not working in beamer

As a bandaid fix you could redefine the \cref command and explictely add the hyperlink, which will give you the desired result. \documentclass{beamer} \usepackage{cleveref} \let\chyperref\cref % ...
QStar's user avatar
  • 446
11 votes
Accepted

How to cross-reference an unnumbered theorem using hyperref and cleveref

You have two types of theorems in your document -- numbered ones, of type plain, and unnumbered ones, of type named. As you've already discovered and pointed out, it's easy to assign a \label to a ...
Mico's user avatar
  • 490k
11 votes

What's the convention for label prefixes?

They are just conventions. They keep you from inadvertently reusing labels: you can have equation eq:pythagoras in section sec:pythagoras. \usepackage{showlabels} while writing helps you remember ...
Ethan Bolker's user avatar
  • 9,231
11 votes

Redefine \cref for non-English languages

You can just surround the \cref command with e.g. \foreignlanguage, provided you have passed your languages to both babel and cleveref: \documentclass{book} \usepackage[T1]{fontenc} \usepackage[...
Andrew Swann's user avatar
  • 94.8k
11 votes
Accepted

Capacity exceeded error while using cleveref package with svjour3 (Springer) class

One way would be to tell svjour3 to set up the chapter counter via the numbook option. \documentclass[twocolumn,numbook]{svjour3} % twocolumn \usepackage{cleveref} \begin{document} \...
David Carlisle's user avatar
10 votes

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

Here is a solution based on cleveref package. If the hyperref package is loaded, the word "section" (or chapter/subsection/...) is a clickable hyperlink. \documentclass{article} %\usepackage{...
touhami's user avatar
  • 19.3k
10 votes
Accepted

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

I'd go with clipping the image and include it four times (this will have no impact on the final PDF size, because the resource will be loaded just once). With \clipbox* of the trimclip package you don'...
egreg's user avatar
  • 1.1m
10 votes
Accepted

cleveref and ulem/soul compatibility

In these cases, add \mbox around the offending piece; it works also with soul. \documentclass{article} \usepackage{ulem} \usepackage{cleveref} \begin{document} \uwave{\mbox{\cref{sec:A}}} \section{...
egreg's user avatar
  • 1.1m
10 votes
Accepted

"Extra \else" error when combining breqn, thm-restate, and cleveref

Wow, that's a nice finding (if you can call it that). . . The order doesn't matter, but all three packages play a role in this (though cleveref is innocent). First, breqn redefines ...
Phelype Oleinik's user avatar
9 votes

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

Revised Attempt In addition to \Unitref{<label>} which provides the unit name along with the ref, as in "section 2" or "subsection 1.1", etc. (see original attempt), I now also introduce \Ref{&...
Steven B. Segletes's user avatar
9 votes
Accepted

How to get \cref to print "Fig." in emacs?

The issues you're experiencing are not related to emacs, and they are only indirectly related to cleveref. You need to do the following: In the main figure, interchange the order of \caption and \...
Mico's user avatar
  • 490k
9 votes
Accepted

'cleveref' package & captions besides figures

Setting the label in the caption argument works for me: \begin{captionbeside} {caption1\label{fig:fig_1}} Here is a twosided example, but I am not sure how the pictures and the captions should be ...
esdd's user avatar
  • 84.8k
9 votes
Accepted

Cleveref not working with multiple references

Probably your problem is caused by the space inside your \Cref-command. Compare the output: \documentclass{article} \usepackage{cleveref} \begin{document} \begin{equation}\label{a} 1+1=2 \...
Οὖτις's user avatar
  • 2,855
9 votes

Any elegant way to tell LaTeX that a line break after an abbreviation is bad but not impossible?

You can use \nolinebreak[3], that issues \@highpenalty, whose standard value is 301. I don't think that 5000 is a good value, but you can experiment with higher values than 301. \documentclass{article}...
egreg's user avatar
  • 1.1m
8 votes
Accepted

Varioref and previous page

You understand varioref correctly, but cleveref overwrites some of its functions and does so incorrectly. It is a typical case of adding % characters to the end of every line and in some cases that is ...
Frank Mittelbach's user avatar
8 votes
Accepted

Cleveref messes up theoremstyles

In my opinion the amsbook class takes the wrong approach about theorems: it defines a slightly different structure from amsthm and fakes this package being loaded, so putting cleveref at stake, ...
egreg's user avatar
  • 1.1m
8 votes
Accepted

Different enumitem \ref, \cref results to item for direct enumerate vs. defined newlist

When you define a new enumerated list environment called romcases via a \newlist instruction, the counter associated with level-1 items is called romcasesi. Similarly, the counter associated with ...
Mico's user avatar
  • 490k
8 votes

Is there a way to make cleveref distinguish two environments with the same counter?

No need for any programming contortions -- just load either the amsthm or the ntheorem package before both hyperref and cleveref, and then define the theorem-like environments the usual way. In ...
Mico's user avatar
  • 490k

Only top scored, non community-wiki answers of a minimum length are eligible