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

5
votes
1answer
877 views

Generate labels using xstring and \Makelowercase

I am trying to write a command that allows me to reference a subsection with a generated label. The idea is that when I declare a step \step{Long Name With Many Uppercase Letters}, the generated ...
6
votes
1answer
118 views

Tweaking the appearance of a \label

I have a label that references what is currently section 1.4. Can I tweak either the \ref or \label so that it appears as 4 (i.e. only the subsection number) when reffed?
2
votes
1answer
1k views

References that include section/appendix heading id? [duplicate]

Possible Duplicate: How to create multilevel figure / table numbers? Continuous v. per-chapter/section numbering of figures, tables, and other document elements \documentclass{article} \...
2
votes
1answer
816 views

How to refer to a figure created by tikzpicture in paper body?

I am relatively new with LaTeX. I created an image by \begin{figure} \begin{tikzpicture} .... \end{figure} \end{tikzpicture} I just don't know how to refer it in paper body by \ref{compression}, ...
4
votes
1answer
751 views

chemnum package

The following minimal code using the chemnum package was designed to replace TMP1, TMP2 and TMP3 in an eps file made by ChemDraw by numbers: \documentclass{article} \usepackage{graphicx} \usepackage[...
11
votes
2answers
2k 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 ...
13
votes
1answer
2k views

Incorrect target of \label link produced by hyperref

In the following code, the command \label{my} appears on page 4, as well \pageref{my} says "4", but the hyperlink points to the page one. Why is that? \documentclass{book} \usepackage{hyperref} \...
15
votes
3answers
573 views

Need help creating a custom aux file read/write routine to suit my needs

I require two new commands, \createreference and \citereference, to work with. They should work as shown in the following examples: \createreference{john}{John Q. Citizen} should write the text “John ...
0
votes
1answer
164 views

Using \label within a figure float [duplicate]

Possible Duplicate: Where to put the \label on a figure environment? My question is rather simple. I have noticed that when I use \label like this \begin{figure}[h] \centering \...
9
votes
2answers
2k views

Manually set reference values

I'm working on a large-ish Latex document (my dissertation) in which each chapter has its own .tex file. For various reasons, I have two master files: one that includes all chapters and one that I ...
2
votes
1answer
2k views

Independent labelling of lines in a `cases` environment [duplicate]

Possible Duplicate: Separate labels in cases I am looking for a way to number and references independently individual lines in a cases environment. Here is an example: \documentclass{article}...
7
votes
1answer
249 views

Emphasize the first reference to a figure or table

I'm writing a scientific report and it's required that the first reference to any figure or table (not to equations or sections) in the text is set bold like this: Is there a package for this kind ...
7
votes
1answer
1k views

Unknown Option “noabbrev” for the package cleveref

In the cleveref package document, it is clearly stated that the noabbrev option prevents the names of the references to be abbreviated. For instance instead of "Fig. 1", I'll get "Figure 1". However, ...
13
votes
1answer
9k views

Referencing line numbers in an algorithm

Referencing figures is simple: \begin{figure} \caption{Blah blah blah blah blah} \label{fig:name} %shtuff goes here \end{figure} See figure~\ref{fig:name}. I would like to know if it ...
0
votes
0answers
41 views

Why am I getting errors about defined references? [duplicate]

Possible Duplicate: Why does an algorithm's label have to appear after the caption? I have the following in a paper: See~\ref{fig:quicksort}. \begin{figure} \label{fig:quicksort} ...
7
votes
1answer
500 views

Clicking on a link I don't jump to the **exact** location of the label, just somewhere around it

When I label an equation and later have a reference to it, then by clicking the corresponding link the pdf I jump to that equation, with the equation being exactly at the top of the page. Same goes ...
6
votes
1answer
3k views

cleveref + listings

\documentclass{scrbook} \usepackage{listings} \usepackage{cleveref} \begin{document} Ref: \ref{test}. Cref: \cref{test}. \begin{lstlisting}[caption={Test},label={test}] test \end{lstlisting} \end{...
11
votes
4answers
1k views

Custom Enumeration

I have a problem with enumerating a list of axioms in a custom style. For instance, if I wanted to write down the axioms that a function will have to satisfy for it to be a homomorphism of rings, I'...
2
votes
1answer
1k views

How to use example code (of any language) and reference it?

How to use Java or any code in LaTeX and refer it in my document?
4
votes
2answers
2k views

How can I get capitalised cross references in LyX with refstyle

LyX (v2.03) uses refstyle for cross references. By default if you use the GUI to create a reference it produces source that looks like: \tabref{label1} \figref{label2} which produces an output like ...
2
votes
1answer
1k views

xr and hyperref to link between two PDF documents [duplicate]

Possible Duplicate: Does hyperref work between two files? I am using the xr package to write a PDF document that contains references to another PDF document, like "in section bla of the other ...
5
votes
1answer
521 views

How to programmatically create sections in LaTeX

In the simplest form of the problem I am facing, I need to define a command that accepts two parameters, uses the first to put some contents in the document exactly where the command is invoked, and ...
5
votes
2answers
2k views

Hypcap not working with custom figure environment

I'm trying to use caption with hypcap=true so that cross-reference hyperlinks will go to the figure instead of the figure caption. However, I'm using a multicol environment with a custom figure ...
4
votes
2answers
1k views

Hyperlink to figure (reference) in PDF links to incorrect figure

I have a document with a few sections, I'm new to LaTeX so I'm just using the article class. I want the figure numbers to restart in each section. I did this with \setcounter{figure}{0} at the start ...
22
votes
4answers
3k views

Printing labels along with equation numbers

Working with documents with huge amount of equations it becomes cumbersome to go back and remind yourself what you labeled a certain equation to (I try to name them in a smart way, but there are too ...
5
votes
1answer
2k views

Customize the way eqref works with tags

I'd like to have a version of \eqref that treats equations with a custom tag differently from the usual numbered equation. In particular, if I assign a tag to an equation, I'd like \eqref not to put ...
6
votes
1answer
644 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 ...
2
votes
1answer
2k views

nameref With Arbitrary Text

This is a follow-up question to: Cross-referencing within text @Werner gave a good cross-referencing MWE to return to a certain point of the text in a section and not at the beginning of that ...
3
votes
2answers
388 views

Cross-referencing within text

Is there a way to reference a place in the text using \hyperref, instead of using \nameref to reference the section that portion of text belongs to? Probably a WME will help in getting my point ...
21
votes
2answers
652 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 ...
6
votes
1answer
984 views

Trouble with hyperref when resetting the counter for equations (specifically with the align environment)

I am trying to reset a counter to zero; however hyperref tries to reference previous equations. I am using: \setcounter{equation}{0} And if I have labels in say align environments: \documentclass{...
3
votes
1answer
220 views

Change the reference style for subfloats: from 1a to 1(a)

How to change the reference style to subfloats (package subfloat) in a figure from <number><letter> to <number>(<letter>).
7
votes
1answer
747 views

\nameref only shows reference as a red rectangle, no name in it

I'm trying to use \usepackage{hyperref} to reference in the text a section by name. The section to be referenced is \section{whatever}\label{sec:marker} However, when I place in the text \nameref{...
6
votes
2answers
10k views

How do I reference an appendix when it is defined with \chapter*?

I have a problem with the reference of an annex. In the main .tex file I put %... couple of lines before this \include{ThesisChapter4} % \include{ThesisAppendixA} % Appendix A and in Appendix A I ...
6
votes
1answer
2k views

Beamer ignoring a \label when used inside certain \only's

For space reasons I want to break up the contents of an itemize list into separate slides, which I have been doing without much problem using \only. However, the following minimal document complains ...
5
votes
1answer
762 views

Using cleveref with tagged equations

In my document I have a tagged equation, something that goes like \begin{equation}\tag{$\dagger$}\label{whatever} \end{equation} Then latter I want to refer to it using \eqref{whatever}. But ...
11
votes
2answers
454 views

Customizing varioref to only add “… on page XX”, and only when there is more than one page in between reference and figure

varioref is a nice package as it will, when referencing, add "... on the [facing/next/preceding/following] page" if the reference and figure (or whatever object is being reference) are located on ...
4
votes
1answer
261 views

Reference \ref[…]{…} with an argument does not work with hyperref

I'm using the hyperref package. My propositions usually consist from many parts a), b), c), d), e), etc. When I refer to a certain proposition, I would like to specify which part I am referring to. ...
5
votes
2answers
1k views

Printing \ref as a letter

When using \label and \ref, can I get the \ref to display as a letter instead of a number (so if \ref is 3, it will print c instead)?
3
votes
1answer
245 views

How to cross reference a section and item in a list in single document?

I want to cross reference sections as well as some items in the list in my document. for ex: \label helps us to cross reference the sections. If we renew the command to provide the cross reference for ...
10
votes
2answers
2k views

Redefining enumerate counters in beamer

I'd like to do two things with the enumerate environment in beamer. I'd like to reformat it so that it shows up as (1) An item a. A subitem b. Another subitem I'd like to be able to refer to ...
3
votes
1answer
251 views

Figure refs stop working after I added a new counter

I was using the amspset document class for generating exam practice problems. I had wanted to add some referencing to the problems so I started a new counter like this (adapted from some Tex Exchange ...
4
votes
2answers
2k views

Working with labels

I'm not quite sure what the problem is, so I'll just post a MWE: \documentclass{article} \newcommand\twolabels[2] { \label{my:#1} \label{my:#2} } \begin{document} \twolabels{4}{a} I have ...
4
votes
1answer
1k 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 ...
5
votes
2answers
94 views

refcount + unresolved cross references + ~ 100 runs of pdflatex

Is there anybody out there, with an idea how to speed things up? I need to run pdflatex ~ 100 times because of unresolved cross references. I use refcount to add a number to each row of a table (list ...
2
votes
1answer
542 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 ...
1
vote
1answer
145 views

find and sort selected words

I am writing a book, where in i have to call back the selected words in different context. Here is my MWE \documentclass[a4paper,10pt]{article} %For multiple index \usepackage{imakeidx} \makeindex ...
5
votes
1answer
298 views

Making and referring to variables with a key

I have a custom macro, \somemacro{}{}. In the macro, #1 is set to a unique key (e.g. 11) and #2 contains other data. This macro appears throughout my document: This is some text. \somemacro{11}{...
3
votes
1answer
844 views

Subnumbering in chemstyle

When I use \schemeref and \schemerefsub, instead of 1 and 2a 2b I get 1 and 1a 1b. So my subnumbering doesn't seem to follow my regular numbering, but when I refer to the compounds I get 1 and then, ...
12
votes
2answers
4k views

Using \href instead of \ref

The link produced by \ref{defn:First Defined Term} works fine, but as I would prefer to have text instead of a number so thought \href{defn:First Defined Term}{First Defined Term} should work, but it ...