Added \label{} for logical addressing.

Logical markup.
diff --git a/Doc/lib/libintro.tex b/Doc/lib/libintro.tex
index 70d7478..cc0fd86 100644
--- a/Doc/lib/libintro.tex
+++ b/Doc/lib/libintro.tex
@@ -1,4 +1,5 @@
 \chapter{Introduction}
+\label{intro}
 
 The ``Python library'' contains several different kinds of components.
 
@@ -11,7 +12,7 @@
 
 The library also contains built-in functions and exceptions ---
 objects that can be used by all Python code without the need of an
-\code{import} statement.  Some of these are defined by the core
+\keyword{import} statement.  Some of these are defined by the core
 language, but many are not essential for the core semantics and are
 only described here.
 
@@ -42,6 +43,6 @@
 front of the manual), or look for a specific function, module or term
 in the index (in the back).  And finally, if you enjoy learning about
 random subjects, you choose a random page number (see module
-\code{rand}) and read a section or two.
+\module{rand}) and read a section or two.
 
 Let the show begin!
diff --git a/Doc/lib/libmisc.tex b/Doc/lib/libmisc.tex
index 2493e32..f895ef5 100644
--- a/Doc/lib/libmisc.tex
+++ b/Doc/lib/libmisc.tex
@@ -1,4 +1,5 @@
 \chapter{Miscellaneous Services}
+\label{misc}
 
 The modules described in this chapter provide miscellaneous services
 that are available in all Python versions.  Here's an overview:
@@ -6,7 +7,7 @@
 \begin{description}
 
 \item[math]
---- Mathematical functions (\code{sin()} etc.).
+--- Mathematical functions (\function{sin()} etc.).
 
 \item[cmath]
 --- Mathematical functions for complex numbers.
diff --git a/Doc/libintro.tex b/Doc/libintro.tex
index 70d7478..cc0fd86 100644
--- a/Doc/libintro.tex
+++ b/Doc/libintro.tex
@@ -1,4 +1,5 @@
 \chapter{Introduction}
+\label{intro}
 
 The ``Python library'' contains several different kinds of components.
 
@@ -11,7 +12,7 @@
 
 The library also contains built-in functions and exceptions ---
 objects that can be used by all Python code without the need of an
-\code{import} statement.  Some of these are defined by the core
+\keyword{import} statement.  Some of these are defined by the core
 language, but many are not essential for the core semantics and are
 only described here.
 
@@ -42,6 +43,6 @@
 front of the manual), or look for a specific function, module or term
 in the index (in the back).  And finally, if you enjoy learning about
 random subjects, you choose a random page number (see module
-\code{rand}) and read a section or two.
+\module{rand}) and read a section or two.
 
 Let the show begin!
diff --git a/Doc/libmac.tex b/Doc/libmac.tex
index 3a1b5ee..7580362 100644
--- a/Doc/libmac.tex
+++ b/Doc/libmac.tex
@@ -5,22 +5,22 @@
 Aside from the modules described here there are also interfaces to
 various MacOS toolboxes, which are currently not extensively
 described. The toolboxes for which modules exist are:
-\code{AE} (Apple Events),
-\code{Cm} (Component Manager),
-\code{Ctl} (Control Manager),
-\code{Dlg} (Dialog Manager),
-\code{Evt} (Event Manager),
-\code{Fm} (Font Manager),
-\code{List} (List Manager),
-\code{Menu} (Moenu Manager),
-\code{Qd} (QuickDraw),
-\code{Qt} (QuickTime),
-\code{Res} (Resource Manager and Handles),
-\code{Scrap} (Scrap Manager),
-\code{Snd} (Sound Manager),
-\code{TE} (TextEdit),
-\code{Waste} (non-Apple TextEdit replacement) and
-\code{Win} (Window Manager).
+\module{AE} (Apple Events),
+\module{Cm} (Component Manager),
+\module{Ctl} (Control Manager),
+\module{Dlg} (Dialog Manager),
+\module{Evt} (Event Manager),
+\module{Fm} (Font Manager),
+\module{List} (List Manager),
+\module{Menu} (Moenu Manager),
+\module{Qd} (QuickDraw),
+\module{Qt} (QuickTime),
+\module{Res} (Resource Manager and Handles),
+\module{Scrap} (Scrap Manager),
+\module{Snd} (Sound Manager),
+\module{TE} (TextEdit),
+\module{Waste} (non-Apple \program{TextEdit} replacement) and
+\module{Win} (Window Manager).
 
 If applicable the module will define a number of Python objects for
 the various structures declared by the toolbox, and operations will be
@@ -34,60 +34,62 @@
 works.
 
 \section{Built-in Module \sectcode{mac}}
-
+\label{module-mac}
 \bimodindex{mac}
+
 This module provides a subset of the operating system dependent
-functionality provided by the optional built-in module \code{posix}.
+functionality provided by the optional built-in module \module{posix}.
 It is best accessed through the more portable standard module
-\code{os}.
+\module{os}.
 \refbimodindex{posix}
 \refstmodindex{os}
 
 The following functions are available in this module:
-\code{chdir},
-\code{close},
-\code{dup},
-\code{fdopen},
-\code{getcwd},
-\code{lseek},
-\code{listdir},
-\code{mkdir},
-\code{open},
-\code{read},
-\code{rename},
-\code{rmdir},
-\code{stat},
-\code{sync},
-\code{unlink},
-\code{write},
-as well as the exception \code{error}. Note that the times returned by
-\code{stat()} are floating-point values, like all time values in
-MacPython.
+\function{chdir()},
+\function{close()},
+\function{dup()},
+\function{fdopen()},
+\function{getcwd()},
+\function{lseek()},
+\function{listdir()},
+\function{mkdir()},
+\function{open()},
+\function{read()},
+\function{rename()},
+\function{rmdir()},
+\function{stat()},
+\function{sync()},
+\function{unlink()},
+\function{write()},
+as well as the exception \exception{error}. Note that the times
+returned by \function{stat()} are floating-point values, like all time
+values in MacPython.
 
-One additional function is available: \code{xstat()}. This function
-returns the same information as \code{stat()}, but with three extra
+One additional function is available: \function{xstat()}. This function
+returns the same information as \function{stat()}, but with three extra
 values appended: the size of the resource fork of the file and its
 4-char creator and type.
 
 \section{Standard Module \sectcode{macpath}}
-
+\label{module-macpath}
 \stmodindex{macpath}
+
 This module provides a subset of the pathname manipulation functions
-available from the optional standard module \code{posixpath}.  It is
-best accessed through the more portable standard module \code{os}, as
+available from the optional standard module \module{posixpath}.  It is
+best accessed through the more portable standard module \module{os}, as
 \code{os.path}.
 \refstmodindex{posixpath}
 \refstmodindex{os}
 
 The following functions are available in this module:
-\code{normcase},
-\code{normpath},
-\code{isabs},
-\code{join},
-\code{split},
-\code{isdir},
-\code{isfile},
-\code{walk},
-\code{exists}.
-For other functions available in \code{posixpath} dummy counterparts
+\function{normcase()},
+\function{normpath()},
+\function{isabs()},
+\function{join()},
+\function{split()},
+\function{isdir()},
+\function{isfile()},
+\function{walk()},
+\function{exists()}.
+For other functions available in \module{posixpath} dummy counterparts
 are available.
diff --git a/Doc/libmisc.tex b/Doc/libmisc.tex
index 2493e32..f895ef5 100644
--- a/Doc/libmisc.tex
+++ b/Doc/libmisc.tex
@@ -1,4 +1,5 @@
 \chapter{Miscellaneous Services}
+\label{misc}
 
 The modules described in this chapter provide miscellaneous services
 that are available in all Python versions.  Here's an overview:
@@ -6,7 +7,7 @@
 \begin{description}
 
 \item[math]
---- Mathematical functions (\code{sin()} etc.).
+--- Mathematical functions (\function{sin()} etc.).
 
 \item[cmath]
 --- Mathematical functions for complex numbers.
diff --git a/Doc/mac/libmac.tex b/Doc/mac/libmac.tex
index 3a1b5ee..7580362 100644
--- a/Doc/mac/libmac.tex
+++ b/Doc/mac/libmac.tex
@@ -5,22 +5,22 @@
 Aside from the modules described here there are also interfaces to
 various MacOS toolboxes, which are currently not extensively
 described. The toolboxes for which modules exist are:
-\code{AE} (Apple Events),
-\code{Cm} (Component Manager),
-\code{Ctl} (Control Manager),
-\code{Dlg} (Dialog Manager),
-\code{Evt} (Event Manager),
-\code{Fm} (Font Manager),
-\code{List} (List Manager),
-\code{Menu} (Moenu Manager),
-\code{Qd} (QuickDraw),
-\code{Qt} (QuickTime),
-\code{Res} (Resource Manager and Handles),
-\code{Scrap} (Scrap Manager),
-\code{Snd} (Sound Manager),
-\code{TE} (TextEdit),
-\code{Waste} (non-Apple TextEdit replacement) and
-\code{Win} (Window Manager).
+\module{AE} (Apple Events),
+\module{Cm} (Component Manager),
+\module{Ctl} (Control Manager),
+\module{Dlg} (Dialog Manager),
+\module{Evt} (Event Manager),
+\module{Fm} (Font Manager),
+\module{List} (List Manager),
+\module{Menu} (Moenu Manager),
+\module{Qd} (QuickDraw),
+\module{Qt} (QuickTime),
+\module{Res} (Resource Manager and Handles),
+\module{Scrap} (Scrap Manager),
+\module{Snd} (Sound Manager),
+\module{TE} (TextEdit),
+\module{Waste} (non-Apple \program{TextEdit} replacement) and
+\module{Win} (Window Manager).
 
 If applicable the module will define a number of Python objects for
 the various structures declared by the toolbox, and operations will be
@@ -34,60 +34,62 @@
 works.
 
 \section{Built-in Module \sectcode{mac}}
-
+\label{module-mac}
 \bimodindex{mac}
+
 This module provides a subset of the operating system dependent
-functionality provided by the optional built-in module \code{posix}.
+functionality provided by the optional built-in module \module{posix}.
 It is best accessed through the more portable standard module
-\code{os}.
+\module{os}.
 \refbimodindex{posix}
 \refstmodindex{os}
 
 The following functions are available in this module:
-\code{chdir},
-\code{close},
-\code{dup},
-\code{fdopen},
-\code{getcwd},
-\code{lseek},
-\code{listdir},
-\code{mkdir},
-\code{open},
-\code{read},
-\code{rename},
-\code{rmdir},
-\code{stat},
-\code{sync},
-\code{unlink},
-\code{write},
-as well as the exception \code{error}. Note that the times returned by
-\code{stat()} are floating-point values, like all time values in
-MacPython.
+\function{chdir()},
+\function{close()},
+\function{dup()},
+\function{fdopen()},
+\function{getcwd()},
+\function{lseek()},
+\function{listdir()},
+\function{mkdir()},
+\function{open()},
+\function{read()},
+\function{rename()},
+\function{rmdir()},
+\function{stat()},
+\function{sync()},
+\function{unlink()},
+\function{write()},
+as well as the exception \exception{error}. Note that the times
+returned by \function{stat()} are floating-point values, like all time
+values in MacPython.
 
-One additional function is available: \code{xstat()}. This function
-returns the same information as \code{stat()}, but with three extra
+One additional function is available: \function{xstat()}. This function
+returns the same information as \function{stat()}, but with three extra
 values appended: the size of the resource fork of the file and its
 4-char creator and type.
 
 \section{Standard Module \sectcode{macpath}}
-
+\label{module-macpath}
 \stmodindex{macpath}
+
 This module provides a subset of the pathname manipulation functions
-available from the optional standard module \code{posixpath}.  It is
-best accessed through the more portable standard module \code{os}, as
+available from the optional standard module \module{posixpath}.  It is
+best accessed through the more portable standard module \module{os}, as
 \code{os.path}.
 \refstmodindex{posixpath}
 \refstmodindex{os}
 
 The following functions are available in this module:
-\code{normcase},
-\code{normpath},
-\code{isabs},
-\code{join},
-\code{split},
-\code{isdir},
-\code{isfile},
-\code{walk},
-\code{exists}.
-For other functions available in \code{posixpath} dummy counterparts
+\function{normcase()},
+\function{normpath()},
+\function{isabs()},
+\function{join()},
+\function{split()},
+\function{isdir()},
+\function{isfile()},
+\function{walk()},
+\function{exists()}.
+For other functions available in \module{posixpath} dummy counterparts
 are available.