summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/profsio/tex/ProfSio.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-07-07 03:00:56 +0000
committerNorbert Preining <norbert@preining.info>2023-07-07 03:00:56 +0000
commit2178d699db60492a15e11c107f17da33543af865 (patch)
tree157f2907e3778e17df8a7e891bc276b83b444f48 /graphics/pgf/contrib/profsio/tex/ProfSio.sty
parent97f4d34e17013b3239a49484afcb3d805ab09f38 (diff)
CTAN sync 202307070300
Diffstat (limited to 'graphics/pgf/contrib/profsio/tex/ProfSio.sty')
-rw-r--r--graphics/pgf/contrib/profsio/tex/ProfSio.sty83
1 files changed, 58 insertions, 25 deletions
diff --git a/graphics/pgf/contrib/profsio/tex/ProfSio.sty b/graphics/pgf/contrib/profsio/tex/ProfSio.sty
index 1de0681384..b4d4a4fa62 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/07/03 0.1.2 Pour les enseignants en BTS SIO]
+\ProvidesPackage{ProfSio}[2023/07/06 0.1.3 Pour les enseignants en BTS SIO]
+%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
%0.1.0 Version initiale
@@ -239,7 +240,10 @@
Legende=true,%
Couleur=black,%
PosVarLaterale=Gauche,%
- CouleurLegende=black
+ CouleurLegende=black,
+ StyleAlternatif=false,%
+ AideAlt=true,%
+ PoliceTT=false
}
\NewDocumentEnvironment{TableKarnaugh}{ O{} D<>{} }%
@@ -268,36 +272,65 @@
\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]}}$};
+ \ifboolKV[tblkgh]{StyleAlternatif}%
+ {
+ \draw[line width=\KGHThick,\KGHTCoul] (A02)--++({-0.5*sqrt(2)},{0.5*sqrt(2)}) ;
+ \ifboolKV[tblkgh]{Legende}
+ {%
+ \draw[\KGHTCoulLegendeC,line width=\KGHThick] (-7pt,0)--++(0,1) node[midway,left=3pt,inner sep=1pt,text=\KGHTCoulLegendeC,outer sep=0pt] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[3]}$}{$\strut{\ListeVariablesKGH[3]}$} } ;
+ \draw[\KGHTCoulLegendeA,line width=\KGHThick] ($(A22)+(0,7pt)$)--++(2,0) node[midway,above,inner sep=1pt,text=\KGHTCoulLegendeA,outer sep=0pt] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[1]}$}{$\strut{\ListeVariablesKGH[1]}$} } ;
+ \draw[\KGHTCoulLegendeB,line width=\KGHThick] ($(A10)+(0,-7pt)$)--++(2,0) node[midway,below,inner sep=1pt,text=\KGHTCoulLegendeB,outer sep=0pt] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[2]}$}{$\strut{\ListeVariablesKGH[2]}$} } ;
+ \draw ($({-0.25*sqrt(2)},{2+0.25*sqrt(2)})+(-135:10pt)$) node[inner sep=1pt,text=\KGHTCoulLegendeC,outer sep=0pt] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[3]}$}{$\strut{\ListeVariablesKGH[3]}$} } ;
+ \draw ($({-0.25*sqrt(2)},{2+0.25*sqrt(2)})+(45:10pt)$) node[inner sep=1pt,outer sep=0pt] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\mathcolor{\KGHTCoulLegendeA}{\ListeVariablesKGH[1]}\mathcolor{\KGHTCoulLegendeB}{\ListeVariablesKGH[2]}}$}{$\strut{\mathcolor{\KGHTCoulLegendeA}{\ListeVariablesKGH[1]}\mathcolor{\KGHTCoulLegendeB}{\ListeVariablesKGH[2]}}$} } ;
}%
+ {}%
+ }%
+ {%
+ \ifboolKV[tblkgh]{Legende}
{%
- \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]}$};
+ \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] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[2]}$}{$\strut{\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] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\overline{\ListeVariablesKGH[2]}}$}{$\strut{\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] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[3]}$}{$\strut{\ListeVariablesKGH[3]}$} };
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (0.5,-0.1) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\overline{\ListeVariablesKGH[3]}}$}{$\strut{\overline{\ListeVariablesKGH[3]}}$} };
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (3.5,-0.1) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\overline{\ListeVariablesKGH[3]}}$}{$\strut{\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] { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\overline{\ListeVariablesKGH[3]}}$}{$\strut{\overline{\ListeVariablesKGH[3]}}$} };
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (0.5,-0.1) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[3]}$}{$\strut{\ListeVariablesKGH[3]}$} };
+ \node[\KGHTCoulLegendeC,inner sep=1pt,below=7pt,outer sep=0pt] at (3.5,-0.1) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[3]}$}{$\strut{\ListeVariablesKGH[3]}$} };
+ }%
+ \IfStrEq{\KGHTPosVarA}{Gauche}
+ {%
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,left=8pt] at (0,0.5) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\overline{\ListeVariablesKGH[1]}}$}{$\strut{\overline{\ListeVariablesKGH[1]}}$} };
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,left=8pt] at (0,1.5) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[1]}$}{$\strut{\ListeVariablesKGH[1]}$} };
+ }{}%
+ \IfStrEq{\KGHTPosVarA}{Droite}
+ {%
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,right=8pt] at (4,0.5) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\overline{\ListeVariablesKGH[1]}}$}{$\strut{\overline{\ListeVariablesKGH[1]}}$} };
+ \node[\KGHTCoulLegendeA,inner sep=1pt,outer sep=0pt,right=8pt] at (4,1.5) { \ifboolKV[tblkgh]{PoliceTT}{$\strut\mathtt{\ListeVariablesKGH[1]}$}{$\strut{\ListeVariablesKGH[1]}$} };
+ }{}%
}%
- \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]{StyleAlternatif}%
+ {%
+ \ifboolKV[tblkgh]{AideAlt}%
+ {%
+ \draw (A02) node[below right=2pt,inner sep=1pt,font=\scriptsize] {000} ;
+ \draw (A12) node[below right=2pt,inner sep=1pt,font=\scriptsize] {010} ;
+ \draw (A22) node[below right=2pt,inner sep=1pt,font=\scriptsize] {110} ;
+ \draw (A32) node[below right=2pt,inner sep=1pt,font=\scriptsize] {100} ;
+ \draw (A01) node[below right=2pt,inner sep=1pt,font=\scriptsize] {001} ;
+ \draw (A11) node[below right=2pt,inner sep=1pt,font=\scriptsize] {011} ;
+ \draw (A21) node[below right=2pt,inner sep=1pt,font=\scriptsize] {111} ;
+ \draw (A31) node[below right=2pt,inner sep=1pt,font=\scriptsize] {101} ;
+ }{}%
+ }{}%
\ifboolKV[tblkgh]{Aide}%
{%
\foreach \noeud in {00,10,20,30,40,01,11,21,31,41,02,12,22,32,42}