summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-06-24 03:01:43 +0000
committerNorbert Preining <norbert@preining.info>2023-06-24 03:01:43 +0000
commit36c52277a7e7e1b9f3de0286cfd1f5931a60d802 (patch)
treec1b84888133e9c7ea9039cca1f67b822629b6076 /graphics
parentddaf122566480fe48b9786c172e647ca0ea4c6d5 (diff)
CTAN sync 202306240301
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/changelog.tex40
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdfbin13455 -> 13465 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdfbin1671007 -> 1683675 bytes
-rw-r--r--graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex148
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/circuitikz.sty4
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex17
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex64
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex86
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex5
-rw-r--r--graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex4
-rw-r--r--graphics/pgf/contrib/profsio/README.md7
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdfbin0 -> 611341 bytes
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex997
-rw-r--r--graphics/pgf/contrib/profsio/tex/ProfSio.sty543
14 files changed, 1822 insertions, 93 deletions
diff --git a/graphics/pgf/contrib/circuitikz/doc/changelog.tex b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
index f41bdc4105..87c6966223 100644
--- a/graphics/pgf/contrib/circuitikz/doc/changelog.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/changelog.tex
@@ -5,6 +5,40 @@ full list of changes.
\begin{itemize}
\item
+ Version 1.6.3 (2023-06-23)
+
+ The main change is that the definition of the ``plus'' and ``minus''
+ symbols used in several parts of the library has changed in order to
+ achieve better alignment of voltages and amplifier symbols when using
+ fonts different from Computer Modern. Additionally, internal
+ connection dots in transistors are configurable and have a new
+ default, and documentation has got several fixes and enhancements.
+
+ \begin{itemize}
+ \tightlist
+ \item
+ Change the definition of the ``minus'' symbol (see
+ \href{https://github.com/circuitikz/circuitikz/issues/721}{this
+ issue}) for details
+ \item
+ Add documentation on how to contact the border of the source symbols
+ (suggested by
+ \href{https://github.com/circuitikz/circuitikz/issues/722}{user
+ \texttt{@Tipounk} on GitHub})
+ \item
+ in transistors, solder dots and connection dots for body diodes
+ \href{https://github.com/circuitikz/circuitikz/issues/720}{are now
+ configurable}
+ \item
+ Add anchors for the symbols on the \texttt{oo}-type sources,
+ suggested
+ \href{https://github.com/circuitikz/circuitikz/issues/725}{by user
+ @lapreindl on GitHub}; the symbols have been slightly changed and
+ repositioned in the process
+ \item
+ several documentation fixes
+ \end{itemize}
+\item
Version 1.6.2 (2023-05-13)
Several more styling options for elements (body diodes, transformers,
@@ -15,7 +49,7 @@ full list of changes.
\begin{itemize}
\tightlist
\item
- there is no \texttt{siunitx} support for ConTeXt, point to the
+ There is no \texttt{siunitx} support for ConTeXt, point to the
\texttt{units} package
\item
\texttt{context} compatibility can have glitches: please see
@@ -184,7 +218,7 @@ full list of changes.
B. Cameron, user \texttt{@cameroncb1} on GitHub)
\item
Added Shockley diode (suggested by
- {[}@dauph{]}(https://tex.stackexchange.com/questions/646039/creating-a-shockley-diode-in-circuitikz))
+ \href{https://tex.stackexchange.com/questions/646039/creating-a-shockley-diode-in-circuitikz}{@dauph})
\end{itemize}
\item
Version 1.5.2 (2022-05-08)
@@ -1362,7 +1396,7 @@ A detailed list of changes can be seen below.
\item
Fixed varcap symbol at small scalings
\item
- New packet-option "straightvoltages, to draw straight(no curved)
+ New packet-option ``straightvoltages, to draw straight(no curved)
voltage arrows
\item
New option ``invert'' to revert the node direction at paths
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
index 38e09a504f..cb7c63ffd9 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikz-context.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
index fdf7e67f8e..89935d1d3b 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
index 983f759a43..d331f510b5 100644
--- a/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
+++ b/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.tex
@@ -249,6 +249,18 @@ The \texttt{use fpu reciprocal} key seems to have no side effects, but given tha
Here, we will provide a list of incompatibilities between different versions of \Circuitikz. We will try to hold this list short, but sometimes it is easier to break with old syntax than include a lot of switches and compatibility layers. In general, changes that would invalidate a circuit (changes of polarity of components and so on) are almost always protected by a flag; the same is not true for purely aesthetic changes.
If unsure, you can check the version in your local installation by using the macro \verb!\pgfcircversion{}!.
\begin{itemize}
+ \item Since version \texttt{1.6.3} the default symbol for the minus sign changed from the simple \verb|$-$| to \verb|$\vphantom{+}-$|. The reason is that in some (most?) font, the minus sign is enclosed in a smaller bounding box than the plus sign and that leads to poorly aligned minus symbols in \texttt{american} and \texttt{raised} voltages. This was not noticed before because the two symbols share the same bounding box in the default Computer Modern font. You can look at \href{https://github.com/circuitikz/circuitikz/issues/721}{this issue on GitHub} for more details; if you want to go back to the previous definitions you can write
+ \begin{lstlisting}
+ \ctikzset{amplifiers/minus=$-$}
+ \ctikzset{bipoles/cvsourceam/inner minus=$-$}
+ \ctikzset{bipoles/vsourceam/inner minus=$-$}
+ \ctikzset{voltage/american minus=$-$}
+ \end{lstlisting}
+ \item Since version \texttt{1.6.3} the size of the solder dot and the connection dot of the body diodes for transistors has changed (now they are the same and are configurable). The new default scale of~\texttt{0.7} makes the dots \emph{area} more or less one half the one of the external connections. You can go back to the previous values with
+ \begin{lstlisting}
+ \ctikzset{transistor bodydiode/dot scale=0.5,
+ transistor solderdot scale=1.0}
+ \end{lstlisting}
\item Since version \texttt{1.6.2} \texttt{siunitx} will \textbf{not} work anymore with \ConTeXt{} (it was a very poor simulation layer, anyway); it has been disabled in upstream \ConTeXt, in favor of \href{https://www.pragma-ade.nl/general/manuals/units-mkiv.pdf}{its own \texttt{units} module}.
\item Version \texttt{1.6.0} has a big rewrite of the block's code. In principle the changes are backward-compatible, but there were several bugs (wrong anchors, errors with rotations, and so on) that have been fixed in the process.
\item Since \texttt{v1.5.1}\footnote{Do not use \texttt{v1.5.0}, it's buggy.} color management (see section~\ref{sec:colors}) and the details of how the shapes are drawn and protected by the external drawing options has changed. There should be no substantial changes to the circuits, though.
@@ -2712,6 +2724,24 @@ The transformer shapes vector group options can be specified for the primary (\t
\end{circuitikz}
\end{LTXexample}
+These two ``sources'' have additional anchors that reach the center of the symbol;\footnote{Suggested by \href{https://github.com/circuitikz/circuitikz/issues/725}{user @lapreindl on GitHub}.} they are used sometimes to add a (symbolic) connection there, like for example a ground connection.
+
+\begin{LTXexample}[varwidth=true]
+\begin{tikzpicture}[european, scale=2, transform shape,
+ smalldot/.style={draw, circle,red, inner sep=0.2pt}]
+ \draw (0,0) to[oosourcetrans, name=A,
+ prim=delta, sec=wye] ++(1,0)
+ to[ooosource, name=B, prim=wye, sec=zig,
+ tert=delta] ++(1,0)
+ (A.symbolsec) -- ++(-45:0.5) node[ground]{};
+ \node [smalldot] at (A.symbolprim) {};
+ \node [smalldot] at (A.symbolsec) {};
+ \node [smalldot] at (B.symbolprim) {};
+ \node [smalldot] at (B.symbolsec) {};
+ \node [smalldot] at (B.symboltert) {};
+\end{tikzpicture}
+\end{LTXexample}
+
\subsubsection{Nullator and norator}
These are special elements used in some approaches to model ideal amplifiers\footnote{See \href{https://en.m.wikipedia.org/wiki/Nullor}{the Wikipedia article}; suggested by \href{https://github.com/circuitikz/circuitikz/issues/615}{user atticus-sullivan on GitHub}.}.
@@ -2802,7 +2832,7 @@ If instead of an angle value you use \texttt{auto}, the symbol will be rotated s
\paragraph{Polarity symbols.}
The symbols drawn into the \texttt{american voltage source}\footnote{Since version \texttt{1.1.0}, thanks to the suggestions and discussion
-\href{https://tex.stackexchange.com/questions/538723/circuitikz-what-should-i-do-to-put-the-and-on-the-appropriate-places-like-t}{in this TeX.SX question}.} can be changed by using the \verb|\ctikzset| keys \texttt{bipoles/vsourceam/inner plus} and \texttt{.../inner minus} (by default they are \verb|$+$| and \verb|$-$| respectively, in the current font), and move them nearer of farther away by twiddling \texttt{bipoles/vsourceam/margin} (default \texttt{0.7}, less means nearer).
+\href{https://tex.stackexchange.com/questions/538723/circuitikz-what-should-i-do-to-put-the-and-on-the-appropriate-places-like-t}{in this TeX.SX question}.} can be changed by using the \verb|\ctikzset| keys \texttt{bipoles/vsourceam/inner plus} and \texttt{.../inner minus} (by default they are \verb|$+$| and \verb|$\vphantom{+}-$| respectively, in the current font), and move them nearer of farther away by twiddling \texttt{bipoles/vsourceam/margin} (default \texttt{0.7}, less means nearer). The reason of the \verb|\vphantom| can be found in section~\ref{sec:american-voltage-custom}.
You can do the same with the \texttt{american controlled voltage sources}, substituting \texttt{cvsourceam} to \texttt{vsourceam} (notice the initial ``\texttt{c}'').
@@ -2841,6 +2871,36 @@ the waveform ones (see above). Additionally, you can scale them up and down by c
\end{circuitikz}
\end{LTXexample}
+\subsubsection{Source borders}
+
+Unfortunately, the border of the sources is only easily accessed if some anchor is provided.
+The border anchors of the shapes are not tight on them (see section~\ref{sec:bipoles-border-anchors}), which is not easily changeable, given that the algorithm that positions the labels depends on it.
+
+On the other hand, \TikZ{} powerful partway coordinate calculation (around section 13.5.3 of the manual) makes it possible to easily identify points on a circle if the center and one point of the circle are known, as you can see in the following example.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+\begin{tikzpicture}[]
+ \path (0,0) to[oosourcetrans, name=T, ]++(2,0);
+ % Use partway modifiers to reach a point on the left circle
+ \draw ($(T.centerprim)!1!45:(T.left)$) -- ++(-135:0.2)
+ -- ++(0,-1) node[ground]{};
+ \begin{scope}[font=\tiny\ttfamily, pin distance=2mm, inner sep=0pt]
+ \foreach \a in {-90,-45,...,90}
+ \node [circ, scale=0.5, pin=\a:\a, color=red] at
+ ($(T.centersec)!1!\a:(T.right)$){};
+ \end{scope}
+\end{tikzpicture}
+\end{LTXexample}
+
+A similar approach can be used for dependent sources. Just remember that the anchors move (rotate) together with the component.
+
+\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
+ \begin{tikzpicture}[american]
+ \draw (0,0) to [cvsource, name=S] ++(0,2);
+ \node [circ,red] at ($(S.e)!0.3333!(S.n)$) {};
+ \node [circ,blue] at ($(S.e)!0.6666!(S.n)$) {};
+ \end{tikzpicture}
+\end{LTXexample}
\subsection{Instruments}
@@ -3813,7 +3873,7 @@ Basically they are the same as the normal \texttt{npn} and \texttt{pnp}, and the
\circuitdesc{GaN hemt}{Gallium Nitride hemt (a ``styled'' \texttt{hemt}, see~\ref{sec:hemt})}{Q}( G/180/0.2,D/0/0.2,S/0/0.2, nogate/-120/0.2)
\end{groupdesc}
-\textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option \texttt{solderdot} and \texttt{nosolderdot}, respectively.
+\textsc{nfet}s and \textsc{pfet}s have been incorporated based on code provided by Clemens Helfmeier and Theodor Borsche. Use the package options \texttt{fetsolderdot}/\texttt{nofetsolderdot} to enable/disable solderdot at some fet-transistors. Additionally, the solderdot option can be enabled/disabled for single transistors with the option \texttt{solderdot} and \texttt{nosolderdot}, respectively (You can adjust the size of the solder dot, see section~\ref{sec:solderdot-scale}).
\begin{groupdesc}
\circuitdesc{nfet}{nfet}{Q}(G/180/0.1, D/0/0.1, S/0/0.1)
@@ -3940,6 +4000,33 @@ If the option \texttt{arrowmos} is used (or after the command \verb!\ctikzset{tr
You can go back to the no-arrows mos with \texttt{noarrowmos} locally or with
\texttt{\textbackslash ctikzset\{tripoles/mos style/no arrows\}}.
+To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the command
+\\\verb!\ctikzset{tripoles/pmos style/emptycircle}!. To remove the dot completely (only useful if you have \texttt{arrowmos} enabled, otherwise there will be no difference between P-MOS and N-MOS), you can use the option \texttt{nocircle} or \verb|\ctikzset{tripoles/pmos style/nocircle}|.
+
+\begin{groupdesc}
+ \circuitdesc{pmos,emptycircle}{pmos}{}
+ \circuitdesc{pmos,nocircle,arrowmos}{pmos}{}
+\end{groupdesc}
+
+This example show the combined effects of the arrows and gate-circle options:
+
+\begin{LTXexample}[varwidth=true]
+\begin{circuitikz}[
+ info/.style={left=1cm, blue, text width=5em, align=right},]
+ \draw (0,1) node{pmos} (2,1) node{nmos};
+ \draw (0,0) node[info]{default} node[pmos]{} (2,0) node[nmos]{};
+ \ctikzset{tripoles/mos style/arrows}
+ \draw (0,-2) node[info]{arrows} node[pmos]{} (2,-2) node[nmos]{};
+ \ctikzset{tripoles/pmos style/emptycircle}
+ \draw (0,-4) node[info]{emptycircle} node[pmos]{} (2,-4) node[nmos]{};
+ \ctikzset{tripoles/pmos style/nocircle}
+ \draw (0,-6) node[info]{nocircle} node[pmos]{} (2,-6) node[nmos]{};
+ \ctikzset{tripoles/mos style/no arrows}
+ \draw (0,-8) node[info, red]{no circle, no arrows, DON'T do it}
+ node[pmos]{} (2,-8) node[nmos]{};
+\end{circuitikz}
+\end{LTXexample}
+
You can also change\footnote{Thanks to the idea by \href{https://github.com/circuitikz/circuitikz/issues/655}{Dr. Matthias Jung on GitHub}.} the type of the arrow for the ``light rays'' of the phototransistors with the generic arrows options shown in~\ref{sec:tunablearrows}, using the name \texttt{opto}, like in the following (overdone) example. Also the \texttt{opto arrows} styling options (see section~\ref{sec:opto-arrows}).
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
@@ -4125,14 +4212,6 @@ Normally, in bipolar IGBTs the outer base is the same size (height) of the inner
\end{circuitikz}
\end{LTXexample}
-To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the command
-\\\verb!\ctikzset{tripoles/pmos style/emptycircle}!. To remove the dot completely (only useful if you have \texttt{arrowmos} enabled, otherwise there will be no difference between P-MOS and N-MOS), you can use the option \texttt{nocircle} or \verb|\ctikzset{tripoles/pmos style/nocircle}|.
-
-\begin{groupdesc}
- \circuitdesc{pmos,emptycircle}{pmos}{}
- \circuitdesc{pmos,nocircle,arrowmos}{pmos}{}
-\end{groupdesc}
-
\paragraph{Bulk terminals.} You can add a bulk terminal\footnote{Thanks to Burak Kelleci <kellecib@hotmail.com>.} to \texttt{nmos} and \texttt{pmos} using the key \texttt{bulk} in the node (and \texttt{nobulk} if you set the bulk terminal by default); additional anchors \texttt{bulk} and \texttt{nobulk} are added (in the next example, \texttt{tripoles/mos style/arrows} is enacted, too):
\begin{groupdesc}
@@ -4146,21 +4225,19 @@ To draw the PMOS circle non-solid, use the option \texttt{emptycircle} or the co
\footnotetext{Since \texttt{v1.4.4}, noticed by \href{https://tex.stackexchange.com/q/619334/38080}{user \texttt{hinata exc} on Stack Exchange}.}
\end{groupdesc}
+
+\paragraph{Solder dots.}\label{sec:solderdot-scale}
+Solder dots are scaled-down\footnote{Since \texttt{v1.6.3}, suggested by \href{https://tex.stackexchange.com/q/687225/38080}{user Hartomes on TeX StackExchange}; previously, the default scale was \texttt{1.0}, which created a clash with body diodes.} version of the normal \texttt{circ} connection dot (\emph{pole}).
+This is to convey the information that the connection is \emph{internal} to the device, and not controllable from the outside. By default, they are scaled as the bodydiode connection dots (see section~\ref{sec:trans-bodydiode-custom}), but you can change them with the command \texttt{\textbackslash ctikzset\{transistor solderdot scale=\emph{x}\}}, where $x$ is the scale with respect to the normal \texttt{circ} node (default: \texttt{0.7}).
+
\begin{LTXexample}[varwidth=true]
-\begin{circuitikz}[
- info/.style={left=1cm, blue, text width=5em, align=right},]
- \draw (0,1) node{pmos} (2,1) node{nmos};
- \draw (0,0) node[info]{default} node[pmos]{} (2,0) node[nmos]{};
- \ctikzset{tripoles/mos style/arrows}
- \draw (0,-2) node[info]{arrows} node[pmos]{} (2,-2) node[nmos]{};
- \ctikzset{tripoles/pmos style/emptycircle}
- \draw (0,-4) node[info]{emptycircle} node[pmos]{} (2,-4) node[nmos]{};
- \ctikzset{tripoles/pmos style/nocircle}
- \draw (0,-6) node[info]{nocircle} node[pmos]{} (2,-6) node[nmos]{};
- \ctikzset{tripoles/mos style/no arrows}
- \draw (0,-8) node[info, red]{no circle, no arrows, DON'T do it}
- node[pmos]{} (2,-8) node[nmos]{};
-\end{circuitikz}
+\begin{tikzpicture}[]
+ \draw (0,0) to[short,*-] ++(.1,0)
+ node[nigfete, solderdot, anchor=G]{};
+ \ctikzset{transistor solderdot scale=1}
+ \draw (2,0) to[short,*-] ++(.1,0)
+ node[nigfete, solderdot, anchor=G]{};
+\end{tikzpicture}
\end{LTXexample}
\paragraph{Simplified symbols for depletion-mode MOSFETs}.
@@ -4342,6 +4419,7 @@ You can change the style of the bodydiode\footnote{Suggested by \href{https://te
color & default & stroke color: \texttt{default} is the same as the component \\
dash & default & dash pattern: \texttt{default} means not to change the setting for the component; \texttt{none} means unbroken line; every other input is a dash pattern\footnotemark \\
scale & 0.3 & scale of the diode, with respect to the basic (not scaled) diode dimension.\\
+ dot scale & 0.7 & scale of bodydiode connections dots, with respect to the \texttt{circ} pole. Use zero to remove them (useful if you have circles around the transistor).\\
\bottomrule
\end{tabular}
\footnotetext{Follows the syntax of the pattern sequence \texttt{\textbackslash pgfsetdash} --- see \TikZ{} manual for details; phase is always zero. Basically you pass pairs of dash-length -- blank-length dimensions, see the examples.}
@@ -4356,9 +4434,10 @@ The following is a quite extensive example. Obviously, a good strategy in this c
circuitikz/transistor bodydiode/relative thickness=0.3}]
\draw (0,0) node (mosfet1) [nigfete,anchor=D,bodydiode] {$Q_1$};
\draw[densely dashed] (3,0) node (mosfet1) [nigfete,anchor=D,bodydiode] {$Q_2$};
- \draw (6,0) node (mosfet1) [nigfete,anchor=D,bodydiode,
+ \draw (6,0) node (mosfet1) [nigfete,anchor=D,bodydiode, tr circle,
circuitikz/transistor bodydiode/color=gray,
- circuitikz/transistor bodydiode/scale=0.2] {$Q_3$};
+ circuitikz/transistor bodydiode/scale=0.2,
+ circuitikz/transistor bodydiode/dot scale=0] {$Q_3$};
\draw (0,-2) node (mosfet1) [nigfete,anchor=D,bodydiode,
circuitikz/transistor bodydiode/dash={{2pt}{1pt}}] {$Q_4$};
\draw[densely dashed] (3,-2) node (mosfet1) [nigfete,anchor=D,
@@ -4366,13 +4445,12 @@ The following is a quite extensive example. Obviously, a good strategy in this c
\ctikzset{transistor bodydiode/relative thickness=.5,
transistor bodydiode/scale=0.6}% from now on, in scope
\draw[densely dotted] (6,-2) node (mosfet1) [nigfete,anchor=D,bodydiode,
- circuitikz/transistor bodydiode/dash=none] {$Q_6$};
+ circuitikz/transistor bodydiode/dash=none,
+ circuitikz/transistor bodydiode/dot scale=1] {$Q_6$};
\path (7,0); %% adjust bounding box (node text is outside it!)
\end{tikzpicture}
\end{LTXexample}
-
-
\subsubsection{Transistors anchors}
For \textsc{nmos}, \textsc{pmos}, \textsc{nfet}, \textsc{nigfete}, \textsc{nigfetd}, \textsc{pfet}, \textsc{pigfete}, and \textsc{pigfetd} transistors one has \texttt{base}, \texttt{gate}, \texttt{source} and \texttt{drain} anchors (which can be abbreviated with \texttt{B}, \texttt{G}, \texttt{S} and \texttt{D}):
@@ -8334,7 +8412,7 @@ Negative values do work as expected:
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[raised voltages]
\draw (0,1.5) to[R, v^=$v_1$, i=$i_1$] ++(2,0);
- \draw (0,0) to[R, v^=$v_1$, i=$i_1$,
+ \draw (0,0) to[R, v^=$v_1$, i_=$i_1$,
voltage shift=-1.0] ++(2,0);
\end{circuitikz}
\end{LTXexample}
@@ -8378,7 +8456,7 @@ Additionally, the \texttt{open} component is treated differently; the voltage is
If you want or need to maintain the old behavior for \texttt{open} voltage, you can set the key \texttt{open voltage position} to \texttt{legacy} (the default is the new behavior, which corresponds to the value \texttt{center}).
-\subsubsection{American voltages customization}
+\subsubsection{American voltages customization}\label{sec:american-voltage-custom}
Since 0.9.0, you can change the font\footnote{There was a bug before, noticed by the user \texttt{dzereb} on \href{https://tex.stackexchange.com/questions/487683/odd-minus-style-when-drawing-american-voltage}{tex.stackexchange.com} which made the symbols using different fonts in a basically random way. In the same page, user \texttt{campa} found the problem. Thanks!} used by the \texttt{american voltages} style, by setting to something different from nothing the key \texttt{voltage/american font} (default: nothing, using the current font) style:
@@ -8393,7 +8471,9 @@ Since 0.9.0, you can change the font\footnote{There was a bug before, noticed by
\end{LTXexample}
Also, if you want to change the symbols (sometimes just the $+$ sign is drawn, for example, or for highlighting something),
-using the keys \texttt{voltage/american plus} and \texttt{voltage/american minus} (default \verb|$+$| and \verb|$-$|).
+using the keys \texttt{voltage/american plus} and \texttt{voltage/american minus} (default \verb|$+$| and \verb|$\vphantom{+}-$|).
+
+Notice that the definition of the minus sign is not simply \verb|$-$| because in most font (but not Computer Modern!) the size of the bounding box for the mathematical plus or minus are different. The \verb|\vphantom| forces the vertical size of the minus sign to be the same as the plus sign.\footnote{Changed in v1.6.3, you can look at \href{https://github.com/circuitikz/circuitikz/issues/721}{this issue on GitHub} for more details.}
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[american]
@@ -8546,13 +8626,13 @@ For example, you can do something like this:
\end{circuitikz}
\end{LTXexample}
-Or, for example, to have a different voltage style; normally you would define a macro:
+Or, for example, to have a different voltage style; normally you would define a macro (see~\ref{sec:american-voltage-custom} to understand the \verb|\vphantom|).
\begin{LTXexample}[varwidth=true]
\begin{circuitikz}[voltage shift=0.5]
\def\eurVPM#1#2{% node, label
\draw [thin, -{Stealth[width=8pt]}, shorten >=5pt,
- shorten <=5pt] (#1-Vfrom) node[font=\tiny]{$-$}
+ shorten <=5pt] (#1-Vfrom) node[font=\tiny]{$\vphantom{+}-$}
.. controls (#1-Vcont1) and (#1-Vcont2)..
(#1-Vto) node[font=\tiny]{$+$}
node[pos=0.5,anchor=\ctikzgetanchor{#1}{Vlab}]{#2};}
diff --git a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
index 6eeeb67642..6cc3af44a2 100644
--- a/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
+++ b/graphics/pgf/contrib/circuitikz/tex/circuitikz.sty
@@ -16,8 +16,8 @@
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
-\def\pgfcircversion{1.6.2}
-\def\pgfcircversiondate{2023/05/13}
+\def\pgfcircversion{1.6.3}
+\def\pgfcircversiondate{2023/06/23}
\DeclareRelease{0.4}{2012/12/20}{circuitikz-0.4-body.tex}
\DeclareRelease{v0.4}{2012/12/20}{circuitikz-0.4-body.tex}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
index ec9f2a8a71..35038c59f0 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirc.defines.tex
@@ -467,6 +467,18 @@
\fi
}
+% set the text color (via \color) if the color is not default or none
+% needed in some strange case (like bodydiode' dots)
+\def\pgf@circ@maybe@color#1{%
+ \edef\@@none{none}\edef\@@default{default}%
+ \edef\@@tmp{\ctikzvalof{#1}}%
+ \ifx\@@tmp\@@default\else
+ \ifx\@@tmp\@@none\else
+ \color{\@@tmp}%
+ \fi
+ \fi
+}
+
%%>>>
%% font changes compatible with plain/LaTeX/ConTeXt%<<<1
@@ -1125,7 +1137,10 @@
% shaping the +/- sign, see pgfcircvoltage.tex
\ctikzset{voltage/american font/.initial={}}
\ctikzset{voltage/american plus/.initial={$+$}}
-\ctikzset{voltage/american minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{voltage/american minus/.initial={$\vphantom{+}-$}}
% here we start the voltage adjustments for special components.
% default values:
%
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
index be54c93e34..1acb5a8d65 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircbipoles.tex
@@ -2113,7 +2113,10 @@
%% To change the internal symbols of the voltage source american style
\ctikzset{bipoles/vsourceam/inner plus/.initial={$+$}}
-\ctikzset{bipoles/vsourceam/inner minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{bipoles/vsourceam/inner minus/.initial={$\vphantom{+}-$}}
%% Independent voltage source - American style
\pgfcircdeclarebipolescaled{sources}
{}
@@ -2398,15 +2401,18 @@
% triangle
\def\pgf@circ@delta#1{
\pgfscope
- \pgftransformscale{-.01*\ctikzvalof{\ctikzclass/symbol/delta scale}*\pgf@circ@res@left*#1}
+ \pgftransformscale{-.015*\ctikzvalof{\ctikzclass/symbol/delta scale}*\pgf@circ@res@left*#1}
\def\pgfcircmathresult{\expandafter\pgf@circ@stripdecimals\pgf@circ@direction\pgf@nil}
\pgftransformrotate{-\pgfcircmathresult}
\pgf@circ@setlinewidth{bipoles}{\pgfstartlinewidth}
\pgf@circ@set@relative@thickness{symbol/thickness}
- \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
- \pgfpathlineto{\pgfpoint{0}{.866\pgf@circ@res@up}}
+ % \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@down}}
+ % \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@down}}
+ % \pgfpathlineto{\pgfpoint{0}{.866\pgf@circ@res@up}}
+ \pgfpathmoveto{\pgfpointpolar{90}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpointpolar{-30}{\pgf@circ@res@up}}
+ \pgfpathlineto{\pgfpointpolar{-150}{\pgf@circ@res@up}}
\pgfpathclose
\pgfusepath{stroke}
\endpgfscope
@@ -2467,6 +2473,16 @@
\pgf@y=0pt\relax
\pgf@x=\ctikzvalof{bipoles/oosourcetrans/circleoffset}\pgf@x
}
+ \anchor{symbolprim}{
+ \northeast
+ \pgf@y=0pt\relax
+ \pgf@x=-\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@x
+ }
+ \anchor{symbolsec}{
+ \northeast
+ \pgf@y=0pt\relax
+ \pgf@x=\ctikzvalof{bipoles/oosourcetrans/circlesize}\pgf@x
+ }
}
{\ctikzvalof{bipoles/oosourcetrans/height}}
{oosourcetrans}
@@ -2580,7 +2596,6 @@
\anchor{centertert}{
\centertert
}
-
% add some anchors in case the are needed :)
\anchor{prim1}{
\pgf@circ@scaled@Rlen=\ctikzvalof{\ctikzclass/scale}\pgf@circ@Rlen
@@ -2630,6 +2645,24 @@
\pgf@circ@res@other=\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@other
\pgfpointadd{\centertert}{\pgfpointpolar{-90}{.5\pgf@circ@res@other}}
}
+ % symbol "center" anchors
+ \anchor{symbolprim}{
+ \northeast
+ \pgf@y=0pt
+ \pgf@x=-0.6\pgf@x
+ }
+ \anchor{symbolsec}{
+ \northeast
+ \pgf@ya=\pgf@y
+ \pgf@xa=\pgf@x
+ \pgfpointpolar{60}{0.6\pgf@ya}
+ }
+ \anchor{symboltert}{
+ \northeast
+ \pgf@ya=\pgf@y
+ \pgf@xa=\pgf@x
+ \pgfpointpolar{-60}{0.6\pgf@ya}
+ }
}
{\ctikzvalof{bipoles/ooosource/height}}
{ooosource}
@@ -2674,7 +2707,7 @@
% % primary winding
\ifpgf@circ@prim@delta
\pgfscope
- \pgftransformxshift{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@left}
+ \pgftransformxshift{.6\pgf@circ@res@left}
\pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
@@ -2695,19 +2728,19 @@
\ifpgf@circ@sec@delta
\pgfscope
\pgfpointorigin
- \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+ \pgftransformshift{\pgfpointpolar{60}{0.6\pgf@circ@res@right}}
\pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf@circ@sec@wye
\pgfscope
- \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+ \pgftransformshift{\pgfpointpolar{60}{0.6\pgf@circ@res@right}}
\pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf@circ@sec@zig
\pgfscope
- \pgftransformshift{\pgfpointpolar{60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+ \pgftransformshift{\pgfpointpolar{60}{0.6\pgf@circ@res@right}}
\pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\fi\fi\fi
@@ -2715,19 +2748,19 @@
% % tertiary winding
\ifpgf@circ@tert@delta
\pgfscope
- \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+ \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf@circ@res@right}}
\pgf@circ@delta{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf@circ@tert@wye
\pgfscope
- \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+ \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf@circ@res@right}}
\pgf@circ@wye{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\else\ifpgf@circ@tert@zig
\pgfscope
- \pgftransformshift{\pgfpointpolar{-60}{\ctikzvalof{bipoles/ooosource/circlesize}\pgf@circ@res@right}}
+ \pgftransformshift{\pgfpointpolar{-60}{0.6\pgf@circ@res@right}}
\pgf@circ@zig{\ctikzvalof{bipoles/ooosource/vectorgroupscale}}
\endpgfscope
\fi\fi\fi
@@ -2824,7 +2857,10 @@
%% To change the internal symbols of the controlled voltage source american style
\ctikzset{bipoles/cvsourceam/inner plus/.initial={$+$}}
-\ctikzset{bipoles/cvsourceam/inner minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{bipoles/cvsourceam/inner minus/.initial={$\vphantom{+}-$}}
%% Controlled voltage source - American
\pgfcircdeclarebipolescaled{csources}
{}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
index 39a01b5d90..2cef035890 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcirctripoles.tex
@@ -3380,6 +3380,8 @@
\ctikzset{transistor bodydiode/relative thickness/.initial=1}
\ctikzset{transistor bodydiode/color/.initial=default}
\ctikzset{transistor bodydiode/dash/.initial=default}
+\ctikzset{transistor bodydiode/dot scale/.initial=0.7}
+\ctikzset{transistor solderdot scale/.initial=0.7}
% this is unfortunate, but needed for backward compatibility
\ctikzset{transistor bodydiode/scale/.code={%
\ctikzset{tripoles/nmos/bodydiode scale=#1}%
@@ -3945,33 +3947,46 @@
\pgf@circ@setcolor
%
\ifnum \ctikzvalof{tripoles/#1/curr direction} > 0
- \pgf@circuit@trans@ntypetrue
+ \pgf@circuit@trans@ntypetrue
\else
- \pgf@circuit@trans@ntypefalse
- \fi
- \northeast
- \pgf@circ@res@up = \pgf@y
- \pgf@circ@res@down = -\pgf@y
- \pgf@circ@res@right = \pgf@x
- \left
- \pgf@circ@res@left = \pgf@x
- \pgf@circ@scaled@Rlen=\scaledRlen
- %
- #3%
- % BODY DIODE
- \ifpgf@circuit@fet@bodydiode
- \pgfscope
- \pgfsetlinewidth{\ctikzvalof{transistor bodydiode/relative thickness}\pgflinewidth}
- \pgf@circ@subset@color@dash{transistor bodydiode}
+ \pgf@circuit@trans@ntypefalse
+ \fi
+ \northeast
+ \pgf@circ@res@up = \pgf@y
+ \pgf@circ@res@down = -\pgf@y
+ \pgf@circ@res@right = \pgf@x
+ \left
+ \pgf@circ@res@left = \pgf@x
+ \pgf@circ@scaled@Rlen=\scaledRlen
+ %
+ #3%
+ % BODY DIODE
+ \ifpgf@circuit@fet@bodydiode
\drawbodydiode{#1}
- \endpgfscope
- \fi
- %
+ \fi
+ %
+ }
}
}
+
+\def\drawdobydiodedot#1#2{
+ % retrieve dot scale
+ \edef\@@tmp{\ctikzvalof{transistor bodydiode/dot scale}}
+ \ifdim\@@tmp pt>0pt
+ \pgfscope
+ \pgftransformshift{\pgfpoint{\pgf@circ@res@right}
+ {\ctikzvalof{tripoles/#1/bodydiode conn}#2}}
+ \pgftransformscale{\@@tmp}
+ % I'm not sure why this is needed, but...
+ \pgf@circ@maybe@color{transistor bodydiode/color}
+ \pgfnode{circ}{center}{}{}{\pgfusepath{draw,fill}}
+ \endpgfscope
+ \fi
}
\long\def\drawbodydiode#1{
+ \pgfsetlinewidth{\ctikzvalof{transistor bodydiode/relative thickness}\pgflinewidth}
+ \pgf@circ@subset@color@dash{transistor bodydiode}
\pgfscope
\pgftransformshift{\pgfpoint{-\ctikzvalof{tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\pgf@circ@res@up+\pgf@circ@res@down}}
\pgftransformrotate{90}
@@ -3999,23 +4014,14 @@
{\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
\pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{east}}
\pgfusepath{draw}
- \pgfscope
- \pgftransformshift{\pgfpoint{\pgf@circ@res@right}
- {\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@circ@res@up}}
- \pgftransformscale{0.5}
- \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
- \endpgfscope{}
+ \drawdobydiodedot{#1}{\pgf@circ@res@up}
%Draw lower connection to body diode
\pgfpathmoveto{\pgfpoint{\pgf@circ@res@right}
{\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpoint{-\ctikzvalof{tripoles/#1/bodydiode distance}\pgf@circ@res@left}{\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
\pgfpathlineto{\pgfpointanchor{pgf@bodydiode}{west}}
\pgfusepath{draw}
- \pgfscope
- \pgftransformshift{\pgfpoint{\pgf@circ@res@right} {\ctikzvalof{tripoles/#1/bodydiode conn}\pgf@circ@res@down}}
- \pgftransformscale{0.5}
- \pgfnode{circ}{center}{}{}{\pgfusepath{fill}}
- \endpgfscope
+ \drawdobydiodedot{#1}{\pgf@circ@res@down}
}
\long\def\declarebpt#1{
@@ -5601,6 +5607,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf@circ@res@down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5615,6 +5622,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\ctikzvalof{tripoles/nigfetebulk/gate height}\pgf@circ@res@down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5635,6 +5643,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf@circ@res@down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5657,6 +5666,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\ctikzvalof{tripoles/pigfete/gate height}\pgf@circ@res@up}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope
\fi
@@ -5684,6 +5694,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf@circ@res@up}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -5891,6 +5902,7 @@
\pgfscope
\pgftransformshift{\pgfpoint{\pgf@circ@res@right}{
\ctikzvalof{tripoles/nigfete/gate height}\pgf@circ@res@down}}
+ \pgftransformscale{\ctikzvalof{transistor solderdot scale}}
\pgfnode{circ}{center}{}{}{}
\endpgfscope{}
\fi
@@ -6085,7 +6097,10 @@
\ctikzset{tripoles/op amp/font=#1}%
}}
\ctikzset{amplifiers/plus/.initial={$+$}}
-\ctikzset{amplifiers/minus/.initial={$-$}}
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+\ctikzset{amplifiers/minus/.initial={$\vphantom{+}-$}}
\tikzset{amp symbol font/.code={%
\ctikzset{amplifiers/symbol font={#1}}%
}
@@ -6993,8 +7008,7 @@
% main component, normally in thicker lines
\pgfscope
\newdimen\pgf@circ@res@right@double
- \pgf@circ@res@right@double=2\pgf@circ@res@right
-
+ \pgf@circ@res@right@double=2\pgf@circ@res@right
\pgf@circ@setlinewidth{tripoles}{\pgflinewidth}
\pgftransformxshift{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@left}
\pgf@circ@res@step=\pgf@circ@res@right
@@ -7044,8 +7058,8 @@
\pgf@circ@text@strokecolor
\pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@left}{\ctikzvalof{tripoles/fd inst amp/input height}\pgf@circ@res@up}]{\ctikzvalof{tripoles/fd inst amp/font} \ifpgf@circuit@oa@iplusup\pgf@circ@ampli@plus\else\pgf@circ@ampli@minus\fi}
\pgftext[left, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@left}{\ctikzvalof{tripoles/fd inst amp/input height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/fd inst amp/font} \ifpgf@circuit@oa@iplusup\pgf@circ@ampli@minus\else\pgf@circ@ampli@plus\fi}
- \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup$-\;$\else$+\;$\fi}
- \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@up}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup$+\;$\else$-\;$\fi}
+ \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@down}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup\pgf@circ@ampli@minus\space\else\pgf@circ@ampli@plus\space\fi}
+ \pgftext[right, at=\pgfpoint{\ctikzvalof{tripoles/fd inst amp/port width}\pgf@circ@res@right}{\ctikzvalof{tripoles/fd inst amp/output height}\pgf@circ@res@up}]{\ctikzvalof{tripoles/fd inst amp/font}\ifpgf@circuit@oa@oplusup\pgf@circ@ampli@plus\space\else\pgf@circ@ampli@minus\space\fi}
}
}
diff --git a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
index 8b66ca8f73..819da5a110 100644
--- a/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/pgfcircvoltage.tex
@@ -114,7 +114,10 @@
% the default font command is {} --- nothing
\def\pgf@circ@avfont{\ctikzvalof{voltage/american font}}
%
-% plus and minus symbols (default is $+$ and $-$, see pgfcirc.defines.tex)
+% In the mayority of fonts, the size of - is smaller than +, so we have
+% unaligned signs when positioned independently.
+% See https://github.com/circuitikz/circuitikz/issues/721
+% plus and minus symbols (default is $+$ and $\vphantom{+}-$, see pgfcirc.defines.tex)
%
\def\pgf@circ@avplus{\ctikzvalof{voltage/american plus}}
\def\pgf@circ@avminus{\ctikzvalof{voltage/american minus}}
diff --git a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
index e5975cfb53..44cf1e70ad 100644
--- a/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
+++ b/graphics/pgf/contrib/circuitikz/tex/t-circuitikz.tex
@@ -16,8 +16,8 @@
\startmodule[circuitikz]
\usemodule[tikz]
-\def\pgfcircversion{1.6.2}
-\def\pgfcircversiondate{2023/05/13}
+\def\pgfcircversion{1.6.3}
+\def\pgfcircversiondate{2023/06/23}
\writestatus{loading}{\pgfcircversiondate{} The CircuiTikz circuit drawing package version \pgfcircversion}
diff --git a/graphics/pgf/contrib/profsio/README.md b/graphics/pgf/contrib/profsio/README.md
new file mode 100644
index 0000000000..42ccb63be0
--- /dev/null
+++ b/graphics/pgf/contrib/profsio/README.md
@@ -0,0 +1,7 @@
+ProfSio is a package for teachers in french BTS SIO's Math.
+----------------------------------------------------------------
+ProfSio est un package pour les enseignants de Maths en BTS SIO.
+----------------------------------------------------------------
+Author.......: Cédric Pierquet
+email........: cpierquet@outlook.fr
+Licence......: Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
new file mode 100644
index 0000000000..c8f5ee5651
--- /dev/null
+++ 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
new file mode 100644
index 0000000000..11f39a3624
--- /dev/null
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
@@ -0,0 +1,997 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[french,a4paper,11pt]{article}
+\usepackage[margin=2cm,includefoot]{geometry}
+\def\TPversion{0.1.0}
+\def\TPdate{23 juin 2023}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{amsmath,amssymb}
+\usepackage{ProfSio}
+\usepackage{awesomebox}
+\usepackage{fontawesome5}
+\usepackage{footnote}
+\makesavenoteenv{tabular}
+\usepackage{enumitem}
+\usepackage{wrapstuff}
+\usepackage{lipsum}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [ProfSio]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+
+%\usepackage{hvlogos}
+\usepackage{hologo}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+\newcommand\TableauDocumentation{%
+ \begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\large\sffamily}}
+ {\LaTeX} & {\hologo{pdfLaTeX}} & {\hologo{LuaLaTeX}} & {\TikZ} & {\TeXLive} & {\hologo{MiKTeX}} \\
+ \end{tblr}
+}
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\setlength{\parindent}{0pt}
+\definecolor{LightGray}{gray}{0.9}
+
+\usepackage{babel}
+\AddThinSpaceBeforeFootnotes
+\FrenchFootnotes
+
+\usepackage{listings}
+
+\usepackage{newverbs}
+\newverbcommand{\motcletex}{\color{cyan!75!black}}{}
+\newverbcommand{\packagetex}{\color{violet!75!black}}{}
+
+\usepackage[most]{tcolorbox}
+\tcbuselibrary{listingsutf8}
+\newtcblisting{DemoCode}[1][]{%
+ enhanced,width=0.95\linewidth,center,%
+ bicolor,size=title,%
+ colback=cyan!2!white,%
+ colbacklower=cyan!1!white,%
+ colframe=cyan!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\small\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={center,justify,\lipsum},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={\MPMPlaceTache,\MPMPlaceNotice,\MPMPlaceDuree,GrapheMPM,TableKarnaugh,\KarnaughCasesResult,\KarnaughBlocRegroup,\MPMPlaceTaches,\MPMPlaceDurees,GrapheTikz,\GrphPlaceSommets,\GrphTraceAretes,\tikzset},%
+ 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},%
+ keywordstyle={\color{orange}}
+ },%
+ #1
+}
+
+\tcbset{vignettes/.style={%
+ nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
+ boxrule=0.75pt,left=7pt,right=1pt,top=0pt,bottom=0.25pt,%
+ }
+}
+
+\tcbset{vignetteMaJ/.style={%
+ fontupper={\vphantom{pf}\footnotesize\ttfamily},
+ vignettes,colframe=purple!50!black,coltitle=white,colback=purple!10,%
+ overlay={\begin{tcbclipinterior}%
+ \fill[fill=purple!75]($(interior.south west)$) rectangle node[rotate=90]{\tiny \sffamily{\textcolor{black}{\scalebox{0.66}[0.66]{\textbf{MàJ}}}}} ($(interior.north west)+(5pt,0pt)$);%
+ \end{tcbclipinterior}}
+ }
+}
+
+\newcommand\Cle[1]{{\small\sffamily\textlangle \textcolor{orange}{#1}\textrangle}}
+\newcommand\cmaj[1]{\tcbox[vignetteMaJ]{#1}\xspace}
+
+\begin{document}
+
+\setlength{\aweboxleftmargin}{0.07\linewidth}
+\setlength{\aweboxcontentwidth}{0.93\linewidth}
+\setlength{\aweboxvskip}{8pt}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\vspace{2cm}
+
+\begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{ProfSio} [fr]}\\
+ \\
+ {\LARGE Des outils pour les Maths en BTS SIO.} \\
+ \end{tabular}
+
+ \bigskip
+
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{center}
+ \end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/profsio}}
+\end{tabular}
+\end{center}
+
+\vspace{0.25cm}
+
+{$\blacktriangleright$~~Créer des diagrammes MPM (de manière manuelle, pas de calculs ou placements automatiques).}
+
+\vspace{0.25cm}
+
+{$\blacktriangleright$~~Créer des tables de Karnaugh avec mise en valeur (manuelle) des regroupements.}
+
+\vspace{0.25cm}
+
+{$\blacktriangleright$~~Créer des graphes simples.}
+
+\vspace{1cm}
+
+\hfill
+\begin{GrapheMPM}[LargeurCases=0.5cm]
+ %NOTICE
+ \MPMPlaceNotice(1,6.5)
+ %SOMMETS
+ \MPMPlaceTache(1,4)(Début)(0,0)
+ \MPMPlaceTache(3.25,4)(COM)(0,0)
+ \MPMPlaceTache(5.5,4)(LOG)(1,2)
+ \MPMPlaceTache(5.5,2)(ECR)(1,1)
+ \MPMPlaceTache(5.5,7)(MAT)(1,2{,}5)
+ \MPMPlaceTache(7.75,7)(CABL)(2,4)
+ \MPMPlaceTache(7.75,5.5)(ASS)(2,3{,}5)
+ \MPMPlaceTache(10,4)(INST)(4,5)
+ \MPMPlaceTache(12.25,4)(POST)(7,7)
+ \MPMPlaceTache(14.5,4)(CONF)(8,8)
+ \MPMPlaceTache(16.75,4)(Fin)(9,9)
+% %ARCS
+ \MPMPlaceDuree{Début>COM,0}
+ \MPMPlaceDuree{COM>MAT,1}\MPMPlaceDuree{COM>LOG,1}\MPMPlaceDuree{COM>ECR,1}
+ \MPMPlaceDuree{MAT>CABL,1}\MPMPlaceDuree{MAT>ASS,1}
+ \MPMPlaceDuree{LOG>INST,3}
+ \MPMPlaceDuree[Coude]{ECR>POST,6}<near start>
+ \MPMPlaceDuree[Coude]{CABL>CONF,4}<near start>
+ \MPMPlaceDuree{ASS>INST,1{,}5}
+ \MPMPlaceDuree{INST>POST,2}
+ \MPMPlaceDuree{POST>CONF,1}
+ \MPMPlaceDuree{CONF>Fin,1}
+\end{GrapheMPM}
+\hfill~
+
+\hfill
+\begin{TableKarnaugh}
+ \KarnaughCasesResult{0,1,1,0,1,1,1,1}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=blue!75,Decalage=-1.5pt]{10}{32}
+ \KarnaughBlocRegroup[Type=Gauche,Couleur=red!75,Decalage=-1.5pt]{00}{11}
+ \KarnaughBlocRegroup[Type=Droite,Couleur=red!75,Decalage=-1.5pt]{40}{31}
+\end{TableKarnaugh}
+\hspace{1cm}
+\begin{TableKarnaugh}[Variables=u/v/w,Swap,CouleurCases=lime]
+ \KarnaughCasesResult*{1,1,1,1,1,0,0,0}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=blue!75,Decalage=-1.5pt]{00}{12}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=red!75,Decalage=-1.15pt]{01}{42}
+\end{TableKarnaugh}
+\hfill~
+
+\vspace{0.5cm}
+
+\hfill
+\begin{GrapheTikz}[Unite=0.75cm,CouleurSommets={gray/blue},Epaisseur={very thick/thick},CouleurFleches=orange]
+ \GrphPlaceSommets{(5,4)/A (2,2)/B (9,3)/C}
+ \GrphTraceAretes{A/B}
+ \GrphTraceAretes[AngleGauche]{C/A}
+ \GrphTraceAretes[AngleDroite]{B/C}
+ \GrphTraceAretes[Boucle=4]{A/45 B/135 C/-45}
+\end{GrapheTikz}
+\hfill~
+
+%%\hfill{}\textit{Merci à Patrick Bideault pour ses retours et conseils !}
+
+\vfill
+
+\hrule
+
+\medskip
+
+\TableauDocumentation
+
+\medskip
+
+\hrule
+
+\newpage
+
+\phantomsection
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vfill
+
+\section{Historique}
+
+\verb|v0.1.0|~:~~~~Version initiale.
+
+\newpage
+
+\section{Le package ProfSio}
+
+\subsection{Introduction}
+
+\begin{noteblock}
+Le package \packagetex!ProfSio! propose quelques commandes pour travailler sur des points particuliers de Mathématiques enseignées en BTS SIO :
+
+\begin{itemize}
+ \item graphe d'ordonnancement par la méthode MPM ;
+ \item tableau de Karnaugh à 3 variables ;
+ \item graphes \textit{simples} orientés, pondérés.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{noteblock}
+
+\begin{warningblock}
+Le code ne propose par de \og résolution \fg{} du graphe MPM, de \og simplification \fg{} d'expressions booléennes ou de représentation \og automatique \fg{} d'un graphe, il ne consiste \textit{qu'en} une mise en forme du graphe MPM, du tableau de Karnaugh ou du graphe.
+\end{warningblock}
+
+\subsection{Chargement du package, packages utilisés}
+
+\begin{importantblock}
+Le package se charge, de manière classique, dans le préambule.
+
+Il n'existe pas d'option pour le package, et \packagetex!xcolor! n'est pas chargé.
+\end{importantblock}
+
+\begin{DemoCode}[listing only]
+\documentclass{article}
+\usepackage{ProfSio}
+
+\end{DemoCode}
+
+\begin{noteblock}
+\packagetex!ProfSio! charge les packages suivantes :
+
+\begin{itemize}
+ \item \packagetex!tikz!, \packagetex!pgffor! et \packagetex!xintexpr! ;
+ \item \packagetex!tabularray!, \packagetex!simplekv!, \packagetex!xstring! et \packagetex!listofitems! ;
+ \item les librairies \packagetex!tikz! :
+ \begin{itemize}
+ \item \motcletex!tikz.positioning!
+ \item \motcletex!tikz.decorations.pathreplacing! et \motcletex!tikz.decorations.markings! ;
+ \item \motcletex!tikz.babel! ;
+ \item \motcletex!tikz.calc! ;
+ \item \motcletex!tikz.shapes! et \motcletex!tikz.shapes.geometric! ;
+ \item \motcletex!tikz.arrows! et \motcletex!tikz.arrows.meta!.
+ \end{itemize}
+\end{itemize}
+
+Il est compatible avec les compilations usuelles en \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} ou \textsf{xelatex}.
+\end{noteblock}
+
+\subsection{Fonctionnement global}
+
+\begin{tipblock}
+Les environnements sont créés avec \TikZ, et la majorité des paramètres des tracés sont personnalisables :
+
+\hfill{}couleurs ; dimensions ; polices.\hfill~
+\end{tipblock}
+
+\begin{noteblock}
+Le choix a été fait de :
+
+\begin{itemize}
+ \item présenter l'ordonnancement par la méthode MPM, avec présentation des tâches \textit{fixée} ;
+ \item limiter les tableaux de Karnaugh pour 3 variables, avec présentation \textit{fixée} ;
+ \item de ne pas forcément proposer de modification de la présentation \textit{globale}
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{noteblock}
+
+\pagebreak
+
+\section{Graphe d'ordonnancement par méthode MPM}
+
+\subsection{Commande et fonctionnement global}
+
+\begin{cautionblock}
+L'environnement dédié à la création du graphe d'ordonnancement est \motcletex!GrapheMPM!.
+
+C'est en fait un environnement \motcletex!tikzpicture! personnalisé.
+
+\smallskip
+
+Les commandes à utiliser dans l'environnement sont :
+
+\begin{itemize}
+ \item \motcletex!\MPMPlaceNotice! ;
+ \item \motcletex!\MPMPlaceTache! ou \motcletex!\MPMPlaceTaches! ;
+ \item \motcletex!\MPMPlaceDuree! ou \motcletex!\MPMPlaceDurees!.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheMPM}[clés]<options tikz>
+ \MPMPlaceNotice(*)(coordonnées)
+ \MPMPlaceTache(coordonnées)(Tâche)(Dates)
+ \MPMPlaceTaches{ (coordA)(TâcheA)(DatesA) / (coordB)(TâcheB)(DatesB) / ... }
+ \MPMPlaceDuree[clés]{TâcheA>TâcheB,durée}<options tikz>
+ \MPMPlaceDurees[clés]{TâcheA>TâcheB,durée / TâcheC>TâcheD,durée }<options tikz>
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{GrapheMPM}
+ \MPMPlaceNotice(-2,2.15)
+ \MPMPlaceTaches{ (0,0)(F)(2,4) / (3,1)(G)(5,7) / (6,0.5)(L)(9,9) }
+ \MPMPlaceDurees{F>G,1 / G>L,2}
+ \MPMPlaceDuree[Coude,SensCoude=VHV]{F.south>L.south,4}<near start>
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{tipblock}
+Les tâches sont créées sous forme de \textit{tableau} et sont associées à des nœuds, nœuds qui servent ensuite à positionner les durées des tâches.
+\end{tipblock}
+
+\pagebreak
+
+\subsection{Arguments et clés pour l'environnement}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheMPM}[clés]<options tikz>
+ %commandes
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne la création de l'environnement, les \Cle{clés} sont :
+
+\begin{itemize}
+ \item \Cle{CouleurDurees} := couleur des durée ; \hfill~défaut : \Cle{purple}
+ \item \Cle{CouleurFleches} := couleur des arcs ; \hfill~défaut : \Cle{blue}
+ \item \Cle{LargeurCases} := largeur des cases ; \hfill~défaut : \Cle{0.75cm}
+ \item \Cle{Epaisseur} := épaisseur des traits (bordures et arcs) ; \hfill~défaut : \Cle{0.75pt}
+ \item \Cle{Police} := police globale ; \hfill~défaut : \Cle{\textbackslash footnotesize\textbackslash sffamily}
+ \item \Cle{CouleurDates} := couleur des dates, sous la forme \Cle{Couleur} ou \Cle{Couleur\_t/Couleur\_T} ;
+
+ \hfill~défaut : \Cle{teal/red}
+ \item \Cle{CouleurBords} := couleur des bordures ; \hfill~défaut : \Cle{black}
+ \item \Cle{NoirBlanc} := booléen pour tout passer en Noir \&{} Blanc ; \hfill~défaut : \Cle{false}
+ \item \Cle{Grille} := pour afficher une grille d'aide (\Cle{\{xmax,ymax\}}), entre (0;\,0) et (xmax;\,ymax).
+
+ \hfill~défaut : \Cle{vide}
+\end{itemize}
+
+Le deuxième argument, optionnel et entre \texttt{<...>} propose des options, en langage \packagetex!tikz! à passer à l'environnement.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\begin{GrapheMPM}[Grille={14,5}]
+ %commandes
+\end{GrapheMPM}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Arguments et clés pour les tâches}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheMPM}[clés]<options tikz>
+ \MPMPlaceNotice(*)(coordonnées)
+ \MPMPlaceTache(coordonnées)(Tâche)(Dates)
+ \MPMPlaceTaches{ (coordA)(TâcheA)(DatesA) / (coordB)(TâcheB)(DatesB) / ... }
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{tipblock}
+La commande \motcletex!\MPMPlaceNotice! permet de placer une \textit{notice} :
+
+\begin{itemize}
+ \item la version \textit{étoilée} affiche la notice complète, avec les dates et les marges (MT et ML) ;
+ \item les coordonnées sont à donner sous la forme \verb!x,y!.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{tipblock}
+La commande \motcletex!\MPMPlaceTache! permet de placer une tâche :
+
+\begin{itemize}
+ \item argument n°1 := coordonnées sont à donner sous la forme \verb!x,y!.
+ \item argument n°2 := nom de la tâche, qui sera également le nom du nœud ;
+ \item argument n°3 := dates (et marges éventuelles) sous la forme :
+ \begin{itemize}
+ \item \verb!t,T! pour une tâche présentée de manière \textit{simple} ;
+ \item \verb!t,T,MT,ML! pour une tâche présentée de manière \textit{complète} ;
+ \end{itemize}
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{tipblock}
+La commande \motcletex!\MPMPlaceTaches! permet de placer plusieurs tâches en utilisant la syntaxe de la commande précédente, les éléments de la liste étant séparés par le caractère \verb!/!.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\begin{GrapheMPM}[CouleurDates=green/orange,CouleurBords=brown,Grille={18,8}]%
+ <scale=0.75,transform shape>
+ %NOTICE
+ \MPMPlaceNotice(1,6.5)
+ %TACHES INDIVIDUELLES
+ \MPMPlaceTache(1,4)(Début)(0,0)
+ \MPMPlaceTache(3.25,4)(COM)(0,0)
+ %TACHES MULTIPLES
+ \MPMPlaceTaches{ (5.5,4)(LOG)(1,2) / (5.5,2)(ECR)(1,1) / (5.5,7)(MAT)(1,2{,}5) / (7.75,7)(CABL)(2,4) / (7.75,5.5)(ASS)(2,3{,}5) / (10,4)(INST)(4,5) / (12.25,4)(POST)(7,7) / (14.5,4)(CONF)(8,8) / (16.75,4)(Fin)(9,9) }
+\end{GrapheMPM}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Arguments et clés pour les tâches}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheMPM}[clés]<options tikz>
+ %DÉCLARATION DES TÂCHES
+ \MPMPlaceDuree[clés]{TâcheA>TâcheB,durée}<options tikz>
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{tipblock}
+La commande \motcletex!\MPMPlaceDuree! permet de placer un arc avec la durée de la tâche.
+
+\smallskip
+
+La commande propose les \Cle{clés} suivantes :
+
+\begin{itemize}
+ \item \Cle{Coude} := booléen pour affiche l'arc sous forme d'un coude ; \hfill~défaut : \Cle{false}
+ \item \Cle{SensCoude} := permet de préciser le type de coude, parmi \Cle{HV / VH / VHV} ;
+
+ \hfill~défaut : \Cle{HV}
+ \item \Cle{HauteurCoude} := dans le cas \Cle{SensCoude=VHV}, permet de préciser le 1\ier{} décalage V ;
+
+ \hfill~défaut : \Cle{10pt}
+ \item \Cle{DecalHorizDeb} := décalage horizontal du début de l'arc pour la tâche de départ ;
+ \item \Cle{DecalVertDeb} := décalage vertical du début de l'arc pour la tâche de départ ;
+ \item \Cle{DecalHorizDeb} := décalage horizontal de la fin de l'arc pour la tâche d'arrivée ;
+ \item \Cle{DecalVertFin} := décalage vertical de la fin de l'arc pour la tâche d'arrivée.
+
+ \hfill~défaut : \Cle{0pt}
+\end{itemize}
+
+Le second argument, obligatoire et entre \texttt{\{...\}} permet de spécifier les paramètres de l'arc, sous la forme \verb!TâcheDépart>TâcheArrivée,durée!.
+
+\smallskip
+
+Le troisième argument, optionnel et entre \texttt{<...>} et valant \motcletex!midway! par défaut, permet de spécifier une position différente (en langage \packagetex!tikz!) de la durée (comme par exemple \motcletex!near start!, \motcletex!near end! ou \motcletex!pos=...!).
+\end{tipblock}
+
+\begin{noteblock}
+Les nœuds créés précédemment permettent donc de spécifier les arguments de la commande, et \textit{tout point d'ancrage} des nœuds peuvent être utilisés pour la commande.
+
+\smallskip
+
+On rappelle que les principaux points d'ancrage d'un nœud \verb!(NOEUD)! \TikZ{} sont :
+
+\begin{itemize}[leftmargin=*]
+ \item {\small \verb!(NOEUD.north)!}, {\small \verb!(NOEUD.east)!}, {\small \verb!(NOEUD.south)!}, {\small \verb!(NOEUD.west)!} ;
+ \item {\small \verb!(NOEUD.north east)!}, {\small \verb!(NOEUD.south east)!}, {\small \verb!(NOEUD.south west)!}, {\small \verb!(NOEUD.north west)!}.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{noteblock}
+
+\begin{DemoCode}[text only]
+\begin{GrapheMPM}<scale=1.75,transform shape>
+ \MPMPlaceTache(3.25,4)(COM)(0,0)
+ \foreach \Pos/\Label in {north/above,east/right,south/below,west/left,north east/above right,south east/below right,south west/below left,north west/above left}
+ {\filldraw[lightgray] (COM.\Pos) circle[radius=1.75pt] node[font=\scriptsize\ttfamily,\Label] {(COM.\Pos)} ;}
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{warningblock}
+Par défaut, les arcs pointent vers le \textit{centre} du nœud, donc dans le cas d'arcs \textit{coudés}, on peut utiliser des points d'ancrage pour une position optimale des arcs.
+\end{warningblock}
+
+\pagebreak
+
+\begin{DemoCode}[]
+\begin{GrapheMPM}[LargeurCases=0.5cm]<scale=0.9,transform shape>
+ %TACHES MULTIPLES
+ \MPMPlaceTaches{ (1,4)(Début)(0,0) / (3.25,4)(COM)(0,0) / (5.5,4)(LOG)(1,2) / (5.5,2)(ECR)(1,1) / (5.5,7)(MAT)(1,2{,}5) / (7.75,7)(CABL)(2,4) / (7.75,5.5)(ASS)(2,3{,}5) / (10,4)(INST)(4,5) / (12.25,4)(POST)(7,7) / (14.5,4)(CONF)(8,8) / (16.75,4)(Fin)(9,9) }
+ \MPMPlaceDuree{COM>MAT,1}
+ \MPMPlaceDuree{COM>LOG,1}\MPMPlaceDuree{COM>ECR,1}
+ \MPMPlaceDuree{MAT>CABL,1}\MPMPlaceDuree{MAT>ASS,1}
+ \MPMPlaceDuree{LOG>INST,3}<pos=0.85>
+ \MPMPlaceDuree[Coude]{ECR>POST,6}<near start>
+ \MPMPlaceDuree[Coude]{CABL>CONF,4}<near end>
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{tipblock}
+Dans le cas où plusieurs arcs ont les mêmes caractéristiques, on peut utiliser la commande de \textit{placement multiple}, \motcletex!\MPMPlaceDurees!, pour laquelle les \Cle{clés} et l'argument optionnel entre \texttt{<...>} seront passés à \textbf{tous} les arcs.
+
+\smallskip
+
+Dans ce cas, les données sont à spécifier sous forme d'une liste, avec le séparateur \texttt{/}.
+
+\smallskip
+
+Cela permet de \textit{condenser} le code, dans le cas où de multiples arcs ont les mêmes caractéristiques.
+\end{tipblock}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheMPM}[clés]<options tikz>
+ %DÉCLARATION DES TÂCHES
+ \MPMPlaceDurees%
+ [clés globales]%
+ {TâcheA>TâcheB,durée / TâcheC>TâcheD,durée / ... }%
+ <options tikz globales>
+\end{GrapheMPM}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Exemples}
+
+\begin{DemoCode}[]
+\begin{GrapheMPM}[LargeurCases=0.5cm]<scale=0.9,transform shape>
+ %NOTICE
+ \MPMPlaceNotice(1,6.5)
+ %TÂCHES
+ \MPMPlaceTaches{ (1,4)(Début)(0,0) / (3.25,4)(COM)(0,0) / (5.5,4)(LOG)(1,2) / (5.5,2)(ECR)(1,1) / (5.5,7)(MAT)(1,2{,}5) / (7.75,7)(CABL)(2,4) / (7.75,5.5)(ASS)(2,3{,}5) / (10,4)(INST)(4,5) / (12.25,4)(POST)(7,7) / (14.5,4)(CONF)(8,8) / (16.75,4)(Fin)(9,9) }
+ %DURÉES (ARCS DIRECTS)
+ \MPMPlaceDurees{Début>COM,0 / COM>MAT,1 / COM>LOG,1 / COM>ECR,1 / MAT>CABL,1 / MAT>ASS,1 / LOG>INST,3 / ASS>INST,1{,}5 / INST>POST,2 / POST>CONF,1 / CONF>Fin,1}
+ %DURÉES (ARCS COUDÉS)
+ \MPMPlaceDurees[Coude]{ECR>POST,6 / CABL>CONF,4}<near start>
+\end{GrapheMPM}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+%ILLUSTRATION DES CLÉS [Decal...]
+\begin{GrapheMPM}[CouleurFleches=brown,CouleurDurees=purple,Police=\large\ttfamily]
+ %SOMMETS (EXTRAIT)
+ \MPMPlaceTaches{ (6.75,2)(O)(10,11) / (15.75,4.5)(N)(26,28) / (20.25,6)(P)(29,29) }
+ %ARCS (EXTRAIT)
+ \MPMPlaceDuree[Coude,DecalHorizFin=4pt]{O>P.south,8}<near start>
+ \MPMPlaceDuree[Coude,SensCoude=VHV,DecalHorizFin=-4pt]{N.south>P.south,1}<near start>
+\end{GrapheMPM}
+\end{DemoCode}
+
+\pagebreak
+
+\section{Tableau de Karnaugh à trois variables}
+
+\subsection{Commande et fonctionnement global}
+
+\begin{cautionblock}
+L'environnement dédié à la création du tableau de Karnaugh est \motcletex!TableKarnaugh!.
+
+C'est en fait un environnement \motcletex!tikzpicture! personnalisé.
+
+\smallskip
+
+Les commandes à utiliser dans l'environnement sont :
+
+\begin{itemize}
+ \item \motcletex!\KarnaughCasesResult! ;
+ \item \motcletex!\KarnaughBlocRegroup! ;.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\begin{TableKarnaugh}[clés]<options tikz>
+ \KarnaughCasesResult(*){contenu binaire des cases}
+ \KarnaughBlocRegroup[clés]{coinA}{coinB}
+\end{TableKarnaugh}
+\end{DemoCode}
+%
+%\begin{noteblock}
+%Les exemples suivants montrent déjà quelques possibilités de l'environnement, les commandes et clés seront bien évidemment détaillés dans les sous-sections suivantes.
+%\end{noteblock}
+
+\begin{DemoCode}[]
+\begin{TableKarnaugh}[Aide]
+\end{TableKarnaugh}
+\hspace{0.5cm}
+\begin{TableKarnaugh}[Variables=u/v/w]
+ \KarnaughCasesResult{0,1,1,0,1,1,1,1}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=blue!75,Decalage=-1.5pt]{10}{32}
+ \KarnaughBlocRegroup[Type=Gauche,Couleur=red!75,Decalage=-1.5pt]{00}{11}
+ \KarnaughBlocRegroup[Type=Droite,Couleur=red!75,Decalage=-1.5pt]{40}{31}
+\end{TableKarnaugh}
+\hspace{0.5cm}
+\begin{TableKarnaugh}[Variables=u/v/w,Swap]
+\end{TableKarnaugh}
+
+\begin{center}
+ \begin{TableKarnaugh}[Legende=false,Unite=1.5cm,Epaisseur=1.5pt,Couleur=brown]
+ \end{TableKarnaugh}
+\end{center}
+\end{DemoCode}
+
+\begin{tipblock}
+Le tableau créé également des nœuds, qui seront utilisés pour effectuer des \textit{regroupements} de cases, afin de simplifier une expression booléenne.
+\end{tipblock}
+
+\pagebreak
+
+\subsection{Arguments et clés pour l'environnement}
+
+\begin{DemoCode}[listing only]
+\begin{TableKarnaugh}[clés]<options tikz>
+ %commandes
+\end{TableKarnaugh}
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne la création de l'environnement, les \Cle{clés} sont :
+
+\begin{itemize}
+ \item \Cle{Couleur} := couleur du tableau ; \hfill~défaut : \Cle{black}
+ \item \Cle{Unite} := unité de base de la figure ; \hfill~défaut : \Cle{1cm}
+ \item \Cle{Variables} := nom des variables, sous la forme \Cle{Gauche/Haut/Bas} ; \hfill~défaut : \Cle{a/b/c}
+ \item \Cle{Swap} := booléen pour échanger les variables du \textit{bas} ; \hfill~défaut : \Cle{false}
+ \item \Cle{Aide} := booléen pour afficher une aide sur les noms des nœuds ; \hfill~défaut : \Cle{false}
+ \item \Cle{Epaisseur} := épaisseur des tracés ; \hfill~défaut : \Cle{0.75pt}
+ \item \Cle{CouleurCases} := couleur de remplissage des cases ; \hfill~défaut : \Cle{lightgray}
+ \item \Cle{CouleurLegende} := couleur de la légende, via \Cle{Couleur} ou \Cle{CouleurA/CouleurB/CouleurC} ;
+
+ \hfill~défaut : \Cle{black}
+ \item \Cle{PosVarLaterale} := position de la variable \textit{latérale}.\hfill~défaut : \Cle{Gauche}
+\end{itemize}
+
+Le deuxième argument, optionnel et entre \texttt{<...>} propose des options, en langage \packagetex!tikz! à passer à l'environnement.
+\end{tipblock}
+
+\subsection{Arguments et clés pour la commande de remplissage}
+
+\begin{DemoCode}[listing only]
+\begin{TableKarnaugh}[clés]<options tikz>
+ \KarnaughCasesResult(*){contenu binaire des cases}
+\end{TableKarnaugh}
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne le remplissage des cases :
+
+\begin{itemize}
+ \item la version \textit{étoilée} permet de \textit{griser} les cases au lieu de les remplir de \texttt{0/1} ;
+ \item l'argument obligatoire, et entre \texttt{\{....\}} est la liste des cases, de gauche à droite en partant de la ligne du haut ;
+ \item la couleur de cases est gérée par la clé idoine de l'environnement.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\subsection{Arguments et clés pour la commande de regroupement des blocs}
+
+\begin{DemoCode}[listing only]
+\begin{TableKarnaugh}[clés]<options tikz>
+ %remplissage des cases
+ \KarnaughBlocRegroup[clés]{coinA}{coinB}
+\end{TableKarnaugh}
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne le regroupement des cases par blocs, les \Cle{clés} disponibles sont :
+
+\begin{itemize}
+ \item \Cle{Couleur} := couleur du \textit{trait} ; \hfill~défaut : \Cle{red}
+ \item \Cle{type} := type de regroupement parmi \Cle{Centre/Gauche/Droite} ; \hfill~défaut : \Cle{Centre}
+ \item \Cle{Decalage} := décalage du trait par rapports aux cases.\hfill~défaut : \Cle{2pt}
+\end{itemize}
+
+Les deux arguments obligatoires, et entre \texttt{\{...\}}, correspondent aux \textit{coins diagonaux} :
+
+\begin{itemize}
+ \item sans contrainte pour un rectangle \Cle{Type=Centre} ;
+ \item du type \texttt{\{BG\}\{HD\}} pour un rectangle \Cle{Type=Gauche} ;
+ \item du type \texttt{\{BD\}\{HG\}} pour un rectangle \Cle{Type=Droite}.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\subsection{Exemples}
+
+\begin{DemoCode}[]
+\begin{TableKarnaugh}
+ \KarnaughCasesResult{0,1,1,0,1,1,1,1}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=orange,Decalage=-1.5pt]{10}{32}
+ \KarnaughBlocRegroup[Type=Gauche,Couleur=teal,Decalage=-1.5pt]{00}{11}
+ \KarnaughBlocRegroup[Type=Droite,Couleur=teal,Decalage=-1.5pt]{40}{31}
+\end{TableKarnaugh}
+\hspace{5mm}
+\begin{TableKarnaugh}[Aide]
+ \KarnaughCasesResult{0,1,1,0,1,1,1,1}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=orange,Decalage=-1.5pt]{10}{32}
+ \KarnaughBlocRegroup[Type=Gauche,Couleur=teal,Decalage=-1.5pt]{00}{11}
+ \KarnaughBlocRegroup[Type=Droite,Couleur=teal,Decalage=-1.5pt]{40}{31}
+\end{TableKarnaugh}
+\hspace{5mm}
+\begin{TableKarnaugh}[Swap]
+ \KarnaughCasesResult{0,1,1,0,1,1,1,1}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=teal,Decalage=-1.5pt]{10}{32}
+ \KarnaughBlocRegroup[Type=Gauche,Couleur=orange,Decalage=-1.5pt]{00}{11}
+ \KarnaughBlocRegroup[Type=Droite,Couleur=orange,Decalage=-1.5pt]{40}{31}
+\end{TableKarnaugh}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+On obtient le tableau de Karnaugh suivant :
+\begin{TableKarnaugh}
+ [Variables=k/l/m,Unite=1.25cm,CouleurCases=cyan!25,Couleur=darkgray, PosVarLaterale=Droite,CouleurLegende=black/blue/red]
+ <baseline=(current bounding box.center)>
+ \KarnaughCasesResult*{1,1,1,0,1,1,1,0}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=brown,Decalage=-3pt]{00}{22}
+ \KarnaughBlocRegroup[Type=Centre,Couleur=teal,Decalage=-1.5pt]{10}{32}
+\end{TableKarnaugh}
+\end{DemoCode}
+
+\pagebreak
+
+\section{Graphes \textit{simples}}
+
+\subsection{Commande et fonctionnement global}
+
+\begin{cautionblock}
+L'environnement dédié à la création d'un graphe \textit{simple} est \motcletex!GrapheTikz!.
+
+C'est en fait un environnement \motcletex!tikzpicture! personnalisé.
+
+\smallskip
+
+Les commandes à utiliser dans l'environnement sont :
+
+\begin{itemize}
+ \item \motcletex!\GrphPlaceSommets! ;
+ \item \motcletex!\GrphTraceAretes! ;.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheTikz}[clés]<options tikz>
+ \GrphPlaceSommets{liste coordonnées/sommet}
+ \GrphTraceAretes(*)[type]<options tikz>{liste arêtes}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}
+ \GrphPlaceSommets{(2,2.5)/A (0,0)/B (5,1)/C}
+ \GrphTraceAretes{A/B}
+ \GrphTraceAretes[AngleGauche]{C/A}
+ \GrphTraceAretes[AngleDroite]{B/C}
+ \GrphTraceAretes[Boucle]{A/45 B/135 C/-45}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{warningblock}
+La majorité des paramètres sont personnalisables, mais le \textit{thème} général est globalement \textit{fixé}, dans le sens où ce sont les éléments \textit{cosmétiques} qui pourront être modifiés.
+
+\smallskip
+
+Au contraire du package \packagetex!tkz-graph! qui permet beaucoup plus de choses, les commandes de \packagetex!ProfSio! se veulent beaucoup plus basiques, dans l'optique de travailler avec des graphes en adéquation avec le programme de BTS SIO.
+\end{warningblock}
+
+\begin{noteblock}
+L'utilisateur pourra également redéfinir les styles utilisées par les commandes de \packagetex!ProfSio! pour refondre le paramétrage global de l'environnement.
+\end{noteblock}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheTikz}[clés]<options tikz>
+ \tikzset{GrphStyleSommet/.style = {...}}
+ \tikzset{GrphStyleArc/.style = {...}}
+ \tikzset{GrphStylepoids/.style = {...}}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{tipblock}
+La commande de tracé des arêtes nécessite de travailler avec des nœuds existants, donc tout nœud précédemment défini, que ce soit avec la commande de \packagetex!ProfSio! ou tout autre commande pourra être utilisé !
+\end{tipblock}
+
+\subsection{Arguments et clés pour l'environnement}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheTikz}[clés]<options tikz>
+ %commandes
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne la création de l'environnement, les \Cle{clés} sont :
+
+\begin{itemize}
+ \item \Cle{Police} := police des sommets ; \hfill{}défaut : \Cle{\textbackslash bfseries\textbackslash Large\textbackslash sffamily},%
+ \item \Cle{Poids} := police des éventuels poids ; \hfill{}défaut : \Cle{\textbackslash sffamily},%
+ \item \Cle{CouleurSommets} := couleur(s) sous la forme \Cle{Couleur} ou \Cle{CouleurBord/CouleurTexte} des sommets ;
+
+ \hfill{}défaut : \Cle{black}
+ \item \Cle{CouleurFleches} := couleur des arêtes (et des poids) ; \hfill{}défaut : \Cle{black},%
+ \item \Cle{TypeSommets} := type de forme des sommets ; \hfill{}défaut : \Cle{circle}
+ \item \Cle{Epaisseur} := épaisseur(s) sous la forme \Cle{Epaisseur} ou \Cle{EpaisseurSommet/EpaisseurArête} des traits ;
+
+ \hfill{}défaut : \Cle{thick}
+ \item \Cle{Unite} := unité globale de la figure ; \hfill{}défaut : \Cle{1cm}
+ \item \Cle{CouleurFT} := couleur des arêtes de la fermeture transitive (accessible ensuite via \Cle{FT}) ; \hfill{}défaut : \Cle{black}
+ \item \Cle{Grille} := pour afficher une grille d'aide (\Cle{\{xmax,ymax\}}), entre (0;\,0) et (xmax;\,ymax) ;
+
+ \hfill~défaut : \Cle{vide}
+ \item \Cle{DimensionSommets} := dimension(s) minimale(s) des formes des sommets, sous la forme \Cle{Globale} ou \Cle{Largeur/Hauteur} ;
+
+ \hfill{}défaut : \Cle{1cm}
+ \item \Cle{PositionFleches} := position, parmi \Cle{Milieu/Fin} pour les flèches ; \hfill{}défaut : \Cle{Fin}
+ \item \Cle{EchelleFleches} := échelle de la flèche ; \hfill{}défaut : \Cle{1}
+ \item \Cle{TypeFleche} := type (en \TikZ) des flèches.\hfill{}défaut : \Cle{Latex}
+\end{itemize}
+
+Le deuxième argument, optionnel et entre \texttt{<...>} propose des options, en langage \packagetex!tikz! à passer à l'environnement.
+\end{tipblock}
+
+\pagebreak
+
+\subsection{Arguments et clés pour la commande de création des sommets}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheTikz}[clés]<options tikz>
+ \GrphPlaceSommets{liste coordonnées/sommet}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne la création des sommets, la liste est à donner sous la forme \verb!(xa,ya)/A (xb,yb)/B (xc,yc)/C ...!
+
+\smallskip
+
+Dans le cas de sommets avec des espaces, il faut les \textit{protéger} par des \texttt{\{...\}}.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}[CouleurSommets={brown/purple},TypeSommets=ellipse,Police={}]
+ \GrphPlaceSommets{(2,2.5)/Hôpital (0,0)/Mairie (5,1)/Banque}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}[Epaisseur={very thick},Grille={5,4},DimensionSommets=1.5cm]
+ \GrphPlaceSommets{(0,0)/K (4,0)/L (60:4)/M}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}[TypeSommets=diamond,DimensionSommets=2cm/1.5cm]
+ \GrphPlaceSommets{(0,0)/K (4,0)/L (60:4)/M}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Arguments et clés pour la commande de tracé des arêtes}
+
+\begin{DemoCode}[listing only]
+\begin{GrapheTikz}[clés]<options tikz>
+ %commandes de placement des sommets
+ \GrphTraceAretes(*)[type]<options tikz>{liste arêtes}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne le tracés des arêtes, la commande permet de tracer des arêtes ayant le même style.
+
+\smallskip
+
+La version \textit{étoilée} permet de pondérer l'arête (le poids est, par défaut, situé sur le milieu de l'arête).
+
+\smallskip
+
+Les \Cle{type} d'arête, disponible entre \texttt{[...]} et valant \Cle{Droit} par défaut, de la commande peut valoir :
+
+\begin{itemize}
+ \item \Cle{Droit} := permet de tracer des arêtes orientées \textit{droites} ;
+ \item \Cle{AngleGauche} ou \Cle{AngleGauche=...} := permet de tracer des arêtes orientées \textit{courbées vers la gauche}, avec par défaut un angle de 10° ;
+ \item \Cle{AngleDroite} ou \Cle{AngleDroite=...} := permet de tracer des arêtes orientées \textit{courbées vers la droite}, avec par défaut un angle de 10° ;
+ \item \Cle{Boucle} ou \Cle{Boucle=...} := permet de tracer une boucle avec un coefficient \motcletex!looseness! de 6 par défaut.
+\end{itemize}
+
+Dans le cas d'arêtes \textit{classiques}, la liste est à donner sous la forme \verb|Deb/Fin Deb/Fin Deb/Fin ...| ou \verb|Deb/Fin/Poids Deb/Fin/Poids Deb/Fin/Poids ...|
+
+\smallskip
+
+Dans le cas de boucles, la lise est à donner sous la forme \verb|Som/anglesortie Som/anglesortie ...| ou \verb|Som/anglesortie/Poids Som/anglesortie/Poids ...| en sachant que (par défaut) l'angle d'entrée est fixé 90° après dans le sens trigonométrique.
+
+\smallskip
+
+Pour marquer une fermeture transitive, on peut utiliser le style \verb|FT| dans les \textit{options tikz} de la commande.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}
+ \GrphPlaceSommets{(0,0)/A (3,1)/B}
+ \GrphTraceAretes{A/B}
+\end{GrapheTikz}
+\hspace{5mm}
+\begin{GrapheTikz}
+ \GrphPlaceSommets{(0,0)/A (3,1)/B}
+ \GrphTraceAretes[AngleGauche]{A/B}
+\end{GrapheTikz}
+\hspace{5mm}
+\begin{GrapheTikz}
+ \GrphPlaceSommets{(0,0)/A (3,1)/B}
+ \GrphTraceAretes*[AngleGauche]{A/B/10}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}
+ \GrphPlaceSommets{(0,0)/A (3,1)/B}
+ \GrphTraceAretes[AngleDroite=45]{A/B}
+\end{GrapheTikz}
+\hspace{5mm}
+\begin{GrapheTikz}
+ \GrphPlaceSommets{(0,0)/A (3,1)/B}
+ \GrphTraceAretes[AngleGauche]{A/B B/A}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}
+ \GrphPlaceSommets{(0,0)/A (4,1)/B (2,3)/C}
+ \GrphTraceAretes[Boucle]{A/135 B/15}
+ \GrphTraceAretes*[Boucle=10]{C/60/{0{,}3}}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\subsection{Exemples}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}
+ [DimensionSommets=14pt,Police=\bfseries\sffamily,CouleurSommets={blue/orange}]
+ %SOMMETS
+ \GrphPlaceSommets{(1,4)/A (3,4)/B (4,3)/C (3,2)/D (2,1)/E (0,1)/F}
+ %ARÊTES
+ \GrphTraceAretes{A/B B/D B/E C/A C/D D/A D/E E/F F/B}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\begin{GrapheTikz}
+ %SOMMETS
+ \GrphPlaceSommets{(1,6)/A (7,6)/B (7,3)/C (4,1)/D (1,3)/E}
+ %ARÊTES
+ \GrphTraceAretes[AngleGauche]{A/B A/D A/E B/E C/E E/C D/C C/D E/D D/E}
+ %FT
+ \GrphTraceAretes[AngleGauche]<FT>{A/C B/C B/D}
+ \GrphTraceAretes[Boucle]<FT>{C/-45 E/135 D/-135}
+\end{GrapheTikz}
+\end{DemoCode}
+
+\end{document} \ No newline at end of file
diff --git a/graphics/pgf/contrib/profsio/tex/ProfSio.sty b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
new file mode 100644
index 0000000000..0235f49994
--- /dev/null
+++ b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
@@ -0,0 +1,543 @@
+% Author : C. Pierquet
+% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ProfSio}[2023/06/23 0.1.0 Pour les enseignants en BTS SIO]
+%0.1.0 Version initiale
+
+%------Packages utiles
+\RequirePackage{tikz,pgffor}
+\RequirePackage{tabularray}
+\RequirePackage{simplekv}
+\RequirePackage{xstring}
+\RequirePackage{listofitems}
+\RequirePackage{xintexpr}
+%------Librairies
+\usetikzlibrary{positioning,decorations.pathreplacing,decorations.markings,arrows,arrows.meta,calc,babel,shapes,shapes.geometric}
+
+%------Graphe MPM
+\defKV[MPM]{%
+ CouleurDurees=\def\MPMCoulDuree{#1},%
+ CouleurFleches=\def\MPMCoulFleche{#1},%
+ LargeurCases=\def\MPMLargBoite{#1},%
+ Epaisseur=\def\MPMThick{#1},%
+ Police=\def\MPMFont{#1},%
+ CouleurDates=\def\MPMCoulDates{#1},%
+ CouleurBords=\def\MPMCoulTraits{#1},%
+ Grille=\def\MPMGrille{#1}
+}
+
+\setKVdefault[MPM]{%
+ CouleurDurees=purple,
+ CouleurFleches=blue,%
+ LargeurCases=0.75cm,%
+ Epaisseur=0.75pt,%
+ Police=\footnotesize\sffamily,%
+ CouleurDates=teal/red,%
+ CouleurBords=black,%
+ NoirBlanc=false,%
+ Grille={}
+}
+
+\NewTblrEnviron{MPMtache}
+\SetTblrInner[MPMtache]{rowsep=1pt,colsep=1pt,colspec={Q[\MPMLargBoite,m,c]Q[\MPMLargBoite,m,c]},cells={font=\MPMFont},row{1}={font=\bfseries\MPMFont}}
+
+\tikzset{
+ pics/MPM/.style args={nom=#1,t=#2,T=#3}{%1=nom noeud,2=t,3=T
+ code = {
+ \node[inner sep=0pt,outer sep=0pt] (#1) at (0,0) {
+ \begin{MPMtache}{hlines={wd=\MPMThick,fg=\MPMCoulTraits},vlines={wd=\MPMThick,fg=\MPMCoulTraits}}
+ \SetCell[c=2]{c} {#1} & \\
+ \textcolor{\MPMCoulDatet}{#2} & \textcolor{\MPMCoulDateT}{#3} \\
+ \end{MPMtache}};
+ }
+ },
+ pics/MPMcomplet/.style args={nom=#1,t=#2,T=#3,MT=#4,ML=#5}{%1=nom noeud/2=t/3=T/4=MT/5=ML
+ code = {
+ \node[inner sep=0pt,outer sep=0pt] (#1) at (0,0) {
+ \begin{MPMtache}{hlines={wd=\MPMThick,fg=\MPMCoulTraits},vlines={wd=\MPMThick,fg=\MPMCoulTraits}}
+ \SetCell[c=2]{c} {#1} & \\
+ \textcolor{\MPMCoulDatet}{#2} & \textcolor{\MPMCoulDateT}{#3} \\
+ #4 & #5 \\
+ \end{MPMtache}};
+ }
+ },%
+ pics/MPMnotice/.style={%
+ code = {
+ \node[inner sep=0pt,outer sep=0pt] (Notice) at (0,0) {
+ \begin{MPMtache}{hline{2-Z}={wd=\MPMThick,fg=\MPMCoulTraits},vlines={2-Z}{wd=\MPMThick,fg=\MPMCoulTraits}}
+ \SetCell[c=2]{c} \textcolor{violet}{Aide} & \\
+ \SetCell[c=2]{c} \textbf{Som.} & \\
+ \textcolor{\MPMCoulDatet}{t} & \textcolor{\MPMCoulDateT}{T} \\
+ \end{MPMtache}};
+ }
+ },%
+ pics/MPMnoticecomplet/.style={%
+ code = {
+ \node[inner sep=0pt,outer sep=0pt] (Notice) at (0,0) {
+ \begin{MPMtache}{hline{2-Z}={wd=\MPMThick,fg=\MPMCoulTraits},vlines={2-Z}{wd=\MPMThick,fg=\MPMCoulTraits}}
+ \SetCell[c=2]{c} \textcolor{violet}{Aide} & \\
+ \SetCell[c=2]{c} {Som.} & \\
+ \textcolor{\MPMCoulDatet}{t} & \textcolor{\MPMCoulDateT}{T} \\
+ MT & ML \\
+ \end{MPMtache}};
+ }
+ },%
+ dureeMPM/.style={circle,draw=none,fill=white,inner sep=1pt,font=\MPMFont,text=\MPMCoulDuree},
+ arcMPM/.style={\MPMCoulFleche,->,>=latex,line width=\MPMThick,line cap=round}
+}
+
+
+\NewDocumentCommand\MPMPlaceTache{ r() r() r() }{%
+ \StrCount{#3}{,}[\MPMtmpType]
+ \xintifboolexpr{\MPMtmpType == 1 }%si il n'y a que 2 dates...
+ {%
+ \StrCut{#3}{,}{\MPMtmpt}{\MPMtmpT}%
+ \pic at (#1) {MPM={nom=#2,t=\MPMtmpt,T=\MPMtmpT}} ;
+ }%
+ {%
+ \StrBefore[1]{#3}{,}[\MPMtmpt]%
+ \StrBetween[1,2]{#3}{,}{,}[\MPMtmpT]%
+ \StrBetween[2,3]{#3}{,}{,}[\MPMtmpMT]%
+ \StrBehind[3]{#3}{,}[\MPMtmpML]%
+ \pic at (#1) {MPMcomplet={nom=#2,t=\MPMtmpt,T=\MPMtmpT,MT=\MPMtmpMT,ML=\MPMtmpML}} ;
+ }%
+}
+
+\NewDocumentCommand\MPMPlaceTaches{ m }{%
+ \setsepchar[.]{/}%
+ \readlist*\MPMListeTaches{#1}%
+ \foreach \i in {1,2,...,\MPMListeTacheslen}%
+ {%
+ \itemtomacro\MPMListeTaches[\i]{\MPMtmpData}%
+ \StrBetween[1,1]{\MPMtmpData}{(}{)}[\MPMtmpCoord]%
+ \StrBetween[2,2]{\MPMtmpData}{(}{)}[\MPMtmpTache]%
+ \StrBetween[3,3]{\MPMtmpData}{(}{)}[\MPMtmpDates]%
+ \MPMPlaceTache(\MPMtmpCoord)(\MPMtmpTache)(\MPMtmpDates)
+ }%
+}
+
+\NewDocumentCommand\MPMPlaceNotice{ s r() }{%
+ \IfBooleanTF{#1}%
+ {%
+ \pic at (#2) {MPMnoticecomplet} ;
+ }%
+ {%
+ \pic at (#2) {MPMnotice} ;
+ }%
+}
+
+\defKV[MPMarc]{%
+ DecalHorizDeb=\def\MPMOffsetHInit{#1},%
+ DecalVertDeb=\def\MPMOffsetVInit{#1},%
+ DecalHorizFin=\def\MPMOffsetHFin{#1},%
+ DecalVertFin=\def\MPMOffsetVFin{#1},%
+ SensCoude=\def\MPMOrientation{#1},%
+ HauteurCoude=\def\MPMHautCoude{#1}
+}
+
+\setKVdefault[MPMarc]{%
+ DecalHorizDeb=0pt,%
+ DecalVertDeb=0pt,%
+ DecalHorizFin=0pt,%
+ DecalVertFin=0pt,%
+ Coude=false,%
+ SensCoude=HV,%
+ HauteurCoude=10pt
+}
+
+\NewDocumentCommand\MPMPlaceDuree{ O{} m D<>{midway}}{%
+ \useKVdefault[MPMarc]%
+ \setKV[MPMarc]{#1}%
+ \StrBefore{#2}{>}[\MPMSommetDep]%
+ \StrBetween{#2}{>}{,}[\MPMSommetFin]%
+ \StrBehind{#2}{,}[\MPMduree]%
+ \ifboolKV[MPMarc]{Coude}%
+ {%
+ \IfStrEq{\MPMOrientation}{HV}%
+ {%
+ \draw[arcMPM] ([xshift=\MPMOffsetHInit,yshift=\MPMOffsetVInit]\MPMSommetDep) -| ([xshift=\MPMOffsetHFin,yshift=\MPMOffsetVFin]\MPMSommetFin) node[dureeMPM,#3] {\MPMduree} ;
+ }{}%
+ \IfStrEq{\MPMOrientation}{VH}%
+ {%
+ \draw[arcMPM] ([xshift=\MPMOffsetHInit,yshift=\MPMOffsetVInit]\MPMSommetDep) |- ([xshift=\MPMOffsetHFin,yshift=\MPMOffsetVFin]\MPMSommetFin) node[dureeMPM,#3] {\MPMduree} ;
+ }{}%
+ \IfStrEq{\MPMOrientation}{VHV}%
+ {%
+ \draw[arcMPM] ([xshift=\MPMOffsetHInit,yshift=\MPMOffsetVInit]\MPMSommetDep)--++(0,{-\MPMHautCoude}) -| ([xshift=\MPMOffsetHFin,yshift=\MPMOffsetVFin]\MPMSommetFin) node[dureeMPM,#3] {\MPMduree} ;
+ }{}%
+ }%
+ {%
+ \draw[arcMPM] ([xshift=\MPMOffsetHInit,yshift=\MPMOffsetVInit]\MPMSommetDep) -- ([xshift=\MPMOffsetHFin,yshift=\MPMOffsetVFin]\MPMSommetFin) node[dureeMPM,#3] {\MPMduree} ;
+ }%
+}
+
+\NewDocumentCommand\MPMPlaceDurees{ O{} m D<>{midway} }{%
+ \setsepchar[.]{/}*
+ \readlist*\KGHListeDurees{#2}%
+ \foreachitem\dureetache\in\KGHListeDurees{%
+ \MPMPlaceDuree[#1]{\dureetache}<#3>%
+ }
+}
+
+\NewDocumentEnvironment{GrapheMPM}{ O{} D<>{} }%
+{%
+ \useKVdefault[MPM]%
+ \setKV[MPM]{#1}%
+ \ifboolKV[MPM]{NoirBlanc}%
+ {%
+ \def\MPMCoulDuree{black}%
+ \def\MPMCoulFleche{black}%
+ \def\MPMCoulDates{black}%
+ \def\MPMCoulTraits{black}
+ }{}%
+ \IfSubStr{\MPMCoulDates}{/}%
+ {%
+ \StrCut{\MPMCoulDates}{/}{\MPMCoulDatet}{\MPMCoulDateT}%
+ }%
+ {%
+ \xdef\MPMCoulDatet{\MPMCoulDates}\xdef\MPMCoulDateT{\MPMCoulDates}
+ }%
+ \begin{tikzpicture}[#2]
+ \IfStrEq{\MPMGrille}{}%
+ {}%
+ {%
+ \StrCut{\MPMGrille}{,}{\MPMGrilleX}{\MPMGrilleY}%
+ \draw[thin,dotted,lightgray,xstep=0.5,ystep=0.5] (0,0) grid (\MPMGrille) ;
+ \draw[thin,lightgray,xstep=1,ystep=1] (0,0) grid (\MPMGrille) ;
+ \foreach \x in {0,0.5,...,\MPMGrilleX} {\draw[thin,lightgray] (\x,0)--++(0,-2pt) node[below,inner sep=1pt,font=\sffamily\tiny] {\x} ;}
+ \foreach \y in {0,0.5,...,\MPMGrilleY} {\draw[thin,lightgray] (0,\y)--++(-2pt,0) node[left,inner sep=1pt,font=\sffamily\tiny] {\y} ;}
+ \filldraw[lightgray] (0,0) circle[radius=1.5pt] ;
+ }%
+}%
+{%
+ \end{tikzpicture}
+}
+
+%------Karnaugh (3 variables)
+\defKV[tblkgh]{%
+ Unite=\def\KGHTechelle{#1},%
+ Variables=\def\KGHTvariables{#1},%
+ Epaisseur=\def\KGHThick{#1},%
+ CouleurCases=\def\KGHTCoulCases{#1},%
+ Couleur=\def\KGHTCoul{#1},%
+ PosVarLaterale=\def\KGHTPosVarA{#1},%
+ CouleurLegende=\def\KGHTCoulLegende{#1}
+}
+
+\setKVdefault[tblkgh]{%
+ Unite=1cm,%
+ Variables=a/b/c,%
+ Swap=false,%
+ Aide=false,%
+ Epaisseur=0.75pt,%
+ CouleurCases=lightgray,%
+ Legende=true,%
+ Couleur=black,%
+ PosVarLaterale=Gauche,%
+ CouleurLegende=black
+}
+
+\NewDocumentEnvironment{TableKarnaugh}{ O{} D<>{} }%
+{%
+ \useKVdefault[tblkgh]%
+ \setKV[tblkgh]{#1}%
+ \setsepchar[.]{/}%
+ \readlist*\ListeVariablesKGH\KGHTvariables%
+ \IfSubStr{\KGHTCoulLegende}{/}%
+ {%
+ \StrBefore[1]{\KGHTCoulLegende}{/}[\KGHTCoulLegendeA]%
+ \StrBetween[1,2]{\KGHTCoulLegende}{/}{/}[\KGHTCoulLegendeB]%
+ \StrBehind[2]{\KGHTCoulLegende}{/}[\KGHTCoulLegendeC]%
+ }%
+ {%
+ \def\KGHTCoulLegendeA{\KGHTCoulLegende}%
+ \def\KGHTCoulLegendeB{\KGHTCoulLegende}%
+ \def\KGHTCoulLegendeC{\KGHTCoulLegende}%
+ }%
+ \begin{tikzpicture}[x=\KGHTechelle,y=\KGHTechelle,line join=miter,#2]
+ \coordinate (A00) at (0,0) ; \coordinate (A10) at (1,0) ;
+ \coordinate (A20) at (2,0) ; \coordinate (A30) at (3,0) ;
+ \coordinate (A40) at (4,0) ; \coordinate (A01) at (0,1) ;
+ \coordinate (A11) at (1,1) ; \coordinate (A21) at (2,1) ;
+ \coordinate (A31) at (3,1) ; \coordinate (A41) at (4,1) ;
+ \coordinate (A02) at (0,2) ; \coordinate (A12) at (1,2) ;
+ \coordinate (A22) at (2,2) ; \coordinate (A32) at (3,2) ;
+ \coordinate (A42) at (4,2) ;
+ \ifboolKV[tblkgh]{Legende}
+ {%
+ \draw[\KGHTCoulLegendeB,line width=\KGHThick,decorate,decoration={brace,amplitude=7pt}](0,2.1)--(2,2.1) node[midway,above=7pt,inner sep=1pt,text=\KGHTCoulLegendeB,outer sep=0pt] {$\strut\mathtt{\ListeVariablesKGH[2]}$};
+ \draw[\KGHTCoulLegendeB,line width=\KGHThick,decorate,decoration={brace,amplitude=7pt}](2,2.1)--(4,2.1) node[midway,above=7pt,inner sep=1pt,text=\KGHTCoulLegendeB,outer sep=0pt] {$\strut\mathtt{\overline{\ListeVariablesKGH[2]}}$};
+ \ifboolKV[tblkgh]{Swap}%
+ {%
+ \draw[\KGHTCoulLegendeC,line width=\KGHThick,decorate,decoration={brace,amplitude=7pt,mirror}](1,-0.1)--(3,-0.1) node[midway,below=7pt,inner sep=1pt,text=\KGHTCoulLegendeC,outer sep=0pt] {$\strut\mathtt{\ListeVariablesKGH[3]}$};
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (0.5,-0.1) {$\strut\mathtt{\overline{\ListeVariablesKGH[3]}}$};
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (3.5,-0.1) {$\strut\mathtt{\overline{\ListeVariablesKGH[3]}}$};
+ }%
+ {%
+ \draw[\KGHTCoulLegendeC,line width=\KGHThick,decorate,decoration={brace,amplitude=7pt,mirror}](1,-0.1)--(3,-0.1) node[midway,below=7pt,inner sep=1pt,text=\KGHTCoulLegendeC,outer sep=0pt] {$\strut\mathtt{\overline{\ListeVariablesKGH[3]}}$};
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (0.5,-0.1) {$\strut\mathtt{\ListeVariablesKGH[3]}$};
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (3.5,-0.1) {$\strut\mathtt{\ListeVariablesKGH[3]}$};
+ }%
+ \IfStrEq{\KGHTPosVarA}{Gauche}
+ {%
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,left=8pt] at (0,0.5) {$\strut\mathtt{\overline{\ListeVariablesKGH[1]}}$};
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,left=8pt] at (0,1.5) {$\strut\mathtt{\ListeVariablesKGH[1]}$};
+ }{}%
+ \IfStrEq{\KGHTPosVarA}{Droite}
+ {%
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,right=8pt] at (4,0.5) {$\strut\mathtt{\overline{\ListeVariablesKGH[1]}}$};
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,right=8pt] at (4,1.5) {$\strut\mathtt{\ListeVariablesKGH[1]}$};
+ }{}%
+ }%
+ {}%
+ \draw[line width=\KGHThick,step=1,ystep=1,\KGHTCoul] (0,0) grid (4,2) ; \draw[line width=\KGHThick,\KGHTCoul] (0,0) rectangle (4,2) ;
+ }%
+ {%
+ \ifboolKV[tblkgh]{Aide}%
+ {%
+ \foreach \noeud in {00,10,20,30,40,01,11,21,31,41,02,12,22,32,42}
+ {%
+ \draw (A\noeud) node[gray,inner sep=1pt,fill=yellow,text=red,outer sep=0pt,font=\tiny\sffamily,scale=0.75] {A\noeud} ;
+ }%
+ }{}%
+ \end{tikzpicture}
+}%
+
+\defKV[blockarnaugh]{%
+ Decalage=\def\KGHdecalage{#1},%
+ Couleur=\def\KGHcouleur{#1},%
+ Type=\def\KGHtype{#1}
+}
+
+\setKVdefault[blockarnaugh]{%
+ Decalage=2pt,%
+ Couleur=red,%
+ Type=Centre
+}
+
+\newcommand\KarnaughBlocCoul[2][lightgray]{%
+ \setsepchar[.]{,./}%
+ \readlist*\KGHListeRect{#2}%
+ \xintFor* ##1 in {\xintSeq{1}{\KGHListeRectlen}}\do{%
+ \draw[line width=\KGHThick,fill=#1] (A\KGHListeRect[##1,1]) rectangle (A\KGHListeRect[##1,2]) ;
+ \draw[line width=\KGHThick] (A\KGHListeRect[##1,1]) grid (A\KGHListeRect[##1,2]) ;
+ }%
+}
+
+\NewDocumentCommand\KarnaughCasesResult{ s m }{%
+ \setsepchar{,}%
+ \readlist*\KGHListeResult{#2}%
+ \IfBooleanTF{#1}%
+ {%
+ \xintifboolexpr{\KGHListeResult[1] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A01) rectangle (A12) ;}{}%
+ \xintifboolexpr{\KGHListeResult[2] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A11) rectangle (A22) ;}{}%
+ \xintifboolexpr{\KGHListeResult[3] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A21) rectangle (A32) ;}{}%
+ \xintifboolexpr{\KGHListeResult[4] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A31) rectangle (A42) ;}{}%
+ \xintifboolexpr{\KGHListeResult[5] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A00) rectangle (A11) ;}{}%
+ \xintifboolexpr{\KGHListeResult[6] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A10) rectangle (A21) ;}{}%
+ \xintifboolexpr{\KGHListeResult[7] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A20) rectangle (A31) ;}{}%
+ \xintifboolexpr{\KGHListeResult[8] == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A30) rectangle (A41) ;}{}%
+ }%
+ {%
+ \draw (0.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[1]} ;
+ \draw (1.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[2]} ;
+ \draw (2.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[3]} ;
+ \draw (3.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[4]} ;
+ \draw (0.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[5]} ;
+ \draw (1.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[6]} ;
+ \draw (2.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[7]} ;
+ \draw (3.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\KGHListeResult[8]} ;
+ }%
+}
+
+\newcommand\KarnaughBlocRegroup[3][]{%
+ \useKVdefault[blockarnaugh]%
+ \setKV[blockarnaugh]{#1}%
+ \IfStrEq{\KGHtype}{Centre}%
+ {\draw[rounded corners,line width=1.25pt,color=\KGHcouleur] ($(A#2)+(-\KGHdecalage,-\KGHdecalage)$) rectangle ($(A#3)+(\KGHdecalage,\KGHdecalage)$);}%
+ {}%
+ \IfStrEq{\KGHtype}{Gauche}%#2=BG #3=HD
+ {%
+ \StrChar{#2}{1}[\KGHia]%
+ \StrChar{#2}{2}[\KGHja]%
+ \StrChar{#3}{1}[\KGHib]%
+ \StrChar{#3}{2}[\KGHjb]%
+ \draw[rounded corners,line width=1.25pt,color=\KGHcouleur]%
+ ($(A#2)+(-\KGHdecalage,-\KGHdecalage)$) -- ($(A\KGHib\KGHja)+(\KGHdecalage,-\KGHdecalage)$)%
+ -- ($(A#3)+(\KGHdecalage,\KGHdecalage)$) -- ($(A\KGHia\KGHjb)+(-\KGHdecalage,\KGHdecalage)$);%
+ }%
+ {}%
+ \IfStrEq{\KGHtype}{Droite}%#2=BD #3=HG
+ {%
+ \StrChar{#2}{1}[\KGHia]%
+ \StrChar{#2}{2}[\KGHja]%
+ \StrChar{#3}{1}[\KGHib]%
+ \StrChar{#3}{2}[\KGHjb]%
+ \draw[rounded corners,line width=1.25pt,color=\KGHcouleur]%
+ ($(A#2)+(\KGHdecalage,-\KGHdecalage)$) -- ($(A\KGHib\KGHja)+(-\KGHdecalage,-\KGHdecalage)$)%
+ -- ($(A#3)+(-\KGHdecalage,\KGHdecalage)$) -- ($(A\KGHia\KGHjb)+(\KGHdecalage,\KGHdecalage)$);%
+ }%
+ {}%
+}
+
+%------Graphes
+\defKV[GraphSIO]{%
+ Police=\def\GrphPoliceSommets{#1},%
+ Poids=\def\GrphPolicePoids{#1},%
+ CouleurSommets=\def\GrphCoulSommets{#1},%
+ CouleurFleches=\def\GrphCoulFleches{#1},%
+ Epaisseur=\def\GrphTchick{#1},%
+ TypeSommets=\def\GrphTypeSomm{#1},%
+ Unite=\def\GrphUnit{#1},%
+ CouleurFT=\def\GrphCoulFT{#1},%
+ Grille=\def\GrphGrille{#1},%
+ DimensionSommets=\def\GrphDimSommet{#1},%
+ PositionFleches=\def\GrphPosArrow{#1},%
+ EchelleFleches=\def\GrphScaleArrow{#1},%
+ TypeFleche=\def\GrphTypeArrow{#1}
+}
+
+\setKVdefault[GraphSIO]{%
+ Police={\bfseries\Large\sffamily},%
+ Poids={\sffamily},%
+ CouleurSommets={black},%
+ CouleurFleches={black},%
+ TypeSommets=circle,%
+ Epaisseur=thick,%
+ Unite=1cm,%
+ CouleurFT=red,%
+ Grille={},%
+ DimensionSommets=1cm,%
+ PositionFleches={Fin},%
+ EchelleFleches=1,%
+ TypeFleche=Latex
+}
+
+\NewDocumentEnvironment{GrapheTikz}{ O{} D<>{} }%
+{%
+ \restoreKV[GraphSIO]% revenir au valeurs par défaut
+ \setKV[GraphSIO]{#1}% lit les arguments optionnels
+ \IfSubStr{\GrphDimSommet}{/}%
+ {%
+ \StrCut{\GrphDimSommet}{/}{\GrphDimSommetLarg}{\GrphDimSommetHaut}%
+ }%
+ {%
+ \def\GrphDimSommetLarg{\GrphDimSommet}\def\GrphDimSommetHaut{\GrphDimSommet}%
+ }%
+ \IfSubStr{\GrphTchick}{/}%
+ {%
+ \StrCut{\GrphTchick}{/}{\GrphTchickA}{\GrphTchickB}%
+ }%
+ {%
+ \def\GrphTchickA{\GrphTchick}\def\GrphTchickB{\GrphTchick}%
+ }%
+ \IfSubStr{\GrphCoulSommets}{/}%
+ {%
+ \StrCut{\GrphCoulSommets}{/}{\GrphCoulA}{\GrphCoulB}%
+ }%
+ {%
+ \def\GrphCoulA{\GrphCoulSommets}\def\GrphCoulB{\GrphCoulSommets}%
+ }%
+ \begin{tikzpicture}[x=\GrphUnit,y=\GrphUnit,#2]
+ \tikzset{GrphStyleSommet/.style = {\GrphTchickA,draw=\GrphCoulA,\GrphTypeSomm,minimum height=\GrphDimSommetHaut,minimum width=\GrphDimSommetLarg,text=\GrphCoulB}}%
+ \tikzset{GrphStylepoids/.style = {inner sep=2pt,midway,draw=none,font=\GrphPolicePoids,text=\GrphCoulFleches,fill=white}}%
+ \IfStrEq{\GrphPosArrow}{Fin}%
+ {%
+ \tikzset{GrphStyleArc/.style = {\GrphCoulFleches,\GrphTchickB,-{\GrphTypeArrow[scale=\GrphScaleArrow]}}}%
+ }%
+ {}%
+ \IfStrEq{\GrphPosArrow}{Milieu}%
+ {%
+ \tikzset{GrphStyleArc/.style = {\GrphCoulFleches,\GrphTchickB,postaction={decorate},decoration={markings,mark=at position 0.55 with {\arrow[scale=\GrphScaleArrow,>=\GrphTypeArrow]{>}}}}}%
+ }{}%
+ \tikzset{FT/.style = {\GrphCoulFT}}%
+ \IfStrEq{\GrphGrille}{}%
+ {}%
+ {%
+ \StrCut{\GrphGrille}{,}{\GrphGrilleX}{\GrphGrilleY}%
+ \draw[thin,dotted,lightgray,xstep=0.5,ystep=0.5] (0,0) grid (\GrphGrille) ;%
+ \draw[thin,lightgray,xstep=1,ystep=1] (0,0) grid (\GrphGrille) ;%
+ \foreach \x in {0,0.5,...,\GrphGrilleX} {\draw[thin,lightgray] (\x,0)--++(0,-2pt) node[below,inner sep=1pt,font=\sffamily\tiny] {\x} ;}%
+ \foreach \y in {0,0.5,...,\GrphGrilleY} {\draw[thin,lightgray] (0,\y)--++(-2pt,0) node[left,inner sep=1pt,font=\sffamily\tiny] {\y} ;}%
+ \filldraw[lightgray] (0,0) circle[radius=1.5pt] ;%
+ }%
+}%
+{%
+ \end{tikzpicture}
+}
+
+\NewDocumentCommand\GrphPlaceSommets{ m }{%
+ \setsepchar[.]{ ./}%
+ \readlist*\GrphtmpLS{#1}%
+ \xintFor* ##1 in {\xintSeq{1}{\GrphtmpLSlen}}\do{%
+ \node[GrphStyleSommet,font=\GrphPoliceSommets] (\GrphtmpLS[##1,2]) at \GrphtmpLS[##1,1] {\GrphtmpLS[##1,2]} ;
+ }%
+}
+
+\NewDocumentCommand\GrphTraceAretes{ s O{Droit} D<>{} m }{%
+ \setsepchar[.]{ ./}%
+ \readlist*\GrphtmpLA{#4}%
+ \xintFor* ##1 in {\xintSeq{1}{\GrphtmpLAlen}}\do{%
+ \IfStrEq{#2}{Droit}%
+ {%
+ \IfBooleanTF{#1}%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1])--(\GrphtmpLA[##1,2]) node[GrphStylepoids] {\GrphtmpLA[##1,3]} ;%
+ }%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1])--(\GrphtmpLA[##1,2]) ;
+ }%
+ }{}%
+ \IfSubStr{#2}{AngleGauche}%
+ {%
+ \def\GrphAngle{10}%
+ \IfSubStr{#2}{=}%
+ {%
+ \StrBehind{#2}{=}[\GrphAngle]%
+ }{}%
+ \IfBooleanTF{#1}%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1]) to[bend left=\GrphAngle] node[GrphStylepoids] {\GrphtmpLA[##1,3]} (\GrphtmpLA[##1,2]) ;%
+ }%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1]) to[bend left=\GrphAngle] (\GrphtmpLA[##1,2]) ;
+ }%
+ }{}%
+ \IfSubStr{#2}{AngleDroit}%
+ {%
+ \def\GrphAngle{10}%
+ \IfSubStr{#2}{=}%
+ {%
+ \StrBehind{#2}{=}[\GrphAngle]%
+ }{}%
+ \IfBooleanTF{#1}%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1]) to[bend right=\GrphAngle] node[GrphStylepoids] {\GrphtmpLA[##1,3]} (\GrphtmpLA[##1,2]) ;%
+ }%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1]) to[bend right=\GrphAngle] (\GrphtmpLA[##1,2]) ;
+ }%
+ }{}%
+ \IfSubStr{#2}{Boucle}%
+ {%
+ \def\GrphBoucleCoeff{6}%
+ \IfSubStr{#2}{=}%
+ {%
+ \StrBehind{#2}{=}[\GrphBoucleCoeff]%
+ }{}%
+ \def\GrphAngleOut{\GrphtmpLA[##1,2]}%
+ \def\GrphAngleIn{\inteval{\GrphAngleOut+90}}%
+ \IfBooleanTF{#1}%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1]) to[loop,looseness=\GrphBoucleCoeff,out=\GrphAngleOut,in=\GrphAngleIn] node[GrphStylepoids] {\GrphtmpLA[##1,3]} (\GrphtmpLA[##1,1]) ;%
+ }%
+ {%
+ \draw[GrphStyleArc,#3] (\GrphtmpLA[##1,1]) to[loop,looseness=\GrphBoucleCoeff,out=\GrphAngleOut,in=\GrphAngleIn] (\GrphtmpLA[##1,1]) ;
+ }%
+ }{}%
+ }%
+}
+
+
+\endinput \ No newline at end of file