\itembreak, \itemjoin: Remove unused macros.

\idxcode{}:  New macro; used to mark things that would be \code{} for entry
	into the index.  This allows easily switching things around for the
	font used in the index.  (O'Reilly seems to keep it all plain roman
	in the index.  Looks reasonable in the Python documentation as well.)

\*index{}:  Use \idxcode{} instead of {\codefont{}}.
This commit is contained in:
Fred Drake 1998-02-06 22:52:52 +00:00
parent 1ad1b3f911
commit b37a395231
1 changed files with 17 additions and 18 deletions

View File

@ -74,11 +74,15 @@
%\catcode`\_=12
%\catcode`\_=\active\def_{\ifnum\fam=\ttfamily \char'137 \else{\tt\char'137}\fi}
% Define \itembreak: force the text after an item to start on a new line
\newcommand{\itembreak}{
\mbox{}
\\*[0mm]
}
%% Lots of index-entry generation support.
% Command to wrap around stuff that refers to function/module/attribute names
% in the index. Default behavior: like \code{}. To just keep the index
% entries in the roman font, uncomment the second definition to use instead;
% it matches O'Reilly style more.
\newcommand{\idxcode}[1]{\codefont{#1}}
%\renewcommand{\idxcode}[1]{#1}
% Command to generate two index entries (using subentries)
\newcommand{\indexii}[2]{\index{#1!#2}\index{#2!#1}}
@ -95,14 +99,14 @@
}
% Command to generate a reference to a function, statement, keyword, operator
\newcommand{\stindex}[1]{\indexii{statement}{#1@{\codefont#1}}}
\newcommand{\opindex}[1]{\indexii{operator}{#1@{\codefont#1}}}
\newcommand{\exindex}[1]{\indexii{exception}{#1@{\codefont#1}}}
\newcommand{\stindex}[1]{\indexii{statement}{#1@{\idxcode{#1}}}}
\newcommand{\opindex}[1]{\indexii{operator}{#1@{\idxcode{#1}}}}
\newcommand{\exindex}[1]{\indexii{exception}{#1@{\idxcode{#1}}}}
\newcommand{\obindex}[1]{\indexii{object}{#1}}
\newcommand{\bifuncindex}[1]{\index{#1@{\codefont#1} (built-in function)}}
\newcommand{\bifuncindex}[1]{\index{#1@{\idxcode{#1}} (built-in function)}}
% Add an index entry for a module
\newcommand{\refmodule}[2]{\index{#1@{\codefont#1} (#2module)}}
\newcommand{\refmodule}[2]{\index{#1@{\idxcode{#1}} (#2module)}}
\newcommand{\refmodindex}[1]{\refmodule{#1}{}}
\newcommand{\refbimodindex}[1]{\refmodule{#1}{built-in }}
\newcommand{\refstmodindex}[1]{\refmodule{#1}{standard }}
@ -112,7 +116,8 @@
\openout\modindexfile=modules.idx
% Add the defining entry for a module
\newcommand{\defmodindex}[2]{\index{#1@{\codefont#1} (#2module)|textbf}%
\newcommand{\defmodindex}[2]{%
\index{#1@{\idxcode{#1}} (#2module)|textbf}%
\write\modindexfile{#1 \thepage}}
\newcommand{\modindex}[1]{\defmodindex{#1}{}}
\newcommand{\bimodindex}[1]{\defmodindex{#1}{built-in }}
@ -120,14 +125,8 @@
% Additional string for an index entry
\newcommand{\indexsubitem}{}
\newcommand{\ttindex}[1]{\index{#1@{\codefont#1} \indexsubitem}}
\newcommand{\ttindex}[1]{\index{#1@{\idxcode{#1}} \indexsubitem}}
% Define \itemjoin: some negative vspace to join two items together
\newcommand{\itemjoin}{
\mbox{}
\vspace{-\itemsep}
\vspace{-\parsep}
}
% from user-level, fulllineitems should be called as an environment
\def\fulllineitems{\list{}{\labelwidth \leftmargin \labelsep 0pt