texlive[67186] Master/texmf-dist: outilsgeomtikz (22may23)

commits+karl at tug.org commits+karl at tug.org
Mon May 22 22:26:47 CEST 2023


Revision: 67186
          http://tug.org/svn/texlive?view=revision&revision=67186
Author:   karl
Date:     2023-05-22 22:26:47 +0200 (Mon, 22 May 2023)
Log Message:
-----------
outilsgeomtikz (22may23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/outilsgeomtikz/OutilsGeomTikz-doc.pdf
    trunk/Master/texmf-dist/doc/latex/outilsgeomtikz/OutilsGeomTikz-doc.tex
    trunk/Master/texmf-dist/tex/latex/outilsgeomtikz/OutilsGeomTikz.sty

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

Modified: trunk/Master/texmf-dist/doc/latex/outilsgeomtikz/OutilsGeomTikz-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/outilsgeomtikz/OutilsGeomTikz-doc.tex	2023-05-22 20:26:31 UTC (rev 67185)
+++ trunk/Master/texmf-dist/doc/latex/outilsgeomtikz/OutilsGeomTikz-doc.tex	2023-05-22 20:26:47 UTC (rev 67186)
@@ -4,8 +4,8 @@
 
 \documentclass[french,a4paper,11pt]{article}
 \usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.1}
-\def\TPdate{07 Mars 2023}
+\def\TPversion{0.1.2}
+\def\TPdate{22 mai 2023}
 \usepackage[table,svgnames]{xcolor}
 \usepackage[bold-style=ISO,math-style=french]{concmath-otf}
 %\usepackage[bold-style=ISO,math-style=french]{unicode-math}
@@ -202,6 +202,8 @@
 
 \part{Historique}
 
+\verb|v0.1.2|~:~~~~Ajout de la \textit{règle-repère}
+
 \verb|v0.1.1|~:~~~~Correction d'un bug avec une ancienne syntaxe [join=...]
 
 \verb|v0.1.0|~:~~~~Version initiale.
@@ -225,6 +227,7 @@
 	\item une équerre graduée (30/60) ;
 	\item un rapporteur (180 ou 360);
 	\item une réquerre graduée ;
+	\item une \og règle-repère \fg{} graduée ;
 	\item une \og rappéquerre \fg{} graduée ;
 	\item un compas.
 \end{itemize}
@@ -303,6 +306,7 @@
 	\item \texttt{\textbackslash tkzRapporteur} ;
 	\item \texttt{\textbackslash tkzRequerre} ;
 	\item \texttt{\textbackslash tkzRappequerre} ;
+	\item \texttt{\textbackslash tkzRegleRepere} ;
 	\item \texttt{\textbackslash tkzCompas} ;
 	\item \texttt{\textbackslash tkzCrayon}.
 \end{itemize}
@@ -315,6 +319,7 @@
 \tkzRapporteur[clés]
 \tkzRequerre[clés]
 \tkzRappEquerre[clés]
+\tkzRegleRepere[clés]
 \tkzCrayon[clés]
 \tkzCompas[clés]{pointe}{mine}
 \end{PresentationCode}
@@ -457,6 +462,72 @@
 
 \pagebreak
 
+\section{La règle-repère}
+
+\subsection{La commande}
+
+\begin{cautionblock}
+Le package propose l'outil \textsf{Règle repère}.
+
+La forme générale de la règle-repère est \textit{fixée}, mais la règle-repère peut être \textit{personnalisée}.
+\end{cautionblock}
+
+\begin{PresentationCode}{tikz lower}
+\tkzRegleRepere
+\end{PresentationCode}
+
+\subsection{Clés et options}
+%
+\begin{tipblock}
+Quelques \Cle{clés} de personnalisation sont disponibles :
+
+\begin{itemize}
+	\item \Cle{Longueur} pour la taille (\textit{paire}), en cm, de la règle-repère ;\hfill~(défaut : \Cle{12} et mini \Cle{4})
+	\item \Cle{Largeur} pour la largeur, en cm, de la règle-repère ;\hfill~(défaut : \Cle{4} et mini \Cle{4})
+	\item \Cle{Origine} pour le placer la règle-repère (au niveau du $0$) ;\hfill~(défaut : \Cle{\{(0,0)\}})
+	\item \Cle{Rotation} pour pivoter la règle-repère (au niveau du $0$) ;\hfill~(défaut : \Cle{0})
+	\item \Cle{Echelle} pour l'échelle globale de la règle-repère ;\hfill~(défaut : \Cle{1})
+	\item \Cle{Couleur} pour la couleur des éléments de la règle-repère ;\hfill~(défaut : \Cle{black})
+	\item le booléen \Cle{Fond} pour afficher une couleur de fond pour la règle-repère ;
+	
+	\hfill~(défaut : \Cle{false})
+	\item \Cle{CouleurFond} pour la couleur du fond de la règle-repère ;\hfill~(défaut : \Cle{black})
+	\item \Cle{Opacite} pour régler l'opacité du fond de la règle-repère ;\hfill~(défaut : \Cle{0.5})
+	\item le booléen \Cle{AfficheValeurs} pour afficher les valeurs des graduations ;\hfill~(défaut : \Cle{true})
+	\item le booléen \Cle{Retourne} pour \textit{inverser la position des graduations}.
+	
+	\hfill~(défaut : \Cle{false})
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{noteblock}
+Pour des exemples de personnalisation, une grille ainsi que les points \textit{support} seront rajoutés.
+
+\smallskip
+
+Toutes les \Cle{clés} ne seront pas présentées de manière indépendante, mais parfois elles seront \textit{cumulées} pour éviter de surcharger la sortie.
+\end{noteblock}
+
+\begin{PresentationCode}{listing only}
+%environnement tikz
+\tkzRegleRepere[Fond,CouleurFond=red]
+\tkzRegleRepere[Longueur=8,Rotation=-15,Couleur=ForestGreen, Origine={(1,-5)},Fond,AfficheValeurs=false]
+\tkzRegleRepere[Longueur=18,Echelle=0.5,Couleur=blue,Rotation=20, Origine={(3,3.25)},Retourne]
+\end{PresentationCode}
+
+\begin{PresentationCode}{text only}
+\begin{tikzpicture}
+	\affichegrille{-1}{13}{-12}{7}
+	\pointsutiles{(0,0),(1,-5),(3,3.25)}
+	\tkzRegleRepere[Fond,CouleurFond=red]
+	\tkzRegleRepere[Longueur=8,Rotation=-15,Couleur=ForestGreen, Origine={(1,-5)},Fond,AfficheValeurs=false]
+	\tkzRegleRepere[Longueur=18,Echelle=0.5,Couleur=blue,Rotation=20,Origine={(3,3.25)},Retourne]
+\end{tikzpicture}
+\end{PresentationCode}
+
+\pagebreak
+
 \section{L'équerre}
 
 \subsection{La commande}
@@ -766,12 +837,13 @@
 \tkzCrayon[Couleur=orange,Origine={AA},Rotation=-20,Echelle=0.5,Longueur=6]
 \tkzRequerre[Fond,AfficheValeurs,CouleurFond=yellow,Origine={(3,-3.5)}, Rotation=-30,Echelle=0.5]
 \tkzCrayon[Couleur=gray,Origine={(3,-3)},Rotation=-98,Echelle=0.5]
+\tkzRegleRepere[Fond,CouleurFond=yellow,AfficheValeurs=false,Echelle=0.5, Origine={(1,5)},Longueur=8]
 \coordinate (FG) at (-1,1) ; \coordinate (FH) at (1,1.5) ;
 \tkzCompas[LongueurBranches=3,LongueurCrayon=2]{FG}{FH}
 \end{PresentationCode}
 
 \begin{PresentationCode}{text only}
-\begin{tikzpicture}
+\begin{tikzpicture}[scale=0.9]
 	\affichegrille{-2}{13}{-8}{5}
 	%\pointsutiles{(0,0),(2,1),(-4,-5),(-1,-5),(5,-2),(8,-3),(8.5,6),(8.5,2.5)}
 	\tkzRegle[Fond,Longueur=8,Rotation=-20,CouleurFond=blue]
@@ -786,6 +858,8 @@
 	\tkzCrayon[Couleur=orange,Origine={AA},Rotation=-20,Longueur=6,Echelle=0.5]
 	\tkzRequerre[Fond,AfficheValeurs,CouleurFond=yellow,Origine={(3,-3.5)},Rotation=-30,Longueur=7,Largeur=2.5]
 	\tkzCrayon[Couleur=gray,Origine={(3,-3.5)},Rotation=-98,Longueur=3]
+	\tkzRegleRepere[Fond,CouleurFond=yellow,AfficheValeurs=false,Echelle=0.5,Origine={(1,5)},Longueur=8]
+	\tkzCrayon[Couleur=pink,Origine={(2,3)},Rotation=-135,Longueur=2.75]
 	%compas
 	\coordinate (FG) at (-1,1) ; \coordinate (FH) at (1,1.5) ;
 	\tkzCompas[LongueurBranches=3,LongueurCrayon=2]{FG}{FH}

Modified: trunk/Master/texmf-dist/tex/latex/outilsgeomtikz/OutilsGeomTikz.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/outilsgeomtikz/OutilsGeomTikz.sty	2023-05-22 20:26:31 UTC (rev 67185)
+++ trunk/Master/texmf-dist/tex/latex/outilsgeomtikz/OutilsGeomTikz.sty	2023-05-22 20:26:47 UTC (rev 67186)
@@ -2,7 +2,8 @@
 % licence........: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{OutilsGeomTikz}[2023/03/07 v0.1.1 Outils geometriques en TikZ]
+\ProvidesPackage{OutilsGeomTikz}[2023/05/22 v0.1.2 Outils geometriques en TikZ]
+% 0.1.2		Ajout de la règle-repère
 % 0.1.1		Correction d'un bug avec une ancienne syntaxe [join=...]
 % 0.1.0		Version initiale
 
@@ -106,6 +107,70 @@
 	\end{scope}
 }
 
+%--------Règle-Repère (OK)
+\defKV[RegleRepereGeom]{%
+	Echelle=\def\REGLREPechelle{#1},%
+	Longueur=\def\REGLREPlongueur{#1},%
+	Largeur=\def\REGLREPlargeur{#1},%
+	Couleur=\def\REGLREPcouleur{#1},%
+	CouleurFond=\def\REGLREPcouleurfond{#1},%
+	Origine=\def\REGLREPposOrigin{#1},%
+	Rotation=\def\REGLREPangle{#1},%
+	Opacite=\def\REGLREPopac{#1}
+}
+
+\setKVdefault[RegleRepereGeom]{%
+	Echelle=1,%
+	Couleur=black,%
+	CouleurFond=black,%
+	Longueur=12,%
+	Largeur=4,%
+	Origine={(0,0)},%
+	Rotation=0,%
+	AfficheValeurs=true,%
+	Fond=false,%
+	Opacite=0.5,%
+	Retourne=false
+}
+
+\NewDocumentCommand{\tkzRegleRepere}{ O{} }{%
+	\useKVdefault[RegleRepereGeom]%
+	\setKV[RegleRepereGeom]{#1}%
+	\xdef\REGLREPlongueur{\fpeval{max(4,2*round(0.5*\REGLREPlongueur,0))}}%valeurs mini
+	\xdef\REGLREPlargeur{\fpeval{max(4,round(\REGLREPlargeur,0))}}
+	\begin{scope}[shift={(\REGLREPposOrigin)},rotate=\REGLREPangle,scale=\REGLREPechelle]
+		%bases de la règle-repère
+		\ifboolKV[RegleRepereGeom]{Fond}%
+			{\draw[draw=none,fill=\REGLREPcouleurfond!10!white,fill opacity=\REGLREPopac,rounded corners] (-0.5,0) rectangle++ ({\REGLREPlongueur+1},{-\REGLREPlargeur}) ;}%
+			{}%
+		\draw[semithick,draw=\REGLREPcouleur,rounded corners] (-0.5,0) rectangle++ ({\REGLREPlongueur+1},{-\REGLREPlargeur}) ;
+			\clip (-0.5,0) rectangle++ ({\REGLREPlongueur+1},{-\REGLREPlargeur}) ;
+			\draw[\REGLREPcouleur,densely dotted,xstep=0.2,ystep=0.2] ({-0.5},{-\REGLREPlargeur+1}) grid ({\REGLREPlongueur+1},{-1}) ;
+			\draw[\REGLREPcouleur] ({-0.5},{-\REGLREPlargeur+1}) grid ({\REGLREPlongueur+1},{-1}) ;
+		%graduations
+		\foreach \x in {0,0.1,...,\REGLREPlongueur}
+			{\draw[\REGLREPcouleur] (\x,0)--++(0,-0.25) (\x,{-\REGLREPlargeur})--++(0,0.25) ;}
+		\foreach \x in {0,0.5,...,\REGLREPlongueur}
+			{\draw[\REGLREPcouleur] (\x,0)--++(0,-0.375) (\x,{-\REGLREPlargeur})--++(0,0.375) ;}
+		\foreach \x in {0,1,...,\REGLREPlongueur}
+			{\draw[\REGLREPcouleur] (\x,0)--++(0,-0.5) (\x,{-\REGLREPlargeur})--++(0,0.5) ;}
+		%valeurs
+		\ifboolKV[RegleRepereGeom]{AfficheValeurs}%
+			{%
+				\ifboolKV[RegleRepereGeom]{Retourne}%
+					{%
+						{\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,below] {$\fpeval{-trunc(0.5*\REGLREPlongueur)+\i}$} ;}
+						{\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-\REGLREPlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,above] {\rotatebox{180}{$\inteval{\REGLREPlongueur-\i}$}} ;}
+					}%
+					{%
+						{\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,below] {$\i$} ;}
+						{\foreach \i in {0,1,...,\REGLREPlongueur} \draw[\REGLREPcouleur] (\i,{-\REGLREPlargeur+0.5}) node[inner sep=1pt,outer sep=1pt,rotate=\REGLREPangle,scale={0.8*\REGLREPechelle},font=\small,above] {\rotatebox{180}{$\fpeval{trunc(0.5*\REGLREPlongueur)-\i}$}} ;}
+					}%
+			}
+			{}%
+	\end{scope}
+}
+
 %--------Réquerre (OK)
 \defKV[RequerreGeom]{%
 	Echelle=\def\REQechelle{#1},%



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