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