![Exclua seções de apêndices no toc, mas mantenha a lista de apêndices](https://rvso.com/image/461893/Exclua%20se%C3%A7%C3%B5es%20de%20ap%C3%AAndices%20no%20toc%2C%20mas%20mantenha%20a%20lista%20de%20ap%C3%AAndices.png)
Sei que esse é um problema comum, mas nenhuma das perguntas que li respondeu ao meu próprio problema. Então, depois de horas (dias?) de tentativas, eu mesmo preciso perguntar a você.
Usei o pacote apêndice para criar meu apêndice em um documento de artigo (é minha tese de mestrado). Finalmente consegui criar uma Lista de Apêndices. Aqui está meu código até agora:
O preâmbulo:
\documentclass[12pt, appendixprefix=true]{article}
% Sprache (english oder ngerman)
\usepackage[australian]{babel}
\usepackage{csquotes}
% Schriftart
\usepackage{mathpazo}
% Seitenformatierung und Abstände
\usepackage{geometry}
\geometry{a4paper,left=4cm, right=2cm, top=3cm, bottom=2cm}
\setlength{\parindent}{0mm}
\renewcommand{\baselinestretch}{1.5}
\setlength{\parskip}{0mm}
% Fußnoten und Kopfzeile
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyhead[L]{\leftmark} % set the left-hand side of the header to the current section
\fancyhead[R]{\thepage} % set the right-hand side of the header to the current page
% Pagestyle für Anhang
\fancypagestyle{appendices}{
\fancyhf{} % Clear default header/footer
\fancyhead[L]{APPENDIX} % Set left header
\fancyhead[R]{\thepage} % Set right header
}
[Many other packages and settings for the rest of the document]
% Biblatex
\usepackage{hyperref}
\usepackage[backend=biber,
citestyle=authoryear, % Zitieren im Text
bibstyle=authoryear, % Literaturverzeichnis Anzeige
giveninits=true, % Vornamen abkürzen
maxbibnames=3, % Nach 3 Autoren -> et al.
sorting=nyt, % Nach Name, Titel, Jahr
isbn=false, % ISBN nicht mit angeben
doi=true,
dashed=false] % DOI nicht mit angeben
{biblatex}
\addbibresource{references.bib}
% Appendix
\usepackage[titletoc]{appendix}
\usepackage{titletoc}
\usepackage{titlesec}
% Beginn des Dokuments
\begin{document}
% Titelseite
\input{Masterarbeit/Titelseite.tex}
\pagenumbering{Roman} % Römische Zahlen vor Hauptteil
% Gliederung
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents
\clearpage
% Einleitung
\pagenumbering{arabic} % Arabische Zahlen ab Kapitel 1
\pagestyle{fancy}
\input{Masterarbeit/1. Einleitung.tex}
[etc.]
% Literaturverzeichnis
\addcontentsline{toc}{section}{References}
\printbibliography
\clearpage
% Anhang
\appendix
\input{Masterarbeit/9. Appendix.tex}
\clearpage
% Ende des Dokuments
\end{document}
E então este é o código no meu apêndice:
% Only "Appendix" in TOC
% \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
\pagestyle{appendices}
% Appendixverzeichnis
\renewcommand{\appendixpagename}{\Large Appendix}
\appendixpage
\addcontentsline{toc}{section}{Appendix}
\startcontents[sections]
\printcontents[sections]{l}{1}{\setcounter{tocdepth}{2}}
\clearpage
\thispagestyle{fancy}
% Leitfaden Deutsch
\includepdf[ %erste Seite
offset= 1cm -1.5cm,
width=\dimexpr\textwidth,
pages=1,
trim=0cm 0cm 0cm 0cm,
clip,
frame=true,
pagecommand={\thispagestyle{fancy}
\section{Interview Guidelines}
\subsection{German Guideline}}
]{Masterarbeit/Bilder/Leitfaden_de}
\includepdf[ % weitere Seiten
offset=1cm 0cm,
width=\dimexpr\textwidth,
pages=2-4,
frame=true,
pagecommand={\thispagestyle{fancy}}]{Masterarbeit/Bilder/Leitfaden_de}
% Leitfaden Englisch
\includepdf[ %erste Seite
offset= 1cm 0cm,
width=\dimexpr\textwidth,
pages=1,
trim=0cm 0cm 0cm 0cm,
clip,
frame=true,
pagecommand={\thispagestyle{fancy}\subsection{English Guideline}}]{Masterarbeit/Bilder/Leitfaden_eng}
\includepdf[ % weitere Seiten
offset=1cm 0cm,
width=\dimexpr\textwidth,
pages=2-4,
frame=true,
pagecommand={\thispagestyle{fancy}}]{Masterarbeit/Bilder/Leitfaden_eng}
Agora, tenho uma bela lista de apêndices que aparecem no \appendixpage
comando. No entanto, as seções e subseções ainda aparecem em meu índice. Quero que pare depois do "Apêndice".
Posso usar o \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
comando, então ele para depois do "Apêndice". Mas nesse caso, ele também para de gerar minha lista de apêndices no arquivo \appendixpage
.
Aqui estão algumas capturas de tela:
O que preciso mudar, por favor?