I have to put the table of contents into the table of contents. I do this with the following code. But the entry in the toc must have a roman section number and this section number appears in the toc of the pdf. Is there a way to add "II. Inhaltsverzeichnis" to the latex toc and "Inhaltsverzeichnis" to the pdf toc? In the pdf toc or bookmarks window I see:
- Abstract
- II. Inhaltsverzeichnis <-- Should be only Inhaltsverzeichnis
- Test
The code:
\documentclass[12pt,a4paper]{scrartcl}
\usepackage[pdfpagelabels=true]{hyperref}
\begin{document}
% roman
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\theHsection}{\Roman{section}}
\section{Abstract}
Abstract.
% add toc to toc with section number
\renewcommand{\contentsname}{II. Inhaltsverzeichnis}
\addcontentsline{toc}{section}{II. Inhaltsverzeichnis}
\tableofcontents
% arabic and start with 1
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\theHsection}{\arabic{section}}
\setcounter{section}{0}
\section{Test}
Test.
\end{document}