1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesPackage{myclass}[]
4 %% Just use the original class and pass the options
5 \LoadClassWithOptions{report}
6 % report, book, memoir, scrreprt or scrbook ?
8 % Show frames, make it easier to debug borders
9 %\usepackage{showframe}% http://ctan.org/pkg/showframe
13 % Customize the titlepage: remove the date, place the publisher name, and
14 % load a specific file for the verso page, containing some legal notices
20 \def\titlerecto{\begin{titlepage}%
24 {\LARGE \@title \par}%
28 \begin{tabular}[t]{c}%
32 {\large \DBKpublishername \par}
34 {\large \DBKpublisheraddress \par}%
40 \def\titlepagefile{titlepg.input.tex}
41 \IfFileExists{\titlepagefile}{\input{\titlepagefile}}{}
45 % Divide by 2 the index item indentation (10pt -> 5pt)
46 \renewcommand\@idxitem{\par\hangindent 20\p@}
47 \renewcommand\subitem{\@idxitem \hspace*{10\p@}}
48 \renewcommand\subsubitem{\@idxitem \hspace*{15\p@}}
50 \newenvironment{colophon}{
52 % FIXME change when page size changes, use {x}{x*1.2}
54 % Note, these numbers are not correct any more for the sizes mentioned:
55 % \fontsize{6.5}{7.8}\selectfont % fits in one 4.25x6.875" pocket size page
56 % \fontsize{7.5}{9}\selectfont % fits in one 5.06x7.71" size page
57 % \fontsize{9.1}{10.92}\selectfont % fits in one 5.5x8.5" digest size page
59 \fontsize{8.2}{9.84}\selectfont % fits in one 6x9'' size page
60 \setlength{\parskip}{0.5em} %
61 \setlength{\parindent}{0pt} %
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68 % https://amyrhoda.wordpress.com/2012/06/04/latex-to-lulu-the-making-of-aosa-other-useful-packages-and-settings/
70 % The microtype package provides the ability to micromanage your
71 % typography. When invoked without any options it does some nice things
72 % like protruding punctuation over the edge of the right margin to make
73 % the margin appear smoother. Basically it makes your book look more
74 % professional with very little effort. It also has a ton of options if
75 % you want to micromanage even more.
76 \usepackage{microtype}
78 % By dafault, LaTeX will try and make all your pages the length that
79 % you set using the geometry setting. If a page has images, tables,
80 % headings or paragraph breaks which make it shorter than that page
81 % length, LaTeX will pad the page by adding whitespace between
82 % elements. We thought that looked sillier than having pages be
83 % different lengths, so we used the raggedbottom command.
86 % Hint for figure with empty title: remove the colon label separator
88 \captionsetup[figure]{labelsep=none}
90 % Fix the page number reset done by abstract by redefining it
92 % https://github.com/petterreinholdtsen/free-culture-lessig/pull/7
95 \let\stdsetcounter\setcounter
96 \let\stdabstract=\abstract
97 \let\endstdabstract=\endabstract
98 \renewenvironment{abstract}{%
99 \let\setcounter\nocount%
102 \setlength\parskip{\medskipamount}%
103 \setlength\parindent{0pt}%
106 \let\setcounter\stdsetcounter