summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-12-15 03:02:49 +0000
committerNorbert Preining <norbert@preining.info>2023-12-15 03:02:49 +0000
commit9dd4909414ccbc438a2c6276bf642904d6036891 (patch)
tree719482ec001467af1aa112811a7dc7a59b32ae2e /graphics/pgf/contrib
parent08c9c5238d01d9b5949ae48f659d06da1665734a (diff)
CTAN sync 202312150302
Diffstat (limited to 'graphics/pgf/contrib')
-rw-r--r--graphics/pgf/contrib/messagepassing/messagepassing.dtx114
-rw-r--r--graphics/pgf/contrib/messagepassing/messagepassing.pdfbin267669 -> 306130 bytes
-rw-r--r--graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdfbin501125 -> 504537 bytes
-rw-r--r--graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex11
-rw-r--r--graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty18
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdfbin339426 -> 391365 bytes
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex161
-rw-r--r--graphics/pgf/contrib/profsio/tex/ProfSio.sty126
8 files changed, 371 insertions, 59 deletions
diff --git a/graphics/pgf/contrib/messagepassing/messagepassing.dtx b/graphics/pgf/contrib/messagepassing/messagepassing.dtx
index 3811f558a5..41b95184e8 100644
--- a/graphics/pgf/contrib/messagepassing/messagepassing.dtx
+++ b/graphics/pgf/contrib/messagepassing/messagepassing.dtx
@@ -14,7 +14,7 @@
% \iffalse
%<package> \NeedsTeXFormat{LaTeX2e}
-%<package> \ProvidesPackage{messagepassing}[2022/02/18 v1.0 A package to draw message passing diagrams]
+%<package> \ProvidesPackage{messagepassing}[2023/12/13 v1.2 A package to draw message passing diagrams]
%<package> \RequirePackage{tikz}
%<package> \usetikzlibrary{quotes, calc, arrows.meta}
%<package> \RequirePackage{xparse}
@@ -60,6 +60,8 @@
% Right brace \} Tilde \~}
%
%
+% \changes{v1.2}{2023/12/13}{Add optional display names in processes and message node options}
+% \changes{v1.1}{2022/07/20}{Consistent spelling of "colour"}
% \changes{v1.0}{2022/02/18}{Initial version for publication}
%
% \GetFileInfo{messagepassing.sty}
@@ -117,7 +119,7 @@
% bottom, instead of from left to right. Doing so, almost all
% labels\footnote{Annotations are not rotated, unless explicitly asked.} are
% rotated as well. If, \emph{in addition}, \verb+annotatevertical+ is set, then
-% annotations (including named of colouredboxes) are rotated as well.
+% annotations (including names of colouredboxes) are rotated as well.
% \subsection{Basic usage}
% \subsubsection{Creating a diagram.}
@@ -150,8 +152,12 @@
% \subparagraph{Creating a new process.}
% Each process is characterised by its name.
% \DescribeMacro{\newprocess} The simplest macro to create a new process is then
-% |\newprocess| \marg{name}, where \marg{name} is the name of the process (resp.
-% \(p\), \(q\), and \(r\) in Figure~\ref{mp:ex1}).
+% |\newprocess| \marg{name} \oarg{display name}, where \marg{name} is the name
+% of the process (resp. \(p\), \(q\), and \(r\) in Figure~\ref{mp:ex1}). If
+% \oarg{display name} is provided, it is used as the name when rendering the
+% figure, while \marg{name} is used internally to refer to the process. This
+% allows you to use names that can not be used internally (e.g.\ with maths or
+% things like that).
%
% In addition, we often draw a horizontal\footnote{By default, the line is vertical if
% the option |vertical| is used.} line that represent the running process.
@@ -160,21 +166,21 @@
% creates a line of length \emph{length} for process \emph{process}.}, we also
% provide a simple macro that performs both actions:
% \DescribeMacro{\newprocesswithlength}
-% |\newprocesswithlength|\marg{name}\marg{length}.
+% |\newprocesswithlength|\marg{name}\oarg{display name}\marg{length}.
%
% An other alternative is to name the state in which the process starts (in
% Fig~\ref{mp:ex1}, we call those states \(si\) as \emph{state intervals}).
% Again, this can be achieved using individual commands, but we also provide
% \DescribeMacro{\newprocesswithstateinterval}
-% |\newprocesswithstateinterval|\marg{name}\marg{state name}.
+% |\newprocesswithstateinterval|\marg{name}\oarg{display name}\marg{state name}.
%
% Finally, an other way to create a process is to create a process that
% (eventually) fails, which is represented by the process' line terminating
% early with a cross. For that, we provide \DescribeMacro{\newprocesswithcrash}
-% |\newprocesswithcrash|\marg{name}\marg{length}\marg{crash coordinate name}.
-% The first two arguments are similar to |\newprocesswithlength|, and the latter
-% one is used to provide a name for the coordinate where the crash occurs. This
-% name can later be used to place nodes.
+% |\newprocesswithcrash|\marg{name}\oarg{display name}\marg{length}\marg{crash coordinate name}.
+% The first arguments are similar to |\newprocesswithlength|, and the last one
+% is used to provide a name for the coordinate where the crash occurs. This name
+% can later be used to place nodes.
%
% Of course, we can imagine other combinations (e.g. a process with a length and
% a state interval). We do not provide individual commands for each combination,
@@ -205,17 +211,22 @@
% according to their timestamp\footnote{Notice that nothing prevents sending
% messages in the past, simply set a receiving time before the sending time.}.
%
+% For instance, in Figure~\ref{fig:ex_msg}, we use |\send{p}{1}{q}{2}|.
+%
% In addition, we can label the arrow with the message that is sent with
% \DescribeMacro{\sendwithname}
% |\sendwithname|\marg{sender}\marg{send time}\marg{receiver}\marg{receive
-% time}\marg{label}.
-% For instance, in Figure~\ref{fig:ex_msg}, we use |\send{p}{1}{q}{2}|.
+% time}\marg{label}\oarg{label options}. The \marg{label} contains the label
+% that should be displayed. The package provides default positioning options for
+% the label, which should be acceptable for most cases. Those positioning
+% options can be overridden by \oarg{label options}, which should be \TikZ node
+% options.
%
% Finally, we sometimes distinguish \emph{out-of-band} messages, e.g. messages
% that do not carry informations, but that are for instance used for metadata,
% etc.. We provide the macro
% \DescribeMacro{\sendoutofband}|\sendoutofband|\marg{sender}\marg{send time}\marg{receiver}\marg{receive
-% time}\marg{label}, which behaves similarly to |\sendwithname|, but prints the
+% time}\marg{label}\oarg{label options}, which behaves similarly to |\sendwithname|, but prints the
% message in an other colour.
%
% \begin{figure}
@@ -315,7 +326,7 @@
% A checkpoint can be added with
% \DescribeMacro{\checkpoint}|\checkpoint|\marg{process}\marg{time}\marg{name},
% where \emph{process} is the name of the process which takes a checkpoint,
-% \emph{time} is the the time at which the checkpoint is taken, and \emph{name}
+% \emph{time} is the time at which the checkpoint is taken, and \emph{name}
% is the name of the checkpoint, that is printed next to it, and can be used as
% a coordinate. Notice that the name is printed in a math environment, as we
% expect most checkpoints names to be indexed, e.g.\(c_1\), \(c_2\), etc.
@@ -425,12 +436,12 @@
% Two parts of the package use colours: colouredboxes and out-of-band messages. By
% default both are shades of red. We provide commands to change that if desired.
%
-% \DescribeMacro{\colouredboxcolor}|\colouredboxcolor|\marg{colour} changes the colour
+% \DescribeMacro{\colouredboxcolour}|\colouredboxcolour|\marg{colour} changes the colour
% used for colouredboxes. Notice that this sets both the background colour (which is
% a light variant of the provided colour) and the text colour (which uses the
% provided colour).
%
-% \DescribeMacro{\oobcolor}|\oobcolor|\marg{colour} changes the colour used for
+% \DescribeMacro{\oobcolour}|\oobcolour|\marg{colour} changes the colour used for
% out-of-band messages.
%
% \subsubsection{Coordinates}
@@ -579,14 +590,14 @@
\newcommand{\mp@annotaterotation}{0}
\fi
-\newcommand{\mp@oobcolor}{red}
-\newcommand{\oobcolor}[1]{
- \renewcommand\mp@oobcolor{#1}
+\newcommand{\mp@oobcolour}{red}
+\newcommand{\oobcolour}[1]{
+ \renewcommand\mp@oobcolour{#1}
}
-\newcommand{\mp@colouredboxcolor}{red}
-\newcommand{\colouredboxcolor}[1]{
- \renewcommand\mp@colouredboxcolor{#1}
+\newcommand{\mp@colouredboxcolour}{red}
+\newcommand{\colouredboxcolour}[1]{
+ \renewcommand\mp@colouredboxcolour{#1}
}
\newif\iftimeline
@@ -655,38 +666,42 @@
%
% \begin{macrocode}
%% #1: name
-\newcommand{\newprocess}[1]{
+%% #2: display name
+\NewDocumentCommand{\newprocess}{m o}{
\addtocounter{processnb}{1}
\coordinate (#1) at (0, -\value{processnb});
- \draw (#1) node[anchor=\mp@processnameanchor] {$#1$};
+ \draw (#1) node[anchor=\mp@processnameanchor] {\IfValueTF{#2}{#2}{$#1$}};
}
% \end{macrocode}
%
% \begin{macrocode}
%% #1: name
-%% #2: width
-\newcommand{\newprocesswithlength}[2]{
- \newprocess{#1}
- \processlength{#1}{#2}
+%% #2: display name
+%% #3: width
+\NewDocumentCommand{\newprocesswithlength}{m o m}{
+ \newprocess{#1}[#2]
+ \processlength{#1}{#3}
}
% \end{macrocode}
%
% \begin{macrocode}
%% #1: name
-%% #2: state interval name
-\newcommand{\newprocesswithstateinterval}[2]{
- \newprocess{#1}
- \stateinterval{#1}{0}{#2}
+%% #2: display name
+%% #3: state interval name
+\NewDocumentCommand{\newprocesswithstateinterval}{m o m}{
+ \newprocess{#1}[#2]
+ \stateinterval{#1}{0}{#3}
}
% \end{macrocode}
%
% \begin{macrocode}
%% #1: name
-%% #2: width
-%% #3: crash name
-\newcommand{\newprocesswithcrash}[3]{
- \newprocess{#1}{#2}
- \crash{#1}{#2}{#3}
+%% #2: display name
+%% #3: width
+%% #4: crash name
+\NewDocumentCommand{\newprocesswithcrash}{m o m m}{
+ \newprocess{#1}[#2]{#3}
+ \crash{#1}{#3}{#4}
}
% \end{macrocode}
%
@@ -706,8 +721,13 @@
%% #3: receiver's name
%% #4: receive date
%% #5: message name
-\newcommand{\sendwithname}[5]{
- \draw[->] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3] {#5};
+%% #6: message name display options
+\NewDocumentCommand{\sendwithname}{m m m m m o}{
+ \IfValueTF{#6}{
+ \draw[->] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3, #6] {#5};
+ }{
+ \draw[->] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3] {#5};
+ }
}
% \end{macrocode}
%
@@ -738,8 +758,9 @@
%% #4: receive date
%% #5: state interval name
%% #6: message name
-\newcommand{\sendwithstateintervalandname}[6] {
- \sendwithname{#1}{#2}{#3}{#4}{#6}
+%% #7: message name display options
+\NewDocumentCommand{\sendwithstateintervalandname}{m m m m m m o} {
+ \sendwithname{#1}{#2}{#3}{#4}{#6}[#7]
\stateinterval{#3}{#4}{#5}
}
% \end{macrocode}
@@ -750,8 +771,13 @@
%% #3: receiver's name
%% #4: receive date
%% #5: OoB message name
-\newcommand{\sendoutofband}[5]{
- \draw[->, color=\mp@oobcolor] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3] {#5};
+%% #6: OoB message name display options
+\NewDocumentCommand{\sendoutofband}{m m m m m o}{
+ \IfValueTF{#6}{
+ \draw[->, color=\mp@oobcolour] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3, #6] {#5};
+ }{
+ \draw[->, color=\mp@oobcolour] (#1) +(#2, 0) -- ($ (#3) +(#4, 0) $) node[anchor=\mp@messagelabelanchor, pos=0.3] {#5};
+ }
}
% \end{macrocode}
%
@@ -826,7 +852,7 @@
%% #5: caption
\newcommand{\colouredbox}[5]{
\begin{pgfonlayer}{background}
- \fill[color=\mp@colouredboxcolor!20] ($(#1) + (#3, 0)$) rectangle ($(#2) + (#4, 0)$) node[midway, color = \mp@colouredboxcolor, rotate=\mp@annotaterotation]{#5};
+ \fill[color=\mp@colouredboxcolour!20] ($(#1) + (#3, 0)$) rectangle ($(#2) + (#4, 0)$) node[midway, color = \mp@colouredboxcolour, rotate=\mp@annotaterotation]{#5};
\end{pgfonlayer}
}
% \end{macrocode}
diff --git a/graphics/pgf/contrib/messagepassing/messagepassing.pdf b/graphics/pgf/contrib/messagepassing/messagepassing.pdf
index 410b4d22ca..91e92d0409 100644
--- a/graphics/pgf/contrib/messagepassing/messagepassing.pdf
+++ b/graphics/pgf/contrib/messagepassing/messagepassing.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf
index 2bd736f970..bf929693ef 100644
--- a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf
+++ b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex
index 3e30b249db..b05a67fe68 100644
--- a/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex
+++ b/graphics/pgf/contrib/outilsgeomtikz/doc/OutilsGeomTikz-doc.tex
@@ -4,8 +4,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.4}
-\def\TPdate{18 octobre 2023}
+\def\TPversion{0.1.5}
+\def\TPdate{13 décembre 2023}
\usepackage[table,svgnames]{xcolor}
\usepackage[bold-style=ISO,math-style=french]{concmath-otf}
%\usepackage[bold-style=ISO,math-style=french]{unicode-math}
@@ -197,6 +197,8 @@
\part{Historique}
+\verb|v0.1.4 : |Modification de la graduation intérieure pour les rapporteurs 180°
+
\verb|v0.1.4 : |Possibilité de positionner certains outils avec deux points (angle calculé automatiquement)
\verb|v0.1.3 : |Ajout du \textit{pourcenteur}
@@ -629,6 +631,7 @@ Quelques \Cle{clés} de personnalisation sont disponibles :
\item le booléen \Cle{Fond} pour afficher une couleur de fond ;\hfill~(défaut : \Cle{false})
\item \Cle{CouleurFond} pour la couleur du fond du rapporteur ;\hfill~(défaut : \Cle{black})
\item \Cle{Opacite} pour régler l'opacité du fond du rapporteur ;\hfill~(défaut : \Cle{0.5})
+ \item le booléen \Cle{GraduationsInt} pour afficher les grad. int. (mode 180) ; \hfill~(défaut : \Cle{false})
\item le booléen \Cle{AfficheAngles} pour afficher les valeurs des angles.\hfill~(défaut : \Cle{true})
\end{itemize}
\vspace*{-\baselineskip}\leavevmode
@@ -636,7 +639,7 @@ Quelques \Cle{clés} de personnalisation sont disponibles :
\begin{PresentationCode}{listing only}
%environnement tikz
-\tkzRapporteur[Fond,CouleurFond=purple]
+\tkzRapporteur[Fond,CouleurFond=purple,GraduationsInt]
\tkzRapporteur[Origine={(-2,-3)},Rotation=-45,Couleur=ForestGreen,Echelle=0.5]
\tkzRapporteur[Complet,Origine={(8,-3)},Rotation=30,Couleur=DarkBlue, Echelle=0.75]
\tkzRapporteur[Origine={(7,1)},Rotation=15,Couleur=orange, Echelle=0.75,AfficheAngles=false]
@@ -648,7 +651,7 @@ Quelques \Cle{clés} de personnalisation sont disponibles :
\begin{tikzpicture}
\affichegrille{-4}{11}{-6}{4}
\pointsutiles{(0,0),(-2,-3),(8,-3),(7,1),(2,-4)}
- \tkzRapporteur[Fond,CouleurFond=purple]
+ \tkzRapporteur[Fond,CouleurFond=purple,GraduationsInt]
\tkzRapporteur[Origine={(-2,-3)},Rotation=-45,Couleur=ForestGreen,Echelle=0.5]
\tkzRapporteur[Complet,Origine={(8,-3)},Rotation=30,Couleur=DarkBlue, Echelle=0.75]
\tkzRapporteur[Origine={(7,1)},Rotation=15,Couleur=orange, Echelle=0.75,AfficheAngles=false]
diff --git a/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty b/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty
index 29bc489b0f..bb79723d21 100644
--- a/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty
+++ b/graphics/pgf/contrib/outilsgeomtikz/tex/OutilsGeomTikz.sty
@@ -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/10/18 v0.1.4 Outils geometriques en TikZ]
+\ProvidesPackage{OutilsGeomTikz}[2023/12/13 v0.1.5 Outils geometriques en TikZ]
+% 0.1.5 Modification de la graduation intérieure pour les rapporteurs 180°
% 0.1.4 Possibilité de positionner les outils avec deux points (angle calculé automatiquement)
% 0.1.3 Ajout du pourcenteur
% 0.1.2 Ajout de la règle-repère
@@ -348,7 +349,8 @@
AfficheAngles=true,%
Fond=false,%
Opacite=0.5,%
- Complet=false
+ Complet=false,%
+ GraduationsInt=false
}
\NewDocumentCommand{\tkzRapporteur}{ O{} }{%
@@ -424,8 +426,16 @@
\foreach \i in {0,5,...,180} {\draw[\RAPPcouleur] (\i:3.75)--(\i:3.45) ;}
\foreach \i in {0,10,...,180} {\draw[\RAPPcouleur] (\i:3.75)--(\i:3.35) ;}
%grad int
- \foreach \i in {0,5,...,180} {\draw[\RAPPcouleur] (\i:2.25)--(\i:2.4) ;}
- \foreach \i in {0,10,...,180} {\draw[\RAPPcouleur] (\i:2.25)--(\i:2.55) ;}
+ \ifboolKV[RapporteurGeom]{GraduationsInt}%
+ {%
+ \foreach \i in {0,1,...,180} {\draw[\RAPPcouleur] (\i:2.25)--(\i:2.4) ;}
+ \foreach \i in {0,5,...,180} {\draw[\RAPPcouleur] (\i:2.25)--(\i:2.475) ;}
+ \foreach \i in {0,10,...,180} {\draw[\RAPPcouleur] (\i:2.25)--(\i:2.55) ;}
+ }%
+ {%
+ \foreach \i in {0,5,...,180} {\draw[\RAPPcouleur] (\i:2.25)--(\i:2.45) ;}
+ \foreach \i in {0,10,...,180} {\draw[\RAPPcouleur] (\i:2.25)--(\i:2.55) ;}
+ }%
%valeurs si booléen
\ifboolKV[RapporteurGeom]{AfficheAngles}
{%
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
index 25a14badc7..ab2585e396 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
index 6d4edb7f60..9eba3a694d 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
@@ -5,8 +5,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.8}
-\def\TPdate{29 septembre 2023}
+\def\TPversion{0.1.9}
+\def\TPdate{13 décembre 2023}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
@@ -81,10 +81,10 @@
keywordstyle={\color{violet}},%
classoffset=2,%
alsoletter={-},%
- morekeywords={\MPMPlaceTache,\MPMPlaceNotice,\MPMPlaceDuree,GrapheMPM,TableKarnaugh,\KarnaughCasesResult,\KarnaughBlocRegroup,\MPMPlaceTaches,\MPMPlaceDurees,GrapheTikz,\GrphPlaceSommets,\GrphTraceAretes,\tikzset,\DiagrammeSagittal,\draw,\DiagrammeSagittalCompo,\TableVerite,\SimplificationKarnaugh,\SimplificationBooleenne,\KarnaughCasesAuto},%
+ morekeywords={\MPMPlaceTache,\MPMPlaceNotice,\MPMPlaceDuree,GrapheMPM,TableKarnaugh,\KarnaughCasesResult,\KarnaughBlocRegroup,\MPMPlaceTaches,\MPMPlaceDurees,GrapheTikz,\GrphPlaceSommets,\GrphTraceAretes,\tikzset,\DiagrammeSagittal,\draw,\DiagrammeSagittalCompo,\TableVerite,\SimplificationKarnaugh,\SimplificationBooleenne,\KarnaughCasesAuto,\MatriceAdjacence,\PuissanceMatrice,\NbCheminsLongueur,\FermetureTransitive},%
keywordstyle={\color{green!50!black}},%
classoffset=3,%
- morekeywords={CouleurDurees,CouleurFleches,LargeurCases,Epaisseur,Police,CouleurDates,CouleurBords,NoirBlanc,Grille,DecalHorizDeb,DecalVertDeb,DecalHorizFin,DecalVertFin,Coude,SensCoude,Unite,Variables,Swap,Aide,CouleurCases,Decalage,Couleur,Type,Legende,PosVarLaterale,CouleurLegende,CouleurSommets,TypeSommets,Unite,CouleurFT,DimensionSommets,PositionFleches,EchelleFleches,TypeFleche,Droit,Milieu,AngleGauche,AngleDroite,Boucle,GrphStyleArc,GrphStyleSommet,Poids,GrphStylepoids,DistElem,DistEns,LargEns,NomAppli,CouleurE,CouleurAppli,CouleurF,CouleursFleches,TypeFleche,Epaisseur,Labels,Ensembles,PosLabels,PoliceLabels,Offset,NomApplis,CouleursAppli,VF,LargeursColonnes,CouleurEnonce,CodeAvant,CodeApres,StyleAlternatif,PoliceTT,Espace,Couleurs,Contraire,Enonce},%
+ morekeywords={CouleurDurees,CouleurFleches,LargeurCases,Epaisseur,Police,CouleurDates,CouleurBords,NoirBlanc,Grille,DecalHorizDeb,DecalVertDeb,DecalHorizFin,DecalVertFin,Coude,SensCoude,Unite,Variables,Swap,Aide,CouleurCases,Decalage,Couleur,Type,Legende,PosVarLaterale,CouleurLegende,CouleurSommets,TypeSommets,Unite,CouleurFT,DimensionSommets,PositionFleches,EchelleFleches,TypeFleche,Droit,Milieu,AngleGauche,AngleDroite,Boucle,GrphStyleArc,GrphStyleSommet,Poids,GrphStylepoids,DistElem,DistEns,LargEns,NomAppli,CouleurE,CouleurAppli,CouleurF,CouleursFleches,TypeFleche,Epaisseur,Labels,Ensembles,PosLabels,PoliceLabels,Offset,NomApplis,CouleursAppli,VF,LargeursColonnes,CouleurEnonce,CodeAvant,CodeApres,StyleAlternatif,PoliceTT,Espace,Couleurs,Contraire,Enonce,Bordure,Sommets,Num,PoliceBordure,De,Vers,Formule,Brut,NomMatrice,Longueur,Complet},%
keywordstyle={\color{orange}}
},%
#1
@@ -159,7 +159,7 @@
\vspace{0.15cm}
-{$\blacktriangleright$~~Créer des graphes simples ou des diagrammes sagittaux.
+{$\blacktriangleright$~~Créer des graphes simples ou des diagrammes sagittaux, travailler sur les matrices.
\vspace{0.15cm}
@@ -255,6 +255,8 @@
\section{Historique}
+\verb|v0.1.9|~:~~~~Travail sur les matrices d'adjacence (chemins, puissances, fermeture)
+
\verb|v0.1.8|~:~~~~Possibilité de créer le tableau de Karnaugh via une expression booléenne + Corrections mineures
\verb|v0.1.7|~:~~~~Possibilité de simplifier une expression booléenne \textit{directement} + amélioration des espaces
@@ -1275,6 +1277,153 @@ Pour marquer une fermeture transitive, on peut utiliser le style \verb|FT| dans
\pagebreak
+\section{Matrice d'adjacence, fermeture transitive}
+
+\subsection{Commandes et fonctionnement global}
+
+\begin{tipblock}
+L'idée est de proposer des commandes pour travailler avec l'aspect matriciel des graphes :
+
+\begin{itemize}
+ \item afficher la matrice d'adjacence, avec bordure éventuelle ;
+ \item calculer la puissance $n$-ième d'une matrice d'adjacence, avec bordure éventuelle ;
+ \item déterminer le nombre de chemins de longueur donnée dans un graphe ;
+ \item déterminer la matrice de la fermeture transitive, avec bordure éventuelle.
+\end{itemize}
+
+Quelques éléments de personnalisations sont disponibles.
+\end{tipblock}
+
+\begin{warningblock}
+La commande est accessible \textbf{uniquement} en cas d'une compilation en \hologo{LuaLaTeX} !
+
+\smallskip
+
+Une \textbf{double compilation} peut être nécessaire pour le placement correct des filets !
+
+\smallskip
+
+Les calculs matriciels sont effectués par le package \packagetex!lualinalg! (\url{https://ctan.org/pkg/lualinalg}), mais les sorties sont parfois \textit{modifiées} pour une présentation adaptée avec des matrices bordées.
+
+\smallskip
+
+Les matrices sont à déclarer sous une forme particulière, sous la forme \verb|{{ligne1},{ligne2},{...}}| avec \verb|ligne1={e1,e2,...}|.
+\end{warningblock}
+
+\subsection{Matrice d'adjacence, puissance}
+
+\begin{cautionblock}
+La commande dédiée à la l'affichage d'une matrice d'adjacence \motcletex!\MatriceAdjacence!.
+
+\smallskip
+
+La commande dédiée à la l'affichage d'une puissance d'une matrice d'adjacence \motcletex!\PuissanceMatrice!.
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+%affichage de la matrice d'adjdacence
+\MatriceAdjacence[clés]{matrice}
+
+%affichage de la puissance
+\PuissanceMatrice[clés]{matrice}{exposant}
+\end{DemoCode}
+
+\begin{tipblock}
+Les \Cle{clés} (communes) disponibles sont :
+
+\begin{itemize}
+ \item \Cle{Bordure} := booléen pour border la matrice ; \hfill{}défaut : \Cle{false}
+ \item \Cle{Sommets} := sommets du graphe (uni-caractères) ; \hfill{}défaut : \Cle{ABCDE...}
+ \item \Cle{Num} := booléen pour formater avec \packagetex!siunitx! (si chargé !) ; \hfill{}défaut : \Cle{false}
+ \item \Cle{PoliceBordure} := spécifier la police (taille) de la bordure.\hfill{}défaut : \Cle{\textbackslash footnotesize}
+\end{itemize}
+
+Le deuxième argument, optionnel et entre \texttt{<...>} permet de spécifier la matrice (comme indiqué précédemment) avec laquelle on travaille.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\def\MatriceAdj{{{0,1,1,1},{0,0,1,0},{0,1,0,1},{1,0,0,1}}}
+On considère la matrice d'adjacence $M = \MatriceAdjacence{\MatriceAdj}$.\par
+On considère la matrice d'adjacence $M = \MatriceAdjacence[Bordure]{\MatriceAdj}$.\par
+On considère la matrice d'adjacence $M = \MatriceAdjacence[Bordure,Sommets=JKLM]{\MatriceAdj}$.\par
+\end{DemoCode}
+
+\subsection{Chemins de longueur donnée}
+
+\begin{cautionblock}
+La commande dédiée au calcul du nombre de chemins de longueur donnée dans un graphe est \motcletex!\NbCheminsLongueur!.
+
+\smallskip
+
+Pour le moment la commande ne calcule \textit{que} le nombre de chemins de longueur donnée entre deux sommets.
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+%calcul du nombre de chemins
+\NbCheminsLongueur[Longueur=...,De=...,Vers=...,clés]{matrice}
+\end{DemoCode}
+
+\begin{tipblock}
+Les \Cle{clés} disponibles sont :
+
+\begin{itemize}
+ \item \Cle{Sommets} := sommets du graphe (uni-caractères) ; \hfill{}défaut : \Cle{ABCDE...}
+ \item \Cle{Num} := booléen pour formater avec \packagetex!siunitx! (si chargé !).\hfill{}défaut : \Cle{false}
+\end{itemize}
+
+Les clés \Cle{De}, \Cle{Vers} et \Cle{Longueur} sont \textit{nécessaires} et doivent être cohérentes avec la liste des sommets.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\def\MatriceAdjB{{{1,1,0,0,0},{1,0,1,0,0},{1,0,0,1,0},{1,1,0,0,0},{0,0,0,1,0}}}
+On donne $M = \MatriceAdjacence[Bordure,Sommets=JKLMN]{\MatriceAdjB}$.\par
+On a $M^5 = \PuissanceMatrice[Bordure,Sommets=JKLMN]{\MatriceAdjB}{5}$, il existe \NbCheminsLongueur[Longueur=5,De=J,Vers=L,Sommets=JKLMN]{\MatriceAdjB} chemins de longueur 5 allant de $J$ vers $L$.
+\end{DemoCode}
+
+\subsection{Matrice de fermeture transitive}
+
+\begin{cautionblock}
+La commande dédiée pour travailler sur la matrice de fermeture transitive d'un graphe est \motcletex!\FermetureTransitive!.
+
+\smallskip
+
+Quelques options de \textit{présentation} sont disponibles pour cette commande.
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+%matrice de fermeture transitive
+\FermetureTransitive[clés]{matrice}
+\end{DemoCode}
+
+\begin{tipblock}
+Les \Cle{clés} disponibles sont :
+
+\begin{itemize}
+ \item \Cle{Sommets} := sommets du graphe (uni-caractères) ; \hfill{}défaut : \Cle{ABCDE...}
+ \item \Cle{Formule} := booléen pour afficher la formule ; \hfill{}défaut : \Cle{false}
+ \item \Cle{Brut} := booléen pour afficher le résultat brut de la calculatrice ; \hfill{}défaut : \Cle{false}
+ \item \Cle{Enonce} := booléen pour afficher le nom au début ; \hfill{}défaut : \Cle{false}
+ \item \Cle{NomMatrice} := nom de la matrice d'adjacence ; \hfill{}défaut : \Cle{M}
+ \item \Cle{Bordure} := booléen pour border la matrice ; \hfill{}défaut : \Cle{false}
+ \item \Cle{Sommets} := sommets du graphe (uni-caractères) ; \hfill{}défaut : \Cle{ABCDE...}
+ \item \Cle{PoliceBordure} := spécifier la police (taille) de la bordure.\hfill{}défaut : \Cle{\textbackslash footnotesize}
+\end{itemize}
+
+À noter qu'une clé booléenne, \Cle{Complet}, existe, et qui active \Cle{Formule} et \Cle{Enonce}.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\def\MatriceAdjC{{{1,1,1,1},{0,0,0,1},{0,1,0,0},{0,0,1,0}}}
+
+\FermetureTransitive{\MatriceAdjC} et \FermetureTransitive[Brut]{\MatriceAdjC}
+
+On a \FermetureTransitive[Brut,Formule]{\MatriceAdjC}.
+
+Donc \FermetureTransitive[Complet,Bordure,Sommets=XYZF]{\MatriceAdjC}.
+\end{DemoCode}
+
+\pagebreak
+
\section{Diagramme sagittal d'une application}
\subsection{Commande et fonctionnement global}
@@ -1538,7 +1687,7 @@ Le tableau est créé grâce au package \packagetex!nicematrix!.
\begin{importantblock}
Une \textbf{double compilation} peut être nécessaire pour le placement correct des filets !
-Les fonction \textsf{LUA} utilisées sont issues du \packagetex!luatruthtable!, elles sont légèrement modifiées pour \textit{coller} à une présentation plus classique.
+Les fonctions \textsf{LUA} utilisées sont issues du \packagetex!luatruthtable!, elles sont légèrement modifiées pour \textit{coller} à une présentation plus classique.
\end{importantblock}
\begin{DemoCode}[listing only]
diff --git a/graphics/pgf/contrib/profsio/tex/ProfSio.sty b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
index 20c2729ffc..12d1804ec0 100644
--- a/graphics/pgf/contrib/profsio/tex/ProfSio.sty
+++ b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
@@ -3,7 +3,8 @@
% : Luatruthtable from Chetan Shirore and Dr. Ajit Kumar https://ctan.org/pkg/luatruthtable
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfSio}[2023/09/29 0.1.8 Pour les enseignants de Maths en BTS SIO]
+\ProvidesPackage{ProfSio}[2023/12/13 0.1.9 Pour les enseignants de Maths en BTS SIO]
+%0.1.9 Travail sur les chemins de longueur donnée + fermeture transitive
%0.1.8 Possibilité de représenter une table de Karnaugh via son expression + corrections mineures
%0.1.7 Ajout des simplifications booléennes d'expressions classiques
%0.1.6 Correction dans les simplifications de Karnaugh + Possibilité de travailler avec le contraire
@@ -1855,4 +1856,127 @@ end
}
}
+%------Chemins de longueur donnée + fermeture transitive
+\ifluatex
+\RequirePackage{lualinalg}
+
+\setKVdefault[MatAdj]{Bordure=false,Sommets=ABCDEFGHIJKLMNOPQRSTUVWXYZ,Num=false,PoliceBordure=\footnotesize}
+
+\NewDocumentCommand\MatriceAdjacence{ O{} m }{%
+ \restoreKV[MatAdj]%
+ \setKV[MatAdj]{#1}%
+ %on définit la matrice
+ \matrixNew{M}{#2}%
+ %formatage
+ \ifboolKV[MatAdj]{Bordure}%
+ {%
+ \ensuremath{%
+ \begin{pNiceMatrix}[first-row,first-col]
+ \xintFor* ##1 in {\xintSeq{1}{\matrixNumRows{M}}}\do{&\Block{1-1}<\useKV[MatAdj]{PoliceBordure}>{\StrChar{\useKV[MatAdj]{Sommets}}{##1}}} \\
+ \xintFor* ##1 in {\xintSeq{1}{\matrixNumRows{M}}}\do{%
+ \Block{1-1}<\scriptsize>{\StrChar{\useKV[MatAdj]{Sommets}}{##1}} \xintFor* ##2 in {\xintSeq{1}{\matrixNumRows{M}}}\do{&\ifboolKV[MatAdj]{Num}{\num{\matrixGetElement{M}{##1}{##2}}}{\matrixGetElement{M}{##1}{##2}}} \\
+ }%
+ \end{pNiceMatrix}%
+ }%
+ }%
+ {%
+ \ensuremath{\matrixPrint[type=pmatrix]{M}}
+ }%
+}
+
+\NewDocumentCommand\PuissanceMatrice{ O{} m m }{%
+ \restoreKV[MatAdj]%
+ \setKV[MatAdj]{#1}%
+ %on définit la matrice
+ \matrixNew{M}{#2}%
+ \matrixOp{Mpuiss}{M^#3}%
+ %formatage
+ \ifboolKV[MatAdj]{Bordure}%
+ {%
+ \ensuremath{%
+ \begin{pNiceMatrix}[first-row,first-col]
+ \xintFor* ##1 in {\xintSeq{1}{\matrixNumRows{M}}}\do{&\Block{1-1}<\useKV[MatAdj]{PoliceBordure}>{\StrChar{\useKV[MatAdj]{Sommets}}{##1}}} \\
+ \xintFor* ##1 in {\xintSeq{1}{\matrixNumRows{M}}}\do{%
+ \Block{1-1}<\useKV[MatAdj]{PoliceBordure}>{\StrChar{\useKV[MatAdj]{Sommets}}{##1}} \xintFor* ##2 in {\xintSeq{1}{\matrixNumRows{M}}}\do{&\ifboolKV[MatAdj]{Num}{\num{\matrixGetElement{Mpuiss}{##1}{##2}}}{\matrixGetElement{Mpuiss}{##1}{##2}}} \\
+ }%
+ \end{pNiceMatrix}%
+ }%
+ }%
+ {%
+ \ensuremath{\matrixPrint[type=pmatrix]{Mpuiss}}
+ }%
+}
+
+\defKV[GrphNbChemLg]{De=\def\GrphNbChemLgDeb{#1},Vers=\def\GrphNbChemLgFin{#1},Sommets=\def\GrphNbChemLgSomm{#1}}
+\setKVdefault[GrphNbChemLg]{Longueur=2,De=A,Vers=A,Sommets={ABCDEFGHIJKLMNOPQRSTUVWXYZ},Num=false}
+
+\NewDocumentCommand\NbCheminsLongueur{ O{} m }{%
+ \restoreKV[GrphNbChemLg]%
+ \setKV[GrphNbChemLg]{#1}%
+ %on définit la matrice
+ \matrixNew{M}{#2}%
+ \StrPosition{\GrphNbChemLgSomm}{\GrphNbChemLgDeb}[\nbcheminsdepart]%
+ \StrPosition{\GrphNbChemLgSomm}{\GrphNbChemLgFin}[\nbcheminsarrivee]%
+ %on calcule la puissance
+ \matrixOp{Mpuiss}{M^\useKV[GrphNbChemLg]{Longueur}}%
+ %test !!
+ \ifboolKV[GrphNbChemLg]{Num}%
+ {%
+ \num{\matrixGetElement{Mpuiss}{\nbcheminsdepart}{\nbcheminsarrivee}}%
+ }%
+ {%
+ \matrixGetElement{Mpuiss}{\nbcheminsdepart}{\nbcheminsarrivee}%
+ }%
+}
+
+\setKVdefault[GrphFermTrans]{Enonce=false,Formule=false,Brut=false,NomMatrice=M,Bordure=false,Sommets=ABCDEFGHIJKLMNOPQRSTUVWXYZ,Num=false,PoliceBordure=\footnotesize,Complet=false}
+
+\NewDocumentCommand\FermetureTransitive{ O{} m }{%
+ \restoreKV[GrphFermTrans]%
+ \setKV[GrphFermTrans]{#1}%
+ \matrixNew{M}{#2}%
+ %formule de calcul
+ \xdef\FermTransFormule{M}%
+ \xintFor* ##1 in {\xintSeq{2}{\matrixNumRows{M}}}\do{%
+ \xdef\FermTransFormule{\FermTransFormule+M^##1}%
+ }%
+ \matrixOp{MFT}{\FermTransFormule}%
+ %gestion de la clé complète
+ \ifboolKV[GrphFermTrans]{Complet}%
+ {%
+ \setKV[GrphFermTrans]{Enonce=true,Formule=true}%
+ }%
+ {}%
+ %simplification éventuelle
+ \ifboolKV[GrphFermTrans]{Brut}%
+ {%
+ \ensuremath{\ifboolKV[GrphFermTrans]{Formule}{\useKV[GrphFermTrans]{NomMatrice} \xintFor* ##1 in {\xintSeq{2}{\matrixNumRows{M}}}\do{+\useKV[GrphFermTrans]{NomMatrice}^{##1}}=}{}\matrixPrint[type=pmatrix]{MFT}}%
+ }%
+ {%
+ \xintFor* ##1 in {\xintSeq{1}{\matrixNumRows{M}}}\do{%lignes
+ \xintFor* ##2 in {\xintSeq{1}{\matrixNumRows{M}}}\do{%colonnes
+ \xintifboolexpr{\matrixGetElement{MFT}{##1}{##2} == 0}%
+ {}%
+ {\matrixSetElement{MFT}{##1}{##2}{1}}%
+ }%
+ }%
+ \ifboolKV[GrphFermTrans]{Bordure}%
+ {%
+ \ensuremath{%
+ \ifboolKV[GrphFermTrans]{Enonce}{\widehat{\useKV[GrphFermTrans]{NomMatrice}}=}{}\ifboolKV[GrphFermTrans]{Formule}{\useKV[GrphFermTrans]{NomMatrice} \xintFor* ##1 in {\xintSeq{2}{\matrixNumRows{M}}}\do{\oplus\useKV[GrphFermTrans]{NomMatrice}^{[##1]}}=}{}%
+ \begin{pNiceMatrix}[first-row,first-col]
+ \xintFor* ##1 in {\xintSeq{1}{\matrixNumRows{M}}}\do{&\Block{1-1}<\useKV[GrphFermTrans]{PoliceBordure}>{\StrChar{\useKV[GrphFermTrans]{Sommets}}{##1}}} \\
+ \xintFor* ##1 in {\xintSeq{1}{\matrixNumRows{M}}}\do{%
+ \Block{1-1}<\useKV[GrphFermTrans]{PoliceBordure}>{\StrChar{\useKV[GrphFermTrans]{Sommets}}{##1}} \xintFor* ##2 in {\xintSeq{1}{\matrixNumRows{M}}}\do{&\matrixGetElement{MFT}{##1}{##2}} \\
+ }%
+ \end{pNiceMatrix}%
+ }%
+ }%
+ {%
+ \ensuremath{\ifboolKV[GrphFermTrans]{Enonce}{\widehat{\useKV[GrphFermTrans]{NomMatrice}}=}{}\ifboolKV[GrphFermTrans]{Formule}{\useKV[GrphFermTrans]{NomMatrice} \xintFor* ##1 in {\xintSeq{2}{\matrixNumRows{M}}}\do{\oplus\useKV[GrphFermTrans]{NomMatrice}^{[##1]}}=}{}\matrixPrint[type=pmatrix]{MFT}}%
+ }%
+ }%
+}
+\fi
+
\endinput \ No newline at end of file