0

This problem only occurs in my whole PhD thesis, and not in a MWE (shown here). Would the problem be the other packages I use besides the hyperref package?

MWE code (works well, see attached image):

\documentclass[12pt,twoside]{report}

\usepackage[left=2.0cm,right=2.0cm,top=2.25cm,bottom=2.25cm,bindingoffset=6mm]{geometry}    % document format geometry
\usepackage{setspace}                                                                       % set line spacing
\usepackage[T1]{fontenc}                                                                    % font encoding
\usepackage[utf8]{inputenc}                                                                 % characters
\usepackage[hidelinks=true]{hyperref}                                                       % hyperlink for cross-references (images, references, lof, toc, etc)

\begin{document}

    \pagenumbering{roman}

    \chapter*{A}
    \addcontentsline{toc}{chapter}{A}

    \chapter*{B}
    \addcontentsline{toc}{chapter}{B}

    \chapter*{C}
    \addcontentsline{toc}{chapter}{C}

    \chapter*{D}
    \addcontentsline{toc}{chapter}{D}

    \newpage
    \addcontentsline{toc}{chapter}{Table of Contents}
    \begin{onehalfspace}
        \tableofcontents
    \end{onehalfspace}

    \clearpage
    \pagenumbering{arabic}

    \chapter*{Introduction}
    \addcontentsline{toc}{chapter}{Introduction}

\end{document}

Preamble of thesis (doesn't work correctly, see attached image):

\documentclass[12pt,twoside]{report}

% Packages
\usepackage[left=2.0cm,right=2.0cm,top=2.25cm,bottom=2.25cm,bindingoffset=6mm]{geometry}    % document format geometry
\usepackage{setspace}                                                                       % set line spacing
\usepackage[T1]{fontenc}                                                                    % font encoding
\usepackage[utf8]{inputenc}                                                                 % characters
\usepackage[bitstream-charter]{mathdesign}                                                  % Elsevier journal pseudo-font type
\usepackage{textcomp}                                                                       % font and symbols
\usepackage{textgreek}                                                                      % greek letters in text
\usepackage{fixltx2e}                                                                       % use subscript
\usepackage[font=small]{caption}                                                            % figure font size
\usepackage[hypcap]{caption}                                                                % link to top of image/table
\usepackage[hidelinks=true]{hyperref}                                                       % hyperlink for cross-references (images, references, lof, toc, etc)
\usepackage[md]{titlesec}                                                                   % remove bold of titles
\usepackage{graphicx}                                                                       % include graphics
\usepackage{subfigure}                                                                      % subfigures
\usepackage{epstopdf}                                                                       % incluir EPS
\usepackage[subfigure]{tocloft}                                                             % dots in ToC, font type, subfigure to avoid conflicts, etc
\usepackage[Lenny]{fncychap}                                                                % change font type of titles in chapters, etc
\usepackage{pdfpages}                                                                       % include pdf
\usepackage[square,authoryear]{natbib}                                                      % references
\usepackage{etoolbox}                                                                       % italics for citation
\makeatletter                                                                               % italics for citation
\patchcmd{\NAT@test}{\else\NAT@nm}{\else\NAT@nmfmt{\NAT@nm}}{}{}                            % italics for citation
\let\NAT@up\itshape                                                                         % italics for citation
\makeatother                                                                                % italics for citation
\usepackage{multirow}                                                                       % multirow in table
\usepackage{multicol}                                                                       % multicolumns in lists (eg. abbreviations)
\usepackage{wallpaper}                                                                      % background image for front/back cover
\addtolength{\wpXoffset}{-11.0cm}                                                           
% offset in x for wallpaper only for \ThisCenterWallPaper
\setlength\cftbeforefigskip{15pt}                                                           % line spacing between figures in LoF
\renewcommand\cfttoctitlefont{\huge}                                                        % remove bold from ToC title
\renewcommand\cftloftitlefont{\huge}                                                        % remove bold from LoF title
\renewcommand{\cftchapfont}{\mdseries}                                                      % remove bold in ToC contents
\renewcommand\contentsname{Table of Contents}                                               % replace 'Contents' by 'Table of Contents'
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}                                      % add dots
\renewcommand{\cftchappresnum}{Chapter }                                                    % prefix 'Chapter' to chapter number in 'Table of Contents'
\cftsetindents{chapter}{0em}{6em}                                                           % indentation of chapters
\addtocontents{toc}{~\hfill\textmd{Page}\par}                                               % add 'Page' to ToC
\AtBeginDocument{\renewcommand{\bibname}{References}}                                       % replace 'Bibliography' with 'References'
\renewcommand\thesection{\arabic{section}}                                                  % change the 0.1 to 1 in sections

Any pointers are very welcomed,

enter image description here enter image description here

4
  • You should add \phantomsection before \addcontentsline. But it's handier to use the book class, issuing \frontmatter instead of \pagenumbering{roman} and using \chapter without the need of \addcontentsline. Place \mainmatter where you have \clearpage\pagenumbering{arabic}. – egreg Sep 8 '14 at 13:50
  • @Gery: What should the Bookmark outline show us? A huge number of bookmarking levels? ;-) – user31729 Sep 8 '14 at 13:58
  • @egreg thanks! \phantomsection did the trick, I didn't know about the benefits of using the book class, I will take a look at it, thanks again. – Gery Sep 8 '14 at 13:59
  • @ChristianHupfer :v haha yeah!, but that wasn't the intention! 8-) – Gery Sep 8 '14 at 14:00