[texhax] Getting the Index right and in the Table of Contents right

Philip G. Ratcliffe philip.ratcliffe at fastwebnet.it
Sun Dec 23 14:57:15 CET 2007


> I'm at my wits' end. Let me list the relevant code of the 
> book and point out the problem: \documentclass{book} 
> \usepackage{makeidx} \makeindex \begin{document} \frontmatter 
> \tableofcontents \pagestyle{myheadings} \chapter{Preface} 
> \markboth{book name}{Preface} \mainmatter \chapter{Blah Blah} 
> \markboth{book name}{Blah Blah} text \backmatter 
> \chapter{Index} \markboth{book name}{Index} \printindex \end{document}
>     I need the \chapter{Index} to get the Index in the Table 
> of Contents and its ancillary command \markboth to get the 
> page headings right. But it generates a blank page except for 
> the title "Index" and enters that page in the Table of 
> Contents. Then starting on the next page is the compiled 
> index, also with a title "Index." 

Look inside book.cls and you'll see how the theindex environment is defined
- you can redefine it (cut-and-paste) and chop out the bits you don't want.

Or take a look at the tocbibind package.

Sorry, don't have time for more now.

Cheers,  Phil



More information about the texhax mailing list