-
Notifications
You must be signed in to change notification settings - Fork 4
/
bsg2tex.cls
274 lines (223 loc) · 6.11 KB
/
bsg2tex.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
%
% bsg2tex
%
% LaTeX-Vorlage für Schiedsgerichtsbeschlüsse und -urteile
% CC-BY Markus Gerstel
%
% For great justice!
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{bsg2tex}[2014/08/28 v0.98 Schiedsgerichtsbeschluesse und -urteile]
\newcommand\bsgtotexversion{v0.98}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Präambel (wegen der Rechtssicherheit)
\usepackage{etoolbox}
\newbool{bsganonym}\newbool{bsgvordruck}\newbool{bsgbriefpapier}
% Es gibt aktuell drei gültige Optionen für die bsg2tex Klasse:
%
% - anonym Anonymisiert/pseudonymisiert vorhandene Namen
%
% - print Entfernt Hintergrundelemente zum Ausdruck auf (vorgedrucktes) Briefpapier
%
% - invprint Nur Hintergrundelemente. Zur Produktion von (vorgedrucktem) Briefpapier.
% In diesem Fall sollte natürlich kein Text im eigentlichen Dokument stehen.
% Da LaTeX keine leeren Dokumente schreiben mag, wird
% \begin{document}
% \textcolor{white}{\rule{0mm}{0mm}}
% \end{document}
% als Dokumenteninhalt empfohlen. (Weißes Quadrat mit Kantenlänge 0)
\DeclareOption{anonym}{\booltrue{bsganonym}}
\DeclareOption{print}{\booltrue{bsgvordruck}\boolfalse{bsgbriefpapier}}
\DeclareOption{invprint}{\boolfalse{bsgvordruck}\booltrue{bsgbriefpapier}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[ngerman]{babel}
\setlength{\unitlength}{1mm}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Anonymisierfunktion
\newcommand{\Anonym}[1]{%
\ifbool{bsganonym}{ \textcolor{piraten}{\rule[0.25mm]{6.472mm}{2mm}} }{#1}%
}
\newcommand{\Pseudonym}[2]{%
\ifbool{bsganonym}{ \textcolor{piraten}{%
\rule[0.25mm]{3.236mm}{2mm}~\textbf{#2}~\rule[0.25mm]{3.236mm}{2mm}%
} }{#1}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Zitatmakro
%
\newcommand{\Zitat}[1]{\textit{{\glqq}#1{\grqq}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Verschlusssachemakro:
%
% \Verschlusssache{Text} bricht in der anonymisierten Fassung
% das Dokument mit dem Kommentar 'Text' ab.
\newcommand{\Verschlusssache}[1]{%
\ifbool{bsganonym}{\vspace{10mm}\begin{center}\textit{#1}\end{center}\end{document}}{}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Mehrfach §§-Zeichen:
%
\newcommand{\SSS}{\S\kern-0.4\S}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Font
%
\usepackage[default]{sourcesanspro}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Farben
%
\usepackage{xcolor}
\definecolor{piraten}{rgb}{1,0.533,0}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Seitenlayout
%
% Textbereich und Ränder
%
\setlength{\textwidth}{161mm}
\setlength{\oddsidemargin}{-4.4mm}
\setlength{\evensidemargin}{-0.08in}
\setlength{\topmargin}{0.0mm}
\setlength{\headheight}{18mm}
\setlength{\headsep}{19.6mm}
\setlength{\textheight}{200mm}
%
% Absatzeinzug und -abstand
%
\setlength{\parindent}{0cm}
\parskip=0.65\baselineskip
%
% Automatische Seitenzahl deaktivieren
%
\pagestyle{empty}
%
% Keine Hurenkinder und Schusterjungen
%
\clubpenalty=10000
\widowpenalty=10000
\displaywidowpenalty=1000
%
% Gliederung
%
\usepackage{titlesec}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}
\renewcommand{\thesubsubsection}{\alph{subsubsection}}
\titlespacing{\section}{0pt}{*1}{*0.5}
\titleformat{\section}
{\normalfont\large\bfseries}{\thesection.}{1em}{}
\titlespacing{\subsection}{0pt}{*0.2}{-\parskip}
\titleformat{\subsection}
{\normalfont\bfseries}{\thesubsection.}{1em}{}
\titlespacing{\subsubsection}{0pt}{*0}{-\parskip}
\titleformat{\subsubsection}
{\normalfont\bfseries}{\thesubsubsection.}{1em}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Standardseitenelemente setzen
% - Piratenparteilogo
% - Signet im Hintergrund
% - Überschrift (nur auf 1. Seite)
% - Textblock oben rechts
% - Footer
%
\RequirePackage{graphicx}
\RequirePackage{eso-pic}
\RequirePackage{lastpage}
\newcommand\Background{%
\setlength{\unitlength}{1mm}
%
% Signet im Hintergrund
%
\ifbool{bsgvordruck}{}{
\put(-46.75,5.833){\includegraphics[width=172.541mm]{Signet.pdf}}
}
%
% Logo oben rechts
%
\ifbool{bsgvordruck}{}{
\put(121.91,261.937){\includegraphics[width=63.34mm]{Logo.pdf}}
}
% Freigestellter Block oben rechts (für Debuggingzwecke)
%\put(131.88,255.5){\textcolor{piraten}{\rule[-32mm]{72.67mm}{39mm}}}
%\put(144.55,258.5){\textcolor{white}{\rule[-32mm]{60mm}{36mm}}}
%
% Seitentitel oben links
%
\ifbool{bsgbriefpapier}{}{
\put(20, 237.5){
\ifnum\thepage=1
{\textbf{\LARGE\Titel}}
\else
\fi
}
}
%
% Anschrift oben rechts
%
\ifbool{bsgbriefpapier}{}{
\put(144.55,258.5){\Header}
}
%
% Seitenzahl
%
\ifbool{bsgbriefpapier}{}{
\put(186,37.25){--~\thepage~/~\pageref*{LastPage}~--}
}
%
% Orangener Block am Seitenende
%
\ifbool{bsgvordruck}{}{
\put(0,0){\textcolor{piraten}{\rule{210mm}{28mm}}}
}
%
% Im Block: Headerzeile
%
\ifbool{bsgvordruck}{}{
\put(0,22.6){\parbox[b]{\paperwidth}{\RichterTabelleHeader}}
}
%
% Im Block: Richtertabelle
%
\ifbool{bsgvordruck}{}{
\put(0,11){\parbox[b]{\paperwidth}{\RichterTabelle}}
}
}
\AddToShipoutPicture{\Background}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \usepackage[excludeor]{everyhook}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PDF-Links und weitere Einstellungen
\usepackage{hyperref}
\hypersetup{
%hidelinks,
%pdffitwindow=false, % window fit to page when opened
%pdfstartview={FitH}, % fits the width of the page to the window
pdfpagemode=UseThumbs,
pdfpagelayout=SinglePage,
pdfcreator={BSG2Tex \bsgtotexversion, M. Gerstel}, % Ey! CC-BY, ja?
%colorlinks=true,
%linkcolor=gold,
linkbordercolor={0.90 0.75 0.54},
%citebordercolor={0.60 0.81 0.92},
urlbordercolor={1.00 0.53 0.00},
breaklinks=true,
% Infos zu den möglichen Einstellungen:
% http://mirror.switch.ch/ftp/mirror/tex/macros/latex/contrib/hyperref/doc/manual.html
% http://en.wikibooks.org/wiki/LaTeX/Hyperlinks#cite_note-3
}
\urlstyle{sf}
%
% You know what you doing!
%