File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 101101\newcommand {\refbimodindex }[1]{\refmodule {#1}{built-in }}
102102\newcommand {\refstmodindex }[1]{\refmodule {#1}{standard }}
103103
104+ % support for the module index
105+ \newwrite\modindexfile
106+ \openout\modindexfile =modules.idx
107+
104108% Add the defining entry for a module
105- \newcommand {\defmodindex }[2]{\index {#1@{\tt #1} (#2module)|textbf}}
109+ \newcommand {\defmodindex }[2]{\index {#1@{\tt #1} (#2module)|textbf}%
110+ \write\modindexfile {#1 \thepage }}
106111\newcommand {\bimodindex }[1]{\defmodindex {#1}{built-in }}
107112\newcommand {\stmodindex }[1]{\defmodindex {#1}{standard }}
108113
238243\newenvironment {seealso}[0]{{\bf See Also: }}{\par }
239244\newcommand {\seemodule }[2]{\ref {module- #1 }: {\tt #1} (#2)}
240245\newcommand {\seetext }[1]{\par {#1}}
246+
247+ % Fix the theindex environment to add an entry to the Table of Contents;
248+ % this is much nicer than just having to jump to the end of the book and
249+ % flip around, especially with multiple indexes.
250+ %
251+ \let\OldTheindex =\theindex
252+ \def\theindex {%
253+ \OldTheindex %
254+ \addcontentsline {toc}{chapter}{\indexname }%
255+ }
You can’t perform that action at this time.
0 commit comments