Reorganisation des classes (il faudra changer le README) et adaptation

des exemples
This commit is contained in:
2017-08-27 12:06:13 +03:00
parent 530c50115f
commit 07165abea9
15 changed files with 294 additions and 516 deletions

View File

@@ -9,7 +9,7 @@
\RequirePackage{amssymb}
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{subfig}
%\RequirePackage{subfig}
\RequirePackage{graphicx}
\RequirePackage{color}
\RequirePackage{gensymb}
@@ -52,28 +52,3 @@
% Les tableaux
\renewcommand{\arraystretch}{2}
%%%%%%%%%%%%%%%%%%%%%%
% Environment Exo %
%%%%%%%%%%%%%%%%%%%%%%
% Doit disparaitre pour laisser place à exsheet
\newcounter{exo}[section]
\setcounter{exo}{0}
\newenvironment{Exo}[1][0]{%
\addtocounter{exo}{1}
\medskip
\noindent%
\textbf{\color{exercice}{Exercice \theexo}} \hspace{0.5cm} \color{line}\hrulefill \hspace{0.5cm} \color{exercice}
\ifthenelse{\equal{#1}{0}}%
{}%
{#1}
% \ifthenelse{\lengthtest{#1 pt = 1pt}}{#1 point}{#1 points}}%
\par
\medskip
\color{text}
}{\par%
}
\newcommand{\exo}[1]{{\centering \textbf{#1} \par}}

View File

@@ -1,10 +0,0 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{classDS}
% classe de base
\LoadClassWithOptions{remixExam}

View File

@@ -1,10 +0,0 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{classExamen}
% classe de base
\LoadClassWithOptions{remixExam}
\renewcommand{\baselinestretch}{1.5} % interligne

View File

@@ -1,34 +0,0 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{classExo}
% classe de base
\LoadClassWithOptions{remixExam}
% extensions
\RequirePackage{base}
\RequirePackage{colorscheme}
\RequirePackage{geometry}
%\geometry{landscape}
\geometry{left=15mm,right=15mm, bottom= 15mm, top=15mm}
\firstpageheader{\op@boiteentete\small\scshape\op@entete}{}{\small\op@typedoc \op@titre} % Header de la première page
%\setlength{\oddsidemargin}{0in} % default=0in
%\setlength{\textwidth}{9in} % default=9in
\setlength{\columnsep}{30pt} % default=10pt
\setlength{\columnseprule}{1pt} % default=0pt (no line)
%\setlength{\textheight}{5.85in} % default=5.15in
%\setlength{\topmargin}{-0.40in} % default=0.20in
%\setlength{\headsep}{0.35in} % default=0.35in
\renewcommand{\op@entete}{\op@classe}

View File

@@ -42,7 +42,7 @@
\colorlet{subtitle}{base02}
\colorlet{line}{base1}
\colorlet{comments}{base01}
\colorlet{exercice}{blue}
\colorlet{exercise}{blue}
\colorlet{note}{red}

56
tools/style/myXsim.sty Normal file
View File

@@ -0,0 +1,56 @@
\NeedsTeXFormat{LaTeX2e}
% extensions
\RequirePackage{base}
\RequirePackage{colorscheme}
\RequirePackage{myhdr}
\RequirePackage{geometry}
%\geometry{landscape}
\geometry{left=15mm,right=15mm, bottom= 15mm, top=15mm}
%\firstpageheader{\op@boiteentete\small\scshape\op@entete}{}{\small\op@typedoc \op@titre} % Header de la première page
%\setlength{\oddsidemargin}{0in} % default=0in
%\setlength{\textwidth}{9in} % default=9in
\setlength{\columnsep}{30pt} % default=10pt
\setlength{\columnseprule}{1pt} % default=0pt (no line)
%\setlength{\textheight}{5.85in} % default=5.15in
%\setlength{\topmargin}{-0.40in} % default=0.20in
%\setlength{\headsep}{0.35in} % default=0.35in
%\renewcommand{\op@entete}{\op@classe}
\RequirePackage{xsim}
\DeclareExerciseEnvironmentTemplate{exo}{%
\subsection*
{%
\color{exercise}{\XSIMmixedcase{\GetExerciseName}}\nobreakspace
\GetExerciseProperty{counter}%
\hspace{0.5cm} \color{line}\hrulefill \hspace{0.5cm}
\color{exercise}
\IfInsideSolutionF
{%
\GetExercisePropertyT{subtitle}
{{\PropertyValue}}%
}%
}
%\GetExercisePropertyT{points}
%{%
% \marginpar
% {%
% \IfInsideSolutionF{\rule{1.2cm}{1pt}\slash}%
% \PropertyValue
% \GetExercisePropertyT{bonus-points}{~(+\PropertyValue)}%
% ~\XSIMtranslate {point-abbr}%
% }%
%}%
}{}
\xsimsetup{exercise/template=exo}

92
tools/style/myhdr.sty Normal file
View File

@@ -0,0 +1,92 @@
\NeedsTeXFormat{LaTeX2e}
% extensions
\RequirePackage{colorscheme}
\RequirePackage{lastpage}
\RequirePackage{fancyhdr}
\newcommand{\op@entete}{}
\newcommand{\op@typedoctmp}{}
\newcommand{\op@tribe}{}
\newcommand{\op@duree}{}
\newcommand{\op@sujet}{}
\newcommand{\op@subtitle}{\op@tribe{} -- \@date{}}
\newcommand{\tribe}[1]{\renewcommand{\op@tribe}{#1}}
\newcommand{\duree}[1]{\renewcommand{\op@duree}{#1}}
\newcommand{\sujet}[1]{\renewcommand{\op@sujet}{Sujet #1}}
%% Redéfinition de maketitle
\renewcommand{\maketitle}{%
\noindent{\huge \color{title}\bfseries \@title}\par
\noindent{\color{line}\rule{\linewidth}{1ex}}\par
\noindent{\color{subtitle}\bfseries \op@subtitle \hfill \large\op@sujet}\par
\vspace{2.5\baselineskip}
\thispagestyle{plain}
}
%%% Page de garde
\renewcommand{\titlepage}{%
\pagestyle{plain}
\begin{center}
%~\\[1cm]
\Huge \@title \\
\Huge \op@tribe\\[1cm]
\LARGE \@date \\[1cm]
\fbox{
\parbox{0.7\textwidth}{~\\[1cm] \large Épreuve de :
\begin{center}
\Huge MATHÉMATIQUES
\end{center}
\Large Durée de l'épreuve: \op@duree %
%\ifprintanswers \Huge\center \textbf{Correction} \fi
\\[1cm]
}
}
~\\[1cm]
\normalsize
Ce sujet comporte \pageref{LastPage}\, pages, numérotées de 1 / \pageref{LastPage}\; à \pageref{LastPage}/ \pageref{LastPage}\\
Dès qu'il vous est remis, assurez-vous qu'il est complet.
\\[0.5cm]
L'utilisation de la calculatrice est autorisée.\\
L'échange de calculatrice entre les élèves est strictement interdit.\\
L'usage du dictionnaire n'est pas autorisé. \\[1cm]
Ajouter la table des points
\end{center}
\clearpage
}
% Header et Footer
\pagestyle{fancy}
%\setlength{\headheight}{10pt}
%\fancyheadoffset{\textwidth}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\op@boiteentete}{\makebox[0pt][l]{\hspace*{-3ex}%
\color{bgentete}\rule[-0.8ex]{\textwidth+5ex}{3ex}%
}}
\lhead{\scriptsize\op@boiteentete \@title}
\chead{}
\rhead{\scriptsize\@date}
\lfoot{\scriptsize\op@boiteentete \op@subtitle}
\cfoot{}
\rfoot{\scriptsize\thepage\ / \pageref{LastPage}}
\fancypagestyle{plain}{ %
\fancyhf{} % remove everything
\renewcommand{\headrulewidth}{0pt} % remove lines as well
\renewcommand{\footrulewidth}{0pt}
\lfoot{\scriptsize\op@boiteentete \op@subtitle}
\cfoot{}
\rfoot{\scriptsize\thepage\ / \pageref{LastPage}}
}

View File

@@ -1,185 +0,0 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{remixExam}
% classe de base
\LoadClassWithOptions{exam}
% extensions
\RequirePackage{base}
\RequirePackage{none_beamer}
\RequirePackage{colorscheme}
\RequirePackage{xifthen}
%\RequirePackage{etoolbox}
\RequirePackage{pdftexcmds}
% Generalites
% géométrie
\RequirePackage{geometry}
\geometry{left=20mm,right=20mm, top=15mm, bottom=20mm}
% Calculatrice
\newcommand{\noCalc}{{\centering \textbf{Calculatrice interdite} \par}}
\newcommand{\Calc}{{\centering \textbf{Calculatrice autorisée} \par}}
% Custumisation de la class Exam
%% Document informations
\newcommand{\op@entete}{}
\newcommand{\op@soustitre}{\op@classe{} -- \@date{}}
\newcommand{\op@typedoctmp}{}
\newcommand{\op@classe}{}
\newcommand{\op@titre}{}
\newcommand{\op@duree}{}
\newcommand{\op@sujet}{}
\newcommand{\op@ptpres}{0}
\newcommand{\classe}[1]{\renewcommand{\op@classe}{#1}}
\newcommand{\titre}[1]{\renewcommand{\op@titre}{#1}}
\newcommand{\duree}[1]{\renewcommand{\op@duree}{#1}}
\newcommand{\sujet}[1]{\renewcommand{\op@sujet}{Sujet #1}}
\newcommand{\ptpres}[1]{\renewcommand{\op@ptpres}{#1}}
\newcommand{\typedoc}[1]{\renewcommand{\op@typedoctmp}{#1}
\renewcommand{\op@soustitre}{\op@classe{} -- \@date{}}%
\renewcommand{\op@entete}{\@date}
}
%% Redéfinition de maketitle
\renewcommand{\maketitle}{%
\noindent{\huge \color{title}\bfseries \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}
}
% Page de garde
\renewcommand{\titlepage}{%
\begin{center}
%~\\[1cm]
\Huge \op@titre \\
\Huge \op@classe\\[1cm]
\LARGE \@date \\[1cm]
\fbox{
\parbox{0.7\textwidth}{~\\[1cm] \large Épreuve de : \\ \Huge MATHÉMATIQUES \\ \Large Durée de l'épreuve: \op@duree %
\ifprintanswers \Huge\center \textbf{Correction} \fi \\[1cm]}
}
~\\[1cm]
\normalsize
Ce sujet comporte \numpages\, pages, numérotées de 1 / \numpages \; à \numpages / \numpages \\
Dès qu'il vous est remis, assurez-vous qu'il est complet.
\\[0.5cm]
L'utilisation de la calculatrice est autorisée.\\
L'échange de calculatrice entre les élèves est strictement interdit.\\
L'usage du dictionnaire n'est pas autorisé. \\[1cm]
\pointtable[h][questions]
~\\[0.5cm]
\ifthenelse{\equal{\op@ptpres}{0}}%
{}%
{\textbf{\op@ptpres\, points} sont réservés à la présentation et à la rédaction.}
\end{center}
\clearpage
}
%% 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}
\header{\op@boiteentete\small\scshape\op@entete}{}{\small \op@titre}
\footer{\scriptsize\op@classe{} -- \op@annee}{}{\scriptsize\thepage / \numpages}
%% En tête de la première page
% Header de la première page
\firstpageheader{}{}{}
% header des autres pages
\runningheader{\op@boiteentete\small\scshape\op@entete}{}{\small \op@titre}
% Footer de la première page
\firstpagefooter{\scriptsize\op@classe{} -- \op@annee}{}{\scriptsize\thepage / \numpages}
% footer des autres pages
\runningfooter{\scriptsize\op@classe{} -- \op@annee}{}{\scriptsize\thepage / \numpages}
%% Questions and parts
%%% Numbering
% numérotation de part
\renewcommand{\thepartno}{\arabic{partno}}
% numérotation de choice
\renewcommand{\thechoice}{\alph{choice}}
% numérotation de subpart
\renewcommand{\thesubpart}{\alph{subpart}}
% numérotation de subsubpart
\renewcommand{\thesubsubpart}{\greeknum{subsubpart}}
%%% Display numbering
\renewcommand{\partlabel}{\colorbox{exercice}{\color{highlightbg}\thepartno}}
%\renewcommand{\choicelabel}{\color{exercice}\thechoice.}}
%\newcommand{\partlabel}{\thepartno.}
\renewcommand{\subpartlabel}{\color{exercice}\thesubpart.\color{text}}
\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}
%%% Points table
\addpoints
\vqword{Éxercice}
%% Saved solutions environment
\newbox\allsolutions
\setbox\allsolutions=\vbox{}
\edef\iniq{}
\edef\inip{}
\edef\inisp{}
\newenvironment{savedSolution}
{%
\ifprintanswers
% s'il y a printanswers on veut que les solutions soient au milieu des questions.
\begin{solution}
\else
\global\setbox\allsolutions=\vbox\bgroup
\unvbox\allsolutions
% à partir de là, on enregistre des truc dans la boite. Je suis pas convaincu que le truc avec minipage va bien marcher mais bon...
\begin{minipage}{0.45\textheight}
\ifnum\pdf@strcmp{\iniq}{\thequestion}=0
\else
\Large \textbf{\color{exercice}{Exercice \thequestion}} \hspace{0.5cm} {\color{line}\hrulefill} \hspace{0.5cm} {\color{exercice} Solution} \normalsize
\global\edef\iniq{\thequestion}%
\fi
\ifnum\pdf@strcmp{\inip}{\thepartno}=0
\else
\partlabel \;
\global\edef\inip{\thepartno}%
\fi
\ifnum\pdf@strcmp{\inisp}{\thesubpart}=0
\else
\subpartlabel \;
\global\edef\inisp{\thesubpart}%
\fi%
\fi%
}%
{%
\ifprintanswers
\end{solution}
\else
\end{minipage}
\bigbreak
\egroup
\fi
}
\newcommand{\showallsolutions}{\par\unvbox\allsolutions}

View File

@@ -50,16 +50,16 @@
\newcommand{\TODO}[1]{\textcolor{red}{note(#1)}}
%% Poser des opérations
\RequirePackage[letterspace=500]{microtype}
\newcommand{\poseOP}[3]{%
\textls{
$\begin{array}{cr}
& #1 \\[-0.3cm]
#2 & #3 \\
\hline
&
\end{array}$}
}
% \RequirePackage[letterspace=500]{microtype}
% \newcommand{\poseOP}[3]{%
% \textls{
% $\begin{array}{cr}
% & #1 \\[-0.3cm]
% #2 & #3 \\
% \hline
% &
% \end{array}$}
% }
% Icones
\newcommand{\icon}[2][scale=0.4]{%