3

I'm using classicthesis for my dissertation. By default the TOC begins with "List of Figures", "List of Tables", and "Listings" as can be seen in the Contents.tex source file.

I would like the TOC to list "Dedication", "Acknowledgements", "Foreword", and "Abstract" before "List of Figures", etc.

I have attempted to do this by adding the following code just before the code for "List of Figures" in Contents.tex.

\addcontentsline{toc}{chapter}{Dedication}
\pdfbookmark[1]{Dedication}{Dedication}

\addcontentsline{toc}{chapter}{Acknowledgements}
\pdfbookmark[1]{Acknowledgements}{Acknowledgements}

\addcontentsline{toc}{chapter}{Foreword}
\pdfbookmark[1]{Preface}{Foreword}

\addcontentsline{toc}{chapter}{Abstract}
\pdfbookmark[1]{Abstract}{Abstract}

This places these four entries into the TOC in the correct position, but they all get assigned the same page number: the roman page number that immediately follows the TOC (the same page number as "List of Figures").

How do I get the TOC to recognize the correct roman page numbers of these four preceding chapters?

Thanks.

  • 1
    Welcome to TeX.SX! You need \clearpage\phantomsection before \addcontentsline (and no \pdfbookmark). – egreg Jul 29 '13 at 20:00
  • Thank you, egreg. I just tried this and it made no change to my TOC. Do you suppose that I need some labeling code in each of my four chapter files, e.g., Dedication.tex? – Andrew Sundstrom Jul 29 '13 at 20:04
  • Compile another time: changes to the .toc file are obeyed after two runs of LaTeX. – egreg Jul 29 '13 at 20:14
  • I tried this too; no change. To clarify, these are my four code lines now: \clearpage\phantomsection\addcontentsline{toc}{chapter}{Dedication} \clearpage\phantomsection\addcontentsline{toc}{chapter}{Acknowledgements} \clearpage\phantomsection\addcontentsline{toc}{chapter}{Preface} \clearpage\phantomsection\addcontentsline{toc}{chapter}{Abstract} – Andrew Sundstrom Jul 29 '13 at 20:18
  • The \clearpage... commands should go before the dedication, acknowledgment and so on. – egreg Jul 29 '13 at 20:31
2

You should do, for instance,

\cleardoublepage
\phantomsection
\addcontentsline{toc}{chapter}{Acknowledgements}

\chapter*{Acknowledgments}

Text of the acknowledgments.

A simpler way, when using as base class scrbook or scrreprt, is to say

\addchap{Acknowledgments}

that does automatically the addition to the table of contents (hyperref takes care of the bookmarks).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.