The problem is that the numbering for the sections (subsections, subsubsections) is restarting at each unnumbered chapter. Then, the section numbers are no longer unique. The numbers are used to construct anchor names, which must be unique.
Package hyperref
already uses \theH<counter>
if available to get a unique
number for \the<counter>
. The problem can be fixed by defining \theHchapter
for the unnumbered chapters, e.g.:
\chapter*{Premiere chapitre}
\def\theHchapter{1}
...
\chapter*{Deuxième chapitre}
\def\theHchapter{2}
...
LaTeX expands the options for a package in a hard way that might break arbitrary TeX code as given in the text for the information entries.
Therefore, they should be given after loading the package in \hypersetup
. Also pdfencoding=auto
or pdfencoding=unicode
is recommended to enable Unicode in the bookmarks and PDF information entries.
\usepackage[pdfencoding=auto, ...]{hyperref}
\hypersetup{
pdftitle={...},
pdfauthor={...},
% ...
}
Package geometry
is specified several times. Then, use it and remove the low level stuff \special{papersize=...}
(is done by geometry
with the correct driver). Also, the settings \textwidth=...
, ... can be replaced by options.
% More or less right after \documentclass, when
% the package is loaded the first time:
\usepackage[
includefootheight,
headheight=20pt,
footskip=22pt,
% ...
]{geometry}
Best Answer
I usually do this:
This uses the title defined by the
\title
command but you can use something else (then the\makeatletter
and\makeatother
are not needed).