From d579ed8239589dc6a48ae670dd48a6aebf37dcca Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Fri, 17 Apr 1998 02:45:41 +0000 Subject: Shift (re-)definition of \theindex to the document classes so that it doesn't break HOWTO documents. --- Doc/texinputs/howto.cls | 11 +++++++++++ Doc/texinputs/manual.cls | 12 ++++++++++++ Doc/texinputs/python.sty | 11 ----------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Doc/texinputs/howto.cls b/Doc/texinputs/howto.cls index 901cf87..f2c1ecd 100644 --- a/Doc/texinputs/howto.cls +++ b/Doc/texinputs/howto.cls @@ -82,6 +82,17 @@ \@doing@page@targetstrue } +% Fix the theindex environment to add an entry to the Table of +% Contents; this is much nicer than just having to jump to the end of +% the book and flip around, especially with multiple indexes. +% +\let\OldTheindex=\theindex +\renewcommand{\theindex}{ + \clearpage + \OldTheindex + \addcontentsline{toc}{section}{\indexname} +} + \@ifundefined{fancyhf}{ \pagestyle{plain}}{ \pagestyle{normal}} % start this way; change for diff --git a/Doc/texinputs/manual.cls b/Doc/texinputs/manual.cls index c7ab75e..d48923e 100644 --- a/Doc/texinputs/manual.cls +++ b/Doc/texinputs/manual.cls @@ -122,3 +122,15 @@ \@ifundefined{fancyhf}{}{\pagestyle{normal}}% \@doing@page@targetstrue% } + + +% Fix the theindex environment to add an entry to the Table of +% Contents; this is much nicer than just having to jump to the end of +% the book and flip around, especially with multiple indexes. +% +\let\OldTheindex=\theindex +\renewcommand{\theindex}{ + \cleardoublepage + \OldTheindex + \addcontentsline{toc}{chapter}{\indexname} +} diff --git a/Doc/texinputs/python.sty b/Doc/texinputs/python.sty index 831143f..d98c4b1 100644 --- a/Doc/texinputs/python.sty +++ b/Doc/texinputs/python.sty @@ -286,17 +286,6 @@ \newif\if@UseModuleIndex \@UseModuleIndexfalse -% Fix the theindex environment to add an entry to the Table of -% Contents; this is much nicer than just having to jump to the end of -% the book and flip around, especially with multiple indexes. -% -\let\OldTheindex=\theindex -\renewcommand{\theindex}{ - \cleardoublepage - \OldTheindex - \addcontentsline{toc}{chapter}{\indexname} -} - \newcommand{\makemodindex}{ \newwrite\modindexfile \openout\modindexfile=mod\jobname.idx -- cgit v0.12