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

16
votes
2answers
462 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 ...
7
votes
1answer
403 views

Using \ref in a ylabel of a pgfplot

When I use \label and \ref to distinguish two y axes the marks drawn by \ref are no longer on the lines after rotating it together with the rest of the label (see example below). Any ideas? ...
7
votes
1answer
164 views

How can I conditionally include the page number in a cross-reference (when the object referenced is on a different page)?

When a cross-reference to a figure is not on the same page as the figure, I would like to include the page number in the figure. But when they are on the same page, this is redundant--and I want to ...
3
votes
1answer
1k views

cleveref, hyperref and algorithm2e package produce wrong hyperlink (though correct page reference)

I'm using the packages as stated above in their latest version (also oberdiek-package is up-to-date). The following code produces the wrong pdf-link to a float environment (refers to the same page as ...
4
votes
1answer
2k 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 ...
3
votes
1answer
691 views

How to refer to labels in math mode from math mode

If you refer to item labels that are written in math mode from some other math mode occurrence, then you get errors. I guess it's because it leads to nested math modes. Is there any way to avoid these ...
2
votes
1answer
913 views

Auto recognize reference types [duplicate]

Possible Duplicate: How to get more complete references Is there a way to recognize cross-reference types automatically in LaTeX? For example, see the code below ...
20
votes
2answers
9k 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 ...
7
votes
1answer
811 views

How to change \ref output?

I am writing my Greek PhD thesis in latex (using babel). FYI, by default Τable in Greece is called: Πίνακας. So, for example, when I make a table using the table environment, babel automatically ...
88
votes
3answers
10k 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, ...
8
votes
1answer
303 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 ...
2
votes
1answer
328 views

cleveref and marginfigure in memoir

I'm running into a problem when using cleveref to refer to marginfigures in memoir. The following code illustrates the problem (apologies for the somewhat long preamble, but I need the space in the ...
3
votes
1answer
393 views

Naming enumerated lists referencing the names

Currently I have the following TeX \begin{enumerate} \item First idea \item \label{idea:s} Second idea \end{enumerate} \begin{enumerate} \item Point about \ref{idea:s} \end{enumerate} I would like ...
16
votes
2answers
16k 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 + ...
4
votes
1answer
2k views

Reference to an unnumbered section

I am writing a thesis with document class report and I am using hyperref. My structure is the following: \chapter{First chapter} \section{First section} \subsection{First sub section} ...
6
votes
1answer
445 views

How can I reset sectional counters in memoir class to avoid breaking ToC cross-referencing in a complex document?

I have already asked a similar question here: Incorrect ToC/Index cross-references when resetting memoir class counters and received a satisfactory answer. Now, I wish to apply the chapter counter ...
11
votes
1answer
2k views

Referencing subequations with cleveref

I try to refer to the parent number of subequations with \cref from the cleveref package. However, I would like to change the output "eq. (...)" into "eqs. (...)" when I refer to parent numbers ...
6
votes
2answers
125 views

Identifying relative location of label

How can I obtain information about the location of a label relative to other text? Whether the label is on a previous page or the current page (i.e. appears in some previous lines, but on the same ...
9
votes
1answer
9k views

References won't resolve even after repeated compilation

I have the following lines: \begin{figure}[htbp] \label{fig:sampleconfig} \begin{center} \begin{tikzpicture}[level distance=1.5cm, grow=down, every node/.style={minimum ...
2
votes
1answer
2k views

\ref not working with achemso

I'm trying to write a document with the achemso package, but my \ref are not working right. achemso links to a package called cleveref, then renames cleveref's \cref into \ref, so any answers for ...
12
votes
1answer
1k 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 ...
3
votes
1answer
265 views

Using xstring utilities on \ref*{…}

In the following code, I would like to use \StrGobbleLeft{\ref*{#1}}{2} so as to use n instead #n where the last formatting is used to number special footnotes for links. \StrGobbleLeft{\ref*{#1}}{2} ...
2
votes
2answers
418 views

Test equality between number of the current page and the one of one reference indicated

In the following code, I have one problem with the test \ifthenelse{\equal{\pageref{#1}}{\thepage}}{...}{...}. Why doesn't this detect the equality hoped if the reference is in the same page where it ...
89
votes
9answers
61k 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.
8
votes
3answers
35k 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
841 views

hyperlink an \item and \ref

I have a custom environment which is just an enumerate with the \item written for me. I would like the enumeration label to be a hyperlink- in the MWE below, it simply links to a page at the end of ...
11
votes
3answers
4k views

Get reference to “current” section

I'd like to write a command to get a reference to the "current" section provided (the term is all wrong, but the example will clarify). The idea is something along the lines of: ...
5
votes
2answers
439 views

Comparing reference numbers

I'm using the refcount package to get the reference number associated with a label. I'd like to determine whether two references lay "next" to each other or not, that is: I'd like an expandable ...
2
votes
1answer
194 views

Separate labels in cases 2

Is there a cases package that lets me label my cases as I want? The cases and subcases environments of the cases package either labels tags with consecutive numbers or not at all. I would like some ...
7
votes
1answer
850 views

“See also” in index entries

LaTeX's indexing packages makeindex and xindy provide good support for the basic features of an index: runs of pages, nested index sub-entries, and cross-references of the form: Yurmurm-Peffifoss, ...
20
votes
3answers
5k views

\autoref does not capitalize initial character in sentence when referencing label in listings environment

I have defined the following \providecommand*{\lstnumberautorefname}{line} and within my text \begin{lstlisting} |\label{sdd_1}|<sqlCallStatistics>YES</sqlCallStatistics> ...
3
votes
1answer
339 views

Call macro whose name depends on macro

Sorry about the title, I really couldn't find a better one. I'm facing the following dilemma: I'm using the smartref package, in particular I'm using its \sgetXval macros. The thing is that I'm using ...
8
votes
1answer
461 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 ...
0
votes
1answer
2k views

Problem with \label and \ref in TexMaker

I've got a problem using \label and \ref in Texmaker 3.1 (MiKTeX 2.9). When I put label somewhere, i got a frame with label name in it. How can I hide it? \begin{figure}[h] ...
6
votes
1answer
1k views

Turn off numbering on unused equations [duplicate]

Possible Duplicate: How do I number equations only if they are referred to in the text? While I am writing a document, I like to use align rather than align* and label them for all ...
15
votes
1answer
3k 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 ...
0
votes
1answer
246 views

Referring a series of figures [closed]

When I run the add file, I get: Chapter 1 chap 1.1 sec figures 1.1 - 1.1. Just a figure 1.1 Just b figure 1.1 Clearly this is wrong but does it happen? \documentclass{report} ...
26
votes
1answer
1k 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 ...
6
votes
1answer
10k views

Reference to a manually numbered equation

I want my equation's number to be "1'". I have done so through \tag{1'}. But now I don't know how to refer it in my document. Is there a method to call it or numbering equations like 1, 1', 1''?
4
votes
1answer
708 views

How to modify the equivalent of \thefigure for listings?

In my appendix I have figures and listings. The figures are now labeled very well (see this question). Now I have the same issue with listings: in the appendix it is labeled as A.1, but in my text ...
5
votes
4answers
3k views

Cross-reference entire enumerate list

I would like to refer to all the items of an enumerate environment, by applying a label to the list. I tried this \documentclass{article}[10pt] \usepackage{amsmath, hyperref, enumerate} ...
7
votes
3answers
732 views

How does one create, caption, label and refer to a subfigure?

So its a fairly simple question to a problem people normally experience. I have a rough idea of what to do, but I am looking for the correct way of doing things. So in the solution I will include what ...
3
votes
1answer
3k views

“Wrong” numbers while referencing lstlistings in text

I'm using the lstlisting package to put sourcecode in my pdf file: \documentclass{scrbook} \usepackage{listings} \lstset{ % language=xml, basicstyle=\footnotesize, % the size of the fonts that ...
8
votes
1answer
766 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 ...
18
votes
3answers
927 views

hyperref links break with pdftex + babel + Hebrew (or right-to-left language)

Using the babel package to write Hebrew text exposes incompatibilities with all sorts of other packages. This questions is about the incompatibility with hyperref. Basically, you can't get links with ...
52
votes
2answers
6k 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 ...
28
votes
2answers
2k 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 too far and should just type the word? I've read ...
6
votes
3answers
505 views

Label a complete enumeration

I am trying to create a simple enumeration and give it a label so I can access it. But the only thing I get in return is the number of the subsubsection. This is my code, which doesn't seem to work. ...
6
votes
1answer
970 views

Using \ref in moderncv class

I have use the \ref function to make an internal reference to another section with \label and \ref{} but my reference is invisible but click able. Someone has the same problem? EDIT BY LOCKSTEP: ...
6
votes
1answer
566 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 ...