summaryrefslogtreecommitdiffstats
path: root/skript.cls
blob: 8b53d8d26fb0bd6a71b14bd57086d78432a5b7c3 (plain)
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
\NeedsTeXFormat{LaTeX2e}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}}
\ProcessOptions\relax
\LoadClass{scrbook}
\ProvidesClass{skript}

\RequirePackage{tikz}
\usetikzlibrary{babel}
\RequirePackage{tikz-cd}
\tikzcdset{arrow style=tikz, diagrams={>=stealth}}

\RequirePackage{ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
  \xetexorluatextrue
\else
  \ifluatex
    \xetexorluatextrue
  \else
    \xetexorluatexfalse
  \fi
\fi

\RequirePackage{scrlayer-scrpage}

\RequirePackage{gitinfo}

\RequirePackage{mathtools}
\RequirePackage{amsmath,  amssymb}
\RequirePackage{stackengine}

\RequirePackage{microtype}


\ifxetexorluatex
    \RequirePackage[babelshorthands]{polyglossia}
    \setdefaultlanguage{german}
    \PolyglossiaSetup{german}{indentfirst=true}
    \RequirePackage{csquotes}
    \RequirePackage{fontspec}
    \RequirePackage{empheq}
    \setmainfont{Libertinus Serif}
    \RequirePackage[warnings-off={mathtools-colon,mathtools-overbracket}]{unicode-math}
    \setmathfont{Libertinus Math}
    \setmathfont[range={\rightarrow,\leftarrow,\rightharpoonup,\rightharpoondown,\leftharpoondown,\leftharpoonup}]{texgyretermes-math.otf}
    \setmathfont[range={\Vert,\lbrace,\rbrace,\vert}]{xits-math.otf}
    \setmathfont[range={\BbbQ,\BbbN,\BbbR,\BbbC,\BbbZ,\mathbb,\int}]{XITS Math}
    % \setmathfont[range={\mathcal, \mathbfcal}]{tgpagella-math.otf}
%    \setmathfont[range={}]{Libertinus Math}
    % \setmathfont{latinmodern-math.otf}[range={cal,bfcal}]
\else
    \RequirePackage[ngerman]{babel}
    \RequirePackage{csquotes}
    \RequirePackage[utf8]{inputenc}
    \RequirePackage{uniinput}
    \RequirePackage[sb,tt=false]{libertine}
    \RequirePackage[libertine]{newtxmath}
    \RequirePackage[cal=zapfc,bb=boondox]{mathalfa}
    \RequirePackage[T1]{fontenc}
    \def\lAngle{\langle\langle}
    \def\rAngle{\rangle\rangle}
\fi
% fonts
\setkomafont{disposition}{\bfseries\rmfamily}

\RequirePackage[obeyDraft,
    obeyFinal,
    german,
    colorinlistoftodos,
    backgroundcolor=orange!30,
    prependcaption,
    textsize=small]{todonotes}

\setkomafont{chapter}{\fontsize{26}{24}\selectfont}
\let\raggedchapter\raggedleft
\preto{\chapterheadendvskip}{\noindent\hrulefill\par}
\RedeclareSectionCommand[
  beforeskip=18ex,
  afterskip=28ex]{chapter}

% fonts
\RequirePackage{setspace}
\setstretch{1.1}
\setlength\parskip{0pt}
\setlength\parindent{2em}

\RequirePackage[amsmath, thmmarks, framed]{ntheorem}
\RequirePackage{silence}
\RequirePackage[framemethod=tikz]{mdframed}
\WarningFilter{mdframed}{You got a bad break}

\RequirePackage{makeidx}
\RequirePackage[totoc]{idxlayout}
\RequirePackage[unicode,colorlinks,bookmarksopen=true]{hyperref}
\makeatletter
\pdfstringdefDisableCommands{\let\(\fake@math}
\newcommand\fake@math{}% just for safety
\def\fake@math#1\){[math]}
\makeatother
\RequirePackage[capitalise, nameinlink]{cleveref}

\RequirePackage{ifdraft}

\pagestyle{scrheadings}
% \clearscrheadfoot
% \ohead{\headmark}
\makeatletter
\if@twoside
    \ofoot{\pagemark}
\else
    \cfoot{\pagemark}
\fi
\makeatother
\ifoptionfinal{}{\ifoot{\tiny Revision\gitVtags: \gitAbbrevHash{} (\gitAuthorDate)}}
% \automark[chapter]{section}

\RequirePackage[
    backend=biber,
    style=alphabetic,
    giveninits,
    url=true,
    ]{biblatex}

\def\nikeswoosh{\begin{tikzpicture}[y=0.80pt, x=0.80pt, yscale=-0.100000, xscale=0.100000, inner sep=0pt, outer sep=0pt]
\fill[black] (159.2300,431.9660) .. controls (153.3900,431.7340) and
  (148.6120,430.1360) .. (144.8760,427.1680) .. controls (144.1630,426.6010) and
  (142.4640,424.9010) .. (141.8940,424.1840) .. controls (140.3790,422.2790) and
  (139.3490,420.4250) .. (138.6620,418.3680) .. controls (136.5480,412.0360) and
  (137.6360,403.7270) .. (141.7740,394.6080) .. controls (145.3170,386.8010) and
  (150.7840,379.0580) .. (160.3220,368.3340) .. controls (161.7270,366.7560) and
  (165.9110,362.1410) .. (165.9380,362.1410) .. controls (165.9480,362.1410) and
  (165.7200,362.5360) .. (165.4330,363.0170) .. controls (162.9530,367.1710) and
  (160.8310,372.0640) .. (159.6750,376.3000) .. controls (157.8180,383.0970) and
  (158.0420,388.9300) .. (160.3310,393.4530) .. controls (161.9100,396.5690) and
  (164.6170,399.2680) .. (167.6610,400.7600) .. controls (172.9900,403.3710) and
  (180.7920,403.5870) .. (190.3200,401.3920) .. controls (190.9760,401.2400) and
  (223.4820,392.6110) .. (262.5560,382.2160) .. controls (301.6300,371.8200) and
  (333.6050,363.3210) .. (333.6100,363.3280) .. controls (333.6210,363.3370) and
  (242.8300,402.1870) .. (195.6990,422.3420) .. controls (188.2350,425.5330) and
  (186.2390,426.3390) .. (182.7300,427.5710) .. controls (173.7600,430.7210) and
  (165.7250,432.2240) .. (159.2300,431.9660) -- cycle;
\end{tikzpicture}}

\usepackage{enumitem}
\setenumerate{label=(\alph*),leftmargin=2em}
\newlist{wenumerate}{enumerate}{1}
\setlist[wenumerate]{leftmargin=3em}

\makeatletter 
\def\theorem@checkbold{}
 \newtheoremstyle{mychange}%
  {\item[\hskip\labelsep \theorem@headerfont ##2\hskip 0.3em\ ##1\theorem@separator]}%
  {\item[\hskip\labelsep \theorem@headerfont ##2\hskip 0.3em\ ##1\ {\normalsize\mdseries(##3)}\theorem@separator]}
 \newtheoremstyle{nonumbermychange}%
  {\item[\hskip\labelsep \theorem@headerfont ##1\theorem@separator]}%
  {\item[\hskip\labelsep \theorem@headerfont ##1\ {\normalsize\mdseries(##3)}\theorem@separator]}
\makeatother
\DeclareDocumentCommand\newmdtheoremenv{s O{} m o m o }{%
\IfBooleanTF{#1}{%
   \newtheorem*{#3}{#5}%
 }{%
 \ifboolexpr{ test {\IfNoValueTF {#4}} and test {\IfNoValueTF {#6}} }%
    {\newtheorem{#3}{#5}}{%
     \IfValueTF{#4}{\newtheorem{#3}[#4]{#5}}{}%
     \IfValueTF{#6}{\newtheorem{#3}{#5}[#6]}{}%
    }
  }%
  \BeforeBeginEnvironment{#3}{%
     \begin{mdframed}[#2]}%
  \AfterEndEnvironment{#3}{%
     \end{mdframed}}%
}
\mdfdefinestyle{thmstyle}{
    usetwoside=false,
    % leftmargin=1em,
    linewidth=0.5em,
    backgroundcolor=black!05,
    linecolor=green!30,
    leftline=true, rightline=false, bottomline=false, topline=false,
    innerleftmargin=0.5em,
    splittopskip=3ex,
    afterlastframe={\vspace{\topsep}}}
\newcounter{defsatzusw}
\def\newthm#1#2{
    \newmdtheoremenv[ntheorem,style=thmstyle]{#1}[defsatzusw]{#2}
    \newmdtheoremenv*[ntheorem,style=thmstyle]{#1-nn}{#2}
}
\def\newdef#1#2{\newtheorem{#1}[defsatzusw]{#2}\newtheorem*{#1-nn}{#2}}
\theoremseparator{.}
\numberwithin{defsatzusw}{section}
% kursive schrift
\theorembodyfont{\normalfont}
\theoremheaderfont{\bfseries}
\theoremstyle{mychange}
\newthm{satz}{Satz}
\newthm{lemma}{Lemma}
\newthm{korollar}{Korollar}
\newthm{folgerung}{Folgerung}
\newthm{hilfssatz}{Hilfssatz}
\newthm{proposition}{Proposition}
% aufrechte schrift
\theorembodyfont{\normalfont}
\newmdtheoremenv[ntheorem,style=thmstyle,linecolor=blue!30]{definition}[defsatzusw]{Definition}
\newmdtheoremenv*[ntheorem,style=thmstyle,linecolor=blue!30]{definition-nn}{Definition}
\newthm{bezeichnung}{Bezeichnung}
\newthm{bezeichnungen}{Bezeichnungen}
\newthm{voraussetzung}{Voraussetzung}
\newthm{voraussetzungen}{Voraussetzungen}
\newdef{bemerkung}{Bemerkung}
\newdef{bemerkungen}{Bemerkungen}
%\newdef{definition}{Definition}
\newdef{notation}{Notation}
\newdef{warnung}{Warnung}
\newdef{achtung}{Achtung}
\newdef{erinnerung}{Erinnerung}
\theoremindent=\parindent
\theoremheaderfont{\scshape}
\newdef{frage}{Frage}
\newdef{problem}{Problem}
\newdef{beispiel}{Beispiel}
\newdef{beispiele}{Beispiele}

\theoremstyle{nonumberplain}
\theoremheaderfont{\itshape}
\theoremindent=0pt
\theorembodyfont{\normalfont}
\theoremseparator{.}
% \theoremsymbol{\scalebox{0.8}{\ensuremath{\blacksquare}}}
\theoremsymbol{\scalebox{0.8}{\ensuremath{\blacksquare}\hfill}}
\newtheorem{proof}{Beweis}
\newtheorem{beweisidee}{Beweisidee}
\newtheorem{beweis}{Beweis}
\theoremsymbol{\scalebox{0.8}{\ensuremath{\nikeswoosh}}}
\newtheorem{noproof}{Beweis}

\renewcommand{\thesection}{\arabic{section}}
\renewcommand\sectionformat{\S \thesection\autodot \hspace{1ex}}
\renewcommand\subsectionformat{\S \thesubsection\autodot \hspace{1ex}}
% \RequirePackage{textcase}
% \ifxetexorluatex
%     \DeclareRobustCommand{\spacedlowsmallcaps}[1]{
%     \fontspec{Linux Libertine O}[SmallCapsFeatures={Ligatures={NoCommon, NoDiscretionary},Letters=SmallCaps,LetterSpace=10,WordSpace=1.6}]
%         \scshape\MakeLowercase{#1}}%
%         % \scshape{#1}}}%
% \else
%     \DeclareRobustCommand{\spacedlowsmallcaps}[1]{\textls[80]{\scshape\MakeTextLowercase{#1}}}%
% \fi
% \setkomafont{section}{\Large\normalfont\spacedlowsmallcaps}
% \setkomafont{subsection}{\large\normalfont\spacedlowsmallcaps}

\let\emph\relax
\DeclareTextFontCommand{\emph}{\bfseries}

\endinput