6

I want all bookmarks after "Anhang" (appendix) to be a level deeper, but I need them to be \chapter{} for the right numbering.

I write a scrbook document and that's what I got:

Issue

Is it possible to change the depth of the chapter to act like a section in the bookmarks?

UPDATE

MWE:

\documentclass[12pt,a4paper,oneside]{scrbook}

\usepackage[ngerman]{babel}     % deutsche Worttrennung
\usepackage[T1]{fontenc}        % Ausgabe von Sonderzeichen und Akzenten in PDF verbessert
\usepackage[utf8]{inputenc}         % Eingabe von Sonderzeichen möglich
\usepackage{lipsum}

\setcounter{secnumdepth}{3}     % subsubsections nummerieren
\setcounter{tocdepth}{3}        % subsubsections in TOC

\usepackage[ %
    pdfproducer={Texmaker},     % 
    pdfcreator={pdfLaTeX},      % 
    hidelinks,          % versteckt die Boxen um die Links in der PDF
    bookmarksnumbered,      % nummereiert Lesezeichen
    ]{hyperref}         % PDF Metainformationen hinzufügen 

\begin{document}

\appendix
\pagenumbering{alph}

\thispagestyle{empty}

\vspace*{3em}
\begin{center}
\begin{Huge}
\textbf{\textsf{Anhang}}
\pdfbookmark{Anhang}{Anhang}
\end{Huge}
\end{center}

\chapter{Appendix 1}

\chapter{Appendix 2}

\section{Appendix 2.1}

\section{Appendix 2.2}

\chapter{Appendix 3}

\end{document}
  • As in the other question of you, just provide a MWE ;-) – user31729 Sep 4 '14 at 13:02
  • The numbering can be done with sections as well ;-) – user31729 Sep 4 '14 at 13:08
  • when I use \section instead of \chapter I get .1 Appendix 1 and so on – RichyGuitar Sep 4 '14 at 13:12
  • The whole appendix thing is also very confusing for me, meh – RichyGuitar Sep 4 '14 at 13:13
  • Do you really want numbers for appendix counting or letters? – user31729 Sep 4 '14 at 13:15
4

The easiest way is to redefine the \toclevel@.... commands, to shift the levels down. Use this only in the appendix.

Do not add any other \chapter etc. after the appendix!

\documentclass[12pt,a4paper,oneside]{scrbook}
\setuptoc{toc}{totoc}
\usepackage[ngerman]{babel}     % deutsche Worttrennung
\usepackage[T1]{fontenc}        % Ausgabe von Sonderzeichen und Akzenten in PDF verbessert
\usepackage[utf8]{inputenc}         % Eingabe von Sonderzeichen möglich
\usepackage{lipsum}

\setcounter{secnumdepth}{3}     % subsubsections nummerieren
\setcounter{tocdepth}{3}        % subsubsections in TOC

\usepackage[ %
    pdfproducer={Texmaker},     % 
    pdfcreator={pdfLaTeX},      % 
    hidelinks,          % versteckt die Boxen um die Links in der PDF
    bookmarksnumbered,      % nummereiert Lesezeichen
    bookmarksopenlevel=4,
    bookmarksopen=true,
    ]{hyperref}         % PDF Metainformationen hinzufügen 

\usepackage[]{bookmark}

\begin{document}

\chapter{Dummy}


\cleardoublepage
\pagenumbering{alph}
\chapter*{\appendixname}
\appendix%
\addcontentsline{toc}{chapter}{\appendixname}

\makeatletter
\renewcommand{\toclevel@chapter}{1}
\renewcommand{\toclevel@section}{2}
\renewcommand{\toclevel@subsection}{3}
\renewcommand{\toclevel@subsubsection}{4}
\renewcommand{\toclevel@paragraph}{5}
\renewcommand{\toclevel@subparagraph}{6}
\makeatother


\chapter{Appendix One}


\chapter{Appendix Two}

\section{SubAppendix One}

\section{SubAppendix Two}

\subsection{SubSubAppendix One}

\chapter{Appendix Three}%

\end{document}

enter image description here

  • Exactly what I was looking for, again: thank you very much! :) – RichyGuitar Sep 4 '14 at 13:41
10

Set the next level (for Anhang) to be part.

\documentclass[12pt,a4paper,oneside]{scrbook}
\setuptoc{toc}{totoc}
\usepackage[ngerman]{babel}     % deutsche Worttrennung
\usepackage[T1]{fontenc}        % Ausgabe von Sonderzeichen und Akzenten in PDF verbessert
\usepackage[utf8]{inputenc}         % Eingabe von Sonderzeichen möglich
\usepackage{lipsum}

\setcounter{secnumdepth}{3}     % subsubsections nummerieren
\setcounter{tocdepth}{3}        % subsubsections in TOC

\usepackage[ %
    pdfproducer={Texmaker},     % 
    pdfcreator={pdfLaTeX},      % 
    hidelinks,          % versteckt die Boxen um die Links in der PDF
    bookmarksnumbered,      % nummereiert Lesezeichen
    bookmarksopenlevel=4,
    bookmarksopen=true,
    ]{hyperref}         % PDF Metainformationen hinzufügen 

\usepackage{bookmark}

\begin{document}

\chapter{Dummy}


\cleardoublepage
\appendix
\pagenumbering{alph}
\bookmarksetupnext{level=part}
\chapter*{\appendixname}
\addcontentsline{toc}{chapter}{\appendixname}


\chapter{Appendix One}


\chapter{Appendix Two}

\section{SubAppendix One}

\section{SubAppendix Two}

\subsection{SubSubAppendix One}

\chapter{Appendix Three}%

\end{document}

enter image description here

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.