lecture-notes/sysprog.sty
2022-02-15 20:57:33 +01:00

121 lines
4 KiB
TeX

\ProvidesPackage{sysprog}[2022/02/10 - Style file for the Systemnahe Programmierung course in WS 21/22 at Uni Bonn]
\usepackage[ngerman]{babel}
\usepackage[cache]{fancythm}
\usepackage{mkessler-mathfont}
\usepackage{mkessler-math}
\usepackage{enumerate}
\usepackage{mkessler-todo}
\usepackage[index]{mkessler-vocab}
\usepackage{mkessler-code}
\usepackage[a4paper, margin=2.5cm]{geometry}
%\usepackage{mkessler-math}
\usepackage[normalem]{ulem}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{xcolor}
\usepackage{dsfont}
\usepackage{csquotes}
\usepackage{tikz}
\usepackage{tikz-cd}
%\usepackage{wrapfig}
\usepackage{listings}
\usepackage{multirow}
\definecolor{KeywordColor}{cmyk}{0.64,0,0.95,0.40} %TODO
\definecolor{mGray}{rgb}{0.5,0.5,0.5}
\definecolor{mOrange}{rgb}{0.9,0.53,0.35}
\lstset{
language=C, % Code langugage
basicstyle=\ttfamily, % Code font, Examples: \footnotesize, \ttfamily
keywordstyle=\color{KeywordColor}, % Keywords font ('*' = uppercase)
commentstyle=\color{mGray}, % Comments font
numberstyle=\tiny\color{mGray},
stepnumber=1, % Step between two line-numbers
numbersep=5pt, % How far are line-numbers from code
frame=none, % A frame around the code
tabsize=2, % Default tab size
captionpos=b, % Caption-position = bottom
breaklines=true, % Automatic line breaking?
breakatwhitespace=false, % Automatic breaks only at whitespace?
showspaces=false, % Dont make spaces visible
showtabs=false, % Dont make tabls visible
columns=flexible, % Column format
stringstyle=\color{mOrange},
escapeinside={/*!}{!*/},
}
\usepackage{float}
%\usepackage{algorithmicx}
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\newcommand\subsubsubsection[1]
{
\stepcounter{subsubsubsection}
\medskip
\textbf{\thesubsubsubsection~#1}
\medskip
}
\newcommand\todoimg[1]
{
\todo{FEHLENDES BILD: #1}
}
\usepackage{siunitx}
% Wenn auf die Klausurrelevanz EXPLIZIT hingewiesen wurde
\newcommand\klausurrelevant{
\footnote{\color{red}klausurrelevant!}
}
\usepackage{acro}
\DeclareAcronym{ip}{short = IP, long = Internet Protocol}
\DeclareAcronym{Ip}{short = IP, long = Internet Protocol}
\DeclareAcronym{udp}{short = UDP, long = User Datagram Protocol}
\DeclareAcronym{tcp}{short = TCP, long = Transmission Control Protocol}
\def\alert#1{{\color{red} #1}}
\usepackage{imakeidx}
\makeindex[name = ccode, title = \texttt{C} functions and macros]
\usepackage{hyperref}
\usepackage[quotation]{knowledge}[22/02/12]
\newcommand\main[1]{\underline{#1}}
\newcommand\usage[1]{\textit{#1}}
\knowledgestyle{ccode}{color=purple!30!black, index style = usage, wrap = \code}
\knowledgestyle{ccode unknown}{ wrap = \code, color = brown}
\knowledgestyle{ccode unknown cont}{ wrap = \code}
\knowledgestyle{ccode intro}{color=blue, boldface, index style = main, wrap = \code}
\knowledgestyle{autoref link}{autoref link}
\knowledgestyle{autoref target}{autoref target}
\knowledgenewvariant\cc{
default style = {autoref link, ccode},
unknown style = {ccode unknown},
unknown style cont = {ccode unknown cont},
% unknown warning = false,
% unknown diagnose = false,
}
\knowledgenewvariant\ccintro {
auto knowledge = {autoref, scope=document, also now, index, index name = ccode, wrap = \code},
default style = {autoref target, ccode intro},
unknown style = ccode unknown,
unknown style cont = ccode unknown
}
\knowledgevariantmodifier{\intro*\cc}\ccintro
\knowledgevariantmodifier{\cintro*\cc}\ccintro
\hypersetup{colorlinks, citecolor=violet, urlcolor=blue!80!black, linkcolor=red!50!black, pdfauthor=\@author, pdftitle=\ifdef{\@course}{\@course}{\@title}}
\NewFancyTheorem[thmtools = { style = thmredmargin} , group = { big } ]{warning}