# Add dot to the end of section numbering in PDF bookmarks

I have dots at the end of section, subsection, etc. titles using the secdot package. And I'd like to insert a dot at the end of each section number in the PDF bookmarks too (I'm using hyperref).

Here is a screenshot what I'd like to achieve (see section 5 in the bookmarks on the left ), and a minimal working example (included packages and parts of the preamble which may cause problems, clashes):

\documentclass[12pt]{article}

\usepackage[a4paper, hscale=0.85, vscale=0.85]{geometry}
\usepackage[T1]{fontenc}
\usepackage{url}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[dotinlabels]{titletoc}
\usepackage{secdot}

\hypersetup{bookmarks=true,%
bookmarksnumbered=true,%
pdfencoding=unicode,%
pdfborder={0 0 0},%
citecolor=blue,%
urlcolor=blue,%
filecolor=blue}

\sectiondot{section}
\sectiondot{subsection}
\sectiondot{subsubsection}
\sectiondot{paragraph}
\sectiondot{subparagraph}

% changing the style of \paragraph and \subparagraph titles, so
% text after \paragraph and \subparagraph are broken into new lines
\makeatletter
\renewcommand\paragraph{%
\@startsection{paragraph}{4}{0mm}%
{-\baselineskip}%
{.3\baselineskip}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{%
\@startsection{subparagraph}{5}{0mm}%
{-\baselineskip}%
{.3\baselineskip}%
{\normalfont\normalsize\bfseries}}
\makeatother

\setcounter{secnumdepth}{5}

\begin{document}

\section{section}

section

\subsection{subsection}

subsection

\subsubsection{subsubsection}

subsubsection

\paragraph{paragraph}

paragraph

\subparagraph{subparagraph}

subparagraph

\end{document}


I've started to look into hyperref's code, but I couldn't find the part that I have to modify/patch/renew.

-

hyperref stores this formatting in \Hy@numberline. So, the following redefinition adds a . after every sectional number unit:
\makeatletter

Add it somewhere in your preamble after loading hyperref.