X-Git-Url: https://pere.pagekite.me/gitweb/text-free-culture-lessig.git/blobdiff_plain/338b8f4d696e8803a4cae832d6ef3302a6f99a23..d7174df1b51e7331eb0cc238de9a02b60a0e91bc:/myclass.cls

diff --git a/myclass.cls b/myclass.cls
index 7b5d657..73d0869 100644
--- a/myclass.cls
+++ b/myclass.cls
@@ -5,22 +5,53 @@
 \LoadClassWithOptions{report}
 % report, book, memoir, scrreprt or scrbook ?
 
-% Divide by 2 the index item indentation (10pt -> 5pt)
+% Show frames, make it easier to debug borders
+%\usepackage{showframe}% http://ctan.org/pkg/showframe
 \makeatletter
+
+% 
+% Customize the titlepage: remove the date, place the publisher name, and 
+% load a specific file for the verso page, containing some legal notices
+%
+\def\maketitle{%
+  \titlerecto%
+  \titleverso}
+
+\def\titlerecto{\begin{titlepage}%
+  \null\vfil
+  \vskip 160\p@
+  \begin{center}%
+    {\LARGE \@title \par}%
+    \vskip 3em%
+    {\Large
+     \lineskip .75em%
+      \begin{tabular}[t]{c}%
+        \@author
+      \end{tabular}\par}%
+      \vskip 20em%
+    {\large \DBKpublishername \par}
+    \vskip .75em%
+    {\large \DBKpublisheraddress \par}%
+  \end{center}\par
+  \vfil\null
+  \end{titlepage}}%
+
+\def\titleverso{%
+  \def\titlepagefile{titlepg.input.tex}
+  \IfFileExists{\titlepagefile}{\input{\titlepagefile}}{}
+}%
+
+
+% Divide by 2 the index item indentation (10pt -> 5pt)
 \renewcommand\@idxitem{\par\hangindent 20\p@}
 \renewcommand\subitem{\@idxitem \hspace*{10\p@}}
 \renewcommand\subsubitem{\@idxitem \hspace*{15\p@}}
-\makeatother
 
 % Put the index in the TOC
-\makeatletter
 \let\stdindex=\theindex
 \let\endstdindex=\endtheindex
 \renewenvironment{theindex}{
   \begin{stdindex}
-  % Use a smaller font except for the letter heading which is bold
-  \newfontfamily\indexfont[Scale=0.7,
-                           BoldFeatures={Scale=1}]{Crimson Text}
   \@ifundefined{chapter}{}{
     % To not have the number, replace by:
     % \addcontentsline{toc}{chapter}{\numberline{}\indexname}
@@ -46,7 +77,14 @@
 
 \newenvironment{colophon}{
   \pagebreak %
-  \fontsize{6}{7.2}\selectfont %
+% FIXME change when page size changes, use {x}{x*1.2}
+
+% Note, these numbers are not correct any more for the sizes mentioned:
+%  \fontsize{6.5}{7.8}\selectfont % fits in one 4.25x6.875" pocket size page
+%  \fontsize{7.5}{9}\selectfont % fits in one 5.06x7.71" size page
+%  \fontsize{9.1}{10.92}\selectfont % fits in one 5.5x8.5" digest size page
+
+  \fontsize{8.2}{9.84}\selectfont % fits in one 6x9'' size page
   \setlength{\parskip}{0.5em} %
   \setlength{\parindent}{0pt} %
 }{}
@@ -78,7 +116,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 +129,6 @@
 {0.75em} % space between dots
 [\addvspace{0pt}]
 
-
 %% Redefines the headings to remove the chapter label
 \titleformat{\chapter}[block]
 {\filcenter\Large}{\filcenter}{20pt}{\Large}
@@ -101,6 +138,38 @@
 
 \titleformat{\subsection}
 {\filcenter\large\bfseries}{\thesubsection}{1em}{}
+
+%% New header, behaving like a section but formatted differently
+\titleclass{\enoteheader}{straight}[\chapter]
+\newcounter{enoteheader}
+\renewcommand{\theenoteheader}{\Alph{enoteheader}}
+
+\titleformat{\enoteheader}
+{\normalfont\large}{}{0pt}{}
+\titlespacing*{\enoteheader}{0pt}{2.5ex plus 1ex minus .2ex}{1.3ex plus .2ex}
+
+\dottedcontents{enoteheader} %
+[0em] % was (3.8)
+{\addvspace{0pt}} % 
+{2.3em} % tab
+{0.75em} % space between dots
+[\addvspace{0pt}]
+
+%% 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
