% /u/sy/beebe/tex/dvi/doc/gnuindex.sty, Wed Jan 4 08:45:32 1995 % Edit by Nelson H. F. Beebe % Fix bug in \@WRSUBINDEX, and add space after comma in definition % of \secondary. % GNUINDEX.STY.2, 18-Oct-86 15:44:17, Edit by BEEBE % Indexing macros for LaTeX and TeXIDX % Usage: % \INDEX{sortkey}{primaryentry} % \SUBINDEX{sortkey}{primaryentry}{secondaryentry} % % For \SUBINDEX, the {secondary} field is automatically appended % to the sort key, but separated from it by an ASCII % character, so that % \SUBINDEX{foo}{foo}{bar} % sorts before % \SUBINDEX{foo}{foo}{baz} % and % \INDEX{foo bar}{foo bar}{bar} % % The keys will be "foo{bar}", "foo{baz}", and "foo % bar", respectively. % \def\initial#1{\bigbreak{\raggedright\large\bf #1}\kern 2pt\penalty3000} \def\entry#1#2{\item {#1}, #2} \def\primary#1{\item {#1}} \def\secondary#1#2{\subitem {#1}, #2} \def\INDEX{\@bsphack\begingroup\@sanitize\@WRINDEX\@indexfile} \def\@WRINDEX#1#2#3{\let\thepage\relax \xdef\@gtempa{\write#1{\string \entry{#2}{\thepage}{#3}}}\endgroup\@gtempa \if@nobreak \ifvmode\nobreak\fi\fi\@esphack} % \def\SUBINDEX{\@bsphack\begingroup\@sanitize\@WRSUBINDEX\@indexfile} % % \entry{#2#4} changed to \entry{#3#4} following bug % report from Jozef A. Ghijselen, University of Gent, % St.-Pietersnieuwstraat 41,B-9000 Gent, Belgium, ghijselen@elmape.rug.ac.be % on Wed Jan 4 08:45:20 1995 \def\@WRSUBINDEX#1#2#3#4{\let\thepage\relax \xdef\@gtempa{\write#1{\string % NB: #3#4, NOT #3#4 in the next line \entry{#3 #4}{\thepage}{#3}{#4}}}\endgroup\@gtempa \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}