-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
See also https://tex.stackexchange.com/questions/739259/adding-vspace-into-toc-but-not-into-partial-toc
If I add vertical space in the main TOC between the chapters of the mainmatter and those of the backmatter (using \addvspace), this space appears in an unexpected way also in the partial TOC.
\documentclass{book}
\usepackage{titlesec,titletoc}
\usepackage{lipsum}
\titleformat{\chapter}[display]
{\normalfont\centering}
{\Large\scshape\chaptertitlename\ \thechapter}
{0ex}
{\LARGE\MakeUppercase}
[\startcontents\printcontents{partial}{1}{\contentsmargin{0em}\fillast\small}]
\titlecontents*{partialsection}[0em]{\addvspace{3ex}}
{\thecontentslabel\hspace{.7em}}{}
{, \thecontentspage}[\hspace{1em}][.]
\titlecontents*{partialsubsection}[0em]{}
{\thecontentslabel\hspace{.7em}}{}
{, \thecontentspage}[\hspace{1em}(][\hspace{1em}][)]
\AddToHook{cmd/backmatter/after}{%
\addtocontents{toc}{\protect\addvspace{3ex}}
}
\begin{document}
\tableofcontents
\chapter{First Chapter}
\section{Section of First Chapter}
\subsection{Subsection of First Chapter}
\lipsum[1]
\backmatter
\chapter{Conclusions}
\section*{Section of Conclusions}
\subsection*{Subsection of Conclusions}
\lipsum[2]
\end{document}
Metadata
Metadata
Assignees
Labels
No labels