0

I want to create a document with table of contents for the main part and the appendix and hyperrefs for the generated pdf. My attempt so far:

\documentclass[12pt]{article}
\usepackage[pdfpagelabels=true]{hyperref}
\usepackage[toc,page,header]{appendix}
\usepackage{minitoc}

% Make the "Part I" text invisible
\renewcommand \thepart{}
\renewcommand \partname{}


\begin{document}

\begin{titlepage}
cover sheet
\end{titlepage}

\doparttoc
\faketableofcontents
\part{}
\parttoc
\newpage

\section{Section 1}
\newpage
\section{Section 2}
\newpage
\section{Section 3}
\newpage
\section{Section 4}
\newpage


\newpage


\begin{titlepage}
appendix
\end{titlepage}

\appendix
\pagenumbering{Roman}
\setcounter{page}{2}

\part{Appendix}
\parttoc
\newpage

\section{Appendix 1}
\newpage
\section{Appendix 2}

\end{document}

I have trouble with the following aspects:

  • The language of the document is German, how can the table of contents be renamed? ("Table of contents" -> "Inhaltsverzeichnis")
  • The hyperrefs in the PDF are messed up because of the included part for the minitoc. The sections should be at the first level, the appendix is correct.

enter image description here

1

The empty top-level bookmarks entry is caused by \part{}. The bookmark for this "fake" entry can be disabled by:

\hypersetup{bookmarkstype=none}
\part{}
\hypersetup{bookmarkstype=toc}

The German part is easy, the traditional table of contents is covered by

\usepackage[ngerman]{babel}

And the language option can be given to minitoc for its names:

\usepackage[ngerman]{minitoc}
  • Thanks, both issues are solved. If i use German translation, the word part / "Teil" before the table of contents is not hidden. In my example I used two commands to hide it, but it only works in English. Do you know a solution for this, too? – CGX106 Apr 21 '14 at 13:40
  • @CGX106: Either redefine it locally or use \addto{\captionsngerman}{\renewcommand*{\partname}{}}, if babel is loaded. – Heiko Oberdiek Apr 21 '14 at 14:53

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.