[Tex/LaTex] PDF bookmark customization

bookmarkspdf

I've seen a couple of PDFs which have come of their bookmarks ("index" tab in most viewers) set either in italics, bold or both.

Googling around I found that the bookmark package is supposed to do this (I even used its \bookmarksetup{startatroot} command to have a bookmark to an unnumbered chapter before the first part of the document appear as it should) but I find the documentation a bit confusing.

I tried setting the style for the bookmarks with either

\bookmarksetup{italic}

and

\bookmarksetupnext{italic}

but it seems nothing happens.

Maybe it's a viewer issue (I'm using Evince 3.2.0 under Ubuntu right now).

Has anyone succeeded in this? how so?

Best Answer

According to the bookmark package documentation the font options for \bookmarksetup are bold (for bold bookmarks) and/or italic (for italics). There can be combined, if required. Here's an MWE with the output viewed in Adobe Acrobat Reader:

enter image description here

\documentclass{article}
\usepackage{bookmark}% http://ctan.org/pkg/bookmark
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\bookmarksetup{bold}% Default bold bookmarks
\begin{document}
\section{First section}
\lipsum[1]
\bookmarksetupnext{bold=false,italic}% Non-bold and italic bookmark only for next sectional unit
\subsection{A subsection}
\lipsum[1-2]
\section{Second section}
\lipsum[2]
\section{Last section}
\lipsum[3]
\end{document}