texlive[68045] Master/texmf-dist: profsio (24aug23)

commits+karl at tug.org commits+karl at tug.org
Thu Aug 24 22:18:06 CEST 2023


Revision: 68045
          http://tug.org/svn/texlive?view=revision&revision=68045
Author:   karl
Date:     2023-08-24 22:18:06 +0200 (Thu, 24 Aug 2023)
Log Message:
-----------
profsio (24aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/profsio/ProfSio-doc-fr.pdf
    trunk/Master/texmf-dist/doc/latex/profsio/ProfSio-doc-fr.tex
    trunk/Master/texmf-dist/tex/latex/profsio/ProfSio.sty

Modified: trunk/Master/texmf-dist/doc/latex/profsio/ProfSio-doc-fr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/profsio/ProfSio-doc-fr.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/profsio/ProfSio-doc-fr.tex	2023-08-24 20:17:55 UTC (rev 68044)
+++ trunk/Master/texmf-dist/doc/latex/profsio/ProfSio-doc-fr.tex	2023-08-24 20:18:06 UTC (rev 68045)
@@ -5,8 +5,8 @@
 
 \documentclass[french,a4paper,11pt]{article}
 \usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.3}
-\def\TPdate{6 juillet 2023}
+\def\TPversion{0.1.4}
+\def\TPdate{23 août 2023}
 %\usepackage[utf8]{inputenc}
 %\usepackage[T1]{fontenc}
 \usepackage{amsmath,amssymb}
@@ -255,6 +255,8 @@
 
 \section{Historique}
 
+\verb|v0.1.4|~:~~~~Possibilité de remplir une table de Karnaugh sans virgule
+
 \verb|v0.1.3|~:~~~~Style alternatif et Clé \Cle{PoliceTT} pour les tables de Karnaugh
 
 \verb|v0.1.2|~:~~~~Clé \Cle{Offset} pour les diagrammes sagittaux + Diagrammes sagittaux de composées.
@@ -717,7 +719,8 @@
 	\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
+
+À noter que la liste peut être donnée sous forme \Cle{\{1,0,1,0,0,0,0,0\}} ou \Cle{\{1010000\}}
 \end{tipblock}
 
 \subsection{Arguments et clés pour la commande de regroupement des blocs}
@@ -759,7 +762,7 @@
 \end{TableKarnaugh}
 \hspace{5mm}
 \begin{TableKarnaugh}[Aide]
-	\KarnaughCasesResult{0,1,1,0,1,1,1,1}
+	\KarnaughCasesResult{01101111}
 	\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}
@@ -789,7 +792,7 @@
 \begin{TableKarnaugh}
 	[Variables=k/l/m,Unite=1.25cm,Couleur=darkgray, PosVarLaterale=Droite,CouleurLegende=black/blue/red,
 	StyleAlternatif]
-	\KarnaughCasesResult{1,1,1,0,1,1,1,0}
+	\KarnaughCasesResult{11101110}
 	\KarnaughBlocRegroup[Type=Centre,Couleur=brown,Decalage=-3pt]{00}{22}
 	\KarnaughBlocRegroup[Type=Centre,Couleur=teal,Decalage=-1.5pt]{10}{32}
 \end{TableKarnaugh}

Modified: trunk/Master/texmf-dist/tex/latex/profsio/ProfSio.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/profsio/ProfSio.sty	2023-08-24 20:17:55 UTC (rev 68044)
+++ trunk/Master/texmf-dist/tex/latex/profsio/ProfSio.sty	2023-08-24 20:18:06 UTC (rev 68045)
@@ -3,7 +3,8 @@
 %            : Luatruthtable from Chetan Shirore and Dr. Ajit Kumar https://ctan.org/pkg/luatruthtable
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ProfSio}[2023/07/06 0.1.3 Pour les enseignants en BTS SIO]
+\ProvidesPackage{ProfSio}[2023/08/23 0.1.4 Pour les enseignants en BTS SIO]
+%0.1.4	Possibilité de remplir une table de Karnaugh sans virgule
 %0.1.3	Style alternatif et Clé [PoliceTT] pour les tables de Karnaugh
 %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
@@ -363,28 +364,56 @@
 }
 
 \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) ;}{}%
+			\IfSubStr{#2}{,}%
+				{%
+					\setsepchar{,}%
+					\readlist*\KGHListeResult{#2}%
+					\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) ;}{}%
+				}%
+				{%
+					\StrChar{#2}{1}[\TmpCharA]\xintifboolexpr{\TmpCharA == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A01) rectangle (A12) ;}{}%
+					\StrChar{#2}{2}[\TmpCharB]\xintifboolexpr{\TmpCharB == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A11) rectangle (A22) ;}{}%
+					\StrChar{#2}{3}[\TmpCharC]\xintifboolexpr{\TmpCharC == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A21) rectangle (A32) ;}{}%
+					\StrChar{#2}{4}[\TmpCharD]\xintifboolexpr{\TmpCharD == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A31) rectangle (A42) ;}{}%
+					\StrChar{#2}{5}[\TmpCharE]\xintifboolexpr{\TmpCharE == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A00) rectangle (A11) ;}{}%
+					\StrChar{#2}{6}[\TmpCharF]\xintifboolexpr{\TmpCharF == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A10) rectangle (A21) ;}{}%
+					\StrChar{#2}{7}[\TmpCharG]\xintifboolexpr{\TmpCharG == 1}{\draw[line width=\KGHThick,fill=\KGHTCoulCases,draw=\KGHTCoul] (A20) rectangle (A31) ;}{}%
+					\StrChar{#2}{8}[\TmpCharH]\xintifboolexpr{\TmpCharH == 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]} ;
+			\IfSubStr{#2}{,}%
+				{%
+					\setsepchar{,}%
+					\readlist*\KGHListeResult{#2}%
+					\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]} ;
+				}%
+				{%
+					\draw (0.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{1}} ;
+					\draw (1.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{2}} ;
+					\draw (2.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{3}} ;
+					\draw (3.5,1.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{4}} ;
+					\draw (0.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{5}} ;
+					\draw (1.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{6}} ;
+					\draw (2.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{7}} ;
+					\draw (3.5,0.5) node[text=\KGHTCoulCases!50!black,font=\large\ttfamily] {\StrChar{#2}{8}} ;
+				}%
 		}%
 }
 



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