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

33
votes
2answers
2k views

Why does an environment's label have to appear after the caption?

\documentclass{article} \usepackage{algorithm} \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label ...
63
votes
3answers
21k views

subcaption vs. subfig: Best package for referencing a subfigure

On this question a comment by Martin H says, that one should forget about the subfigure and subfig packages and use subcaption. As subfig replaces subfigure, no argument there. I am currently using ...
29
votes
2answers
1k views

Understanding how references and labels work

I'm trying to understand why I cannot effectively reference figures or equations that I have defined with labels. For example: \begin{figure} \label{fig:area_Treasuries} ...
66
votes
3answers
5k views

Cross-reference packages: which to use, which conflict?

Inspired by my earlier question Theorem packages: which to use, which conflict?, here is another similar question. There are many different packages for making cross references. Among them hyperref, ...
27
votes
5answers
3k views

Does hyperref work between two files?

Can I create a link from one file into another one. So that when the resulting pdf files are in the same directory the link takes me from one to the other? Does another package do that? Added on ...
18
votes
1answer
2k views

Changing the apperance of equation numbers with amsmath

For equations in my document, I use the facilities of the amsmath package. In order to make the equation numbers more eye-catching, I want them to be in boldface and a little bit indented to the ...
17
votes
4answers
2k views

Separate labels in cases

As much as I have tried, it doesn't seem possible to use separate labels when using a casesconstruction (from the amsmath package). Ideally, I would like to be able to write something like ...
33
votes
6answers
23k views

Reference different places to the same footnote

For example, I want to make footnotes both at Sentence 1 and Sentence 2 (which are on the same page) to the same footnote. Wikipedia's "References" have this effect.
23
votes
2answers
3k views

Label and caption without float

I’d like to have an environment that works much like a float, except that it doesn’t float. That is, in fact, I’d like to be able to define an environment that has a label and a caption. I ...
11
votes
1answer
626 views

Where to put the \label on a figure environment? [duplicate]

Possible Duplicate: Why does an environment’s label have to appear after the caption? I noticed that when I put the \label command before the \caption command in a figure environment, I get ...
31
votes
2answers
14k views

Cross-referencing between different files

I want to cross-reference between different .tex files, just because I want to put every chapters separately. Let's say in file chapterI.tex I have \label{a} and I want to access this in file ...
42
votes
8answers
8k views

How do I repeat a theorem number?

Often in my papers I want to mention theorems in the introduction that are introduced in more detail and proved in a later section. I'd like to include the statement of these theorems twice over, ...
32
votes
3answers
782 views

Document requiring infinitely many compiler passes?

It is an unfortunate reality that one must compile a LaTeX file several times in order to get all labels and citations correct. As far as I know, one should go on compiling as long as TeX warns that ...
43
votes
2answers
3k views

How do I number equations only if they are referred to in the text?

I have a paper where all equations are numbered, but I want to number equations only if they are actually referred to in the .tex file using \ref{}. How can I make that happen? Alternatively, how can ...
9
votes
1answer
2k views

Reference to a figure uses the section's number

One of my sections seems to be using the section number rather than the appropriate figure number for \ref's that point to figures. (Theorems and the like work fine.) As far as I can tell, there's ...
26
votes
1answer
9k views

How to make clickable links and cross-references in pdfs produced by LaTeX?

How can I make things link url references, my index, table of contents, and cross references clickable links in documents produced by LaTeX? I generally use pdflatex to produce my documents.
17
votes
3answers
829 views

How to get more complete references

Sometimes when I work I write something like \begin{proposition} \label{my new result} ... \end{proposition} ... blah blah in Proposition \ref{my new result} blah... but then I realize that the ...
39
votes
1answer
2k 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 ...
15
votes
2answers
2k views

Automatically inserting “Section”, “Subsection”, etc

Is there a package that automatically inserts the ToC level of the reference I inserted? Section 1.1 \label{a} Subsection 1.1.1 \label{b} Subsection 1.1.2 \label{c} So that the text: Blah ...
17
votes
2answers
743 views

Usage of table/figures shown in caption

Is there a way to add the usage of a table/reference in the caption of the reference/table in LaTeX? For example: \begin{table} \begin{tabular}{ll} \textbf{Name} & \textbf{Description} ...
19
votes
2answers
390 views

Replace unknown reference (?) with the tag from \ref or \cite

While working on a document, it would be helpful if instead of a ? for unresolved references or citations the tag used in the \ref{thisthings} or \cite{Bloke1978} could appear instead. Is there a ...
11
votes
4answers
6k views

Adding parentheses around subfig references

Say I have a figure with two subfloats inserted using the subfig package. When I reference them with \ref{myLabel} I get this Figure 3.5a and 3.5b. But what I want is this: Figure 3.5(a) ...
10
votes
3answers
623 views

Extended draft mode which includes source information for manual print-out to source synchronisation

I'm looking for a kind of extended draft mode which places the source code position of paragraphs, sectioning commands and figures etc. as marginpars or similar in the PDF, so that they appear on a ...
27
votes
6answers
3k views

How to use \pageref{foo} as a number?

What I want to do is to show a "progress bar" in the header to show how far you are in the document, by making a rule with width pagenumber divided by total pages times the paper width. This is what ...
6
votes
2answers
225 views

Hyperref within hyperref

I'm using the hyperref package in LaTeX. In the compiled PDF, in the table of contents (TOC), I correctly get all the links to the corresponding chapters and sections. There is only one chapter which ...
9
votes
1answer
1k views

Incorrect target of \label link produced by hyperref

In the following code, the command \label{my} appears on page 4, as well \pageref{my} says "4", but the hyperlink points to the page one. Why is that? \documentclass{book} \usepackage{hyperref} ...
26
votes
3answers
26k views

Label equation with a symbol

I would like to label an equation with an arbitrary symbol, rather than a number, or letter. Is this possible?
15
votes
2answers
269 views

Crossreference in Ref Range [(1a-1e) to (1a-e)]

I am just a beginner in LaTeX, I am facing a problem in Ref Range, \documentclass{article} \usepackage{amsmath,amsfonts,amssymb,cleveref} \begin{document} \ref{eq1a,eq1b,eq1c,eq1d,eq1e} ...
15
votes
1answer
928 views

What does the hyperref option hypertexnames do?

The Manual of hyperref states that hypertexnames: use guessable names for links. What does this mean? What are the consequences of using this option?
11
votes
2answers
575 views

Can I re-use section labels across chapters?

I'm formatting a long document with many chapters. Most chapters contain some generic sections (e.g. "Introduction," "Results," ...) and most of them are already labeled accordingly (e.g. ...
8
votes
1answer
2k views

Multiply defined labels using hyperref

I'm using the stackrel command to indicate important steps in the transformation of formulas. E.g. I would write: A\stackrel{(!)}{=}B so that I can later explain in text why exactly A equals B. I've ...
7
votes
1answer
564 views

Cross-referencing in multiple chapters

I have a document organized into several chapters. In each chapter, theorems are numbered by section (1.1, 1.2, ... even in chapter 5). I often would like to refer to theorems in different chapters. ...
93
votes
9answers
5k views

Starting a PhD; Any guides to setting up a 'system'?

I'm starting a PhD and am being overwhelmed with the different possible ways people do things, and how they very rarely mix. I'm (obviously) sold on TeXing it, and have a ViM background I intend on ...
10
votes
1answer
3k views

How to reference another document in latex?

I want to compile sections of the article independently. Clearly, I can make their numbers right just by using something like \setcounter{section}{4}. How can I get something like ...
31
votes
1answer
1k views

Get the title instead of the number of a referenced chapter/section?

In my document I am referencing a section, e.g. \section{My Section}\label{test} Also see section\ref{test} This gives me, e.g. Also see section 1 but what I want is: Also see section My ...
21
votes
2answers
1k views

Referencing to “above” or “below”?

I would like to know if it is good practice, and if so how it can be achieved, to make references like: "as mentioned above...". Or am I going to far and should I just type the word? I've read ...
12
votes
2answers
2k views

referencing labels from other files

Sometimes I want to refer (using \ref) a \label from some other tex file. What is the right way to do it? (It's, of course, possible to \include all files in one and then use \includeonly — but it ...
20
votes
3answers
5k views

how to get the current chapter name, section name, subsection name, etc?

How can one get the current name of the following: Chapter, Section, Subsection(s), frame, label, mdframed?
12
votes
2answers
22k views

How to link an equation in LaTeX

I am wondering how I can link an equation in LaTeX, I mean when I click on the link then I'll be directed to that specific equation.
46
votes
4answers
2k views

What is the advantage of using the notation 'fig:' in the \label {}?

Reading manuals I always find figure labeled as \label{fig:name}. I wonder where is the advantage of using this notation with fig:instead to start with the name it self. If in my document I have only ...
22
votes
2answers
5k views

Why should I put a ~ before \ref or \cite?

My question is in the title of this post, but extends to other referencing commands like \eqref, \citep, \citet (and the like) as well.
8
votes
1answer
1k views

How to organize labels when there are too many equations?

I'm writing a moderately long text using LaTeX, and it's great to be able to organize chapters, sections, appendices, and everything else almost automatically. One thing has been bothering me though. ...
16
votes
1answer
5k views

How to reference equations using letters and numbers

Sometimes it is convenient to refer to a group of equations by a letter and a number. For example: 2+1 (A1) 2+4 (A2) x^4 (B3) x^e (B4) Placing ...
10
votes
1answer
446 views

showonlyrefs and cleveref

This question led to a new package: autonum I know that cleveref is not compatible with showonlyrefs as it says in the cleveref manual. But I have a book-length document that depends on ...
12
votes
4answers
806 views

Printing labels along with equation numbers

Working with documents with huge amount of equations it becomes cumbersome to go back and remind yourself what you labeled a certain equation to (I try to name them in a smart way, but there are too ...
8
votes
1answer
376 views

Get label target type

I'm looking for a solution to my previous question "Relative chapter references", and find myself struggling with trying to get the target "type" of a label from the label itself. Allow me to ...
3
votes
1answer
998 views

pgfplots, custom legend and tikz library external

I try to create Tikz figure with several pgfplots subplots. I want to have one legend for them since they all have the same curves. I found out from this question that i can label and than reference ...
36
votes
1answer
3k views

How can I get LaTeX to warn about unreferenced figures?

When writing documents, I consider it to be necessary that all figures and tables are referenced (\ref) in the text, whether or not I've remembered to \label them. LaTeX does not currently warn if a ...
13
votes
1answer
982 views

How to cross-reference theorems with “Theorem”?

I use \begin{lemma} \label{aaa} ... \end{lemma} \begin{theorem} \label{bbb} ... \end{theorem} and many other similar kinds in the same document. When I cross-reference those lemmas and theorems ...
9
votes
1answer
1k views

Back-referencing in LaTeX [duplicate]

Possible Duplicate: Usage of table/figures shown in caption Is there any way to make back-references, outside bibtex, so that by using something like \backref LaTeX would show where there ...