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
4 votes
0 answers
40 views

How to get "Theorems 1 to 6" when Theorems 3 to 6 are in the appendix rather than in the main body?

Consider the following MWE: \documentclass[]{article} % PACKAGES LOADING \usepackage{amsthm} % THEOREM DEFINITION \makeatletter \newtheoremstyle{style1}{\topsep}{}{\itshape}{}{\scshape}{}{ }{\...
user avatar
  • 2,101
13 votes
1 answer
664 views

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

LaTeX manuals are full of examples such as Fig.~5 or Thm.~10. The tilde prohibits a line break after the abbreviation completely, to make sure that the reader doesn't see a period at the end of a ...
user avatar
  • 1,119
1 vote
1 answer
13 views

newcounter, crefname, crefformat: Multiple cross-references in cref not showing name, ?? instead

After defining a newcounter (I named it "cases"), crefname, crefformat, and crefrangeformat, I incremented the counter with refstepcounter and labeled it with label. I can reference single ...
user avatar
  • 13
3 votes
1 answer
68 views

Wrong figure caption and number, attempt to implement APA 7 style

I'm trying to adjust the figure formatting style to the APA 7 style. So far I'm doing well, but now I got an issue. When cross-referencing a figure in the text, it appears as "Figure 1a" ...
user avatar
1 vote
1 answer
84 views

nameref, ref, and other issues with referencing back

I amm having issues with \nameref and \ref not returning the desired output. I would like to have definitions referred to by Definition 0.0.1 (see below). I do not want the result of \nameref{defn1} ...
user avatar
1 vote
1 answer
11 views

How to prevent cleveref from picking up the separator in enumerate environments?

I am defining a new label class with cleveref, which I name "Cases". I also define a custom enumerate environment with enumitem. Among other things, I make sure that after the numeral in my ...
user avatar
  • 2,101
0 votes
0 answers
32 views

cleveref, list of figures/tables and multiple languages in titlepage

There seems to be a bug in a combination of referencing another figure or table using cleveref in a figure/table caption, using multiple languages in \maketitle and the list of tables or figures. I ...
user avatar
  • 71
0 votes
0 answers
20 views

How do I make \cref used in section titles work in headings?

I have a section whose title is "Proof of theorem 1" which I get by typing \section{Proof of \cref{myTheorem}} which works fine in the section title itself, however where the section title ...
user avatar
0 votes
0 answers
14 views

SIAM template breaks algorithm line references

I'm making a SIAM submission, and after applying the template the algorithm line references simply refer to the algorithm itself, instead of the specific line. Oddly, according to the template manual, ...
user avatar
  • 199
0 votes
0 answers
32 views

cleveref is not using right language selected using polyglossia

Problem using polyglossia and cleveref (vanilla install). It is not using the main/selected language. Example document: \documentclass{article} \usepackage{polyglossia} \setmainlanguage[variant=...
user avatar
  • 666
7 votes
1 answer
151 views

Referring to two or many corollaries in LateX

I am using \thref{cor1, cor2} to cite two corollaries, and it provides instead of Corollaries 3.3.9 and 3.3.10. (It gives "Corollarys" as the plural of Corrolary). If I have the following ...
user avatar
1 vote
1 answer
18 views

Loss of nameref when changing documentclass

The following MWE compiles fine \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{theorems} \usepackage{hyperref} \usepackage{cleveref} \newtcbtheorem{thm}{Theorem}{#1}{thm} \begin{...
user avatar
  • 3,651
0 votes
0 answers
58 views

How to format ref name for section with cleverref?

Say I have a section 1.11 and I want to format its ref name as: Chapter 1 Section 11. I have tried the following: \creflabelformat{section}{#2 Chapter #1 #3}% and it yields Chapter 1.11. What should ...
user avatar
0 votes
1 answer
28 views

How to make hyperlink to solution in theorem/problem name cover the counter

After Ulrike Fischer helped me out at this thread, I just had one troubling aspect remaining while getting the formatting together for some textbooks that I have written. I was thinking of ignoring it,...
user avatar
  • 101
0 votes
0 answers
32 views

Reference subequations without parentheses with cleveref

Is there a possibility to reference subequations with cleveref without parentheses? MWE: \documentclass{scrartcl} \usepackage{amsmath} \usepackage{cleveref} %\crefformat{subequations}{eq.~#2#1#3}% ...
user avatar
  • 455
5 votes
1 answer
40 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 ...
user avatar
  • 381
1 vote
1 answer
25 views

Cleveref and Algorithm2e: typesetting procedure name

I am making use of the procedure environment of algorithm2e, but I am unable to get it to work with cleveref. I would like to have a different reference for procedures and algorithms, but they seem to ...
user avatar
0 votes
0 answers
38 views

Making hyperref, cleveref, and answers work together

I am using the following packages in a math textbook that I am writing: The answers package to be able to put solutions to problems at the end of the book The hyperref package to be able to link ...
user avatar
  • 101
1 vote
0 answers
29 views

How to create a cross-reference to a section in the appendix? [duplicate]

I want to cross-reference an appendix in my LaTeX document. The appendix is defined as follows: \usepackage{cleveref} \appendix \section{title1} \label{label1} \section{title2} \label{label2} How to ...
user avatar
  • 33
1 vote
1 answer
50 views

cleveref not supporting a language

I want a document where you can select between two languages and use cleveref. However, cleveref does not support the second language nynorsk. I still want to be able to use the english version, so I ...
user avatar
  • 1,042
2 votes
0 answers
34 views

Conflict with hyperref's draft option, cleveref's \cref and... \textbf in \caption

The following MCE compiles like a charm. \documentclass{article} \usepackage{hyperref} \usepackage{cleveref} \hypersetup{draft} \begin{document} \begin{figure} \caption{% foo% % \textbf{...
user avatar
1 vote
1 answer
30 views

\crefname with multiple language definitions

I am making a LaTeX template with 2 languages, and use \selectlanguage{english} to set the document language after \begin{document}. This works fine for the cleveref package, except that I have made a ...
user avatar
  • 1,042
0 votes
0 answers
26 views

Named Equations with cleveref

I have a strange problem, where using a tag with an equation creates a warning (that obviously later leads to some unwanted behavior, though not in the context of this question) I use to import two ...
user avatar
  • 367
1 vote
1 answer
104 views

Skipping non-numeric part of counter label in local Cross-referencing

When quoting linguistic examples from authors inside a quotation, I like to use a special label specifying the name of the author. (I enclose it between square brackets but it will not appear here ...
user avatar
0 votes
0 answers
15 views

How to access algorithm caption and procedure name

I would like to be able to access an algorithm's caption and procedure name in a similar way I can reference the algorithm number; i.e. using something like \ref{somelabel}. Is there a straightforward ...
user avatar
  • 141
2 votes
1 answer
20 views

Autonum wrong behaviour

I get the wrong behaviour with this code, using autonum. When one clicks on the hyperlink to the equation it jumps to the beginning of the page. Minimal (not) working example: \documentclass{book} \...
user avatar
1 vote
1 answer
74 views

Hyperlink prints OK but jumps to wrong target

When I use pdflatex to process a book-length document, in chapter 6 a couple of isolated links to theorem-like environments in that same chapter appear printed correctly in the pdf output, but ...
user avatar
  • 6,661
0 votes
1 answer
88 views

Non-ascii characters in label with cleveref in Overleaf

I'm collaboratively working in a LaTeX document in Overleaf and some team members use German umlauts (ä, ö, ü, Ä, Ö, Ü) in their labels. It works with \ref: \documentclass{scrartcl} \usepackage[utf8]{...
user avatar
  • 103
0 votes
0 answers
30 views

Best practices for class authors: configurable names / translations

How should I suggest document authors rename elements that my class provides, either because they're not writing in English, or because they need to change a word or two? Here are three tools, each ...
user avatar
0 votes
2 answers
54 views

Incorrect label type using threeparttable and cleveref

I'm having an issue with the threeparttable package label type, causing cleverref to not be able to refer correctly to the table. Compiling on Overleaf produces the following warning: "cref ...
user avatar
0 votes
1 answer
69 views

MPDI article with cleveref

I need to write an article using the MDPI template. The latest version of this template is available on Overleaf or directly on MDPI website. This template is said to be compatible with cleveref ...
user avatar
  • 890
2 votes
1 answer
115 views

Adding `UsedOn` option to cleveref's \cref to mimic hyperref's \backcite

I am trying to overload \label and \cref, so that the following happens (similar in spirit to backref's \backcite): In some preliminary chapter, I define in Theorem A a label \label{thm:A}. Later in ...
user avatar
0 votes
1 answer
119 views

Using cleveref with mdpi template

I would like to use the \cref command provided by the cleveref package in a project using the MDPI template. However, I can't seem to do so without getting an error. Because I'm working from the ...
user avatar
  • 3,225
1 vote
1 answer
52 views

cleveref conflicts with polyglossia when required in a class

When I run the following MWE (with xelatex): % File myclass.cls \NeedsTeXFormat{LaTeX2e} \ProvidesClass{myclass} \LoadClass[12pt]{article} \RequirePackage{polyglossia} \RequirePackage{cleveref} % ...
user avatar
1 vote
1 answer
43 views

Custom counter for cross-referencing is incorrect when used inside tabularray

I would like share with something. I have created a custom counter to cross-reference sub figures. For some reason, the counter is wrong if I use it inside tblr environment (the one defined in ...
user avatar
  • 1,577
3 votes
2 answers
117 views

Cleveref and caption-based command - wrong references

I am trying to create a caption command that highlights the first sentence and also uses the first sentence as a short caption for the table of *. Let's call it kaption. This is done using the ...
user avatar
  • 253
0 votes
2 answers
205 views

How to adapt \crefrangelabelformat to subexample formatting?

I would like to be able to redefine something which is supposed to be defined in the preamble. In this example and in relation to this question : Cross-referencing: more sublevels, and presets, I want ...
user avatar
4 votes
0 answers
223 views

Cross-referencing: more sublevels, and presets

I'm typing a lot of linguistic examples and I would like label formatting to gain flexibility, i.e. setting up presets would be great. That is, I'd like to be able to have ready-to-use setups ...
user avatar
0 votes
1 answer
46 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, ...
user avatar
0 votes
1 answer
29 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[...
user avatar
  • 11
1 vote
1 answer
15 views

Repeat argument of macro for cleveref referencing (forcsvlist?)

This is a follow up question on How to customize enumerate list with resuming numbering on second level using customize item command?. Now I am wondering how I can reference to the entries of my ...
user avatar
1 vote
1 answer
73 views

LaTeX Warnings: `' multiply defined and `@cref' multiply defined

By compiling a LaTeX file, I get the following messages: `' multiply defined And `@cref' multiply defined What could be generating this and how to fix it? Here is (a sample of) my code: \...
user avatar
0 votes
2 answers
62 views

Why doesn't cleveref work in Portuguese?

I'm using cleveref in a document in Portuguese, but the reference of the chapter is in English? How I can fix this? Here it is a sample of my code: \documentclass[portuges]{report} \usepackage[...
user avatar
0 votes
0 answers
37 views

Bold, color, and hypertext links in tcolorbox

I'm trying to cross-reference theorems in colorbox style at once. My goal is to get the following: \documentclass{article} \usepackage{xcolor} \usepackage[many]{tcolorbox} \newtcolorbox[auto counter,...
user avatar
  • 1
1 vote
0 answers
41 views

math tools and cleveref gives no equation number

Using the following \documentclass{scrartcl} \usepackage{amsmath} \usepackage[tbtags]{mathtools} \mathtoolsset{% showonlyrefs = true ,showmanualtags = true } \usepackage{varioref} \...
user avatar
  • 617
3 votes
1 answer
86 views

Cleveref/hyperref: incorrect link to step in algorithm

I am using the cleveref and hyperref packages. This works well overall, but cross-references to lines in algorithms are incorrect. I found some other related posts, this one and this one. However, ...
user avatar
  • 303
0 votes
1 answer
184 views

Advanced Cross-Referencing with Linguex/Philex: Skipping and Stripping

\documentclass{report} \usepackage{philex} % Includes linguex. Only loading it for \phildashes. \usepackage{cleveref} % Referring to Subexample Ranges \crefname{ExNo}{}{} \crefname{SubExNo}{}{} \...
user avatar
2 votes
3 answers
204 views

Refer to a range of subsubexamples

I use Cleveref to refer to subexamples such as "2a–c". Now I want to use crefrange to refer to 1ai–ii as well. \documentclass[a4paper,12pt]{report} \usepackage{philex} \usepackage{cleveref} ...
user avatar
1 vote
1 answer
34 views

Is it possible to use a place holder as the counter name in \crefname?

When \cref a theorem, in order to show the referencing name corresponding to the original appearance in its context (i.e., if you write a theorem in English context, and later refer to it in French ...
user avatar
  • 6,566
2 votes
0 answers
30 views

Reference a theorem with its name "as is" using cleveref (in searching of a new way of implementing of the "originalref " mode in ProjLib)

When writing multi-language documents, if a theorem title has different name corresponding to different languages, then there are two ways to refer to them: Using the original name as it appeared. ...
user avatar
  • 6,566

1
2 3 4 5
17