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