]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Make the TOC more compact.
authorben <ben@saturne.(none)>
Sat, 8 Aug 2015 12:20:14 +0000 (14:20 +0200)
committerben <ben@saturne.(none)>
Sat, 8 Aug 2015 12:20:14 +0000 (14:20 +0200)
myclass.cls

index 9b1ca43ca36e8283349fe0bb444267497d9c4aab..ff0943a71ec2fb1a09d3aac16390e78fd866e3c0 100644 (file)
@@ -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}
 
 \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