%% paragraphs within margins
\usepackage[english]{babel}
\setlength{\emergencystretch}{2pt}
%%%%%%%%%%% packages
\usepackage{graphicx}

%\usepackage[caption=false, font=normalsize, labelfont=sf, textfont=sf]{subfig}
\usepackage[caption=false, font=footnotesize]{subfig}

\usepackage[lined,algonl,boxed]{algorithm2e}
%\usepackage[small]{caption}
\usepackage{caption}
\usepackage[noadjust]{cite}
%\usepackage[numbers,sort&compress,square]{natbib}
%\usepackage{url}
%\usepackage[draft]{hyperref}
\usepackage{listings}
\usepackage{enumitem}
\usepackage{colortbl}
\usepackage{amsmath} 
\usepackage{mathpartir}
\usepackage{fancyvrb}\fvset{fontsize=\small}
\usepackage{xspace}
\usepackage{xcolor}
\usepackage{balance}
\usepackage{wrapfig}
\usepackage{multirow}
%\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pifont}
\usepackage{contour}
%%%%%%%%%%%%%%%%%%% this can reduce space quite a lot
%\usepackage{soul}
%\usepackage{pslatex}
%\usepackage{microtype}
%\usepackage[T1]{fontenc}
%\usepackage{dsfont}
%%%%%%%%%%%%%%%%%%% this can reduce space quite a lot
\usepackage{relsize}
\usepackage{tikz}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{marvosym} 
\usepackage{framed}
\usepackage{tabularx}
\usepackage{wrapfig}
\usetikzlibrary{matrix,fit,shapes,calc,positioning,shadows,arrows,shapes,backgrounds,decorations.markings,fadings}
\tikzset{
    %Define standard arrow tip
    >=stealth',
    %Define style for boxes
    punkt/.style={
           rectangle,
           rounded corners,
           draw=black, very thick,
           text width=6.5em,
           minimum height=2em,
           text centered},
    % Define arrow style
    pil/.style={
           ->,
           thick,
           shorten <=2pt,
           shorten >=2pt,},
    % call out
    notice/.style  = { draw, rectangle callout, callout relative pointer={#1} }
}
\usepackage{array}
%\usepackage{mathtools}
\usepackage{color}
%% Colors
\definecolor{bgBlock}{rgb}{0.22,0.15,0.49}
\definecolor{bgBlockAlert}{rgb}{0.99,0.84,0.31}
\definecolor{fgBlockAlert}{rgb}{0.22,0.15,0.49}
\definecolor{fgBlock}{rgb}{0.99,0.84,0.31}
\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{darkgreen}{rgb}{0,0.5,0}
\definecolor{darkblue}{rgb}{0,0,0.5}
\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}
%%%%%%%%%%%%% code listing
\renewcommand{\ttdefault}{pcr}
\lstset{
  basicstyle=\scriptsize\ttfamily,
  keywordstyle=\scriptsize\ttfamily\bfseries,
  language=Java,             % choose the language of the code
  frame=single,              % adds a frame around the code
  aboveskip=0pt,
  belowskip=0pt,
  breaklines=true,           % sets automatic line breaking
  breakatwhitespace=false,   % sets if automatic breaks should only happen at
  showspaces=false,
  %numbersep=5pt,              % Abstand der Nummern zum Text
  %tabsize=2,                  % Groesse von Tabs
  %extendedchars=true,         %
  %breaklines=true,            % Zeilen werden Umgebrochen
  keywords=[2]{class, incorporateUserFeedback, testPushPop, testPopPush},
}

% \lstdefinelanguage{JavaScript}{
%   keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},
%   keywordstyle=\color{blue}\bfseries,
%   ndkeywords={class, export, boolean, throw, implements, import, this},
%   ndkeywordstyle=\color{darkgray}\bfseries,
%   identifierstyle=\color{black},
%   sensitive=false,
%   comment=[l]{//},
%   morecomment=[s]{/*}{*/},
%   commentstyle=\color{darkgreen}\ttfamily,
%   stringstyle=\color{red}\ttfamily,
%   morestring=[b]',
%   morestring=[b]"
% }

% \lstset{
%    language=JavaScript,
%    backgroundcolor=\color{white},
%    extendedchars=true,
%    basicstyle=\footnotesize\ttfamily,
%    showstringspaces=false,
%    showspaces=false,
%    numbers=left,
%    numberstyle=\footnotesize,
%    numbersep=9pt,
%    tabsize=2,
%    breaklines=true,
%    showtabs=false,
%    captionpos=b
% }
