]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
\itembreak, \itemjoin: Remove unused macros.
authorFred Drake <fdrake@acm.org>
Fri, 6 Feb 1998 22:52:52 +0000 (22:52 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 6 Feb 1998 22:52:52 +0000 (22:52 +0000)
\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{}}.

Doc/myformat.sty

index 0261387bfb861ae65c973fcaff2aaff38cb27a64..0eadab8c0a3242d774bec7b1b779bb46df91f234 100644 (file)
 %\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}}
 }
 
 % 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 }}
 \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 }}
 
 % 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