%\RequirePackage[greek,francais]{babel}
\RequirePackage{geometry}
\RequirePackage{ucs}
\RequirePackage[utf8]{inputenc}
\RequirePackage{graphicx,ae,fancyvrb}
\RequirePackage{color}
\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}

% Commandes pour R

\definecolor{vacol}{rgb}{0.2,.4,.6}
\definecolor{cv}{rgb}{0.2,.4,.6}
\definecolor{Rfcol}{rgb}{0.1,.2,.6}
\definecolor{Racol}{rgb}{0.2,.2,.5}
\definecolor{Rvcol}{rgb}{0.2,.2,.5}
\definecolor{Rmcol}{rgb}{0.2,.2,.5}
\definecolor{Rdcol}{rgb}{0.7,.2,.2}
\definecolor{Robcol}{rgb}{0.2,.7,.2}
\definecolor{Rclcol}{rgb}{0.5,.2,.2}

% \newenvironment{Rcmd}[1]{\vspace{0.5cm}\begin{center}\begin{minipage}{.9\textwidth}\hrulefill
%      \textbf{\ #1\ } \hrulefill\par
%  }{\par\hrulefill \end{minipage}\end{center}\vspace{.5cm}}

% R functions
\newcommand{\Rf}[1]{{\color{Rfcol}%
   \fontsize{9}{13}\usefont{T1}{pag}{m}{n} #1%
   \index{b@\textbf{fonctions}!#1}%
}}
% R function's arguments
\newcommand{\Ra}[2]{{\color{Racol}\texttt{#1}%
\index{d@\textbf{functions' arguments}!\textit{#2}!#1}%
}}
% R value
\newcommand{\Rv}[1]{{\color{Rvcol} \texttt{#1}}}
% R methods
\newcommand{\Rm}[2]{{\color{Rmcol}\texttt{#1}%
\index{d@\textbf{methods}!\textit{#2}!#1}%
}}
% R data
\newcommand{\Rd}[1]{{\color{Rdcol}%
   \fontsize{9}{13}\usefont{T1}{pag}{m}{n} #1%
   \index{c@\textbf{data}!#1}%
}}
% variable
\newcommand{\va}[1]{{\color{vacol}%
    \fontsize{9}{13}\usefont{T1}{pag}{m}{n} #1%
}}
% R object
\newcommand{\Rob}[1]{{\color{Robcol}\texttt{#1}%
   \index{a@\textbf{objects}!#1}%
 }}
\newcommand{\Rcl}[1][]{%
  \SaveVerb[aftersave= {%
    {\color{Rclcol} \UseVerb[#1,fontfamily=helvetica]{coucou}%
    }}]{coucou}%
}

\newenvironment{Rcmd}[1]{\vspace{0.5cm}\begin{center}\hrulefill
     \textbf{\ #1\ } \hrulefill\par
 }{\par\hrulefill \end{center}\vspace{.5cm}}
\newcommand{\Rat}[1]{{\color{cv}\usefont{T1}{pag}{m}{n} #1}}
\newcommand{\Rfi}[2]{{\color{red}
   \fontsize{9}{13}\usefont{T1}{pag}{m}{n}
   #1\index{\textbf{#2}!#1}
}}

\newcommand{\dfvar}[1]{{\color{cv}\usefont{T1}{pag}{m}{n} #1}}

\newcommand{\com}[2]{{\color{red}
   \fontsize{9}{13}\usefont{T1}{pag}{m}{n}
   #1\index{b@\textbf{fonctions}!#1}
}}

\newcommand{\Rel}[2]{{\color{blue}
   \texttt{#1}\index{e@\textbf{objects' elements}!\textit{#2}!#1}
}}
\newcommand{\fichier}[1][]{\SaveVerb[aftersave= {
     {\color{cv} \UseVerb[#1]{coucou} }}]{coucou}}
% \newcommand{\Rcl}[1][]{\SaveVerb[aftersave= {
%      {\color{red} \UseVerb[#1,fontfamily=helvetica]{coucou}} }]{coucou}}
\newenvironment{Rcp}{\VerbatimEnvironment\begin{Verbatim}[formatcom=\color{red},fontfamily=helvetica]}{\end{Verbatim}}

% \DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,frame=leftline,formatcom=\color{red},xleftmargin=5mm,baselinestretch=1,fontsize=\footnotesize}
% \DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom=\color{blue},frame=leftline,xleftmargin=5mm,baselinestretch,fontsize=\footnotesize}
% \DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl}

%\newenvironment{Schunk}{}{}

% \newenvironment{answer}[1][5]%
% {\vspace{.5cm}\hspace{1cm} \begin{minipage}{10cm}\sffamily \small}%
% {\end{minipage}\vspace{.5cm}\par }

% \newenvironment{answer}[1][5]%
% {\vspace{.1cm}\hspace{1cm}\sffamily \small}%
% {\vspace{.1cm}\par }

\newenvironment{answer}[1][5]%
{\vspace{.1cm}\sffamily \small}%
{\vspace{.1cm}\par }
