]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Merge pull request #9 from marsgui/master
authorpetterreinholdtsen <pere@hungry.com>
Sun, 9 Aug 2015 06:35:44 +0000 (08:35 +0200)
committerpetterreinholdtsen <pere@hungry.com>
Sun, 9 Aug 2015 06:35:44 +0000 (08:35 +0200)
Make TOC more compact + endnotes more pretty.

1  2 
data/dblatex-endnotes.xsl
myclass.cls

index 119022f426163dbb0d22889e82f1ddb99c92f7b5,c0ee541c4b088ae53e9e8e209f6d9886500ea540..5253af9e880c828ccb9340ba36ccf197a87709b6
@@@ -12,26 -12,17 +12,26 @@@ in front of it
      <xsl:text>
  \usepackage{endnotes}
  \let\footnote=\endnote
- \def\enoteheading{\mbox{}\par\vskip-\baselineskip }
+ \def\enoteheading{\mbox{}\par\vskip-0.2\baselineskip }
+ % More pretty looking note
+ \def\enoteformat{\rightskip=0pt \leftskip=21pt \parindent=-13pt
+ \leavevmode\llap{\makeenmark}\hspace*{11pt}}
  
 +% Increase footnote/endnote size to be more than 6 pts, to avoid
 +% complaint from Lulu about the font being too small to be printed
 +% clearly.  Needed at least for pocket size books.
 +% Probably wise to use the same size as the colophon page (see myclass.cls)
 +
 +% Use one of these (adjust numbers, x, x*1.2), 6>= 6
 +\def\enotesize{\normalsize}
 +%\def\enotesize{\fontsize{10}{12}\selectfont}
 +
  % Trick to avoid many words sticking out of the right margin of the text.
  % Need to add it here with the end notes, as only one
  % latex.begindocument can be active.
  \sloppy
  
- % Hack to get correct chapter numbering with dblatex, as chapter
- % labels are ignored.
- \setcounter{chapter}{-1}
  \begin{document}
      </xsl:text>
  
diff --combined myclass.cls
index 95e2604b934bbc6de61efe3440da5b4135ee3e9b,ff0943a71ec2fb1a09d3aac16390e78fd866e3c0..546c27ea9cf2e326978cca0c31198447af8eb14b
@@@ -5,9 -5,6 +5,9 @@@
  \LoadClassWithOptions{report}
  % report, book, memoir, scrreprt or scrbook ?
  
 +% Show frames, make it easier to debug borders
 +%\usepackage{showframe}% http://ctan.org/pkg/showframe
 +
  % Divide by 2 the index item indentation (10pt -> 5pt)
  \makeatletter
  \renewcommand\@idxitem{\par\hangindent 20\p@}
@@@ -49,9 -46,7 +49,9 @@@
  
  \newenvironment{colophon}{
    \pagebreak %
 -  \fontsize{7}{8.4}\selectfont %
 +  \fontsize{6.5}{7.8}\selectfont % fits in one pocket size page
 +%  \fontsize{7.5}{9}\selectfont % fits in one 5.06x7.71" size page
 +%  \fontsize{8.5}{10.2}\selectfont % fits in one 5.5x8.5" size page
    \setlength{\parskip}{0.5em} %
    \setlength{\parindent}{0pt} %
  }{}
@@@ -83,7 -78,7 +83,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
  {0.75em} % space between dots
  [\addvspace{0pt}]
  
  %% Redefines the headings to remove the chapter label
  \titleformat{\chapter}[block]
 -{\filcenter\huge}{\filcenter}{20pt}{\Huge}
 +{\filcenter\Large}{\filcenter}{20pt}{\Large}
  
  \titleformat{\section}
  {\filcenter\Large\bfseries}{\thesection}{1em}{}
  
  \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