[Tugindia] Alphabetical lists

CV Radhakrishnan cvr at river-valley.org
Sun Dec 5 04:34:10 CET 2004


On Sun, December 5, 2004 6:56 am, Wagish Shukla said:

[...]

> Thanks a lot. This indeed worked. Now how to insert
> this kind of preamble in an index? I am using the
> index package which permits multiple indices. I would
> be grateful for help in the problem of adding a
> preamble and a postamble in 1) multiple indices 2)
> multiple glossaries and 3) multiple nomenclatures, all
> in the same document.

I have no idea which package you've been using to generate multiple
indices. Could you tell me which package it is?

> I may add that I tried \def\indexpreamble{This is a
> preamble text\begin{multicol{2}}} etc trying to
> imitate this. But apparently this does not work and
> the manual for the index package in the latex
> companion did not help. However, the latex companion
> index does have a preamble and apparently there must
> be a provision for a postamble.

Here is one way of doing what you wanted in the normal index of book.cls:

\documentclass{book}
\usepackage{multicol}
\makeindex

\makeatletter

\renewenvironment{theindex}
    {\columnseprule \z@
     \columnsep 35\p@
     \clearpage
     \@makeschapterhead{\indexname}\indexpreamble%
     \begin{multicols}{2}\small
     \@mkboth{\MakeUppercase\indexname}%
             {\MakeUppercase\indexname}%
     \thispagestyle{plain}\parindent\z@
     \parskip\z@ \@plus .3\p@\relax
     \let\item\@idxitem}
    {\end{multicols}\indexpostamble
    \clearpage}
\newcounter{cnt}\setcounter{cnt}{1}
\newcounter{xcnt}

\def\indexpreamble{This is the index preamble.}
\def\indexpostamble{This is index postamble.}

\def\next{\loop\ifnum\thexcnt<10
 \index{\Alph{cnt}!\arabic{xcnt}-Index}
 \stepcounter{xcnt}\repeat}

\makeatother

\begin{document}

\loop
 \ifnum\thecnt<27
    \begingroup
    \next
    \endgroup
    \index{\Alph{cnt}}
    \stepcounter{cnt}
    \setcounter{xcnt}{0}
\repeat

\InputIfFileExists{test.ind}{}{}

\end{document}



-- 
Radhakrishnan




More information about the tugindia mailing list