![排除目錄中的附錄部分,但保留附錄列表](https://rvso.com/image/461893/%E6%8E%92%E9%99%A4%E7%9B%AE%E9%8C%84%E4%B8%AD%E7%9A%84%E9%99%84%E9%8C%84%E9%83%A8%E5%88%86%EF%BC%8C%E4%BD%86%E4%BF%9D%E7%95%99%E9%99%84%E9%8C%84%E5%88%97%E8%A1%A8.png)
我知道這是一個常見問題,但我讀到的問題都沒有回答我自己的問題。所以,經過幾個小時(幾天?)的嘗試,我需要親自問你。
我已經使用附錄包在文章文件(這是我的碩士論文)中創建了我的附錄。我終於成功創建了一個附錄清單。到目前為止,這是我的程式碼:
序言:
\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}
然後這是我附錄中的程式碼:
% 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}
現在,我在命令中出現了一個很好的附錄清單\appendixpage
。但是,這些章節和小節仍然出現在我的目錄中。我希望它在“附錄”之後停止。
我可以使用該\addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
命令,然後它在“附錄”之後停止。但在這種情況下,它也會停止在\appendixpage
.
請問我需要改變什麼?