\
section*
or
\
chapter*
for auto-generated parts of the document (the tables of
contents, lists of figures and tables, the bibliography and the index). As a
result, these items aren’t numbered (which most people don’t mind),
and (more importantly) they don’t appear in the table of contents.
The correct solution (as always) is to have a class of your own that
formats your document according to your requirements. The macro to do
the job (\
addcontentsline
) is fairly simple, but there is always
an issue of ensuring that the contents entry quotes the correct page.
Supposing that our the document is chapter-based (class report
or book, for example), the text:
\bibliography{frooble} \addcontentsline{toc}{chapter}{Bibliography}
will produce the wrong answer if the bibliography is more than one page long. Instead, one should say:
\cleardoublepage \addcontentsline{toc}{chapter}{Bibliography} \bibliography{frooble}
(Note that \
cleardoublepage
does the right thing, even if your
document is single-sided — in that case, it’s a synonym for
\
clearpage
). Ensuring that the entry refers to the right place is
trickier still in a \
section
-based class.
\cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{Bibliography} \bibliography{frooble}
The extra command (\
phantomsection
) gives hyperref
something to “hold on to” when making the link.
bibtotoc
to add the
bibliography to the table of contents); the memoir class includes
tocbibind itself.
This question on the Web: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=tocbibind