MakeIndex, Nomenclature, Glossaries and AcronymsIndex title problem

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Index title problem

Post by alicehs »

I need the Index title to be a "numbered section" so that my bookmarks work (because of my formatting, I need actual \section{} labels for everything, not \section*{} as is automatically used for the Index).

The glossaries package, for example, handles this well, with the use of the following [option]:

Code: Select all

\usepackage [section,numberedsection=autolabel,toc]{glossaries} 
Which makes sure that the glossary header is a numbered section header, and is bookmarked correctly. Does anyone know if there is something similar for the {makeidx} usepackage?

Either that or I need to know how to surpress the index title so that I can give it a pretend one. Any ideas...?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Index title problem

Post by nlct »

It's not makeidx that creates the section. It's the "theindex" environment that needs modifying and that depends on what class you are using. For example, if you are using the article class, the definition of "theindex" is

Code: Select all

\newenvironment{theindex}
               {\if@twocolumn
                  \@restonecolfalse
                \else
                  \@restonecoltrue
                \fi
                \twocolumn[\section*{\indexname}]%
                \@mkboth{\MakeUppercase\indexname}%
                        {\MakeUppercase\indexname}%
                \thispagestyle{plain}\parindent\z@
                \parskip\z@ \@plus .3\p@\relax
                \columnseprule \z@
                \columnsep 35\p@
                \let\item\@idxitem}
               {\if@restonecol\onecolumn\else\clearpage\fi}
You would need to redefine theindex to use \section instead of \section*. (See \@ and @ in macro names if you want to redefine code that contains internal commands.) I don't know if there are any classes that make it easier to customise the index (perhaps memoir does, but I haven't looked into it).

Regards
Nicola Talbot
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: Index title problem

Post by alicehs »

Thank you! Super helpful!

Works prefectly (yes, I am using article class).

Are there similar internal commands for the ToC and References sections? I'd like to do similar things...or do you have a suggestion what I can 'google' for to find them?
Post Reply