
%%
%% General definitions one needs all the time
%%

\newlength{\aulen}
% USENIX/NSDI
%\newcommand{\aubox}[3]{\parbox[t]{#1}{\centering\rm#2\\\small\url{#3}}}
% ACM
\newcommand{\aubox}[3]{\parbox[t]{#1}{\centering\aufnt{#2}\\\affaddr{\url{#3}}}}
\newcommand{\auboxs}[2]{\parbox[t]{#1}{\centering\aufnt{#2}}}
\newcommand{\affbox}[3]{\parbox[t]{#1}{\centering\affaddr{#2}\\\url{#3}}}


\newcommand{\mypara}[1]{\vspace{\parsep}\noindent\textbf{#1}\quad}
\newcommand{\myparaend}[1]{\vspace{\parsep}}

\newcommand{\xref}[1]{Section~\ref{#1}}
%\newcommand{\xref}[1]{\S\ref{#1}}
\newcommand{\cref}[1]{Chapter~\ref{#1}}
\newcommand{\pxref}[1]{(\xref{#1})}
\newcommand{\fref}[1]{Figure~\ref{#1}}
\newcommand{\tref}[1]{Table~\ref{#1}}
\newcommand{\first}{\emph{(i)}~}
\newcommand{\second}{\emph{(ii)}~}
\newcommand{\third}{\emph{(iii)}~}
\newcommand{\fourth}{\emph{(iv)}~}
\newcommand{\fifth}{\emph{(v)}~}
\newcommand{\sixth}{\emph{(vi)}~}

\newcommand{\zb}{z.\,B. \@}

\newcommand{\ie}{i.\,e., \@}
\newcommand{\eg}{e.\,g., \@}
\newcommand{\Ie}{I.\,e., \@}
\newcommand{\Eg}{E.\,g., \@}
\newcommand{\cf}{cf. \@}
\newcommand{\Cf}{Cf. \@}

\newcommand{\etal}{et~al.\xspace}

\newcommand{\perc}{\,\%\xspace}
\newcommand{\pert}{\,\textperthousand\xspace}

% requires \usepackage{pifont}
\newcommand{\checked}{\ding{52}\xspace}
\newcommand{\unchecked}{\ding{56}\xspace}

\newcommand{\todo}[1]{\textit{\textcolor{red}{TODO: #1}}}
%\renewcommand{\todo}[1]{{\LARGE TODO:#1}}

% mark changed wording from first submission 
\newcommand{\new}[1]{\textcolor{blue}{#1}}

% for hints and comments
\newcommand{\comment}[1]{\textit{\textcolor{green}{#1}}}

% mark text blocks that need to be discussed, that might affect other parts 
\newcommand{\discuss}[1]{\textit{\textcolor{red}{#1}}}

% mark deleted text blocks
\usepackage[normalem]{ulem}
\newcommand{\del}[1]{\textcolor{red}{\sout{#1}}}


\newcounter{fn1}
\setcounter{fn1}{1}
\newcounter{fn2}
\setcounter{fn2}{2}
\newcounter{fn3}
\setcounter{fn3}{3}
\newcounter{fn4}
\setcounter{fn4}{4}
\newcounter{fn5}
\setcounter{fn5}{5}
\newcounter{tc}
\setcounter{tc}{1}
\newcommand{\fnsym}[1]{$^{\fnsymbol{#1}}$}

\newcommand{\minisec}[1]{\noindent\textbf{#1}:}

\newcommand{\microsecond}{\textmu{}s\xspace}
\newcommand{\millisecond}{ms\xspace}
\newcommand{\microseconds}{\textmu{}s\xspace}
\newcommand{\milliseconds}{ms\xspace}


\newcommand\textpi{\ensuremath{\pi}\xspace}

\newcommand{\ed}[1]{\textsf{\textbf{[#1]}}}


\setlength{\marginparwidth}{0.8in}
\let\oldmarginpar\marginpar
\renewcommand\marginpar[1]{\-\oldmarginpar[\raggedleft\footnotesize \textcolor{blue}{#1}]%
{\raggedright\footnotesize \textcolor{blue}{#1}}}

\newcounter{mpc}
\setcounter{mpc}{1}
\newcommand{\mph}[1]{{\textcolor{blue}{$^{\fnsymbol{mpc}}$\marginpar{\fnsymbol{mpc} #1}\stepcounter{mpc}}}}

\newcommand{\ccg}{\cellcolor[gray]{0.9}} % requires \usepackage{colortbl}
\newcommand{\tcg}[1]{\textcolor[gray]{0.5}{#1}}


