| Guido van Rossum | ecae0b7 | 1996-06-26 19:03:20 +0000 | [diff] [blame] | 1 | % | 
|  | 2 | % myformat.sty for the Python doc  [updated to work with Latex2e] | 
|  | 3 | % | 
|  | 4 |  | 
| Guido van Rossum | daff175 | 1997-06-02 17:35:01 +0000 | [diff] [blame] | 5 | % Increase printable page size (copied from fullpage.sty) | 
|  | 6 | \topmargin 0pt | 
|  | 7 | \advance \topmargin by -\headheight | 
|  | 8 | \advance \topmargin by -\headsep | 
|  | 9 |  | 
|  | 10 | \textheight 8.9in | 
|  | 11 |  | 
|  | 12 | \oddsidemargin 0pt | 
|  | 13 | \evensidemargin \oddsidemargin | 
|  | 14 | \marginparwidth 0.5in | 
|  | 15 |  | 
|  | 16 | \textwidth 6.5in | 
|  | 17 |  | 
| Guido van Rossum | 643d932 | 1992-03-31 18:53:47 +0000 | [diff] [blame] | 18 | % Style parameters and macros used by most documents here | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 19 | \raggedbottom | 
|  | 20 | \sloppy | 
|  | 21 | \parindent =       0mm | 
|  | 22 | \parskip =         2mm | 
|  | 23 |  | 
| Guido van Rossum | 4c22cb2 | 1991-01-25 13:28:15 +0000 | [diff] [blame] | 24 | % Variable used by begin code command | 
| Guido van Rossum | 44000ed | 1991-01-24 16:54:29 +0000 | [diff] [blame] | 25 | \newlength{\codewidth} | 
| Guido van Rossum | 44000ed | 1991-01-24 16:54:29 +0000 | [diff] [blame] | 26 |  | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 27 | % Command to start a code block (follow this by \begin{verbatim}) | 
| Guido van Rossum | 4c22cb2 | 1991-01-25 13:28:15 +0000 | [diff] [blame] | 28 | \newcommand{\bcode}{ | 
|  | 29 | % Calculate the text width for the minipage: | 
|  | 30 | \setlength{\codewidth}{\linewidth} | 
|  | 31 | \addtolength{\codewidth}{-\parindent} | 
|  | 32 | % | 
| Guido van Rossum | 4c22cb2 | 1991-01-25 13:28:15 +0000 | [diff] [blame] | 33 | \par | 
| Guido van Rossum | 92fba02 | 1991-11-12 15:44:51 +0000 | [diff] [blame] | 34 | \vspace{3mm} | 
| Guido van Rossum | 4c22cb2 | 1991-01-25 13:28:15 +0000 | [diff] [blame] | 35 | \indent | 
|  | 36 | \begin{minipage}[t]{\codewidth} | 
|  | 37 | } | 
|  | 38 |  | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 39 | % Command to end a code block (precede this by \end{verbatim}) | 
| Guido van Rossum | 4c22cb2 | 1991-01-25 13:28:15 +0000 | [diff] [blame] | 40 | \newcommand{\ecode}{ | 
|  | 41 | \end{minipage} | 
|  | 42 | \vspace{3mm} | 
|  | 43 | \par | 
|  | 44 | \noindent | 
|  | 45 | } | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 46 |  | 
| Guido van Rossum | ecae0b7 | 1996-06-26 19:03:20 +0000 | [diff] [blame] | 47 | % Underscore hack (only act like subscript operator if in math mode) | 
|  | 48 | % | 
|  | 49 | % The following is due to Mark Wooding (the old version didn't work with | 
|  | 50 | % Latex 2e. | 
|  | 51 |  | 
|  | 52 | \DeclareRobustCommand\hackscore{% | 
|  | 53 | \ifmmode_\else\textunderscore\fi% | 
|  | 54 | } | 
|  | 55 | \begingroup | 
|  | 56 | \catcode`\_\active | 
|  | 57 | \def\next{% | 
|  | 58 | \AtBeginDocument{\catcode`\_\active\def_{\hackscore{}}}% | 
|  | 59 | } | 
|  | 60 | \expandafter\endgroup\next | 
|  | 61 |  | 
|  | 62 | % | 
|  | 63 | % This is the old hack, which didn't work with 2e. | 
|  | 64 | % If you're still using Latex 2.09, you can give it a try if the above fails. | 
|  | 65 | % | 
|  | 66 | %\def\_{\ifnum\fam=\ttfamily \char'137\else{\tt\char'137}\fi} | 
|  | 67 | %\catcode`\_=12 | 
|  | 68 | %\catcode`\_=\active\def_{\ifnum\fam=\ttfamily \char'137 \else{\tt\char'137}\fi} | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 69 |  | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 70 | % Define \itembreak: force the text after an item to start on a new line | 
|  | 71 | \newcommand{\itembreak}{ | 
|  | 72 | \mbox{} | 
|  | 73 | \\*[0mm] | 
|  | 74 | } | 
|  | 75 |  | 
|  | 76 | % Command to generate two index entries (using subentries) | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 77 | \newcommand{\indexii}[2]{\index{#1!#2}\index{#2!#1}} | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 78 |  | 
|  | 79 | % And three entries (using only one level of subentries) | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 80 | \newcommand{\indexiii}[3]{\index{#1!#2 #3}\index{#2!#3, #1}\index{#3!#1 #2}} | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 81 |  | 
|  | 82 | % And four (again, using only one level of subentries) | 
|  | 83 | \newcommand{\indexiv}[4]{ | 
|  | 84 | \index{#1!#2 #3 #4} | 
|  | 85 | \index{#2!#3 #4, #1} | 
|  | 86 | \index{#3!#4, #1 #2} | 
|  | 87 | \index{#4!#1 #2 #3} | 
|  | 88 | } | 
|  | 89 |  | 
|  | 90 | % Command to generate a reference to a function, statement, keyword, operator | 
|  | 91 | \newcommand{\stindex}[1]{\indexii{statement}{#1@{\tt#1}}} | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 92 | \newcommand{\opindex}[1]{\indexii{operator}{#1@{\tt#1}}} | 
| Guido van Rossum | 6886c83 | 1992-04-03 14:44:27 +0000 | [diff] [blame] | 93 | \newcommand{\exindex}[1]{\indexii{exception}{#1@{\tt#1}}} | 
|  | 94 | \newcommand{\obindex}[1]{\indexii{object}{#1}} | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 95 | \newcommand{\bifuncindex}[1]{\index{#1@{\tt#1} (built-in function)}} | 
|  | 96 |  | 
|  | 97 | % Add an index entry for a module | 
| Fred Drake | 207e57b | 1997-12-15 21:37:45 +0000 | [diff] [blame] | 98 | \newcommand{\refmodule}[2]{\index{#1@{\tt#1} (#2module)}} | 
| Fred Drake | 4af1814 | 1997-12-15 22:08:14 +0000 | [diff] [blame] | 99 | \newcommand{\refmodindex}[1]{\refmodule{#1}{}} | 
| Fred Drake | 207e57b | 1997-12-15 21:37:45 +0000 | [diff] [blame] | 100 | \newcommand{\refbimodindex}[1]{\refmodule{#1}{built-in }} | 
|  | 101 | \newcommand{\refstmodindex}[1]{\refmodule{#1}{standard }} | 
|  | 102 |  | 
| Fred Drake | da941ef | 1998-01-02 02:57:41 +0000 | [diff] [blame] | 103 | % support for the module index | 
|  | 104 | \newwrite\modindexfile | 
|  | 105 | \openout\modindexfile=modules.idx | 
|  | 106 |  | 
| Fred Drake | 207e57b | 1997-12-15 21:37:45 +0000 | [diff] [blame] | 107 | % Add the defining entry for a module | 
| Fred Drake | da941ef | 1998-01-02 02:57:41 +0000 | [diff] [blame] | 108 | \newcommand{\defmodindex}[2]{\index{#1@{\tt#1} (#2module)|textbf}% | 
|  | 109 | \write\modindexfile{#1 \thepage}} | 
| Fred Drake | 207e57b | 1997-12-15 21:37:45 +0000 | [diff] [blame] | 110 | \newcommand{\bimodindex}[1]{\defmodindex{#1}{built-in }} | 
|  | 111 | \newcommand{\stmodindex}[1]{\defmodindex{#1}{standard }} | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 112 |  | 
|  | 113 | % Additional string for an index entry | 
|  | 114 | \newcommand{\indexsubitem}{} | 
|  | 115 | \newcommand{\ttindex}[1]{\index{#1@{\tt#1} \indexsubitem}} | 
|  | 116 |  | 
|  | 117 | % Define \itemjoin: some negative vspace to join two items together | 
|  | 118 | \newcommand{\itemjoin}{ | 
|  | 119 | \mbox{} | 
|  | 120 | \vspace{-\itemsep} | 
|  | 121 | \vspace{-\parsep} | 
|  | 122 | } | 
|  | 123 |  | 
|  | 124 | % Define \funcitem{func}{args}: define a function item | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 125 | \newcommand{\funcitem}[2]{% | 
|  | 126 | \ttindex{#1}% | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 127 | \item[\code{#1(\varvars{#2})}] | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 128 | \ | 
|  | 129 | } | 
|  | 130 |  | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 131 |  | 
|  | 132 | % from user-level, fulllineitems should be called as an environment | 
|  | 133 | \def\fulllineitems{\list{}{\labelwidth \leftmargin \labelsep 0pt | 
|  | 134 | \rightmargin 0pt \topsep -\parskip \partopsep \parskip | 
|  | 135 | \itemsep -\parsep | 
|  | 136 | \let\makelabel\itemnewline}} | 
|  | 137 | \let\endfulllineitems\endlist | 
|  | 138 |  | 
|  | 139 |  | 
| Guido van Rossum | 36f3502 | 1997-05-22 20:43:24 +0000 | [diff] [blame] | 140 | % cfuncdesc should be called as | 
|  | 141 | % \begin{cfuncdesc}{type}{name}{arglist} | 
|  | 142 | % ... description ... | 
|  | 143 | % \end{cfuncdesc} | 
| Fred Drake | eb33c78 | 1996-10-29 15:55:08 +0000 | [diff] [blame] | 144 | \newcommand{\cfuncline}[3]{\item[\code{#1 #2(\varvars{#3})}]\ttindex{#2}} | 
|  | 145 | \newcommand{\cfuncdesc}[3]{\fulllineitems\cfuncline{#1}{#2}{#3}} | 
|  | 146 | \let\endcfuncdesc\endfulllineitems | 
|  | 147 |  | 
| Guido van Rossum | 36f3502 | 1997-05-22 20:43:24 +0000 | [diff] [blame] | 148 | \newcommand{\cvarline}[2]{\item[\code{#1 #2}]\ttindex{#2}} | 
|  | 149 | \newcommand{\cvardesc}[2]{\fulllineitems\cvarline{#1}{#2}} | 
|  | 150 | \let\endcvardesc\endfulllineitems | 
|  | 151 |  | 
|  | 152 | \newcommand{\ctypeline}[1]{\item[\code{#1}]\ttindex{#1}} | 
|  | 153 | \newcommand{\ctypedesc}[1]{\fulllineitems\ctypeline{#1}} | 
|  | 154 | \let\endctypedesc\endfulllineitems | 
|  | 155 |  | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 156 | % funcdesc should be called as an \begin{funcdesc} ... \end{funcdesc} | 
|  | 157 | \newcommand{\funcline}[2]{\item[\code{#1(\varvars{#2})}]\ttindex{#1}} | 
|  | 158 | \newcommand{\funcdesc}[2]{\fulllineitems\funcline{#1}{#2}} | 
|  | 159 | \let\endfuncdesc\endfulllineitems | 
| Fred Drake | 6c886a8 | 1998-01-12 14:44:33 +0000 | [diff] [blame] | 160 | \newcommand{\optional}[1]{{\textnormal{\Large[}}{#1}\hspace{0.5mm}{\textnormal{\Large]}} } | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 161 |  | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 162 |  | 
|  | 163 | % same for excdesc | 
|  | 164 | \newcommand{\excline}[1]{\item[\code{#1}]\ttindex{#1}} | 
|  | 165 | \newcommand{\excdesc}[1]{\fulllineitems\excline{#1}} | 
|  | 166 | \let\endexcdesc\endfulllineitems | 
|  | 167 |  | 
|  | 168 | % same for datadesc | 
|  | 169 | \newcommand{\dataline}[1]{\item[\code{#1}]\ttindex{#1}} | 
|  | 170 | \newcommand{\datadesc}[1]{\fulllineitems\dataline{#1}} | 
|  | 171 | \let\enddatadesc\endfulllineitems | 
|  | 172 |  | 
|  | 173 |  | 
| Fred Drake | a610f9f | 1997-12-03 03:42:39 +0000 | [diff] [blame] | 174 | % opcodedesc should be called as an \begin{opcodedesc} ... \end{opcodedesc} | 
|  | 175 | \newcommand{\opcodeline}[2]{\item[\code{#1\quad\varvars{#2}}]\ttindex{#1}} | 
|  | 176 | \newcommand{\opcodedesc}[2]{\fulllineitems\opcodeline{#1}{#2}} | 
|  | 177 | \let\endopcodedesc\endfulllineitems | 
|  | 178 |  | 
|  | 179 |  | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 180 | % Define \dataitem{name}: define a data item | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 181 | \newcommand{\dataitem}[1]{% | 
|  | 182 | \ttindex{#1}% | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 183 | \item[{\tt #1}] | 
|  | 184 | \ | 
|  | 185 | } | 
|  | 186 |  | 
|  | 187 | % Define \excitem{name}: define an exception item | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 188 | \newcommand{\excitem}[1]{% | 
|  | 189 | \ttindex{#1}% | 
| Guido van Rossum | 5badc75 | 1992-03-06 10:55:46 +0000 | [diff] [blame] | 190 | \item[{\tt #1}] | 
|  | 191 | \itembreak | 
|  | 192 | } | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 193 |  | 
|  | 194 | \let\nodename=\label | 
|  | 195 |  | 
| Fred Drake | 3082424 | 1996-12-13 21:53:07 +0000 | [diff] [blame] | 196 | %% For these commands, use \command{} to get the typography right, not | 
|  | 197 | %% {\command}.  This works better with the texinfo translation. | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 198 | \newcommand{\ABC}{{\sc abc}} | 
|  | 199 | \newcommand{\UNIX}{{\sc Unix}} | 
|  | 200 | \newcommand{\ASCII}{{\sc ascii}} | 
| Guido van Rossum | 16d6e71 | 1994-08-08 12:30:22 +0000 | [diff] [blame] | 201 | \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}} | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 202 | \newcommand{\C}{C} | 
|  | 203 | \newcommand{\EOF}{{\sc eof}} | 
| Guido van Rossum | 9231c8f | 1997-05-15 21:43:21 +0000 | [diff] [blame] | 204 | \newcommand{\NULL}{\code{NULL}} | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 205 |  | 
|  | 206 | % code is the most difficult one... | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 207 | \newcommand{\code}[1]{{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% | 
|  | 208 | \mbox{\tt #1}}} | 
| Guido van Rossum | ecae0b7 | 1996-06-26 19:03:20 +0000 | [diff] [blame] | 209 |  | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 210 | \newcommand{\kbd}[1]{\mbox{\tt #1}} | 
|  | 211 | \newcommand{\key}[1]{\mbox{\tt #1}} | 
|  | 212 | \newcommand{\samp}[1]{\mbox{`\code{#1}'}} | 
|  | 213 | \newcommand{\var}[1]{\mbox{\it#1\/}} | 
|  | 214 | \let\file=\samp | 
| Guido van Rossum | 4541602 | 1995-03-30 16:00:58 +0000 | [diff] [blame] | 215 | \newcommand{\dfn}[1]{{\em #1\/}} | 
| Guido van Rossum | ecae0b7 | 1996-06-26 19:03:20 +0000 | [diff] [blame] | 216 | \renewcommand{\emph}[1]{{\em #1\/}} | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 217 | \newcommand{\strong}[1]{{\bf #1}} | 
|  | 218 |  | 
| Fred Drake | 9b550d9 | 1996-11-11 20:43:46 +0000 | [diff] [blame] | 219 | \newcommand{\varvars}[1]{{\def\,{\/{\char`\,}}\var{#1}}} | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 220 |  | 
|  | 221 | \newif\iftexi\texifalse | 
| Guido van Rossum | ecae0b7 | 1996-06-26 19:03:20 +0000 | [diff] [blame] | 222 | \newif\iflatex\latextrue | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 223 |  | 
| Guido van Rossum | e7af5a0 | 1994-08-01 12:39:35 +0000 | [diff] [blame] | 224 | \newenvironment{tableii}[4]{\begin{center}\def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}\begin{tabular}{#1}\hline#3\\ | 
|  | 225 | \hline}{\hline\end{tabular}\end{center}} | 
|  | 226 |  | 
| Guido van Rossum | 95cd2ef | 1992-12-08 14:37:55 +0000 | [diff] [blame] | 227 | \newenvironment{tableiii}[5]{\begin{center}\def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}\begin{tabular}{#1}\hline#3\\ | 
|  | 228 | \hline}{\hline\end{tabular}\end{center}} | 
|  | 229 |  | 
|  | 230 | \newcommand{\itemnewline}[1]{\@tempdima\linewidth | 
|  | 231 | \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}} | 
|  | 232 |  | 
|  | 233 | \newcommand{\sectcode}[1]{{\tt #1}} | 
| Guido van Rossum | e3d5fc5 | 1997-07-17 18:27:53 +0000 | [diff] [blame] | 234 |  | 
|  | 235 | % Cross-referencing (AMK) | 
|  | 236 | % Sample usage: | 
|  | 237 | %  \begin{seealso} | 
|  | 238 | %    \seemodule{rand}{Uniform random number generator}; % Module xref | 
|  | 239 | %    \seetext{{\em Encyclopedia Britannica}}.                  % Ref to a book | 
|  | 240 | %  \end{seealso} | 
|  | 241 |  | 
| Fred Drake | 6c886a8 | 1998-01-12 14:44:33 +0000 | [diff] [blame] | 242 | \newenvironment{seealso}[0]{{\bf See Also:}\par}{\par} | 
| Guido van Rossum | e3d5fc5 | 1997-07-17 18:27:53 +0000 | [diff] [blame] | 243 | \newcommand{\seemodule}[2]{\ref{module-#1}: {\tt #1} (#2)} | 
|  | 244 | \newcommand{\seetext}[1]{\par{#1}} | 
| Fred Drake | da941ef | 1998-01-02 02:57:41 +0000 | [diff] [blame] | 245 |  | 
|  | 246 | % Fix the theindex environment to add an entry to the Table of Contents; | 
|  | 247 | % this is much nicer than just having to jump to the end of the book and | 
|  | 248 | % flip around, especially with multiple indexes. | 
|  | 249 | % | 
|  | 250 | \let\OldTheindex=\theindex | 
|  | 251 | \def\theindex{% | 
|  | 252 | \OldTheindex% | 
|  | 253 | \addcontentsline{toc}{chapter}{\indexname}% | 
|  | 254 | } | 
| Fred Drake | 031ad4b | 1998-01-09 05:34:23 +0000 | [diff] [blame] | 255 |  | 
|  | 256 | %  Use a similar trick to catch the end of the {abstract} environment, | 
|  | 257 | %  but here make sure the abstract is followed by a blank page if the | 
|  | 258 | % 'openright' option is used. | 
|  | 259 | % | 
|  | 260 | \let\OldEndAbstract=\endabstract | 
| Fred Drake | 737e73e | 1998-01-13 22:40:08 +0000 | [diff] [blame^] | 261 | \def\endabstract{ | 
|  | 262 | \if@openright | 
|  | 263 | \ifodd\value{page} | 
|  | 264 | \typeout{Adding blank page after the abstract.} | 
|  | 265 | \vfil\pagebreak | 
| Fred Drake | 031ad4b | 1998-01-09 05:34:23 +0000 | [diff] [blame] | 266 | \fi | 
| Fred Drake | 737e73e | 1998-01-13 22:40:08 +0000 | [diff] [blame^] | 267 | \fi | 
|  | 268 | \OldEndAbstract | 
| Fred Drake | 031ad4b | 1998-01-09 05:34:23 +0000 | [diff] [blame] | 269 | } | 
|  | 270 |  | 
|  | 271 | % \mytableofcontents wraps the \tableofcontents macro with all the magic to | 
|  | 272 | % get the spacing right and have the right number of pages if the 'openright' | 
|  | 273 | % option has been used.  This eliminates a fair amount of crud in the | 
|  | 274 | % individual document files. | 
|  | 275 | % | 
| Fred Drake | 737e73e | 1998-01-13 22:40:08 +0000 | [diff] [blame^] | 276 | \let\OldTableofcontents=\tableofcontents | 
|  | 277 | \def\tableofcontents{% | 
|  | 278 | \pagebreak | 
|  | 279 | \pagestyle{plain} | 
|  | 280 | { | 
|  | 281 | \parskip = 0mm | 
|  | 282 | \OldTableofcontents | 
| Fred Drake | 031ad4b | 1998-01-09 05:34:23 +0000 | [diff] [blame] | 283 | \if@openright | 
| Fred Drake | 737e73e | 1998-01-13 22:40:08 +0000 | [diff] [blame^] | 284 | \ifodd\value{page} | 
|  | 285 | \typeout{Adding blank page after the table of contents.} | 
|  | 286 | \pagebreak\hspace{0pt} | 
| Fred Drake | 031ad4b | 1998-01-09 05:34:23 +0000 | [diff] [blame] | 287 | \fi | 
|  | 288 | \fi | 
|  | 289 | } | 
| Fred Drake | 737e73e | 1998-01-13 22:40:08 +0000 | [diff] [blame^] | 290 | \pagebreak | 
| Fred Drake | 031ad4b | 1998-01-09 05:34:23 +0000 | [diff] [blame] | 291 | } | 
| Fred Drake | 8362d00 | 1998-01-13 17:29:31 +0000 | [diff] [blame] | 292 |  | 
|  | 293 | % Uncomment the following line to use a PostScript font instead of bitmaps: | 
|  | 294 | %\RequirePackage{times}\typeout{Using times fonts instead of Computer Modern.} |