\usepackage{graphicx}
\usepackage{bbding}
\usepackage{mathtools}
%\usepackage{microtype}
\usepackage{slashed}
\usepackage{shuffle}
\usepackage{longtable}
\usepackage{bm}

% Hyperref colors
\definecolor{SapGreen}{HTML}{3B7B3B}
\definecolor{PhtaloGreen}{HTML}{2b7a76}
\definecolor{EmeraldGreen}{HTML}{1ea78d}
\definecolor{EnglishRed}{HTML}{b02427}
\definecolor{IronOxideRed}{HTML}{a13634}
\definecolor{CadmiumRed}{HTML}{df2b3f}
\definecolor{Vermillion}{HTML}{e14235}

%\AtBeginDocument{
%    \hypersetup{
%        urlcolor=EnglishRed,
%        linkcolor=EnglishRed,
%        citecolor=EmeraldGreen
%    }
%}

% Beamer
\usetheme{zeta}

% Fonts
%\usepackage{kpfonts}
%\usepackage[bitstream-charter]{mathdesign}
%\usepackage[T1]{fontenc}

% Doublestroke fonts for the \mathds{} command.
\usepackage{dsfont}

% AMS align should be able to cross pages
%\allowdisplaybreaks[1]

% \pdfmdfivesum fallback definition 
% This will work with pdflatex, XeLaTex, LuaTex, but not with plain latex.
\ifcsname pdfmdfivesum\endcsname
\else
    \ifcsname mdfivesum\endcsname
        % This is a shim for XeTeX, which has \mdfivesum, but no \pdfmdfivesum.
        \newcommand{\pdfmdfivesum}[1]{\mdfivesum{#1}}
    \else
        \errmessage{Neither pdfmdfivesum nor mdfivesum commands are present. Fail}
    \fi
\fi

% TikZ setup

\input{all.tikzdefs}
\input{all.tikzstyles}

% TikZ drawing cache
%\tikzexternalize
%\tikzexternaldisable

\newcommand*{\fig}[1]{%
%    \tikzexternalenable%
%    \tikzsetnextfilename{figcache/\pdfmdfivesum{#1}}%
    \scalebox{0.75}{\input{fig/#1.tikz}}%
%    \tikzexternaldisable%
}
%\newcommand*{\sfig}[1]{\raisebox{0.15ex}{\scalebox{0.75}{\fig{#1}}}}
\newcommand*{\sfig}[1]{\raisebox{0.5ex}{\scalebox{0.75}{\fig{#1}}}}

% Custom macros

\newcommand{\sidenote}[1]{\hfill{\scriptsize\color{gray}{[#1]}}}
\renewcommand{\noun}[1]{\textsc{#1}}
\renewcommand{\emph}[1]{\textit{\color{ZetaLightBrown}#1}}
\renewcommand{\code}[1]{\texttt{\color{ZetaDark}#1}}
