+-------------------------------------------------------------------+
| LaTeX Note 009
[email protected] |
| References 12/18/2010 |
| v0.01 |
+-------------------------------------------------------------------+
LaTeX can keep track of cross references, for instance if you want to
refer to a given figure in a text you can say; "as the data in Figure
\ref{fig:mystunningdata} show!" Latex doesn't really know *what* you
are referring too, the cross-references are completely independent of
tables, figures, etc. The cross-references allow you to associate a
name with something that is auto-numbered (sections, chapters, figures,
equations, etc.) and then refer to those things by name, rather than
by number. The way that you do this is with
\label{<labelname>}
labelname takes becomes a reference to whatever is the nearest enclosure;
for instance
\section{My Totally Rad Section!}
\label{sec:totally-rad-section
The number of the current section, hereafter referred to as Section
\ref{sec:totally-rad-section}, is \ref{sec:totally-rad-section}.
There are no real requirements for naming, but the following are
used by convention;
sec:<section name> -- Used for chapters,sections, subsections, etc.
fig:<figure name> -- used for all figures
tab:<table name> -- used for all tables
eq:<equation name> -- used for mathematical equations
For equations in amsmath, there is a special \eqref for referring to
equations--all it does is add parentheses according to the publication
standard from AMS
Example;
\begin{align*}
\label{eq:stunning-equation}
a = b
\end{align*}
As we can see in Equation \eqref{eq:stunning-equation}, a \textbf{must}
equal b!