-
Notifications
You must be signed in to change notification settings - Fork 0
/
oldpreamble.tex
216 lines (182 loc) · 6.63 KB
/
oldpreamble.tex
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
% !TEX root = main.tex
\documentclass[12pt,a4paper]{scrartcl}
\usepackage{fontspec}
\usepackage[style=alphabetic]{biblatex}
\bibliography{report}
%\usepackage{lmodern}
\usepackage{fancyvrb}
\usepackage{framed}
\usepackage{abstract}
\usepackage{graphicx}
\usepackage{latexsym}
\usepackage{amsmath,amssymb}
\usepackage[amsmath,hyperref,amsthm,thmmarks]{ntheorem}
%\usepackage{mathpazo}
\usepackage{enumitem}
\usepackage{etoolbox}
\usepackage{libertine}
%\usepackage{longtable}
%\usepackage{pdflscape} % for 'landscape' environment, use pdflscape here to also rotate the pdf pages
%\usepackage{tabu}
\usepackage{aliascnt}
\usepackage{caption}%%Improves links to figures: Will show whole figure and not just the caption
%\usepackage{soul} %%for underlining categorynames
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage[scale=0.8]{geometry}
%\usepackage{wasysym}
%\usepackage{stmaryrd}
%\usepackage{mathtools,leftidx}
\usepackage[shortcuts]{extdash} %for no breaking lines at hyphenation
\usepackage{mleftright}%%for better spacing aroung big brackets
\mleftright
\usepackage{xspace}
\usepackage[section]{placeins} % do not move figures across sections
% parts of the preamble which either need to be loaded very late or cannot be pre-compiled
\usepackage[english]{babel}
\usepackage{microtype}
\usepackage{minted}
\usepackage{csquotes}
\usepackage{hyperref}
\usepackage[nameinlink,capitalise]{cleveref}
\DeclareRobustCommand{\gray}[1]{%
\colorbox{gray!20}{$\displaystyle #1$}}
%\setmainfont
% [ BoldFont = texgyrepagella-bold.otf ,
% ItalicFont = texgyrepagella-italic.otf ,
% BoldItalicFont = texgyrepagella-bolditalic.otf ]
% {texgyrepagella-regular.otf}
\makeatletter
{
\catcode`\&=11
\gdef\color@&spot#1#2{%
\ifdefined\spc@ir \else \spc@getir{\string\color@.}\fi
\c@lor@arg{#2}%
\edef#1{\spc@ir\space cs \spc@ir\space CS #2 sc #2 SC}}
}
\colorlet{colors}{blue}
\colorlet{colort}{cyan}
\colorlet{colorr}{purple!50!violet}
\colorlet{MyRed}{red}
\colorlet{MyGreen}{green!90!blue}
\urlstyle{rm}
%\usepackage{minted}
%\usepackage[epsilon,tstt]{backnaur}
% Abstand obere Blattkante zur Kopfzeile ist 2.54cm - 15mm
\setlength{\topmargin}{-15mm}
% We define some special styles, including setting the optional argument to definitions and theorems not in bold, and special claim and
% claim-proofs (like claim, but without numbering)
\makeatletter
\g@addto@macro\@floatboxreset\centering
\renewtheoremstyle{plain}%
{\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\theorem@separator]}%
{\item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ \textmd{(##3)}\theorem@separator]}
\newtheoremstyle{claimstyle}%
{\item[\hskip\labelsep \theorem@headerfont \underline{##1\ ##2\theorem@separator}]}%
{\item[\hskip\labelsep \theorem@headerfont \underline{##1\ ##2\ (##3)\theorem@separator}]}
\newtheoremstyle{claimproofstyle}%
{\item[\hskip\labelsep \theorem@headerfont \underline{##1\theorem@separator}]}%
{\item[\hskip\labelsep \theorem@headerfont \underline{##1\ (##3)\theorem@separator}]}
\makeatother
% Umgebungen für Definitionen, Sätze, usw.
% Es werden Sätze, Definitionen etc innerhalb einer Section mit
% 1.1, 1.2 etc durchnummeriert, ebenso die Gleichungen mit (1.1), (1.2) ..
\theoremseparator{.}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newaliascnt{lemma}{theorem}
\newtheorem{lemma}[lemma]{Lemma}
\aliascntresetthe{lemma}
\newaliascnt{proposition}{theorem}
\newtheorem{proposition}[proposition]{Proposition}
\aliascntresetthe{proposition}
\theoremstyle{definition}
\newaliascnt{definition}{theorem}
\newtheorem{definition}[definition]{Definition}
\aliascntresetthe{definition}
\newaliascnt{example}{theorem}
\newtheorem{example}[example]{Example}
\aliascntresetthe{example}
\newaliascnt{remark}{theorem}
\newtheorem{remark}[remark]{Remark}
\aliascntresetthe{remark}
\newaliascnt{notation}{theorem}
\newtheorem{notation}[notation]{Notation}
\aliascntresetthe{notation}
\providecommand*{\lemmaautorefname}{Lemma}
\providecommand*{\propositionautorefname}{Proposition}
\providecommand*{\definitionautorefname}{Definition}
\providecommand*{\exampleautorefname}{Example}
\providecommand*{\remarkautorefname}{Remark}
% Claim and Claimproofs need some special attention to look how I like them
\theoremseparator{:}
\theoremheaderfont{\upshape}
\theoremstyle{claimstyle}
\newtheorem{claim}{Claim}
\providecommand*{\lemmaautorefname}{Lemma}
% reset claim counters for each proof
\makeatletter
\@addtoreset{claim}{proof}
\makeatother
% setup autoref as it does not work for claims for some reason
\providecommand*{\claimautorefname}{Claim}
\theorembodyfont{\upshape}
\theoremstyle{claimproofstyle}
\theoremsymbol{\ensuremath{\blacksquare}}
\newtheorem{claimproof}{Proof}
% number equations with sections
\numberwithin{equation}{section}
% setup to ignore spacing in verbatim environments in math mode, so formatting does not break
\makeatletter
\newcommand{\verbmathspace}{\let\FV@Space\space}
\makeatother
\makeatletter
\newcommand{\vast}{\bBigg@{4}}
\newcommand{\Vast}{\bBigg@{5}}
\makeatother
% a verbatim environment to my liking
\DefineVerbatimEnvironment{codeverbatim}{Verbatim}{fontsize=\small,frame=single,gobble=8,commandchars=\\\{\},codes={\catcode`$=3\catcode`^=7\catcode`_=8\everymath\expandafter{\the\everymath\verbmathspace}}}
%codes={\catcode`$=3\catcode`^=7\catcode`_=8}}
\newenvironment{code}[1]{%
\VerbatimEnvironment
\begin{codeverbatim}[label=\textbf{#1}]%
}
{\end{codeverbatim}}
% einige Abkuerzungen
\newcommand\ddfrac[2]{\frac{\displaystyle #1}{\displaystyle #2}}
\newcommand*{\alg}[1]{\textup{\textrm{\textsc{#1}}}}
\newcommand*{\NP}{\textbf{NP}\xspace}
\DeclareMathOperator{\N}{\mathbb{N}}
\DeclareMathOperator{\R}{\mathbb{R}}
% Someone is already declaring \G
\let\G\undefined
\DeclareMathOperator{\G}{\mathbb{G}}
% Someone is already declaring \P
\let\P\undefined
\DeclareMathOperator{\P}{\mathbb{P}}
\DeclareMathOperator{\Z}{\mathbb{Z}}
%\DeclareMathOperator{\E}{\mathbb{E}}
\DeclareMathOperator{\F}{\mathcal{F}}
% Someone is already declaring \H
\let\H\undefined
\DeclareMathOperator{\H}{\mathcal{H}}
\DeclareMathOperator{\E}{\mathcal{E}}
\DeclareMathOperator{\T}{\mathcal{T}}
\DeclareMathOperator{\SD}{\mathcal{SD}}
% Someone is already declaring \S
\let\S\undefined
\DeclareMathOperator{\S}{\mathcal{S}}
\DeclareMathOperator{\A}{\mathcal{A}}
\DeclareMathOperator{\B}{\mathcal{B}}
\let\C\undefined
\DeclareMathOperator{\C}{\mathcal{C}}
\DeclareMathOperator{\ST}{\mathcal{ST}}
\DeclareMathOperator{\X}{\mathcal{X}}
\DeclareMathOperator{\Var}{\mathbb{V}ar}
\DeclareMathOperator{\xor}{\oplus}
% nicer enumerate
\renewcommand{\labelenumi}{(\arabic{enumi})}
%
%%New sections will start on odd pages
% \let\oldsection\section
% \def\section{\cleardoublepage\oldsection}
%\endofdump