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.

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}
share|improve this question
    
As in the other question of you, just provide a MWE ;-) –  Christian Hupfer Sep 4 at 13:02
    
The numbering can be done with sections as well ;-) –  Christian Hupfer Sep 4 at 13:08
    
when I use \section instead of \chapter I get .1 Appendix 1 and so on –  RichyGuitar Sep 4 at 13:12
    
The whole appendix thing is also very confusing for me, meh –  RichyGuitar Sep 4 at 13:13
    
I will provide a solution in a few minutes –  Christian Hupfer Sep 4 at 13:14

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer
    
Exactly what I was looking for, again: thank you very much! :) –  RichyGuitar Sep 4 at 13:41

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

share|improve this answer

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.