Retour

TD2.sty

Télécharger le fichier
\setlength{\oddsidemargin}{-0.5cm}
\setlength{\textwidth}{17cm}
\setlength{\topmargin}{-1.5cm}
\setlength{\textheight}{24.5cm}
 
%%\renewcommand{\thesubsubsection}{Exercice \arabic{subsubsection} :}
%%\newcommand{\exo}{\subsubsection}
 
\newcounter{exercice}
\newcommand{\exo}[1]{\setcounter{partie}{0}
                     \setcounter{question}{0}
                     \addtocounter{exercice}{1}
                     \vspace{1em} \par \noindent            %%\arabic
                     {\bf Exercice \arabic{exercice} : #1}  %%\roman
                     \nopagebreak[4]                        %%\Roman     %%p446
                     \par \vspace{0.5em}                    %%\alph
                    }                                       %%\Alph
 
\newcounter{partie}
\newcommand{\partie}[1]{\addtocounter{partie}{1} 
                        \setcounter{question}{0}
                        \setcounter{sous_question}{0}
                        \par \vspace{1em}
                        \pagebreak[2]
                        {\sl \noindent Partie \Roman{partie}~: \boldmath #1}
                        \vspace{0.5em}
                        \nopagebreak[4]
                        }
 
\newcounter{question} %[subsubsection]
\newcommand{\q}{\addtocounter{question}{1} 
                \setcounter{sous_question}{0}
                \par {\bfseries \arabic{question}.}
               }
 
\newcounter{sous_question} %[subsubsection]
\newcommand{\subq}{\addtocounter{sous_question}{1}
                   \setlength{\parindent}{2\parindent}
                   \par \alph{sous_question}.
%%                   \alph{sous_question})
                   \setlength{\parindent}{0.5\parindent}
                  }
 
\newcommand{\correction}{\setcounter{question}{0}
                         \vspace{1em}
                         \par \noindent {\bf Correction~:}
                         \nopagebreak[4]
                         \par \vspace{0.5em}
                         }
 
\newcommand{\coco}{\addtocounter{sous_question}{1}
                   \hfil \alph{sous_question})
                  }