Bookmarks & metadata

A finished PDF should be navigable and self-describing — a bookmarks outline in the viewer’s sidebar, and metadata (title, author, keywords) in its document properties. Both come from hyperref, and bookmarks can be made sturdier with the bookmark package.

Bookmarks — auto-generated by hyperref

Just loading hyperref builds the PDF outline (bookmarks) automatically from your \section, \chapter, and similar headings (the navigable tree in the viewer’s sidebar; the data is written to jobname.out). Key options: bookmarks (on by default), bookmarksopen (start expanded), bookmarksopenlevel=N (how deep to expand), and bookmarksnumbered (include section numbers).

latex
\usepackage[bookmarksnumbered,bookmarksopen]{hyperref}
% あとから設定しても可 / or configure later:
\hypersetup{bookmarksopenlevel=1}

Add a bookmark by hand — \pdfbookmark

For entries not tied to a heading (a cover page, an unnumbered preface), add a manual bookmark with \pdfbookmark[level]{display text}{anchor}. To add one at the current level, use \currentpdfbookmark{display text}{anchor}.

latex
\pdfbookmark[section]{はじめに}{intro}

The bookmark package

The bookmark package (Heiko Oberdiek) replaces hyperref’s bookmark machinery with a more robust one (hyperref’s own bookmarks are disabled automatically). It needs fewer compilation passes and lets you style entries — bold, italic, color — per bookmark. Load it after hyperref. Worth adding whenever bookmarks matter.

latex
\usepackage{hyperref}
\usepackage{bookmark}        % hyperref の後に / after hyperref
\bookmarksetup{numbered, color=blue}

PDF metadata

Set the document’s properties (what shows in the viewer’s “Document Properties”) with \hypersetup{}pdftitle, pdfauthor, pdfsubject, pdfkeywords. The pdfcreator/pdfproducer fields identify the producing software and are usually filled automatically (e.g. “LaTeX with hyperref”). Good metadata helps search, citation, and accessibility.

latex
\hypersetup{
  pdftitle={論文のタイトル},
  pdfauthor={山田 太郎},
  pdfsubject={研究分野},
  pdfkeywords={LaTeX, 組版, PDF}
}