-
Notifications
You must be signed in to change notification settings - Fork 1
/
multiversum.cls
312 lines (265 loc) · 6.41 KB
/
multiversum.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{multiversum}[2020/04/17 RPG Librarium Multiversum article]
%%%
% Derive from class: Memoir
% http://texdoc.net/texmf-dist/doc/latex/memoir/memman.pdf
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ProcessOptions\relax
\LoadClass[a4paper,10pt,oneside,twocolumn,article]{memoir}
%
%%%
%%%
% Cross-References, Links and PDF-Metadata
\RequirePackage{hyperref}
\urlstyle{sf}
%
%%%
%%%
% Memoir Class Page formatting
%
% Compute a suitable line width.
\setlxvchars \setxlvchars
% type block size:
\settypeblocksize{700pt}{1.6\lxvchars}{*}
% type block at the center of the page:
\setlrmargins{*}{*}{1}
\setulmargins{*}{*}{1}
% separator between two columns, no rule:
\setcolsepandrule{0.5cm}{0pt}
% header and footer height:
\setheadfoot{2\onelineskip}{2\onelineskip}
% note margin width and separator:
\setmarginnotes{17pt}{3.5cm}{\onelineskip}
% save changes and fix the layout:
\checkandfixthelayout
% empty page layout (no header, no footer)
\pagestyle{empty}
%
%%%
%%%
% Spacing
%
% Floatings
\setlength{\textfloatsep}{10pt}
% Lists, Enumerations, Itemize
% tight spacing
\tightlists
%
%%%
%%%
% Fonts and Typesetting
% Mathspec: used to change math font.
\RequirePackage{mathspec}
%IPA
\RequirePackage{tipa}
\renewcommand\textipa[1]{{\fontfamily{cmr}\tipaencoding #1}}
%
% We use the open Adobe Source font family
% https://github.com/adobe-fonts
%
% Roman (Serif) Font: Source Serif Pro Light/Semibold
\setprimaryfont[
UprightFont={* Light},
ItalicFont={* Light Italic},
BoldFont={* Semibold},
BoldItalicFont={* Semibold Italic},
Scale=MatchLowercase]{Source Serif Pro}
%
% Sans Font: Source Sans Pro Light/Semibold
\setallsansfonts[
UprightFont={* Light},
ItalicFont={* Light Italic},
BoldFont={* Semibold},
BoldItalicFont={* Semibold Italic},
Scale=MatchLowercase]{Source Sans Pro}
%
% Mono Font: Source Code Pro Light/Semibold (No Italics available)
\setallmonofonts[
UprightFont={* Light},
BoldFont={* Semibold},
Scale=MatchLowercase]
{Source Code Pro}
%
% Replace math greek fonts by Source Serif Pro (No Italics available -> Use fake italics)
\setmathfont(Greek)[
UprightFont={* Light},
ItalicFont={* Light Italic},
BoldFont={* Semibold},
BoldItalicFont={* Semibold Italic},
Scale=MatchLowercase
]
{Source Serif Pro}
%
%%%
%%% Colors!
\PassOptionsToPackage{table}{xcolor}
\RequirePackage{xcolor}
%%%
%%%
% Divisions
% Section Style
\setbeforesecskip{-.5em}
\newcommand{\ruledsec}[1]{%
\LARGE\scshape\centering #1 \rule{\linewidth}{0.4pt}\noindent}
\setsecheadstyle{\ruledsec}
\setaftersecskip{.5em}
% Subsection Style
\setsubsecheadstyle{\Large\normalfont\raggedright}
% Paragraph Style
\setparaheadstyle{\bfseries}
% Disable numbering
\setsecnumdepth{part}
% include subsections in PDF bookmarks
\setcounter{tocdepth}{2}
%
%%%
%%%
% Language
\PassOptionsToPackage{english,ngerman}{babel}
\RequirePackage{babel}
\PassOptionsToPackage{german=quotes}{csquotes}
\RequirePackage{csquotes}
%
%%%
%%%
% Figures
\RequirePackage{graphicx}
%
%%%
%%%
% Date Format:
\PassOptionsToPackage{ngerman}{datetime}
\RequirePackage[ngerman]{datetime}
\newdateformat{monthyear}{\monthname[\THEMONTH] \THEYEAR}
%
%%%
%%%
% Licensing
\PassOptionsToPackage{%
type={CC},
modifier={by-nc-sa},
version={4.0}
}{doclicense}
\RequirePackage{doclicense}
\RequirePackage{rotating}
\RequirePackage{wrapfig,ragged2e}
%%%
%%%
% Variables
\newcommand\multiauthor[1]{\renewcommand\@multiauthor{#1}}
\newcommand\@multiauthor{\@latex@error{No \noexpand\multiauthor given}\@ehc}
\newcommand\multidate[1]{\renewcommand\@multidate{#1}}
\newcommand\@multidate{\@latex@error{No \noexpand\multidate given}\@ehc}
\newcommand\multiausgabe[1]{\renewcommand\@multiausgabe{#1}}
\newcommand\@multiausgabe{\@latex@error{No \noexpand\multiausgabe given}\@ehc}
\newcommand\multilosung[1]{\renewcommand\@multilosung{\expandafter\MakeUppercase\expandafter{#1}}}
\newcommand\@multilosung{\@latex@error{No \noexpand\multilosung given}\@ehc}
% Defaults to Uberschrift.svg
\newcommand\multilogo[1]{\renewcommand\@multilogo{header/#1}}
\newcommand\@multilogo{header/Ueberschrift}
%%%
%%%
% Macros
%
% Title
%
% Use this command to set a nice looking title.
% first argument: number, e.g. 15
% second argument: losung, e.g. Die Kuh lief um den Teich.
%
\newcommand{\makemultititle}{
\hypersetup{
pdftitle = {Multiversum Ausgabe Nr. \@multiausgabe},
pdfsubject = {RPG Librarium Aachen e.V.},
pdfauthor = {\@multiauthor},
pdfcreator = {XeLaTex},
hidelinks,
}
\author{\@multiauthor}
\date{\@multidate}
\title{Multiversum Ausgabe Nr. \@multiausgabe}
\twocolumn[
\vspace*{-5em}
{Ausgabe Nr. \@multiausgabe} \hfill {\@multidate}\\
{\includegraphics[width=\linewidth]{\@multilogo}}%
{\centering
\hrule\vspace{\onelineskip}
\@multilosung
\vspace{\onelineskip}\hrule
\vspace{\onelineskip}
}\vspace*{2em}
]
}
%
%
% Impressum
%
\newcommand{\impressumRaw}{%
\begin{Spacing}{0.5}
\tiny
{\RaggedRight
\begin{wrapfigure}{R}{.3cm}
\vspace*{-.55cm}
\hspace*{-.3cm}
\begin{sideways}
\doclicenseImage[imagewidth=1.5cm]
\end{sideways}
\end{wrapfigure}
Disclaimer \& Impressum: Teile des Inhalts sind rein fiktional; Ähnlichkeiten mit realen Personen und Begebenheiten sind zufällig und nicht beabsichtigt.\\
\smallskip
V.i.S.d.P. Hanna Franzen, RPG Librarium Aachen e.V. (VR 5440) \\
Kontakt: Postfach 101632, 52016 Aachen, \href{mailto:[email protected]}{[email protected]} \\
\smallskip
\doclicenseText
\par}
\end{Spacing}
}
\newcommand{\impressum}{%
\begin{figure}[!b]
\impressumRaw
\end{figure}
}
% Title
% Use this command at the end of each file for nice looking dates. One item
% per date.
%
\newenvironment{termine}{%
\vfill
\begin{figure}[!b]
\begin{framed}
\textbf{Nächste Termine:} \par
\begin{itemize}
}{%
\end{itemize}
\end{framed}
\vspace*{-2.55em} % Removes unnecessary spacing after the framed environment.
\vspace{0.6em} % Keeps space to text, if not at the bottom of the page.
\end{figure}
}
%
% Author-Mark
\newcommand{\Verfasser}[2][]{%
\par{\raggedleft{}{\itshape \mbox{#2}%
\ifx\relax#1\relax%
\else%
~(\mbox{#1})%
\fi%
}\par}}
\newcommand{\verfasser}[2][]{%
\hfill{\itshape \mbox{#2}%
\ifx\relax#1\relax%
\else%
~(\mbox{#1})%
\fi%
}}
%
% Annonce-Mark
\newcommand{\zeichen}[1]{%
\par{\raggedleft{}Zeichen: \MakeUppercase{#1}\par}%
}
%
\newcommand{\zeitung}[1]{%
\par{\raggedleft{}\itshape{}#1\par}\noindent%
}%
%
%%%