Changes needed for indexing.

This commit is contained in:
Guido van Rossum 1992-01-07 16:40:44 +00:00
parent 46b1638044
commit 1230c08b8e
2 changed files with 68 additions and 22 deletions

View file

@ -2,24 +2,44 @@
\documentstyle[myformat]{report} % To preview with xdvi \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{\cbstart}{}
\newcommand{\cbend}{} \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}{ \newcommand{\itembreak}{
\mbox{}\\*[0mm] \mbox{}
\\*[0mm]
} }
% A command to define a function item % Define \itemjoin: some negative vspace to join two items together
\newcommand{\funcitem}[2]{\item[#1(#2)]} \newcommand{\itemjoin}{
\mbox{}
\vspace{-\itemsep}
\vspace{-\parsep}
}
% A command to define a data item % Define \funcitem{func}{args}: define a function item
\newcommand{\dataitem}[1]{\item[#1]} \newcommand{\funcitem}[2]{
\index{#1@{\tt#1}}
\item[{\tt #1(#2)}]
\
}
% A command to define an exception item % Define \dataitem{name}: define a data item
\newcommand{\dataitem}[1]{
\index{#1@{\tt#1}}
\item[{\tt #1}]
\
}
% Define \excitem{name}{string}: define an exception item
\newcommand{\excitem}[2]{ \newcommand{\excitem}[2]{
\item[#1 = {\tt '#2'}] \index{#1@{\tt#1}}
\item[{\tt #1 = '#2'}]
\itembreak \itembreak
} }
@ -34,6 +54,8 @@
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
\makeindex
\begin{document} \begin{document}
\pagenumbering{roman} \pagenumbering{roman}
@ -63,7 +85,8 @@ language.
\input{lib1.tex} % intro; built-in types, functions and exceptions \input{lib1.tex} % intro; built-in types, functions and exceptions
\input{lib2.tex} % built-in modules \input{lib2.tex} % built-in modules
\input{lib3.tex} % standard modules \input{lib3.tex} % standard modules
\input{lib4.tex} % OS-dependent appendixes \input{lib4.tex} % OS-dependent chapters
\input{lib5.tex} % Graphics appendixes \input{lib5.tex} % Graphics chapters
\input{libindex.tex} % The index
\end{document} \end{document}

View file

@ -2,24 +2,44 @@
\documentstyle[myformat]{report} % To preview with xdvi \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{\cbstart}{}
\newcommand{\cbend}{} \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}{ \newcommand{\itembreak}{
\mbox{}\\*[0mm] \mbox{}
\\*[0mm]
} }
% A command to define a function item % Define \itemjoin: some negative vspace to join two items together
\newcommand{\funcitem}[2]{\item[#1(#2)]} \newcommand{\itemjoin}{
\mbox{}
\vspace{-\itemsep}
\vspace{-\parsep}
}
% A command to define a data item % Define \funcitem{func}{args}: define a function item
\newcommand{\dataitem}[1]{\item[#1]} \newcommand{\funcitem}[2]{
\index{#1@{\tt#1}}
\item[{\tt #1(#2)}]
\
}
% A command to define an exception item % Define \dataitem{name}: define a data item
\newcommand{\dataitem}[1]{
\index{#1@{\tt#1}}
\item[{\tt #1}]
\
}
% Define \excitem{name}{string}: define an exception item
\newcommand{\excitem}[2]{ \newcommand{\excitem}[2]{
\item[#1 = {\tt '#2'}] \index{#1@{\tt#1}}
\item[{\tt #1 = '#2'}]
\itembreak \itembreak
} }
@ -34,6 +54,8 @@
E-mail: {\tt guido@cwi.nl} E-mail: {\tt guido@cwi.nl}
} }
\makeindex
\begin{document} \begin{document}
\pagenumbering{roman} \pagenumbering{roman}
@ -63,7 +85,8 @@ language.
\input{lib1.tex} % intro; built-in types, functions and exceptions \input{lib1.tex} % intro; built-in types, functions and exceptions
\input{lib2.tex} % built-in modules \input{lib2.tex} % built-in modules
\input{lib3.tex} % standard modules \input{lib3.tex} % standard modules
\input{lib4.tex} % OS-dependent appendixes \input{lib4.tex} % OS-dependent chapters
\input{lib5.tex} % Graphics appendixes \input{lib5.tex} % Graphics chapters
\input{libindex.tex} % The index
\end{document} \end{document}