1

in my thesis I have an abstract, the toc and then the content. The content sections start again with 1. When I add a subsection at the content section, the toc of the PDF is destroyed and shows something like this:

Abstract
----> Inhalt
      ----> Einleitung
            ----> title

instead of

Abstract
Inhalt
Einleitung
title

This is the code I'm using:

\documentclass[12pt,a4paper,bibliography=totocnumbered,listof=totocnumbered]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{hyperref}
\begin{document}
\renewcommand{\thesection}{\Roman{section}}
\pagenumbering{Roman}
\section{Abstract}
\renewcommand{\contentsname}{II Inhaltsverzeichnis}
\addcontentsline{toc}{section}{II Inhaltsverzeichnis}
\addtocounter{section}{1}
\tableofcontents
\renewcommand{\thesection}{\arabic{section}}
\setcounter{section}{0}
\pagenumbering{arabic}
\setcounter{page}{1}
\section{Einleitung}
% next line messes all up
\subsection{title}
\end{document}
  • 1
    You shouldn't use an article class (here scrartcl) for a thesis! Use either a book or report one. – Martin Scharrer Jun 20 '11 at 12:43
1

You get also a warning:

pdfTeX warning (ext4): destination with the same
 identifier (name{section.1}) has been already used, duplicate ignored

Gives the section numbers of hyperref a unique representation by redefining also \theHsection when you change \thesection. E.g.

\renewcommand{\theHsection}{\Roman{section}}

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.