-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvwa.cls
152 lines (134 loc) · 3.69 KB
/
vwa.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{vwa}[2016/07/27 Vorwissenschaftliche Arbeit in Österreich]
\directlua{dofile("../../vwa.lua")} %TODO relative path
\LoadClass{scrreprt}
\KOMAoptions{
paper = a4,
fontsize = 12pt,
DIV = 8,
BCOR = 1cm,
numbers = noenddot,
abstract = true,
}
\RequirePackage{scrlayer-scrpage}
\RequirePackage{tikz} % graphics
\RequirePackage{xcolor}
\RequirePackage{xstring} % string ops
\RequirePackage{polyglossia} % multi-lang
\RequirePackage{csquotes} % lang-specific quotes
% math
\RequirePackage{newtxmath}
\RequirePackage{ebgaramond-maths}
\RequirePackage{amsmath}
\RequirePackage{unicode-math}
% bib + cite
\RequirePackage[
backend=biber,
style=chicago-authordate
]{biblatex}
\RequirePackage{chngcntr}
\ProcessOptions\relax
% ---
% lang
\setmainlanguage[
spelling=new,
variant=austrian,
babelshorthands=true,
]{german}
\renewcaptionname{german}{\abstractname}{Abriss}
\newcaptionname{german}{\cf}{vgl.}
\newcaptionname{english}{\cf}{vgl.}
% fonts
\setromanfont{Cormorant}
\setsansfont{Fira Sans}[
FontFace = {l}{n}{Fira Sans Light},
FontFace = {l}{it}{Fira Sans Light Italic},
FontFace = {el}{n}{Fira Sans ExtraLight},
FontFace = {el}{it}{Fira Sans ExtraLight Italic},
FontFace = {lc}{n}{Fira Sans Condensed Light},
FontFace = {lc}{it}{Fira Sans Condensed Light Italic},
FontFace = {elc}{n}{Fira Sans Condensed ExtraLight},
FontFace = {elc}{it}{Fira Sans Condensed ExtraLight Italic},
]
\setmonofont{Iosevka}
\newfontfamily\martel{Martel Sans}
% headings
\addtokomafont{disposition}{\martel}
\RedeclareSectionCommand[beforeskip=.35\textheight]{chapter}%.35\textheight]{chapter}
\RedeclareSectionCommand[beforeskip=.05\textheight]{section}%TODO better definition
\counterwithout{figure}{chapter}
\counterwithout{equation}{chapter}
\setcounter{secnumdepth}{\subsectionnumdepth}
\setcounter{tocdepth}{\subsectionnumdepth}
% header/footer
\usetikzlibrary{shapes}
\definecolor{dark}{HTML}{2c2c2c}
\newcommand{\circlenum}[2]{
\raisebox{-.5\height}{
\begin{tikzpicture}[anchor = base, baseline]
\node[
circle,
#1,
color = dark,
ultra thin,
minimum size = 2.25em,
]{\addtokomafont{pagenumber}{\color{#2}}\pagemark};
\end{tikzpicture}
}
}
\setlength{\footheight}{3.25em}
\pagestyle{scrheadings}
\automark[section]{chapter} %TODO fuck this too :-/
%\renewcommand{\chaptermark}[1]{\markleft{\chaptername \thechapter{}. #1}{}}
%\renewcommand{\sectionmark}[1]{\markright{\thesection{} #1}{}} %TODO fuck this shit :-(
\ofoot*{}
\cfoot*{\circlenum{draw}{black}}
\ifoot*{}
% dictum
\addtokomafont{dictum}{\footnotesize\fontseries{el}\selectfont}
\renewcommand{\dictumrule}{\vspace{.2\baselineskip}}
\renewcommand{\dictumauthorformat}[1]{\scriptsize--- #1\hfill\vspace{.2\textheight}}
% front
\pagenumbering{roman}
\newenvironment{abspage}
{\clearpage\vspace*{\fill}\thispagestyle{plain}
}
{\vfill\clearpage}
\newenvironment{abstract2}[1][german]{
\begin{abspage}
\bigskip
\selectlanguage{#1}%
\noindent\textbf{\textsc{\abstractname.}}\enskip
}{
\par
\bigskip
\end{abspage}
}
\newcommand{\abs}[1][german]{
\directlua{vwa_abs("\@currenvir")}
\begin{abstract}[#1]
}
\newenvironment{front}{
\pagenumbering{roman}
\maketitle
}{
\directlua{vwa_abs("\@currenvir")}
\tableofcontents
}
% main
\newenvironment{main}{
\newpage
\ofoot{\sffamily\fontseries{lc}\upshape\footnotesize\leftmark}
\cfoot[\circlenum{fill}{white}]{\circlenum{draw}{black}}
\ifoot{\sffamily\fontseries{lc}\upshape\footnotesize\rightmark}
\pagenumbering{arabic}
}{}
% back
\newenvironment{back}{
\newpage
\pagenumbering{Roman}
}{
\printbibliography
}
\newcommand{\name}{\textsc}
%\newcommand{\Cf}{\MakeUppercase{\StrLeft{\cf}{1}}\StrGobbleLeft{\cf}{1}}