Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [cleveref]

{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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

zref substitutes for some crossreftools commands?

I'd like to switch from cleveref and crossreftools to zref-based cross-referencing — including with zref-clever and zref-vario — (with hyperref, too), . [The reason is: (i) to allow compatibility with ...
1 vote
0 answers
61 views

`cleveref` with cyrillic in LuaLaTeX

I'm trying to use cleveref with Russian language with unicode text in LuaLaTeX, and can't get it to work. This mwe: \documentclass{book} \usepackage{ebgaramond-maths} \usepackage[russian]{babel} \...
5 votes
1 answer
8k views

\Cref not working

\documentclass[Afour,sageh,times]{sagej} \usepackage[english]{babel} \usepackage{cleveref} \begin{document} \section{Introduction} \label{sec:Introduction} \Cref{sec:discussion} \section{...
0 votes
1 answer
51 views

How cross-reference optional argument contents in enumerate list item?

In the following, is it possible to create a cross-reference that prints the contents of the "note-like" field of a \ditem optional argument? That is, I would like to be able to print "...
5 votes
0 answers
69 views

Cross-reference expl3 integers with cleveref

Suppose I implement numbered document elements using expl3 integers. Suppose further that I would like to cross-reference these elements using cleveref. What is the best way to do this? I came up with ...
0 votes
1 answer
26 views

Why does cleveref assign this wrong label?

I have a tex file \documentclass[11pt]{amsart} \usepackage{amssymb,enumitem,mathtools,fullpage,microtype} \numberwithin{equation}{section} \newtheorem{theorem}{Theorem}[section] \theoremstyle{...
1 vote
2 answers
46 views

How to pass arguments to cleveref

I am trying to write my own theorem package which wraps a bunch of functions to order my standard preamble. In doing so I got stuck with the following problem: I try to create a function to define a ...
0 votes
1 answer
20 views

apa7 and cleveref

I'm formatting a document with the apa7 style and would like to use the cleveref package. However, it doesn't seem to work. Here's a minimal not-working example: \documentclass{apa7} \usepackage{...
2 votes
2 answers
115 views

Why cleveref is not capturing float from pseudo+tcolorbox?

I am switching to pseudo to present my algorithms. Following the documentation, I combined it withtcolorbox to create a floating environment called algorithm. But when I want to reference it with \...
88 votes
1 answer
25k views

Difference between ref, varioref and cleveref. Decision for a thesis

How can one make a quick decision what the best "ref" for a thesis in pdflatex with hyperref is? After a few hours reading I do not know more than ref is used by everyone who does not know about the ...
1 vote
2 answers
41 views

Cleveref names in small caps

I want to have every name cleveref prints to be a link writing in small caps. Currently I do this manually for every name I can think of using \crefname and \Crefname, but this is not an elegant ...
1 vote
1 answer
51 views

Old style numbers on cross-references and links

I am writing a document and want to have old style numbers whenever hyperref creates a links to something inside my document that is numbered. This includes references to numbered sections, pages (...
0 votes
1 answer
33 views

Using cref automatically with enumerate in *all* theorem-like enviornments

This excellent answer explains how to create a new list definition to allow cleverref to refer to the items in an enumerate inside a definition as definition def# (item#). Specifically, it describes ...
1 vote
2 answers
20 views

Referencing items in resume* list renders additional text

I wanted to automate my life a little and found that the enumitem package provides a way to create custom lists which can resume counting with respect to the previous list. Without that, I'd have to ...
5 votes
1 answer
116 views

How to add a hint (arrow up/down) at the reference for direction in which to look for the referenced figure/float?

In LaTex it is common for figures to be placed by LaTex and not right at the definition of the figure in the text. This is fine. Yet, the referencing text might name a figure that will come on the ...
4 votes
1 answer
104 views

different colors for equations with cref

I was working on some equations and wish to have them in a different hyperlink color compared to the rest of the link colors I set in my \hypersetup. Now, it appears this post does what I'm looking ...
6 votes
1 answer
215 views

Current best practice re. cross-references to last page

I am/was using pageslts, which I know is not supposed to be compatible with current LaTeX. As far as I understand, there is no alternative offering the same functionality, but I'd like to at least ...
1 vote
0 answers
118 views

Converting cleveref macros to standard LaTeX

My goal is to create a function in Emacs Lisp to interactively convert macros provided by the cleveref package (\cref, \Cref, etc.) into standard LaTeX: For example: \cref{sec:1} --> section~\ref{...
0 votes
0 answers
78 views

Patching \cref and \Cref to write additional information to the .aux file

I need to patch the macros \cref and \Cref so that when used like this: \cref{label1,label2,label3} besides generating the normal layout in the document, they write something like this to the .aux (...
1 vote
0 answers
69 views

Check if floats appear before the page where they are first referred

In the 2017 I asked: Get the "exact" page of a \ref command in .log or .aux files. I still need to check if a float appears before the page where that float is first referred. I have a ...
0 votes
1 answer
96 views

Obtain (1)‒(3) style when referring to ranges of examples, when default \crefrangelabelformat has no parentheses

I need \crefrangelabelformat to be without parentheses, so I can type 1‒3 when in an "already between parentheses" context, as in (for this issue, see 1–3 and following examples). But then, ...
0 votes
1 answer
134 views

Hyperlink jumping to incorrect location for \newtcolorbox labeling in compilation LaTeX -> dvi -> ps -> pdf

By compiling the following sample code: \documentclass{report} \usepackage{lipsum} \usepackage{amsthm} \usepackage[many]{tcolorbox} \usepackage[dvips,colorlinks,bookmarks]{hyperref} \usepackage[...
1 vote
1 answer
38 views

How to add an auxiliary part in the name of a proof?

With \documentclass{article} \usepackage{amssymb,amsmath,hyperref,mathtools,amsthm} \usepackage[noabbrev,capitalize,nameinlink]{cleveref} \hypersetup{ colorlinks=true, linkcolor=blue, ...
13 votes
1 answer
425 views

Cleveref mistakenly showing filename in external references

I am using a combination of xr-hyper, hyperref and cleveref with multiple files. Old code that I have is no longer working correctly. The external references now include the file name of the ...
0 votes
0 answers
21 views

Use nameref for paragraphs in cleveref

Is there a way to have cleveref replicate a custom reference command for paragraphs (but not for other references)? For example, consider the following MWE: \documentclass{article} \usepackage{...
0 votes
1 answer
28 views

How to get full forms with namecref and abbreviated forms otherwise?

Continuing cleveref -- using both abbreviated and full form references?, how to get full forms as an output of \namecref and \nameCref while maintaining the abbreviated forms from \cref and \Cref as ...
1 vote
1 answer
55 views

namecref With theorem* Environments

I'm trying to refer to the name of an amsthm theorem* environment using cleveref's namecref command. However \documentclass{article} \usepackage{amsthm} \usepackage{cleveref} \newtheorem*{note}{Note} ...
0 votes
1 answer
84 views

How to make cleveref and nameref work with documentclass wlscirep and \section*? [duplicate]

QUESTION: How to make cleveref and nameref work with \documentclass{wlscirep} and \section*? Note that \documentclass{wlscirep} comes from "Template for submissions to Scientific Reports". ...
0 votes
0 answers
25 views

How do I remove 'A' in using \cref{} for referring to subsections in Appendix?

I wonder how can I remove 'A' in using \cref{} for referring to subsections in Appendix? I have the following pseudo code. \documentclass{IEEEtaes} \usepackage[capitalize]{cleveref} \usepackage{lipsum}...
10 votes
1 answer
292 views

The current status of "cleveref"

cleveref is one of my favorite packages, and indeed, many of my own packages (cleveref-forward, crefthe, create-theorem) and classes (minimalist, colorist) depend in a fundamental way on cleveref. ...
4 votes
1 answer
46 views

Referencing with Enumerate and Cleveref

I'm struggling to set up correct references using the cleveref package. I'm able to get references for the second sub-hierarchy, however, I don't get the reference correctly setup for the first level. ...
3 votes
1 answer
951 views

Why does Cref refer to my lemmas, definitions etc as theorems?

\documentclass{article} \usepackage{cleveref} \usepackage{amsthm} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \theoremstyle{definition} \newtheorem{definition}[theorem]{...
0 votes
1 answer
23 views

locally change the color of \Cref in document report

Hi there I'm working on a LaTex report document and I happened to need to change the color of a \Cref reference to a Section of my document. However, for some reason, I'm unable to do so and the color ...
12 votes
0 answers
251 views

What is the recommended maintained modern (>= TexLive 2023) alternative to cleveref?

Cleveref has seems to be unmaintained as it produces broken references with TexLive 2023 and had its last release in 2018. It has been pointed out that it "might be not supported anymore". ...
6 votes
0 answers
97 views

Show appendix as "Appendix A" instead of "Chapter A" in references

Here's a ConTeXt document that uses Aditya's solution to "Cleveref-like command in ConTeXt": \definereferenceformat[cref][label=*] \setuplabeltext[chapter=Chapter~,appendix=Appendix~] \...
1 vote
1 answer
183 views

cleveref does not work together in sv classes with envcountsame option

I posted once before about this issue, here, but would like to start a new thread with more information and a MWE. I hope that's OK. (In the old post I did not very adequately explain the situation, ...
1 vote
2 answers
47 views

Refering to a theorem by its name [duplicate]

So I've seen here that you can actually have a personnalized theorem environment name but I was wondering if there was a way to refer to it as is. I've chosen the solution \documentclass{article} \...
5 votes
1 answer
113 views

\cref : "Argument of \textsf has an extra }."

So I have this bit of code \begin{ex} The prototype for an abelian category is $\Mod_R$, in fact every abelian category is equivalent to a full subcategory of $\Mod_R$ as we will see in \cref{FMET}...
0 votes
1 answer
139 views

cleveref with subcaption, using \crefmultiformat and \crefstripprefix

I am trying to implement this solution: https://tex.stackexchange.com/a/418261/194338 or this solution: https://tex.stackexchange.com/a/416838/194338 but both fail in my case. Here is a minimal ...
0 votes
1 answer
57 views

Cross-Referencing Label Affects Vertical Spacing

Consider the code with \label{L} (immediately above the second tikzpicture) commented out: \documentclass[12pt]{book} \usepackage[paperwidth=5.5in,paperheight=8.25in]{geometry} \textwidth=4in \...
0 votes
1 answer
199 views

How to determine in advance whether a chapter has any sections, a section has any subsections, or a subsection has any subsubsections?

Continuing Test if a chapter has sections : to number theorem-like environments in a nice way, it is advisable to know at the start of a logical portion of your document whether this logical portion ...
4 votes
1 answer
2k 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,...
0 votes
1 answer
71 views

How to select a command based on the expansion of \Cref*?

(This is a somewhat of a continuation of this question of mine, which @egreg provided an easy solution to.) In the following (slight variation of egreg's) MWE, three commands are defined. \mylabel ...
2 votes
2 answers
287 views

\labelcref doesn't like my user-defined command

I have defined my own command allowing me to number and reference a single line in a starred multiline equation environment, rather than using an un-starred environment and entering \nonumber at the ...
28 votes
2 answers
2k views

Relative chapter references

(A follow-up of sorts on Variable chapter references, as per @werner 's suggestion) This is somewhere in between a request for comments and an actual question (as well as a summary of my experiences ...
2 votes
1 answer
63 views

Missing section number in using cref for subsection

I am using \documentclass{IEEEtaes}, and I want to use \cref{} to cross-reference a subsection in the document. However, it prints only subsection number without the section number. For example, let's ...
18 votes
4 answers
8k views

cref reference format for label type `' undefined

I have this error that I suspect comes from the fact that my tables and figures are in a slave file. It seems that cleveref does not manage to see the "class" of my float. I tried with varioref and I ...
1 vote
1 answer
62 views

Including part and chapter numbers in cross-references

I have a project consisting of Parts, each with multiple Chapters. The Parts are written in main.tex, with each Chapter included as a separate \subfile of main.tex. Is there a way to automatically ...
0 votes
0 answers
16 views

Multiple cross-references with cleveref with custom connecting word

Suppose that I have two theorems in my text, Theorem 1 and Theorem 2, labeled thm1 and thm2. Using the cleveref package and writing \cref{thm1,thm2} produces Theorems 1 and 2. Is there a way to change ...
6 votes
1 answer
392 views

Ukrainian polyglossia wont make friends with cleveref package

I have next setup: % !TeX program = lualatex \documentclass[11pt]{report} \usepackage{polyglossia} \setmainfont{CMU Serif} \setsansfont{CMU Sans Serif} \setmonofont{CMU Typewriter Text} \...

1
2 3 4 5
19