texlive[71535] Master/texmf-dist: tkz-grapheur (15jun24)

commits+karl at tug.org commits+karl at tug.org
Sat Jun 15 21:53:58 CEST 2024


Revision: 71535
          https://tug.org/svn/texlive?view=revision&revision=71535
Author:   karl
Date:     2024-06-15 21:53:58 +0200 (Sat, 15 Jun 2024)
Log Message:
-----------
tkz-grapheur (15jun24)

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

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

Modified: trunk/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex	2024-06-15 19:53:48 UTC (rev 71534)
+++ trunk/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex	2024-06-15 19:53:58 UTC (rev 71535)
@@ -29,8 +29,8 @@
 \hypersetup{pdfborder=0 0 0}
 \usepackage[margin=2cm]{geometry}
 \setlength{\parindent}{0pt}
-\def\TPversion{0.1.3}
-\def\TPdate{06/06/2024}
+\def\TPversion{0.1.4}
+\def\TPdate{15/06/2024}
 \usepackage{soul}
 \usepackage{codehigh}
 \usepackage{tabularray}
@@ -150,6 +150,7 @@
 
 \vfill
 
+\hfill{\footnotesize\textit{\ttfamily À mon papa.}}
 
 \vspace*{5mm}
 
@@ -331,10 +332,11 @@
 \tikzset{pflgrilles/.style={very thin,lightgray}}
 \tikzset{pflaxes/.style={line width=0.8pt,->,>=latex}}
 
-%style des points (courbe / nuage)
+%style des points (courbe / nuage /labels)
 \tikzset{pflpoint/.style={line width=0.95pt}}
 \tikzset{pflpointc/.style={radius=1.75pt}}
 \tikzset{pflpointnuage/.style={radius=1.75pt}}
+\tikzset{pflnoeud/.style={}} %pour les inner sep par exemple :-)
 
 %style des courbes
 \tikzset{pflcourbe/.style={line width=1.05pt}}
@@ -762,8 +764,8 @@
 \end{itemize}
 
 \begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
-\begin{GraphiqueTikz}[x=1.5cm,y=1.5cm]
-	\TracerAxesGrilles[Agrandir=2.5mm]{auto}{auto}
+\begin{GraphiqueTikz}[x=1.5cm,y=1.5cm,Ymin=-2]
+	\TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
 	\DefinirPts{A/1.75,-1.25}\MarquerPts[Couleur=pink]{(A)/A/below} %rond (par défaut)
 	\MarquerPts[Couleur=teal]{(1,1)/M/below}
 	\MarquerPts[Couleur=red,Style=x]{(1.25,1)/$A$/below} %croix
@@ -778,8 +780,25 @@
 \end{GraphiqueTikz}
 \end{tcblisting}
 
+À noter qu'il est également possible de modifier la taille des marques \MontreCode{o/x/+/c} via les \MontreCode{[clés]} :
+
+\begin{itemize}
+	\item \MontreCode{Taillex=...} (\MontreCode{2pt} par défaut) pour les points \textit{croix} ;
+	\item \MontreCode{Tailleo=...} (\MontreCode{1.75pt} par défaut) pour les points \textit{cercle} ;
+	\item \MontreCode{Taillec=...} (\MontreCode{2pt} par défaut) pour les points \textit{carré}.
+\end{itemize}
+
 \pagebreak
 
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+\begin{GraphiqueTikz}[x=1cm,y=1cm,Xmin=0,Ymin=0]
+	\TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+	\MarquerPts[Couleur=red,Style=x,Taillex=3.5pt]{(1.25,1.25)/$A$/below}
+	\MarquerPts[Couleur=teal,Tailleo=2.5pt]{(2,2)/$A$/right}
+	\MarquerPts*[Couleur=orange,Style=c,Taillec=4pt]{(0.5,2.5)}
+\end{GraphiqueTikz}
+\end{tcblisting}
+
 \subsection{Récupérer les coordonnées de nœuds}\label{recupcoordo}
 
 Il est également possible, dans l'optique d'une réutilisation de coordonnées, de récupérer les coordonnées d'un nœud (défini ou déterminé).
@@ -795,6 +814,30 @@
 \RecupererCoordonnees{nœud}[\macrox][\macroy]
 \end{tcblisting}
 
+\subsection{Placer du texte}\label{placetxt}
+
+À noter qu'une commande de placement de texte est disponible.
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5,listing only}
+%dans l'environnement GraphiqueTikz
+\PlacerTexte[clés]{(nœud ou coordonnées)}{texte}
+\end{tcblisting}
+
+Les \MontreCode{[clés]} disponibles sont :
+
+\begin{itemize}
+	\item \MontreCode{Police=...} (\MontreCode{\textbackslash normalsize\textbackslash normalfont} par défaut) pour la police ;
+	\item \MontreCode{Couleur=...} (\MontreCode{black} par défaut) pour la couleur ;
+	\item \MontreCode{Position=...} (\MontreCode{vide} par défaut) pour la position du texte par rapport aux coordonnées.
+\end{itemize}
+
+\begin{tcblisting}{listing engine=minted,minted language=latex,colframe=lightgray,colback=lightgray!5}
+	\begin{GraphiqueTikz}[x=1cm,y=1cm,Xmin=0,Xmax=5,Ymin=0,Ymax=1]
+		\TracerAxesGrilles[Elargir=2.5mm]{auto}{auto}
+		\PlacerTexte[Couleur=red,Police=\LARGE,Position=right]{(1.5,0.5)}{courbe $C_1$}
+	\end{GraphiqueTikz}
+\end{tcblisting}
+
 \pagebreak
 
 \section{Commandes spécifiques d'exploitation des courbes}
@@ -1702,6 +1745,7 @@
 	\lstcmd{tracé droite~~~}{\TracerDroite}{tracdroite}
 	\lstcmd{def points~~~~~}{\DefinirPts}{defpts}
 	\lstcmd{marq pts~~~~~~~}{\MarquerPts}{markpts}
+	\lstcmd{placer txt~~~~~}{\PlacerTexte}{placetxt}
 	\lstcmd{récup absc~~~~~}{\RecupererAbscisse}{recupcoordo}
 	\lstcmd{récup ordo~~~~~}{\RecupererOrdonnee}{recupcoordo}
 	\lstcmd{récup coordos~~}{\RecupererCoordonnees}{recupcoordo}
@@ -1729,6 +1773,7 @@
 
 \begin{quote}
 \begin{verbatim}
+0.1.4 : Placement de texte
 0.1.3 : Ajout de régressions avec le package xint-regression
 0.1.2 : Droites + Extremums
 0.1.1 : Densité loi normale et khi deux + Marquage points + Améliorations

Modified: trunk/Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty	2024-06-15 19:53:48 UTC (rev 71534)
+++ trunk/Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty	2024-06-15 19:53:58 UTC (rev 71535)
@@ -2,9 +2,10 @@
 % licence    : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tkz-grapheur}[2024/06/06 0.1.3.Des outils en TikZ pour travailler comme avec un grapheur]
+\ProvidesPackage{tkz-grapheur}[2024/06/15 0.1.4.Des outils en TikZ pour travailler comme avec un grapheur]
 
 %====HISTORIQUE
+% v 0.1.4	Ajout des placements de textes
 % v 0.1.3	Régressions, avec xintreg (désactivable)
 % v 0.1.2	Max/Min + Droites
 % v 0.1.1	Densité loi normale + khi deux + Améliorations diverses
@@ -85,6 +86,7 @@
 	}%
 
 %====STYLES DE BASE
+\tikzset{pflnoeud/.style={}}
 \tikzset{pflpoint/.style={line width=0.95pt}}
 \tikzset{pflpointc/.style={radius=1.75pt}}
 \tikzset{pflpointnuage/.style={radius=1.75pt}}
@@ -437,7 +439,7 @@
 			%origine
 			\ifboolKV[GraphiqueTikzAxes]{Origine}%
 				{%
-					\draw ({\pflOx},{\pflOy}) node[below left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\pflOx}} ;
+					\draw ({\pflOx},{\pflOy}) node[pflnoeud,below left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\pflOx}} ;
 					%\draw (\pflOx,\pflOy) node[below left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\pflOx}}{\pflOx}} ;
 				}%
 				{}%
@@ -445,11 +447,11 @@
 			\foreach \x in \tmprangexvalues {%
 				\IfBooleanTF{#1}%
 					{%
-						\xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;}
+						\xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[pflnoeud,below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;}
 						%\xintifboolexpr{\x == \pflOx}{}{\draw ([yshift=-\pflthickgrad]\x,\pflOy) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\x}}{\x}} ;}
 					}%
 					{%
-						\draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;
+						\draw ([yshift=-\pflthickgrad]{\x},{\pflOy}) node[pflnoeud,below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxex{\pflformataxex}{\x}} ;
 						%\draw ([yshift=-\pflthickgrad]\x,\pflOy) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\x}}{\x}} ;
 					}%
 				}%
@@ -456,11 +458,11 @@
 			\foreach \y in \tmprangeyvalues {%
 				\IfBooleanTF{#1}%
 					{%
-						\xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;}
+						\xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[pflnoeud,left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;}
 						%\xintifboolexpr{\y == \pflOy}{}{\draw ([xshift=-\pflthickgrad]\pflOx,\y) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\y}}{\y}} ;}
 					}%
 					{%
-						\draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;
+						\draw ([xshift=-\pflthickgrad]{\pflOx},{\y}) node[pflnoeud,left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\FormatterValeurAxey{\pflformataxey}{\y}} ;
 						%\draw ([xshift=-\pflthickgrad]\pflOx,\y) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\ifboolKV[GraphiqueTikzAxes]{Num}{\num{\y}}{\y}} ;
 					}%
 				}%
@@ -589,7 +591,7 @@
 								\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
 							}%
 							{}%
-						\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/45} node[\Pos,font=#3] {\Label} ;
+						\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/45} node[pflnoeud,\Pos,font=#3] {\Label} ;
 					}%
 				}%
 				{}%
@@ -601,7 +603,7 @@
 								\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
 							}%
 							{}%
-						\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/90} node[\Pos,font=#3] {\Label} ;
+						\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcroix={\useKV[GraphiqueTikzMarkPoints]{Taillex}}/90} node[pflnoeud,\Pos,font=#3] {\Label} ;
 					}%
 				}%
 				{}%
@@ -613,7 +615,7 @@
 								\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
 							}%
 							{}%
-						\filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Taillec}}/0} node[\Pos,{\useKV[GraphiqueTikzMarkPoints]{Couleur}},font=#3] {\Label} ;
+						\filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Taillec}}/0} node[pflnoeud,\Pos,{\useKV[GraphiqueTikzMarkPoints]{Couleur}},font=#3] {\Label} ;
 					}%
 				}%
 				{}%
@@ -625,7 +627,7 @@
 								\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
 							}%
 							{}%
-						\filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}/45} node[\Pos,{\useKV[GraphiqueTikzMarkPoints]{Couleur}},font=#3] {\Label} ;
+						\filldraw[draw=none,fill={\useKV[GraphiqueTikzMarkPoints]{Couleur}}] \Point pic{pflptcarre={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}/45} node[pflnoeud,\Pos,{\useKV[GraphiqueTikzMarkPoints]{Couleur}},font=#3] {\Label} ;
 					}%
 				}%
 				{}%
@@ -640,7 +642,7 @@
 										\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
 									}%
 									{}%
-								\draw[pfltrait,\pflcouleurpointsA,fill=\pflcouleurpointsB] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] node[\Pos,font=#3] {\Label} ;
+								\draw[pfltrait,\pflcouleurpointsA,fill=\pflcouleurpointsB] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] node[pflnoeud,\Pos,font=#3] {\Label} ;
 							}%
 						}%
 						{%
@@ -650,7 +652,7 @@
 										\draw[{\useKV[GraphiqueTikzMarkPoints]{Couleur}},pfltraitantec] let \p1 = \Point in ({\x1},{\pflOy}) |- ({\pflOx},{\y1}) ;
 									}%
 									{}%
-								\filldraw[\pflcouleurpoints] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] node[\Pos,font=#3] {\Label} ;
+								\filldraw[\pflcouleurpoints] \Point circle[radius={\useKV[GraphiqueTikzMarkPoints]{Tailleo}}] node[pflnoeud,\Pos,font=#3] {\Label} ;
 							}%
 						}%
 				}%
@@ -668,7 +670,7 @@
 	\foreach \i in {1,...,\LstValXlen}{%
 		\itemtomacro\LstValX[\i]\mavalx%
 		\itemtomacro\LstValFmtX[\i]\mavalfmtx%
-		\draw ([yshift=-\pflthickgrad]{\mavalx},{\pflOy}) node[below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmtx} ;
+		\draw ([yshift=-\pflthickgrad]{\mavalx},{\pflOy}) node[pflnoeud,below,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmtx} ;
 	}%
 }
 
@@ -681,7 +683,7 @@
 	\foreach \i in {1,...,\LstValXlen}{%
 		\itemtomacro\LstValY[\i]\mavaly%
 		\itemtomacro\LstValFmtY[\i]\mavalfmty%
-		\draw ([xshift=-\pflthickgrad]{\pflOx},{\mavaly}) node[left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmty} ;
+		\draw ([xshift=-\pflthickgrad]{\pflOx},{\mavaly}) node[pflnoeud,left,font={\useKV[GraphiqueTikzAxes]{Police}}] {\mavalfmty} ;
 	}%
 }
 
@@ -1287,7 +1289,7 @@
 		}%
 		{%
 			\foreach \Point/\Pos/\Label in {#4}{%
-				\filldraw[#2] \Point circle[pflpointc] node[\Pos,font=#3] {\Label} ;
+				\filldraw[#2] \Point circle[pflpointc] node[pflnoeud,\Pos,font=#3] {\Label} ;
 			}
 		}%
 }
@@ -2014,4 +2016,21 @@
 	\end{scope}
 }
 
+%====TEXTES
+\defKV[GraphiqueTikzNode]{%
+	Couleur=\def\pflnodecol{#1},%
+	Police=\def\pflnodefonte{#1},%
+	Position=\def\pfnodepos{#1}
+}
+\setKVdefault[GraphiqueTikzNode]{%
+	Couleur=black,%
+	Debut={\normalfont\normalsize},%
+	Position={}
+}
+\NewDocumentCommand\PlacerTexte{ O{} m m }{%
+	\restoreKV[GraphiqueTikzNode]%
+	\setKV[GraphiqueTikzNode]{#1}%
+	\draw #2 node[pflnoeud,font=\pflnodefonte,text=\pflnodecol,\pfnodepos] {#3} ;
+}
+
 \endinput
\ No newline at end of file



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