Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
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
add comment

1 Answer

up vote 1 down vote accepted

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}}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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