% Created 2019-05-15 Mi 01:07
% Intended LaTeX compiler: pdflatex
\documentclass{article}
  \usepackage{amsmath,amsfonts,stmaryrd,amssymb}
  \usepackage{enumerate}
  \usepackage[ruled]{algorithm2e}
  \usepackage[framemethod=tikz]{mdframed}
  \usepackage{listings}
  \usepackage{inconsolata}
  \usepackage[footnote]{snotez}

    \usepackage{geometry}

    \geometry{
        paper=a4paper,
        top=40pt,
        bottom=3cm,
        left=30pt,
        textwidth=417pt,
        headheight=14pt,
        marginparsep=20pt,
        marginparwidth=100pt,
        footskip=30pt,
        headsep=0cm,
    }


    \usepackage[utf8]{inputenc}
    \usepackage{sansmathfonts}
    \usepackage[T1]{fontenc}
    \renewcommand*\familydefault{\sfdefault}
  \mdfdefinestyle{commandline}{
      leftmargin=10pt,
      rightmargin=10pt,
      innerleftmargin=15pt,
      middlelinecolor=black!50!white,
      middlelinewidth=2pt,
      frametitlerule=false,
      backgroundcolor=black!5!white,
      frametitle={Commandline},
      frametitlefont={\normalfont\sffamily\color{white}\hspace{-1em}},
      frametitlebackgroundcolor=black!50!white,
      nobreak,
  }


  \newenvironment{commandline}{
      \medskip
      \begin{mdframed}[style=commandline]
  }{
      \end{mdframed}
      \medskip
  }


  \mdfdefinestyle{question}{
      innertopmargin=1.2\baselineskip,
      innerbottommargin=0.8\baselineskip,
      roundcorner=5pt,
      nobreak,
      singleextra={
          \draw(P-|O)node[xshift=1em,anchor=west,fill=white,draw,rounded corners=5pt]{
          Question \theQuestion\questionTitle};
      },
  }

  \newcounter{Question}


  \newenvironment{question}[1][\unskip]{
      \bigskip
      \stepcounter{Question}
      \newcommand{\questionTitle}{~#1}
      \begin{mdframed}[style=question]
  }{
      \end{mdframed}
      \medskip
  }



  \mdfdefinestyle{warning}{
      topline=false, bottomline=false,
      leftline=false, rightline=false,
      nobreak,
      singleextra={
          \draw(P-|O)++(-0.5em,0)node(tmp1){};
          \draw(P-|O)++(0.5em,0)node(tmp2){};
          \fill[black,rotate around={45:(P-|O)}](tmp1)rectangle(tmp2);
          \node at(P-|O){\color{white}\scriptsize\bf !};
          \draw[very thick](P-|O)++(0,-1em)--(O);
      }
  }


  \newenvironment{warning}[1][Attention:]{
      \medskip
      \begin{mdframed}[style=warning]
          \noindent{\textbf{#1}}
  }{
      \end{mdframed}
  }



  \mdfdefinestyle{info}{
      topline=false, bottomline=false,
      leftline=false, rightline=false,
      nobreak,
      singleextra={
          \fill[black](P-|O)circle[radius=0.4em];
          \node at(P-|O){\color{white}\scriptsize\bf i};
          \draw[very thick](P-|O)++(0,-0.8em)--(O);
      }
  }

  \newenvironment{info}[1][Info:]{
      \medskip
      \begin{mdframed}[style=info]
          \noindent{\textbf{#1}}
  }{
      \end{mdframed}
  }
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage[german, english]{babel}
\definecolor{slimeKeyword}{HTML}{B58900}
\definecolor{slimeString}{HTML}{2AA198}
\definecolor{slimeComment}{HTML}{839496}
\lstdefinelanguage{slime}
{
% list of keywords
morekeywords={
print,
if,
define,
cond
},
basicstyle=\ttfamily\small,
showstringspaces=false,
sensitive=true, % keywords are not case-sensitive
morecomment=[l]{;}, % l is for line comment
morestring=[b]" % defines that strings are enclosed in double quotes
}
\author{Felix Brendel}
\date{\today}
\title{The Slime 1.0 Manual}
\begin{document}

\maketitle
\tableofcontents

\lstset{language=slime,label= ,caption={Some text to illustrate},captionpos=t,numbers=none,keywordstyle=\color{slimeKeyword}, commentstyle=\color{slimeComment}, stringstyle=\color{slimeString}}
\begin{lstlisting}
(define (fib x)
  (cond ((< x 1) 0)
        ((= x 1) 1)
        (else (+ (fib (- x 1))
                 (fib (- x 2))))))

(print (if (> (fib 3) 1)
    "Hello Felixses\n"
  "Goodbye World\n"))

(fib 12)
\end{lstlisting}

\begin{verbatim}
=> Hello Felixses
144.000000
\end{verbatim}


\lstset{language=slime,label= ,caption={Some text to illustrate},captionpos=t,numbers=none,keywordstyle=\color{slimeKeyword}, commentstyle=\color{slimeComment}, stringstyle=\color{slimeString}}
\begin{lstlisting}
;; Comment here
(print "String here")
(+ 1 2 3)
\end{lstlisting}

\begin{verbatim}
=> String here6.000000
\end{verbatim}
\end{document}
