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

15
votes
2answers
288 views

Creating a “\label” that, if necessary, spans over several pages

What I want to do is the following: I want to refer to an earlier block of text. I could do this by using the \label and the \ref commands like so: \label{x} Lorem ipsum dolor sit amet, consectetur ...
13
votes
1answer
23k 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
16k 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
107 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
600 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
469 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
254 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
1answer
4k views

Change format of reference to a subfigure

In my current document, I'm working with many subfigures. Normally, I like to refer to them using a style like Figure 1 b) where the space should be a halfspace, hence \, in the code. That's nice not ...
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
451 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
345 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
475 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
82 views

Hide content to show later

My question appeared about this egreg's answer: http://tex.stackexchange.com/a/210564/15256 I have a list of exercise-answers but I don't want to show the answers immediately but after till I'll pull ...
5
votes
1answer
961 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
996 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
80 views

Multiple Altconditions within LaTeX Document

The question refers to this solution and trying to modify the code to support multiple altconditions in my document. The problem is to allow two sets of alternative conditions within the same ...
2
votes
1answer
798 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
210 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
601 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
900 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
797 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
261 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} ...
12
votes
3answers
665 views

Label in caption

For certain styles it appears that the \label statement must be included in \caption to preserve good referencing. Why is that?
11
votes
2answers
457 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
666 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
517 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 ; ...
9
votes
1answer
1k views

Refer to customized `enumerate` counter

Background I'm typesetting a list of conditions for a certain mathematical object. There are three conditions. Later on I wish to provide an equivalent condition for the third. Therefore, it would be ...
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
881 views

Text following subequations is slightly indented if a label is used

The following minimal code causes a small indentation at the beginning of the line of text, smaller than the usual indentation at the start of a paragraph. It disappears if the label in subequations ...
8
votes
3answers
999 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
214 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
745 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
4answers
65 views

Cross-reference two numbered environments

Consider the following code: \documentclass[a4paper,12pt]{book} \usepackage{amsthm} \usepackage{hyperref} \theoremstyle{plain} \newtheorem{exercise}{Exercise} \newtheorem{solution}{Solution} ...
6
votes
1answer
131 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
229 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
255 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
522 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
652 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
218 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}\) \> \(=\) \> ...