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

2
votes
1answer
393 views

Problem when using pdfcomment in figure captions and then referencing

This is possibly a bug in the pdfcomment package, maybe not. I use the \pdfmarkupcomment[]{}{} macro to insert highlighting into the caption of a figure. Then follows a lable. I reference the figure ...
2
votes
1answer
353 views

Figure references doesn't work

I'm writing a document with some figures, each one has one label, and I'm using references. Every figure used appear at the list of figures, but not when referencing from text. When I do that, it ...
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
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 ...
16
votes
2answers
11k views

Custom equations' names

Do you know ho can i call a reference to an equation using \ref or \eqref and obtain (name of the equation) instead of the standard counter? Thanks!
14
votes
1answer
2k views

Is there a standard way to refer to a range of equations?

I have occasionally wanted to refer to a range of equations in my document. So far, I've been using Equations~\eqref{firstEquation}~--~\eqref{lastEquation}, which produces something like "Equations ...
12
votes
5answers
1k views

Which equations should be numbered?

Is the best practice to number all equations, or just those that will be referred to?
7
votes
1answer
218 views

Highlight referenced equation number

I have to give a talk, and I am using a LaTeX paper that I will write onto the blackboard. However, it is quite annoying to write all equation numbers on the blackboard, but I do want to have them all ...
17
votes
3answers
639 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.} ...
15
votes
2answers
258 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 ...
15
votes
2answers
665 views

Testing for current page

Is there a way of testing if a \pageref is the current page? For example, in the next code: \newcommand\figureref[1]{% Figure~\ref{#1} (p.~\pageref{#1}) } I would like to eliminate the ...
11
votes
3answers
6k views

Using section sign (§) for cross-references to sections

In some papers and books you see that author uses §1.3 instead of section 1.3. How § sign can be added before section (or part, chapter, ...) number automatically? Please mention any useful tip about ...
10
votes
2answers
4k views

Autoref's inserted text has not the correct case

I'm using the \autoref tag which comes with the package hyperref for referencing my algorithms, figures etc. I read that it automatically adjusts the reference text's case, but it won't work with my ...
8
votes
1answer
758 views

Use bibliography numbers and citation from other file

This question led to a new package: xcite I want to reference to citations from other file. Similar to what xr package does to labels, but I want to apply it for the bibliography. If I'm able ...
7
votes
1answer
517 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 ...
22
votes
1answer
540 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?
13
votes
1answer
309 views

Is there a software in Ubuntu that can analyse the cross references (theorems, lemmas, equations, etc.) in a tex project?

There are some software to analyse the cross references among codes (Java or C++). I used to use a software for code analysis under Windows many years before. But I can't remember the name. On linux, ...
12
votes
2answers
310 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 ...
11
votes
1answer
16k 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
4answers
1k 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 ...
9
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, ...
9
votes
8answers
11k 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}..."
6
votes
1answer
59 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
300 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
309 views

Cleveref: AUCTeX and RefTeX set-up

How can I set up cleveref to work with AUCTeX and RefTeX? I have tried the advice on Emacs, RefTeX and Cleveref – can they work together? but it didn't work. Additionally, when I hit enter, \ref{} ...
5
votes
1answer
395 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
2answers
1k views

TikZ Document Navigation (\label and \ref commands)

I am currently a university student studying engineering. I have been a user of LaTeX for a few years now and cannot work out how to solve the following issue. In Australia, there are standards which ...
3
votes
1answer
619 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 ...
3
votes
1answer
365 views

Refer to label in another chapter (another file)

I am writing my thesis using LyX's thesis template, and each chapter is a different file (chapter-x.lyx). However, sometimes, I need to refer to a section from another chapter, which is in a ...
2
votes
1answer
187 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 ...
2
votes
1answer
702 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 ...
15
votes
1answer
462 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 ...
13
votes
2answers
245 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} ...
10
votes
2answers
370 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 ...
10
votes
1answer
470 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 ; ...
8
votes
1answer
440 views

\eqref to give reference to a sequence of subequations

Suppose I have the following code \begin{subequations} \begin{align} a+b = c \label{eq.1}\\ d+e = f \label{eq.2} \end{align} \end{subequations} I want now that upon giving the reference, it ...
8
votes
3answers
831 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
394 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
3answers
2k views

How to use the command \autoref to implement the same effect when use the command \eqref?

For example, the first equation of Section 1 in a tex file is numbered in the form (1.1), When we use the commands \autoref and \eqref for referring it, the compiled pdf file will show Equation 1.1 ...
7
votes
2answers
4k views

Table numbering mismatch in caption and in text

I have created 2 tables in my LaTeX document \begin{table}[hb] \centering \begin{tabular}{|c|c|r|} \hline ... not important... \end{tabular} \label{tab:2} \caption{Določanje prioritet mojstrov ...
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
151 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
196 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} ...
5
votes
1answer
140 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
120 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
1answer
453 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 ...
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
296 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 ...