
% macro for notes and remarks

\newcommand{\todonote}[2]{% something has to be done!
  \ifdraft{
    \marginpar{\raggedright\scriptsize{{\bf#1: }#2}}}\else{}\fi\typeout{#1 TODO: (\thepage) #2}}
\newcommand{\Remark}[2]{% en passant
  \ifdraft%
  {\marginpar{\raggedright\scriptsize{(#1:) \textit{#2}}}}%
  \else{}\fi}

\newcommand{\Gb}[1]{\todonote{Gary}{#1}}
\newcommand{\GB}[1]{\Remark{Gary}{#1}}
\newcommand{\Kh}[1]{\todonote{Kohei}{#1}}
\newcommand{\KH}[1]{\Remark{Kohei}{#1}}
\newcommand{\axm}[1]{\todonote{Aybek}{#1}}
\newcommand{\Axm}[1]{\Remark{Aybek}{#1}}

\lstset{%
 language=ML, %
 float=hbp,%
%  float=p,%
 basicstyle=\bfseries\ttfamily\scriptsize, %
 identifierstyle=\color{Black}, %
 keywordstyle=\bfseries\color{blue}, %
 stringstyle=\color{Violet}, %
 commentstyle=\itshape\color{RedViolet}, %
 columns=flexible, %
 tabsize=2, %
 frame=none, %
%  frame=single, %
 extendedchars=true, %
 showspaces=false, %
 showstringspaces=false, %
%  numbers=none, %
 numbers=left, %
% may include reply,-,
 morekeywords={repl,&,local,recur,try,catch,once,repeated,repeat,unique,at,@,protocol,let,import,channel,in,participant,new,from,to,export,parallel,choice,branch,and,or,of,merge,split,cont,run,inner,role,when,guard,assert},%
 numberstyle=\tiny, %
 breaklines=true, %x
 breakautoindent=true, %
 xleftmargin=15pt,% Stops line numbers being in the middle
 captionpos=b,%
 mathescape=true,%
 escapeinside={(*@}{@*)},%
}
%\renewcommand{\lstlistingname}{Figure} 

