1

I redefine the table of contents, but I dont want to the appenix changed,

\titlecontents{chapter}[0pt]{\vspace{.5\baselineskip}\bfseries}
{*** \thecontentslabel ***\quad}{}
{\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}

enter image description here the codes as:

\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}
0

I found a method to solve this problem, just after \appendix redefine the format.

\appendix
\titlecontents{chapter}[0pt]{\vspace{.1\baselineskip}\bfseries}
{new format \thecontentslabel\quad}{}
{\hspace{.5em}\titlerule*[5pt]{$\cdot$}\contentspage}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.