{cross-referencing} is about making connections from a point in a document to related information elsewhere, usually within the same document. Standard commands are \label and \ref. For questions about citing or bibliographies, use {bibliographies} instead.

learn more… | top users | synonyms (1)

13
votes
1answer
22k views

Article appendix with sections and toc entries in the form “Appendix A”

I have been trying to get the appendix for my thesis done. I've read a lot about it and as always you can chose between a fiddly way and a magic package that doas the job to solve a problem (I usually ...
11
votes
1answer
5k views

Labeling a Footnotemark

Is there a way to label a \footnotemark instance (without redefining the \footnotemark macro)? Labeling the \footnotemark has no effect (it labels whatever environment the command is invoked from) and ...
11
votes
8answers
15k views

Chapter ref with LaTeX

In LaTeX, we can say something like: "See equation \ref{eq} on page \pageref{eq}..." Is there any way to do: "See equation \ref{eq} in chapter \chapterref{eq}..."
10
votes
2answers
2k views

In align environment, how can you label some (but not all) of the equations?

I know that the align environment labels all the lines, while the align* environment labels none of the lines. Is there a way to have the align environment label only some of the lines? For example, ...
7
votes
1answer
103 views

How to force a label to be a given string?

Normally I issue a command like \label{foo}, and this means that foo gets entered into a symbol table somewhere that says that it equals 14, or xiv, or aa, or whatever. These symbols are generated and ...
7
votes
1answer
583 views

Variable chapter references

I'm looking to typeset certain references à la varioref thus so: if I reference chapter 3 from within chapter 2, I'd like the output to look like "...in the next chapter---" rather than "...in chapter ...
6
votes
1answer
453 views

For child entries with crossrefs, how can I instruct biblatex to output only a reference to the parent entry in the bibliography?

When producing a bibliography using biblatex and the alphabetic style, I would like to produce actual cross-references between two crossref-entries. For example, if I have several @inproceedings ...
5
votes
1answer
1k views

cleveref fails to reference algorithms

In the following example document, both \autoref and plain ref will correctly link and number an algorithm reference, but cleveref fails that task. It will just insert question marks instead. In ...
2
votes
1answer
251 views

Backreferences for equations

I'd like to put a list of pages, hyperlinked to the position of the \eqref or \cref that point to it in the margin of each \labeled equation, like backref does for bibliographies and \cite. Both this ...
13
votes
5answers
2k views

Not using abbreviations with cleveref

I’d like to use the cleveref package but I don’t like that it inserts most names as abbreviations; for instance, it will print “… fig. 2.1 …” instead of “… figure 2.1 …”. Is there a way of changing ...
12
votes
2answers
155 views

Reference the bibliography as a whole

I am using biblatex for my bibliography, and it's working fine: \printbibliography[title={Sources}] Everything works as expected. What I'd like to do, though, is something like See sources on ...
12
votes
2answers
436 views

How to create *local* labels/refs in LaTeX?

Concise question: Is there any way to limit the scope in which a \label is visible to a \ref? Motivation: My current goal is to create a rather large document, containing many exercises and their ...
12
votes
2answers
341 views

How can I print only Author-Date of the parent crossref in the bibliography entry of the child of the crossref?

I have an @article entry, which crossrefs a @periodical entry. I cite both of them. In my bibliography, I would like the article to refer to the periodical in the form of the citation, but i only get ...
10
votes
1answer
2k views

Referencing subequations with cleveref

I try to refer to the parent number of subequations with \cref from the cleveref package. However, I would like to change the output "eq. (...)" into "eqs. (...)" when I refer to parent numbers ...
6
votes
1answer
62 views

modifying pagenumbers in crossreferences

I need to typeset crossreferences to pages, using \pageref, with wherever possible no more than two digits. For example: pp. 1-23 pp. 101-23 %(for 101-123) pp. 101-105 %(not 101-05, because the ...
6
votes
1answer
456 views

Having trouble cross-referencing figures

I'm having a bit of trouble trying to reference figures in my latex document. Here is my latex code: \documentclass[12pt]{article} \begin{document} \begin{figure} Here is a figure ...
5
votes
1answer
942 views

How to make cross-referencing with shorthands?

Could somebody help me to make shorthands when I cite entries Inproceedings with Proceedings as crossref? I use this code: \documentclass[a4paper]{article} \usepackage[T1]{fontenc} ...
4
votes
2answers
965 views

A question about customizing ref in enumitem package

I'm experimenting with enumitem version 3.4 (released Aug 2011) a little but facing a problem in customizing the ref. What I'm trying to reach is simple: Have list label in the form 1.1.3. for ...
2
votes
1answer
788 views

Referencing externalized pgfplots with subfig and cleverref

I use pgfplots to produce a vast amount of images in my document. Due to limited LaTeX memory, I am forced to use \tikzexternalize. Moreover, I also use the subfig package to group several pictures ...
1
vote
1answer
206 views

Alternative numbering for theorem

I am using thmtools as a front end to amsthm and I have a definition environment as follows. \declaretheorem[ style=mydefinitionstyle, name=Definition, numberwithin=chapter ]{definition} ...
15
votes
1answer
486 views

How to diagnose a permanent “Label(s) may have changed” warning?

I'm getting the following warning: LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. The problem is, it doesn't go away after rerunning (any number of times). The ...
15
votes
1answer
837 views

Why does the compiler keeps telling me (forever) to rerun because labels have changed?

I have a LaTeX paper (multifile setup, using \input{} statements) that , since a few days ago, keeps telling me at each compile (both with pdflatex or latex): LaTeX Warning: Label(s) may have ...
14
votes
3answers
759 views

Cleveref and named theorems

Is it possible with Cleverref to reference not only the number of an environment but the "name" (the thing that is passed to it in square brackets? In the following example I want to replace the line ...
14
votes
2answers
2k views

Multiply-defined labels warnings with frame labels in Beamer with againframe

This question is pretty much identical to this (to the best of my knowledge) unanswered question from comp.text.tex, which, at the moment, is the top Google hit for this problem: when specifying frame ...
13
votes
2answers
258 views

How to refer to a chapter with a word

I would like to refer to my chapters with the notation "First Chapter", "Second Chapter" etc, rather than "Chapter 1", "Chapter 2", etc. How can I do this? \documentclass{scrreprt} ...
11
votes
2answers
441 views

using \nameref only if there is a name

I am referencing some sections (actually those will be custom defined in the end) by number, type and name. But it happens that there is no name. So I want to leave it out. How can I test for that? A ...
11
votes
1answer
644 views

Getting cleveref to mark all of “Lemma 1” as a hyperlink, not just “1”

I recently discovered the very nice cleveref package, and really like. Works much better than autoref (from hyperref) for me. There is only one thing I don't like: If, for example, the \cref command ...
10
votes
1answer
497 views

Label inside a code listing

Does anybody know how to use labels inside a code listing that it looks something similarly like this: I know that it's easier to use the line number but I prefer using some labels.
10
votes
2answers
1k views

How to use nameref to refer to a section without including the output of any commands in the title of that section?

Background (simplified) I'm using the todonotes package to add todonotes to sections in my documents. I have created a macro to add the todonotes to sections such that they appear alongside the ...
10
votes
3answers
1k views

Reference source code line in minted package

Does anybody know a working example, where a source code line is reference in minted? I have not found any help till now how to do this? \begin{minted}[linenos=true]{c++} bla bla bla bla ; ...
8
votes
2answers
3k views

Label one line in a begin align*

I have the following block of TeX: \begin{align*} m_n^+ = \dfrac{1}{n}\sum\limits_{k=N+1}^{n} =& \dfrac{1}{n}\sum\limits_{k=N+1}^{n}\left(a_k-L+L\right) \\ ...
8
votes
1answer
11k views

cannot use \caption under minipage

I am using following code to import two images next to each other. When \caption{} is used, LaTeX gives me error caption outside float. \begin{minipage}{.5\textwidth} \centering ...
8
votes
3answers
983 views

Page number of glossary while using hyperref

I want to reference the glossary in the text. The solution given to this question on this website works for me. But adding \usepackage{hyperref} before \usepackage{glossaries} makes it not work ...
7
votes
3answers
212 views

Replace instances of \cite that have a specific argument

In LaTeX, is there a way to define a macro (or something) to replace every instance of \cite{a_literal_string} with \ref{appendix:a_different_literal_string} without touching instances of \cite ...
7
votes
1answer
706 views

Cross reference formatting options

I have got a quick question; I am writing a document with lots of sections and figures. Cross referencing works fine. So far so good. However, I would prefer when I reference something to have the ...
7
votes
2answers
1k views

Building labels out of counters

There is a simple version to my question, and a complex version. First, the simple version: I want to generate label names by combining a constant string with a counter's value, something like what is ...
6
votes
1answer
125 views

How to create two series of the style of equation number in the same document?

I need two styles in my document: one for most equations, using the default style of equation-number; the other one for the left ones whose amount will not be lager than 10, using a new style (shown ...
6
votes
1answer
226 views

How to get the current chapter* name, section* name, subsection* name, etc?

I came across this answer which claims that it works even with the starred version of \chapter et al. The following example shows that it does not, because \...mark macros are not called. Is there a ...
6
votes
3answers
253 views

Referring to a whole line of code instead of a line number

This code fits quite nicely my needs: \documentclass{article} \usepackage{xcolor} \usepackage{listings} \usepackage{lipsum} \usepackage{hyperref} \usepackage{lstlinebgrd} ...
6
votes
1answer
518 views

Incorrect ToC/Index cross-references when resetting memoir class counters

The quasi-MWE below uses the memoir class and works fine. It produces a document with the following structure: ToC Book Part1 Chapter1 Part2 Chapter2 Index Here, cross-references in the ToC and ...
6
votes
1answer
632 views

How to produce a combined index from multiple documents?

I'm creating a set of documents which are contained in different LaTeX source files and are going to be compiled into different PDF files. Each one can have its own index, generated using the usual ...
5
votes
1answer
209 views

Labeling equations or the use of subequations

I am using the tabbing environment for a list of 5 related equations. \begin{tabbing} \hspace{.5cm} \= \hspace{.3cm} \= \hspace{3cm} \= \kill \(\mathbf{\Omega}\) \> \(=\) \> ...
5
votes
2answers
129 views

global relabeling of all figures

Can I global change all figures and references to figures up one starting from figure 10? So figure 10 and all references to 10 become 11 and so on? I should probably add that I have about 30 ...
5
votes
3answers
401 views

Label a complete enumeration

I am trying to create a simple enumeration and give it a label so I can access it. But the only thing I get in return is the number of the subsubsection. This is my code, which doesn't seem to work. ...
5
votes
1answer
1k views

Include aux file in tex source?

I have a large book broken into several chapters, each of which reference each other heavily. I would like to be able to distribute individual chapters as self-contained .tex files. I can do this ...
4
votes
1answer
506 views

custom sub-caption and refs format for subfigures

I've just read questions: Changing the subfigure caption by removing brackets & font of the subcaption Adding parentheses around subfig references How to put two images next to each other with ...
4
votes
2answers
358 views

How to use Nameref with Algorithm2e

As the title suggests, I'm trying to reference to an algorithm created by algorithm2e package. Here is a MWE: \documentclass[12pt,a4paper]{report} \usepackage[linesnumbered]{algorithm2e} ...
4
votes
2answers
2k views

Get a table and figure on the same page with captions & labels

Here's what I'm looking for: I need a table and a figure to stay on the same page, while keeping captions & labels fully functional. Both the table and the figure need their own caption and their ...
4
votes
2answers
2k views

How to get autoref working with different counters for different listing environments?

In my document I want several different custom listing environments. The solution from fraktalek works like a charm, except for one thing: \autoref doesn't work for me. I have tried the following: ...
4
votes
1answer
114 views

Defining a command for linked and indexed section headings?

What is the (preferred way of) defining a command that places a heading (like \section, \chapter, etc.) creates a label for this heading that can be referenced places the heading in the TOC (I ...