diff --git a/tools/example/report.pdf b/tools/example/report.pdf index 2e2449a..a57cc83 100644 Binary files a/tools/example/report.pdf and b/tools/example/report.pdf differ diff --git a/tools/style/base.sty b/tools/style/base.sty index 8dca3b9..78e5f9b 100755 --- a/tools/style/base.sty +++ b/tools/style/base.sty @@ -13,7 +13,7 @@ \RequirePackage{graphicx} \graphicspath{{./}{/home/lafrite/Cours/Prof/Enseignements/Clipart/}} -\RequirePackage[table]{xcolor} +\RequirePackage[table, dvipsnames]{xcolor} \RequirePackage{gensymb} \RequirePackage{ifthen, calc} \RequirePackage{tabularx} diff --git a/tools/style/shortcuts.sty b/tools/style/shortcuts.sty index 2ce8234..7f0bf17 100755 --- a/tools/style/shortcuts.sty +++ b/tools/style/shortcuts.sty @@ -111,12 +111,53 @@ \newcommand{\RepZ}{\Changey[2]{-1}} \newcommand{\NoRep}{\Xey[2]} -\newcommand{\Assesment}[1]{% +\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}{% - {0}{Très bonne maîtrise}% - {1}{Maîtrise satisfaisante}% - {2}{Maîtrise fragile}% - {3}{Maîtrise insufisante}% + {3}{% + \filldraw[fill=OliveGreen] (0, 0) rectangle ++(0.8, 1); + \filldraw[fill=OliveGreen] (1, 0) rectangle ++(0.8, 2); + \filldraw[fill=OliveGreen] (2, 0) rectangle ++(0.8, 3); + \filldraw[fill=OliveGreen] (3, 0) rectangle ++(0.8, 4); + } + {2}{% + \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}{% + \filldraw[fill=yellow] (0, 0) rectangle ++(0.8, 1); + \filldraw[fill=yellow] (1, 0) rectangle ++(0.8, 2); + } + {0}{% + \filldraw[fill=red] (0, 0) rectangle ++(0.8, 1); + } + }[\PackageError{Assesment}{Undefinded type of answer: #1}{}]% +} + +\newcommand{\Assesment}[1]{% + \begin{tikzpicture}[scale=0.15] + \EmptySignalBar + \filledSignalBar{#1} + \end{tikzpicture} + \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}{}]% }