]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorben <ben@saturne.(none)>
Sat, 1 Aug 2015 19:58:32 +0000 (21:58 +0200)
committerben <ben@saturne.(none)>
Sat, 1 Aug 2015 19:58:32 +0000 (21:58 +0200)
1  2 
myclass.cls

diff --combined myclass.cls
index bb8664b442645847cb493044acf14dbe80c72d83,6d87152ae924dc4ee3acc714c12c5833c8adfae4..5477cf92402eacc4d5312a7c197a8beb179e6caf
@@@ -5,38 -5,12 +5,38 @@@
  \LoadClassWithOptions{report}
  % report, book, memoir, scrreprt or scrbook ?
  
 +% Fix the page number reset done by abstract by redefining it
 +\def\nocount#1#2{}
 +\let\stdsetcounter\setcounter
 +\let\stdabstract=\abstract
 +\let\endstdabstract=\endabstract
 +\renewenvironment{abstract}{%
 +  \let\setcounter\nocount%
 +  \begin{stdabstract}%
 +  \noindent%
 +  \setlength\parskip{\medskipamount}%
 +  \setlength\parindent{0pt}%
 +}{
 +  \end{stdabstract}
 +  \let\setcounter\stdsetcounter
 +}
 +
 +% Divide by 2 the index item indentation (10pt -> 5pt)
 +\makeatletter
 +\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}
        \addcontentsline{toc}{chapter}{\indexname}
      \fi
    }
 +  % Adapt the vertical sizes to the smaller font
 +  \setlength{\baselineskip}{0.7\baselineskip}%
 +  \setlength{\parskip}{0.2\baselineskip}%
 +  \indexfont
  }{
    \end{stdindex}
  }
  \makeatother
  
 +\newenvironment{colophon}{
 +  \pagebreak %
 +  \fontsize{7}{8.4}\selectfont %
 +  \setlength{\parskip}{0.5em} %
 +  \setlength{\parindent}{0pt} %
 +}{}
 + 
 +
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Based on ideas from https://bugs.debian.org/684772
  \usepackage{titlesec}
  % Hint for figure with empty title: remove the colon label separator
  \usepackage{caption}
  \captionsetup[figure]{labelsep=none}
+ % Fix the page number reset done by abstract by redefining it
+ % Patch from
+ % https://github.com/petterreinholdtsen/free-culture-lessig/pull/7
+ \def\nocount#1#2{}
+ \let\stdsetcounter\setcounter
+ \let\stdabstract=\abstract
+ \let\endstdabstract=\endabstract
+ \renewenvironment{abstract}{%
+   \let\setcounter\nocount%
+   \begin{stdabstract}%
+   \noindent%
+   \setlength\parskip{\medskipamount}%
+   \setlength\parindent{0pt}%
+ }{
+   \end{stdabstract}
+   \let\setcounter\stdsetcounter
+ }