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

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} ...
18
votes
4answers
648 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 ...
13
votes
3answers
88 views

What to consider when naming labels to prevent errors?

This question is inspired by Umlauts in label and a quote from an answer to How to automatically add \! in subscripts? However the best is to avoid _ in labels. I already name all my labels with ...
9
votes
1answer
2k views

\nameref — How to display section name AND its number

Is it possible to make \nameref display not only the title of the section but also its number? \section{First Section} \label{sec:some_sec} \subsection*{Unnumbered subsection} \label{sec:subsec} ...
9
votes
1answer
141 views

\ref with tight box surrounding the reference

How can I make the colored box around a reference appear completely tight? MWE: \documentclass[a4paper,twoside,openright,final,12pt]{book} \usepackage{etex} \usepackage[english]{babel} ...
8
votes
2answers
287 views

How can one refer to a part of an equation?

When having multiple equations inside one displaymath environment, it is sometimes desirable to refer to just one of them without having to break the environment up into smaller pieces. Take for ...
8
votes
2answers
132 views

Customise counters, cross references to environments

I would like to make cross references to own defined counter on environments. So far I have tried the following, \documentclass{book} \newcounter{entryc}[subsection] ...
8
votes
2answers
266 views

How to refer back to a point in the document with custom counters?

The easiest way to explain what I would like to have is to show the desired output and I would like to get this by writing something like: \begin{document} Draw point B \STEP{drawb}. Connect A and ...
8
votes
1answer
464 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
4k views

Modify \eqref command

I want to edit the \eqref command so that \eqref will produce Eq. (1), for example, instead of (1). Of course, I could define \newcommand{\reff}{Eq.~\eqref} but then I lose my editor's ability to ...
7
votes
1answer
136 views

Modified \overline over first character of complex argument

I've been using zref to handle my references. It has allowed me to customize a reference the way I want through its property lists. In particular, I reference a variety of structures in my document ...
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 ...
6
votes
2answers
553 views

How to create a custom list and \item element?

I would like to create my own list environment with custom \item element, with a custom tag myitem, that takes an optional parameter (the 2,7,6 in my example). It should be a numbered list. I should ...
5
votes
1answer
77 views

Labeling Multiple Equations Per Row of a Table

I am trying to create a table with two columns of independently labelled equations (1-6). Unfortunately, everything I have found so far either has not worked or would number them as sub-equations (1a, ...
5
votes
3answers
265 views

list of occurences of references

I need a list like the list of figures for \ref entries in the text to instances of a custom Theorem environment. Here's a MWE with a handbuilt example. The solution should add features to this code I ...
5
votes
2answers
2k views

Reference table rows by automatic counter

Problem I have defined an environment to automatically number example sentences throughout my document. It uses the tabular environment and automatically numbers the first column of each row using a ...
5
votes
3answers
17k views

How to understand the LaTeX warning “there were undefined references”?

I am running this LaTeX file through pdflatex and getting these warnings: latex warning: there were undefined references. latex warning: label(s) may have changed. Rerun to get cross-reference ...
5
votes
1answer
408 views

subcaption: how to redefine default separator between figure and subfigure number in \ref's?

I am migrating from subfig to subcaption package and wondering how to make the following thing. The subcaption labels in floats should look like a single italic letter in brackets (a), and ...
5
votes
1answer
504 views

Multiply defined label warnings when using Subcaption in a Tikz picture

In an earlier question, I asked how to create zoomed highlights of a larger image automatically. User Jake provided an excellent solution using TikZ. However, when subcaptions and hyperref are added ...
4
votes
1answer
304 views

Remove blank page between Acknowledgements and Table of Contents?

I get a blank page between “Acknowledgement” and “Table of contents”. How can I remove it? I used a template from somewhere. The preamble is as follows: \documentclass[openany,12pt]{ubthesis} ...
4
votes
2answers
3k views

Sub-numbering equations within array

I'm using the array environment to give multiple definitions of some value, let's call it x. I can easily get a reference to all 3 definitions together, but I want each one to have its own reference. ...
4
votes
1answer
2k views

Numbers of figure references

I use enumerating of figures within the section \renewcommand{\thefigure}{\arabic{section}.\arabic{figure}} however, when I use a reference to subfigure, instead of 1.1 (a) I get 1(a). How should I ...
4
votes
1answer
335 views

How to repeat the content of a quote (e.g. introduction+conclusion) without violating DRY

I'm writing the conclusion to a thesis and would like to repeat some the research questions I have formulated in the introduction. I wrapped each of the questions in a quote environment. My question ...
4
votes
1answer
665 views

Referencing a figure, table or citation

I want to refer to any figure, table or citations in my text so that if I click on the reference (or link) it will take me to the actual figure, table or citation. Currently, it is not happening for ...
2
votes
1answer
47 views

tocloft cross-references a section as a subsection

I have document which creates a new list of examples. The list has a label \label{sec:examples} which labels the title of the list, which is rendered as a section. However, cross referencing ...
16
votes
3answers
269 views

Changing the suffix according to the figure number

In Turkish (and possibly in other similar languages), there are suffixes that change corresponding to the word they are applied. This also holds for the numbers. For example, in Figure \ref{fig1} ...
13
votes
2answers
8k views

Multiple subequation labels in one \ref

I'm trying to write a macro that puts subequations' labels in parentheses in a compact form. For example, if I have \begin{subequations} \begin{align} y - ax &= b \label{subeq1}\\ x^2 + ...
12
votes
1answer
502 views

Lost labels using intertext with varioref and hyperref

I have a problem using \intertext together with \vref when hyperref is also used. Consider the following minimal example: \documentclass{article} \usepackage{amsmath, varioref} ...
11
votes
1answer
373 views

\ref, make figure/table reference automatically toggle between “above” or “below”

Is it possible to automatically include a reference to the position of a labeled object (Table, Figure) in text? By this I mean the following: Say I have labeled a figure in chapter 1: ...
10
votes
1answer
336 views

Conflict between amsmath and pdfcomment

I use both amsmath and pdfcomment in one document. This leads to the references produced by (\ref{}) to appear like (zref@1) instead of numbers like (1). Without amsmath or pdfcomment this problem ...
9
votes
3answers
390 views

Extended reference for enumerate item using parent environment

I want to reference an item of an enumerate list by it's normal label, if we are still in that same enumeration and by an parent.item syntax if we are somewhere else in the document. For example: ...
8
votes
2answers
87 views

Can I include the last index inside the label of an enumeration?

Can I achieve something like this with automatic numbering? Examples: 1 of 93: Example one 2 of 93: Example two ... 92 of 93: Example ninety-two 93 of 93: Example ninety-three I can ...
8
votes
1answer
586 views

How to make \hl (highlighting) to automatically place incompatible commands in \mbox?

The soul package provides a useful command \hl for highlighting text. However, \cite, \ref, and some other commands (maybe equations too) must be placed within an \mbox in order for \hl to work ...
8
votes
2answers
384 views

Cross-referencing between files and equation counters

I am using package xr to cross reference between two files. Is there a way to make the equation numbers in one of the files follow the ones in the other? What I mean is, if the last equation in file ...
8
votes
2answers
605 views

Smartly omit chapter number in equation numbering

In my thesis I use chapters, sections and subsection. I like to have my equations numbered with respect to section, but I want the displayed equations numbers not to include the chapter number. ...
8
votes
1answer
100 views

How to avoid the hyperlink on a particular \ref

I use hyperref and I produce the pdf via pdflatex. Everytime I use \ref I get in the pdf a clickable link and I am happy with it... but I would like to disable the hyperlink in the pdf for one ...
8
votes
1answer
825 views

Cleveref with counters with same name

I am trying to use the cleveref package. I have the following counters defined (hopefully this is the right way to do it!) \newtheorem{thm}{Theorem}[section] \newtheorem{lemma}[thm]{Lemma} ...
7
votes
1answer
96 views

Arbitrary named counter, referenced

Apologies if this has been asked before, but I simply can't find it, despite voluminous searching. Some question answer bits of my question, but not the whole. The problem is this. I want a counter ...
7
votes
2answers
881 views

Using the xr package in LyX (for cross-referencing an external LyX document)

Question: What steps are required to use the xr package in LyX in order to reference items in other, independent LyX documents? Steps already taken: The tools package (that contains the xr package) ...
7
votes
1answer
242 views

Reference the line number in which a (new) word occurred for the first time

I would like to cross-reference the line number in which a word occurred for the first time in some texts. For example, a text is given: LESSON I In the traffic court of a large mid-western city, a ...
7
votes
1answer
617 views

Name of current section/figure

I'm looking for a LaTeX command, say \foo, which expands to the type of section I'm in. In the following, the first \foo should expand to "Section", the second to "Subsection", and the third one to ...
7
votes
1answer
524 views

pagenote: Adding a cross-referencing mechanism

This question originates from a bug report at SourceForge.net: biblatex from April 2010. A user pointed out that a certain biblatex style (verbose-inote) produced wrong references when used together ...
6
votes
5answers
309 views

Reference to the Table of Contents page

I thought that someone must have asked this, but my searches didn't find it. I am looking to refer back to the table of contents from places in my document. How can I do this?
6
votes
1answer
659 views

Change caption of figure for references

I changed the caption of my figures running the following command (I'm using the babel package): \addto\captionsngerman{\renewcommand{\figurename}{Abb.}} If I use \autoref{$LABEL} to reference to ...
6
votes
5answers
2k views

Using \label with amsmath nested environments

First of all, I'm not sure these environments are supposed to be nested, but the fact is the alignment comes out exactly how I wanted, and no errors are issued. \documentclass[a5paper]{article} ...
6
votes
5answers
2k views

How to get a list of all the labels in a LaTeX document in WinEdt

I am writing a large document using LaTeX and WinEdt. I have labeled each chapter, section and so on. I would like to print out a list of just the labels (so that I don't duplicate one later on, and ...
5
votes
1answer
198 views

Figure references in tufte-book

With the tufte-book class I cannot get references for figures right. \documentclass{tufte-book} \usepackage{lipsum,blindtext} \usepackage[demo]{graphicx} % Demo option for MWE without image ...
5
votes
3answers
686 views

hyperref bad references

After cleaning up my project and compiling a tex file 10 times in a row: rm temp.toc temp.pdf temp.out temp.html temp.aux xelatex temp.tex # executed 10 times! I still get bad references with ...
5
votes
1answer
710 views

How to \ref to subcaption numbers (a, b) when using memoirs subcaptions?

How can I get references to subcaption numbers when using memoir? In this example: \documentclass{memoir} \newsubfloat{figure} \begin{document} \chapter{Lorem} \section{ipsum} \begin{figure}[b] ...
5
votes
4answers
4k views

Renew \ref command doesn't work

I'm trying renew \ref command to auto detect equation and figure. All my labels of equations start with "eq:" and all labels of figures with "fig:". So I try this way, but it isn't works for me: ...