-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.tex
196 lines (160 loc) · 5.66 KB
/
header.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass
[ twoside % beidseitiger Druck
, BCOR=10mm % Bindekorrektur
, openright % Kapitel beginnen auf einer rechten Seite
, listof=totoc % Verzeichnisse im Inhaltsverzeichnis
, bibliography=totoc % Literaturverzeichnis im Inhaltsverzeichnis
, parskip=half % Absätze durch einen vergrößerten Zeilenabstand getrennt
% , draft % Entwurfsversion
]{scrreprt} % Dokumentenklasse: KOMA-Script Buch
%\setcounter{secnumdepth}{3}
\usepackage{scrhack}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{ifpdf}
\ifpdf
\usepackage{ae} % Fonts für pdfLaTeX, falls keine cm-super-Fonts installiert
\usepackage{microtype} % optischer Randausgleich, falls pdflatex verwandt
\usepackage[pdftex]{graphicx} % Grafiken in pdfLaTeX
\else
\usepackage[dvips]{graphicx} % Grafiken und normales LaTeX
\fi
\usepackage[utf8]{inputenc} % Input encoding (allow direct use of special characters like "ä")
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[automark]{scrpage2} % Schickerer Satzspiegel mit KOMA-Script
\usepackage{setspace} % Allow the modification of the space between lines
\usepackage{booktabs} % Netteres Tabellenlayout
\usepackage{multicol} % Mehrspaltige Bereiche
\usepackage{quotchap} % Beautiful chapter decoration
\usepackage[printonlyused]{acronym} % list of acronyms and abbreviations
\usepackage{subfig} % allow sub figures
\usepackage{tabularx} % Tabellen mit fester Breite
% Layout
\pagestyle{scrheadings}
%\pagestyle{empty}
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
\makeatletter
\renewcommand{\fps@figure}{htbp}
\makeatother
%% Document properties %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\projname}{T[ ]xt}
\newcommand{\titel}{T$\square$xt}
\newcommand{\untertitel}{An approach to mix EMF based visual and textual editors}
\newcommand{\Datum}{September 17th, 2012}
%%%%%%%%%%%%%%% Check
\setcounter{tocdepth}{3}
\ifpdf
\usepackage{hyperref}
\definecolor{darkblue}{rgb}{0,0,.5} %{0,0,.5} %black 0 0 0
\hypersetup
{ colorlinks=true
, citecolor=darkblue
, breaklinks=true
, linkcolor=darkblue
, menucolor=darkblue
, urlcolor=darkblue
, pdftitle={\projname -- \untertitel}
, pdfsubject={Master's Thesis}
, pdfauthor={Stefan Kuhn}
}
\else
\fi
%% Listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{listings}
\KOMAoptions{listof=totoc} % necessary because of scrhack
\renewcommand{\lstlistlistingname}{List of Listings}
\lstset
{ basicstyle=\small\ttfamily
, breaklines=true
, captionpos=b
, showstringspaces=false
, keywordstyle={}
}
\lstnewenvironment{inlinehaskell}
{\spacing{1}\lstset{language=haskell,nolol,aboveskip=\bigskipamount}}
{\endspacing}
\lstnewenvironment{inlinexml}
{\spacing{1}\lstset{language=XML,nolol,aboveskip=\bigskipamount}}
{\endspacing}
\newcommand{\haskellinput}[2][]{
\begin{spacing}{1}
\lstinputlisting[language=Haskell,nolol,aboveskip=\bigskipamount,#1]{#2}
\end{spacing}
}
\newcommand{\haskellcode}[2][]{\mylisting[#1,language=Haskell]{#2}}
\newcommand{\mylisting}[2][]{
\begin{spacing}{1}
\lstinputlisting[frame=lines,aboveskip=2\bigskipamount,#1]{#2}
\end{spacing}
}
%% additional commands
\newcommand{\todo}[1]{\marginpar{\textbf{TODO}} \textcolor{red}{#1}}
\newcommand{\code}[1]{\texttt{#1}}
%%% Kai >>
\lstdefinelanguage{scala}{
morekeywords={abstract,case,catch,class,def,%
do,else,extends,false,final,finally,%
for,if,implicit,import,match,mixin,%
new,null,object,override,package,%
private,protected,requires,return,sealed,%
super,this,throw,trait,true,try,%
type,val,var,while,with,yield},
otherkeywords={=>,<-,<\%,<:,>:,\#,@},
sensitive=true,
morecomment=[l]{//},
morecomment=[n]{/*}{*/},
morestring=[b]",
morestring=[b]',
morestring=[b]"""
}
\definecolor{lstbg}{gray}{.95}
\lstnewenvironment{scala}[1][]
{\spacing{1}\lstset{language=scala,frame=single,backgroundcolor=\color{lstbg},aboveskip=\bigskipamount,numberbychapter=true,#1}}
{\endspacing}
%% ich <<< ==============================================
\usepackage{color}
\usepackage{epsfig}
\usepackage{amsmath}
\usepackage{epstopdf}
\usepackage{import}
\usepackage{placeins}
\usepackage{amssymb}
\lstdefinelanguage{Xtext2}{
morekeywords={abstract,case,catch,class,def,%
do,else,extends,false,final,finally,%
for,if,implicit,import,match,mixin,%
new,null,object,override,package,%
private,protected,requires,return,sealed,%
super,this,throw,trait,true,try,%
type,val,var,while,with,yield},
otherkeywords={=>,<-,<\%,<:,>:,\#,@},
sensitive=true,
morecomment=[l]{//},
morecomment=[n]{/*}{*/},
morestring=[b]",
morestring=[b]',
morestring=[b]"""
}
\lstdefinelanguage{xtext}{
keywords={import, grammar, as, terminal, returns, generate, with},
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[s]{'}{'},
morestring=[s]{"}{"},
alsoletter={&,\&},
alsoother={&,\&}
}
\lstnewenvironment{xtxt}[1][]
{\spacing{1}\lstset{language=xtext,frame=single,backgroundcolor=\color{lstbg},aboveskip=\bigskipamount,numberbychapter=true,#1}}
{\endspacing}
% \newcommand{\kode}[1] {\begin{lstlisting}^^M foo \end{lstlisting}}
%{\lstset{language=xtext,{#1}}}
\newcommand\kode[1]{\lstinline[basicstyle=\tt]{#1}}
\def\kode{\lstinline[basicstyle=\ttfamily]}
% \newcommand{\kode2}[1]{\begin{xtxt}#1\stop{xtxt}}
%{\start{xtxt}#1}}