-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cpp.tex
150 lines (125 loc) · 4.5 KB
/
Cpp.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
\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}}%No borders around Hyperlinks
%Layout
\usepackage{multicol, geometry, tcolorbox, fancyhdr, lastpage, dirtytalk, qrcode, rotating}
% mehrere spalten, page layout, farbboxen der titel, header/footer, linkt to last page, make the use of "" easier, QR code im Titel, Rotate tables
\geometry{margin=1cm}
\parindent 0pt
\pagestyle{fancy}
\newlength{\breite}
\setlength{\breite}{0.5pt}
\setlength{\columnseprule}{\breite}
\usepackage[table,xcdraw]{xcolor}% color
%Math stuff
\usepackage{mathtools}
%\allowdisplaybreaks %allow display breaks in align
%\newcommand{\todo}[1][todo]{% Todo marker
% \begin{tcolorbox}[colback=orange, beforeafter skip=2pt, boxrule=0pt, arc=2pt, left=0pt, right=0pt, top=0pt, bottom=0pt]%
% {#1}%
% \end{tcolorbox}%
%}
% Todo no longer alowed
%automate Columnbreak
\newcommand{\nextcol}{%
\vfill\null%
\columnbreak%
}
\usepackage{enumitem}%Itemise
%Display Code
\usepackage{listings}
\definecolor{codeGreen}{RGB}{69, 161, 18}
\definecolor{backgroundcolor}{RGB}{255,255,255}
\lstdefinestyle{mystyle}{
language = [11]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,
morekeywords = {[11]final, override}
}
\lstset{style=mystyle}
\usepackage{ifthen} % ifthen to let others use this document, based on their setup
\newboolean{tikzumlWorks}
\setboolean{tikzumlWorks}{true} % false = tikzumlpackage NOT installed
\newboolean{svgWorks}
\setboolean{svgWorks}{true} % false = svg package NOT installed
\ifthenelse{\boolean{tikzumlWorks}}{
\usepackage{tikz-uml} % for this to work, download tikz-uml.sty from https://perso.ensta-paris.fr/~kielbasi/tikzuml/index.php?lang=en to 'texlive/texmf-local/tex/latex/local' and run 'texhash' in ps terminal (windows)
\tikzumlset{fill class=subsectionbarcolor!50}
}{}
\ifthenelse{\boolean{svgWorks}}{
\usepackage{svg}
\svgpath{{svg/}}
}{}
% 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=1pt, 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=1pt, boxrule=0pt, arc=2pt, left=0pt, right=0pt, top=0pt, bottom=0pt]%
{#1}%
\end{tcolorbox}%
}
%Information for maketitle
\title{\vspace{-1cm}Prog C++}
\subtitle{FS 2024, Prof. Dr. Christian Werner}
\author{Fabian Steiner, \today}
\date{{\small 1.1.7}}
%Header & footer
\fancyhf{}
\setlength{\footskip}{0.5cm}
\fancyfoot[L]{\thepage{} / \pageref{LastPage}}
\fancyfoot[R]{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_basics}
\input{Sections/02_Objektorientierung.tex}
\input{Sections/03_Memorymanagement.tex}
\input{Sections/04_makefiles.tex}
\section{Emotional support meme}
\begin{center}
\includegraphics[width=\columnwidth]{pictures/ifcondition.png}
\end{center}
\end{multicols*}
\end{document}