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

Donald F. Nelson dfnelson at charter.net
Sun Dec 23 01:09:29 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." 
   Can you help me? Thank you
Donald F. Nelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/texhax/attachments/20071222/583c86b1/attachment.html 


More information about the texhax mailing list