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

89
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 ...
62
votes
3answers
4k 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, ...
61
votes
3answers
18k 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 ...
44
votes
4answers
1k 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 ...
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 ...
42
votes
7answers
7k 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, ...
35
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 ...
34
votes
1answer
2k 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 ...
32
votes
3answers
730 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 ...
31
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 ...
30
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 ...
28
votes
2answers
12k 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 ...
27
votes
6answers
18k 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.
27
votes
2answers
998 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} ...
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 ...
25
votes
5answers
2k 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
1answer
20k 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 ...
25
votes
1answer
7k 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.
24
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. ...
24
votes
1answer
902 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 ...
23
votes
3answers
23k 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?
22
votes
2answers
2k 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 ...
22
votes
1answer
538 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
266 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
3answers
2k 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 ...
21
votes
2answers
4k 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.
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
2answers
7k 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} ...
19
votes
3answers
11k 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 ...
19
votes
4answers
10k 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 ...
19
votes
1answer
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
615 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
354 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
3answers
392 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
2answers
361 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 ...
18
votes
2answers
398 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 ...
18
votes
3answers
4k 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?
18
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. ...
18
votes
1answer
1k 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
659 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
2k 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
3answers
732 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
352 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 ...
17
votes
3answers
637 views

Is there any difference between nesting \label in \caption and putting \label outside \caption?

Is there any difference in behavior between the following coding styles? Coding style A: \caption does not enclose \label. \begin{figure} \includegraphics{cat.eps} \caption{This is a cat.} ...
17
votes
2answers
719 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} ...
17
votes
1answer
140 views

Floats shortly after they have been \ref-erenced; Warn otherwise

In my thesis I have a many floating figures which I then reference using \ref. I use flafter to ensure that they do not appear before they are defined in the source code (See Force floats to be ...
17
votes
2answers
659 views

How do I discard a portion of an equation number when cross-referencing?

I am writing a LaTeX document in which I number equations within sections. Thus, in my preamble I have \makeatletter \@addtoreset {equation}{section} ...
17
votes
2answers
525 views

Graph of dependencies from LaTeX file

This is inspired by the MO question here. Suppose I'm writing a math paper, with theorem and proofs, etc. At the end of writing, I want to design a graph of dependencies, that is, a graph containing ...
16
votes
2answers
448 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 ...