2017-05-12 19:26:29 +00:00
|
|
|
|
%%%
|
|
|
|
|
%%%
|
|
|
|
|
%%% Classe : cours_devoir.cls
|
|
|
|
|
%%% Version : 1.0
|
2018-10-04 20:32:37 +00:00
|
|
|
|
%%% Date : 03/10/18
|
2017-05-12 19:26:29 +00:00
|
|
|
|
%%% Auteur : Jeff LANCE
|
|
|
|
|
%%%
|
|
|
|
|
%%%
|
|
|
|
|
|
|
|
|
|
\NeedsTeXFormat{LaTeX2e}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\ProvidesClass{cours_devoir}[2018/10/03 Devoirs, V1.0]
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
% INIT
|
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
\LoadClassWithOptions{scrartcl}
|
|
|
|
|
%\LoadClass[a4paper, 12pt, DIV=24]{scrartcl}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
% PACKAGES
|
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
% Others
|
|
|
|
|
\RequirePackage{xkeyval}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
% Own packages. Those contains some global settings and definitions.
|
2017-05-12 19:26:29 +00:00
|
|
|
|
\RequirePackage{commun}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\RequirePackage{couleurs}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
\RequirePackage{shortcuts}
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
% Output
|
2017-05-12 19:26:29 +00:00
|
|
|
|
\RequirePackage{comment}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
|
|
|
|
|
% Layout
|
2017-05-12 19:26:29 +00:00
|
|
|
|
\RequirePackage{geometry}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\RequirePackage[footsepline, plainfootsepline]{scrlayer-scrpage}
|
|
|
|
|
\RequirePackage{titling}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
\RequirePackage{titlesec}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\RequirePackage{pageslts}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
\RequirePackage{enumitem}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\RequirePackage[]{hyperref}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\makeatletter
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
% OPTIONS
|
|
|
|
|
%
|
|
|
|
|
%
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\DeclareOptionX{type}[ds]{%
|
|
|
|
|
\def\type{#1}%
|
|
|
|
|
}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\DeclareOptionX{size}[a4paper]{%
|
|
|
|
|
\def\size{#1}%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\ExecuteOptions{DIV=24}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\ExecuteOptionsX{type}
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\ExecuteOptionsX{size}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\ProcessOptionsX
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
% FIXES
|
|
|
|
|
%
|
|
|
|
|
%
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
% Fix error from KOMA-Script scrartcl class.
|
|
|
|
|
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
% SETTINGS
|
|
|
|
|
%
|
|
|
|
|
%
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
% metapost
|
|
|
|
|
\ifpdf
|
|
|
|
|
\DeclareGraphicsRule{*}{mps}{*}{}
|
|
|
|
|
\fi
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
% tkz
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\usetkzobj{all} % loading all tkz objects
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-16 21:08:54 +00:00
|
|
|
|
% sizing of the page, depending on the size parameter of the class
|
|
|
|
|
\ifthenelse{ \equal{\size}{a5} }{
|
2018-11-07 22:52:04 +00:00
|
|
|
|
\geometry{
|
|
|
|
|
a5paper,
|
|
|
|
|
landscape,
|
|
|
|
|
includeheadfoot,
|
|
|
|
|
hmargin=.8cm,
|
|
|
|
|
vmargin=.8cm,
|
|
|
|
|
head=14.5pt}
|
2018-10-16 21:08:54 +00:00
|
|
|
|
}{
|
2018-11-07 22:52:04 +00:00
|
|
|
|
\geometry{a4paper,
|
|
|
|
|
includeheadfoot,
|
|
|
|
|
hmargin=.8cm,
|
|
|
|
|
vmargin=.8cm,
|
|
|
|
|
head=14.5pt}
|
2018-10-16 21:08:54 +00:00
|
|
|
|
}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
|
|
|
|
|
% title, header and footer
|
|
|
|
|
\ihead[]{}
|
|
|
|
|
\chead[]{}
|
|
|
|
|
\ohead[]{}
|
|
|
|
|
\ifoot[]{}
|
|
|
|
|
\cfoot[]{}
|
|
|
|
|
\ofoot[]{}
|
|
|
|
|
|
|
|
|
|
% KOMA-Script version (preferred)
|
|
|
|
|
\ifthenelse{ \equal{\type}{ds} }{
|
2018-11-07 22:52:04 +00:00
|
|
|
|
\cohead[\textbf{MATHÉMATIQUES}\\\textbf{Devoir surveillé}]
|
|
|
|
|
{\textbf{MATHÉMATIQUES}\\\textbf{Devoir surveillé}}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\lohead[NOM :\\Prénom :]{NOM :\\Prénom :}
|
|
|
|
|
\rohead[Le \@date]{Le \@date}
|
|
|
|
|
\cehead[]{}
|
|
|
|
|
\lehead[]{}
|
|
|
|
|
\rehead[]{}
|
|
|
|
|
}{
|
|
|
|
|
\ifthenelse{ \equal{\type}{dm} }{
|
2018-11-07 22:52:04 +00:00
|
|
|
|
\cohead[\textbf{MATHÉMATIQUES}\\\textbf{Devoir maison}]
|
|
|
|
|
{\textbf{MATHÉMATIQUES}\\\textbf{Devoir maison}}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\lohead[NOM :\\Prénom :]{NOM :\\Prénom :}
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\rohead[\@date]{\@date}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\cehead[]{}
|
|
|
|
|
\lehead[]{}
|
|
|
|
|
\rehead[]{}
|
|
|
|
|
}{
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\ifthenelse{ \equal{\type}{int} }{
|
2018-11-07 22:52:04 +00:00
|
|
|
|
\cohead[\textbf{MATHÉMATIQUES}\\\textbf{Interrogation}]
|
|
|
|
|
{\textbf{MATHÉMATIQUES}\\\textbf{Interrogation}}
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\lohead[NOM :\\Prénom :]{NOM :\\Prénom :}
|
|
|
|
|
\rohead[\@date]{\@date}
|
|
|
|
|
\cehead[]{}
|
|
|
|
|
\lehead[]{}
|
|
|
|
|
\rehead[]{}
|
|
|
|
|
}{
|
|
|
|
|
% nothing
|
|
|
|
|
}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\cofoot*{}
|
|
|
|
|
\pagestyle{scrheadings}
|
|
|
|
|
\setkomafont{pagehead}{\normalfont}
|
|
|
|
|
\setkomafont{pagefoot}{\normalfont}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
% paths
|
|
|
|
|
\graphicspath{{images/}}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%
|
|
|
|
|
%
|
2018-10-04 20:32:37 +00:00
|
|
|
|
% MACROS
|
|
|
|
|
%
|
|
|
|
|
%
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-16 21:08:54 +00:00
|
|
|
|
% new lists definitions
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\newlist{questions}{enumerate}{2}
|
|
|
|
|
\setlist[questions]{labelindent=0em, leftmargin=*, labelsep=0.5em}
|
|
|
|
|
\setlist[questions, 1]{label=\textbf{\arabic*.}}
|
|
|
|
|
\setlist[questions, 2]{label=\textbf{\alph*)}}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\newlist{questionsl}{enumerate*}{1}
|
|
|
|
|
\setlist*[questionsl]{label=\textbf{\alph*)}}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\setlist[enumerate, 1]{label=\textbf{\arabic*.}, leftmargin=*, labelsep=.5em}
|
|
|
|
|
\setlist[enumerate, 2]{label=\textbf{\alph*)}}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
|
\setlist[description]{font=\sffamily\bfseries}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-16 21:08:54 +00:00
|
|
|
|
|
|
|
|
|
% print a "Please, turn the page" at bottom right of the page
|
2019-05-05 19:37:05 +00:00
|
|
|
|
\NewDocumentCommand \displayturnpage{ }{
|
2018-11-07 22:52:04 +00:00
|
|
|
|
\rofoot[\textit{Tourner la page, svp} \faHandORight]
|
|
|
|
|
{\textit{Tourner la page, svp} \faHandORight}
|
2018-10-04 20:32:37 +00:00
|
|
|
|
}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
2018-10-16 21:08:54 +00:00
|
|
|
|
|
2018-12-19 12:36:16 +00:00
|
|
|
|
% print the main directives of the test
|
2019-05-05 19:37:05 +00:00
|
|
|
|
\NewDocumentCommand \displaydirectives{ }{
|
|
|
|
|
\begin{center}
|
|
|
|
|
\fbox{
|
|
|
|
|
\parbox{.9\textwidth}{
|
|
|
|
|
\centering
|
|
|
|
|
\small
|
2019-05-05 19:40:29 +00:00
|
|
|
|
Le prêt de matériel et de documents personnels est interdit.\\
|
2019-05-05 19:37:05 +00:00
|
|
|
|
Le barème est donné à titre indicatif : il pourra être légèrement différent.\\
|
|
|
|
|
Les exercices peuvent être traités dans n’importe quel ordre mais attention à bien reporter les numéros des questions.\\
|
|
|
|
|
Il sera tenu compte dans la notation du soin apporté à la copie et de la clarté des raisonnements.\\
|
|
|
|
|
Si présent, le symbole \faPencil\ indique que tout ou partie de l'exercice est à réaliser sur l’énoncé.\\
|
|
|
|
|
Sauf mention contraire, toutes les questions sont à justifier rigoureusement.
|
2018-12-19 12:36:16 +00:00
|
|
|
|
}
|
2019-05-05 19:37:05 +00:00
|
|
|
|
}
|
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
|
|
\vspace{.2cm}
|
2018-12-19 12:36:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-10-16 21:08:54 +00:00
|
|
|
|
% amsthm style for exercises
|
2018-12-19 12:36:16 +00:00
|
|
|
|
\newtheoremstyle{exostyle1}
|
2018-11-07 22:52:04 +00:00
|
|
|
|
{\topsep}% espace avant
|
|
|
|
|
{\topsep}% espace apres
|
|
|
|
|
{}% Police utilisee par le style de thm
|
|
|
|
|
{}% Indentation (vide = aucune, \parindent = indentation paragraphe)
|
|
|
|
|
{\bfseries}% Police du titre de thm
|
|
|
|
|
{}% Signe de ponctuation apres le titre du thm
|
2018-10-16 21:08:54 +00:00
|
|
|
|
{\newline}% Espace apres le titre du thm (\newline = linebreak)
|
|
|
|
|
{%
|
|
|
|
|
\if\relax\detokenize{#3}\relax
|
|
|
|
|
% no optional argument
|
|
|
|
|
\else
|
|
|
|
|
\makebox[0pt][l]{\hspace{.9\textwidth}\normalfont\itshape#3}%
|
|
|
|
|
\fi
|
|
|
|
|
\thmname{#1}\thmnumber{ #2}%
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-19 12:36:16 +00:00
|
|
|
|
\newtheoremstyle{exostyle2}
|
|
|
|
|
{\topsep}% espace avant
|
|
|
|
|
{\topsep}% espace apres
|
|
|
|
|
{}% Police utilisee par le style de thm
|
|
|
|
|
{}% Indentation (vide = aucune, \parindent = indentation paragraphe)
|
|
|
|
|
{\bfseries}% Police du titre de thm
|
|
|
|
|
{}% Signe de ponctuation apres le titre du thm
|
|
|
|
|
{\newline}% Espace apres le titre du thm (\newline = linebreak)
|
|
|
|
|
{%
|
|
|
|
|
\if\relax\detokenize{#3}\relax
|
|
|
|
|
% no optional argument
|
|
|
|
|
\else
|
|
|
|
|
\makebox[0pt][l]{\hspace{.9\textwidth}\normalfont\itshape#3}%
|
|
|
|
|
\fi
|
|
|
|
|
\thmname{#1 }%
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
\theoremstyle{exostyle1}
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\newtheorem{exercice}{Exercice}
|
|
|
|
|
\newtheorem{exercice*}[exercice]{\faPencil \ Exercice}
|
|
|
|
|
|
2018-12-19 12:36:16 +00:00
|
|
|
|
\theoremstyle{exostyle2}
|
|
|
|
|
\newtheorem{exercice**}{Exercice}
|
2018-10-16 21:08:54 +00:00
|
|
|
|
|
|
|
|
|
% amsthm proofs customization
|
|
|
|
|
\newenvironment{solution}
|
|
|
|
|
{\begin{proof}[\textbf{Solution}]}
|
|
|
|
|
{\end{proof}}
|
|
|
|
|
|
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
% TODO: Replace amsthm exercices with xsim
|
|
|
|
|
%
|
|
|
|
|
%
|
|
|
|
|
%\usepackage{xsim}
|
|
|
|
|
%
|
|
|
|
|
%\DeclareExerciseTranslations{exercise}{
|
|
|
|
|
% Fallback = exercise,
|
|
|
|
|
% English = exercise,
|
|
|
|
|
% French = exercice
|
|
|
|
|
%}
|
|
|
|
|
%
|
|
|
|
|
%\DeclareExerciseType{exercice}{
|
|
|
|
|
% exercise-env = exercice ,
|
|
|
|
|
% solution-env = answer ,
|
|
|
|
|
% exercise-name = Exercice ,
|
|
|
|
|
% solution-name = Solution ,
|
|
|
|
|
% exercise-template = exercice ,
|
|
|
|
|
% solution-template = exercice
|
|
|
|
|
%}
|
|
|
|
|
%
|
|
|
|
|
%\DeclareExerciseEnvironmentTemplate{exercice}{%
|
|
|
|
|
% \subsection*
|
|
|
|
|
% {%
|
|
|
|
|
% \XSIMmixedcase{\GetExerciseName}\nobreakspace
|
|
|
|
|
% \GetExerciseProperty{counter}%
|
|
|
|
|
% \IfInsideSolutionF
|
|
|
|
|
% {%
|
|
|
|
|
% \GetExercisePropertyT{subtitle}
|
|
|
|
|
% { {\normalfont\itshape\PropertyValue}}%
|
|
|
|
|
% }%
|
|
|
|
|
% }
|
|
|
|
|
% \GetExercisePropertyT{points}
|
|
|
|
|
% {%
|
|
|
|
|
% \hspace{.9\textwidth}\\
|
|
|
|
|
% {%
|
|
|
|
|
% \IfInsideSolutionF{\rule{1.2cm}{1pt}\slash}%
|
|
|
|
|
% \printgoal{\PropertyValue}
|
|
|
|
|
% \GetExercisePropertyT{bonus-points}{~(+\printgoal{\PropertyValue})}%
|
|
|
|
|
% ~\XSIMtranslate {point-abbr}%
|
|
|
|
|
% }%
|
|
|
|
|
% }%
|
|
|
|
|
%}
|
|
|
|
|
%{}
|
|
|
|
|
|
|
|
|
|
% text customization
|
2018-12-19 12:36:16 +00:00
|
|
|
|
\NewDocumentCommand \devprintconc{ }{
|
2018-10-16 21:08:54 +00:00
|
|
|
|
\underline{Conclusion :}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2017-05-12 19:26:29 +00:00
|
|
|
|
\makeatother
|