summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/customenvs/tex/customenvs.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/customenvs/tex/customenvs.sty')
-rw-r--r--macros/latex/contrib/customenvs/tex/customenvs.sty1646
1 files changed, 1612 insertions, 34 deletions
diff --git a/macros/latex/contrib/customenvs/tex/customenvs.sty b/macros/latex/contrib/customenvs/tex/customenvs.sty
index ee8f4427a2..a54da462ab 100644
--- a/macros/latex/contrib/customenvs/tex/customenvs.sty
+++ b/macros/latex/contrib/customenvs/tex/customenvs.sty
@@ -3,9 +3,18 @@
% source pencil...: CC-BY-SA 4.0 https://tex.stackexchange.com/questions/504092/replicating-a-fancy-bordered-text-style-in-latex/504145#504145
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{customenvs}[2024/04/04 0.1.4 Custom classic environments]
+\ProvidesPackage{customenvs}[2024/09/14 0.2.3 Custom classic environments]
%====HISTORIQUE
+% v 0.2.3 Panneau autoroutier + Panneau Soldes
+% v 0.2.2 Flèche évasée, en TikZ
+% v 0.2.1 Modification mineure de la gestion des étoiles tikz (baseline) + grille auto tikzpicture
+% v 0.2.0 Ajout d'étoiles pour les difficultés d'exercices (2 versions)
+% v 0.1.9 tkzBanner + tkzBannerTri + includegraphicsfill
+% v 0.1.8 Nutriscore
+% v 0.1.7 Style perso pour les vignettes
+% v 0.1.6 DisplaySkip patch + Patchs pas-tableur
+% v 0.1.5 Boxes for exam title + circled numbers + Vignettes + Small simple boxes creation
% v 0.1.4 Commande (en/fr) pour du texte dans une boîte arrondie, de hauteur 'figée' + 'Chat' SMS
% v 0.1.3 Environnement/Commande pour présentation d'un exercice
% v 0.1.2 Crayon de compétences
@@ -28,6 +37,8 @@
\newif\if@fa\@fatrue%
\DeclareOption{nonfa}{\@fafalse}%
\DeclareOption{nofa}{\@fafalse}%
+\newif\if@pastableur\@pastableurfalse%
+\DeclareOption{pastableur}{\@pastableurtrue}%
\DeclareOption*{}
\ProcessOptions\relax
@@ -55,7 +66,9 @@
\RequirePackage{calc}
\RequirePackage{tikz}
\usetikzlibrary{decorations.pathmorphing,positioning,shapes.misc,calc}
-\usepackage{tcolorbox}
+\usetikzlibrary{babel}
+\RequirePackage{tcolorbox}
+\RequirePackage{varwidth}
\tcbuselibrary{skins}
%%----COMMANDES FR
@@ -669,7 +682,155 @@
}
%====EXERCICE PERSO
+\newlength{\largstarsempty}
+\newlength{\largstarsmid}
+\newlength{\largstarfull}
+\newlength{\largmaxstars}
+
+%commande annexe tkzlevelstars [en] + [fr]
+\usetikzlibrary{shapes.geometric}
+
+\newlength{\tmphauteuretoiles}
+\newlength{\tmpprofondeuretoiles}
+\newlength{\tmpoffsetetoiles}\setlength{\tmpoffsetetoiles}{0.25pt}
+
+\defKV[levelstars]{%
+ colframe=\def\tkzLevelStarsColor{#1},
+ colback=\def\tkzLevelStarsColorBg{#1},
+ offset=\setlength{\tmpoffsetetoiles}{#1},
+ maxlevel=\def\tkzLevelStarsMaxLevel{#1}
+}
+
+\setKVdefault[levelstars]{%
+ colframe=black,
+ colback=gray,
+ offset={0.025em},
+ maxlevel=3,
+ valign=true
+}
+
+\NewDocumentCommand{\tkzLevelStars}{ O{} m }{%
+ %lectures des clés
+ \restoreKV[levelstars]%
+ \setKV[levelstars]{#1}%
+ %dimensions
+ \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \setlength{\tmphauteuretoiles}{0.95\tmphauteuretoiles}%
+ \ifboolKV[levelstars]{valign}%
+ {%
+ \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \begin{tikzpicture}[baseline={-1.25\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ {%
+ \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ \foreach \X in {1,...,\tkzLevelStarsMaxLevel}{%
+ \xdef\tmpxfill{\xintfloateval{min(1,max(1+#2-\X,0))}}%
+ %\pgfmathsetmacro{\tmpxfill}{min(1,max(1+#2-\X,0))}
+ \path ({\X*(\tmphauteuretoiles+\tmpoffsetetoiles)},0) node[star,draw,star point height={0.25\tmphauteuretoiles},minimum size={\tmphauteuretoiles},inner sep=0pt,path picture={\fill (path picture bounding box.south west) rectangle ([xshift=\tmpxfill*0.9515*\tmphauteuretoiles]path picture bounding box.north west);}]{};
+ }
+ \end{tikzpicture}%
+}
+
+\defKV[tkznivetoiles]{%
+ Couleur=\def\tkzLevelStarsColor{#1},
+ CouleurFond=\def\tkzLevelStarsColorBg{#1},
+ Offset=\setlength{\tmpoffsetetoiles}{#1},
+ NiveauMax=\def\tkzLevelStarsMaxLevel{#1}
+}
+\setKVdefault[tkznivetoiles]{%
+ Couleur=black,
+ CouleurFond=gray,
+ Offset={0.025em},
+ NiveauMax=3,
+ AlignV=true
+}
+
+\NewDocumentCommand{\tkzEtoiles}{ O{} m }{%
+ %lectures des clés
+ \restoreKV[tkznivetoiles]%
+ \setKV[tkznivetoiles]{#1}%
+ %dimensions
+ \settototalheight{\tmphauteuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \setlength{\tmphauteuretoiles}{0.95\tmphauteuretoiles}%
+ \ifboolKV[tkznivetoiles]{AlignV}%
+ {%
+ \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}%
+ \begin{tikzpicture}[baseline={-1.25\tmpprofondeuretoiles},fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ {%
+ \begin{tikzpicture}[fill=\tkzLevelStarsColorBg,draw=\tkzLevelStarsColor,rounded corners={0.05\tmphauteuretoiles},line width={0.04\tmphauteuretoiles}]
+ }%
+ \foreach \X in {1,...,\tkzLevelStarsMaxLevel}{%
+ \xdef\tmpxfill{\xintfloateval{min(1,max(1+#2-\X,0))}}%
+ %\pgfmathsetmacro{\tmpxfill}{min(1,max(1+#2-\X,0))}
+ \path ({\X*(\tmphauteuretoiles+\tmpoffsetetoiles)},0) node[star,draw,star point height={0.25\tmphauteuretoiles},minimum size={\tmphauteuretoiles},inner sep=0pt,path picture={\fill (path picture bounding box.south west) rectangle ([xshift=\tmpxfill*0.9515*\tmphauteuretoiles]path picture bounding box.north west);}]{};
+ }
+ \end{tikzpicture}%
+}
+
+%commande annexe ;-)
+\NewDocumentCommand\NiveauDiffExos{ O{3} m }{%avec des demis ??
+ %les tailles de boîtes
+ \settowidth{\largstarsempty}{{\faStar[regular]}}%
+ \settowidth{\largstarsmid}{{\faIcon{star-half-alt}}}%
+ \settowidth{\largstarfull}{{\faStar}}%
+ \pgfmathsetlength{\largmaxstars}{max(\largstarsempty,\largstarsmid,\largstarfull)}%
+ %les calculs intermédiaires
+ \xintifboolexpr{#1 < 0}{\xdef\tmpstarsmax{3}}{\xdef\tmpstarsmax{#1}}%on met à 3 si pas valide
+ \xintifboolexpr{#2 >= 0 'and' #2 <= \tmpstarsmax 'and' isint(2*#2) == 1}{\xdef\tmpstars{#2}}{\xdef\tmpstars{0}}%on met à zéro si pas valide
+ %
+ \xintifboolexpr{isint(\tmpstars) == 1}%
+ {%
+ \xdef\tmpstarsexosfull{\tmpstars}%
+ \xdef\tmpstarsexosmid{0}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-\tmpstars}}%
+ }%
+ {%
+ \xdef\tmpstarsexosmid{1}%
+ \xdef\tmpstarsexosfull{\xinteval{(\tmpstars-0.5)}}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-1-\tmpstarsexosfull}}%
+ }%
+ %affichage des full
+ \xintifboolexpr{\tmpstarsexosfull > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosfull}}\do{\makebox[\largmaxstars][c]{\faStar}}}{}%
+ %affichage des mid
+ \xintifboolexpr{\tmpstarsexosmid > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosmid}}\do{\makebox[\largmaxstars][c]{\faIcon{star-half-alt}}}}{}%
+ %affichage des vides
+ \xintifboolexpr{\tmpstarsexosempty > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosempty}}\do{\makebox[\largmaxstars][c]{\faStar[regular]}}}{}%
+}
+
+%commande annexe [en] ;-)
+\NewDocumentCommand\DiffLevelStars{ O{3} m }{%avec des demis ??
+ %les tailles de boîtes
+ \settowidth{\largstarsempty}{{\faStar[regular]}}%
+ \settowidth{\largstarsmid}{{\faIcon{star-half-alt}}}%
+ \settowidth{\largstarfull}{{\faStar}}%
+ \pgfmathsetlength{\largmaxstars}{max(\largstarsempty,\largstarsmid,\largstarfull)}%
+ %les calculs intermédiaires
+ \xintifboolexpr{#1 < 0}{\xdef\tmpstarsmax{3}}{\xdef\tmpstarsmax{#1}}%on met à 3 si pas valide
+ \xintifboolexpr{#2 >= 0 'and' #2 <= \tmpstarsmax 'and' isint(2*#2) == 1}{\xdef\tmpstars{#2}}{\xdef\tmpstars{0}}%on met à zéro si pas valide
+ %
+ \xintifboolexpr{isint(\tmpstars) == 1}%
+ {%
+ \xdef\tmpstarsexosfull{\tmpstars}%
+ \xdef\tmpstarsexosmid{0}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-\tmpstars}}%
+ }%
+ {%
+ \xdef\tmpstarsexosmid{1}%
+ \xdef\tmpstarsexosfull{\xinteval{(\tmpstars-0.5)}}%
+ \xdef\tmpstarsexosempty{\xinteval{\tmpstarsmax-1-\tmpstarsexosfull}}%
+ }%
+ %affichage des full
+ \xintifboolexpr{\tmpstarsexosfull > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosfull}}\do{\makebox[\largmaxstars][c]{\faStar}}}{}%
+ %affichage des mid
+ \xintifboolexpr{\tmpstarsexosmid > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosmid}}\do{\makebox[\largmaxstars][c]{\faIcon{star-half-alt}}}}{}%
+ %affichage des vides
+ \xintifboolexpr{\tmpstarsexosempty > 0}{\xintFor* ##1 in {\xintSeq{1}{\tmpstarsexosempty}}\do{\makebox[\largmaxstars][c]{\faStar[regular]}}}{}%
+}
+
+%code ppal
\newcounter{numeroexo}
\setcounter{numeroexo}{0}
\newlength{\eptraitexo}
@@ -680,6 +841,8 @@
\newlength{\tmp@image@profondeur}
\colorlet{macouleurexo}{blue!50!black}
+\colorlet{macouleurexodeco}{blue!50!black}
+\colorlet{macouleurexodecofond}{blue!50!black}
\newcommand\tmpstyleexo{\bfseries\LARGE\sffamily}%
\newcommand\tmplabelexo{Exercice~}%
@@ -687,15 +850,21 @@
\defKV[globalstyleexo]{%
Libelle=\renewcommand\tmplabelexo{#1},%
Couleur=\colorlet{macouleurexo}{#1},%
+ CouleurDeco=\colorlet{macouleurexodeco}{#1},%
+ CouleurFondDeco=\colorlet{macouleurexodecofond}{#1},%
Police=\renewcommand\tmpstyleexo{#1},%
- EpTrait=\setlength{\eptraitexo}{#1}
+ EpTrait=\setlength{\eptraitexo}{#1},%
+ EchelleEtoiles=\def\tmpscalestarsexos{#1}
}
\setKVdefault[globalstyleexo]{%
Libelle={Exercice~},%
Couleur={blue!50!black},%
+ CouleurDeco={blue!50!black},%
+ CouleurFondDeco={macouleurexodeco!50},%
Police={\bfseries\LARGE\sffamily},%
- EpTrait={1.1pt}
+ EpTrait={1.1pt},%
+ EchelleEtoiles=0.85
}
\NewDocumentCommand\StyleEnvtExo{ O{} }{%
@@ -710,20 +879,20 @@
Type=\def\EnvtExoType{#1},%
ComplementTitre=\def\EnvtExoCpltTitre{#1},%
CodeDebut=\def\EnvtExoCodeAvant{#1},%
- %Couleur=\def\EnvtExoCouleur{#1},%
EchelleImage=\def\EnvtExoScaleImg{#1},%
Decoration=\def\EnvtExoDeco{#1},%
- Trait=\def\EnvtExoTrait{#1}
+ Trait=\def\EnvtExoTrait{#1},%
+ Etoiles=\def\EnvtExoEtoiles{#1}
}
\setKVdefault[EnvtExercice]{
Type=Classique,%
ComplementTitre={},%
CodeDebut={},%
- %Couleur=macouleurexo,%
EchelleImage=1.15,%
Compteur=true,%
Decoration={},%
- Trait=plein
+ Trait=plein,%
+ Etoiles={}
}
\NewDocumentEnvironment{EnvtExo}{ !O{} }%
@@ -738,18 +907,32 @@
{%
%label avec numéro et complément
\tmpstyleexo\tmplabelexo\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
{pointilles}{\,\dotfill}%
{dashilles}{\,\hdashrule{\fill}{\eptraitexo}{\eptraitexospace}}%
{non}{\hfill}%
+ {aucun}{~}%
}%
%décoration éventuelle
\IfSubStr{\EnvtExoDeco}{Icone}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoIcon]%
- \,\scalebox{0.85}[0.85]{\EnvtExoIcon}%
+ \,\textcolor{macouleurexodeco}{\scalebox{0.85}[0.85]{\EnvtExoIcon}}%
}{}%
\IfSubStr{\EnvtExoDeco}{Ceinture}%
{%
@@ -759,13 +942,13 @@
\IfSubStr{\EnvtExoDeco}{Chrono}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoChrono]%
- \,\pictochrono[ColTime=macouleurexo!50]{\EnvtExoChrono}%
+ \,\pictochrono[ColTime=macouleurexodeco!50]{\EnvtExoChrono}%
}{}%
\IfSubStr{\EnvtExoDeco}{Points}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoPts]%
\IfStrEq{\EnvtExoPts}{1}{\def\pts{point}}{\def\pts{points}}%
- \,(\EnvtExoPts\ \pts)%
+ \,\textcolor{macouleurexodeco}{(\EnvtExoPts\ \pts)}%
}{}%
\IfSubStr{\EnvtExoDeco}{Image}%
{%
@@ -773,12 +956,49 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\IfSubStr{\EnvtExoType}{Perso}%OK perso____déco
{%
\StrBehind{\EnvtExoType}{/}[\EnvtExoLabel]%
%label avec numéro et complément
\tmpstyleexo\EnvtExoLabel\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
@@ -790,7 +1010,7 @@
\IfSubStr{\EnvtExoDeco}{Icone}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoIcon]%
- \,\scalebox{0.85}[0.85]{\EnvtExoIcon}%
+ \,\textcolor{macouleurexodeco}{\scalebox{0.85}[0.85]{\EnvtExoIcon}}%
}{}%
\IfSubStr{\EnvtExoDeco}{Ceinture}%
{%
@@ -800,13 +1020,13 @@
\IfSubStr{\EnvtExoDeco}{Chrono}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoChrono]%
- \,\pictochrono[ColTime=macouleurexo!50]{\EnvtExoChrono}%
+ \,\pictochrono[ColTime=macouleurexodeco!50]{\EnvtExoChrono}%
}{}%
\IfSubStr{\EnvtExoDeco}{Points}%
{%
\StrBehind{\EnvtExoDeco}{/}[\EnvtExoPts]%
\IfStrEq{\EnvtExoPts}{1}{\def\pts{point}}{\def\pts{points}}%
- \,(\EnvtExoPts\ \pts)%
+ \,\textcolor{macouleurexodeco}{(\EnvtExoPts\ \pts)}%
}{}%
\IfSubStr{\EnvtExoDeco}{Image}%
{%
@@ -814,6 +1034,30 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSuStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\endgroup%
\def\hrulefill{\leavevmode\leaders\hrule height 0.4pt\hfill\kern\z@}%
@@ -833,6 +1077,19 @@
{%
%label avec numéro et complément
\tmpstyleexo\tmplabelexo\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
@@ -868,12 +1125,49 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSuStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\IfSubStr{\EnvtExoType}{Perso}%OK perso____déco
{%
\StrBehind{\EnvtExoType}{/}[\EnvtExoLabel]%
%label avec numéro et complément
\tmpstyleexo\EnvtExoLabel\ifboolKV[EnvtExercice]{Compteur}{\thenumeroexo}{}\EnvtExoCpltTitre%
+ %étoiles eventuelles
+ \IfStrEq{\EnvtExoEtoiles}{}{}%
+ {%
+ \,(\IfSubStr{\EnvtExoEtoiles}{§}%
+ {%
+ \StrCut{\EnvtExoEtoiles}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoEtoiles}%
+ }%
+ )%
+ }%
%trait éventuel
\IfStrEqCase{\EnvtExoTrait}{%
{plein}{\,\hrulefill}%
@@ -909,6 +1203,30 @@
\settototalheight{\tmp@image@hauteur@totale}{\hbox{\tmpstyleexo qB}}%
\,$\vcenter{\hbox{\includegraphics[height=\EnvtExoScaleImg\tmp@image@hauteur@totale]{\EnvtExoImg}}}$%
}{}%
+ \IfSubStr{\EnvtExoDeco}{faEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSuStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos[\EnvtExoStarTot]{\EnvtExoStarNb}}}%
+ }%
+ {%
+ \textcolor{macouleurexodeco}{\scalebox{\tmpscalestarsexos}[\tmpscalestarsexos]{\NiveauDiffExos{\EnvtExoStars}}}%
+ }%
+ }{}%
+ \IfSubStr{\EnvtExoDeco}{tkzEtoiles}%
+ {%
+ \StrBehind{\EnvtExoDeco}{/}[\EnvtExoStars]%
+ \IfSubStr{\EnvtExoStars}{§}%
+ {%
+ \StrCut{\EnvtExoStars}{§}{\EnvtExoStarNb}{\EnvtExoStarTot}%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond,NiveauMax=\EnvtExoStarTot]{\EnvtExoStarNb}%
+ }%
+ {%
+ \tkzEtoiles[Couleur=macouleurexodeco,CouleurFond=macouleurexodecofond]{\EnvtExoStars}%
+ }%
+ }{}%
}{}%
\endgroup%
\def\hrulefill{\leavevmode\leaders\hrule height 0.4pt\hfill\kern\z@}%
@@ -922,7 +1240,7 @@
\setKVdefault[BoiteArrondie]{%
Fond=red,%
Texte=white,%
- EspH=0.25em,%
+ EspH=0.125em,%
Style=rect
}
\NewDocumentCommand\BoiteArrondie{ O{} m O{char} }{%
@@ -1088,6 +1406,93 @@
title={\@ifpackageloaded{babel}{\NoAutoSpacing#2}{#2}\IfBooleanTF{#1}{}{$\cdot$\scalebox{0.6}[0.6]{\faCheckCircle[regular]\!\faCheckCircle[regular]}~}},left=1mm,right=1mm,boxsep=0mm]{#3}%
}
+%====Nutriscore
+\definecolor{couleurNS1}{RGB}{45,126,67}
+\definecolor{couleurNS2}{RGB}{151,186,56}
+\definecolor{couleurNS3}{RGB}{240,202,13}
+\definecolor{couleurNS4}{RGB}{213,123,26}
+\definecolor{couleurNS5}{RGB}{197,52,25}
+\tikzset{noeudNS/.style={pos=0.5,xscale=\echellexNS*\hauteurNS,yscale=\echelleyNS*\hauteurNS}}
+
+\defKV[NUTRISCORE]{%
+ Hauteur=\pgfmathsetmacro{\hauteurNS}{#1},%
+ Ratio=\pgfmathsetmacro{\ratiolargeurbandeNS}{#1},%
+ Symboles=\def\lettresNS{#1},%
+ Legende=\def\legendeNS{#1},%
+ Police=\def\fonteNS{#1},%
+ Couleurs=\def\couleursNS{#1},%
+ EchelleSymboles=\def\echellesymbNS{#1},%
+ CouleurFond=\def\coulbgNS{#1}
+}
+\setKVdefault[NUTRISCORE]{%
+ Hauteur=1,%
+ Ratio={0.6},%
+ Symboles={A,B,C,D,E},%
+ Legende={score},%
+ Police=\sffamily\bfseries,%
+ AffLegende=true,%
+ Couleurs={couleurNS1,couleurNS2,couleurNS3,couleurNS4,couleurNS5},%
+ EchelleSymboles={1.25,1.65},%
+ CouleurFond=white
+}
+
+\NewDocumentCommand\BandeauScore{ O{} D<>{} m }{%
+ \restoreKV[NUTRISCORE]%
+ \setKV[NUTRISCORE]{#1}%
+ \IfEq{#3}{}%
+ {%
+ \xdef\numcasNS{0}%
+ }%
+ {%
+ \xdef\numcasNS{#3}%
+ }%
+ \readlist\letterListNS{\lettresNS}%
+ \xdef\nbcasesNS{\letterListNSlen}%
+ \readlist\colorListNS{\couleursNS}%
+ \xdef\nbcouleursNS{\colorListNSlen}%
+ \pgfmathsetmacro{\largeurcaseNS}{\hauteurNS*\ratiolargeurbandeNS}%
+ \pgfmathsetmacro{\largeurbandeNS}{\largeurcaseNS*\nbcasesNS}%
+ \pgfmathsetmacro{\margeNS}{0.225*\largeurcaseNS/2.4}%
+ \IfSubStr{\echellesymbNS}{,}%
+ {%
+ \StrCut{\echellesymbNS}{,}{\echellexNS}{\echelleyNS}%
+ }%
+ {%
+ \xdef\echellexNS{\echellesymbNS}\xdef\echelleyNS{\echellesymbNS}%
+ }%
+ \begin{tikzpicture}[font=\fonteNS,#2]
+ %---test
+ \filldraw[white,rounded corners=\fpeval{5*\largeurcaseNS*\ratiolargeurbandeNS}mm,line width=\fpeval{1.5*\largeurcaseNS*\ratiolargeurbandeNS}mm,opacity=0] ({-\margeNS},{-\margeNS}) rectangle++ (\nbcasesNS*\largeurcaseNS+2*\margeNS,\hauteurNS+2*\margeNS) ;
+ %---testfin
+ \begin{scope}
+ \clip[rounded corners=\fpeval{5*\largeurcaseNS*\ratiolargeurbandeNS}mm] (0,0) rectangle (\largeurbandeNS,\hauteurNS);
+ \foreach \tmpiii in {1,...,\letterListNSlen}{%
+ \ifnum\tmpiii=\numcasNS
+ \else
+ \ifnum\tmpiii>\nbcouleursNS
+ \fill[draw=none,lightgray] ({(\tmpiii-1)*\largeurcaseNS},0) rectangle ++(\largeurcaseNS,\hauteurNS) node[noeudNS,white,opacity=0.66]{\letterListNS[\tmpiii]};
+ \else
+ \fill[draw=none,{\colorListNS[\tmpiii]}] ({(\tmpiii-1)*\largeurcaseNS},0) rectangle ++(\largeurcaseNS,\hauteurNS) node[noeudNS,white,opacity=0.66]{\letterListNS[\tmpiii]};
+ \fi
+ \fi
+ }%
+ \end{scope}
+ \xintifboolexpr{\numcasNS >=1 'and' \numcasNS <= \nbcasesNS }%
+ {%
+ \begin{scope}
+ %\clip (-\margeNS,-\margeNS) rectangle++ (\largeurbandeNS+2*\margeNS,\hauteurNS+2*\margeNS);
+ \draw[draw=\coulbgNS,rounded corners=\fpeval{7.25*\largeurcaseNS*\ratiolargeurbandeNS}mm,line width=\fpeval{1.5*\largeurcaseNS*\ratiolargeurbandeNS}mm,fill={\colorListNS[#3]}] ({(\numcasNS-1)*\largeurcaseNS-\margeNS},{-\margeNS}) rectangle++ (\largeurcaseNS+2*\margeNS,\hauteurNS+2*\margeNS) node[noeudNS,white]{\letterListNS[\numcasNS]};
+ \end{scope}
+ }%
+ {%
+ }%
+ %légende
+ \ifboolKV[NUTRISCORE]{AffLegende}%
+ {%
+ \node[above right=1pt,gray,scale=\fpeval{0.5*\hauteurNS},inner sep=1pt] at ({0.125*\margeNS},1.02*\hauteurNS) {\vphantom{QÉ}\MakeUppercase{\legendeNS}};
+ }{}%
+ \end{tikzpicture}%
+}
%%----COMMANDES EN
@@ -1346,25 +1751,23 @@
}
%====ROUNDED BOX
-\defKV[RoundedBox]{hmargin=\def\RoundedBoxDelta{#1},style=\def\RoundedBoxStyle{#1}}
-\setKVdefault[RoundedBox]{%
- bg=red,%
- txt=white,%
- hmargin=0.25em,%
- style=rect
-}
-
-
-
-\NewDocumentCommand\RoundedBox{ O{} m O{char} }{%
- \restoreKV[RoundedBox]%
- \setKV[RoundedBox]{#1}%
- \settototalheight{\tmpheightbox}{\hbox{(EazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN)#2}}%hauteur globale
- \IfStrEqCase{\RoundedBoxStyle}{%
- {rect}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=rectangle,rounded corners=0.25em,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}\kern\RoundedBoxDelta#2\kern\RoundedBoxDelta};}}%
- {circle}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=circle,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}#2};}}%
- }\relax
-}
+% \defKV[RoundedBox]{hmargin=\def\RoundedBoxDelta{#1},style=\def\RoundedBoxStyle{#1}}
+% \setKVdefault[RoundedBox]{%
+ % bg=red,%
+ % txt=white,%
+ % hmargin=0.25em,%
+ % style=rect
+% }
+
+% \NewDocumentCommand\RoundedBox{ O{} m O{char} }{%
+ % \restoreKV[RoundedBox]%
+ % \setKV[RoundedBox]{#1}%
+ % \settototalheight{\tmpheightbox}{\hbox{(EazertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN)#2}}%hauteur globale
+ % \IfStrEqCase{\RoundedBoxStyle}{%
+ % {rect}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=rectangle,rounded corners=0.25em,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}\kern\RoundedBoxDelta#2\kern\RoundedBoxDelta};}}%
+ % {circle}{\tikz[remember picture,baseline=(#3.base)]{\node[minimum height=\tmpheightbox,shape=circle,fill={\useKV[RoundedBox]{bg}},inner sep=0.75pt,outer sep=0pt,text={\useKV[RoundedBox]{txt}}] (#3) {\vphantom{(qE)}#2};}}%
+ % }\relax
+% }
%====Chat SMS
%===Keys [EN]
@@ -1489,5 +1892,1180 @@
title={#2\IfBooleanTF{#1}{}{$\cdot$\scalebox{0.6}[0.6]{\faCheckCircle[regular]\!\faCheckCircle[regular]}~}},left=1mm,right=1mm,boxsep=0mm]{#3}%
}
+%====SMALL BOXES CREATION
+\tikzset{simpleboxrulearrow/.style={line width=0.8pt,|->,>=latex}}
+
+% \NewTColorBox{SimpleBox}{ O{blue} D<>{} m }{
+ % enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm,
+ % title={#3},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em,
+ % finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},%
+ % #2
+% }
+
+\NewTColorBox{BoiteSimple}{ O{blue} D<>{} m }{
+ enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm,
+ title={#3},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em,
+ finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},%
+ #2
+}
+
+% \NewDocumentCommand\GenSimpleBox{ O{blue} m }{%
+ % 1 = couleur
+ % 2 = nom
+ % \NewTColorBox{#2}{ O{} m }{
+ % enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm,
+ % title={##2},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em,
+ % finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},%
+ % ##1
+ % }
+% }
+
+\NewDocumentCommand\GenereBoiteSimple{ O{blue} m }{%
+ %1 = couleur
+ %2 = nom
+ \NewTColorBox{#2}{ O{} m }{
+ enhanced,nobeforeafter,blanker,size=small,bottom=1mm,before=\par\noindent,%top=0mm,left=1mm,right=1mm,
+ title={##2},fonttitle=\sffamily\bfseries\color{#1},lefttitle=1em,
+ finish={\draw[#1,simpleboxrulearrow] ([xshift=1em]title.west) --++ (-1em,0) |- (frame.south east) -- ($(frame.south east)!0.5!(frame.north east)$) ;},%
+ ##1
+ }
+}
+
+%====CIRCLEDNUMBERSSIMPLE
+\defKV[CircledBoxNumber]{bg=\def\tmpbordernbcircbox{#1}}
+\setKVdefault[CircledBoxNumber]{bg={},txt=black,bthick=0.5pt,bcol=black,raise=true}
+
+\newlength{\tmpheightnbcircbox}
+\newlength{\tmpdepthnbcircbox}
+\NewDocumentCommand\CircledNumber{ O{} m O{circnb} }{%
+ \restoreKV[CircledBoxNumber]%
+ \setKV[CircledBoxNumber]{#1}%
+ \settototalheight{\tmpheightnbcircbox}{(1234567890)}%hauteur globale
+ \settodepth{\tmpdepthnbcircbox}{(1234567890)}%
+ \ifboolKV[CircledBoxNumber]{raise}%
+ {%
+ \IfEq{\tmpbordernbcircbox}{}%
+ {%
+ {\tikz[baseline={([yshift=\tmpdepthnbcircbox]current bounding box.south)}]\node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}%
+ }%
+ {%
+ {\tikz[baseline={([yshift=\tmpdepthnbcircbox]current bounding box.south)}]\node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,fill={\useKV[CircledBoxNumber]{bg}},text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}%
+ }%
+ }%
+ {%
+ \IfEq{\tmpbordernbcircbox}{}%
+ {%
+ {\tikz[baseline=(#3.base)] \node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}%
+ }%
+ {%
+ {\tikz[baseline=(#3.base)] \node[outer sep=0pt,inner sep=0.5pt,minimum height={\tmpheightnbcircbox-\useKV[CircledBoxNumber]{bthick}},draw,{\useKV[CircledBoxNumber]{bcol}},line width={\useKV[CircledBoxNumber]{bthick}},circle,fill={\useKV[CircledBoxNumber]{bg}},text={\useKV[CircledBoxNumber]{txt}}] (#3) {\ifnum#2<10 #2\else\scalebox{0.5}[1]{#2}\fi} ;}%
+ }%
+ }%
+}
+
+%====EXAM BOX TITLE(s)
+\NewDocumentCommand\LetPhantomBox{}{%
+ \vphantom{(ÉAZERTYUIOPQSDFGHJKLMWXCVBN,éàço)}%
+}
+
+\tcbset{StyleTitreSujet/.style={%
+ enhanced,size=small,
+ colback=white!5,boxrule=1.25pt,
+ attach boxed title to top left={xshift=0.5cm,yshift=1mm-\tcboxedtitleheight},
+ varwidth boxed title*=-3cm,
+ boxed title style={frame code={
+ \path[fill=tcbcolframe!50!black]
+ ([yshift=-1mm,xshift=-1mm]frame.north west)
+ arc[start angle=0,end angle=180,radius=1mm]
+ ([yshift=-1mm,xshift=1mm]frame.north east)
+ arc[start angle=180,end angle=0,radius=1mm];
+ \path[fill=tcbcolframe] ([xshift=-2mm]frame.north west) -- ([xshift=2mm]frame.north east) [rounded corners=1mm]-- ([xshift=1mm,yshift=-1mm]frame.north east) -- (frame.south east) -- (frame.south west) -- ([xshift=-1mm,yshift=-1mm]frame.north west) [sharp corners]-- cycle;
+ },interior engine=empty,size=fbox,
+ },
+ fonttitle=\bfseries\sffamily,
+ fontupper=\huge\bfseries\sffamily,
+ }
+}
+
+\defKV[tcbtitresujet]{%
+ AlignH=\def\tcbtitresujethalign{#1}
+}
+
+\setKVdefault[tcbtitresujet]{%
+ Couleur=black,
+ AlignH=center
+}
+
+\NewDocumentEnvironment{TitreSujet}{ O{} D<>{} m }%
+{%
+ \restoreKV[tcbtitresujet]%
+ \setKV[tcbtitresujet]{#1}%
+ \IfStrEqCase{\tcbtitresujethalign}{%
+ {right}{\tcbset{StyleTitreSujetAlign/.style={halign=flush right}}}%
+ {left}{\tcbset{StyleTitreSujetAlign/.style={halign=flush left}}}%
+ }[\tcbset{StyleTitreSujetAlign/.style={halign=flush center}}]%
+ \tcolorbox[colupper={\useKV[tcbtitresujet]{Couleur}},colframe={\useKV[tcbtitresujet]{Couleur}},StyleTitreSujet,StyleTitreSujetAlign,title={\vphantom{QJ}#3},before upper=\LetPhantomBox,after upper=\LetPhantomBox,#2]%
+}%
+{%
+ \endtcolorbox%
+}
+
+\tcbset{StyleTitreSujetSousEpreuve/.style={%
+ center,after skip=1pt,size=small,boxsep=3pt,boxrule=1pt,colback=white,left=2pt,right=2pt,%
+ sharp corners,rounded corners=downhill,arc=8pt,
+ fontupper={\sffamily\bfseries\large}
+ }
+}
+
+\NewDocumentCommand\SousTitreSujetEpreuve{ O{black} m }{%
+ \tcbset{StyleTitreSujetSousEpreuveCouleur/.style={colframe=#1,colupper=#1}}
+ \IfStrEqCase{#2}{%
+ {}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur]{#2}}%
+ {U21}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faSortNumericDown\:\:,after upper=\:\:\faProjectDiagram]{Épreuve U2 - Mathématiques pour l'Informatique}}%
+ {U2}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faSortNumericDown\:\:,after upper=\:\:\faProjectDiagram]{Épreuve U2 - Mathématiques pour l'Informatique}}%
+ {U2CG}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faSortNumericDown\:\:,after upper=\:\:\faProjectDiagram]{Épreuve U2 - Mathématiques appliquées}}%
+ {UF2}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faDice\:\:,after upper=\:\:\faChartLine]{Épreuve UF2 - Mathématiques Approfondies}}%
+ {U41OL}{\tcbox[StyleTitreSujetSousEpreuve,StyleTitreSujetSousEpreuveCouleur,before upper=\faDice\:\:,after upper=\:\:\faBezierCurve]{Épreuve U41 - Mathématiques}}
+ }%
+}
+
+\NewDocumentCommand\SujetTitreExo{ O{black} m }{%
+ \tcolorbox[enhanced,width=\linewidth,size=small,colback=white,colframe=#1,boxrule=0.75pt,fontupper=\color{#1}\Large\sffamily\bfseries,sharp corners,rounded corners=south,arc=4pt,before upper=\LetPhantomBox]
+ #2
+ \endtcolorbox%
+}
+
+%====vignettes
+\NewDocumentCommand\LetPhantomVignette{}{%
+ \vphantom{(AZERTYUIOPQSDFGHJKLMWXCVBN,éàço)}%
+}
+
+\tcbset{cevignettes/.style={%
+ nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,arc=2pt,boxrule=0.65pt,left=1.75pt,right=1.25pt,top=1.25pt,bottom=0.5pt,colback=white,before upper=\LetPhantomVignette
+ }
+}
+
+\tcbset{cevignettepy/.style={%
+ cevignettes,left=6pt,coltitle=tcbcolframe,
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{PY}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\tcbset{cevignettealgo/.style={%
+ cevignettes,left=6pt,coltitle=tcbcolframe,
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{ALGO}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\tcbset{cevignettetableur/.style={%
+ cevignettes,left=6pt,coltitle=tcbcolframe,
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.5}[0.75]{\textbf{EXCEL}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\tcbset{cevignetteMPM/.style={%
+ cevignettes,left=6pt,coltitle=white,
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{MPM}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\tcbset{cevignettegraph/.style={%
+ cevignettes,left=6pt,coltitle=white,
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{GRPH}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\tcbset{cevignetteshell/.style={%
+ cevignettes,left=6pt,coltitle=white,
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black] {\scalebox{0.5}[0.75]{\textbf{SHELL}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\tcbset{cevignettelatex/.style={%
+ cevignettes,left=6pt,coltitle=white,
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{\LaTeX}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\tcbset{cevignettexcas/.style={%
+ cevignettes,left=6pt,coltitle=white,colback=white,%
+ underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{0.55}[0.75]{\textbf{XCAS}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}
+ }
+}
+
+\defKV[cevignette]{Type=\def\cevignettetype{#1},Couleur=\def\cevignettecolor{#1},Police=\def\cevignettefont{#1},Echelle=\def\cevignettescaleperso{#1}}
+\setKVdefault[cevignette]{Type={},Couleur={darkgray},Police=\footnotesize,Echelle=0.55}
+
+\NewDocumentCommand\AffVignette{ s O{} m }{%
+ \restoreKV[cevignette]%
+ \setKV[cevignette]{#2}%
+ \IfStrEqCase{\cevignettetype}{%
+ {}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettes]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {algo}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettealgo]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {py}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettepy]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {pypit}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettepy]{\piton{#3}}}%
+ {pyl}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettepy]{\piton{\py{#3}}}}%
+ {mpm}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignetteMPM]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {grph}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettegraph]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {xcas}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettexcas]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {shell}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignetteshell]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {tex}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont\ttfamily},cevignettelatex]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ {sheet}{\tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettetableur]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}}%
+ }%
+ \IfSubStr{\cevignettetype}{perso}%
+ {%
+ \StrBehind{\cevignettetype}{/}[\cevignettelabelperso]%
+ \tcbox[colframe=\cevignettecolor,fontupper={\cevignettefont},cevignettes,left=6pt,coltitle=white,colback=white,underlay={\begin{tcbclipinterior}\fill[fill=tcbcolframe!33]($(interior.south west)$) rectangle node[rotate=90,font=\tiny\sffamily,tcbcolframe!75!black]{\scalebox{\cevignettescaleperso}[0.75]{\textbf{\cevignettelabelperso}}} ($(interior.north west)+(5pt,0pt)$);\end{tcbclipinterior}}]{\IfBooleanTF{#1}{\NoAutoSpacing}{}#3}%
+ }%
+ {}%
+ \relax%
+}
+
+%====DisplaySkip [en]
+\defKV[DisplaySkip]{%
+ aboveds=\def\ceabovedisplayskip{#1},%
+ abovedsshort=\def\ceabovedisplayskipshort{#1},%
+ belowdds=\def\cebelowdisplayskip{#1},%
+ belowdsshort=\def\cebelowdisplayskipshort{#1},%
+ global=\def\globaldisplayskip{#1}
+}
+
+\setKVdefault[DisplaySkip]{%
+ aboveds={12pt plus 3pt minus 9pt},%
+ abovedsshort={0pt plus 3pt},%
+ belowdds={12pt plus 3pt minus 9pt},%
+ belowdsshort={7pt plus 3pt minus 4pt},%
+ global={},%
+ shrink=false
+}
+\NewDocumentCommand\ChangeSpacingDisplaySkip{ O{} }{%
+ \restoreKV[DisplaySkip]%
+ \setKV[DisplaySkip]{#1}%
+ \ifboolKV[DisplaySkip]{shrink}%
+ {%
+ \AtBeginDocument{%
+ \abovedisplayskip=0.33\baselineskip
+ \abovedisplayshortskip=0.33\baselineskip
+ \belowdisplayskip=0.33\baselineskip
+ \belowdisplayshortskip=0.33\baselineskip
+ }
+ }%
+ {%
+ \IfStrEq{\globaldisplayskip}{}%
+ {%
+ \AtBeginDocument{%
+ \abovedisplayskip=\ceabovedisplayskip
+ \abovedisplayshortskip=\ceabovedisplayskipshort
+ \belowdisplayskip=\cebelowdisplayskip
+ \belowdisplayshortskip=\cebelowdisplayskipshort
+ }
+ }%
+ {%
+ \AtBeginDocument{%
+ \abovedisplayskip=\globaldisplayskip
+ \abovedisplayshortskip=\globaldisplayskip
+ \belowdisplayskip=\globaldisplayskip
+ \belowdisplayshortskip=\globaldisplayskip
+ }
+ }%
+ }%
+}
+
+%====DisplaySkip [fr]
+\defKV[DisplaySkipFr]{%
+ Avant=\def\ceabovedisplayskip{#1},%
+ AvantS=\def\ceabovedisplayskipshort{#1},%
+ Apres=\def\cebelowdisplayskip{#1},%
+ ApresS=\def\cebelowdisplayskipshort{#1},%
+ Global=\def\globaldisplayskip{#1}
+}
+
+\setKVdefault[DisplaySkipFr]{%
+ Avant={12pt plus 3pt minus 9pt},%
+ AvantS={0pt plus 3pt},%
+ Apres={12pt plus 3pt minus 9pt},%
+ ApresS={7pt plus 3pt minus 4pt},%
+ Global={},%
+ Dense=false
+}
+\NewDocumentCommand\ChangerDisplaySkip{ O{} }{%
+ \restoreKV[DisplaySkipFr]%
+ \setKV[DisplaySkipFr]{#1}%
+ \ifboolKV[DisplaySkipFr]{Dense}%
+ {%
+ \AtBeginDocument{%
+ \abovedisplayskip=0.33\baselineskip
+ \abovedisplayshortskip=0.33\baselineskip
+ \belowdisplayskip=0.33\baselineskip
+ \belowdisplayshortskip=0.33\baselineskip
+ }
+ }%
+ {%
+ \IfStrEq{\globaldisplayskip}{}%
+ {%
+ \AtBeginDocument{%
+ \abovedisplayskip=\ceabovedisplayskip
+ \abovedisplayshortskip=\ceabovedisplayskipshort
+ \belowdisplayskip=\cebelowdisplayskip
+ \belowdisplayshortskip=\cebelowdisplayskipshort
+ }
+ }%
+ {%
+ \AtBeginDocument{%
+ \abovedisplayskip=\globaldisplayskip
+ \abovedisplayshortskip=\globaldisplayskip
+ \belowdisplayskip=\globaldisplayskip
+ \belowdisplayshortskip=\globaldisplayskip
+ }
+ }%
+ }%
+}
+
+%====Patchs pas-tableur
+\if@pastableur
+
+\RequirePackage{pas-tableur}
+
+\renewcommand{\pastableur@grid}[4] % #1 : width, #2 : name, #3 : numline, #4 : coord.
+{%
+ \node[celempty,below,minimum height=\line@height,minimum width=#1] (cell#2-#3) at (#4) {};%
+ \draw[graySepCell] ($(cell#2-#3.south west)+(0.2pt,0)$) -- (cell#2-#3.south east) -- ($(cell#2-#3.north east)+(0,-0.2pt)$);%
+}
+
+\renewcommand{\pastab@draw@cell}[5]
+% #1 : \first@width, #2 : \first@name, #3 : 0=colonne1 / 1=autres colonnes /
+% 2 = ligne 1, #4 : coord., #5 : contenu
+{%
+ \ifnum#3=0%
+ \tikzstyle{cellstyle} = [celhead,minimum width={#1},minimum height=\line@height]%
+ \def\pastableur@coord{(0,0)}%
+ \else%
+ \ifnum#3=1%
+ \tikzstyle{cellstyle} = [celhead,right,minimum width={#1},minimum height=\line@height]%
+ \else
+ \ifnum#3=2%
+ \tikzstyle{cellstyle} = [below left,celhead,minimum width={#1},minimum height=\line@height]
+ \else%
+ \tikzstyle{cellstryle} = [below,celhead,minimum width={#1},minimum height=\line@height]
+ \fi%
+ \fi%
+ \def\pastableur@coord{(#4)}%
+ \fi%
+ \node[cellstyle] (#2) at \pastableur@coord {\helvbx#5};%
+ \fill[grayBottomCell] (#2.south west) rectangle (#2.north east) ;%
+ \fill[grayTopCell] (#2.north west) rectangle ($0.5*(#2.south east)+0.5*(#2.north east)$) ;%
+ \node[minimum width={#1},minimum height=\line@height,cellstyle] at \pastableur@coord {\helvbx#5};%
+}
+
+\NewDocumentCommand\celcouleur{ O{graySepCell!50} m }{%OK
+ \draw[draw=none,fill=#1] ($(cell#2.south west)+(0.2pt,0.2pt)$) rectangle ($(cell#2.north east) + (-0.2pt,-0.2pt)$) ;%
+}
+
+\defKV[celparam]{align=\def\pastableurfusalign{#1},width=\def\pastableurfuswidth{#1}}
+\setKVdefault[celparam]{align=left,width={\col@width}}
+
+\NewDocumentCommand\celfusion{ O{} m m m }{%OK
+ \restoreKV[celparam]%
+ \setKV[celparam]{#1}%
+ \IfStrEq{#4}{}%
+ {%
+ \draw[draw=none,fill=white] ($(cell#2.south west)+(0.2pt,0.2pt)$) rectangle ($(cell#3.north east) + (-0.2pt,-0.2pt)$);
+ }%
+ {%
+ \draw[draw=none,fill=white] ($(cell#2.south west)+(0.2pt,0.2pt)$) rectangle ($(cell#3.north east) + (-0.2pt,-0.2pt)$) node[midway,text width=\dimexpr\pastableurfuswidth-4pt,align=\pastableurfusalign] {#4};
+ }%
+}
+
+\NewDocumentCommand\celnumbreak{ m m m }{%
+ \def\numpointilles{#1}
+ \xdef\numavant{\inteval{\numpointilles-1}}%
+ \def\numdebut{#2}\def\numfin{#3}
+ \foreach \num@line [remember=\num@line as \lastnum (initially \numavant)] in {\numpointilles}
+ {%
+ \pastab@draw@cell{\numline@width}{numline\num@line}{3}{numline\lastnum.south east}{\dots}%
+ }%
+ \foreach \num@line [remember=\num@line as \lastnum (initially \numpointilles)] in {\numdebut,\numfin}
+ {%
+ \pastab@draw@cell{\numline@width}{numline\num@line}{3}{numline\lastnum.south east}{\num@line}%
+ }%
+}
+
+\NewDocumentCommand\lignetxt{ s O{} m D<>{1} m }{%3=num ligne,%5=liste
+ \IfBooleanTF{#1}%
+ {
+ \foreach \x [count=\i] in {#5}
+ {%
+ \xdef\j{\inteval{\i+(#4-1)}}%
+ \StrChar{ABCDEFGHIJKLMNOPQRSTUVWXYZ}{\j}[\iltr]%
+ \IfEq{\x}{}{}{\celtxt*[#2]{\iltr}{#3}{\x}}%
+ }%
+ }%
+ {%
+ \foreach \x [count=\i] in {#5}
+ {%
+ \xdef\j{\inteval{\i+(#4-1)}}%
+ \StrChar{ABCDEFGHIJKLMNOPQRSTUVWXYZ}{\j}[\iltr]%
+ \IfEq{\x}{}{}{\celtxt[#2]{\iltr}{#3}{\x}}%
+ }%
+ }%
+}
+
+\NewDocumentCommand\colonnetxt{ s O{} m D<>{1} m }{%3=lettre colonne,%5=liste
+ \IfBooleanTF{#1}%
+ {%
+ \foreach \x [count=\i] in {#5}
+ {%
+ \xdef\j{\inteval{\i+(#4-1)}}
+ \IfStrEq{\x}{}{}{\celtxt*[#2]{#3}{\j}{\x}}%
+ }%
+ }%
+ {%
+ \foreach \x [count=\i] in {#5}
+ {%
+ \xdef\j{\inteval{\i+(#4-1)}}
+ \IfStrEq{\x}{}{}{\celtxt[#2]{#3}{\j}{\x}}%
+ }%
+ }%
+}
+
+\fi
+
+%====BannerScore
+\definecolor{colorNS1}{RGB}{45,126,67}
+\definecolor{colorNS2}{RGB}{151,186,56}
+\definecolor{colorNS3}{RGB}{240,202,13}
+\definecolor{colorNS4}{RGB}{213,123,26}
+\definecolor{colorNS5}{RGB}{197,52,25}
+\tikzset{nodeNS/.style={pos=0.5,xscale=\echellexNS*\hauteurNS,yscale=\echelleyNS*\hauteurNS}}
+
+\defKV[NUTRISCOREEN]{%
+ Height=\pgfmathsetmacro{\hauteurNS}{#1},%
+ Ratio=\pgfmathsetmacro{\ratiolargeurbandeNS}{#1},%
+ Symbols=\def\lettresNS{#1},%
+ Legend=\def\legendeNS{#1},%
+ Font=\def\fonteNS{#1},%
+ Colors=\def\couleursNS{#1},%
+ ScaleSymbols=\def\echellesymbNS{#1},%
+ Colbg=\def\coulbgNS{#1}
+}
+\setKVdefault[NUTRISCOREEN]{%
+ Height=1,%
+ Ratio={0.6},%
+ Symbols={A,B,C,D,E},%
+ Legend={score},%
+ Font=\sffamily\bfseries,%
+ ShowLegend=true,%
+ Colors={colorNS1,colorNS2,colorNS3,colorNS4,colorNS5},%
+ ScaleSymbols={1.25,1.65},%
+ Colbg=white
+}
+
+\NewDocumentCommand\ScoreBanner{ O{} D<>{} m }{%
+ \restoreKV[NUTRISCOREEN]%
+ \setKV[NUTRISCOREEN]{#1}%
+ \IfEq{#3}{}%
+ {%
+ \xdef\numcasNS{0}%
+ }%
+ {%
+ \xdef\numcasNS{#3}%
+ }%
+ \readlist\letterListNS{\lettresNS}%
+ \xdef\nbcasesNS{\letterListNSlen}%
+ \readlist\colorListNS{\couleursNS}%
+ \xdef\nbcouleursNS{\colorListNSlen}%
+ \pgfmathsetmacro{\largeurcaseNS}{\hauteurNS*\ratiolargeurbandeNS}%
+ \pgfmathsetmacro{\largeurbandeNS}{\largeurcaseNS*\nbcasesNS}%
+ \pgfmathsetmacro{\margeNS}{0.225*\largeurcaseNS/2.4}%
+ \IfSubStr{\echellesymbNS}{,}%
+ {%
+ \StrCut{\echellesymbNS}{,}{\echellexNS}{\echelleyNS}%
+ }%
+ {%
+ \xdef\echellexNS{\echellesymbNS}\xdef\echelleyNS{\echellesymbNS}%
+ }%
+ \begin{tikzpicture}[font=\fonteNS,#2]
+ %---test
+ \filldraw[white,rounded corners=\fpeval{5*\largeurcaseNS*\ratiolargeurbandeNS}mm,line width=\fpeval{1.5*\largeurcaseNS*\ratiolargeurbandeNS}mm,opacity=0] ({-\margeNS},{-\margeNS}) rectangle++ (\nbcasesNS*\largeurcaseNS+2*\margeNS,\hauteurNS+2*\margeNS) ;
+ %---testfin
+ \begin{scope}
+ \clip[rounded corners=\fpeval{5*\largeurcaseNS*\ratiolargeurbandeNS}mm] (0,0) rectangle (\largeurbandeNS,\hauteurNS);
+ \foreach \iii in {1,...,\letterListNSlen}{%
+ \ifnum\iii=\numcasNS
+ \else
+ \ifnum\iii>\nbcouleursNS
+ \fill[draw=none,lightgray] ({(\iii-1)*\largeurcaseNS},0) rectangle ++(\largeurcaseNS,\hauteurNS) node[noeudNS,white,opacity=0.66]{\letterListNS[\iii]};
+ \else
+ \fill[draw=none,{\colorListNS[\iii]}] ({(\iii-1)*\largeurcaseNS},0) rectangle ++(\largeurcaseNS,\hauteurNS) node[noeudNS,white,opacity=0.66]{\letterListNS[\iii]};
+ \fi
+ \fi
+ }%
+ \end{scope}
+ \xintifboolexpr{\numcasNS >=1 'and' \numcasNS <= \nbcasesNS }%
+ {%
+ \begin{scope}
+ %\clip (-\margeNS,-\margeNS) rectangle++ (\largeurbandeNS+2*\margeNS,\hauteurNS+2*\margeNS);
+ \draw[draw=\coulbgNS,rounded corners=\fpeval{7.25*\largeurcaseNS*\ratiolargeurbandeNS}mm,line width=\fpeval{1.5*\largeurcaseNS*\ratiolargeurbandeNS}mm,fill={\colorListNS[#3]}] ({(\numcasNS-1)*\largeurcaseNS-\margeNS},{-\margeNS}) rectangle++ (\largeurcaseNS+2*\margeNS,\hauteurNS+2*\margeNS) node[noeudNS,white]{\letterListNS[#3]};
+ \end{scope}
+ }%
+ {}%
+ %légende
+ \ifboolKV[NUTRISCOREEN]{ShowLegend}%
+ {%
+ \node[above right=1pt,gray,scale=\fpeval{0.5*\hauteurNS},inner sep=1pt] at ({0.125*\margeNS},1.02*\hauteurNS) {\MakeUppercase{\legendeNS}};
+ }{}%
+ \end{tikzpicture}%
+}
+
+%====vincludegraphics [fr]
+\newlength{\tmp@includegraphics@vfill@offset}
+
+\defKV[vfillincludegphcs]{vOffset=\setlength\tmp@includegraphics@vfill@offset{#1},vCentrer=\def\tmpincludegpvcenter{#1}}
+\setKVdefault[vfillincludegphcs]{vRemplir=false,vOffset=0pt,vCentrer=n}
+
+\NewDocumentCommand\InsererImage{ D<>{} O{} m }{%
+ \restoreKV[vfillincludegphcs]%
+ \setKV[vfillincludegphcs]{#1}%
+ \ifboolKV[vfillincludegphcs]{vRemplir}%
+ {%
+ \IfStrEqCase{\tmpincludegpvcenter}{%
+ {m}{\vfill\includegraphics[height=\dimexpr\pagegoal-\pagetotal-\tmp@includegraphics@vfill@offset\relax,#2]{#3}\vfill}%
+ {h}{\includegraphics[height=\dimexpr\pagegoal-\pagetotal-\tmp@includegraphics@vfill@offset\relax,#2]{#3}\vfill}%
+ {b}{\vfill\includegraphics[height=\dimexpr\pagegoal-\pagetotal-\tmp@includegraphics@vfill@offset\relax,#2]{#3}}%
+ {n}{\includegraphics[height=\dimexpr\pagegoal-\pagetotal-\tmp@includegraphics@vfill@offset\relax,#2]{#3}}%
+ }[{\includegraphics[height=\dimexpr\pagegoal-\pagetotal-\tmp@includegraphics@vfill@offset\relax,#2]{#3}}]%
+ }%
+ {%
+ \includegraphics[#2]{#3}%
+ }%
+}
+
+%===tkzBanner mixte
+\defKV[tkzBannerKeys]{%
+ maincolor=\def\tkzBannermaincol{#1}
+}
+
+\setKVdefault[tkzBannerKeys]{%
+ height=2.1cm,%
+ width=\linewidth,%
+ collight=teal!25,%
+ colmedium=teal!75,%
+ coldark=teal,%
+ coltxt=white,%
+ fonttxt=\sffamily\bfseries,%
+ swap=false,%
+ maincolor={},%
+ num=true
+}
+
+\NewDocumentCommand\tkzBanner{ O{} m m }{%
+ \noindent%
+ \restoreKV[tkzBannerKeys]%
+ \setKV[tkzBannerKeys]{#1}%
+ \pgfmathsetmacro{\tkzBannerscale}{\useKV[tkzBannerKeys]{width}/\linewidth}%
+ \begin{tikzpicture}
+ \IfEq{\tkzBannermaincol}{}%
+ {%
+ \tikzset{tkzbannerdark/.style={\useKV[tkzBannerKeys]{coldark}}}
+ \tikzset{tkzbannermedium/.style={\useKV[tkzBannerKeys]{colmedium}}}
+ \tikzset{tkzbannerlight/.style={\useKV[tkzBannerKeys]{collight}}}
+ }%
+ {%
+ \tikzset{tkzbannerdark/.style={\tkzBannermaincol}}
+ \tikzset{tkzbannermedium/.style={\tkzBannermaincol!75}}
+ \tikzset{tkzbannerlight/.style={\tkzBannermaincol!25}}
+ }%
+ %coordinates
+ \coordinate (tkzBanner-NW) at (0,{\useKV[tkzBannerKeys]{height}}) ;
+ \coordinate (tkzBanner-SW) at (0,0) ;
+ \coordinate (tkzBanner-NE) at ({\useKV[tkzBannerKeys]{width}},{\useKV[tkzBannerKeys]{height}}) ;
+ \coordinate (tkzBanner-SE) at ({\useKV[tkzBannerKeys]{width}},0) ;%
+ %swap or note
+ \ifboolKV[tkzBannerKeys]{swap}%
+ {%
+ \coordinate (tkzBanner-A) at ($(tkzBanner-SE)!0.57!(tkzBanner-SW)$) ;
+ \coordinate (tkzBanner-B) at ($(tkzBanner-NE)!0.91!(tkzBanner-NW)$) ;
+ \coordinate (tkzBanner-C) at ($(tkzBanner-NE)!0.92!(tkzBanner-NW)$) ;
+ \coordinate (tkzBanner-D) at ($(tkzBanner-SE)!0.63!(tkzBanner-SW)$) ;
+ }%
+ {%
+ \coordinate (tkzBanner-A) at ($(tkzBanner-SW)!0.57!(tkzBanner-SE)$) ;
+ \coordinate (tkzBanner-B) at ($(tkzBanner-NW)!0.91!(tkzBanner-NE)$) ;
+ \coordinate (tkzBanner-C) at ($(tkzBanner-NW)!0.92!(tkzBanner-NE)$) ;
+ \coordinate (tkzBanner-D) at ($(tkzBanner-SW)!0.63!(tkzBanner-SE)$) ;
+ }%
+ %drawing
+ \fill[tkzbannerdark] (0,0) rectangle ({\useKV[tkzBannerKeys]{width}},{\useKV[tkzBannerKeys]{height}});
+ \ifboolKV[tkzBannerKeys]{swap}%
+ {%
+ \fill[tkzbannerlight] (tkzBanner-A) to[bend left=8] (tkzBanner-B) -- (tkzBanner-C) to[bend right=7] (tkzBanner-D) -- cycle ;
+ \fill[tkzbannermedium] (tkzBanner-C) to[bend right=7] (tkzBanner-D) -- (tkzBanner-SW) |- cycle ;
+ }%
+ {%
+ \fill[tkzbannerlight] (tkzBanner-A) to[bend right=8] (tkzBanner-B) -- (tkzBanner-C) to[bend left=7] (tkzBanner-D) -- cycle ;
+ \fill[tkzbannermedium] (tkzBanner-C) to[bend left=7] (tkzBanner-D) -- (tkzBanner-SE) |- cycle ;
+ }%
+ %nodes
+ \ifboolKV[tkzBannerKeys]{swap}%
+ {%
+ \node[inner sep=2pt,text={\useKV[tkzBannerKeys]{coltxt}},below left,font={\useKV[tkzBannerKeys]{fonttxt}},scale={2*\tkzBannerscale}] at (tkzBanner-NE) {\vphantom{qÉ}#2};
+ \ifboolKV[tkzBannerKeys]{num}%
+ {%
+ \node[inner sep=2pt,text={\useKV[tkzBannerKeys]{coltxt}},above right,font={\useKV[tkzBannerKeys]{fonttxt}},scale={1.25*\tkzBannerscale}] at (tkzBanner-SW) {\vphantom{qÉ}#3};
+ }%
+ {}%
+ }%
+ {%
+ \ifboolKV[tkzBannerKeys]{num}%
+ {%
+ \node[inner sep=2pt,text={\useKV[tkzBannerKeys]{coltxt}},above left,font={\useKV[tkzBannerKeys]{fonttxt}},scale={1.25*\tkzBannerscale}] at (tkzBanner-SE) {\vphantom{qÉ}#3};
+ }%
+ {}%
+ \node[inner sep=2pt,text={\useKV[tkzBannerKeys]{coltxt}},below right,font={\useKV[tkzBannerKeys]{fonttxt}},scale={2*\tkzBannerscale}] at (tkzBanner-NW) {\vphantom{qÉ}#2};
+ }%
+ \end{tikzpicture}%
+}
+
+%====titre stylisé [fr], à voir avec part ??
+\newlength{\tmp@tkzbanner@autowidthtype}
+\setlength\tmp@tkzbanner@autowidthtype{2.5em}
+\newlength{\tmp@tkzbanner@autowidthnum}
+\setlength\tmp@tkzbanner@autowidthnum{2em}
+\newlength{\tmp@tkzbanner@marginoffsetbanner}
+\setlength\tmp@tkzbanner@marginoffsetbanner{2pt}
+\newlength{\tmp@tkzbanner@autowidth}
+\setlength\tmp@tkzbanner@autowidth{2.5em}
+
+\defKV[tkzBannerpartKeys]{%
+ maincolor=\def\tkzBannermaintricol{#1},%
+ logo=\def\tkzBannermaintrilogo{#1},%
+ type=\def\tkzBannermaintritype{#1},%
+ blockwidth=\def\tkzBannermaintriblockwidth{#1},%
+ customtype=\def\tkzBannermaintritypelibre{#1}
+}
+
+\setKVdefault[tkzBannerpartKeys]{%
+ height=2.5em,%
+ width={\linewidth-0.5pt},%
+ blockwidth=2.75em,%
+ collight=darkgray!25,%
+ colmedium=darkgray!50,%
+ coldark=darkgray,%
+ coltxt=white,%
+ fonttxt=\sffamily\bfseries,%
+ swap=false,%
+ maincolor={},%
+ logo={},%
+ type={},%
+ num=true,
+ dispblock=true,%
+ customtype={}
+}
+
+\NewDocumentCommand\tkzBannerTri{ O{} m m }{%
+ %#1 := clés
+ %#2 := numéro
+ %#3 := titre
+ \noindent%
+ \restoreKV[tkzBannerpartKeys]%
+ \setKV[tkzBannerpartKeys]{#1}%
+ \pgfmathsetmacro{\tkzBannertriscale}{0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}%
+ \pgfmathsetmacro{\scaletypedoctribanner}{1.05*0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}%
+ \pgfmathsetmacro{\scaletypedoctribannernum}{2.5*0.75*(\useKV[tkzBannerpartKeys]{height})/1.25cm}%
+ \pgfmathsetmacro{\tkzBannertriangle}{0.10*(\useKV[tkzBannerpartKeys]{height})/(\useKV[tkzBannerpartKeys]{width})}%
+ \IfEq{\tkzBannermaintriblockwidth}{auto}%
+ {%
+ \settowidth{\tmp@tkzbanner@autowidthtype}{\scalebox{\scaletypedoctribanner}[\scaletypedoctribanner]{\sffamily\bfseries\vphantom{qÉ}\tkzBannermaintritype}}%
+ \addtolength{\tmp@tkzbanner@autowidthtype}{4pt}%
+ \settowidth{\tmp@tkzbanner@autowidthnum}{\scalebox{\scaletypedoctribannernum}[\scaletypedoctribannernum]{\sffamily\bfseries\vphantom{qÉ}00}}%
+ \addtolength{\tmp@tkzbanner@autowidthnum}{4pt}%
+ \pgfmathsetlength{\tmp@tkzbanner@autowidth}{max(\tmp@tkzbanner@autowidthtype,\tmp@tkzbanner@autowidthnum)}%
+ }%
+ {%
+ \setlength\tmp@tkzbanner@autowidth{\tkzBannermaintriblockwidth}%
+ }%
+ \begin{tikzpicture}
+ \IfEq{\tkzBannermaintricol}{}%
+ {%
+ \tikzset{tkzbannertridark/.style={\useKV[tkzBannerpartKeys]{coldark}}}
+ \tikzset{tkzbannertrimedium/.style={\useKV[tkzBannerpartKeys]{colmedium}}}
+ \tikzset{tkzbannertrilight/.style={\useKV[tkzBannerpartKeys]{collight}}}
+ }%
+ {%
+ \tikzset{tkzbannertridark/.style={\tkzBannermaintricol}}
+ \tikzset{tkzbannertrimedium/.style={\tkzBannermaintricol!50}}
+ \tikzset{tkzbannertrilight/.style={\tkzBannermaintricol!25}}
+ }%
+ %coordinates
+ \coordinate (tkzBannerTri-NW) at (0,{\useKV[tkzBannerpartKeys]{height}}) ;
+ \coordinate (tkzBannerTri-SW) at (0,0) ;
+ \coordinate (tkzBannerTri-NE) at ({\useKV[tkzBannerpartKeys]{width}},{\useKV[tkzBannerpartKeys]{height}}) ;
+ \coordinate (tkzBannerTri-SE) at ({\useKV[tkzBannerpartKeys]{width}},0) ;%
+ \coordinate (tkzBannerTri-SWd) at ($(tkzBannerTri-SW)!0.05!(tkzBannerTri-NW)$) ;%
+ \coordinate (tkzBannerTri-SEd) at ($(tkzBannerTri-SE)!0.15!(tkzBannerTri-NE)$) ;%
+ %drawing & shadow
+ \fill[lightgray!75] ([yshift=-1pt]tkzBannerTri-SWd) -- ([yshift=-1pt]tkzBannerTri-SEd) -- (tkzBannerTri-NE) -| cycle ;
+ \ifboolKV[tkzBannerpartKeys]{swap}%
+ {%
+ \fill[white] (tkzBannerTri-SWd) -- (tkzBannerTri-SEd) -- (tkzBannerTri-NE) -| cycle ;
+ \draw[line width=1pt,tkzbannertridark] ([shift={(0.5pt,-0.5pt)}]tkzBannerTri-NW) -| ([shift={(-0.5pt,0)}]tkzBannerTri-SEd) -- (tkzBannerTri-SWd) ;
+ }%
+ {%
+ \fill[tkzbannertrimedium] (tkzBannerTri-SWd) -- (tkzBannerTri-SEd) -- (tkzBannerTri-NE) -| cycle ;
+ }%
+ \ifboolKV[tkzBannerpartKeys]{dispblock}%
+ {%
+ \begin{scope}
+ \clip ($(tkzBannerTri-SW)!0.0375!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.1375!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ;
+ %light
+ \fill[tkzbannertrilight] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ;
+ \end{scope}
+ \begin{scope}
+ \clip ($(tkzBannerTri-SW)!0.025!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.125!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ;
+ %medium
+ \fill[tkzbannertrimedium] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth+\tmp@tkzbanner@marginoffsetbanner},0) -- (tkzBannerTri-SW) -- cycle ;
+ \end{scope}
+ \begin{scope}
+ \clip ($(tkzBannerTri-SW)!0.0125!(tkzBannerTri-NW)$) -- ($(tkzBannerTri-SE)!0.1125!(tkzBannerTri-NE)$) -- (tkzBannerTri-NE) -| cycle ;
+ %dark
+ \fill[tkzbannertridark] (tkzBannerTri-NW) --++ ({\tmp@tkzbanner@autowidth},0) -- ({\tmp@tkzbanner@autowidth+1em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) -- ({\tmp@tkzbanner@autowidth},0) -- (tkzBannerTri-SW) -- cycle ;
+ \IfEq{\tkzBannermaintritypelibre}{}%
+ {%
+ \ifboolKV[tkzBannerpartKeys]{num}%
+ {%
+ \IfEq{\tkzBannermaintritype}{}%
+ {%
+ \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#2};
+ }%
+ {%
+ \node[inner sep=2pt,below=1pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={1.05*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{\useKV[tkzBannerpartKeys]{height}}) {\vphantom{qÉ}\tkzBannermaintritype};
+ \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.425*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#2};
+ }%
+ }%
+ {}%
+ }%
+ {%
+ \node[inner sep=2pt,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({0.5*\tmp@tkzbanner@autowidth},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintritypelibre};
+ }%
+ \end{scope}
+ }%
+ {}%
+ %nodes
+ \begin{scope}
+ \clip (tkzBannerTri-SWd) -- (tkzBannerTri-SEd) -- (tkzBannerTri-NE) -| cycle ;
+ \ifboolKV[tkzBannerpartKeys]{swap}%
+ {%
+ \node[inner sep=2pt,right,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#3};
+ %logo
+ \IfEq{\tkzBannermaintrilogo}{}%
+ {}%
+ {%
+ \node[inner sep=2pt,left,text=\tkzBannermaintricol,font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintrilogo};
+ }%
+ }%
+ {%
+ \node[inner sep=2pt,right,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.75*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\tmp@tkzbanner@autowidth+2*\tmp@tkzbanner@marginoffsetbanner+1.25em},{0.5*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}#3};
+ %logo
+ \IfEq{\tkzBannermaintrilogo}{}%
+ {}%
+ {%
+ \node[inner sep=2pt,left,text={\useKV[tkzBannerpartKeys]{coltxt}},font={\useKV[tkzBannerpartKeys]{fonttxt}},scale={2.5*\tkzBannertriscale},rotate={atan(\tkzBannertriangle)}] at ({\useKV[tkzBannerpartKeys]{width}},{0.55*(\useKV[tkzBannerpartKeys]{height})}) {\vphantom{qÉ}\tkzBannermaintrilogo};
+ }%
+ }%
+ \end{scope}
+ \end{tikzpicture}%
+}
+
+%====grille automatique tikz ?
+\NewDocumentCommand\tkzGrilleAuto{ s O{thin,lightgray} m }{%
+ \IfBooleanT{#1}{\filldraw (0,0) circle[radius=2pt] ;}
+ \StrCut{#3}{§}{\tkzautogridx}{\tkzautogridy}%
+ \draw[xstep=\tkzautogridx,ystep=\tkzautogridy,#2] (current bounding box.south west) grid (current bounding box.north east) ;
+}
+\NewDocumentCommand\tkzAutoGrid{ s O{thin,lightgray} m }{%
+ \IfBooleanT{#1}{\filldraw (0,0) circle[radius=2pt] ;}
+ \StrCut{#3}{§}{\tkzautogridx}{\tkzautogridy}%
+ \draw[xstep=\tkzautogridx,ystep=\tkzautogridy,#2] (current bounding box.south west) grid (current bounding box.north east) ;
+}
+
+\tikzset{grilleauto/.store in=\tkzautogrid,grilleauto/.default={},grilleauto={}}
+\tikzset{autogrid/.store in=\tkzautogrid,autogrid/.default={},autogrid={}}
+
+\NewDocumentCommand\tkzAutoGridActivate{ s }{%
+ \@ifundefined{tkzautogrid}%
+ {}%
+ {%
+ \tikzset{every picture/.style={%
+ execute at end picture={%
+ \IfEq{\tkzautogrid}{}{}{\IfBooleanTF{#1}{\tkzGrilleAuto*{\tkzautogrid}}{\tkzGrilleAuto{\tkzautogrid}}}%
+ },
+ },
+ }%
+ }%
+}
+
+\NewDocumentCommand\tkzAutoGridLocal{ s }{%
+ \@ifundefined{tkzautogrid}%
+ {}%
+ {%
+ \tikzset{execute at end picture={%
+ \IfEq{\tkzautogrid}{}{}{\IfBooleanTF{#1}{\tkzGrilleAuto*{\tkzautogrid}}{\tkzGrilleAuto{\tkzautogrid}}}%
+ },
+ },
+ }%
+}
+
+%====FLÈCHE ÉVASÉE [FR]
+\usetikzlibrary{arrows,arrows.meta}
+
+\defKV[FlecheEvasee]{%
+ Couleur=\def\FlecheEvaseeCouleur{#1},%
+ TailleFleche=\def\FlecheEvaseeFleche{#1},%
+ Direction=\def\FlecheEvaseeDirectionAngle{#1},%
+ Coeff=\def\FlecheEvaseeCoeff{#1},%
+ TypeFleche=\def\FlecheEvaseeType{#1},%
+ Epaisseur=\def\FlecheEvaseeEpaisseur{#1},%
+ LineCap=\def\FlecheEvaseeLineCap{#1}
+}
+\setKVdefault[FlecheEvasee]{%
+ Couleur=black,%
+ TailleFleche=auto,%
+ Direction={},%
+ Coeff=4,%
+ TypeFleche=Latex,%
+ Deplacement=false,%
+ Epaisseur=0.5mm,%
+ LineCap=butt
+}
+
+\NewDocumentCommand\tkzFlecheEvasee{ O{} m m }{%1=options,2=début,3=fin
+ \restoreKV[FlecheEvasee]%
+ \setKV[FlecheEvasee]{#1}%
+ \begin{scope}[line width=0.05mm]
+ \IfStrEq{\FlecheEvaseeFleche}{auto}%
+ {%
+ \xdef\FlecheEvaseeH{2*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ \xdef\FlecheEvaseeW{2.1*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeFleche}{/}{\FlecheEvaseeH}{\FlecheEvaseeW}%
+ }%
+ \IfEq{\FlecheEvaseeDirectionAngle}{}%
+ {%
+ \xdef\FlecheEvaseeDirection{}\xdef\FlecheEvaseeAngle{0}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeDirectionAngle}{/}{\FlecheEvaseeDirection}{\FlecheEvaseeAngle}%
+ }%
+ %coordonnées
+ \coordinate (TMPDEPART) at (#2) ;
+ \ifboolKV[FlecheEvasee]{Deplacement}%
+ {%
+ \coordinate (TMPARRIVEE) at ($(TMPDEPART)+(#3)$) ;
+ }%
+ {%
+ \coordinate (TMPARRIVEE) at (#3) ;
+ }
+ \pgfmathanglebetweenpoints{\pgfpointanchor{TMPDEPART}{center}}{\pgfpointanchor{TMPARRIVEE}{center}}%
+ \edef\tmpangle{\pgfmathresult}%
+ %nœuds
+ \IfEq{\FlecheEvaseeDirection}{right}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend right=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend left=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{left}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend left=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend right=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{}%
+ {%
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{-0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDG) to (TMPFG) -- (TMPFD) to (TMPDD) --cycle ;
+ }%
+ {}%
+ \end{scope}
+}
+
+%====FLÈCHE ÉVASÉE [EN]
+\defKV[flaredarrow]{%
+ color=\def\FlecheEvaseeCouleur{#1},%
+ arrowsize=\def\FlecheEvaseeFleche{#1},%
+ bend=\def\FlecheEvaseeDirectionAngle{#1},%
+ factor=\def\FlecheEvaseeCoeff{#1},%
+ arrowstyle=\def\FlecheEvaseeType{#1},%
+ thickness=\def\FlecheEvaseeEpaisseur{#1},%
+ linecap=\def\FlecheEvaseeLineCap{#1}
+}
+\setKVdefault[flaredarrow]{%
+ color=black,%
+ arrowsize=auto,%
+ bend={},%
+ factor=4,%
+ arrowstyle=Latex,%
+ move=false,%
+ thickness=0.5mm,%
+ linecap=butt
+}
+
+\NewDocumentCommand\tkzFlaredArrow{ O{} m m }{%1=options,2=début,3=fin
+ \restoreKV[flaredarrow]%
+ \setKV[flaredarrow]{#1}%
+ \begin{scope}[line width=0.05mm]
+ \IfStrEq{\FlecheEvaseeFleche}{auto}%
+ {%
+ \xdef\FlecheEvaseeH{2*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ \xdef\FlecheEvaseeW{2.1*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeFleche}{/}{\FlecheEvaseeH}{\FlecheEvaseeW}%
+ }%
+ \IfEq{\FlecheEvaseeDirectionAngle}{}%
+ {%
+ \xdef\FlecheEvaseeDirection{}\xdef\FlecheEvaseeAngle{0}%
+ }%
+ {%
+ \StrCut{\FlecheEvaseeDirectionAngle}{/}{\FlecheEvaseeDirection}{\FlecheEvaseeAngle}%
+ }%
+ %coordonnées
+ \coordinate (TMPDEPART) at (#2) ;
+ \ifboolKV[flaredarrow]{move}%
+ {%
+ \coordinate (TMPARRIVEE) at ($(TMPDEPART)+(#3)$) ;
+ }%
+ {%
+ \coordinate (TMPARRIVEE) at (#3) ;
+ }
+ \pgfmathanglebetweenpoints{\pgfpointanchor{TMPDEPART}{center}}{\pgfpointanchor{TMPARRIVEE}{center}}%
+ \edef\tmpangle{\pgfmathresult}%
+ %nœuds
+ \IfEq{\FlecheEvaseeDirection}{right}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({\FlecheEvaseeAngle+\tmpangle+180}:\FlecheEvaseeH)+({\FlecheEvaseeAngle+\tmpangle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend right=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend left=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{left}%
+ {%
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle+\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle+90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({180+\tmpangle-\FlecheEvaseeAngle-90}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDD) to[bend left=\FlecheEvaseeAngle] (TMPFG) -- (TMPFD) to[bend right=\FlecheEvaseeAngle] (TMPDG) --cycle ;
+ }%
+ {}%
+ \IfEq{\FlecheEvaseeDirection}{}%
+ {%
+ \coordinate (TMPF) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)$) ;
+ \coordinate (TMPDG) at ([shift={({90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \coordinate (TMPFG) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{-0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPFD) at ($(TMPARRIVEE)+({180+\tmpangle-\FlecheEvaseeAngle}:\FlecheEvaseeH)+({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeCoeff*\FlecheEvaseeEpaisseur})$) ;
+ \coordinate (TMPDD) at ([shift={({-90+\tmpangle-\FlecheEvaseeAngle}:{0.5*\FlecheEvaseeEpaisseur})}]TMPDEPART) ;
+ \IfStrEq{\FlecheEvaseeType}{Stealth}%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length={1.5*\FlecheEvaseeH},width={1.1*\FlecheEvaseeW}]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ {%
+ \draw[\FlecheEvaseeCouleur,->,-{\FlecheEvaseeType[length=\FlecheEvaseeH,width=\FlecheEvaseeW]}] (TMPF)--(TMPARRIVEE) ;
+ }%
+ \filldraw[line cap=\FlecheEvaseeLineCap,\FlecheEvaseeCouleur] (TMPDG) to (TMPFG) -- (TMPFD) to (TMPDD) --cycle ;
+ }%
+ {}%
+ \end{scope}
+}
+
+%====PANO AUTOROUTE
+\newlength{\PanoTorouteStretch}
+\newlength{\PanoTorouteOffsetArrow}
+
+\defKV[PanoAutoroute]{%
+ Fleches=\def\PanoTorouteArrow{#1},%
+ CouleurFond=\def\PanoTorouteCoul{#1},%
+ CouleurTitre=\def\PanoTorouteCoulTitre{#1},%
+ Police=\def\PanoTorouteFonte{#1},%
+ PoliceCartouche=\def\PanoTorouteFonteTitre{#1},%
+ TypeFleche=\def\PanoTorouteStyleArrow{#1},%
+ EspacementV=\setlength{\PanoTorouteStretch}{#1},%
+ OffsetFleches=\setlength{\PanoTorouteOffsetArrow}{#1}
+}
+
+\setKVdefault[PanoAutoroute]{%
+ Fleches=0,%
+ CouleurFond=blue,%
+ CouleurTitre=red,%
+ Largeur=10cm,%
+ Police=\LARGE\bfseries\sffamily,%
+ PoliceCartouche=\Large\bfseries\sffamily,%
+ TypeFleche={\scalebox{1.33}[1.25]{\faArrowDown}},%
+ EspacementV={2.5mm},%
+ OffsetFleches={5mm},%
+ Dernier=true
+}
+
+\NewDocumentEnvironment{PanneauAutoroute}{ O{} D<>{} m }%
+{%
+ \restoreKV[PanoAutoroute]%
+ \setKV[PanoAutoroute]{#1}
+ \IfEq{#3}{}%
+ {%
+ \tcolorbox[enhanced,width={\useKV[PanoAutoroute]{Largeur}},fontupper=\PanoTorouteFonte,colback=\PanoTorouteCoul,colframe=\PanoTorouteCoul!5!white,coltext=white,sharp corners,boxsep=1mm,left=1mm,right=1mm,top=1mm,bottom=1mm,#2]
+ }%
+ {%
+ \tcolorbox[enhanced,width={\useKV[PanoAutoroute]{Largeur}},fontupper=\PanoTorouteFonte,colback=\PanoTorouteCoul,colframe=\PanoTorouteCoul!5!white,coltext=white,sharp corners,boxsep=1mm,left=1mm,right=1mm,top=1mm,bottom=1mm,attach boxed title to top center,fonttitle=\PanoTorouteFonteTitre,coltitle=white,boxed title style={colback=\PanoTorouteCoulTitre,size=small,sharp corners,left=0mm,right=0mm,colframe=\PanoTorouteCoulTitre!5!white},title={#3},#2]
+ }%
+ \baselineskip=-1000pt\lineskip=\PanoTorouteStretch\lineskiplimit=\maxdimen%
+}%
+{%
+ \ifnum\PanoTorouteArrow>0
+
+ \medskip
+ \hspace*{\PanoTorouteOffsetArrow}\foreach \i in {1,...,\PanoTorouteArrow}{\hfill\PanoTorouteStyleArrow}\hfill\hspace*{\PanoTorouteOffsetArrow}
+ \fi%
+ \endtcolorbox%
+ %
+ \ifboolKV[PanoAutoroute]{Dernier}{}{\vspace*{\dimexpr-\baselineskip-0.5mm\relax}}%
+}
+
+\NewDocumentCommand\VilleDist{ s m m }{%
+ \IfBooleanTF{#1}%
+ {%
+ #2\hfill~#3
+ }%
+ {%
+ #2\hfill~#3\\
+ }%
+}
+
+%====PANOSOLDES
+\newlength{\tmphautbannsold}
+\newlength{\tmphautbannsoldextra}
+\newlength{\tmplargbannsold}
+\newlength{\tmplargasold}
+\newlength{\tmplargbsold}
+\newlength{\tmplargtotsold}
+\newlength{\tmpoffsetbannsold}
+\newlength{\tmphautlignesol}
+\newlength{\tmphautsoles}
+
+\def\labelancienprix{Ancien Prix~:~}
+\def\labelnouveauprix{Nouveau Prix~:~}
+\def\labelreduction{SOLDES~:~}
+
+\defKV[PanoSoldes]{%
+ Couleur=\def\panosoldescolor{#1},%
+ Largeur=\def\panosoldeswidth{#1},%
+ PoliceEntete=\def\panosoldesfonthaut{#1},%
+ PolicePrix=\def\panosoldesfontprix{#1},%
+ PoliceReduc=\def\panosoldesfontreduc{#1},%
+ OffsetReduc=\setlength{\tmpoffsetbannsold}{#1},%
+ Titre=\def\panosoldestitre{#1},%
+ AgrandirReduc=\setlength{\tmphautbannsoldextra}{#1}
+}
+
+\setKVdefault[PanoSoldes]{%
+ Couleur=gray,
+ Largeur=auto,
+ PoliceEntete=\large\bfseries,%
+ PolicePrix=\footnotesize,%
+ PoliceReduc=\large\bfseries,%
+ Titre=GRANDE DÉMARQUE,%
+ OffsetReduc=1.25cm,%
+ AgrandirReduc=0mm
+}
+
+\NewDocumentCommand\AfficheSoldes{ O{} m m m }{%
+ \restoreKV[PanoSoldes]%
+ \setKV[PanoSoldes]{#1}%
+ %calcul de la largeur
+ \IfEq{\panosoldeswidth}{auto}%
+ {%
+ \settowidth{\tmplargbannsold}{{\panosoldesfontreduc\labelreduction-999X}}%largeur avec un peu de marge dûe à la rotation
+ \settowidth{\tmplargasold}{{\panosoldesfontprix\labelancienprix99999X}}%largeur avec un peu de marge dûe au prix "élastique"
+ \settowidth{\tmplargbsold}{{\panosoldesfontprix\labelnouveauprix99999X}}%largeur avec un peu de marge dûe au prix "élastique"
+ \pgfmathsetlength{\tmplargtotsold}{max(\tmplargbannsold,\tmplargasold,\tmplargbsold)+1mm}%on rajoute encore un peu de marge pour être sûr
+ }%
+ {%
+ \setlength{\tmplargtotsold}{\panosoldeswidth}%
+ }%
+ %calcul de la hauteur
+ \settototalheight{\tmphautlignesol}{\panosoldesfontprix\labelancienprix\labelnouveauprix0,123456789X}%
+ \settototalheight{\tmphautbannsold}{\panosoldesfontreduc\labelreduction-0,123456789X}%
+ \addtolength{\tmphautbannsold}{6mm+\tmphautbannsoldextra}%
+ \setlength{\tmphautsoles}{2\tmphautlignesol}%
+ \addtolength{\tmphautsoles}{\tmpoffsetbannsold+2mm}%
+ \addtolength{\tmphautsoles}{\tmphautbannsold}%
+ %boîte
+ \tcolorbox[%
+ enhanced,nobeforeafter,width=\tmplargtotsold,text height=\tmphautsoles,boxrule=0.5mm,boxsep=0.5mm,title={\panosoldestitre},halign title=flush center,colframe=\panosoldescolor,colback=white,top=1.25mm,bottom=1.25mm,left=1.25mm,right=1.25mm,fonttitle=\panosoldesfonthaut,%
+ overlay={%
+ \begin{tcbclipframe}
+ \draw ([shift={(1.25mm,-2mm)}]interior.north west) node[anchor=north west,font=\panosoldesfontprix,inner sep=0pt] {Ancien prix : {#2}} ;
+ \draw ([shift={(-1.25mm,2.5mm)}]interior.south east) node[anchor=south east,left,font=\panosoldesfontprix,inner sep=0pt] {Nouveau prix : {#3}} ;
+ %bannière (cf Séb Lozano)
+ \fill[line cap=rect,\panosoldescolor] ([shift={(0,2.5mm+\tmphautlignesol)}]interior.south west)--([shift={(0,2.5mm+\tmphautlignesol+\tmpoffsetbannsold)}]interior.south east)--++(0,\tmphautbannsold)--([shift={(0,2.5mm+\tmphautlignesol+\tmphautbannsold)}]interior.south west) ;
+ %petit filet
+ \draw[white,semithick] ([shift={(0,2.5mm+\tmphautlignesol+1pt)}]interior.south west)--([shift={(0,2.5mm+\tmphautlignesol+\tmpoffsetbannsold+1pt)}]interior.south east)--++(0,\tmphautbannsold-2pt)--([shift={(0,2.5mm+\tmphautlignesol+\tmphautbannsold-1pt)}]interior.south west)--cycle ;
+ %label
+ \draw[draw=none] ([shift={(0,2.5mm+\tmphautlignesol+0.5\tmphautbannsold)}]interior.south west) -- ([shift={(0,2.5mm+\tmphautlignesol+\tmpoffsetbannsold+0.5\tmphautbannsold)}]interior.south east) node[midway,sloped,font=\panosoldesfontreduc,text=white] {SOLDES : {#4}} ;
+ \end{tcbclipframe}%
+ }%
+ ]%
+ \endtcolorbox%
+}
\endinput \ No newline at end of file