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

5
votes
1answer
480 views

beamer: using \note<> and frame labels together creates multiply-defined labels

This question is very similar to this one. However, since the solution provided there cannot solve my problem, I figured that I'd post my specific problem. Here is a minimal example to illustrate ...
5
votes
1answer
382 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
864 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} ...
3
votes
1answer
900 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
750 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
180 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
660 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
584 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 ...
13
votes
2answers
252 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
406 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
550 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
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
393 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.
8
votes
2answers
2k 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
3answers
913 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
1answer
544 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
113 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
190 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
233 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
494 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
582 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
177 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
128 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
366 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
407 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
306 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
1k 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
111 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 ...
3
votes
1answer
68 views

Avoiding multiple label-refs in simply-formatted documents

I want to build a file with a number of math problems and solutions, like: Problems ... ... ... Solutions ... ... ... I want to link back and forth ...
3
votes
2answers
196 views

Number equations within array

I want to number sub-items of an array I have in order to refer to the right equation and not to the set of equations (SEE the pictures attached): Figure that should call 1.35a, 1.35b, 135.c, 1.36a, ...
3
votes
1answer
775 views

Problem with algorithm(ic) and hyperref

The following code works ... fine! \documentclass{book} % \usepackage{subfig} % \usepackage{subcaption} \usepackage[colorlinks]{hyperref} \usepackage{algorithm} \usepackage[noend]{algorithmic} ...
3
votes
1answer
289 views

convert outcome of reference to regular number

Is it possible to transform the outcome of a reference (e.g., a line number) to a regular number that I can use in a calculation? I have this (and works fine): \FPeval{\result}{clip(5+6)} $\result$ ...
3
votes
1answer
613 views

Two table counters and hyperref links

I have a document with two sets of tables. The first set, numbered 1 to 5, are in the main body of the text. The second, numbered 1 to 3, are in an appendix. When I use \ref to link to one of the ...
3
votes
1answer
337 views

State where within the book a reference was cited

I am using a plain sort in my thesis. However, ordering the authors by last name does not help the reader find where the author/reference was cited within the book. Using the unsrt option would not ...
3
votes
2answers
2k views

How can I use \footnotemark with a \ref argument?

I want to refer to an existing footnote and I'm not happy with the workaround given here: http://anthony.liekens.net/index.php/LaTeX/MultipleFootnoteReferences I found that I can put a \label inside ...
2
votes
2answers
74 views

Referencing Definition by Name and Optional Argument

I have the following MWE: \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \newtheorem*{definition}{Definition} \begin{document} \section{Section Definitions} ...
2
votes
1answer
5k views

Reference to a manually numbered equation

I want my equation's number to be "1'". I have done so through \tag{1'}. But now I don't know how to refer it in my document. Is there a method to call it or numbering equations like 1, 1', 1''?
2
votes
1answer
1k views

htlatex leaves undefined reference (“??” link) but pdflatex produces correct output

We have a large document that runs through pdflatex and through htlatex. The pdflatex output is fully ok. The htlatex output is also ok (it contains all images etc.) except that for some ...
0
votes
2answers
857 views

Cross-referencing an equation

So far I've always used non-labeled alignments with align*, but I think it's time for a small change. How do I refer to an alignment after creating it? I tried searching similar topics but I didn't ...
13
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 ...
12
votes
2answers
181 views

Input manually a number into \eqref

Often while writing papers I find the need to cite particular equations from other papers. For example, the landmark paper by Einstein, Newton, and White (2015) lays out the theory of everything in ...
11
votes
3answers
627 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?
10
votes
2answers
769 views

Non-English identifiers in \label / \ref (“Missing \endcsname inserted”)

I found that LaTeX chokes on certain non-ASCII identifiers in \ref. This works fine: \documentclass{scrartcl} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
10
votes
2answers
985 views

Redefining enumerate counters in beamer

I'd like to do two things with the enumerate environment in beamer. I'd like to reformat it so that it shows up as (1) An item a. A subitem b. Another subitem I'd like to be able to refer to ...
9
votes
1answer
515 views

Reference Code snippet in latex using minted

I'm not really sure how to reference a code snippet in my text. I need also a caption for the code. The only working way I found is wrapping the minted in a figure. The problem is that I want to ...
9
votes
3answers
3k views

Defining custom labels

Is it possible to define a directive which creates a custom label which I can later reference on multiple locations with \ref{...}? For example: ... \createlabel{l-foo}{22} ... % later in document: ...