[latexrefman-commits] r341 - in /trunk: ChangeLog latex2e.texi

jhefferon at domain.hid jhefferon at domain.hid
Fri May 22 20:34:04 CEST 2015


Author: jhefferon
Date: Fri May 22 20:34:03 2015
New Revision: 341

URL: http://svn.gna.org/viewcvs/latexrefman?rev=341&view=rev
Log:
\label and \ref

Modified:
    trunk/ChangeLog
    trunk/latex2e.texi

Modified: trunk/ChangeLog
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/ChangeLog?rev=341&r1=340&r2=341&view=diff
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Fri May 22 20:34:03 2015
@@ -1,3 +1,8 @@
+2015-05-22  Jim Hefferon  <jhefferon at domain.hid>
+
+	* latex2e.texi (\label): Add example of \label picking up
+	numbering in two places.
+
 2015-05-19  Jim Hefferon  <jhefferon at domain.hid>
 
 	* latex2e.texi (Font styles): Add that \mathxx commands do not

Modified: trunk/latex2e.texi
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/latex2e.texi?rev=341&r1=340&r2=341&view=diff
==============================================================================
--- trunk/latex2e.texi	(original)
+++ trunk/latex2e.texi	Fri May 22 20:34:03 2015
@@ -1295,17 +1295,35 @@
 \label at domain.hid}@}
 @end example
 
-A @code{\label} command appearing in ordinary text assigns to
- at domain.hid} the number of the current sectional unit; one appearing
-inside a numbered environment assigns that number to @var{key}.
-
-A @var{key} name can consist of any sequence of letters, digits, or
-punctuation characters.  Upper and lowercase letters are
-distinguished, as usual.
-
-To avoid accidentally creating two labels with the same name, it is
-common to use labels consisting of a prefix and a suffix separated by
-a colon or period. Some conventionally-used prefixes:
+A @code{\label} command appearing in ordinary text assigns to @var{key}
+the number of the current sectional unit; one appearing inside a
+numbered environment assigns that number to @var{key}.  The assigned
+number can be recovered by using the @code{\ref at domain.hid}@}} command
+(@pxref{\ref}).
+
+Thus, in the example below the key @code{sec:test} holds the number of
+the current section and the key @code{fig:test} that of the figure.
+
+ at example
+\section at domain.hid name@} \label at domain.hid@}
+This is Section~\ref at domain.hid@}.
+\begin at domain.hid@}
+  \centering
+  ...
+  \caption at domain.hid text@}
+  \label at domain.hid@}
+\end at domain.hid@}
+See Figure~\ref at domain.hid@}.
+ at end example
+
+A key name can consist of any sequence of letters, digits, or
+punctuation characters.  Upper and lowercase letters are distinguished,
+as usual.
+
+A common convention to use labels consisting of a prefix and a suffix
+separated by a colon or period. One advantage is that it helps avoid
+accidentally creating two labels with the same name.  Some commonly-used
+prefixes:
 
 @table @code
 @item ch





More information about the latexrefman-commits mailing list