diff options
Diffstat (limited to 'macros/latex/contrib/customenvs/tex/customenvs.sty')
-rw-r--r-- | macros/latex/contrib/customenvs/tex/customenvs.sty | 254 |
1 files changed, 228 insertions, 26 deletions
diff --git a/macros/latex/contrib/customenvs/tex/customenvs.sty b/macros/latex/contrib/customenvs/tex/customenvs.sty index 535baa0f18..4c90d39b3d 100644 --- a/macros/latex/contrib/customenvs/tex/customenvs.sty +++ b/macros/latex/contrib/customenvs/tex/customenvs.sty @@ -3,9 +3,10 @@ % 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/08/20 0.1.9 Custom classic environments] +\ProvidesPackage{customenvs}[2024/08/26 0.2.0 Custom classic environments] %====HISTORIQUE +% 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 @@ -678,7 +679,153 @@ } %====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}}% + \ifboolKV[levelstars]{valign}% + {% + \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \begin{tikzpicture}[baseline={-\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}}% + \ifboolKV[tkznivetoiles]{AlignV}% + {% + \settodepth{\tmpprofondeuretoiles}{\hbox{azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN}}% + \begin{tikzpicture}[baseline={-\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} @@ -689,6 +836,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~}% @@ -696,15 +845,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{} }{% @@ -719,7 +874,6 @@ 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} @@ -728,7 +882,6 @@ Type=Classique,% ComplementTitre={},% CodeDebut={},% - %Couleur=macouleurexo,% EchelleImage=1.15,% Compteur=true,% Decoration={},% @@ -753,12 +906,13 @@ {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}% {% @@ -768,13 +922,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}% {% @@ -782,6 +936,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]% + \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 {% @@ -799,7 +977,7 @@ \IfSubStr{\EnvtExoDeco}{Icone}% {% \StrBehind{\EnvtExoDeco}{/}[\EnvtExoIcon]% - \,\scalebox{0.85}[0.85]{\EnvtExoIcon}% + \,\textcolor{macouleurexodeco}{\scalebox{0.85}[0.85]{\EnvtExoIcon}}% }{}% \IfSubStr{\EnvtExoDeco}{Ceinture}% {% @@ -809,13 +987,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}% {% @@ -823,6 +1001,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@}% @@ -2237,7 +2439,7 @@ \setKVdefault[tkzBannerpartKeys]{% height=2.5em,% - width=\linewidth,% + width={\linewidth-0.5pt},% blockwidth=2.75em,% collight=darkgray!25,% colmedium=darkgray!50,% @@ -2260,10 +2462,10 @@ \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}}% + \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}}% @@ -2309,34 +2511,34 @@ \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 ; + \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 ; + \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 ; + \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,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.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}; + \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} }% @@ -2346,21 +2548,21 @@ \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}; + \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,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}; + \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}; + \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} |