% !TEX encoding = IsoLatin

\usepackage[english]{babel} 
\usepackage{cite} % For better handling of citations

\bibliographystyle{IEEEtran} % IEEEtran bibliography style

% Package for inserting a "phantom" space in the definition of an abbreviation
\usepackage{xspace}
\usepackage{comment}
\usepackage{pdfpages}
\usepackage{wrapfig}

\usepackage{array}
\usepackage{graphicx}
\usepackage{multirow}

\newcommand\MyBox[2]{
  \fbox{\lower0.75cm
    \vbox to 1.7cm{\vfil
      \hbox to 1.7cm{\hfil\parbox{1.4cm}{#1\\#2}\hfil}
      \vfil}%
  }%
}
% Package for inserting a DOI without problems with "strange" characters
\usepackage{doi}
\renewcommand{\doitext}{DOI }% originally was "doi:"

% Package for correctly inserting SI units (including binary units)
\usepackage[binary-units]{siunitx}
% If you want to use / instead of the power -1 to indicate "per second"
\sisetup{per-mode=symbol}



% Package for inserting complex programming code
\usepackage{listings}
% Package for color definitions
\usepackage{xcolor}

% Define Python language settings
\lstdefinelanguage{Python}{
    keywords={from, import, as, if, else, elif, for, while, def, return, class, try, except, raise, with, pass, yield, assert, del, global, lambda, print},
    sensitive=true,
    morecomment=[l]{\#},
    morestring=[b]',
    morestring=[b]",
}
\lstset{
  basicstyle=\ttfamily,
  columns=fullflexible,
  xleftmargin=3ex,
  breaklines,
  breakatwhitespace,
  escapechar=`,
  keywordstyle=\color{blue}\bfseries,
  commentstyle=\color{purple}\ttfamily,
  stringstyle=\color{red}\ttfamily,
}


% Define YAML language settings
\lstdefinelanguage{yaml}{
    keywords={true,false,null,y,n},
    keywordstyle=\color{blue}\bfseries,
    ndkeywords={},
    ndkeywordstyle=\color{black}\bfseries,
    sensitive=false,
    comment=[l]{\#},
    morecomment=[s]{/*}{*/},
    commentstyle=\color{purple}\ttfamily,
    stringstyle=\color{red}\ttfamily,
    morestring=[b]',
    morestring=[b]",
}

% Define Docker Compose style
\lstdefinestyle{docker-compose}{
    language=yaml,
    basicstyle=\ttfamily,
    columns=fullflexible,
    xleftmargin=3ex,
    breaklines,
    breakatwhitespace,
    escapechar=`,
}

\lstdefinelanguage{HTTP}{
  morekeywords={GET, POST, HTTP/1.1, Host, Range},
  sensitive=false,
  morecomment=[l]{//},
  morestring=[b]"
}
% Define C language settings
\lstdefinelanguage{C}{
    morekeywords={
        int, return, malloc, free, struct, __uint, __type, SEC
    },
    sensitive=true,
    morecomment=[l]{//},
    morecomment=[s]{/*}{*/},
    morestring=[b]"
}

\lstdefinelanguage{Dockerfile}{
    morekeywords={
        FROM, RUN, CMD, LABEL, MAINTAINER, EXPOSE, ENV, ADD, COPY, ENTRYPOINT, VOLUME, USER, WORKDIR, ARG, ONBUILD, STOPSIGNAL, HEALTHCHECK, SHELL
    },
    sensitive=true,
    comment=[l]{\#},
    string=[b]"
}

% Modify some page parameters
\setlength{\parskip}{\medskipamount}

% Horizontal rule
\newcommand{\HRule}{\rule{\linewidth}{0.2mm}}

% Example of creating simple abbreviations
\newcommand{\ltx}{\LaTeX\xspace}
\newcommand{\txw}{TeXworks\xspace}
\newcommand{\mik}{MikTex\xspace}
\newcommand{\html}{HTML\xspace}
\newcommand{\xhtml}{XHTML\xspace}

% Example of creating an abbreviation with a parameter (use indicated by #1)
\newcommand{\cmd}[1]{\texttt{#1}\xspace}

% To cite an RFC, e.g. \rfc{822}
\newcommand{\rfc}[1]{RFC-#1\xspace}

% To cite a file (e.g. \file{autoexec.bat}) or a fictitious URI (e.g. \file{http://www.lioy.it/})
% For real URIs, use \url or \href
\newcommand{\file}[1]{\texttt{#1}\xspace}

% To insert example code in-line
\newcommand{\code}[1]{\lstinline|#1|}

% Important for Windows pathnames because \ cannot be used as it is a reserved character in LaTeX
\newcommand{\bs}{\textbackslash}

% Definition of a term: formatting and insertion in the index
\newcommand{\tdef}[1]{\textit{#1}\index{#1}}

% Meta-term, typically used in tag definitions
\newcommand{\meta}[1]{\textit{#1}}

% Abbreviations in English
\newcommand{\ie}{i.e.\xspace}
\newcommand{\eg}{e.g.\xspace}
\usepackage{graphicx}
\usepackage{array}
\usepackage{multirow}
\usepackage{booktabs}