summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.pdfbin767807 -> 801892 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex55
-rw-r--r--Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty49
3 files changed, 84 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.pdf b/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.pdf
index 808c1421a71..83fcc4e4f5b 100644
--- a/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.pdf
+++ b/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex b/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex
index 4d58cdb3ace..1a79a83cf80 100644
--- a/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex
+++ b/Master/texmf-dist/doc/latex/tkz-grapheur/tkz-grapheur-doc-fr.tex
@@ -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 @@ Concernant les styles des \textit{objets}, ils sont donnés ci-dessous.
\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 @@ Les \MontreCode{[clés]}, optionnelles, disponibles sont :
\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 @@ Les \MontreCode{[clés]}, optionnelles, disponibles sont :
\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 @@ Les calculs étant effectués en flottant en fonction des unités (re)calculées
\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 @@ Les commandes disponibles sont :
\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 @@ Les commandes disponibles sont :
\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
diff --git a/Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty b/Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty
index 1efc551b5bd..7fc03cde3cc 100644
--- a/Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty
+++ b/Master/texmf-dist/tex/latex/tkz-grapheur/tkz-grapheur.sty
@@ -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,22 +447,22 @@
\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}} ;
}%
}%
\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