Normally (under pdflatex
with hyperref
) a section added with \section
will appear in both the LaTeX table of contents, and the pdf metadata; while a \section*
will be omitted from both.
Is it possible to include a (sub)section in the metadata, but not list it in the TOC?
(The use-case in question is end-of-chapter exercises and notes in a book: we want to keep the TOC uncluttered, but having bookmarks for these in the pdf is very convenient.)
Best Answer
The package
bookmark
provides a command\bookmark[OPTIONS]{title}
. You need to define a hypertarget and create a bookmark to it:bookmark
should be loaded afterhyperref
.