\ProvidesPackage{preamble}
\usepackage{titlesec}

\titleformat*{\section}{\large\centering \bfseries}
\titleformat*{\subsection}{\bfseries}

\usepackage[ngerman]{babel}
%\usepackage{a4wide}
\usepackage{titling}
\usepackage{xcolor}
\usepackage{booktabs}

\usepackage[sfdefault,light]{FiraSans} %% option 'sfdefault' activates Fira Sans as the default text font
\usepackage[T1]{fontenc}
\usepackage{microtype}

\usepackage{tikz-timing}
\def\degr{${}^\circ$}

\usepackage{siunitx}
\usepackage{minted}
\definecolor{mintedbg}{HTML}{ffffff}
\usepackage[hidelinks]{hyperref}
\usepackage{tcolorbox}
\tcbset{
    colframe=white,
    colback=white!94!black,
    arc=0mm,
    boxsep=1mm,
    left=0mm,
    right=0mm,
    top=0mm,
    bottom=0mm
}
\tcbuselibrary{listings, minted, skins}
\lstset{
    columns=fullflexible,
    frame=single,
    basicstyle=\small\ttfamily,
}
\makeatletter
\def\lst@makecaption{%
  \def\@captype{table}%
  \@makecaption
}
\makeatother
\newtcbinputlisting[]{\minty}[3][]{%
    enhanced,
    listing engine=minted,
    colback=mintedbg,
    colframe=myteal,
    boxrule=.25mm,
    listing only,
    minted language=#2,
    minted style=pastie,
    listing file={#3},
    #1
}

\newtcblisting{mintylst}[2][]{%
    enhanced,
    listing engine=minted,
    colback=mintedbg,
    colframe=myteal,
    boxrule=.25mm,
    listing only,
    minted language=#2,
    minted style=pastie,
    #1
}

\newtcblisting[blend into=figures]{mintyfig}[2][]{%
    enhanced,
    listing engine=minted,
    colbac=mintedbg,
    colframe=myteal,
    boxrule=.25mm,
    listing only,
    minted language=#2,
    minted style=pastie,
    #1
}

\usepackage{float}
\newfloat{Code}{H}{myc}

\usepackage{enumitem,amssymb}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{svg}
\usepackage{pdflscape}

\definecolor{myteal}{HTML}{228c9c}
%\DeclareTColorBox{blockbox}{ O{width=\textwidth} }{boxrule=0mm, colframe=myteal, valign lower=bottom, on line, lower separated=false, height=.6\textheight, #1} 

\newlist{todolist}{itemize}{2}
\setlist[todolist]{label=$\square$}

\usepackage{asymptote}
\def\asydir{asy}

\lstdefinelanguage{Skill}{
  keywords={procedur, list, for, if, then, else, sprintf, print},
  otherkeywords={:, ', ?, ==, !=, >=, <=, <, >, =},
  morecomment=[l]{;},
  morestring=[b]",
  keywordstyle=\color{blue}\bfseries,
  keywordstyle=[2]\color{green}\bfseries,
  ndkeywordstyle=\color{darkgray}\bfseries,
  identifierstyle=\color{black},
  commentstyle=\color{purple}\ttfamily,
  stringstyle=\color{red}\ttfamily,
  sensitive=true
}

\lstset{
   language=Skill,
   extendedchars=true,
   basicstyle=\footnotesize\ttfamily,
   showstringspaces=false,
   showspaces=false,
   numberstyle=\footnotesize,
   numbersep=10pt,
   tabsize=2,
   breaklines=true,
   showtabs=false,
   captionpos=b
}
