\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{Bioconductor}[2013/07/01 Bioconductor vignette style]

%%     -I would wish to know how to make this work-
%% \DeclareOption{pdftitle}{\PassOptionsToPackage{pdftitle}{hyperref}}
%% \DeclareOption{pdfauthor}{\PassOptionsToPackage{pdfauthor}{hyperref}}
%% \ExecuteOptions{pdftitle,pdfauthor}
%% \ProcessOptions

\RequirePackage[usenames,dvipsnames]{color}
\definecolor{BiocBlue}{RGB}{24,129,194}
\definecolor{BiocGreen}{RGB}{135,177,63}
\RequirePackage[%
 pdfpagelabels,%
 plainpages=false,%
 pdfborder={0 0 0},%
 pdfstartview=FitH,%
 bookmarks=true,%
 bookmarksnumbered=true,%
 bookmarksopen=true,%
 linktoc=section,%
 linkcolor=BiocBlue,%
 citecolor=BiocBlue,%
 urlcolor=BiocBlue,%
 linkbordercolor={.7 .7 .7},
 citebordercolor={.7 .7 .7},
 urlbordercolor={.7 .7 .7} ,
 raiselinks,%
 pdftex]{hyperref}
\pdfpageattr{/Group << /S /Transparency /I true /CS /DeviceRGB>>} %fixes incorrect color rendering in acroread
\RequirePackage[left=2cm,top=2.5cm,bottom=2.5cm,right=2cm]{geometry}
\RequirePackage{graphicx}
\RequirePackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\RequirePackage{cite}
\pagestyle{empty}
%
\RequirePackage{sectsty}
\sectionfont{\sffamily\bfseries\color{BiocBlue}\sectionrule{0pt}{0pt}{-1ex}{1pt}}
\subsectionfont{\sffamily\bfseries\color{BiocBlue}}
\subsubsectionfont{\sffamily\bfseries\color{BiocBlue}}
%
%% Page layout
\RequirePackage{titling}  %% captures \title{} as \thetitle for subsequent use
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\fancyhead[LE,RO]{\thepage}
\fancyhead[LO,RE]{\thetitle}
\renewcommand{\headrule}{}
%

\usepackage{enumitem}
\setlist{nolistsep}

%% Alter some LaTeX defaults for better treatment of floats
%% See p.105 of "TeX Unbound" for suggested values
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\setcounter{dbltopnumber}{2}
\renewcommand\topfraction{0.9}
\renewcommand\bottomfraction{0.5}
\renewcommand\textfraction{0.1}
\renewcommand\floatpagefraction{0.8}
\renewcommand\dbltopfraction{0.9}
\renewcommand\dblfloatpagefraction{0.8}
%
\RequirePackage{Sweave}
%
\newcommand{\software}[1]{\textsl{#1}}
\newcommand\R{\software{R}}
\newcommand\Bioconductor{\software{Bioconductor}}
\newcommand\Biocpkg[1]{%
  {\href{http://bioconductor.org/packages/release/bioc/html/#1.html}
    {\textsl{#1}}}}
\newcommand\Biocannopkg[1]{%
  {\href{http://bioconductor.org/packages/devel/data/annotation/html/#1.html}%
    {\textsl{#1}}}}
\newcommand\Biocexptpkg[1]{%
  {\href{http://bioconductor.org/packages/devel/data/experiment/html/#1.html}%
    {\textsl{#1}}}}
\newcommand\Rpkg[1]{%
  {\href{http://cran.fhcrc.org/web/packages/#1/index.html}%
    {\textsl{#1}}}}
% 
\newcommand{\Rpackage}[1]{\textit{#1}}
\newcommand{\Rfunction}[1]{{\texttt{#1}}}
\newcommand{\Robject}[1]{\texttt{#1}}
\newcommand{\Rclass}[1]{\textit{#1}}
\newcommand{\Rcode}[1]{\texttt{#1}}
%
\newcommand{\comment}[1]{\textsl{\textcolor{Gray}{#1}}}
\newcommand{\warning}[1]{\textsl{\textcolor{Red}{warning: #1}}}
\newcommand{\fixme}[1]{\textsl{\textcolor{Bittersweet}{fixme: #1}}}
%
\newcommand{\incfig}[4]{%
  \begin{figure}[tbp]
  \begin{center}
  \includegraphics[width=#2]{#1}
  \caption[#3]{\label{#1}\textbf{#3} #4}
  \end{center}
  \end{figure}
}

\endinput
