1

I am trying to get the PDF output of my thesis with bookmarks using hyperref package. I am able to get the sections and subsections displayed in bookmark however the chapter is not displayed. How can I get the chapter title displayed in this PDF output?

\documentclass[12pt]{report}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}


\usepackage{uncc-thesis}
\usepackage{subfig}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{graphicx,epstopdf}
\usepackage{rotating} 
\usepackage{float}
\usepackage{color}
\usepackage[numbers, square, comma, sort&compress]{natbib}
\bibpunct{[}{]}{,\!}{n}{}{;}
\usepackage[breaklinks=true, bookmarks=true, pdftoolbar=true, linktocpage=true,colorlinks=true,citecolor=blue]{hyperref}

\usepackage{setspace}
\usepackage{tocloft}
\usepackage[font=small,format=plain,labelfont=bf,textfont=it]{caption}

\begin{document}

\pdfbookmark[0]{Abstract}{abstract}
\begin{abstract}
This is the abstract.
\end{abstract}

\pdfbookmark[0]{Dedication}{dedication}
\dedication
Here is the dedication.

\pagebreak{}
\pdfbookmark[0]{Acknowledgements}{acknowledgements}
\acknowledgments
Here is the acknowledgement.

\begin{singlespace}

\clearpage
\phantomsection
\tableofcontents
\label{toc}
\clearpage

\phantomsection
\listoftables
\label{lot}
\clearpage

\phantomsection
\listoffigures
\label{lof}
\end{singlespace}


\pagebreak{}
\pdfbookmark[0]{List of Abbreviations}{listofabbreviations}
\listofabbreviations
\input{List-of-Abbreviations}

\pagebreak{}
\pdfbookmark[0]{List of Symbols}{listofsymbols}
\listofsymbols
\input{List-of-Symbols}

\include{Chapter_One}

\include{Chapter_Two}
\include{Chapter_Three}
%\include{Chapter-Four}
%\include{Chapter-Five}


\bibliographystyle{ieeetr}

\bibliography{PhDThesis_Bibtex_Final} % References file

\end{document}
1
  • 2
    This example is far from minimal. And the most important part, the code for the chapters, is even missing :-) I removed every package I don't have and everything which gave errors and created a file Chapter_One containing a chapter and some sections et voila, I get the chapter title in the bookmarks list. I suggest you remove stuff from your preamble until the bookmarks appear. This way you'll immediately find the reason. Apr 11, 2012 at 20:50

1 Answer 1

1

As others have said, you should load hyperref last of all your packages (you should also load subfig after caption). However, that alone doesn't fix the problem here. The redefinition of \@chapter in uncc-thesis.sty causes the bookmarks to disappear.

This seems to fix the problem. The uncc-thesis package is loaded, then \@chapter is redefined (again) and finally hyperref is loaded. The trick with MakeUppercase{\gdef... is explained here.

\usepackage{uncc-thesis}

\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \MakeUppercase{\gdef\noexpand\@temp{#1}} %NEW - puts an upper case 
                                                                  %version of #1 in \@temp
                         \addcontentsline{toc}{chapter}%
                                   {\protect{\@chapapp~\thechapter:\ \@temp}}% CHANGED
                    \else
                      \addcontentsline{toc}{chapter}{#1}%
                    \fi
                    \chaptermark{#1}%
%                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
%                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\makeatother

\usepackage[breaklinks=true, bookmarks=true, pdftoolbar=true, linktocpage=true,colorlinks=true,citecolor=blue]{hyperref}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .