summaryrefslogtreecommitdiffstats
path: root/utils.tex
blob: e1cdf9a2048130ce4c51f07dc2846de1b7e68ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
%%
%% 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}}