\NeedsTeXFormat{LaTeX2e} \ProvidesClass{classDS} % classe de base \LoadClassWithOptions{exam} % extensions \RequirePackage{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/tools/style/base} \RequirePackage{/media/documents/Cours/Prof/Enseignements/Archive/2013-2014/tools/style/theme} % Custumisation de la class Exam %% Les en-tête et les pieds de pages \newcommand{\op@boiteentete}{\makebox[0pt][l]{\hspace*{-3ex}% \color{bgentete}\rule[-0.8ex]{\linewidth+6ex}{3ex}% }} \pagestyle{headandfoot} \firstpageheader{}{}{} % Header de la première page \runningheader{\op@boiteentete\small\scshape\op@entete}{}{\small\op@typedoc \op@titre} % header des autres pages \firstpagefooter{\scriptsize\op@classe{} -- \op@annee}{}{\scriptsize\thepage / \numpages} % Footer de la première page \runningfooter{\scriptsize\op@classe{} -- \op@annee}{}{\scriptsize\thepage / \numpages} % footer des autres pages %% Questions and parts %%% Numbering \renewcommand{\thepartno}{\arabic{partno}} % numérotation de part \renewcommand{\thesubpart}{\alph{subpart}} % numérotation de subpart \renewcommand{\thesubsubpart}{\greeknum{subsubpart}} % numérotation de subsubpart %%% Display numbering \renewcommand{\partlabel}{\colorbox{exercice}{\color{highlightbg}\thepartno}} %\newcommand{\partlabel}{\thepartno.} \renewcommand{\subpartlabel}{\color{exercice}\thesubpart.} \renewcommand{\subsubpartlabel}{\color{exercice}\thesubsubpart)} %%% Reformat questions \qformat{\Large \textbf{\color{exercice}{Exercice \thequestion}} \hspace{0.5cm} \color{line}\hrulefill \hspace{0.5cm} \color{exercice} \thepoints} % commandes personnelles %% Description du DS \newcommand{\op@entete}{} \newcommand{\op@soustitre}{\op@classe{} -- \@date{}} \newcommand{\op@classe}{} \newcommand{\op@typedoc}{} \newcommand{\op@typedoctmp}{} \newcommand{\op@titre}{} \newcommand{\op@duree}{} \newcommand{\op@sujet}{} \newcommand{\classe}[1]{\renewcommand{\op@classe}{#1}} \newcommand{\duree}[1]{\renewcommand{\op@duree}{#1}} \newcommand{\titre}[1]{\renewcommand{\op@titre}{#1}} \newcommand{\sujet}[1]{\renewcommand{\op@sujet}{Sujet #1}} % typedoc #1 = type du document; #2 thème du document \newcommand{\typedoc}[1]{\renewcommand{\op@typedoctmp}{#1} \ifthenelse{\equal{\op@typedoctmp}{DS}}% {\renewcommand{\op@typedoc}{Devoir surveillé: } \renewcommand{\op@soustitre}{\op@classe{} -- \@date{} -- Durée : \op@duree}% \renewcommand{\op@entete}{\@date}}{} \ifthenelse{\equal{\op@typedoctmp}{DSCorr}}% {\renewcommand{\op@typedoc}{Devoir surveillé (correction): } \renewcommand{\op@soustitre}{\op@classe{} -- \@date{} -- Correction}% \renewcommand{\op@entete}{\@date}}{} \ifthenelse{\equal{\op@typedoctmp}{DM}}% {\renewcommand{\op@typedoc}{Devoir maison: } \renewcommand{\op@soustitre}{\op@classe{} -- À rendre le \@date}% \renewcommand{\op@entete}{À rendre le \@date}}{} \ifthenelse{\equal{\op@typedoctmp}{DMCorr}}% {\renewcommand{\op@typedoc}{Devoir maison (correction): } \renewcommand{\op@soustitre}{\op@classe{} -- \@date{} -- Correction}% \renewcommand{\op@entete}{\@date}}{} \ifthenelse{\equal{\op@typedoctmp}{Corr}}% {\renewcommand{\op@soustitre}{\op@classe{} -- \@date{} -- Correction}% \renewcommand{\op@entete}{Devoir surveillé \no \op@numero}}{} } %% Redéfinition de maketitle \renewcommand{\maketitle}{% %\thispagestyle{plain} \noindent{\huge \color{title}\bfseries \op@typedoc \op@titre}\par \noindent{\color{line}\rule{\linewidth}{1ex}}\par \noindent{\color{subtitle}\bfseries \op@soustitre \hfill \large\op@sujet}\par \vspace{2.5\baselineskip} } \newcommand{\noCalc}{{\centering \textbf{Calculatrice interdite} \par}} \newcommand{\Calc}{{\centering \textbf{Calculatrice autorisée} \par}}