I think I have a solution.<div><br></div><div>Just before the <b>\printindex</b> command, I inserted the command <b>\newpage</b> and then the command<b> \addcontentsline{toc}{chapter}{\protect\numberline{}Index}</b></div><div>
<br></div><div>That seems to produce a Table of Contents with the correct page number for the Index without forcing a page break for the index.</div><div><br></div><div>I hope this is a stable solution.</div><div><br clear="all">
R. Bhaskar<br><br>106 Larchwood Drive<br>Cambridge, MA 02138<br>617-501-2110<br> <br>
<br><br><div class="gmail_quote">On Sun, May 30, 2010 at 2:19 PM, Barbara Beeton <span dir="ltr"><<a href="mailto:bnb@ams.org">bnb@ams.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"> I've been trying to generate a table of contents entry that includes the<br>
Index. The standard \printindex produces a gorgeous Index of course. But<br>
neither \*printindex* nor an* \addcontentsline{toc}{chapter}{\numberline<br>
~Index}* produce an entry for Index in the Table of Contents. All the<br>
other entries in the Table of Contents are at the Chapter Level only.<br>
Any suggestions, please?<br>
<br>
</div>try this.<br>
determine the correct page number for the<br>
first page of the index, and substitute it<br>
for NN in this line:<br>
<br>
\addtocontents{toc}{chapter}{Index}{NN}<br>
<br>
insert this directly *before* \printindex .<br>
<br>
the "standard" latex document classes don't<br>
insert the titles of starred (unnumbered)<br>
chapters in the t-of-c. \printindex reads<br>
in the .ind file with the assumption that<br>
the index entries are wrapped in<br>
\begin{theindex}<br>
...<br>
\end{theindex}<br>
and the generation of a contents line would<br>
be triggered in the processing of the \begin<br>
expansion. if you add the line after<br>
\printindex, it would still be okay as long<br>
as you explicitly give the correct page<br>
number, but if you use \addcontentsline and<br>
expect an automatic page number, that will<br>
be incorrect. of course, you can fiddle with<br>
the page counter and make it work automatically,<br>
but it's really a pain.<br>
<br>
the ams document class amsbook.cls *does*<br>
include all unnumbered chapters and sections<br>
in the t-of-c. this is a design decision.<br>
if you have the determination to look at the<br>
code, you will find the difference in the<br>
definitions of \@schapter in amsbook.cls<br>
and book.cls; compare these with the defs<br>
of \@chapter.<br>
<div class="im"><br>
I have a feeling this is a dumb question, but I can't find the source files<br>
for the Mittleback and Goosens Latex Companion which does have an entry for<br>
the Index in the Table of Contents!<br>
<br>
</div>you won't be able to find those source files.<br>
the latex companion is copyright, and not<br>
public. the fact that the source file for<br>
the texbook is public is owing to the<br>
unusual generosity of don knuth; however,<br>
please note that it should not be tex'ed<br>
without explicit permission (which has been<br>
granted only for purposes of timing tests<br>
and validation of tex implementations on<br>
various platforms, with the output not to<br>
be distributed).<br>
<font color="#888888"> -- bb<br>
</font></blockquote></div><br></div>