-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProg_c.tex
130 lines (112 loc) · 3.72 KB
/
Prog_c.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
\documentclass[fontsize=8pt, a4paper, fleqn, landscape, DIV=calc]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{hyperref}%links in the pdf
\hypersetup{pdfborder = {0 0 0}}
%Layout
\usepackage{multicol, geometry, xcolor, tcolorbox, fancyhdr ,lastpage, dirtytalk, multirow}
% mehrere spalten, page layout, farben, farbboxen der titel, header/footer, linkt to last page, make the use of "" easier
\geometry{margin=1cm}
\parindent 0pt
\pagestyle{fancy}
\newlength{\breite}
\setlength{\breite}{0.5pt}
\setlength{\columnseprule}{\breite}
\usepackage{qrcode}%QR code im Titel
%Math stuff
\usepackage{mathtools}
\allowdisplaybreaks %allow display breaks in align
\usepackage{enumitem}%Itemise
%Display Code
\usepackage{listings}
\definecolor{codeGreen}{RGB}{106,178,82}
\definecolor{backgroundcolor}{RGB}{255,255,255}
\lstdefinestyle{mystyle}{
language = C,
backgroundcolor=\color{backgroundcolor},
commentstyle=\color{blue},
keywordstyle=\color{codeGreen},
numberstyle=\tiny\color{black},
stringstyle=\color{olive},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
\usepackage{ifthen} % ifthen to let others use this document, based on their setup
\newboolean{svgWorks}
\setboolean{svgWorks}{true} % false = svg package NOT installed
\ifthenelse{\boolean{svgWorks}}{
\usepackage{svg}
\svgpath{{svg/}}
}{}
%automate Columnbreak
\newcommand{\nextcol}{%
\vfill\null%
\columnbreak%
}
% color for Titel / sub Titel
\definecolor{sectionbarcolor}{RGB}{148,0,255}
\definecolor{subsectionbarcolor}{RGB}{220,173,255}
\definecolor{sectiontextcolor}{RGB}{255,255,255}
\definecolor{subsectiontextcolor}{RGB}{0,0,0}
%section color box
\setkomafont{section}{\mysection}
\newcommand{\mysection}[1]{%
\Large%
\begin{tcolorbox}[colback=sectionbarcolor, coltext=sectiontextcolor, beforeafter skip=2pt, boxrule=0pt, arc=2pt, left=0pt, right=0pt, top=0pt, bottom=0pt]%
{#1}%
\end{tcolorbox}%
}
%subsection color box
\setkomafont{subsection}{\mysubsection}
\newcommand{\mysubsection}[1]{%
\Large%
\begin{tcolorbox}[colback=subsectionbarcolor, coltext=subsectiontextcolor, beforeafter skip=2pt, boxrule=0pt, arc=2pt, left=0pt, right=0pt, top=0pt, bottom=0pt]%
{#1}%
\end{tcolorbox}%
}
%Information for maketitle
\title{\vspace{-1cm}Prog C}
\subtitle{HS 2023, Prof. Dr. Christian Werner}
\author{Fabian Steiner, \today}
\date{{\small V2.1.1}}
%Header & footer
\fancyhf{}
\setlength{\footskip}{0.5cm}
\fancyfoot[L]{\thepage{} / \pageref{LastPage}}
\fancyfoot[R]{Prog C}
\renewcommand{\footrulewidth}{0pt}
\renewcommand{\headrulewidth}{0pt}
\begin{document}
\begin{multicols*}{3}
\raggedcolumns
\begin{minipage}{0.75\columnwidth}
\maketitle
\end{minipage}
\begin{minipage}{0.2\columnwidth}
\begin{center}
\quad
\qrcode[height=1cm]{https://github.com/Iceteavanill}
\qquad
\end{center}
\end{minipage}
\thispagestyle{fancy}%Pagenumber for first page
\input{Sections/01_Grundlagen}
\input{Sections/02_Zahlentypen}
\input{Sections/03_Funktionen_aus_C-Standart}
\input{Sections/04_Steuerstrukturen}
\input{Sections/05_Compiler}
\input{Sections/06_Struktogramm}
\input{Sections/07_Beispiele}
\input{Sections/08_mathH}
\end{multicols*}
\end{document}