我重新定义了目录,但我不想改变附录,
\titlecontents{chapter}[0pt]{\vspace{.5\baselineskip}\bfseries}
{*** \thecontentslabel ***\quad}{}
{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}
代码如下:
\documentclass[]{book}
\usepackage[bf,indentafter,pagestyles]{titlesec}
\usepackage{lipsum}
\usepackage{titletoc}
\titleformat{\chapter}
{\filcenter\normalfont\Large\bfseries}
{\chaptertitlename~} {0.5em} {}
\titlespacing{\chapter}{0pt}{*0}{*4}
\titlecontents{chapter}[0pt]{\vspace{.5\baselineskip}\bfseries}
{*** \thecontentslabel ***\quad}{}
{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}
\titlecontents{section}[2em]{\vspace{.25\baselineskip}}
{\S\thecontentslabel\quad}{}
{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}
\begin{document}
\lipsum[1-3]
\tableofcontents
\mainmatter
\chapter{title}
\section{aaa}
\lipsum[1-3]
\chapter{title}
\section{aaaa}
\lipsum[1-3]
\chapter{title}
\lipsum[1-3]
\appendix
\chapter{title}
\lipsum[1-3]
\chapter{title}
\lipsum[1-3]
one two three four
\backmatter
\chapter{title}
\end{document}
答案1
我找到了解决这个问题的方法,就在\附录重新定义格式。
\appendix
\titlecontents{chapter}[0pt]{\vspace{.1\baselineskip}\bfseries}
{new format \thecontentslabel\quad}{}
{\hspace{.5em}\titlerule*[5pt]{$\cdot$}\contentspage}