forked from pittlerf/ckurs2017
-
Notifications
You must be signed in to change notification settings - Fork 1
/
programmierkurs_fpcu.tex
210 lines (177 loc) · 6.98 KB
/
programmierkurs_fpcu.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
%\documentclass[12pt]{article}
\documentclass[12pt,twoside,a4paper]{scrbook}
\usepackage{geometry}
\geometry{
bindingoffset=0.89cm, % gutter
inner=2cm, % inside margin
outer=3cm, % outside margin
vmargin=3.5cm, % top and bottom margins
% marginparsep=0.6cm,
% marginparwidth=3cm,
}
\usepackage{iftex}
\ifPDFTeX
\usepackage[utf8]{inputenc}
%% BaKo: [T1]{fontenc} causes ß to be rendered incorrectly... seems to work with just the
%% [utf8]{inputenc}
% \usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\else
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage[spelling=new, latesthyphen=true]{german}
\ifXeTeX
\usepackage{xltxtra}
\else
\usepackage{luatextra}
\fi
\fi
%% BaKo: using csquotes, proper german quotes can be generated portably
%% through the use of the \enquotes command
\usepackage{csquotes}
% \setotherlanguage{english}
% \defaultfontfeatures{Ligatures=TeX}
% \defaultfontfeatures{Mapping=tex-text}
% %% Deutsche Anfuehrungszeichen...
%% BaKo: this causes issues on my machine, these characters appear on the first page
%% and the definition obviously does not pass
% % \DeclareUTFcharacter[\UTFencname]{x201C}{\grqq}
% % \DeclareUTFcharacter[\UTFencname]{x201E}{\glqq}
% \else
% \usepackage{luatextra}
% % \DeclareUTFcharacter[\UTFencname]{x201C}{\grqq}
% % \DeclareUTFcharacter[\UTFencname]{x201E}{\glqq}
% \fi
% \fi
\usepackage[dvipsnames]{xcolor}
\usepackage{amsfonts}
\usepackage[intlimits]{amsmath}
\usepackage{cite}
\usepackage{epsfig}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{pstricks-add}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\usepackage{makeidx}
\usepackage[totoc]{idxlayout}
\usepackage{graphicx}
\usepackage{hyperref}
%\addtolength{\hoffset}{-1.5cm}
%\addtolength{\textwidth}{3cm}
\usepackage{caption}
\usepackage{etoolbox}
\usepackage{listings}
\usepackage{color}
\definecolor{mygreen}{rgb}{0,0.6,0}
\definecolor{mygray}{rgb}{0.5,0.5,0.5}
\definecolor{mymauve}{rgb}{0.58,0,0.82}
\PassOptionsToPackage{svgnames}{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{breakable}
%\usepackage[scaled]{beramono}
\lstset{ %
backgroundcolor=\color{white}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument
basicstyle=\footnotesize\ttfamily, % the size of the fonts that are used for the code
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
breaklines=true, % sets automatic line breaking
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{mygreen}, % comment style
deletekeywords={...}, % if you want to delete keywords from the given language
escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8
frame=none, % adds a frame around the
keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible)
keywordstyle=\color{blue}, % keyword style
language=C, % the language of the code
morekeywords={*,...}, % if you want to add more keywords to the set
numbers=left, % where to put the line-numbers; possible values are (none, left, right)
numbersep=5pt, % how far the line-numbers are from the code
numberstyle=\tiny\color{mygray}, % the style that is used for the line-numbers
rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))
showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces'
showstringspaces=false, % underline spaces within strings only
showtabs=false, % show tabs within strings adding particular underscores
stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered
stringstyle=\color{mymauve}, % string literal style
tabsize=2, % sets default tabsize to 2 spaces
title=\lstname, % show the filename of files
% included with \lstinputlisting; also
% try caption instead of title
belowcaptionskip=-1.0em,
belowskip=5pt,
}
\usepackage{amssymb}
\usepackage{todonotes}
\usepackage{cleveref}
%% to indicate inline which source file has been included
\newtoggle{isdraft}
% \toggletrue{isdraft}
\togglefalse{isdraft}
\newenvironment{mydefinitionblock}[1]{%
\tcolorbox[noparskip,breakable,%
colback=White,colframe=OliveGreen,%
title=#1]}%
{\endtcolorbox}
\newenvironment{myalertblock}[1]{%
\tcolorbox[noparskip,breakable,%
colback=White,colframe=RawSienna,%
title=#1]}%
{\endtcolorbox}
\newenvironment{myblock}[1]{%
\tcolorbox[noparskip,breakable,%
colback=White,colframe=Bittersweet,%
title=#1]}%
{\endtcolorbox}
\newenvironment{myexampleprogram}[1]{%
\tcolorbox[noparskip,breakable,%
colback=White,colframe=RoyalBlue,%
title=#1]}%
{\endtcolorbox}
%--------
\makeatletter
\title{Programmieren in \texttt{C}} \let\Title\@title
\author{B.~Kostrzewa, F.~Pittler, M.~Ueding, C.~Urbach} \let\Author\@author
\makeatother
\lowertitleback{Copyright \copyright\ 2017--\the\year\ \Author
Dieses Dokument kann unter Beachtung der Regeln der
Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA)
Lizenz kopiert und verteilt werden.
Für die Richtigkeit und Vollständigkeit wird keine Haftung übernommen.
Korrekturen oder Fehler bitten wir an urbach@hiskp.uni-bonn.de zu schicken.
}
\makeindex
\begin{document}
\maketitle
\tableofcontents
\clearpage
\chapter{Grundlagen}
\iftoggle{isdraft}{\newpage \textbf{intro.tex} \\}{}
\input{intro}
\iftoggle{isdraft}{\newpage \textbf{ersteschritte.tex \\}}{}
\input{ersteschritte}
\iftoggle{isdraft}{\newpage \textbf{variablen.tex} \\}{}
\input{variablen}
\iftoggle{isdraft}{\newpage \textbf{kontrollstrukturen.tex} \\}{}
\input{kontrollstrukturen}
\iftoggle{isdraft}{\newpage \textbf{funktionen.tex} \\}{}
\input{funktionen}
\iftoggle{isdraft}{\newpage \textbf{arrays.tex} \\}{}
\input{arrays}
\iftoggle{isdraft}{\newpage \textbf{standardbibliothek.tex} \\}{}
\input{standartbibliothek}
\chapter{Zeiger und Co}
\iftoggle{isdraft}{\newpage \textbf{pointers.tex} \\}{}
\input{pointers}
\iftoggle{isdraft}{\newpage \textbf{dateienverarbeitung.tex} \\}{}
\input{dateinverarbeitung}
\iftoggle{isdraft}{\newpage \textbf{einfuegensortieren.tex} \\}{}
\input{einfuegesortieren}
\iftoggle{isdraft}{\newpage \textbf{dynamischespeicherverwaltung.tex} \\}{}
\input{dynamischespeicherverwaltung}
\iftoggle{isdraft}{\newpage \textbf{exomplexdatatypen.tex} \\}{}
\input{complexdatatypen}
%\input{stapelspeicher}
%\input{endprojekt}
\printindex
\end{document}