\usepackage[usenames,dvipsnames]{color}
\usepackage{graphics}
\usepackage{latexsym, amsmath, amssymb}
\usepackage{authblk}
\usepackage[colorlinks=true, linkcolor=Blue, urlcolor=Blue,
  citecolor=Blue]{hyperref}
\usepackage{fullpage}           % margins

%% Simple macros

\newcommand{\code}[1]{{\texttt{#1}}}
\newcommand{\file}[1]{{\texttt{#1}}}

\newcommand{\software}[1]{\textsl{#1}}
\newcommand\R{\software{R}}
\newcommand\Bioconductor{\software{Bioconductor}}
\newcommand\RStudio{\software{RStudio}}
\newcommand\Rpackage[1]{{\textsl{#1}\index{#1 (package)}}}
\newcommand\Biocpkg[1]{%
  {\href{http://bioconductor.org/packages/devel/bioc/html/#1.html}%
    {\textsl{#1}}}%
  \index{#1 (package)}}
\newcommand\Rpkg[1]{%
  {\href{http://cran.fhcrc.org/web/packages/#1/index.html}%
    {\textsl{#1}}}%
  \index{#1 (package)}}
\newcommand\Biocannopkg[1]{%
  {\href{http://bioconductor.org/packages/devel/data/annotation/html/#1.html}%
    {\textsl{#1}}}%
  \index{#1 (package)}}
\newcommand\Biocexptpkg[1]{%
  {\href{http://bioconductor.org/packages/devel/data/experiment/html/#1.html}%
    {\textsl{#1}}}%
  \index{#1 (package)}}
\newcommand\Robject[1]{{\small\texttt{#1}}}
\newcommand\Rclass[1]{{\textit{#1}\index{#1 (class)}}}
\newcommand\Rfunction[1]{{{\small\texttt{#1}}\index{#1 (function)}}}
\newcommand\Rmethod[1]{{\texttt{#1}}}
\newcommand\Rfunarg[1]{{\small\texttt{#1}}}
\newcommand\Rcode[1]{{\small\texttt{#1}}}

\newcommand{\Dmel}{\emph{D.\ melanogaster}}
\newcommand{\Hsap}{\emph{H.\ sapiens}}

%% packed lists
\newenvironment{packeditemize}{
\begin{itemize}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{itemize}}

\newenvironment{packedenumerate}{
\begin{enumerate}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{enumerate}}

\newenvironment{packeddescription}{
\begin{description}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{description}}

%% fixme
\newcommand{\FIXME}[1]{\textsl{\textcolor{Bittersweet}{FIXME: #1}}}
\newcommand{\WARNING}[1]{\textsl{\textcolor{Red}{WARNING: #1}}}

%% Question, Exercise, Solution
\usepackage{theorem}
\theoremstyle{break} 
\newtheorem{Ext}{Exercise}
\newtheorem{Question}{Question}

\newenvironment{Exercise}{
  \renewcommand{\labelenumi}{\alph{enumi}.}\begin{Ext}%
}{\end{Ext}}
\newenvironment{Solution}{%
  \noindent\textbf{Solution:}\renewcommand{\labelenumi}{\alph{enumi}.}%
}{\bigskip}

%% table / figure captions
\setlength{\abovecaptionskip}{6pt}
\setlength{\belowcaptionskip}{6pt}

%% Bibliography
\renewcommand\bibname{References}
