-
Notifications
You must be signed in to change notification settings - Fork 13
/
contract.cls
82 lines (77 loc) · 2.62 KB
/
contract.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
% Auth: Nicklas Vraa
% Docs: https://github.com/NicklasVraa/LiX
% ------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{contract}[2023/02/10 For formal contracts]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass[11pt]{article}
% SETUP: -----------------------------------------------------------------------
\RequirePackage[basics, formatting, header, headings, lists, metadata, sign, size, tables]{lix}
\RequirePackage{times}
% OVERRIDES: -------------------------------------------------------------------
\setlength\parindent{0pt}
\renewcommand\maketitlehookc{\vspace{-2ex}}
\usecompacttoc
\geometry{a4paper, top=30mm, left=24mm, right=24mm, bottom=24mm}
\setlength{\columnsep}{4mm}
\setlength{\droptitle}{-5em}
\fancyhfoffset[O]{0pt}
\setcounter{secnumdepth}{3}% Levels of heading that will be numbered.
\titlespacing{\numberless}{0pt}{14pt}{4pt}
\titlespacing{\section}{0pt}{14pt}{4pt}
\titlespacing{\subsection}{0pt}{14pt}{4pt}
\titlespacing{\subsubsection}{0pt}{14pt}{4pt}
\titleformat{\section}{\bfseries\scshape}{§ \arabic{section}.}{0.5em}{}
\titleformat*{\subsection}{\scshape}
\titleformat*{\subsubsection}{\scshape}
\titleformat*{\paragraph}{\scshape}
\renewcommand*{\@seccntformat}[1]{% Add dot after number.
\csname the#1\endcsname.\hspace{0.5em}%
}
% HEADER AND FOOTER: -----------------------------------------------------------
\fancypagestyle{plain}{% First page.
\renewcommand{\headrulewidth}{0pt}%
\@ifundefined{theLeftHeader}{
\fancyhead[L]{}
}{%
\fancyhead[L]{\scriptsize\theLeftHeader}%
}
\fancyhead[R]{\scriptsize Page \thepage\ of \pageref{LastPage}}%
\fancyfoot{}%
}
\fancypagestyle{fancy}{%
\renewcommand{\headrulewidth}{0pt}%
\@ifundefined{theLeftHeader}{
\fancyhead[L]{}
}{%
\fancyhead[L]{\scriptsize\theLeftHeader}%
}
\fancyhead[R]{\scriptsize Page \thepage\ of \pageref{LastPage}}%
\fancyfoot{}%
}
% LAYOUT: ----------------------------------------------------------------------
\wrap{%
\@ifundefined{theTitle}{}{%
\@ifundefined{theSubtitle}{%
\oldtitle{\raggedright\Large\scshape\theTitle}%
}{%
\oldtitle{\raggedright\Large\scshape\theTitle\\[0.4ex]%
\normalsize\scshape\theSubtitle}%
}
}
\@ifundefined{theAuthor}{%
\oldauthor{}%
}{%
\oldauthor{\theAuthor}%
}
\@ifundefined{theDate}{%
\olddate{}%
}{%
\olddate{\raggedright\normalsize{\theDate}}%
}
\@ifundefined{theTitle}{}{%
\maketitle%
}
\addMetadata
}