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-04 20:32:37 +00:00
|
|
|
\ExecuteOptions{a4paper, DIV=24}
|
|
|
|
\ExecuteOptionsX{type}
|
|
|
|
\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
|
|
|
|
\usetkzobj{all} % on charge tous les objets
|
2017-05-12 19:26:29 +00:00
|
|
|
|
2018-10-04 20:32:37 +00:00
|
|
|
% sizing of the page
|
|
|
|
\geometry{a4paper, includeheadfoot, hmargin=.7cm, vmargin=.5cm, head=14.5pt}
|
|
|
|
|
|
|
|
% title, header and footer
|
|
|
|
\ihead[]{}
|
|
|
|
\chead[]{}
|
|
|
|
\ohead[]{}
|
|
|
|
\ifoot[]{}
|
|
|
|
\cfoot[]{}
|
|
|
|
\ofoot[]{}
|
|
|
|
|
|
|
|
% KOMA-Script version (preferred)
|
|
|
|
|
|
|
|
\ifthenelse{ \equal{\type}{ds} }{
|
|
|
|
\cohead[\textbf{MATHÉMATIQUES}\\\textbf{Devoir surveillé}]{\textbf{MATHÉMATIQUES}\\\textbf{Devoir surveillé}}
|
|
|
|
\lohead[NOM :\\Prénom :]{NOM :\\Prénom :}
|
|
|
|
\rohead[Le \@date]{Le \@date}
|
|
|
|
\cehead[]{}
|
|
|
|
\lehead[]{}
|
|
|
|
\rehead[]{}
|
|
|
|
}{
|
|
|
|
\ifthenelse{ \equal{\type}{dm} }{
|
|
|
|
\cohead[\textbf{MATHÉMATIQUES}\\\textbf{Devoir maison}]{\textbf{MATHÉMATIQUES}\\\textbf{Devoir maison}}
|
|
|
|
\lohead[NOM :\\Prénom :]{NOM :\\Prénom :}
|
|
|
|
\rohead[Le \@date]{Le \@date}
|
|
|
|
\cehead[]{}
|
|
|
|
\lehead[]{}
|
|
|
|
\rehead[]{}
|
|
|
|
}{
|
|
|
|
|
|
|
|
}
|
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-04 20:32:37 +00:00
|
|
|
% lists
|
|
|
|
\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-04 20:32:37 +00:00
|
|
|
%
|
|
|
|
\NewDocumentCommand \turnpage{ }{
|
|
|
|
\rofoot[\textit{Tourner la page, svp} \faHandORight]{\textit{Tourner la page, svp} \faHandORight}
|
|
|
|
}
|
2017-05-12 19:26:29 +00:00
|
|
|
|
|
|
|
\makeatother
|