header.tex 6.5 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
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
7
8
\usepackage[english]{babel}
\usepackage[iso,english]{isodate}
Stefan Tauner's avatar
Stefan Tauner committed
9
10
11
12
13
14
15
\usepackage{enumerate}
\usepackage[shortlabels]{enumitem}
\setlist[description]{style=nextline}

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

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

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

Stefan Tauner's avatar
Stefan Tauner committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\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 %
44
45
46
47
48
49
50
51
52
53
54
\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
55
56
57
58
59
60
61
\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}

62
63
64
65
66
67
68
69
70
71
72
73
% 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
74
75
76
77
% Caption package to define caption style of images, tables, etc. %
\usepackage{caption}
\captionsetup[table]{singlelinecheck=false}

78
79
80
81
82
83
84
85
% 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}
86
    \begin{multicols}{2}
87
88
    \setlist{leftmargin=3.7em}
  }%
89
  \renewcommand*{\glossarypostamble}{\end{multicols}}%
90
91
92
93
94
95
96
97
}
% 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
98
99
% Use cleveref to reference sections, chapters, etc. (\cref{} & \Cref{}) %
\usepackage{cleveref}
100
101
\crefname{lstlisting}{listing}{listings}
\Crefname{lstlisting}{Listing}{Listings}
Stefan Tauner's avatar
Stefan Tauner committed
102
103
104
105

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

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

% % % % % 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},
}
168
169
170
171
172
173
174
175
176
177

% % % 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
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
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %

\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
221
222
223
224
225
226
227
%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
228
229
230
231
232
233
234
235
236
237
238
\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}