Adding TOC Lines
Published on 30 Nov 2007Tags #LaTeX
Some environments will not automatically add an entry in the table of contents (e.g. bibliography).
The following commands will allow to correct this:
\phantomsection
\addcontentsline{toc}{TYPE}{Text}
Where TYPE is either one of part
, chapter
, section
depending on which level you want the bookmark to appear.
NOTE: `addcontentsline will create an entry in the table of contents which refers to the last macro which allows being referred to. This will most certainly not yield the desired effect. That's why the \
phantomsection` command is needed.
NOTE: It seems no harm is done when adding toc lines with the type part
for bibliography, index and such.