header.tex 6.48 KB
Newer Older
Stefan Tauner's avatar
Stefan Tauner committed
1
2
\documentclass[a4paper,bibliography=totoc,oneside,parskip=half]{scrartcl}

3
4
\usepackage{xr-hyper} % cross-document references, cf. http://www.tex.ac.uk/FAQ-extref.html

Stefan Tauner's avatar
Stefan Tauner committed
5
6
7
8
9
10
11
12
13
14
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman,english]{babel}
\usepackage{enumerate}
\usepackage[shortlabels]{enumitem}
\setlist[description]{style=nextline}

\usepackage{keystroke}
\usepackage{textcomp}
\usepackage{booktabs}
15
\usepackage{tabularx}
Stefan Tauner's avatar
Stefan Tauner committed
16
17
\usepackage{multirow}
\usepackage{pdflscape}
18
\usepackage{wrapfig}
19
\usepackage[hang,flushmargin]{footmisc}
Stefan Tauner's avatar
Stefan Tauner committed
20
21
22
23
24

\usepackage{ulem} % make \emph underlined instead of italics

% Use multicol for the definition of the glossary style %
\usepackage{multicol}
25

Stefan Tauner's avatar
Stefan Tauner committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\usepackage{float}

% Can be used to generate blindtext to get a preliminary "look and feel" %
\usepackage{blindtext}

\usepackage{fancyhdr}
\lfoot[\fancyplain{}{}]{\fancyplain{}{}} 
\rfoot[\fancyplain{}{}]{\fancyplain{}{}}
\cfoot[\fancyplain{}{\footnotesize\thepage}]{\fancyplain{}{\footnotesize\thepage}}
\lhead[\fancyplain{}{\footnotesize\nouppercase\leftmark}]{\fancyplain{}{}}
\chead{}
\rhead[\fancyplain{}{}]{\fancyplain{}{\footnotesize\nouppercase\scshape\leftmark}} 

% center captions, even for tables
\addtokomafont{caption}{\centering}

% Use of an extended color table %
43
44
45
46
47
48
49
50
51
52
53
\usepackage[svgnames,table]{xcolor}
\colorlet{tablerowcolor}{gray!15}
\renewcommand\arraystretch{1.2}

\newcommand{\midline}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%
            \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%
            \arrayrulecolor{tablerowcolor}\specialrule{\belowrulesep}{0pt}{0pt}%
            \arrayrulecolor{black}}
\newcommand{\bottomline}{\arrayrulecolor{tablerowcolor}\specialrule{\aboverulesep}{0pt}{-2pt}%
            \arrayrulecolor{black}\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%

Stefan Tauner's avatar
Stefan Tauner committed
54
55
56
57
58
59
60
\usepackage{color}
\usepackage{colortbl}
% Define the FHTW corporate design colors %
\definecolor{twgray}{RGB}{99,106,111}
\definecolor{twgreen}{RGB}{0,146,110}
\definecolor{twblue}{RGB}{10,143,217}

61
62
63
64
65
66
67
68
69
70
71
72
% load hyperref relatively late to let it workaround numerous problems
\usepackage[colorlinks=true,
	        linkcolor=black,
	        citecolor=black,
	        filecolor=black,
	        urlcolor=black,
	        bookmarks=true,
	        bookmarksopen=true,
	        bookmarksopenlevel=3,
	        plainpages=false,
	        pdfpagelabels=true]{hyperref}

Stefan Tauner's avatar
Stefan Tauner committed
73
74
75
76
% Caption package to define caption style of images, tables, etc. %
\usepackage{caption}
\captionsetup[table]{singlelinecheck=false}

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
% Use more powerful glossaries instead of acronym (requires a "makeglossary") %
\usepackage[acronym,toc,shortcuts,nomain,nonumberlist]{glossaries}
% Define the look of the glossary %
\newglossarystyle{myAcroStyle}{%
  \setglossarystyle{list}%
  \renewcommand*{\glspostdescription}{}%
  \renewcommand*{\glsgroupskip}{}%
  \renewcommand*{\glossarypreamble}{\setlength\columnsep{1cm}
    \begin{multicols*}{2}
    \setlist{leftmargin=3.7em}
  }%
  \renewcommand*{\glossarypostamble}{\end{multicols*}}%
}
% Redefine the acro command (from acronym) to be used with glossaries %
\newcommand{\acro}[2]{\newacronym{#1}{#1}{#2}}
% Initiate glossaries %
\makeglossaries
% Load acronym definitions from separate file %
\input{../tex_common/abbreviations.tex}

Stefan Tauner's avatar
Stefan Tauner committed
97
98
% Use cleveref to reference sections, chapters, etc. (\cref{} & \Cref{}) %
\usepackage{cleveref}
99
100
\crefname{lstlisting}{listing}{listings}
\Crefname{lstlisting}{Listing}{Listings}
Stefan Tauner's avatar
Stefan Tauner committed
101
102
103
104

% Can be used to append pages of an existing PDF document %
%\usepackage{pdfpages}

105
\setcounter{tocdepth}{2}
Stefan Tauner's avatar
Stefan Tauner committed
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

% % % % % Listings  % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% Use listings for listings %
\usepackage{listings}
\renewcommand{\lstlistingname}{Listing}

\lstdefinestyle{plain}{
  language={},
  identifierstyle=\color{black},
}

\lstset{%
	upquote=true,
	stepnumber=1,
	% numbers=left,
	% numberstyle=\footnotesize\ttfamily,
	% numbersep=10pt,
	showlines=true,
	captionpos=b,
	frame=single,
	aboveskip=5pt,
	belowskip=5pt,
	showtabs=true,
	tabsize=4,
	basicstyle = \footnotesize\ttfamily,
	emphstyle=\color{red!40!black},
	commentstyle = \itshape\color{green!40!black},
	keywordstyle = \color{blue!100!black!80}\bfseries,
	stringstyle = \color{purple!40!black},
	identifierstyle = \color{blue!100!black!80}\bfseries,
	breaklines = true,
	columns = fixed,
	style=plain,
}

% % % VHDL % % %
\lstdefinestyle{VHDL}{
	language = VHDL,
 	% More Keywords taken from Patricks Example %
	morekeywords = {
		library,use,all,entity,is,port,in,out,end,architecture,of,
		begin,and,not,xor,or,mod,abs,*,/,rm,+,-,&,sll,srl,sla,sra,rol,ror,
		nand,nor,xnor, if, elsif, else, then, downto
	},
	morecomment = [l]--,
}

% % % INI % % %
\lstdefinestyle{Ini}{
	morecomment = [l][\color{purple!40!black}]{//},
	morecomment = [s][\color{blue!100!black!80}\bfseries]{[}{]},
	morecomment = [l][\textrm]{[...]},
	morestring = [b]"
}

% % % Shell with less color % % %
\lstdefinestyle{shell}{
	language = sh,
	identifierstyle=\color{black},
	keywordstyle=\color{black},
}
167
168
169
170
171
172
173
174
175
176

% % % Plain markup just to avoid using verbatim % % %
\lstdefinestyle{plain}{
  language={},
  commentstyle=\itshape\color{twgray},
  comment=[l]{\#},
  identifierstyle=\color{black},
}
\lstnewenvironment{plainlisting}[1][,]{\lstset{style=plain,#1}}{}

Stefan Tauner's avatar
Stefan Tauner committed
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
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

\usepackage{float}
\usepackage{array}
\usepackage{lmodern} % Latin Modern font
\usepackage[scaled=0.85]{beramono}

\usepackage[toc,page]{appendix}

\usepackage{graphicx}
\graphicspath{{../tex_common/}}
\usepackage{tikz}
\usepackage[margin=2cm]{geometry}
\usetikzlibrary{
   calc,%
   arrows,%
   folding,%
   patterns,%
   plotmarks,%
   shapes.geometric,%
   shapes.misc,%
   shapes.symbols,%
   shapes.arrows,%
   shapes.multipart,%
   automata,%
   backgrounds,%
   chains,%
   topaths,%
   trees,%
   mindmap,%
   positioning,%
   decorations,%
   decorations.fractals,%
   decorations.shapes,%
   decorations.text,%
   decorations.pathmorphing,%
   decorations.pathreplacing,%
   decorations.markings,%
   shadows}
\usepackage{tikz-timing}
\usetikztiminglibrary{overlays}

\usepackage{bytefield}
Stefan Tauner's avatar
Stefan Tauner committed
220
221
222
223
224
225
226
%http://tex.stackexchange.com/a/302403/23277
\newcommand{\colorbitbox}[3]{%
  \sbox0{\bitbox{#2}{#3}}%
  \makebox[0pt][l]{\textcolor{#1}{\rule[-\dp0]{\wd0}{\ht0}}}%
  \bitbox{#2}{#3}%
}

Stefan Tauner's avatar
Stefan Tauner committed
227
228
229
230
231
232
233
234
235
236
237
\DeclareMathDelimiter{\bsp}{\mathopen} {symbols}{"00}{symbols}{"00}

% Define global page properties %
\setlength{\textheight}{245mm}
%\setlength{\textheight}{225mm}
%\setlength{\textwidth}{1.025\textwidth}



% Load global definitions
\input{../tex_common/global_defines.tex}