我有一本课本的文档,这个文档中有多个章节。此外,我将多个章节归为一个部分,因此我调用\part
来执行此操作。在我的文档末尾,我有附录,我从中开始\appendix
。有几个章节,我想在这里做同样的事情:将它们分组到一个名为“附录”的“部分”中。
所以我打电话给\part*{Appendices}
。但是,在目录中,此条目包含单词“Part”。我想知道我该怎么做才能删除那个单词“部分”对于该单个条目。
谢谢你,
下面是一个 MWE 示例
\documentclass[12pt,a4paper,oneside,openany]{book}
% *** FONTS AND TYPESETTING PACKAGES ***
%
\usepackage{titlesec}
\usepackage{titletoc}
% *** PAGE FORMATTING PACKAGES ***
%
\usepackage{appendix}
%
%% Macros & Preambles
%
%% ToC/LoFT formatting
\titlecontents{part} % Section
[0pt] % Left(-indent)
{\vspace{10pt}\filcenter\Large\bfseries} % Before contentslabel
{} % Format for numbered entry
{\partname\ \thecontentslabel} % Format for unnumbered entry
{} % Filler page format
[\vspace{12pt}] % After
%%
\makeatletter
\g@addto@macro\appendix{%
\addtocontents{toc}{\protect\renewcommand{\protect\partname}{Appendices}}%
}
\makeatother
\titlecontents{chapter} % Section
[0pt] % Left(-indent)
{\vspace{6pt}} % Before contentslabel
{\bfseries\chaptername\ \thecontentslabel\ } % Format for numbered entry
{\rmfamily\thecontentslabel} % Format for unnumbered entry
{\titlerule*{.}\contentspage} % Filler page format
[\vspace{6pt}] % After
%%
\makeatletter
\g@addto@macro\appendix{%
\addtocontents{toc}{\protect\renewcommand{\protect\chaptername}{\appendixname}}%
}
\makeatother
%% Page title-ing
\titleformat{\part}[block]%
{\filcenter\large\bfseries}%
{\partname\ \thepart:\ }%
{5pt}%
{\large}
\titleformat{\chapter}[display]%
{\normalfont\large\bfseries}%
{\vspace*{-40pt} \centering \chaptertitlename\ \thechapter}%
{40pt}%
{\vspace*{-20pt} \centering \large}
\titlespacing*{\chapter}{0pt}{20pt}{20pt}
\titlespacing*{name=\chapter,numberless}{0pt}{0pt}{20pt}
%%
\begin{document}
\frontmatter
%% TABLE OF CONTENTS
\cleardoublepage
{
\tableofcontents
}
\mainmatter
%% PART I
\newpage
\part{Part}
% Chapter II
\newpage
\chapter{Chapter}
{
\section{Section 1}
Test
\section{Section 2}
Test
}
%% APPENDIX
\appendix
\newpage
\part*{Appendices}
% Appendix A
\newpage
\chapter{Appendix}
{
Test
}
\end{document}