\ProvidesPackage{preamble}
% Common
\usepackage{ltstyle-common}

% Paper Specific

\usepackage{titlesec}

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

\usepackage[ngerman]{babel}
\usepackage{titling}
\usepackage{booktabs}

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

\usepackage{minted}
\definecolor{mintedbg}{HTML}{ffffff}

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

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

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

% TCB
\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
}


\definecolor{myteal}{HTML}{228c9c}

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


\lstdefinelanguage{Skill}{
  keywords={procedur, list, for, if, then, else, sprintf, print},
  otherkeywords={:, ', ?, ==, !=, >=, <=, <, >, =},
  morecomment=[l]{;},
  morestring=[b]",
  keywordstyle=\color{lts-blue}\bfseries,
  keywordstyle=[2]\color{lts-green}\bfseries,
  ndkeywordstyle=\color{darkgray}\bfseries,
  identifierstyle=\color{black},
  commentstyle=\color{lts-magenta}\ttfamily,
  stringstyle=\color{lts-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
}
