texlive[72249] Master/texmf-dist: customenvs (10sep24)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 10 22:05:53 CEST 2024


Revision: 72249
          https://tug.org/svn/texlive?view=revision&revision=72249
Author:   karl
Date:     2024-09-10 22:05:53 +0200 (Tue, 10 Sep 2024)
Log Message:
-----------
customenvs (10sep24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.pdf
    trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex
    trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.pdf
    trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex
    trunk/Master/texmf-dist/tex/latex/customenvs/customenvs.sty

Modified: trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex	2024-09-10 20:05:31 UTC (rev 72248)
+++ trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-en.tex	2024-09-10 20:05:53 UTC (rev 72249)
@@ -34,8 +34,8 @@
 \usepackage[margin=1.5cm]{geometry}
 \setlength{\parindent}{0pt}
 
-\def\TPversion{0.2.1}
-\def\TPdate{01/09/2024}
+\def\TPversion{0.2.2}
+\def\TPdate{09/09/2024}
 \usepackage{tcolorbox}
 \sethlcolor{lightgray!25}
 \NewDocumentCommand\MontreCode{ m }{%
@@ -59,7 +59,7 @@
 				{\Huge \texttt{customenvs [en]}}\\
 				\\
 				{\Large Some custom environments,} \\
-				{\Large with spacing enhancements.} \\
+				{\Large or small patches.} \\
 			\end{tabular}
 			\renewcommand\arraystretch{1}
 			
@@ -111,6 +111,8 @@
 
 \section{History}
 
+\verb|v0.2.2|~:~~~Flared arrow, with \TikZ
+
 \verb|v0.2.1|~:~~~Enhancements for \textit{stars skills} + AutoGrid for \TikZ\ (see \textsf{[fr]} doc)
 
 \verb|v0.2.0|~:~~~~Skills with stars (\textsf{fontawesome5} or \TikZ)
@@ -667,4 +669,47 @@
 \tkzLevelStars[colframe=red,colback=yellow,maxlevel=5]{3}
 \end{demohigh}
 
+\subsection{Flared arrow}
+
+\begin{codehigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\tkzFlaredArrow[%
+  color=...,           %color of arrow
+  arrowsize=...,       %size (auto or H/W )
+  bend=...,            %empty for straigth or left/... or right/...
+  thickness=...,       %size for the beginning
+  factor=...,          %factor for calculing size for ending
+  arrowstyle=...,      %style (arrows.meta)
+  move=...             %boolean for moving instead coordinates
+  ]%
+  {begin}{end or move}
+\end{codehigh}
+
+\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+%arrow 0.5mm -> 1.25mm
+\begin{tikzpicture}
+\tkzFlaredArrow%
+  [thickness=0.5mm,factor=2.5,bend=left/30,color=red,arrowstyle=Triangle]%
+  {0,0}{5,1.5}
+\end{tikzpicture}
+\end{demohigh}
+
+\begin{demohigh}[language=latex/latex3,style/main=teal!25,style/code=teal!25]
+\begin{tikzpicture}
+  \draw[thin,lightgray] (-3,-1) grid (5,5) ;
+  \coordinate (A) at (0,0) ; \coordinate (B) at (4,1) ;
+  \coordinate (C) at (1,1) ; \coordinate (D) at (5,4) ;
+  \coordinate (E) at (0,1) ; \coordinate (F) at (0,5) ;
+  \coordinate (G) at (-2,0) ;
+  \tkzFlaredArrow[color=green,arrowstyle=Triangle]{A}{B}
+  \tkzFlaredArrow[color=blue,bend=right/10]{D}{C}
+  \tkzFlaredArrow%
+    [color=red,bend=left/45,arrowstyle=Stealth,thickness=0.1mm,factor=10]%
+    {-2,1}{0,4}
+  \tkzFlaredArrow%
+    [color=red,bend=right/45,thickness=0.1mm,factor=10,arrowstyle=Stealth]%
+    {-2,1}{0,4}
+  \tkzFlaredArrow[color=teal,move,bend=left/10]{-3,-1}{5,1}
+  \end{tikzpicture}
+\end{demohigh}
+
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex	2024-09-10 20:05:31 UTC (rev 72248)
+++ trunk/Master/texmf-dist/doc/latex/customenvs/customenvs-doc-fr.tex	2024-09-10 20:05:53 UTC (rev 72249)
@@ -39,8 +39,8 @@
 \usepackage[margin=1.5cm]{geometry}
 \setlength{\parindent}{0pt}
 
-\def\TPversion{0.2.1}
-\def\TPdate{01 septembre 2024}
+\def\TPversion{0.2.2}
+\def\TPdate{09 septembre 2024}
 \usepackage{tcolorbox}
 \tcbuselibrary{listingsutf8}
 \newtcblisting{DemoCode}[1]{%
@@ -66,10 +66,10 @@
 		keywordstyle={\color{violet}},%
 		classoffset=2,%
 		alsoletter={-},%
-		morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri,\NiveauDiffExos,\tkzEtoiles,\tkzGrilleAuto,\tkzAutoGridLocal,\tkzAutoGridActivate},%
+		morekeywords={\ReponsesQCM,MultiCols,\CreerListeItems,\ListeChoixItems,\TableauCompetences,\CrayonDeCompetences,\StyleEnvtExo,\StyleEnvtExoDefaut,\TitreExo,\ipsum,EnvSMS,\SMSrec,\SMSenv,BoiteSimple,\SujetTitreExo,\CircledNumber,\AffVignette,\BoiteArrondie,\ChangerDisplaySkip,\celcouleur,\celfusion,\lignetxt,\colonnetxt,\celnumbreak,\celtxt,\BandeauScore,\InsererImage,\tkzBannerTri,\NiveauDiffExos,\tkzEtoiles,\tkzGrilleAuto,\tkzAutoGridLocal,\tkzAutoGridActivate,\tkzFlecheEvasee},%
 		keywordstyle={\color{green!50!black}},%
 		classoffset=3,%
-		morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype,Couleur,AlignV,Offset,NiveauMax,pasX,pasY,grilleauto},%
+		morekeywords={Largeur,Filets,EspacesCL,NbCols,Labels,PoliceLabels,EspaceLabels,Swap,Type,CoeffEspVert,EpTrait,Alea,LargeurNivs,Niveaux,NoticeNiveaux,Titre,PolTitre,PolNotice,PolComp,LigneSep,CouleurNotice,CouleurNiveaux,CouleurFond,Note,Notice,PoliceCateg,PoliceBloc,Couleurs,LargeurBloc,Echelle,NoirBlanc,Libelle,EpTrait,Police,Type,ComplementTitre,Titre,CodeDebut,Couleur,EchelleImage,Decoration,Trait,Avatar,AffAvatar,NoirBlanc,CouleurE,CouleurR,CouleurFond,Hauteur,Largeur,PoliceTxt,CouleurTitre,AlignH,bg,txt,bthick,bcol,raise,Type,EspH,Fond,Texte,Style,Dense,Avant,AvantS,Apres,ApresS,Global,align,width,Legende,CouleurFond,Hauteur,Ratio,AffLegende,Couleurs,EchelleSymboles,Symboles,vRemplir,vOffset,vCentrer,height,width,blockwidth,collight,colmedium,coldar,coltxt,fonttxt,swap,maincolor,logo,type,num,dispblock,customtype,Couleur,AlignV,Offset,NiveauMax,pasX,pasY,grilleauto,TailleFleche,Direction,Coeff,TypeFleche,Deplacement,LineCap,Epaisseur},%
 		keywordstyle={\color{orange}}
 	},%
 	#1
@@ -149,6 +149,8 @@
 
 \section{Historique}
 
+\verb|v0.2.2|~:~~~Ajout d'une commande pour des flèches évasées, en \TikZ\
+
 \verb|v0.2.1|~:~~~Amélioration de la gestion des étoiles pour des niveaux de difficultés + Grille auto pour \TikZ\
 
 \verb|v0.2.0|~:~~~Étoiles pour des niveaux de difficultés (compatible avec \texttt{EnvtExo})
@@ -218,7 +220,10 @@
 	\item \MontreCode{tabularray} ;
 	\item \MontreCode{xcolor} ;
 	\item \MontreCode{fontawesome5} ;
-	\item \MontreCode{tikz} avec les librairies \MontreCode{decorations.pathmorphing,positioning,shapes.misc,calc}.
+	\item \MontreCode{tikz} avec les librairies :
+	\begin{itemize}
+		\item \MontreCode{decorations.pathmorphing,positioning,shapes.misc,calc,arrows,arrows.meta}.
+	\end{itemize}
 \end{itemize}
 
 À noter que, pour des raisons de compatibilité (ou d'incompatibilité), les packages \MontreCode{enumitem}/\MontreCode{multicol}/\MontreCode{tabularray}/\MontreCode{xcolor}/\MontreCode{fontawesome5} peuvent ne pas être chargés par \MontreCode{customenvs} (auxquels cas l'utilisateur devra les avoir chargés pour faire fonctionner certains environnements) via les options :
@@ -1604,4 +1609,76 @@
 
 La version étoilée marquera également l'origine $(0;0)$.
 
+\pagebreak
+
+\subsection{Flèche évasée, en \TikZ}
+
+L'idée est de proposer une commande, en  \TikZ, pour représenter une flèche évasée, avec des paramètres optionnels.
+
+\begin{DemoCode}{listing only}
+\tkzFlecheEvasee[clés]{départ}{arrivée ou déplacement}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\begin{tikzpicture}
+	\tkzFlecheEvasee{0,0}{5,1.5}
+\end{tikzpicture}
+\end{DemoCode}
+
+Les \MontreCode{clés} disponibles, à donner entre \MontreCode{[...]}, sont :
+
+\begin{itemize}
+	\item \MontreCode{Couleur=...} : couleur de la flèche ;
+	\item \MontreCode{Epaisseur=...} : taille initiale du trait (\MontreCode{0.5mm} par défaut) ;
+	\item \MontreCode{Direction=...} : direction de la flèche, avec angle éventuel ;
+	\item \MontreCode{Coeff=...} : coefficient pour la taille finale du trait (\MontreCode{4} par défaut) ;
+	\item \MontreCode{TypeFleche=...} : type de la flèche, issue de \MontreCode{arrows.meta} ;
+	\item \MontreCode{TailleFleche=...} : booléen pour la taille de la partie flèche (\MontreCode{auto} par défaut), en langage \MontreCode{arrows.meta} ;
+	\item \MontreCode{Deplacement} : booléen pour spécifier qu'on travaille avec un déplacement pour l'arrivée.
+\end{itemize}
+
+Le premier argument obligatoire, permet de spécifier le nœud de départ ou les coordonnées du point de départ.
+
+Le second argument obligatoire, permet de spécifier le nœud d'arrivée ou les coordonnées du point d'arrivée, mais également le déplacement dans le cas ou \MontreCode{Deplacement=true}.
+
+\medskip
+
+Par défaut, et en mode \MontreCode{auto} :
+
+\begin{itemize}
+	\item le début du trait mesure \MontreCode{Epaisseur=0.5mm} ;
+	\item la fin du trait mesure \MontreCode{4*Epaisseur=2mm} ;
+	\item les dimensions de la flèche sont \MontreCode{H=2*4*Epaisseur=4mm} et \MontreCode{L=2.1*4*Epaisseur=4.2mm}.
+\end{itemize}
+
+À noter que pour les flèches type \MontreCode{Stealth}, un ajustement est sans doute à prévoir pour compenser le \textit{creux}.
+
+\begin{DemoCode}{}
+%flèche 0.5mm -> 1.25mm
+\begin{tikzpicture}
+	\tkzFlecheEvasee%
+		[Epaisseur=0.5mm,Coeff=2.5,Direction=left/30,Couleur=red,TypeFleche=Triangle]%
+		{0,0}{5,1.5}
+\end{tikzpicture}
+\end{DemoCode}
+
+\begin{DemoCode}{}
+\begin{tikzpicture}
+	\draw[thin,lightgray] (-3,-1) grid (5,5) ;
+	\coordinate (A) at (0,0) ; \coordinate (B) at (4,1) ;
+	\coordinate (C) at (1,1) ; \coordinate (D) at (5,4) ;
+	\coordinate (E) at (0,1) ; \coordinate (F) at (0,5) ;
+	\coordinate (G) at (-2,0) ;
+	\tkzFlecheEvasee[Couleur=green,TypeFleche=Triangle]{A}{B}
+	\tkzFlecheEvasee[Couleur=blue,Direction=right/10]{D}{C}
+	\tkzFlecheEvasee%
+		[Couleur=red,Direction=left/45,TypeFleche=Stealth,Epaisseur=0.1mm,Coeff=10]%
+		{-2,1}{0,4}
+	\tkzFlecheEvasee%
+		[Couleur=red,Direction=right/45,Epaisseur=0.1mm,Coeff=10,TypeFleche=Stealth]%
+		{-2,1}{0,4}
+	\tkzFlecheEvasee[Couleur=teal,Deplacement,Direction=left/10]{-3,-1}{5,1}
+\end{tikzpicture}
+\end{DemoCode}
+
 \end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/customenvs/customenvs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/customenvs/customenvs.sty	2024-09-10 20:05:31 UTC (rev 72248)
+++ trunk/Master/texmf-dist/tex/latex/customenvs/customenvs.sty	2024-09-10 20:05:53 UTC (rev 72249)
@@ -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/09/01 0.2.1 Custom classic environments]
+\ProvidesPackage{customenvs}[2024/09/09 0.2.2 Custom classic environments]
 
 %====HISTORIQUE
+% 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
@@ -2713,4 +2714,218 @@
 		}%
 }
 
+%====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}
+}
+
 \endinput
\ No newline at end of file



More information about the tex-live-commits mailing list.