GeneralFull stops in pdf bokmarks

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
zaradek
Posts: 22
Joined: Fri Jun 27, 2008 9:49 pm

Full stops in pdf bokmarks

Post by zaradek »

How is it possible to put a full stop after each number in the pdf bookmarks automatically? I mean I want to get this:
1. chapter
1.1. section
instead this:
1 chapter
1.1 section
Thanks, Máté

Code: Select all

\documentclass{book}
\usepackage[bookmarksopen,bookmarksnumbered,bookmarksopenlevel=1]{hyperref}

\begin{document}

\chapter{chapter}
\section{section}
\section{section}
\chapter{chapter}
\section{section}
\section{section}

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Full stops in pdf bokmarks

Post by Juanjo »

Put the following code in the preamble:

Code: Select all

\makeatletter
\renewcommand{\@seccntformat}[1]{\csname the#1\endcsname.\quad}
\renewcommand{\numberline}[1]{\hb@xt@\@tempdima{#1.\hfil}}
\makeatother
You will get the point at least in the TOC and in the section title. However, adding the point to the pdf bookmarks seems to involve a hack of the hyperref package that is far away from my LaTeX skills.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Post Reply