TeXipedia

bookmark

Enhances PDF document navigation by providing advanced bookmark and outline management capabilities with single-pass compilation.

Overview

Streamlines and extends PDF bookmark functionality beyond basic hyperref capabilities, offering precise control over document navigation structure and appearance. The package significantly improves the PDF reading experience through enhanced outline organization.

  • Enables customization of bookmark styles, colors, and hierarchical structure
  • Supports various action types including URI links, external document references (GoToR), and named destinations
  • Optimizes compilation by generating bookmarks in a single pass, improving efficiency over hyperref's two-pass requirement
  • Particularly valuable for large documents, technical manuals, and academic works where structured navigation is essential

Getting Started

To use bookmark, include it in your document preamble:

\documentclass{article}
\usepackage{hyperref}  % Required dependency
\usepackage{bookmark}

The bookmark package enhances the bookmark functionality of hyperref. Unlike hyperref which requires two compilation runs, bookmark generates the bookmarks in the first run.

Examples

Creating bookmarks with different action types (URI and Named destinations).

\documentclass{article}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{bookmark}
\usepackage{lipsum}

\begin{document}

\section{Introduction}
\lipsum[1]

\bookmark[level=0,color=green,uri={https://www.ctan.org}]{Visit CTAN}

\section{Main Content}
\hypertarget{important}{}
\lipsum[2-3]

\bookmark[level=0,color=blue,named=important]{Jump to Important Content}

\section{Conclusion}
\lipsum[4]

\end{document}

Advanced bookmark organization with custom styles and nested structure.

\documentclass{article}
\usepackage{hyperref}
\usepackage{bookmark}
\usepackage{xcolor}
\usepackage{lipsum}

\bookmarksetup{open=true,numbered=true}

\begin{document}

\bookmark[level=0,bold,color=red,dest=intro]{Document Overview}

\section{Introduction}
\bookmark[level=1,italic,color=blue,dest=about]{About This Document}
\lipsum[1]

\section{Methodology}
\bookmark[level=1,bold,italic,color=green,dest=methods]{Research Methods}
\lipsum[2]

\subsection{Data Collection}
\bookmark[level=2,color=cyan,dest=data]{Collection Procedures}
\lipsum[3]

\subsection{Analysis}
\bookmark[level=2,color=magenta,dest=analysis]{Statistical Approach}
\lipsum[4]

\section{Results}
\bookmark[level=1,bold,color=orange,dest=results]{Key Findings}
\lipsum[5]

\end{document}