%%%%% Identification Part %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{planning}[2004/02/10 classe pour le planning d'isi]

%%%  Chargement de la classe article, avec transfert d'options
\PassOptionsToClass{a4paper,12pt}{article} % format a4paper par défaut
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax

\LoadClass{article}

%%%% Package loading %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifx\pdfoutput\undefined
\usepackage[colorlinks=true, filecolor=blue, urlcolor=blue, dvips]{hyperref}
\else
\usepackage[colorlinks=true, filecolor=blue, urlcolor=blue, pdftex]{hyperref}
\fi

\RequirePackage{xcolor}
\RequirePackage[french]{babel}
\RequirePackage{graphicx}
\RequirePackage[latin1]{inputenc}
\RequirePackage{enumerate}
\RequirePackage[draft,nomargin,inline]{fixme}

%%%%% Declaration of options %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%% Modification de la page %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%\addtolength{\headheight}{\baselineskip}
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt}
\addtolength{\textwidth}{4cm}
%\addtolength{\headwidth}{2.5cm}
\addtolength{\oddsidemargin}{-2cm}

%%%% Définitions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand\FXInline[2]{{\color{magenta}{(#2)}}}
\newcommand{\note}[2]{\fxnote{\textbf{#1 :} \emph{#2}}}

%% Page de titre
\renewcommand{\@title}{{\color{red}Planning Majeure GLOP\footnote{Génie Logiciel et Objets Programmatiques}}}
%\newcommand{\short@title}{Planning Majeure}
\renewcommand{\@date}{A définir : \verb+\date+}

\renewcommand{\date}[1]{\renewcommand{\@date}{{#1}}}

\renewcommand{\maketitle}
  {\par\begin{center}
        \includegraphics{logoenst}
    \vspace*{1.0em}\par
    {\color{red}\LARGE\bf \@title}\\[2mm]
    {\color{red}\Large\bf \@date}\\[2mm]
    {\color{blue}\large\bf Fabien Dagnat}\\
    ENST Bretagne
%    \texttt{fabien.dagnat@enst-bretagne.fr}
  \end{center}%
  \thispagestyle{plain}
  \addvspace{2em}}

\newcommand{\afaire}[1]{{\LARGE\textbf{\color{magenta}AFAIRE : #1}}}

\renewcommand\tableofcontents{%
    \section*{Planning
        \@mkboth{%
           \MakeUppercase{Planning}}{\MakeUppercase{Planning}}}%
    \@starttoc{toc}%
    }

\newcounter{semaine}
\newcommand{\semaine}{%
  \stepcounter{semaine}%
  \addcontentsline{toc}{section}{Semaine \thesemaine}%
  \section*{Semaine \thesemaine}}

\newcommand{\jour}[1]{%
  \addcontentsline{toc}{subsection}{#1}%
  \subsection*{\color{blue}#1}}

\newcounter{Cours}
\newcounter{PC}
\newcounter{BE}
\newcounter{TP}

\newcommand{\inconnu}{{\large\color{magenta}\textbf{?}}}

\newcommand{\lecon}[4]{%
  \stepcounter{#4}%
  \addcontentsline{toc}{subsubsection}{{\color{blue}#4 \csname the#4\endcsname{} (\textit{#3}) :} #2 -- {\color{blue}#1}}%
  \subsubsection*{\color{green}#4 \csname the#4\endcsname{} : #2 (\textit{#3}) }}%\hfill #1}}

\newcommand{\cours}[3]{\lecon{#1}{#2}{#3}{Cours}}
\newcommand{\pc}[3]{\lecon{#1}{#2}{#3}{PC}}
\newcommand{\be}[3]{\lecon{#1}{#2}{#3}{BE}}
\newcommand{\tp}[3]{\lecon{#1}{#2}{#3}{TP}}

\newcommand{\joker}[1]{{\tiny #1}}



