# PDF bookmarks are not in order

I'm using class report and hyperref, and it seems that I'm having a problem with sections and especially when introducing subsections. In the .pdf file, the unnumbered chapter GH in my MWE listed below becomes part of the previous unnumbered chapter, when I add subsection within the previous chapter.

My full MWE follows (sorry for making it long):

\documentclass[10pt,a4]{report}

\usepackage[english]{babel}
\usepackage{setspace}
\usepackage{rotating}
\usepackage{multirow}
\usepackage{enumerate}
\usepackage{array,graphicx}
\usepackage[table]{xcolor}
\usepackage{fullpage}
\usepackage{fmtcount}
\usepackage{float}
\usepackage{pifont}
\usepackage{slashbox}
\usepackage{enumitem}
\usepackage{txfonts}
\usepackage{pxfonts}
\usepackage{longtable}
\setlength\LTleft{0pt}
\setlength\LTright{0pt}

\usepackage[T1]{fontenc}
\usepackage[left= 7.5em, right= 7.5em, bottom=13em]{geometry}
\hypersetup{
urlcolor     = blue, %Colour for external hyperlinks
citecolor    = red   %Colour of citations
}

\usepackage{tocstyle}
\usepackage{tocloft}
\renewcommand\cftpartdotsep{1}
\renewcommand\cftchapdotsep{1}
\renewcommand\cftsecdotsep{1}
\usetocstyle{standard}
\settocfeature{raggedhook}{\raggedright}

\makeatletter
\newcommand{\thickhline}{%
\noalign {\ifnum 0=}\fi \hrule height 2pt
\futurelet \reserved@a \@xhline
}
\newcolumntype{"}{@{\hskip\tabcolsep\vrule width 2pt\hskip\tabcolsep}}
\makeatother

\providecommand{\keywords}[1]{\textbf{\textit{Keywords ---}} #1}

\newcommand*\rot{\rotatebox{90}}

%\definecolor{Gray}{gray}{0.9}

%------------------------------------------------------------------------------------------
\usepackage[strict]{changepage}
\usepackage{framed}
\newenvironment{formal}{%
\def\FrameCommand{%
\hspace{50pt}%
{\color{blue}\vrule width 2pt}%
}%
\noindent\hspace{-4.55pt}% disable indenting first paragraph
\vspace{2pt}\vspace{2pt}%
}
{%
}

\renewcommand{\thesection}{\Alph{section}}

\rotatebox{90}{\parbox{#1}{\raggedright #2}}}

\renewcommand{\labelenumii}{\theenumii}

\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}

\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\rmfamily\LARGE\bfseries\color{black}}
{\chaptertitlename\ \thechapter}{18pt}{\Large}

\usepackage{graphicx}
\usepackage{lscape}

\begin{document}
\doublespacing
\author{\textbf{}}
\title{Report}
\maketitle
\singlespacing

\tableofcontents

\chapter*{AB}

\section{ab1}
\section{ab2}
\subsection{ab21}
\subsection{ab22}
\subsubsection{ab221}
\subsubsection{ab222}

\chapter*{CD}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\section{cd1}
\section{cd2}
\subsection{cd21}

\renewcommand*{\theHsection}{\theHchapter.\the\value{section}}

\chapter*{EF}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\section{ef1}
\section{ef2}
\section{ef3}

\chapter*{GH}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\chapter*{IJ}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\chapter*{KL}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\chapter*{MN}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\chapter*{OP}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\chapter*{RS}
\setcounter{section}{0}
\renewcommand*{\theHsection}{chX.\the\value{section}}

\chapter*{TU}

• Welcome to TeX.SE. I suspect you just need to re-run pdflatex. – Peter Grill Jun 16 '16 at 11:11
• (1) Welcome, (2) Full minimal example please, preamble is missing. Full MWE makes it a lot easier for others to help. If you are using \chapter* all over the palce, why not simple use \setcounter{secnumdepth}{-1} and then use \chapter? That disables numbering, and thus turns \chapter into \chapter* with the added bonus that the title is automatically added to the toc. – daleif Jun 16 '16 at 11:12
• What don't you just use pdflatex to compile instead of latex+dvips+ps2pdf, pdflatex` outputs directly into PDF. That is what most users are using nowadays, that is what Peter means – daleif Jun 16 '16 at 11:54