[texhax] Extra text in index

Phil Parker phil at math.wichita.edu
Sat May 30 07:51:13 CEST 2009


On 05/29/2009 at 09:33 AM, Anders Källström <anders at texnat.se> wrote:
>
>Is there a simple way to put some additional text in an index, after the 
>heading but before the index entries?

I don't know if this counts a simple or not, but this is what I figured out for LaTeX 2.09 about 1992 or so. The book was published, but we never converted it to 2e so YMMV.


%This block redefines \theindex to get some text at the beginning of the
%Index as in sample books, and put Index in the toc.
\def\theindex{\@restonecoltrue\if at twocolumn\@restonecolfalse\fi
\columnseprule \z@
\columnsep 35\p@\twocolumn[\@makeschapterhead{\indexname}
\small Boldface page numbers indicate that the item occurs on that page in
{\bf boldface}, Italic page numbers indicate occurrence in {\em Italics}. 
Terms being defined are usually in boldface in the text.
\bigskip\bigskip]%
\@mkboth{\uppercase{\indexname}}{\uppercase{\indexname}}%
    \thispagestyle{plain}\parindent\z@
    \parskip\z@ plus .3\p@\relax\let\item\@idxitem
\addcontentsline{toc}{chapter}{Index}}


All I did was copy the definition from latex.tex and determine by trial and error where and how to insert my text.

For me, a relative newcomer at the time, the harder part was figuring out how to write the macros to accomplish the desired indexing.

-- 
    Phil Parker
--------------------------------------------
URL http://www.math.wichita.edu/~pparker/
Random quote:
  A well adjusted person is one who makes the same mistake
  twice without getting nervous.




More information about the texhax mailing list