From: ben Date: Sat, 8 Aug 2015 12:20:14 +0000 (+0200) Subject: Make the TOC more compact. X-Git-Tag: edition-2015-10-10~336^2 X-Git-Url: https://pere.pagekite.me/gitweb/text-free-culture-lessig.git/commitdiff_plain/26ec1952014cd893102782ee24179bdd19b1f9e4 Make the TOC more compact. --- 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