summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-02-09 03:00:44 +0000
committerNorbert Preining <norbert@preining.info>2024-02-09 03:00:44 +0000
commitfa4b456400bb2b415dcbbfe785542c50e9dd61e3 (patch)
tree61bb8ad8f9071ab1f33a17b7bc28dc74fd010b3c /graphics
parentbaa694429155689a0e8bba804206961689e0a606 (diff)
CTAN sync 202402090300
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdfbin391365 -> 431266 bytes
-rw-r--r--graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex147
-rw-r--r--graphics/pgf/contrib/profsio/tex/ProfSio.sty252
3 files changed, 391 insertions, 8 deletions
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
index ab2585e396..acec0d1d34 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
index 9eba3a694d..eabdeb0661 100644
--- a/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
+++ b/graphics/pgf/contrib/profsio/doc/ProfSio-doc-fr.tex
@@ -5,8 +5,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.9}
-\def\TPdate{13 décembre 2023}
+\def\TPversion{0.2.0}
+\def\TPdate{7 février 2024}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
@@ -81,10 +81,10 @@
keywordstyle={\color{violet}},%
classoffset=2,%
alsoletter={-},%
- morekeywords={\MPMPlaceTache,\MPMPlaceNotice,\MPMPlaceDuree,GrapheMPM,TableKarnaugh,\KarnaughCasesResult,\KarnaughBlocRegroup,\MPMPlaceTaches,\MPMPlaceDurees,GrapheTikz,\GrphPlaceSommets,\GrphTraceAretes,\tikzset,\DiagrammeSagittal,\draw,\DiagrammeSagittalCompo,\TableVerite,\SimplificationKarnaugh,\SimplificationBooleenne,\KarnaughCasesAuto,\MatriceAdjacence,\PuissanceMatrice,\NbCheminsLongueur,\FermetureTransitive},%
+ morekeywords={\MPMPlaceTache,\MPMPlaceNotice,\MPMPlaceDuree,GrapheMPM,TableKarnaugh,\KarnaughCasesResult,\KarnaughBlocRegroup,\MPMPlaceTaches,\MPMPlaceDurees,GrapheTikz,\GrphPlaceSommets,\GrphTraceAretes,\tikzset,\DiagrammeSagittal,\draw,\DiagrammeSagittalCompo,\TableVerite,\SimplificationKarnaugh,\SimplificationBooleenne,\KarnaughCasesAuto,\MatriceAdjacence,\PuissanceMatrice,\NbCheminsLongueur,\FermetureTransitive,\ResolSystemeMatrices,\PresentProdMat},%
keywordstyle={\color{green!50!black}},%
classoffset=3,%
- morekeywords={CouleurDurees,CouleurFleches,LargeurCases,Epaisseur,Police,CouleurDates,CouleurBords,NoirBlanc,Grille,DecalHorizDeb,DecalVertDeb,DecalHorizFin,DecalVertFin,Coude,SensCoude,Unite,Variables,Swap,Aide,CouleurCases,Decalage,Couleur,Type,Legende,PosVarLaterale,CouleurLegende,CouleurSommets,TypeSommets,Unite,CouleurFT,DimensionSommets,PositionFleches,EchelleFleches,TypeFleche,Droit,Milieu,AngleGauche,AngleDroite,Boucle,GrphStyleArc,GrphStyleSommet,Poids,GrphStylepoids,DistElem,DistEns,LargEns,NomAppli,CouleurE,CouleurAppli,CouleurF,CouleursFleches,TypeFleche,Epaisseur,Labels,Ensembles,PosLabels,PoliceLabels,Offset,NomApplis,CouleursAppli,VF,LargeursColonnes,CouleurEnonce,CodeAvant,CodeApres,StyleAlternatif,PoliceTT,Espace,Couleurs,Contraire,Enonce,Bordure,Sommets,Num,PoliceBordure,De,Vers,Formule,Brut,NomMatrice,Longueur,Complet},%
+ morekeywords={CouleurDurees,CouleurFleches,LargeurCases,Epaisseur,Police,CouleurDates,CouleurBords,NoirBlanc,Grille,DecalHorizDeb,DecalVertDeb,DecalHorizFin,DecalVertFin,Coude,SensCoude,Unite,Variables,Swap,Aide,CouleurCases,Decalage,Couleur,Type,Legende,PosVarLaterale,CouleurLegende,CouleurSommets,TypeSommets,Unite,CouleurFT,DimensionSommets,PositionFleches,EchelleFleches,TypeFleche,Droit,Milieu,AngleGauche,AngleDroite,Boucle,GrphStyleArc,GrphStyleSommet,Poids,GrphStylepoids,DistElem,DistEns,LargEns,NomAppli,CouleurE,CouleurAppli,CouleurF,CouleursFleches,TypeFleche,Epaisseur,Labels,Ensembles,PosLabels,PoliceLabels,Offset,NomApplis,CouleursAppli,VF,LargeursColonnes,CouleurEnonce,CodeAvant,CodeApres,StyleAlternatif,PoliceTT,Espace,Couleurs,Contraire,Enonce,Bordure,Sommets,Num,PoliceBordure,De,Vers,Formule,Brut,NomMatrice,Longueur,Complet,NomsMatrices,NomInverse,NomSysteme,Inconnues,OptionNiceMatrix},%
keywordstyle={\color{orange}}
},%
#1
@@ -255,9 +255,13 @@
\section{Historique}
+\verb|v0.2.0|~:~~~~Systèmes 3x3 par matrices + \textit{présentation} d'un produit matriciel
+
\verb|v0.1.9|~:~~~~Travail sur les matrices d'adjacence (chemins, puissances, fermeture)
-\verb|v0.1.8|~:~~~~Possibilité de créer le tableau de Karnaugh via une expression booléenne + Corrections mineures
+\verb|v0.1.8|~:~~~~Possibilité de créer le tableau de Karnaugh via une expression booléenne
+
+\verb| |~:~~~~Corrections mineures
\verb|v0.1.7|~:~~~~Possibilité de simplifier une expression booléenne \textit{directement} + amélioration des espaces
@@ -322,7 +326,7 @@ Il n'existe pas d'option pour le package, et \packagetex!xcolor! n'est pas charg
\begin{itemize}
\item \packagetex!tikz!, \packagetex!pgffor!, \packagetex!xintexpr!, \packagetex!tabularray!, \packagetex!simplekv!, \packagetex!xstring! et \packagetex!listofitems! ;
- \item \packagetex!luacode! et \packagetex!nicematrix! (uniquement si le compilateur détecté est \hologo{LuaLaTeX}) ;
+ \item \packagetex!nicematrix!, \packagetex!siunitx! et \packagetex!luacode! (uniquement si le compilateur détecté est \hologo{LuaLaTeX}) ;
\item les librairies \packagetex!tikz! :
\begin{itemize}
\item \motcletex!tikz.positioning!, \motcletex!tikz.babel!, \motcletex!tikz.calc! ;
@@ -1849,4 +1853,135 @@ Le tableau suivant présente les connecteurs logiques issues du package \package
{$\lnot P$,$\lnot Q$,$P\land Q$,$\lnot(P\land Q)$,$(\lnot P)\lor(\lnot Q)$}
\end{DemoCode}
+\pagebreak
+
+\section{Système 3x3 par matrices}
+
+\subsection{Commande et fonctionnement global}
+
+\begin{cautionblock}
+La commande dédiée au travail sur les systèmes 3×3 est \motcletex!\ResolSystemeMatrices!.
+
+Cette commande (adapté à une résolution matricielle du système) peut :
+
+\begin{itemize}
+ \item résoudre et rédiger le système, par matrices ;
+ \item ne déterminer que les matrices et solutions pour réutilisation \textit{personnelle}.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\ResolSystemeMatrices[clés]<option conversion>{systeme}[systeme formaté][inconnues]
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\ResolSystemeMatrices{2x+3y+4z=2,2y+3z=3,x+2y+3z=5}
+\end{DemoCode}
+
+\subsection{Arguments et clés pour la commande}
+
+\begin{DemoCode}[listing only]
+\ResolSystemeMatrices[clés]<option conversion>{systeme}[systeme formaté][inconnues]
+\end{DemoCode}
+
+\begin{tipblock}
+En ce qui concerne la résolution \textit{détaillée}, les \Cle{clés} optionnelles sont :
+
+\begin{itemize}
+ \item \Cle{NomsMatrices} := noms des 3 matrices ; \hfill~défaut : \Cle{A,X,B}
+ \item \Cle{NomInverse} := nom de l'inverse ; \hfill~défaut : \Cle{A\{-1\}}
+ \item \Cle{NomSysteme} := nom du système ; \hfill~défaut : \Cle{\{\}}
+ \item \Cle{Inconnues} := inconnues du système; \hfill~défaut : \Cle{xyz}
+ \item \Cle{OptionNiceMatrix} := offset pour les matrices avec \motcletex!nicetabular!.\hfill~défaut : \Cle{1pt}
+\end{itemize}
+
+Le deuxième argument, optionnel et entre \texttt{<...>} propose une option (globale) de formatage pour les fractions (les racines ne sont pas gérées\ldots), parmi \Cle{d/t/n/dec/dec=...}.
+
+\smallskip
+
+Le troisième argument, obligatoire et entre \texttt{\{...\}}, est quant à lui le système, en langage \motcletex!xint!.
+
+\smallskip
+
+Le quatrième argument, optionnel et entre \texttt{[...]}, est quant à lui le système, en langage \motcletex!tex! (si coefficients fractionnaires par exemple).
+
+\smallskip
+
+Le dernier argument, optionnel et entre \texttt{[...]}, est quant à lui la liste des inconnues à passer à \motcletex!systeme! pour formater le système si des commandes particulières sont présentes\ldots
+\end{tipblock}
+
+\begin{tipblock}
+Il existe également une clé booléenne, \Cle{Brut}, qui permet de ne faire \textit{que} les calculs et qui stocke :
+
+\begin{itemize}
+ \item la matrice du système dans la macro \motcletex!\ResolMatA! ;
+ \item la matrice des inconnues dans la macro \motcletex!\ResolMatX! ;
+ \item la matrice du second membre dans la macro \motcletex!\ResolMatB! ;
+ \item le déterminant le matrice du système dans la macro \motcletex!\ResolDet! ;
+ \item l'éventuelle inverse de la matrice du système dans la macro \motcletex!\ResolInvMatA! ;
+ \item les éventuelles solutions dans \motcletex!\ResolSolX!, \motcletex!\ResolSolY! et \motcletex!\ResolSolZ!.
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\subsection{Exemples}
+
+\begin{DemoCode}[]
+\ResolSystemeMatrices[Brut]{2x+3y+4z=2,2y+3z=3,x+2y+3z=5}
+
+$A=\ResolMatA$ et $X=\ResolMatX$ et $B=\ResolMatB$ et $A^{-1}=\ResolInvMatA$.
+
+$\text{dét}(A)=\ResolDet$ ; $x=\ResolSolX$ ; $y=\ResolSolY$ et $z=\ResolSolZ$.
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\ResolSystemeMatrices%
+ [Inconnues=abc,NomSysteme={\mathcal{S}},NomsMatrices={A,X,Y},NomInverse=C]%
+ {510b+1200c=1197600,a+2b+5c=2146820,b+2c=2200}%
+ [510b+\num{1200}c=\num{1197600},a+2b+5c=\num{2146820},b+2c=\num{2200}]%
+ [abc]
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\ResolSystemeMatrices<t>%formatage des fractions en tfrac
+ {2x+y-0.5z=10,x+1/3*y+z=0,y-4z=5}%
+ [2x+y-\num{0.5}z=10,x+\frac13y+z=0,y-4z=5]%
+ [xyz]
+\end{DemoCode}
+
+\pagebreak
+
+\section{Présentation d'un produit matriciel (sans calculs)}
+
+\begin{tipblock}
+L'idée est de proposer une commande pour présenter (de manière \textit{triangulaire}) un produit matriciel.
+
+\smallskip
+
+La commande est basique et ne permet pas (encore ?) d'effectuer le produit matriciel.
+
+\smallskip
+
+Les matrices sont à donner en langage \motcletex!pmatrix! ou \motcletex!nicematrix!.
+\end{tipblock}
+
+\begin{DemoCode}[listing only]
+%la version étoilée utilise nicematrix
+\PresentProdMat(*)<options tikzpicture>{MatA}{MatB}{MatAB}<option nicematrix>
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\PresentProdMat{3&-1\\-2&2}{12\\14}{22\\4}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+On a, par produit matriciel le calcul
+\PresentProdMat*<baseline>
+ {1&1&1\\1&1&1\\1&1&1}
+ {1&1&1\\1&1&1\\1&1&1}
+ {3&3&3\\3&3&3\\3&3&3}
+ <cell-space-limits=3pt>
+\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
index 12d1804ec0..51e9325cfb 100644
--- a/graphics/pgf/contrib/profsio/tex/ProfSio.sty
+++ b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
@@ -3,7 +3,8 @@
% : Luatruthtable from Chetan Shirore and Dr. Ajit Kumar https://ctan.org/pkg/luatruthtable
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfSio}[2023/12/13 0.1.9 Pour les enseignants de Maths en BTS SIO]
+\ProvidesPackage{ProfSio}[2023/02/07 0.2.0 Pour les enseignants de Maths en BTS SIO]
+%0.2.0 Travail sur les systèmes 3x3 par matrices et la présentation d'un produit matriciel
%0.1.9 Travail sur les chemins de longueur donnée + fermeture transitive
%0.1.8 Possibilité de représenter une table de Karnaugh via son expression + corrections mineures
%0.1.7 Ajout des simplifications booléennes d'expressions classiques
@@ -23,6 +24,10 @@
\RequirePackage{xstring}
\RequirePackage{listofitems}
\RequirePackage{xintexpr}
+\RequirePackage{systeme}
+\RequirePackage{ifthen}
+\RequirePackage{siunitx}
+\RequirePackage{nicematrix}
%------Librairies
\usetikzlibrary{positioning,decorations.pathreplacing,decorations.markings,arrows,arrows.meta,calc,babel,shapes,shapes.geometric}
%------Divers
@@ -991,7 +996,6 @@
\ifluatex
\RequirePackage{xkeyval}
\RequirePackage{luacode}
-\RequirePackage{nicematrix}
%patchs pour luatruthtable (échange 1ère ligne <-> dernière ligne), à voir si le package sera patché pour éviter de "piquer" le code !
%patchs from luatruthtable
@@ -1979,4 +1983,248 @@ end
}
\fi
+%===MATRICES ET SYSTÈMES 3x3
+%%------SimplFrac nouvelle version
+\NewDocumentCommand\IntConvFrac{ s O{} m }{%
+ %*=moins sur le numérateur
+ %2=argument optionnel[d/t/dec=...]
+ %3=argument mandataire {calcul ou fraction}
+ \def\calculargument{\xintPRaw{\xintIrr{\xinteval{#3}}}}%on calcule et on transforme en A/B
+ \IfSubStr{\calculargument}{/}%on teste si le symbole / apparaît
+ {%si oui := fraction
+ \StrBefore{\calculargument}{/}[\numerateur]%on extrait le numérateur
+ \StrBehind{\calculargument}{/}[\denominateur]%on extrait le dénominateur
+ \ifblank{#2}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\frac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\frac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{d}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\dfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\dfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{t}%
+ {%
+ \IfBooleanTF{#1}%
+ {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ {%
+ \ifthenelse{\numerateur < 0}%
+ {\ensuremath{-\tfrac{\num{\fpeval{abs(\numerateur)}}}{\num{\denominateur}}}}%
+ {\ensuremath{\tfrac{\num{\numerateur}}{\num{\denominateur}}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ \IfStrEq{#2}{n}%
+ {%
+ \ensuremath{\nicefrac{\num{\numerateur}}{\num{\denominateur}}}
+ }%
+ {}%si l'argument optionnel est vide
+ \IfSubStr{#2}{dec}%on veut la forme décimale
+ {%
+ \IfSubStr{#2}{=}%si on rajoute une précision
+ {%
+ \StrBehind{#2}{=}[\precdecimal]%
+ \ensuremath{\num{\xintfloateval{round(#3,\precdecimal)}}}%
+ }%
+ {%
+ \ensuremath{\num{\xintfloateval{#3}}}%
+ }%
+ }%
+ {}%si l'argument optionnel est vide
+ }{%si non := entier
+ \num{\calculargument}%on affiche l'entier, avec le package siunitx
+ }%
+}
+
+%type=3x3
+\defKV[resolsysmatrix]{%
+ NomsMatrices=\def\ResolSysMatNames{#1},%
+ Inconnues=\edef\ResolSysMatUnkn{#1},%
+ NomInverse=\def\ResolSysMatInv{#1},%
+ NomSysteme=\def\ResolSysMatNameSys{#1},%
+ OptionNiceMatrix=\def\ResolSysMatOpt{#1}
+}
+\setKVdefault[resolsysmatrix]{%
+ NomsMatrices={A,X,B},%
+ NomInverse={A^{-1}},%
+ NomSysteme={},%
+ Inconnues=xyz,%
+ Brut=false,%
+ OptionNiceMatrix={1pt}
+}
+
+\NewDocumentCommand\ResolSystemeMatrices{ O{} D<>{} m O{#3} O{xyz} }{%
+ %1=clés
+ %2=option formatage conversion
+ %3=système {eq1,eq2,eq3} en langage xint
+ %4=sytème pour la macro \systeme
+ %5=inconnues pour \systeme
+ \useKVdefault[resolsysmatrix]%
+ \setKV[resolsysmatrix]{#1}%
+ %lectures des inconnues
+ \StrChar{\ResolSysMatUnkn}{1}[\tmpinconnuex]%
+ \StrChar{\ResolSysMatUnkn}{2}[\tmpinconnuey]%
+ \StrChar{\ResolSysMatUnkn}{3}[\tmpinconnuez]%
+ %lectures des noms de matrices
+ \readlist*\TmpLstUnkb{\ResolSysMatNames}%
+ \itemtomacro\TmpLstUnkb[1]{\tmpnamematA}%
+ \itemtomacro\TmpLstUnkb[2]{\tmpnamematX}%
+ \itemtomacro\TmpLstUnkb[3]{\tmpnamematB}%
+ %lecture des équations
+ \readlist*\TmpLstEq{#3}%
+ \itemtomacro\TmpLstEq[1]\TmpEqA%
+ \itemtomacro\TmpLstEq[2]\TmpEqB%
+ \itemtomacro\TmpLstEq[3]\TmpEqC%
+ %extraction des coefficients
+ \StrCut{\TmpEqA}{=}{\tmpeqa}{\MatBA}%
+ \StrCut{\TmpEqB}{=}{\tmpeqb}{\MatBB}%
+ \StrCut{\TmpEqC}{=}{\tmpeqc}{\MatBC}%
+ %MatA (1,1)
+ \StrSubstitute{\tmpeqa}{\tmpinconnuex}{(1)}[\MatA]%
+ \StrSubstitute{\MatA}{\tmpinconnuey}{(0)}[\MatA]%
+ \StrSubstitute{\MatA}{\tmpinconnuez}{(0)}[\MatA]%
+ %MatB (1,2)
+ \StrSubstitute{\tmpeqa}{\tmpinconnuey}{(1)}[\MatB]%
+ \StrSubstitute{\MatB}{\tmpinconnuex}{(0)}[\MatB]%
+ \StrSubstitute{\MatB}{\tmpinconnuez}{(0)}[\MatB]%
+ %MatC (1,3)
+ \StrSubstitute{\tmpeqa}{\tmpinconnuez}{(1)}[\MatC]%
+ \StrSubstitute{\MatC}{\tmpinconnuex}{(0)}[\MatC]%
+ \StrSubstitute{\MatC}{\tmpinconnuey}{(0)}[\MatC]%
+ %MatD (2,1)
+ \StrSubstitute{\tmpeqb}{\tmpinconnuex}{(1)}[\MatD]%
+ \StrSubstitute{\MatD}{\tmpinconnuey}{(0)}[\MatD]%
+ \StrSubstitute{\MatD}{\tmpinconnuez}{(0)}[\MatD]%
+ %MatE (2,2)
+ \StrSubstitute{\tmpeqb}{\tmpinconnuey}{(1)}[\MatE]%
+ \StrSubstitute{\MatE}{\tmpinconnuex}{(0)}[\MatE]%
+ \StrSubstitute{\MatE}{\tmpinconnuez}{(0)}[\MatE]%
+ %MatF (2,3)
+ \StrSubstitute{\tmpeqb}{\tmpinconnuez}{(1)}[\MatF]%
+ \StrSubstitute{\MatF}{\tmpinconnuex}{(0)}[\MatF]%
+ \StrSubstitute{\MatF}{\tmpinconnuey}{(0)}[\MatF]%
+ %MatG (3,1)
+ \StrSubstitute{\tmpeqc}{\tmpinconnuex}{(1)}[\MatG]%
+ \StrSubstitute{\MatG}{\tmpinconnuey}{(0)}[\MatG]%
+ \StrSubstitute{\MatG}{\tmpinconnuez}{(0)}[\MatG]%
+ %MatH (3,2)
+ \StrSubstitute{\tmpeqc}{\tmpinconnuey}{(1)}[\MatH]%
+ \StrSubstitute{\MatH}{\tmpinconnuex}{(0)}[\MatH]%
+ \StrSubstitute{\MatH}{\tmpinconnuez}{(0)}[\MatH]%
+ %MatI (3,3)
+ \StrSubstitute{\tmpeqc}{\tmpinconnuez}{(1)}[\MatI]%
+ \StrSubstitute{\MatI}{\tmpinconnuex}{(0)}[\MatI]%
+ \StrSubstitute{\MatI}{\tmpinconnuey}{(0)}[\MatI]%
+ %déterminant
+ \def\DETMATRICE{\xinteval{(\MatA)*(\MatE)*(\MatI)+(\MatD)*(\MatH)*(\MatC)+(\MatB)*(\MatF)*(\MatG)-(\MatG)*(\MatE)*(\MatC)-(\MatD)*(\MatB)*(\MatI)-(\MatA)*(\MatH)*(\MatF)}}%
+ %inverse, à voir après pour le cas non inversible...
+ \xintifboolexpr{\DETMATRICE == 0}%
+ {}%
+ {%
+ \def\MatInvA{((\MatE)*(\MatI)-(\MatH)*(\MatF))/(\DETMATRICE)}%
+ \def\MatInvB{(-(\MatB)*(\MatI)+(\MatC)*(\MatH))/(\DETMATRICE)}%
+ \def\MatInvC{((\MatB)*(\MatF)-(\MatC)*(\MatE))/(\DETMATRICE)}%
+ \def\MatInvD{(-(\MatD)*(\MatI)+(\MatF)*(\MatG))/(\DETMATRICE)}%
+ \def\MatInvE{((\MatA)*(\MatI)-(\MatC)*(\MatG))/(\DETMATRICE)}%
+ \def\MatInvF{(-(\MatA)*(\MatF)+(\MatD)*(\MatC))/(\DETMATRICE)}%
+ \def\MatInvG{((\MatD)*(\MatH)-(\MatE)*(\MatG))/(\DETMATRICE)}%
+ \def\MatInvH{(-(\MatA)*(\MatH)+(\MatB)*(\MatG))/(\DETMATRICE)}%
+ \def\MatInvI{((\MatA)*(\MatE)-(\MatB)*(\MatD))/(\DETMATRICE)}%
+ %résultat
+ \def\MatResA{\IntConvFrac[#2]{(\MatInvA)*(\MatBA)+(\MatInvB)*(\MatBB)+(\MatInvC)*(\MatBC)}}%
+ \def\MatResB{\IntConvFrac[#2]{(\MatInvD)*(\MatBA)+(\MatInvE)*(\MatBB)+(\MatInvF)*(\MatBC)}}%
+ \def\MatResC{\IntConvFrac[#2]{(\MatInvG)*(\MatBA)+(\MatInvH)*(\MatBB)+(\MatInvI)*(\MatBC)}}%
+ \def\MatAffInvA{\IntConvFrac[#2]{\MatInvA}}%
+ \def\MatAffInvB{\IntConvFrac[#2]{\MatInvB}}%
+ \def\MatAffInvC{\IntConvFrac[#2]{\MatInvC}}%
+ \def\MatAffInvD{\IntConvFrac[#2]{\MatInvD}}%
+ \def\MatAffInvE{\IntConvFrac[#2]{\MatInvE}}%
+ \def\MatAffInvF{\IntConvFrac[#2]{\MatInvF}}%
+ \def\MatAffInvG{\IntConvFrac[#2]{\MatInvG}}%
+ \def\MatAffInvH{\IntConvFrac[#2]{\MatInvH}}%
+ \def\MatAffInvI{\IntConvFrac[#2]{\MatInvI}}%
+ }%
+ %affichage pour test
+ \def\MatAffA{\IntConvFrac[#2]{\MatA}}%
+ \def\MatAffB{\IntConvFrac[#2]{\MatB}}%
+ \def\MatAffC{\IntConvFrac[#2]{\MatC}}%
+ \def\MatAffD{\IntConvFrac[#2]{\MatD}}%
+ \def\MatAffE{\IntConvFrac[#2]{\MatE}}%
+ \def\MatAffF{\IntConvFrac[#2]{\MatF}}%
+ \def\MatAffG{\IntConvFrac[#2]{\MatG}}%
+ \def\MatAffH{\IntConvFrac[#2]{\MatH}}%
+ \def\MatAffI{\IntConvFrac[#2]{\MatI}}%
+ \def\MatAffBA{\IntConvFrac[#2]{\MatBA}}%
+ \def\MatAffBB{\IntConvFrac[#2]{\MatBB}}%
+ \def\MatAffBC{\IntConvFrac[#2]{\MatBC}}%
+ \ifboolKV[resolsysmatrix]{Brut}%
+ {%
+ \def\ResolDet{\IntConvFrac[#2]{(\MatA)*(\MatE)*(\MatI)+(\MatD)*(\MatH)*(\MatC)+(\MatB)*(\MatF)*(\MatG)-(\MatG)*(\MatE)*(\MatC)-(\MatD)*(\MatB)*(\MatI)-(\MatA)*(\MatH)*(\MatF)}}%
+ \def\ResolMatA{\begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] {\MatAffA}&{\MatAffB}&{\MatAffC} \\ {\MatAffD}&{\MatAffE}&{\MatAffF} \\ {\MatAffG}&{\MatAffH}&{\MatAffI} \end{pNiceMatrix}}%
+ \def\ResolMatX{\begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] \tmpinconnuex \\ \tmpinconnuey \\ \tmpinconnuez \end{pNiceMatrix}}%
+ \def\ResolMatB{\begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] {\MatAffBA} \\ {\MatAffBB} \\ {\MatAffBC} \end{pNiceMatrix}}%
+ \xintifboolexpr{\DETMATRICE == 0}%
+ {%
+ \def\ResolInvMatA{\text{La matrice n'est pas inversible.}}%
+ }%
+ {%
+ \def\ResolSolX{\IntConvFrac[#2]{(\MatInvA)*(\MatBA)+(\MatInvB)*(\MatBB)+(\MatInvC)*(\MatBC)}}%
+ \def\ResolSolY{\IntConvFrac[#2]{(\MatInvD)*(\MatBA)+(\MatInvE)*(\MatBB)+(\MatInvF)*(\MatBC)}}%
+ \def\ResolSolZ{\IntConvFrac[#2]{(\MatInvG)*(\MatBA)+(\MatInvH)*(\MatBB)+(\MatInvI)*(\MatBC)}}%
+ \def\ResolInvMatA{\begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] {\MatAffInvA}&{\MatAffInvB}&{\MatAffInvC} \\ {\MatAffInvD}&{\MatAffInvE}&{\MatAffInvF} \\ {\MatAffInvG}&{\MatAffInvH}&{\MatAffInvI} \end{pNiceMatrix}}%
+ }%
+ }%
+ {%
+ On considère le système $\IfEq{\ResolSysMatNameSys}{}{}{\ResolSysMatNameSys \text{ : }} \systeme[#5]{#4}$.\\
+ Matriciellement, le système s'écrit sous la forme $\tmpnamematA\times \tmpnamematX = \tmpnamematB$ avec :%
+ \[%
+ \tmpnamematA = \begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] {\MatAffA}&{\MatAffB}&{\MatAffC} \\ {\MatAffD}&{\MatAffE}&{\MatAffF} \\ {\MatAffG}&{\MatAffH}&{\MatAffI} \end{pNiceMatrix}
+ \text{ ; }
+ \tmpnamematX = \begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] \tmpinconnuex \\ \tmpinconnuey \\ \tmpinconnuez \end{pNiceMatrix}
+ \text{ et }
+ \tmpnamematB = \begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] {\MatAffBA} \\ {\MatAffBB} \\ {\MatAffBC} \end{pNiceMatrix}
+ \]%
+ \xintifboolexpr{\DETMATRICE == 0}%
+ {%
+ La matrice $\tmpnamematA$ n'est pas inversible, donc le système n'admet pas de solution (ou admet une unifinité de solutions).%
+ }%
+ {%
+ La matrice $\tmpnamematA$ est inversible, et :%
+ \[\tmpnamematA\times \tmpnamematX = \tmpnamematB \implies \underbrace{\ResolSysMatInv \times \tmpnamematA}_{{=}I_3} \times \tmpnamematX = \ResolSysMatInv \times \tmpnamematB \implies I_3 \times \tmpnamematX = \ResolSysMatInv\times \tmpnamematB \implies \tmpnamematX=\ResolSysMatInv\times \tmpnamematB.\]
+ %
+ La calculatrice nous donne $\tmpnamematX = \begin{pNiceMatrix}[cell-space-limits=\ResolSysMatOpt] {\MatResA} \\ {\MatResB} \\ {\MatResC} \end{pNiceMatrix}$. Ainsi on obtient $\tmpinconnuex=\MatResA$ et $\tmpinconnuey=\MatResB$ et $\tmpinconnuez=\MatResC$.%
+ }%
+ }%
+}
+
+%===PRESENTATION PRODUIT MATRICES
+\NewDocumentCommand\PresentProdMat{ s D<>{} m m m D<>{} }{%
+ \begin{tikzpicture}[inner sep=0pt,outer sep=0pt,#2]
+ \IfBooleanTF{#1}%
+ {%
+ \node (MatriceA) at (0,0) {{$\begin{pNiceMatrix}[#6] #3 \end{pNiceMatrix}$}} ;
+ \node[right=0pt of MatriceA,anchor=west] (MatriceAB) {{$\begin{pNiceMatrix}[#6] #5 \end{pNiceMatrix}$}} ;
+ \node[above=0pt of MatriceAB,anchor=south] (MatriceB) {{$\begin{pNiceMatrix}[#6] #4 \end{pNiceMatrix}$}} ;
+ }%
+ {%
+ \node (MatriceA) at (0,0) {{$\begin{pmatrix} #3 \end{pmatrix}$}} ;
+ \node[right=0pt of MatriceA,anchor=west] (MatriceAB) {{$\begin{pmatrix} #5 \end{pmatrix}$}} ;
+ \node[above=0pt of MatriceAB,anchor=south] (MatriceB) {{$\begin{pmatrix} #4 \end{pmatrix}$}} ;
+ }%
+ \end{tikzpicture}%
+}
+
\endinput \ No newline at end of file