From 26ec1952014cd893102782ee24179bdd19b1f9e4 Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 8 Aug 2015 14:20:14 +0200 Subject: [PATCH] Make the TOC more compact. --- myclass.cls | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/myclass.cls b/myclass.cls index 9b1ca43..ff0943a 100644 --- a/myclass.cls +++ b/myclass.cls @@ -78,7 +78,7 @@ % Make TOC entries without label \titlecontents{chapter} % [1.5em] % -{\addvspace{1em plus 0pt}\bfseries} % +{\addvspace{0.3em plus 0pt}\bfseries} % {\hspace{-1.3em}} % no number, remove room reserved for it {\hspace{-1.3em}} % {\hfill \contentspage} % dots and page number @@ -91,7 +91,6 @@ {0.75em} % space between dots [\addvspace{0pt}] - %% Redefines the headings to remove the chapter label \titleformat{\chapter}[block] {\filcenter\huge}{\filcenter}{20pt}{\Huge} @@ -101,6 +100,22 @@ \titleformat{\subsection} {\filcenter\large\bfseries}{\thesubsection}{1em}{} + +%% New header, behaving like a chapter but formatted differently +\titleclass{\lotheader}{top}[\part] +\newcounter{lotheader} +\renewcommand{\thelotheader}{\Alph{lotheader}} + +\titleformat{\lotheader}[block] +{\filcenter\huge}{\filcenter}{20pt}{\Huge} +\titlespacing*{\lotheader}{0pt}{-30pt}{40pt} + +% Use the new header in TOC +\let\stdtoc=\tableofcontents +\let\stdchapter=\chapter +\def\tableofcontents{\let\chapter\lotheader \stdtoc{} \let\chapter\stdchapter} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % From -- 2.47.2