Adding TOC Lines

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.

Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.