]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Changes needed for indexing.
authorGuido van Rossum <guido@python.org>
Tue, 7 Jan 1992 16:40:44 +0000 (16:40 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 7 Jan 1992 16:40:44 +0000 (16:40 +0000)
Doc/lib.tex
Doc/lib/lib.tex

index c11cb5b2a5294e6301f70bcba223b84fae6f164f..101d33eec4cc88b433d0954c870f84fbb0ac053e 100644 (file)
@@ -2,24 +2,44 @@
 
 \documentstyle[myformat]{report}               % To preview with xdvi
 
-% Support to leave changebars in...
+% Underscores are not magic throughout this document
+\catcode`_=12
+
+% Dummy \cbstart and \cbend so I can leave the changebars in...
 \newcommand{\cbstart}{}
 \newcommand{\cbend}{}
 
-% A command to force the text after an item to start on a new line
+% Define \itembreak: force the text after an item to start on a new line
 \newcommand{\itembreak}{
-       \mbox{}\\*[0mm]
+\mbox{}
+\\*[0mm]
+}
+
+% Define \itemjoin: some negative vspace to join two items together
+\newcommand{\itemjoin}{
+\mbox{}
+\vspace{-\itemsep}
+\vspace{-\parsep}
 }
 
-% A command to define a function item
-\newcommand{\funcitem}[2]{\item[#1(#2)]}
+% Define \funcitem{func}{args}: define a function item
+\newcommand{\funcitem}[2]{
+\index{#1@{\tt#1}}
+\item[{\tt #1(#2)}]
+\ 
+}
 
-% A command to define a data item
-\newcommand{\dataitem}[1]{\item[#1]}
+% Define \dataitem{name}: define a data item
+\newcommand{\dataitem}[1]{
+\index{#1@{\tt#1}}
+\item[{\tt #1}]
+\ 
+}
 
-% A command to define an exception item
+% Define \excitem{name}{string}: define an exception item
 \newcommand{\excitem}[2]{
-\item[#1 = {\tt '#2'}]
+\index{#1@{\tt#1}}
+\item[{\tt #1 = '#2'}]
 \itembreak
 }
 
@@ -34,6 +54,8 @@
        E-mail: {\tt guido@cwi.nl}
 }
 
+\makeindex
+
 \begin{document}
 
 \pagenumbering{roman}
@@ -63,7 +85,8 @@ language.
 \input{lib1.tex}       % intro; built-in types, functions and exceptions
 \input{lib2.tex}       % built-in modules
 \input{lib3.tex}       % standard modules
-\input{lib4.tex}       % OS-dependent appendixes
-\input{lib5.tex}       % Graphics appendixes
+\input{lib4.tex}       % OS-dependent chapters
+\input{lib5.tex}       % Graphics chapters
+\input{libindex.tex}   % The index
 
 \end{document}
index c11cb5b2a5294e6301f70bcba223b84fae6f164f..101d33eec4cc88b433d0954c870f84fbb0ac053e 100644 (file)
@@ -2,24 +2,44 @@
 
 \documentstyle[myformat]{report}               % To preview with xdvi
 
-% Support to leave changebars in...
+% Underscores are not magic throughout this document
+\catcode`_=12
+
+% Dummy \cbstart and \cbend so I can leave the changebars in...
 \newcommand{\cbstart}{}
 \newcommand{\cbend}{}
 
-% A command to force the text after an item to start on a new line
+% Define \itembreak: force the text after an item to start on a new line
 \newcommand{\itembreak}{
-       \mbox{}\\*[0mm]
+\mbox{}
+\\*[0mm]
+}
+
+% Define \itemjoin: some negative vspace to join two items together
+\newcommand{\itemjoin}{
+\mbox{}
+\vspace{-\itemsep}
+\vspace{-\parsep}
 }
 
-% A command to define a function item
-\newcommand{\funcitem}[2]{\item[#1(#2)]}
+% Define \funcitem{func}{args}: define a function item
+\newcommand{\funcitem}[2]{
+\index{#1@{\tt#1}}
+\item[{\tt #1(#2)}]
+\ 
+}
 
-% A command to define a data item
-\newcommand{\dataitem}[1]{\item[#1]}
+% Define \dataitem{name}: define a data item
+\newcommand{\dataitem}[1]{
+\index{#1@{\tt#1}}
+\item[{\tt #1}]
+\ 
+}
 
-% A command to define an exception item
+% Define \excitem{name}{string}: define an exception item
 \newcommand{\excitem}[2]{
-\item[#1 = {\tt '#2'}]
+\index{#1@{\tt#1}}
+\item[{\tt #1 = '#2'}]
 \itembreak
 }
 
@@ -34,6 +54,8 @@
        E-mail: {\tt guido@cwi.nl}
 }
 
+\makeindex
+
 \begin{document}
 
 \pagenumbering{roman}
@@ -63,7 +85,8 @@ language.
 \input{lib1.tex}       % intro; built-in types, functions and exceptions
 \input{lib2.tex}       % built-in modules
 \input{lib3.tex}       % standard modules
-\input{lib4.tex}       % OS-dependent appendixes
-\input{lib5.tex}       % Graphics appendixes
+\input{lib4.tex}       % OS-dependent chapters
+\input{lib5.tex}       % Graphics chapters
+\input{libindex.tex}   % The index
 
 \end{document}