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

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 ...
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, ...
66
votes
3answers
22k 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 ...
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 ...
44
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 ...
42
votes
8answers
9k 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, ...
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 ...
36
votes
6answers
26k 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.
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 ...
34
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 ...
33
votes
2answers
15k 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 ...
32
votes
3answers
826 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 ...
32
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 ...
30
votes
2answers
2k 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} ...
30
votes
1answer
10k 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.
29
votes
3answers
28k 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?
28
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 ...
28
votes
1answer
24k views

\ref Chapter Name in LaTeX [duplicate]

Possible Duplicate: Get the title instead of number of a referenced chapter? Is it possible to use \ref{chap:conclusion} to refer to the actual name of the chapter instead of the chapter ...
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 ...
25
votes
3answers
3k views

What is the difference in citing/referencing with or without tilde?

I've seen examples referencing a table as follows: Table~\ref{table:overview} shows an overview of all the elements. What is the use of the tilde in front of \ref or \cite and when do you have to ...
25
votes
1answer
1k views

Impact of hyperref, when varioref and cleveref are used

I think I may have found a bug in either hyperref, cleverefoder varioref but can't determine the details any further. If do not load hyperref in the following example, the result is fine. ...
25
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 ...
24
votes
1answer
969 views

Relative chapter references

(A follow-up of sorts on Variable chapter references, as per @werner 's suggestion) This is somewhere in between a request for comments and an actual question (as well as a summary of my experiences ...
22
votes
3answers
13k views

Warning: There were multiply-defined labels

I got a "LaTeX Warning: There were multiply-defined labels", and I know what it means but my document is pretty big and it has various files. So, how can I find the multiply-defined label? I am ...
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.
22
votes
4answers
12k views

A better way to reference theorem-like environments?

I know how to use \label and \ref to get a reference to a result(or whatever else really) that I have made previously in the document. But this is tedious and requires me to create a label name every ...
22
votes
1answer
4k views

Cross-Reference with custom text

Is there a way to make a cross reference to a label of a header with custom text, in sense it's text should differ from the Header text, or it's number or Page (not like the predefined formats in ...
22
votes
1answer
675 views

What are the valid names as labels?

What are the valid characters to use in labels? I thought that only alphabetic characters were valid, but I tested ' and ! and they work. What are the restrictions to these names?
22
votes
1answer
282 views

Where will a theorem be used?

I have once seen a book (Graph Theory by Reinhard Diestel) where the author flags his theorems by adding on the left/right of the page the reference number of later theorems where said theorem will be ...
21
votes
4answers
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?
21
votes
2answers
9k views

How to reference \paragraph?

It is well-known that \section environment may be assigned a label \label{refname} and then the refname may be used in order to reference this section: \section{My nice section} ...
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 ...
21
votes
1answer
2k views

Selectively turn off hyperref links

I'm writing a document which includes a list of URLs that I want to be clickable, so I'm using hyperref to achieve this. This has the awkward side effect that my equation numbers, some of which I ...
20
votes
4answers
3k 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 ...
20
votes
2answers
329 views

Show graph of references inside a document

I have quite a lot of labels and references (around 250 labels, 600 references to those) in my document. As I need to re-arrange parts of the document, I'd like to know which labels are referenced ...
19
votes
2answers
544 views

How to reference the page of a figure?

Is it possible to make a reference to the page where a figure is rendered? I would like to write something like see figure~\ref{figure-xyz} on page NN where NN will automatically be maintained by ...
19
votes
2answers
418 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 ...
19
votes
1answer
2k views

How to reference ranges rather than separate numbers?

I would like to do the following: Just type something like ... we describe this in sections \mycoolref{winter,spring,summer,fall} ... and it will be typeset as something like ... we describe ...
19
votes
5answers
6k views

How does one set custom labels for description lists?

Every now and then I use the description list environment \begin{description} \item[foo] foo is good \item[bar] bar is bad \end{description} to create lists with non-numerical labels. ...
19
votes
2answers
2k views

Multiple references with \autoref

I am currently using the \autoref command from the hyperref package to refer to my theorems etc. However, I want to be able to (easily) refer to two or more theorems/lemmas/..., e.g. by calling ...
18
votes
4answers
652 views

How exactly does \def\p@figure{Figure~} work?

I took this line from my thesis style and added it into my document (preceded by \makeatletter) and what it does that whenever I used \ref{figureid} instead of putting just the figure number, it puts ...
18
votes
3answers
364 views

How to display the same text in various parts of the document?

In a long, long, long writing. I have a piece of text that repeats in several places/sections/chapters. When I'm editing, I change 2 or 3 words in that piece of text. The changes have to be applied to ...
18
votes
4answers
6k views

Get current “section” name without label

Update: I accepted the solution provided by Heiko Oberdiek, because that was doing exactly what I asked. When interested only in the chapter name, egreg's solution works fine. However, to get it ...
18
votes
3answers
507 views

Stable alternative to \thepage

As I read and found out the command \thepage doesn't always output the correct page number. The proposed alternative is to use \pageref{here}\label{here}. But this seems too unhandy, because I have ...
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 ...
18
votes
4answers
712 views

Inserting/Numbering/Labelling/Referencing several times the same equation written in various form

I'm looking for an automatic way in LaTeX to number a same equation that would be inserted several times (under different forms for instance). The output would look something like: some text x-y=0 ...
17
votes
2answers
4k views

\ref should use enumerate label name

I have done this: \begin{enumerate} \renewcommand{\labelenumi}{\textbf{S.\theenumi}} \item a \item \label{l} b \item c. goto \ref{l} \end{enumerate} The \ref just uses the enumerate number. But I ...
17
votes
2answers
501 views

Automatically numbering constants

I would like to somehow use LaTeX to automatically number constants. Some background As a mathematician, in my daily work there are a lot of throw-away constants which are not extremely important ...
17
votes
3answers
885 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 ...
17
votes
2answers
378 views

Is there a way to force LaTeX to issue a warning if a figure is never referenced? [duplicate]

Possible Duplicate: How can I get LaTeX to warn about unreferenced figures? In my document I have several figures, most of which I created references for (using \ref{}) immediately after I ...