2018-02-21 19:12:43 +01:00
|
|
|
\makeatletter
|
|
|
|
|
\@ifundefined{stylecentrale}
|
2018-03-09 10:51:53 +01:00
|
|
|
{\@ifundefined{resetlevel}{\def\resetlevel{[section]}}{}}
|
2018-02-21 19:12:43 +01:00
|
|
|
{%
|
|
|
|
|
\renewcommand\thesection{\Roman{section}}%
|
|
|
|
|
\renewcommand\thesubsection{\thesection.\Alph{subsection}}%
|
2018-03-09 10:51:53 +01:00
|
|
|
\def\resetlevel{[subsection]}
|
2018-02-21 19:12:43 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\theoremstyle{plain}
|
|
|
|
|
\theoremheaderfont{\bfseries}
|
|
|
|
|
\theorembodyfont{\upshape}
|
|
|
|
|
\theoremseparator{. }
|
|
|
|
|
\theoremsymbol{}
|
|
|
|
|
\newtheorem*{important}{Important}
|
|
|
|
|
\newtheorem*{rappel}{Rappel}
|
|
|
|
|
|
|
|
|
|
\usepackage{xfrac}
|
|
|
|
|
\usepackage{xparse}
|
|
|
|
|
\usepackage{comment}
|
|
|
|
|
|
|
|
|
|
\newif\ifcorrige
|
|
|
|
|
\def\corr{\filigrane{\Huge CORRIG\'E --- CORRIG\'E}\global\corrigetrue}
|
|
|
|
|
\newif\ifcorrigeseul
|
|
|
|
|
\def\corrseul{\filigrane{\Huge CORRIG\'E --- CORRIG\'E}\global\corrigeseultrue}
|
|
|
|
|
|
|
|
|
|
\usepackage{xstring}
|
|
|
|
|
\IfEndWith{\jobname}{\detokenize{-ENONCE}}{\let\corr\relax\let\corrseul\relax}{}
|
|
|
|
|
\IfEndWith{\jobname}{\detokenize{-PROF}}{\corr\let\corr\relax\let\corrseul\relax}{}
|
|
|
|
|
\IfEndWith{\jobname}{\detokenize{-CORRIGE}}{\corrseul\let\corr\relax\let\corrseul\relax}{}
|
|
|
|
|
|
|
|
|
|
\def\pasenonce{
|
|
|
|
|
\excludecomment{question}
|
|
|
|
|
\excludecomment{enonce}
|
|
|
|
|
\excludecomment{qcmrep}
|
|
|
|
|
\excludecomment{qcm}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\def\avecenonce{\newenvironment{enonce}{}{}
|
2018-03-09 10:51:53 +01:00
|
|
|
\newtheorem{question}{Question}\resetlevel
|
2018-02-21 19:12:43 +01:00
|
|
|
\def\skipcorrige{}
|
|
|
|
|
\newtheorem{qcm}{QCM}
|
|
|
|
|
%
|
|
|
|
|
\NewDocumentEnvironment{qcmrep}{o}
|
|
|
|
|
{\IfValueT{##1}{\begingroup\setlength\columnseprule{0pt}\begin{multicols}{##1}}\begin{enumerate}\renewcommand\theenumi{\Alph{enumi}}}{\end{enumerate}\IfValueT{##1}{\end{multicols}\endgroup}}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\AtBeginDocument{%
|
|
|
|
|
\ifcorrige
|
|
|
|
|
\immediate\typeout{Mode professeur}
|
|
|
|
|
\makeatletter\IfStrEq{\@subtitle}{}{}{\subtitle{Corrigé}}\makeatother
|
|
|
|
|
\newenvironment{corrige}{\begin{mdframed}[backgroundcolor=gray!20, skipbelow=1ex]}{\end{mdframed}}
|
|
|
|
|
\newenvironment{comcorrige}{\begin{mdframed}[backgroundcolor=gray!20, skipbelow=1ex]}{\end{mdframed}}
|
|
|
|
|
\newenvironment{qcmcorr}{\begin{mdframed}[backgroundcolor=gray!20, skipbelow=1ex]}{\end{mdframed}}
|
|
|
|
|
\avecenonce
|
|
|
|
|
\else\ifcorrigeseul
|
|
|
|
|
\immediate\typeout{Mode corrige}
|
|
|
|
|
\makeatletter\IfStrEq{\@subtitle}{}{}{\subtitle{Corrigé}}\makeatother
|
|
|
|
|
\pasenonce
|
2018-03-09 10:51:53 +01:00
|
|
|
\newtheorem{corrige}{Question}\resetlevel
|
2018-02-21 19:12:43 +01:00
|
|
|
\newtheorem{qcmcorr}{QCM}
|
|
|
|
|
\newenvironment{comcorrige}{}{}
|
|
|
|
|
\def\skipcorrige{\stepcounter{corrige}}
|
|
|
|
|
\else
|
|
|
|
|
\immediate\typeout{Mode enonce}
|
|
|
|
|
\excludecomment{corrige}
|
|
|
|
|
\excludecomment{comcorrige}
|
|
|
|
|
\excludecomment{qcmcorr}
|
|
|
|
|
\avecenonce
|
|
|
|
|
\fi\fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\DeclareInstance{xfrac}{cinqdemi}{text}{scale-factor=1, h-scale=1.25, slash-left-kern=-2.5pt, slash-right-kern=-2.25pt}
|
|
|
|
|
|
|
|
|
|
\def\cinqdemi{\sfrac[cinqdemi]{5}{2}}
|
|
|
|
|
|
|
|
|
|
\endinput
|