Importation des outils style de l'année précédente
This commit is contained in:
69
tools/style/base.sty
Executable file
69
tools/style/base.sty
Executable file
@@ -0,0 +1,69 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
\newcommand{\op@annee}{2017-2018}
|
||||
|
||||
% extensions
|
||||
\RequirePackage[utf8x]{inputenc}
|
||||
\RequirePackage[french]{babel}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\RequirePackage{amssymb}
|
||||
\RequirePackage{amsmath}
|
||||
\RequirePackage{amsfonts}
|
||||
\PassOptionsToPackage{table,usenames,dvipsnames}{xcolor}
|
||||
%\RequirePackage{subfig}
|
||||
\RequirePackage{graphicx}
|
||||
\graphicspath{{./}{/home/lafrite/Cours/Prof/Enseignements/Clipart/}}
|
||||
|
||||
\RequirePackage{gensymb}
|
||||
\RequirePackage{ifthen, calc}
|
||||
\RequirePackage{tabularx}
|
||||
\RequirePackage{enumitem}
|
||||
\setlist[itemize,1]{label=$\bullet$}
|
||||
|
||||
% Marges des pages
|
||||
\RequirePackage{geometry}
|
||||
\geometry{left=10mm,right=10mm, top=10mm}
|
||||
|
||||
% Symbole euro
|
||||
\RequirePackage{eurosym}
|
||||
|
||||
% Faire des boites
|
||||
\RequirePackage{fancybox}
|
||||
|
||||
% Espaces pour écrire les grands nombres
|
||||
\RequirePackage[np]{numprint}
|
||||
|
||||
% Outils pour les tableaux et les fonctions
|
||||
\RequirePackage{tkz-tab}
|
||||
\RequirePackage{tkz-fct}
|
||||
|
||||
% Pour les block scratch
|
||||
|
||||
\RequirePackage{scratch}
|
||||
|
||||
% Pour gérer les todo
|
||||
\RequirePackage[french, textsize=small]{todonotes}
|
||||
|
||||
% Plusieurs colonnes
|
||||
\RequirePackage{multicol}
|
||||
|
||||
% inteligent import (see https://codeyarns.com/2010/05/27/latex-import-subimport-for-document-organization/)
|
||||
\RequirePackage{import}
|
||||
|
||||
% Lecture des fichiers csv et affichage des csv en table
|
||||
\RequirePackage{csvsimple}
|
||||
|
||||
% Mes racourcis
|
||||
\RequirePackage{shortcuts}
|
||||
|
||||
%Polices
|
||||
%% l'option nomath fait que la police du mode mathématique n'est pas affectée
|
||||
\RequirePackage[nomath]{kpfonts}
|
||||
\renewcommand*\familydefault{\sfdefault}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
|
||||
% Les tableaux
|
||||
\renewcommand{\arraystretch}{2}
|
||||
|
||||
% Figure qui se fondent dans le texte
|
||||
\RequirePackage{wrapfig}
|
||||
66
tools/style/classConn.cls
Normal file
66
tools/style/classConn.cls
Normal file
@@ -0,0 +1,66 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
\ProvidesClass{classConn}
|
||||
|
||||
% classe de base
|
||||
|
||||
\LoadClass[a5paper, 12pt]{article}
|
||||
|
||||
% extensions
|
||||
|
||||
\RequirePackage{base}
|
||||
\RequirePackage{none_beamer}
|
||||
\RequirePackage{colorscheme}
|
||||
% pour redéfinir \section
|
||||
\RequirePackage[explicit]{titlesec}
|
||||
|
||||
% géométrie
|
||||
\RequirePackage{geometry}
|
||||
\geometry{left=10mm,right=10mm, top=10mm}
|
||||
|
||||
% commandes personnelles
|
||||
|
||||
% Les en-tête et les pieds de pages
|
||||
\RequirePackage{fancyhdr}
|
||||
\pagestyle{empty}
|
||||
%\renewcommand\headrulewidth{0pt}
|
||||
%\fancyhead[R]{}
|
||||
%\fancyfoot[C]{}
|
||||
|
||||
% Description du devoir
|
||||
\newcommand{\op@entete}{}
|
||||
\newcommand{\op@soustitre}{}
|
||||
\newcommand{\op@classe}{}
|
||||
\newcommand{\op@titre}{Connaissance}
|
||||
|
||||
\newcommand{\classe}[1]{\renewcommand{\op@classe}{#1}}
|
||||
\newcommand{\titre}[1]{\renewcommand{\op@titre}{#1}}
|
||||
|
||||
\renewcommand{\op@soustitre}{\op@classe{} -- \@date{}}%
|
||||
\renewcommand{\op@entete}{\@date}
|
||||
|
||||
|
||||
% Redéfinition de maketitle pour ne plus avoir la date
|
||||
\newcounter{sujet}
|
||||
\setcounter{sujet}{0}
|
||||
\newcommand{\sujet}{%
|
||||
\clearpage
|
||||
\setcounter{exo}{0}
|
||||
\addtocounter{sujet}{1}
|
||||
\noindent
|
||||
\begin{minipage}{0.8\textwidth}
|
||||
\noindent{\huge \color{title}\bfseries \op@titre}\par
|
||||
\noindent{\color{line}\rule{\linewidth}{1ex}}\par
|
||||
\noindent{\color{subtitle}\bfseries \op@soustitre}\par
|
||||
\end{minipage}
|
||||
\begin{minipage}{0.2\textwidth}
|
||||
\begin{center}
|
||||
\Huge\thesujet
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\\[0.2cm]
|
||||
Nom - Prénom:
|
||||
\\[0.2cm]
|
||||
|
||||
\normalsize
|
||||
}
|
||||
79
tools/style/classCours.cls
Normal file
79
tools/style/classCours.cls
Normal file
@@ -0,0 +1,79 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
\ProvidesClass{classCours}
|
||||
|
||||
% classe de base
|
||||
|
||||
\LoadClassWithOptions{article}
|
||||
|
||||
% extensions
|
||||
|
||||
\RequirePackage{base}
|
||||
\RequirePackage{none_beamer}
|
||||
\RequirePackage{colorscheme}
|
||||
|
||||
% géométrie
|
||||
\RequirePackage{geometry}
|
||||
\geometry{left=20mm,right=20mm, top=15mm, bottom=20mm}
|
||||
|
||||
%\RequirePackage{arev}
|
||||
\RequirePackage{kpfonts}
|
||||
\renewcommand*\familydefault{\sfdefault}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
|
||||
% commandes personnelles
|
||||
|
||||
% Les en-tête et les pieds de pages
|
||||
\RequirePackage{fancyhdr}
|
||||
\pagestyle{fancy}
|
||||
\fancyhf{}
|
||||
|
||||
\renewcommand{\headrulewidth}{0pt}
|
||||
%\setlength{\headheight}{15.2pt}
|
||||
\setlength{\headsep}{5pt}
|
||||
|
||||
\newcommand{\op@boiteentete}{\makebox[0pt][l]{\hspace*{-3ex}%
|
||||
\color{bgentete}\rule[-0.8ex]{\linewidth+6ex}{3ex}%
|
||||
}}
|
||||
|
||||
\fancyhead[L]{%
|
||||
\op@boiteentete%
|
||||
\small\op@typedoc \op@titre%
|
||||
}
|
||||
\fancyhead[R]{\small\scshape\op@entete}
|
||||
\fancyfoot[R]{\color{footer}\thepage}
|
||||
\fancyfoot[L]{\color{footer}\scriptsize\op@classe{} -- \op@annee}
|
||||
|
||||
\fancypagestyle{plain}{%
|
||||
\fancyhf{}
|
||||
\fancyfoot[R]{\color{footer}\thepage}
|
||||
\fancyfoot[L]{\color{footer}\scriptsize\op@classe{} -- \op@annee}
|
||||
% \fancyfoot[R]{\thepage}
|
||||
% \fancyfoot[L]{\scriptsize\op@classe{} -- \op@annee}
|
||||
}
|
||||
|
||||
|
||||
% Description du Cours
|
||||
\newcommand{\op@entete}{}
|
||||
\newcommand{\op@soustitre}{}
|
||||
\newcommand{\op@classe}{}
|
||||
\newcommand{\op@typedoc}{}
|
||||
\newcommand{\op@typedoctmp}{}
|
||||
\newcommand{\op@titre}{}
|
||||
|
||||
\newcommand{\classe}[1]{\renewcommand{\op@classe}{#1}}
|
||||
\newcommand{\titre}[1]{\renewcommand{\op@titre}{#1}}
|
||||
|
||||
\renewcommand{\op@typedoc}{Cours: }
|
||||
\renewcommand{\op@soustitre}{\op@classe{} -- \@date{}}%
|
||||
\renewcommand{\op@entete}{\@date}
|
||||
|
||||
|
||||
% Redéfinition de maketitle pour ne plus avoir la date
|
||||
\renewcommand{\maketitle}{%
|
||||
\thispagestyle{plain}
|
||||
\noindent{\huge \color{title}\bfseries \op@typedoc \op@titre}\par
|
||||
\noindent{\color{line}\rule{\linewidth}{1ex}}\par
|
||||
\noindent{\color{subtitle}\bfseries \op@soustitre}\par
|
||||
\vspace{2.5\baselineskip}
|
||||
}
|
||||
21
tools/style/classPres.cls
Executable file
21
tools/style/classPres.cls
Executable file
@@ -0,0 +1,21 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
\ProvidesClass{classPres}
|
||||
|
||||
% Classe de base - Beamer
|
||||
\pdfminorversion=4
|
||||
\LoadClassWithOptions{beamer}
|
||||
|
||||
\usetheme{Singapore}
|
||||
\usepackage[defaultsans]{droidsans}
|
||||
\usepackage[T1]{fontenc}
|
||||
|
||||
% extensions
|
||||
|
||||
\RequirePackage{base}
|
||||
\RequirePackage{colorscheme}
|
||||
\geometry{left=10mm,right=10mm, top=0mm}
|
||||
|
||||
|
||||
% Les tableaux
|
||||
\renewcommand{\arraystretch}{1.5}
|
||||
55
tools/style/classReport.cls
Normal file
55
tools/style/classReport.cls
Normal file
@@ -0,0 +1,55 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
\ProvidesClass{classReport}
|
||||
|
||||
% classe de base
|
||||
|
||||
%\LoadClass[a4paper,12pt, landscape, twocolumn]{article}
|
||||
\LoadClass[a5paper,12pt]{article}
|
||||
|
||||
% extensions
|
||||
|
||||
\RequirePackage{base}
|
||||
\RequirePackage{colorscheme}
|
||||
|
||||
%\RequirePackage{xcolor,colortbl}
|
||||
|
||||
\pagestyle{empty}
|
||||
|
||||
\RequirePackage{geometry}
|
||||
%\geometry{landscape}
|
||||
\geometry{left=5mm,right=5mm,top=10mm, bottom= 10mm}
|
||||
|
||||
% Séparation au milieu
|
||||
\setlength{\columnsep}{5pt} % default=10pt
|
||||
\setlength{\columnseprule}{0pt} % default=0pt (no line)
|
||||
|
||||
|
||||
% Décorations
|
||||
\newcommand{\op@classe}{}
|
||||
\newcommand{\op@titre}{}
|
||||
\newcommand{\classe}[1]{\renewcommand{\op@classe}{#1}}
|
||||
\newcommand{\titre}[1]{\renewcommand{\op@titre}{#1}}
|
||||
\newcommand{\op@soustitre}{\op@classe{} \hfill \@date{}}%
|
||||
|
||||
\renewcommand{\maketitle}{%
|
||||
\noindent{\huge \color{title}\bfseries Bilan \op@titre}\par
|
||||
\noindent{\color{line}\rule{\linewidth}{1ex}}\par
|
||||
\noindent{\color{subtitle}\bfseries \op@soustitre}\par
|
||||
\vspace{1.5\baselineskip}
|
||||
}
|
||||
|
||||
% Les couleurs de la réussite
|
||||
% \newcommand{\NoRep}{/}
|
||||
% \newcommand{\RepZ}{\cellcolor{black!05}}
|
||||
% \newcommand{\RepU}{\cellcolor{black!30}}
|
||||
% \newcommand{\RepD}{\cellcolor{black!60}}
|
||||
% \newcommand{\RepT}{\cellcolor{black}}
|
||||
\usepackage{tikzsymbols}
|
||||
|
||||
%\newcommand{\RepT}{\color{black!10}\Changey[2][black!70]{0.8}\color{text}}
|
||||
\newcommand{\RepT}{\Smiley[2][black!70]}
|
||||
\newcommand{\RepD}{\Sey[2][black!40]}
|
||||
\newcommand{\RepU}{\Neutrey[2][black!10]}
|
||||
\newcommand{\RepZ}{\Sadey[2]}
|
||||
\newcommand{\NoRep}{(??)}
|
||||
51
tools/style/colorscheme.sty
Executable file
51
tools/style/colorscheme.sty
Executable file
@@ -0,0 +1,51 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
|
||||
% Couleurs,
|
||||
\RequirePackage{xcolor}
|
||||
\RequirePackage{colortbl}
|
||||
|
||||
% Couleurs éléments
|
||||
|
||||
% \definecolor{coulpied}{couleur3}
|
||||
% \definecolor{coulnumexos}{couleur5}
|
||||
% \definecolor{coulrule}{couleur5}
|
||||
% \definecolor{coulsection}{couleur1}
|
||||
% \definecolor{coultable1}{couleur4}
|
||||
% \definecolor{coultable2}{couleur3}
|
||||
% \definecolor{coultheo}{couleur4}
|
||||
% \definecolor{couldef}{couleur3}
|
||||
|
||||
% Solarized theme
|
||||
\definecolor{base03}{HTML}{002b36}
|
||||
\definecolor{base02}{HTML}{073642}
|
||||
\definecolor{base01}{HTML}{586e75}
|
||||
\definecolor{base00}{HTML}{657b83}
|
||||
\definecolor{base0}{HTML}{839496}
|
||||
\definecolor{base1}{HTML}{93a1a1}
|
||||
\definecolor{base2}{HTML}{eee8d5}
|
||||
\definecolor{base3}{HTML}{FDF6E3}
|
||||
\definecolor{yellow}{HTML}{B58900}
|
||||
\definecolor{orange}{HTML}{cb4b16}
|
||||
\definecolor{red}{HTML}{DC322F}
|
||||
\definecolor{magenta}{HTML}{d33682}
|
||||
\definecolor{violet}{HTML}{6c71c4}
|
||||
\definecolor{blue}{HTML}{268bd2}
|
||||
\definecolor{cyan}{HTML}{2aa198}
|
||||
\definecolor{green}{HTML}{859900}
|
||||
|
||||
% My theme
|
||||
\colorlet{text}{base03}
|
||||
\colorlet{footer}{base02}
|
||||
\colorlet{bgentete}{base2}
|
||||
|
||||
\colorlet{title}{blue}
|
||||
\colorlet{subtitle}{base02}
|
||||
\colorlet{line}{base1}
|
||||
\colorlet{comments}{base01}
|
||||
\colorlet{exercise}{blue}
|
||||
\colorlet{note}{red}
|
||||
|
||||
|
||||
\colorlet{highlightbg}{base2}
|
||||
\colorlet{tabular}{base3}
|
||||
95
tools/style/myXsim.sty
Normal file
95
tools/style/myXsim.sty
Normal file
@@ -0,0 +1,95 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
% extensions
|
||||
|
||||
\RequirePackage{colorscheme}
|
||||
\RequirePackage{base}
|
||||
\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}
|
||||
|
||||
\xsimsetup{
|
||||
path={exercises}
|
||||
}
|
||||
|
||||
\DeclareExerciseTranslations{total}{
|
||||
French = total ,
|
||||
}
|
||||
|
||||
\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}}%
|
||||
}%
|
||||
\noindent
|
||||
}
|
||||
}{}
|
||||
\xsimsetup{exercise/template=exo}
|
||||
|
||||
\DeclareExerciseTableTemplate{DNB}{%
|
||||
\XSIMputright\ExerciseTableCode{%
|
||||
\hline
|
||||
\XSIMifblankTF{\ExerciseType}
|
||||
{}
|
||||
{\XSIMmixedcase{\GetExerciseParameter{exercise-name}}}
|
||||
&
|
||||
\XSIMmixedcase{\XSIMtranslate{points}} \\
|
||||
\hline
|
||||
}%
|
||||
\ForEachUsedExerciseByType{%
|
||||
\XSIMifeqTF{#1}{\ExerciseTableType{#1}}
|
||||
{%
|
||||
\XSIMifblankTF{\ExerciseType}
|
||||
{%
|
||||
\XSIMputright\ExerciseTableCode{%
|
||||
\XSIMmixedcase{\ExerciseParameterGet{#1}{exercise-name} }%
|
||||
}%
|
||||
}
|
||||
{}%
|
||||
\XSIMputright\ExerciseTableCode
|
||||
{#3 & \XSIMifblankTF{#5}{\printgoal{0}}{\printgoal{#5}}\\ }%
|
||||
}
|
||||
{}%
|
||||
}
|
||||
\XSIMputright\ExerciseTableCode{%
|
||||
\hline
|
||||
\XSIMmixedcase{\XSIMtranslate{total}} &
|
||||
\XSIMifblankTF{\ExerciseType}
|
||||
{\TotalExerciseGoal{points}{}{}}
|
||||
{\TotalExerciseTypeGoal{\ExerciseType}{points}{}{}} \\
|
||||
\hline
|
||||
}%
|
||||
\XSIMexpandcode{%
|
||||
\noexpand\begin{tabular}{|\XSIMifblankTF{\ExerciseType}{l}{c}|c|}
|
||||
\noexpand\ExerciseTableCode
|
||||
\noexpand\end{tabular}%
|
||||
}%
|
||||
}
|
||||
|
||||
94
tools/style/myhdr.sty
Normal file
94
tools/style/myhdr.sty
Normal file
@@ -0,0 +1,94 @@
|
||||
\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}
|
||||
\Huge \@title \\
|
||||
\vfill
|
||||
\Huge \op@tribe \@date \\[1cm]
|
||||
|
||||
\vfill
|
||||
\fbox{
|
||||
\parbox{0.7\textwidth}{\large Épreuve de :
|
||||
\begin{center}
|
||||
\Huge MATHÉMATIQUES
|
||||
\end{center}
|
||||
\Large Durée de l'épreuve: \op@duree
|
||||
\\[1cm]
|
||||
}
|
||||
}
|
||||
\vfill
|
||||
|
||||
~\\[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]
|
||||
|
||||
\textbf{10 points} sont réservés à l'orthographe et à la présentation.
|
||||
|
||||
\gradingtable[type=exercise,template=DNB]
|
||||
|
||||
\vfill
|
||||
\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}}
|
||||
}
|
||||
8
tools/style/none_beamer.sty
Executable file
8
tools/style/none_beamer.sty
Executable file
@@ -0,0 +1,8 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
% Les listes
|
||||
\RequirePackage{enumerate}
|
||||
\RequirePackage{enumitem}
|
||||
\setlist[itemize,1]{label=$\bullet$}
|
||||
|
||||
|
||||
299
tools/style/shortcuts.sty
Executable file
299
tools/style/shortcuts.sty
Executable file
@@ -0,0 +1,299 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
|
||||
%%%%%%%%%%%%%%%%%
|
||||
% Raccourcis %
|
||||
%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Ensembles
|
||||
\newcommand{\N}{\mathbb{N}}
|
||||
\newcommand{\Z}{\mathbb{Z}}
|
||||
%\newcommand{\D}{\mathbb{D}}
|
||||
\newcommand{\Q}{\mathbb{Q}}
|
||||
\newcommand{\R}{\mathbb{R}}
|
||||
\newcommand{\C}{\mathbb{C}}
|
||||
|
||||
% intervalles ouvert ouvert
|
||||
\newcommand{\intOO}[2]{\left]{#1}\,{;}\,{#2}\right[}
|
||||
% intervalles ouvert fermé
|
||||
\newcommand{\intOF}[2]{\left]{#1}\,{;}\,{#2}\right]}
|
||||
% intervalles fermé ouvert
|
||||
\newcommand{\intFO}[2]{\left[{#1}\,{;}\,{#2}\right[}
|
||||
% intervalles fermé fermé
|
||||
\newcommand{\intFF}[2]{\left[{#1}\,{;}\,{#2}\right]}
|
||||
|
||||
|
||||
%% Vecteurs
|
||||
% représentation d'un vecteur
|
||||
\renewcommand{\vec}[1]{\overrightarrow{#1}}
|
||||
% Norme d'un vecteur
|
||||
\newcommand{\norme}[1]{||\vec{#1}||}
|
||||
% Produit scalaire
|
||||
\newcommand{\scal}[2]{\vec{#1} \cdot \vec{#2}}
|
||||
\newcommand{\vectCoord}[2]{%
|
||||
{\renewcommand{\arraystretch}{1}%
|
||||
\left(\begin{array}{c} #1 \\ #2 \end{array} \right)%
|
||||
}%
|
||||
}
|
||||
|
||||
%% Proba
|
||||
\newcommand{\coefBino}[2]{\vectCoord{#1}{#2}}
|
||||
|
||||
%% Logique
|
||||
\renewcommand{\equiv}{\Leftrightarrow}
|
||||
|
||||
%% Calculatrice
|
||||
\usepackage{listings}
|
||||
\newcommand{\calc}[1]{\Ovalbox{\lstinline|#1|}}
|
||||
%\newcommand{\calc}[1]{\verb!#1!}
|
||||
|
||||
%% Autres
|
||||
\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}$}
|
||||
% }
|
||||
|
||||
% Icones
|
||||
\newcommand{\icon}[2][scale=0.4]{%
|
||||
\includegraphics[#1]{icons/#2.png}%
|
||||
}
|
||||
|
||||
% Icones des compétences
|
||||
\newcommand{\iconScale}{0.3}
|
||||
\newcommand{\Cher}[1][scale=\iconScale]{%
|
||||
\icon[#1]{card-pick}
|
||||
}
|
||||
\newcommand{\Mod}[1][scale=\iconScale]{%
|
||||
\icon[#1]{processor}
|
||||
}
|
||||
\newcommand{\Rep}[1][scale=\iconScale]{%
|
||||
\icon[#1]{chart}
|
||||
}
|
||||
\newcommand{\Rai}[1][scale=\iconScale]{%
|
||||
\icon[#1]{brain}
|
||||
%\icon[#1]{gears}
|
||||
}
|
||||
\newcommand{\Cal}[1][scale=\iconScale]{%
|
||||
\icon[#1]{computing}
|
||||
}
|
||||
\newcommand{\Com}[1][scale=\iconScale]{%
|
||||
\icon[#1]{conversation}
|
||||
}
|
||||
\newcommand{\Con}[1][scale=\iconScale]{%
|
||||
\icon[#1]{book-cover}
|
||||
}
|
||||
|
||||
% Pour l'évaluation par compétence
|
||||
\usepackage{tikzsymbols}
|
||||
\usetikzlibrary{babel}
|
||||
|
||||
\RequirePackage{xstring}
|
||||
\newcommand{\RepLevel}[1]{%
|
||||
\IfEqCase{#1}{%
|
||||
{.}{\Xey[2]}%
|
||||
{0}{\Changey[2]{-1}}%
|
||||
{1}{\Changey[2][black!20]{0}}%
|
||||
{2}{\Changey[2][black!40]{1}}%
|
||||
{3}{\Cooley[2][black!60]}%
|
||||
}[\PackageError{Rep}{Undefinded type of answer: #1}{}]%
|
||||
}
|
||||
\newcommand{\RepT}{\Cooley[2][black!70]}
|
||||
\newcommand{\RepD}{\Changey[2][black!40]{1}}
|
||||
\newcommand{\RepU}{\Changey[2][black!10]{0}}
|
||||
\newcommand{\RepZ}{\Changey[2]{-1}}
|
||||
\newcommand{\NoRep}{\Xey[2]}
|
||||
|
||||
\newcommand{\EmptySignalBar}{%
|
||||
\draw (0, 0) rectangle ++(0.8, 1);
|
||||
\draw (1, 0) rectangle ++(0.8, 2);
|
||||
\draw (2, 0) rectangle ++(0.8, 3);
|
||||
\draw (3, 0) rectangle ++(0.8, 4);
|
||||
}
|
||||
\newcommand{\filledSignalBar}[1]{%
|
||||
\IfEqCase{#1}{%
|
||||
{}{%
|
||||
}
|
||||
{e}{%
|
||||
\EmptySignalBar
|
||||
}
|
||||
{3}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=green] (0, 0) rectangle ++(0.8, 1);
|
||||
\filldraw[fill=green] (1, 0) rectangle ++(0.8, 2);
|
||||
\filldraw[fill=green] (2, 0) rectangle ++(0.8, 3);
|
||||
\filldraw[fill=green] (3, 0) rectangle ++(0.8, 4);
|
||||
}
|
||||
{2}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=green] (0, 0) rectangle ++(0.8, 1);
|
||||
\filldraw[fill=green] (1, 0) rectangle ++(0.8, 2);
|
||||
\filldraw[fill=green] (2, 0) rectangle ++(0.8, 3);
|
||||
}
|
||||
{1}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=yellow] (0, 0) rectangle ++(0.8, 1);
|
||||
\filldraw[fill=yellow] (1, 0) rectangle ++(0.8, 2);
|
||||
}
|
||||
{0}{%
|
||||
\EmptySignalBar
|
||||
\filldraw[fill=red] (0, 0) rectangle ++(0.8, 1);
|
||||
}
|
||||
}[\PackageError{Assesment}{Undefinded type of answer: #1}{}]%
|
||||
}
|
||||
|
||||
\newcommand{\SignalBar}[1]{%
|
||||
\begin{tikzpicture}[scale=0.15]
|
||||
\filledSignalBar{#1}
|
||||
\end{tikzpicture}
|
||||
}
|
||||
|
||||
\newcommand{\Assesment}[1]{%
|
||||
\SignalBar{#1}
|
||||
\IfEqCase{#1}{%
|
||||
{3}{%
|
||||
Très bonne maîtrise%
|
||||
}%
|
||||
{2}{%
|
||||
Maîtrise satisfaisante
|
||||
}%
|
||||
{1}{%
|
||||
Maîtrise fragile%
|
||||
}%
|
||||
{0}{%
|
||||
Maîtrise insufisante%
|
||||
}%
|
||||
}[\PackageError{Assesment}{Undefinded type of answer: #1}{}]%
|
||||
}
|
||||
|
||||
\newcommand{\competencesStatement}{%
|
||||
\begin{multicols}{3}
|
||||
\noindent
|
||||
Nom: \dotfill \\[0.5cm]
|
||||
Prénom: \dotfill \\
|
||||
\vfill\none
|
||||
\columnbreak
|
||||
\noindent
|
||||
\Cher Chercher \hfill \SignalBar{e}\\
|
||||
\Mod Modélser \hfill \SignalBar{e}\\
|
||||
\Rep Représenter \hfill \SignalBar{e}\\
|
||||
\vfill\none
|
||||
\columnbreak
|
||||
\noindent
|
||||
\Rai Raisonner \hfill \SignalBar{e}\\
|
||||
\Cal Calculer \hfill \SignalBar{e}\\
|
||||
\Com Communiquer \hfill \SignalBar{e}\\
|
||||
\end{multicols}
|
||||
}
|
||||
|
||||
|
||||
% ##########################
|
||||
% Tikz shortcuts
|
||||
% ##########################
|
||||
|
||||
% Les dessins
|
||||
\RequirePackage{tikz}
|
||||
|
||||
%% le cercle trigo
|
||||
\newcommand{\cercleTrigo}%
|
||||
{%
|
||||
\draw[->, very thick] (-1.2,0) -- (1.3, 0);
|
||||
\draw[->, very thick] (0,-1.2) -- (0,1.3);
|
||||
\draw[very thick] (0,0) circle (1);
|
||||
\draw (0,0) node[below left] {$O$};
|
||||
\draw (1,0) node[below right] {$I$};
|
||||
\draw (0,1) node[above left] {$J$};
|
||||
}
|
||||
|
||||
%% Le repère orthonormé avec la grille
|
||||
%%% \repere{xmin}{xmax}{ymin}{ymax}
|
||||
\newcommand{\repere}[4]%
|
||||
{%
|
||||
\draw[very thin, gray] (#1,#3) grid (#2,#4);
|
||||
\draw[->, very thick] (#1,0) -- (#2,0);
|
||||
\draw[->, very thick] (0,#3) -- (0,#4);
|
||||
\draw (0,0) node[below right, scale=0.7 ] {$O$};
|
||||
\draw (0,1) node {-} node[left] {$J$};
|
||||
\draw (1,0) node[rotate=90] {-} node[below] {$I$};
|
||||
}
|
||||
\newcommand{\repereNoGrid}[4]%
|
||||
{%
|
||||
\draw[->, very thick] (#1,0) -- (#2,0);
|
||||
\draw[->, very thick] (0,#3) -- (0,#4);
|
||||
}
|
||||
|
||||
%% Diagramme boite
|
||||
%%% \boxplot{Vertical Center}{min}{Q1}{Me}{Q3}{Max}
|
||||
\newcommand{\boxplot}[6]%
|
||||
{%
|
||||
\filldraw[color=highlightbg, draw=text] (#3, {#1 - 0.5}) rectangle (#5, {#1 + 0.5});
|
||||
\draw (#2, {#1 - 0.5}) -- (#2, {#1 + 0.5}) node[above] {$Min$};
|
||||
\draw (#3, {#1 - 0.5}) -- (#3, {#1 + 0.5}) node[above] {$Q_1$};
|
||||
\draw (#4, {#1 - 0.5}) -- (#4, {#1 + 0.5}) node[above] {$Me$};
|
||||
\draw (#5, {#1 - 0.5}) -- (#5, {#1 + 0.5}) node[above] {$Q_3$};
|
||||
\draw (#6, {#1 - 0.5}) -- (#6, {#1 + 0.5}) node[above] {$Max$};
|
||||
|
||||
\draw (#2, #1) -- (#3, #1);
|
||||
\draw (#5, #1) -- (#6, #1);
|
||||
|
||||
%\draw ({(#2 +#3)/2}, #1) node[above] {25\%};
|
||||
%\draw ({(#3 +#4)/2}, #1) node[above] {25\%};
|
||||
%\draw ({(#4 +#5)/2}, #1) node[above] {25\%};
|
||||
%\draw ({(#5 +#6)/2}, #1) node[above] {25\%};
|
||||
|
||||
}
|
||||
\newcommand{\boxplotNoNames}[6]%
|
||||
{%
|
||||
\filldraw[color=highlightbg, draw=text] (#3, {#1 - 0.5}) rectangle (#5, {#1 + 0.5});
|
||||
\draw (#2, {#1 - 0.5}) -- (#2, {#1 + 0.5});
|
||||
\draw (#3, {#1 - 0.5}) -- (#3, {#1 + 0.5});
|
||||
\draw (#4, {#1 - 0.5}) -- (#4, {#1 + 0.5});
|
||||
\draw (#5, {#1 - 0.5}) -- (#5, {#1 + 0.5});
|
||||
\draw (#6, {#1 - 0.5}) -- (#6, {#1 + 0.5});
|
||||
|
||||
\draw (#2, #1) -- (#3, #1);
|
||||
\draw (#5, #1) -- (#6, #1);
|
||||
}
|
||||
|
||||
|
||||
\usetikzlibrary{quotes,arrows.meta}
|
||||
|
||||
\tikzset{
|
||||
% drawing parallelepipoid
|
||||
annotated cuboid/.pic={
|
||||
\tikzset{%
|
||||
every edge quotes/.append style={midway, auto},
|
||||
/cuboid/.cd,
|
||||
#1
|
||||
}
|
||||
\draw [every edge/.append style={pic actions, densely dashed, opacity=.5}, pic actions]
|
||||
(0,0,0) coordinate (o) -- ++(-\cubescale*\cubex,0,0) coordinate (a) -- ++(0,-\cubescale*\cubey,0) coordinate (b) edge coordinate [pos=1] (g) ++(0,0,-\cubescale*\cubez) -- ++(\cubescale*\cubex,0,0) coordinate (c) -- cycle
|
||||
(o) -- ++(0,0,-\cubescale*\cubez) coordinate (d) -- ++(0,-\cubescale*\cubey,0) coordinate (e) edge (g) -- (c) -- cycle
|
||||
(o) -- (a) -- ++(0,0,-\cubescale*\cubez) coordinate (f) edge (g) -- (d) -- cycle;
|
||||
\path [every edge/.append style={pic actions, |-|}]
|
||||
(b) +(0,-5pt) coordinate (b1) edge ["\cubex \cubeunits"'] (b1 -| c)
|
||||
(b) +(-5pt,0) coordinate (b2) edge ["\cubey \cubeunits"] (b2 |- a)
|
||||
(c) +(3.5pt,-3.5pt) coordinate (c2) edge ["\cubez \cubeunits"'] ([xshift=3.5pt,yshift=-3.5pt]e)
|
||||
;
|
||||
},
|
||||
/cuboid/.search also={/tikz},
|
||||
/cuboid/.cd,
|
||||
width/.store in=\cubex,
|
||||
height/.store in=\cubey,
|
||||
depth/.store in=\cubez,
|
||||
units/.store in=\cubeunits,
|
||||
scale/.store in=\cubescale,
|
||||
width=10,
|
||||
height=10,
|
||||
depth=10,
|
||||
units=cm,
|
||||
scale=.1,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user