]> pere.pagekite.me Git - text-madewithcc.git/blob - myclass.cls
Copyedited for Tribe of Noise
[text-madewithcc.git] / myclass.cls
1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesPackage{myclass}[]
3
4 %% Just use the original class and pass the options
5 \LoadClassWithOptions{report}
6
7 \renewcommand{\baselinestretch}{1.2}
8
9 \makeatletter
10
11 \usepackage{hyphenat}
12 %
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
15 %
16 \def\maketitle{%
17 \titlerecto%
18 \titleverso}
19
20 \def\titlerecto{\begin{titlepage}%
21 \null\vfil
22 \vskip 160\p@
23 \begin{center}%
24 {\LARGE \@title \par}%
25 \vskip 3em%
26 {\Large
27 \lineskip .75em%
28 \begin{tabular}[t]{c}%
29 \@author
30 \end{tabular}\par}%
31 \vskip 20em%
32 {\large \DBKpublishername \par}
33 \vskip .75em%
34 {\large \DBKpublisheraddress \par}%
35 \end{center}\par
36 \vfil\null
37 \end{titlepage}}%
38
39 \def\titleverso{%
40 \def\titlepagefile{titlepg.input.tex}
41 \IfFileExists{\titlepagefile}{\input{\titlepagefile}}{}
42 }%
43
44 % Allow line break on hyphen (-) in URLs, to make sure long URLs in
45 % footnotes do not pass out of the margins.
46 \usepackage[hyphens]{url}
47
48 \newenvironment{colophon}{
49 \pagebreak %
50 % FIXME change when page size changes, use {x}{x*1.2}
51
52 % Note, these numbers are not correct any more for the sizes mentioned:
53 % \fontsize{6.5}{7.8}\selectfont % fits in one 4.25x6.875" pocket size page
54 % \fontsize{7.5}{9}\selectfont % fits in one 5.06x7.71" size page
55 % \fontsize{9.1}{10.92}\selectfont % fits in one 5.5x8.5" digest size page
56
57 \fontsize{8.2}{9.84}\selectfont % fits in one 6x9'' size page
58 \setlength{\parskip}{0.5em} %
59 \setlength{\parindent}{0pt} %
60 }{}
61
62 \usepackage{titlesec}
63 \titleformat{\chapter}{\huge}{\thechapter.}{20pt}{\hyphenpenalty=10000 \Huge}
64 \titleformat{\section}{\Large}{\thesection}{1em}{}
65 \titleformat{\subsection}{\large}{\thesubsection}{1em}{}
66 %% \titleformat{\paragraph}{\normalsize}{\theparagraph}{1em}{}
67 %% \titleformat{\subparagraph}{\normalsize}{\thesubparagraph}{1em}{}
68
69 \usepackage{titletoc}
70
71 % indented subsection (in toc)
72 \titlecontents{part}
73 [0.0cm] % left margin
74 {\vskip 0.5em} % above code
75 {% % numbered format
76 {\Large\thecontentslabel\quad}%
77 }%
78 {\Large} % unnumbered format
79 {\hfill \contentspage \vskip 0.2em} % filler-page-format, e.g dots
80
81
82 % indented subsection (in toc)
83 \titlecontents{chapter}
84 [0.0cm] % left margin
85 {} % above code
86 {% % numbered format
87 {\large\thecontentslabel.\quad}%
88 }%
89 {\large} % unnumbered format
90 {\hfill \contentspage} % filler-page-format, e.g dots