\def\weburl{http://drorbn.net/SL2PO}
\def\web#1{\href{\weburl/#1}{\begin{greek}web\end{greek}/#1}}

\def\bbe{{\mathbb e}}
\def\bbA{{\mathbb A}}
\def\bbB{{\mathbb B}}
\def\bbC{{\mathbb C}}
\def\bbD{{\mathbb D}}
\def\bbE{{\mathbb E}}
\def\bbN{{\mathbb N}}
\def\bbQ{{\mathbb Q}}
\def\bbV{{\mathbb V}}
\def\calB{{\mathcal B}}
\def\calD{{\mathcal D}}
\def\calF{{\mathcal F}}
\def\calG{{\mathcal G}}
\def\calK{{\mathcal K}}
\def\calL{{\mathcal L}}
\def\calR{{\mathcal R}}
\def\calU{{\mathcal U}}
\def\fraka{{\mathfrak a}}
\def\frakb{{\mathfrak b}}
\def\frakg{{\mathfrak g}}
\def\frakh{{\mathfrak h}}
\def\frakn{{\mathfrak n}}
\def\hatcalU{\hat{\mathcal U}}

\def\act{{\hspace{-1pt}\sslash\hspace{-0.75pt}}}

\def\Hom{\operatorname{Hom}}
\def\Id{\text{\it Id}}

\def\draftcut{\if\draft y \cleardoublepage \fi}
%\def\draftcut{\cleardoublepage}

\definecolor{lightred}{RGB}{255, 217, 217}
\def\lightred#1{\setlength{\fboxsep}{0pt}\colorbox{lightred}{#1}}
\def\gray{\color{gray}}
\def\red{\color{red}}
\def\yellowm#1{{\setlength{\fboxsep}{0pt}\colorbox{yellow}{$#1$}}}
\def\yellowt#1{{\setlength{\fboxsep}{0pt}\colorbox{yellow}{#1}}}

% Following
% http://tex.stackexchange.com/questions/23521/tabular-vertical-alignment-to-top
\def\imagetop#1{\vtop{\null\hbox{#1}}}

\def\cellscale{0.66}
\def\face{\input{figs/face.pdf_t}}
\def\human{\input{figs/human.pdf_t}}
\def\machine{\input{figs/machine.pdf_t}}
\def\shortmathinclude#1{{%
%\newline\vspace{0mm}
\par\noindent
  {\imagetop{\face}\
  \imagetop{\includegraphics[scale=\cellscale]{Snips/#1.pdf}}}
  \newline\vskip 1mm
}}
\def\mathinclude#1{{\label{C:#1}%
%\leavevmode\newline\vspace{0mm}
  \par\noindent
  {\imagetop{\human}\
  \imagetop{\includegraphics[scale=\cellscale]{Snips/#1.pdf}}}
  \newline\vskip 1mm
}}
\def\shortdialoginclude#1{{\label{C:#1}%
  \noindent
  \imagetop{\face}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-In.pdf}}
  \newline
  \vskip 1mm\noindent
  \imagetop{\machine}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-Out.pdf}}
  \newline
}}
\def\shortdialogincludewithlink#1{{\label{C:#1}%
  \noindent
  \imagetop{\face}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-In.pdf}}
  \newline
  \vskip 1mm\noindent
  \imagetop{\machine}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-Out.pdf}}
  \hfill\parbox[t]{1in}{
    \rightline{Fuller output:}
    \rightline{\citeweb{#1.nb}}
  }
  \newline
}}
\def\dialoginclude#1{{\label{C:#1}%
  \noindent
  \imagetop{\human}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-In.pdf}}
  \newline
  \vskip 1mm\noindent
  \imagetop{\machine}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-Out.pdf}}
  \newline
}}
\def\dialogincludewithlink#1{{\label{C:#1}%
  \noindent
  \imagetop{\human}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-In.pdf}}
  \newline
  \vskip 1mm\noindent
  \imagetop{\machine}\
\imagetop{\includegraphics[scale=\cellscale]{Snips/#1-Out.pdf}}
  \hfill\hspace{-1in}\parbox[t]{1in}{
    \rightline{Fuller output:}
    \rightline{\citeweb{#1.nb}}
  }
  \newline
}}

\def\ds{\displaystyle}

\def\glosm#1#2{{\label{g:#1}\yellowm{#2}}}
\def\glosi#1#2#3{{\item[{#2}] #3~\hfill\pageref{g:#1}}}

\def\dpg{\text{\bf DoPeGDO}}
\def\eps{\epsilon}
\def\gdo{\text{\bf GDO}}
\def\sleps{{sl_{2+}^\eps}}

\def\endpar#1{~\hfill\fbox{\footnotesize#1}}

\def\lollipop{\scalebox{0.1}{\input{figs/lollipop.pdf_t}}}
