summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/profsio/tex/ProfSio.sty
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/profsio/tex/ProfSio.sty')
-rw-r--r--graphics/pgf/contrib/profsio/tex/ProfSio.sty583
1 files changed, 579 insertions, 4 deletions
diff --git a/graphics/pgf/contrib/profsio/tex/ProfSio.sty b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
index 103b2667dd..1de0681384 100644
--- a/graphics/pgf/contrib/profsio/tex/ProfSio.sty
+++ b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
@@ -1,12 +1,15 @@
% Author : C. Pierquet
% licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txtf
+% : Luatruthtable from Chetan Shirore and Dr. Ajit Kumar https://ctan.org/pkg/luatruthtable
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfSio}[2023/06/26 0.1.1 Pour les enseignants en BTS SIO]
+\ProvidesPackage{ProfSio}[2023/07/03 0.1.2 Pour les enseignants en BTS SIO]
+%0.1.2 Ajout d'une option [Offset] pour les diagrammes sagittaux + Diagrammes sagittaux de composée + Tables de vérité
%0.1.1 Correction de la documentation + Ajout des diagrammes sagittaux
%0.1.0 Version initiale
%------Packages utiles
+\RequirePackage{iftex}
\RequirePackage{tikz,pgffor}
\RequirePackage{tabularray}
\RequirePackage{simplekv}
@@ -557,7 +560,8 @@
Police=\def\DSPolicePatates{#1},%
PoliceLabels=\def\DSPoliceLabels{#1},%
Ensembles=\def\DSNomEns{#1},%
- PosLabels=\def\DSPosLabels{#1}
+ PosLabels=\def\DSPosLabels{#1},%
+ Offset=\def\DSOffset{#1}
}
\setKVdefault[DiagSagitt]{%
@@ -576,7 +580,8 @@
Labels=true,%
Ensembles={$\mathcal{E}$/$\mathcal{F}$},%{E/F},%
PosLabels=bas,%
- PoliceLabels={}
+ PoliceLabels={},%
+ Offset=2pt
}
\NewDocumentCommand\DiagrammeSagittal{s O{} D<>{} m }{%
@@ -631,11 +636,581 @@
}%
%ARCS
\foreach \Deb/\Fin in {#4} {%
- \draw[line width=\DSThick,->,>=\DSTypeFleche,\DSCouleurArc] (E\Deb)--(F\Fin) ;
+ \draw[line width=\DSThick,->,>=\DSTypeFleche,\DSCouleurArc] ([xshift=\DSOffset]E\Deb)--([xshift=-\DSOffset]F\Fin) ;
}%
\IfBooleanTF{#1}%
{}%
{\end{tikzpicture}}%
}
+%------Diagramme Sagittal Compo
+\defKV[DiagSagittCompo]{%
+ E=\def\DSListeEltE{#1},%
+ F=\def\DSListeEltF{#1},%
+ G=\def\DSListeEltG{#1},%
+ DistElem=\def\DSEcartIN{#1},%
+ DistEns=\def\DSEcartIP{#1},%
+ LargEns=\def\DSLargPatates{#1},%
+ NomApplis=\def\DSNomsFcts{#1},%
+ CouleurE=\def\DSCouleurE{#1},%
+ CouleursAppli=\def\DSCouleursFct{#1},%
+ CouleurF=\def\DSCouleurF{#1},%
+ CouleursFleches=\def\DSCouleurArc{#1},%
+ CouleurG=\def\DSCouleurG{#1},%
+ TypeFleche=\def\DSTypeFleche{#1},%
+ Epaisseur=\def\DSThick{#1},%
+ Police=\def\DSPolicePatates{#1},%
+ PoliceLabels=\def\DSPoliceLabels{#1},%
+ Ensembles=\def\DSNomEns{#1},%
+ PosLabels=\def\DSPosLabels{#1},%
+ Offset=\def\DSOffset{#1}
+}
+
+\setKVdefault[DiagSagittCompo]{%
+ DistElem=0.75,%
+ DistEns=4,%
+ LargEns=1.5,%
+ NomApplis={$f$/$g$},%
+ CouleurE={blue},%
+ CouleursAppli={violet},%
+ CouleurF={red},%
+ CouleurG={gray},%
+ CouleursFleches={teal},%
+ TypeFleche=Latex,%
+ Epaisseur=0.8pt,%
+ Police={},%
+ NoirBlanc=false,%
+ Labels=true,%
+ Ensembles={$\mathcal{E}$/$\mathcal{F}$/$\mathcal{G}$},%
+ PosLabels=bas,%
+ PoliceLabels={},%
+ Offset=2pt
+}
+
+\NewDocumentCommand\DiagrammeSagittalCompo{s O{} D<>{} m m }{%
+ \restoreKV[DiagSagittCompo]%paramètres par défaut
+ \setKV[DiagSagittCompo]{#2}%
+ \readlist*\DSLstE{\DSListeEltE}%
+ \readlist*\DSLstF{\DSListeEltF}%
+ \readlist*\DSLstG{\DSListeEltG}%
+ \def\DSHauteurPatateE{\fpeval{\DSEcartIN*(1+\DSLstElen)}}%
+ \def\DSHauteurPatateF{\fpeval{1.1*\DSEcartIN*(1+\DSLstFlen)}}%
+ \def\DSHauteurPatateG{\fpeval{\DSEcartIN*(1+\DSLstGlen)}}%
+ \def\DSMaxHauteursPatates{\fpeval{max(\DSHauteurPatateE,\DSHauteurPatateF,\DSHauteurPatateG)}}%
+ \def\DSOffsetPatateF{\fpeval{0.5*\DSHauteurPatateF-0.5*\DSHauteurPatateE}}%
+ \def\DSOffsetPatateG{\fpeval{0.5*\DSHauteurPatateG-0.5*\DSHauteurPatateE}}%
+ \IfStrEq{\DSPosLabels}{bas}%
+ {%
+ \def\DSHautLegende{\fpeval{min(0,-\DSOffsetPatateF,-\DSOffsetPatateG)-0.5*\DSEcartIN}}%
+ \def\DSHautCompo{\fpeval{max(\DSHauteurPatateE,\DSHauteurPatateF-\DSOffsetPatateF,\DSHauteurPatateG-\DSOffsetPatateG)+0.5*\DSEcartIN}}%
+ \def\DSposlabelcompo{above}%
+ }{}%
+ \IfStrEq{\DSPosLabels}{haut}%
+ {%
+ \def\DSHautLegende{\fpeval{max(\DSHauteurPatateE,\DSHauteurPatateF-\DSOffsetPatateF,\DSHauteurPatateG-\DSOffsetPatateG)+0.5*\DSEcartIN}}%
+ \def\DSHautCompo{\fpeval{min(0,-\DSOffsetPatateF,-\DSOffsetPatateG)-0.5*\DSEcartIN}}%
+ \def\DSposlabelcompo{below}%
+ }{}
+ %découpage des couleurs et des noms
+ \IfSubStr{\DSCouleursFct}{/}%
+ {%
+ \StrCut{\DSCouleursFct}{/}{\DSCouleursFctF}{\DSCouleursFctG}%
+ }%
+ {%
+ \def\DSCouleursFctF{\DSCouleursFct}\def\DSCouleursFctG{\DSCouleursFct}%
+ }%
+ \IfSubStr{\DSCouleurArc}{/}%
+ {%
+ \StrCut{\DSCouleurArc}{/}{\DSCouleurArcF}{\DSCouleurArcG}%
+ }%
+ {%
+ \def\DSCouleurArcF{\DSCouleurArc}\def\DSCouleurArcG{\DSCouleurArc}%
+ }%
+ \ifboolKV[DiagSagittCompo]{NoirBlanc}%
+ {%
+ \def\DSCouleurE{black}%
+ \def\DSCouleurF{black}%
+ \def\DSCouleurG{black}%
+ \def\DSCouleurArcF{black}%
+ \def\DSCouleurArcG{black}%
+ \def\DSCouleurArcG{black}%
+ \def\DSCouleurFctF{black}%
+ \def\DSCouleurFctG{black}%
+ }{}%
+ %CONSTRUCTION
+ \IfBooleanTF{#1}%
+ {}%
+ {\begin{tikzpicture}[#3]}%
+ %LABELS
+ %\draw[lightgray,thin,->] (-1,0)--++({3*\DSEcartIP},0) ;
+ \ifboolKV[DiagSagittCompo]{Labels}%
+ {%
+ \saveexpandmode\expandarg
+ %découpage des noms d'ensembles
+ \StrBefore{\DSNomEns}{/}[\DSNomE]
+ \StrBetween[1,2]{\DSNomEns}{/}{/}[\DSNomF]
+ \StrBehind[2]{\DSNomEns}{/}[\DSNomG]
+ %découpage des fonctions
+ \StrCut{\DSNomsFcts}{/}{\DSNomFctF}{\DSNomFctG}%
+ \restoreexpandmode
+ \draw (0,{\DSHautLegende}) node[\DSCouleurE,inner sep=1pt,font=\DSPoliceLabels] {\DSNomE} ;
+ \draw ({\DSEcartIP},{\DSHautLegende}) node[\DSCouleurF,inner sep=1pt,font=\DSPoliceLabels] {\DSNomF} ;
+ \draw ({2*\DSEcartIP},{\DSHautLegende}) node[\DSCouleurG,inner sep=1pt,font=\DSPoliceLabels] {\DSNomG} ;
+ \draw (0,{\DSHautCompo}) node[\DSCouleurE,inner sep=1pt,font=\DSPoliceLabels] {\DSNomE} ;
+ \draw ({2*\DSEcartIP},{\DSHautCompo}) node[\DSCouleurG,inner sep=1pt,font=\DSPoliceLabels] {\DSNomG} ;
+ \draw[line width=\DSThick,->,>=\DSTypeFleche] ({0.45},{\DSHautLegende})--({\DSEcartIP-0.45},{\DSHautLegende}) node[midway,above=2pt,inner sep=1pt,text=\DSCouleursFctF,font=\DSPoliceLabels] {\DSNomFctF} ;
+ \draw[line width=\DSThick,->,>=\DSTypeFleche] ({\DSEcartIP+0.45},{\DSHautLegende})--({2*\DSEcartIP-0.45},{\DSHautLegende}) node[midway,above=2pt,inner sep=1pt,text=\DSCouleursFctG,font=\DSPoliceLabels] {\DSNomFctG} ;
+ \draw[line width=\DSThick,->,>=\DSTypeFleche] ({0.45},{\DSHautCompo}) -- ({2*\DSEcartIP-0.45},{\DSHautCompo}) node[midway,\DSposlabelcompo=2pt,inner sep=1pt,font=\DSPoliceLabels] {\textcolor{\DSCouleursFctG}{\DSNomFctG}{\small\,$\circ$\,}\textcolor{\DSCouleursFctF}{\DSNomFctF}} ;
+ }{}%
+ %PATATE_E (ok)
+ \draw[line width=\DSThick] (0,{0.5*\DSHauteurPatateE}) ellipse ({0.5*\DSLargPatates} and {0.5*\DSHauteurPatateE} );
+ \foreach \i in {1,...,\DSLstElen}{%
+ \coordinate (E\DSLstE[\i]) at ({0.05*\DSLargPatates},{(\DSLstElen-\i+1)*\DSEcartIN}) ;%
+ \filldraw[\DSCouleurE] (E\DSLstE[\i]) circle[radius=1.5pt] node[left,font=\DSPolicePatates] {\DSLstE[\i]} ;%
+ }%
+ %PATATE_F (ok)
+ \draw[line width=\DSThick] ({\DSEcartIP},{0.5*\DSHauteurPatateF-\DSOffsetPatateF}) ellipse ({0.5*\DSLargPatates} and {0.5*\DSHauteurPatateF} );
+ \foreach \i in {1,...,\DSLstFlen}{%
+ \coordinate (F\DSLstF[\i]) at ({\DSEcartIP},{(\DSLstFlen-\i+1)*1.1*\DSEcartIN-\DSOffsetPatateF}) ;%
+ \filldraw[\DSCouleurF] (F\DSLstF[\i]) circle[radius=1.5pt] node[above=0pt,font=\DSPolicePatates] {\DSLstF[\i]} ;%
+ }%
+ %PATATE_G (ok)
+ \draw[line width=\DSThick] ({2*\DSEcartIP},{0.5*\DSHauteurPatateG-\DSOffsetPatateG}) ellipse ({0.5*\DSLargPatates} and {0.5*\DSHauteurPatateG} );
+ \foreach \i in {1,...,\DSLstGlen}{%
+ \coordinate (G\DSLstG[\i]) at ({2*\DSEcartIP-0.05*\DSLargPatates},{(\DSLstGlen-\i+1)*\DSEcartIN-\DSOffsetPatateG}) ;%
+ \filldraw[\DSCouleurG] (G\DSLstG[\i]) circle[radius=1.5pt] node[right,font=\DSPolicePatates] {\DSLstG[\i]} ;%
+ }%
+ %ARCSf
+ \foreach \Deb/\Fin in {#4} {%
+ \draw[line width=\DSThick,->,>=\DSTypeFleche,\DSCouleurArcF] ([xshift=\DSOffset]E\Deb)--([xshift=-\DSOffset]F\Fin) ;
+ }%
+ %ARCSg
+ \foreach \Deb/\Fin in {#5} {%
+ \draw[line width=\DSThick,->,>=\DSTypeFleche,\DSCouleurArcG] ([xshift=\DSOffset]F\Deb)--([xshift=-\DSOffset]G\Fin) ;
+ }%
+ \IfBooleanTF{#1}%
+ {}%
+ {\end{tikzpicture}}%
+}
+
+%------Table de vérité
+\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
+\begin{luacode*}
+local function toBinary(x,y)
+ y = y or math.max(1, select(2, math.frexp(x)))
+ local res = {}
+ for i = y, 1, -1 do
+ res[i] = math.fmod(x, 2)
+ x = math.floor((x - res[i]) / 2)
+ end
+ return res
+end
+
+local function _not(a)
+ if a ==0 then return 1
+ else return 0 end
+end
+
+local lognot = {}
+
+local not_mt= {
+ __mul = function(a,b)
+ return _not(b)
+end
+}
+
+setmetatable(lognot, not_mt)
+_G.lognot = lognot
+
+local function _and(a, b)
+ if a == 1 and b == 1 then return 1
+ else return 0 end
+end
+
+local tmp1 = {}
+local logand = {}
+local v1 = 0
+
+local and_mt= {
+ __mul = function(a,b)
+ if b==logand then
+ v1 = v1 + 1
+ tmp1[v1]=a
+ return tmp1
+ elseif a == tmp1 then
+ local w1 = _and(tmp1[v1], b)
+ v1 = v1 - 1
+ return w1
+ end
+end
+}
+
+setmetatable(tmp1, and_mt)
+setmetatable(logand, and_mt)
+_G.logand = logand
+
+local function _or(a, b)
+ if a == 0 and b == 0 then return 0
+ else return 1 end
+end
+
+local tmp2 = {}
+local logor = {}
+local v2 = 0
+
+local or_mt= {
+ __mul = function(a,b)
+ if b==logor then
+ v2 = v2 + 1
+ tmp2[v2] = a
+ return tmp2
+ elseif a == tmp2 then
+ local w2 = _or(tmp2[v2], b)
+ v2 = v2 - 1
+ return w2
+ end
+end
+}
+
+setmetatable(tmp2, or_mt)
+setmetatable(logor, or_mt)
+_G.logor = logor
+
+local function _imp(a, b)
+ if a == 1 and b == 0 then return 0
+ else return 1 end
+end
+
+local tmp3 = {}
+local imp = {}
+local v3 = 0
+
+local imp_mt= {
+ __mul = function(a,b)
+ if b==imp then
+ v3 = v3 + 1
+ tmp3[v3]=a
+ return tmp3
+ elseif a == tmp3 then
+ local w3 = _imp(tmp3[v3], b)
+ v3 = v3 - 1
+ return w3
+ end
+end
+}
+
+setmetatable(tmp3, imp_mt)
+setmetatable(imp, imp_mt)
+_G.imp = imp
+
+local function _iff(a, b)
+ if a == b then return 1
+ else return 0 end
+end
+
+local tmp4 = {}
+local iff = {}
+local v4 = 0
+
+local iff_mt= {
+ __mul = function(a,b)
+ if b==iff then
+ v4 = v4 + 1
+ tmp4[v4]=a
+ return tmp4
+ elseif a == tmp4 then
+ local w4 = _iff(tmp4[v4], b)
+ v4 = v4 - 1
+ return w4
+ end
+end
+}
+
+setmetatable(tmp4, iff_mt)
+setmetatable(iff, iff_mt)
+_G.iff = iff
+
+local function _xor(a, b)
+ if a ~= b then return 1
+ else return 0 end
+end
+
+local tmp5 = {}
+local logxor = {}
+local v5 = 0
+
+local xor_mt= {
+ __mul = function(a,b)
+ if b==logxor then
+ v5 = v5 + 1
+ tmp5[v5]=a
+ return tmp5
+ elseif a == tmp5 then
+ local w5 = _xor(tmp5[v5], b)
+ v5 = v5 - 1
+ return w5
+ end
+end
+}
+
+setmetatable(tmp5, xor_mt)
+setmetatable(logxor, xor_mt)
+_G.logxor = logxor
+
+local function _nand(a, b)
+ if a ==1 and b == 1 then return 0
+ else return 1 end
+end
+
+local tmp6 = {}
+local lognand = {}
+local v6 = 0
+
+local nand_mt= {
+ __mul = function(a,b)
+ if b==lognand then
+ v6 = v6 + 1
+ tmp6[v6]=a
+ return tmp6
+ elseif a == tmp6 then
+ local w6 = _nand(tmp6[v6], b)
+ v6 = v6 - 1
+ return w6
+ end
+end
+}
+
+setmetatable(tmp6, nand_mt)
+setmetatable(lognand, nand_mt)
+_G.lognand = lognand
+
+local function _nor(a, b)
+ if a ==0 and b == 0 then return 1
+ else return 0 end
+end
+
+local tmp7 = {}
+local lognor = {}
+local v7 = 0
+
+local nor_mt= {
+ __mul = function(a,b)
+ if b==lognor then
+ v7 = v7 + 1
+ tmp7[v7]=a
+ return tmp7
+ elseif a == tmp7 then
+ local w7 = _nor(tmp7[v7], b)
+ v7 = v7 - 1
+ return w7
+ end
+end
+}
+
+setmetatable(tmp7, nor_mt)
+setmetatable(lognor, nor_mt)
+_G.lognor = lognor
+
+local function _xnor(a, b)
+ if a == b then return 1
+ else return 0 end
+end
+
+local tmp8 = {}
+local logxnor = {}
+local v8 = 0
+
+local xnor_mt= {
+ __mul = function(a,b)
+ if b==logxnor then
+ v8 = v8 + 1
+ tmp8[v8]=a
+ return tmp8
+ elseif a == tmp8 then
+ local w8 = _xnor(tmp8[v8], b)
+ v8 = v8 - 1
+ return w8
+ end
+end
+}
+
+setmetatable(tmp8, xnor_mt)
+setmetatable(logxnor, xnor_mt)
+_G.logxnor = logxnor
+
+function TruthTbl(str0,str,trtext,fltext)
+ local eval=""
+ local names={lognot=lognot,logand=logand,logor=logor, imp=imp, iff=iff, logxor=logxor,lognand=lognand,lognor=lognor, logxnor=logxnor}
+ local vars={}
+ local expr={}
+ local countexp = 1
+ local countvars =1
+ local res=""
+ local sep=" & "
+ trtext = trtext or "$T$"
+ fltext = fltext or "$F$"
+ for variables in string.gmatch(str0, '([^,]+)') do
+ vars[countvars] = variables
+ countvars = countvars + 1
+ end
+ for subexp in string.gmatch(str, '([^,]+)') do
+ expr[countexp] = subexp
+ countexp = countexp + 1
+ end
+ local n =#vars
+ for i =1,2^n do
+ itr = toBinary(i,n)
+ for j=1, #itr do
+ names[vars[j]] = itr[j]
+ end
+ for k = 1, #expr do
+ res= res ..sep.. load("return " .. expr[k],nil,"t",names)()
+ end
+ if i~=2^n then
+ eval = eval .. table.concat(toBinary(i,n)," & ") .. res .. "\\\\"
+ else
+ eval = table.concat(toBinary(i,n)," & ") .. res .. "\\\\" .. eval
+ end
+ res=""
+ end
+ eval=eval:sub(1,-3)
+ if trtext:gsub("%s+", "") =="0" or trtext:gsub("%s+", "") == "$0$" or fltext:gsub("%s+", "") =="1" or fltext:gsub("%s+", "") == "$1$" then
+ eval=eval
+ else
+ eval=eval:gsub(0,fltext):gsub(1,trtext)
+ end
+ return eval
+end
+
+function TruthTblSwap(str0,str,trtext,fltext)
+ local eval=""
+ local names={lognot=lognot,logand=logand,logor=logor, imp=imp, iff=iff, logxor=logxor,lognand=lognand,lognor=lognor, logxnor=logxnor}
+ local vars={}
+ local expr={}
+ local countexp = 1
+ local countvars =1
+ local res=""
+ local sep=" & "
+ trtext = trtext or "$T$"
+ fltext = fltext or "$F$"
+ for variables in string.gmatch(str0, '([^,]+)') do
+ vars[countvars] = variables
+ countvars = countvars + 1
+ end
+ for subexp in string.gmatch(str, '([^,]+)') do
+ expr[countexp] = subexp
+ countexp = countexp + 1
+ end
+ local n =#vars
+ for i =1,2^n do
+ itr = toBinary(i,n)
+ for j=1, #itr do
+ names[vars[j]] = itr[j]
+ end
+ for k = 1, #expr do
+ res= res ..sep.. load("return " .. expr[k],nil,"t",names)()
+ end
+ if i~=2^n then
+ eval = table.concat(toBinary(i,n)," & ") .. res .. "\\\\" .. eval
+ else
+ eval = eval .. table.concat(toBinary(i,n)," & ") .. res .. "\\\\"
+ end
+ res=""
+ end
+ eval=eval:sub(1,-3)
+ if trtext:gsub("%s+", "") =="0" or trtext:gsub("%s+", "") == "$0$" or fltext:gsub("%s+", "") =="1" or fltext:gsub("%s+", "") == "$1$" then
+ eval=eval
+ else
+ eval=eval:gsub(0,fltext):gsub(1,trtext)
+ end
+ return eval
+end
+\end{luacode*}
+
+\define@key{LuaTruthTable}{trtext}{\def\luatrtbl@trtext{#1}}
+\define@key{LuaTruthTable}{fltext}{\def\luatrtbl@fltext{#1}}
+\setkeys{LuaTruthTable}{trtext=$T$,fltext=$F$}%
+
+\NewDocumentCommand\GenTruthTable{ s O{} m m }{%1=swap
+ \setkeys{LuaTruthTable}{#2}%
+ \IfBooleanTF{#1}%
+ {%
+ \directlua{tex.sprint(TruthTblSwap(\luastringN{#3},\luastringN{#4},'\luatrtbl@trtext','\luatrtbl@fltext'))}%
+ }%
+ {%
+ \directlua{tex.sprint(TruthTbl(\luastringN{#3},\luastringN{#4},'\luatrtbl@trtext','\luatrtbl@fltext'))}%
+ }%
+}
+
+\defKV[tableverite]{%
+ VF=\def\TTABLEtruefalse{#1},%
+ LargeursColonnes=\def\TTABLElargeurs{#1},%
+ CouleurEnonce=\def\TTABLEcoul{#1},%
+ CodeAvant=\def\TTABLEcodebefore{#1},%
+ CodeApres=\def\TTABLEcodeafter{#1}
+}
+
+\setKVdefault[tableverite]{%
+ VF={V/F},%
+ LargeursColonnes=auto,%
+ CouleurEnonce={},
+ CodeAvant={},%
+ CodeApres={},%
+ Swap=false
+}
+
+\NewDocumentCommand\TableVerite{ O{} D<>{} m m m m }{%
+ %1=options/clés
+ %2=variables
+ %3=colonnes des variables
+ %4=calculs
+ %5=colonne des calculs
+ \useKVdefault[tableverite]%
+ \setKV[tableverite]{#1}%
+ \setsepchar{,}%
+ \readlist*\TableVeriteVariables{#4}%
+ \readlist*\TableVeriteEnonce{#5}%
+ \readlist*\TableVeriteCalculs{#6}%
+ \StrCut{\TTABLEtruefalse}{/}{\TTTrue}{\TTFalse}%
+ \xdef\TTNbCol{\fpeval{\TableVeriteVariableslen+\TableVeriteEnoncelen}}%\TTNbCol%
+ \IfStrEq{\TTABLElargeurs}{auto}%
+ {%
+ \begin{NiceTabular}[cell-space-limits=3pt,#2]{|*{\TTNbCol}{c|}}%
+ }%
+ {%
+ \IfSubStr{\TTABLElargeurs}{/}%
+ {%
+ \StrCut{\TTABLElargeurs}{/}{\TTlargvars}{\TTlargcals}%
+ }%
+ {%
+ \def\TTlargvars{\TTABLElargeurs}\def\TTlargcals{\TTABLElargeurs}%
+ }%
+ \begin{NiceTabular}[cell-space-limits=3pt,#2]{|*{\TableVeriteVariableslen}{W{c}{\TTlargvars}|}*{\TableVeriteEnoncelen}{W{c}{\TTlargcals}|}}%
+ }%
+ \CodeBefore
+ \IfStrEq{\TTABLEcodebefore}{}{}{\TTABLEcodebefore}%
+ \IfStrEq{\TTABLEcoul}{}{}{\rowcolor{\TTABLEcoul}{1}}%
+ \Body
+ \hline
+ {\TableVeriteVariables[1]}\xintifboolexpr{\TableVeriteVariableslen==1}{}{\xintFor*##1in{\xintSeq{2}{\TableVeriteVariableslen}}\do{&\TableVeriteVariables[##1]}}&\TableVeriteCalculs[1]\xintifboolexpr{\TableVeriteCalculslen==1}{}{\xintFor*##1in{\xintSeq{2}{\TableVeriteCalculslen}}\do{&\TableVeriteCalculs[##1]}} \\ \hline
+ \ifboolKV[tableverite]{Swap}%
+ {%
+ \GenTruthTable[trtext=\TTTrue,fltext=\TTFalse]{#3}{#5} \\ \hline
+ }%
+ {%
+ \GenTruthTable*[trtext=\TTTrue,fltext=\TTFalse]{#3}{#5} \\ \hline
+ }%
+ \CodeAfter
+ \IfStrEq{\TTABLEcodeafter}{}{}{\TTABLEcodeafter}%
+ \end{NiceTabular}%
+}
+
+\fi
+
\endinput \ No newline at end of file