diff options
author | Norbert Preining <norbert@preining.info> | 2023-08-16 03:00:51 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-08-16 03:00:51 +0000 |
commit | d10719e48fc5cd329e6333041ef31d868fafbdcc (patch) | |
tree | 8f1b97fae0646e68f502c0794120636e3f5170a6 /macros | |
parent | 3593305133bcfb167225af1b35c299bde1456579 (diff) |
CTAN sync 202308160300
Diffstat (limited to 'macros')
21 files changed, 365 insertions, 275 deletions
diff --git a/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.dtx b/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.dtx index df827bf3c5..56179a56dc 100644 --- a/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.dtx +++ b/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.dtx @@ -22,9 +22,9 @@ %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<package>\ProvidesPackage{brandeis-dissertation} %<*package> - [2020/12/04 v3.13.dtx brandeis-dissertation file] + [2023/08/15 v3.14.dtx brandeis-dissertation file] %</package> -%<package>\LoadClass[12pt]{book} +%<package>\LoadClass[12pt,openany]{book} %<package>\RequirePackage[margin=1in]{geometry} %<package>\RequirePackage{setspace} %<package>\RequirePackage{titlesec} @@ -37,9 +37,15 @@ %<package>\renewcommand\cfttoctitlefont{\normalsize} %<package>\renewcommand\cftlottitlefont{\normalsize} %<package>\renewcommand\cftloftitlefont{\normalsize} +%<package>\titleformat{\chapter}{\normalsize\centering\uppercase}{}{0ex}{} %<package>\titleformat*{\section}{\normalsize\bfseries} %<package>\titleformat*{\subsection}{\normalsize\bfseries} -%<package>\titleformat*{\subsubsection}{\normalsize\bfseries} +%<package>\titleformat*{\subsubsection}{\normalsize} +%<package>\titlespacing*{\chapter}{0 pt}{-\baselineskip}{0 pt} +%<package>\titlespacing*{\section}{0 pt}{-\baselineskip}{0 pt} +%<package>\titlespacing*{\subsection}{0 pt}{-\baselineskip}{0 pt} +%<package>\titlespacing*{\subsubsection}{0 pt}{-\baselineskip}{0 pt} + %<package>\newcommand{\sectionbreak}{\clearpage} % %<package>\newcommand\graduationmonth[1]{\def\@graduationmonth{#1}} @@ -48,8 +54,27 @@ %<package>\newcommand\advisor[1]{\def\@advisor{#1}} %<package>\newcommand\signoff[2]{\def\@signoff{#1}\def\@signofftitle{#2}} %<package>\newcommand\committee[1]{\def\@committee{#1}} -%<package>\addto\captionsenglish{\renewcommand*\contentsname{Table of Contents}} -%<package>\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} +%<package>\renewcommand\cfttoctitlefont{\normalsize} +%<package>\renewcommand\cftlottitlefont{\normalsize} +%<package>\renewcommand\cftloftitlefont{\normalsize} +%<package>\addto\captionsenglish{\renewcommand*\contentsname{\hfill TABLE OF CONTENTS}} +%<package>\renewcommand{\cftaftertoctitle}{\hfill} +%<package>\renewcommand{\cftbeforetoctitleskip}{-24pt} +%<package>\renewcommand{\cftaftertoctitleskip}{0em} +%<package>\renewcommand{\cftbeforeloftitleskip}{-24pt} +%<package>\renewcommand{\cftafterloftitleskip}{0em} +%<package>\renewcommand{\cftbeforelottitleskip}{-24pt} +%<package>\renewcommand{\cftafterlottitleskip}{0em} +%<package>\addto\captionsenglish{\renewcommand*\listfigurename{\hfill LIST OF FIGURES}} +%<package>\renewcommand{\cftafterloftitle}{\hfill} +%<package>\addto\captionsenglish{\renewcommand*\listtablename{\hfill LIST OF TABLES}} +%<package>\renewcommand{\cftafterlottitle}{\hfill} +%<package>\setcounter{secnumdepth}{-1} +%<package>\renewcommand*\l@section{\@dottedtocline{1}{2em}{1.0em}} +%<package>\renewcommand*\l@chapter{\@dottedtocline{1}{0em}{1.0em}} + + + % %<*package> \newcommand{\maketitlepage}{% @@ -74,6 +99,7 @@ Doctor of Philosophy\\ \vspace{1em} by\\ + \vspace{1em} \@author\\ \vspace{1em} \@graduationmonth\,\@graduationyear @@ -112,25 +138,28 @@ } %</package> %<*package> -\newcommand{\makecopyright}{% - \pagenumbering{gobble} - \newgeometry{top=6.2in} - \begin{center} - Copyright by\\ - \@author{}\\ - \vspace{1em} - \@graduationyear{} - \end{center} - \restoregeometry - \newpage - \pagenumbering{roman} - \setcounter{page}{4} -} +% \newcommand{\makecopyright}{% +% \pagenumbering{gobble} +% \newgeometry{top=6.2in} +% \begin{center} +% Copyright by\\ +% \@author{}\\ +% \vspace{1em} +% \@graduationyear{} +% \end{center} +% \restoregeometry +% \newpage +% \pagenumbering{roman} +% \setcounter{page}{4} +% } %</package> %<*package> \newenvironment{dissertation-acknowledgements} { - %\newgeometry{top=1.4in} + % \newgeometry{top=1.0in} + \pagenumbering{roman} + \setcounter{page}{3} + \pagestyle{plain} \begin{center} Acknowledgements\\ \vspace{1em} @@ -144,6 +173,7 @@ \newenvironment{dissertation-abstract} { %\newgeometry{top=1.4in} + \pagestyle{plain} \begin{center} \MakeUppercase{Abstract}\\ \vspace{1em} @@ -164,9 +194,11 @@ %</package> %<*package> \newcommand{\startbody}{% + % \newgeometry{top=1.0in} \newpage \pagenumbering{arabic} \doublespacing + \pagestyle{plain} } %</package> % diff --git a/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.pdf b/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.pdf Binary files differindex 0a8b50b70d..1b8952b5bc 100644 --- a/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.pdf +++ b/macros/latex/contrib/brandeis-dissertation/brandeis-dissertation.pdf diff --git a/macros/latex/contrib/brandeis-thesis/brandeis-thesis.dtx b/macros/latex/contrib/brandeis-thesis/brandeis-thesis.dtx index e57e1b05bf..4244011a04 100644 --- a/macros/latex/contrib/brandeis-thesis/brandeis-thesis.dtx +++ b/macros/latex/contrib/brandeis-thesis/brandeis-thesis.dtx @@ -22,13 +22,12 @@ %<package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] %<package>\ProvidesClass{brandeis-thesis} %<*package> - [2021/06/29 v3.2 .dtx brandeis-thesis file] + [2023/08/15 v3.3 .dtx brandeis-thesis file] %</package> %<package>\LoadClass[12pt,oneside]{book} %<package>\RequirePackage[immediate]{silence} -%<package>\WarningFilter[temp]{latex}{Command} +%<package>\WarningFilter{latex}{Command} % silence the warning %<package>\RequirePackage{sectsty} -%<package>\DeactiveWarningFilters[temp] %<package>\RequirePackage[margin=1in]{geometry} %<package>\RequirePackage{setspace} %<package>\RequirePackage{titlesec} @@ -40,12 +39,17 @@ %<package>\allsectionsfont{\normalsize\bfseries} %<package>\renewcommand{\cftchapfont}{\normalfont} %<package>\renewcommand{\cftchappagefont}{\normalfont} -%<package>\renewcommand{\cfttoctitlefont}{\normalsize\bfseries} -%<package>\renewcommand{\cftloftitlefont}{\normalsize\bfseries} -%<package>\renewcommand{\cftlottitlefont}{\normalsize\bfseries} -%<package>\setlength{\cftaftertoctitleskip}{12pt} -%<package>\setlength{\cftafterloftitleskip}{12pt} -%<package>\setlength{\cftafterlottitleskip}{12pt} +%<package>\titleformat{\chapter}{\normalsize\centering\uppercase}{}{0ex}{} +%<package>\titleformat*{\section}{\normalsize\bfseries} +%<package>\titleformat*{\subsection}{\normalsize\bfseries} +%<package>\titleformat*{\subsubsection}{\normalsize} +%<package>\titlespacing*{\chapter}{0 pt}{-\baselineskip}{0 pt} + +%<package>\newcommand{\sectionbreak}{\clearpage} +%<package>\titlespacing*{\section}{0 pt}{-\baselineskip}{0 pt} +%<package>\titlespacing*{\subsection}{0 pt}{-\baselineskip}{0 pt} +%<package>\titlespacing*{\subsubsection}{0 pt}{-\baselineskip}{0 pt} +%<package>\setcounter{secnumdepth}{-1} %<package>\AtBeginEnvironment{quote}{\singlespacing} %<package>\pagestyle{plain} %<package>\newcommand\graduationmonth[1]{\def\@graduationmonth{#1}} @@ -53,8 +57,29 @@ %<package>\newcommand\program[1]{\def\@program{#1}} %<package>\newcommand\advisor[1]{\def\@advisor{#1}} %<package>\newcommand\degreetype[1]{\def\@degreetype{#1}} -%<package>\addto\captionsenglish{\renewcommand*\contentsname{Table of Contents}} -%<package>\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} +%<package>\renewcommand\cfttoctitlefont{\normalsize} +%<package>\renewcommand\cftlottitlefont{\normalsize} +%<package>\renewcommand\cftloftitlefont{\normalsize} + +%<package>\addto\captionsenglish{\renewcommand*\contentsname{\hfill TABLE OF CONTENTS \hfill}} +%<package>\renewcommand{\cftaftertoctitle}{\hfill} +%<package>\renewcommand{\cftbeforetoctitleskip}{-24pt} +%<package>\renewcommand{\cftaftertoctitleskip}{0em} +%<package>\renewcommand{\cftbeforeloftitleskip}{-24pt} +%<package>\renewcommand{\cftafterloftitleskip}{0em} +%<package>\renewcommand{\cftbeforelottitleskip}{-24pt} +%<package>\renewcommand{\cftafterlottitleskip}{0em} +%<package>\addto\captionsenglish{\renewcommand*\listfigurename{\hfill LIST OF FIGURES}} +%<package>\renewcommand{\cftafterloftitle}{\hfill} +%<package>\addto\captionsenglish{\renewcommand*\listtablename{\hfill LIST OF TABLES}} +%<package>\renewcommand{\cftafterlottitle}{\hfill} +%<package>% \setlength{\topmargin}{1in} +%<package>\setcounter{secnumdepth}{-1} +%<package>\renewcommand*\l@section{\@dottedtocline{1}{2em}{1.0em}} +%<package>\renewcommand*\l@chapter{\@dottedtocline{1}{0em}{1.0em}} + + +%<package> % %<*package> \newcommand{\maketitlepage}{ @@ -91,20 +116,20 @@ } %</package> %<*package> -\newcommand{\makecopyright}{ - \pagenumbering{gobble} - \newgeometry{top=6.2in} - \begin{center} - Copyright by\\ - \@author{}\\ - \vspace{1em} - \@graduationyear{} - \end{center} - \restoregeometry - \newpage - \pagenumbering{roman} - \setcounter{page}{3} -} +% \newcommand{\makecopyright}{ +% \pagenumbering{gobble} +% \newgeometry{top=6.2in} +% \begin{center} +% Copyright by\\ +% \@author{}\\ +% \vspace{1em} +% \@graduationyear{} +% \end{center} +% \restoregeometry +% \newpage +% \pagenumbering{roman} +% \setcounter{page}{3} +% } %</package> %<*package> \newenvironment{thesis-abstract} diff --git a/macros/latex/contrib/brandeis-thesis/brandeis-thesis.pdf b/macros/latex/contrib/brandeis-thesis/brandeis-thesis.pdf Binary files differindex 6970ee794c..277a8cff23 100644 --- a/macros/latex/contrib/brandeis-thesis/brandeis-thesis.pdf +++ b/macros/latex/contrib/brandeis-thesis/brandeis-thesis.pdf diff --git a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf Binary files differindex 3b1cda34d7..93bd8786cf 100644 --- a/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf +++ b/macros/latex/contrib/profcollege/doc/ProfCollege-doc.pdf diff --git a/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex b/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex index 8a7efd3342..eb1a55e768 100644 --- a/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex +++ b/macros/latex/contrib/profcollege/latex/PfCCalculatrice.tex @@ -14,7 +14,7 @@ \colorlet{greenish}{green!16!gray}% \colorlet{redish}{red!80!black}% -\tcbset{calbackground/.style={ +\tcbset{calbackground/.style={% enhanced, leftright skip=0.25cm,beforeafter skip=0pt, toptitle=0mm,bottomtitle=0mm, @@ -34,7 +34,7 @@ autoparskip, }}% -\newtcbox{\KY}[1][]{ +\newtcbox{\KY}[1][]{% enhanced, on line, arc=2pt,outer arc=2pt, @@ -51,7 +51,7 @@ before upper=\vrule width 0pt height 2ex depth 1ex\relax, }% -\newtcbox{\KYm}[1][]{ +\newtcbox{\KYm}[1][]{% enhanced, on line, arc=2pt,outer arc=2pt, @@ -69,7 +69,7 @@ after upper=$, }% -\newtcbox{\KN}{ +\newtcbox{\KN}{% enhanced, on line, arc=2pt,outer arc=2pt, @@ -107,30 +107,28 @@ at (frame.north east) {#1};} } -\def\MPCalculatrice#1#2#3{ +\def\MPCalculatrice#1#2#3{% % #1 Calcul %2 r\'eponse - \ifluatex - \mplibnumbersystem{double} + \ifluatex% + \mplibnumbersystem{double}% \mplibforcehmode% \begin{mplibcode}% input PfCCalculatrice; LargeurEcran:=\useKV[ClesCalculatrice]{Largeur}; boolean Calcul; Calcul=\useKV[ClesCalculatrice]{Calcul}; + print:=\useKV[ClesCalculatrice]{Impression}; LCD(#1)(#2)(#3); - \end{mplibcode} - \mplibnumbersystem{scaled} - \else + \end{mplibcode}% + \mplibnumbersystem{scaled}% + \else% \begin{mpost}[mpsettings={input PfCCalculatrice;LargeurEcran:=\useKV[ClesCalculatrice]{Largeur};}] LCD(#1)(#2)(#3); \end{mpost} - \fi + \fi% }% -\setKVdefault[ClesCalculatrice]{Ecran=false,NbLignes=0,BL=0.775,Largeur=120,Calcul=false} - -\newtoks\toklistenombrecalculatrice -\def\UpdatetoksCalculatrice#1\nil{\addtotok\toklistenombrecalculatrice{"\fpeval{#1}"}} +\setKVdefault[ClesCalculatrice]{Ecran=false,NbLignes=0,BL=0.775,Largeur=120,Calcul=false,Impression=false}% \newcommand\Calculatrice[2][]{% \setstackgap{L}{\useKV[ClesCalculatrice]{BL}\baselineskip}% diff --git a/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex b/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex new file mode 100644 index 0000000000..8e26111a31 --- /dev/null +++ b/macros/latex/contrib/profcollege/latex/PfCDefiCalc.tex @@ -0,0 +1,38 @@ +%%% +% Defi Calculatrice +%%% +\setKVdefault[DefiCalculatrice]{NbCasesNoires=6,ListeTouches={!},Impression=false}% + +\newtoks\toktexteecran{} +\newtoks\tokcibleecran{} +\def\UpdatetoksTexteEcran#1\nil{\addtotok\toktexteecran{_}} +\def\UpdatetoksCibleEcran#1\nil{\addtotok\tokcibleecran{"#1"}} + +\NewDocumentCommand\DefiCalculatrice{om}{% + \useKVdefault[DefiCalculatrice]% + \setKV[DefiCalculatrice]{#1}% + \defKV[DefiCalculatrice]{Impression=\setKV[ClesCalculatrice]{Impression}}% + \toktexteecran{"}% + \tokcibleecran{}% + \xdef\PfCFooDCListe{\useKV[DefiCalculatrice]{ListeTouches}} + \setsepchar{,}\ignoreemptyitems% + \readlist*\PfCDCListeEffacer{\PfCFooDCListe}% + \reademptyitems% + \xintFor* ##1 in{\xintSeq{1}{\useKV[DefiCalculatrice]{NbCasesNoires}}}\do{% + \expandafter\UpdatetoksTexteEcran##1\nil + }% + \addtotok\toktexteecran{"} + \expandafter\UpdatetoksCibleEcran#2\nil + % Dessin de la calculatrice + \begin{tcolorbox}[nobeforeafter,left=0pt,right=0pt,top=0pt,bottom=0pt,width=69pt] + \setlength{\tabcolsep}{0.01\tabcolsep} + \begin{tabular}{*{4}{m{20pt}}} + \ifboolKV[DefiCalculatrice]{Impression}{\multicolumn{4}{c}{\Calculatrice[Ecran,Largeur=40,Impression]{\the\toktexteecran/\the\tokcibleecran}}}{\multicolumn{4}{c}{\Calculatrice[Ecran,Largeur=40]{\the\toktexteecran/\the\tokcibleecran}}}\\ + \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{7}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/7}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{8}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/8}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{9}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/9}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{/}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\div$}}}\\ + \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{4}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/4}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{5}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/5}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{6}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/6}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{*}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$\times$}}}\\ + \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{1}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/1}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{2}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/2}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{3}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/3}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{-}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$-$}}}\\ + \multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{0}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/0}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{.}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/.}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{=}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$=$}}}&\multicolumn{1}{c}{\IfSubStr{\useKV[DefiCalculatrice]{ListeTouches}}{+}{\Calculatrice{/\faScrewdriver}}{\Calculatrice{/$+$}}}\\ + \end{tabular} + \setlength{\tabcolsep}{100\tabcolsep} + \end{tcolorbox} +}%
\ No newline at end of file diff --git a/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex b/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex index da8b011cc6..5922748104 100644 --- a/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex +++ b/macros/latex/contrib/profcollege/latex/PfCLabyrintheJeu.tex @@ -6,6 +6,8 @@ \tikzset{FDirect/.style={-stealth}} \tikzset{FIndirect/.style={stealth-}} \tikzset{FBidirect/.style={stealth-stealth}} +\tikzset{PfCStyleI/.style={near start}} +\tikzset{PfCStyle/.style={near start}} \newlength{\LabyLongCM} @@ -75,7 +77,7 @@ \ifboolKV[Labyrinthe]{Passages}{% \xdef\NomNode{\noexpand\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},1]}% \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]>0}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]==1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-2)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+2},2]==2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}}% - \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1}); + \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,PfCStyleI,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1}); }{} }{% \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- (A-\fpeval{\compteurh+1}-\fpeval{\compteurv-1}); @@ -89,10 +91,10 @@ \xdef\NomNode{\noexpand\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},1]}% \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]>0}{% \xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]==1}{\xdef\NomStyle{FDirect}}{\xintifboolexpr{\ListeLabySol[\fpeval{\TotalLaby*(\compteurv-1)+\useKV[Labyrinthe]{Colonnes}+3*(\compteurh-1)+1},2]==2}{\xdef\NomStyle{FIndirect}}{\xdef\NomStyle{FBidirect}}} - \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1}); + \draw[\CouleurF,line width=3pt,\NomStyle] (A-\compteurh-\compteurv) -- node[fill=white,PfCStyle,\LabySlop,inner sep=2pt]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1}); }{}% }{% - \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- node[fill=white,near start,\LabySlop]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1}); + \draw[\CouleurF,line width=3pt,FBidirect] (A-\compteurh-\compteurv) -- node[fill=white,PfCStyle,\LabySlop]{\MotifTexte\NomNode}(A-\fpeval{\compteurh+1}-\fpeval{\compteurv+1}); }% }% }% diff --git a/macros/latex/contrib/profcollege/latex/PfCMentalo.tex b/macros/latex/contrib/profcollege/latex/PfCMentalo.tex index da5dfc85e7..84176c0d1f 100644 --- a/macros/latex/contrib/profcollege/latex/PfCMentalo.tex +++ b/macros/latex/contrib/profcollege/latex/PfCMentalo.tex @@ -13,46 +13,91 @@ \fi% }% -\setKVdefault[Mentalo]{Questions=10,ValeurMin=1,ValeurMax=15} +\setKVdefault[Mentalo]{Questions=10,ValeurMin=1,ValeurMax=15,Perso=false} \NewDocumentCommand\Mentalo{o m}{% \useKVdefault[Mentalo]% \setKV[Mentalo]{#1}% - \xdef\PfCMentaloEtages{\fpeval{\useKV[Mentalo]{Questions}+1}} - \setsepchar{,}\ignoreemptyitems% - \readlist*\PfCMentaloListeOperations{#2}% - \reademptyitems% - \setlength{\tabcolsep}{0.25\tabcolsep} - \renewcommand{\arraystretch}{1.5} - \begin{NiceTabular}{*{\fpeval{\PfCMentaloEtages}}{m{5pt}}m{20pt}cm{20pt}cl*{\fpeval{\PfCMentaloEtages}}{m{5pt}}*{5}{m{15pt}}*{1}{m{10pt}}} - \Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}% - \Block[draw,fill=gray!15]{1-5}{Arrivée}&&&&&\Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}\\ - \xintFor* ##1 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-1}}}\do{% - \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}% - \Block[borders={top,left,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}% - \Block[borders={top,bottom}]{1-1}{% - \xdef\PfCMentaloPremierTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}% - \num{\PfCMentaloPremierTerme}}&\Block[borders={top,bottom}]{1-1}{% - \xintifboolexpr{\PfCMentaloListeOperationslen==1}{% - \StrSubstitute{\PfCMentaloListeOperations[1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$% - }{% - \StrSubstitute{\PfCMentaloListeOperations[##1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$% + \ifboolKV[Mentalo]{Perso}{% + \setsepchar{,}\ignoreemptyitems% + \readlist*\PfCMentaloListeOperations{#2}% + \reademptyitems% + \xdef\PfCMentaloEtages{\fpeval{\PfCMentaloListeOperationslen+1}}% + \setlength{\tabcolsep}{0.25\tabcolsep}% + \renewcommand{\arraystretch}{1.5}% + \begin{NiceTabular}{*{\fpeval{\PfCMentaloEtages}}{m{5pt}}m{20pt}cm{20pt}cl*{\fpeval{\PfCMentaloEtages}}{m{5pt}}*{5}{m{15pt}}*{1}{m{10pt}}} + \Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}% + \Block[draw,fill=gray!15]{1-5}{Arrivée}&&&&&\Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}\\ + \xintFor* ##1 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-1}}}\do{% + \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}% + \Block[borders={top,left,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}% + \Block[borders={top,bottom}]{1-1}{% + \IfSubStr{\PfCMentaloListeOperations[##1]}{+}{\StrBefore{\PfCMentaloListeOperations[##1]}{+}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{-}{\StrBefore{\PfCMentaloListeOperations[##1]}{-}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{*}{\StrBefore{\PfCMentaloListeOperations[##1]}{*}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{/}{\StrBefore{\PfCMentaloListeOperations[##1]}{/}[\PfCMentaloPremierTerme]\num{\PfCMentaloPremierTerme}}{}% + }& + \Block[borders={top,bottom}]{1-1}{% + \IfSubStr{\PfCMentaloListeOperations[##1]}{+}{$+$}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{-}{$-$}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{*}{$\times$}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{/}{$\div$}{}% }% - }&% - \Block[borders={top,bottom}]{1-1}{\xdef\PfCMentaloDeuxiemeTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}% - \PfCNum{\PfCMentaloDeuxiemeTerme}}&\Block[borders={top,bottom}]{1-1}{$=$}&\Block[borders={top,bottom}]{1-1}{\pointilles[20pt]}&% - \Block[borders={top,right,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}% - \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}% - &&&&\Block{1-2}{% - \xintifboolexpr{\PfCMentaloListeOperationslen==1}{% - \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[1]\PfCMentaloDeuxiemeTerme}} - }{% - \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[##1]\PfCMentaloDeuxiemeTerme}} + & + \Block[borders={top,bottom}]{1-1}{% + \IfSubStr{\PfCMentaloListeOperations[##1]}{+}{\StrBehind{\PfCMentaloListeOperations[##1]}{+}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{-}{\StrBehind{\PfCMentaloListeOperations[##1]}{-}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{*}{\StrBehind{\PfCMentaloListeOperations[##1]}{*}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}% + \IfSubStr{\PfCMentaloListeOperations[##1]}{/}{\StrBehind{\PfCMentaloListeOperations[##1]}{/}[\PfCMentaloDeuxiemeTerme]\num{\PfCMentaloDeuxiemeTerme}}{}% }% - }&\\ - }% - \Block[draw,fill=gray!15]{1-\fpeval{2*\PfCMentaloEtages+5}}{Départ}\xintFor* ##2 in{\xintSeq{1}{\fpeval{2*\PfCMentaloEtages+5}}}\do{&}\\% - \CodeAfter - \tikz\draw[dashed] (1-|\fpeval{5+5+2+2*\PfCMentaloEtages-2})--(last-|\fpeval{5+5+2+2*\PfCMentaloEtages-2}); - \end{NiceTabular} + &\Block[borders={top,bottom}]{1-1}{$=$}&\Block[borders={top,bottom}]{1-1}{\pointilles[20pt]}&% + \Block[borders={top,right,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}% + \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}% + &&&&\Block{1-2}{% + \num{\fpeval{\PfCMentaloListeOperations[##1]}}% + }&\\ + }% + \Block[draw,fill=gray!15]{1-\fpeval{2*\PfCMentaloEtages+5}}{Départ}\xintFor* ##2 in{\xintSeq{1}{\fpeval{2*\PfCMentaloEtages+5}}}\do{&}\\% + \CodeAfter + \tikz\draw[dashed] (1-|\fpeval{5+5+2+2*\PfCMentaloEtages-2})--(last-|\fpeval{5+5+2+2*\PfCMentaloEtages-2}); + \end{NiceTabular} + }{% + \xdef\PfCMentaloEtages{\fpeval{\useKV[Mentalo]{Questions}+1}} + \setsepchar{,}\ignoreemptyitems% + \readlist*\PfCMentaloListeOperations{#2}% + \reademptyitems% + \setlength{\tabcolsep}{0.25\tabcolsep} + \renewcommand{\arraystretch}{1.5} + \begin{NiceTabular}{*{\fpeval{\PfCMentaloEtages}}{m{5pt}}m{20pt}cm{20pt}cl*{\fpeval{\PfCMentaloEtages}}{m{5pt}}*{5}{m{15pt}}*{1}{m{10pt}}} + \Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}% + \Block[draw,fill=gray!15]{1-5}{Arrivée}&&&&&\Block{1-\fpeval{\PfCMentaloEtages}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages}}}\do{&}\\ + \xintFor* ##1 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-1}}}\do{% + \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}% + \Block[borders={top,left,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}% + \Block[borders={top,bottom}]{1-1}{% + \xdef\PfCMentaloPremierTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}% + \num{\PfCMentaloPremierTerme}}&\Block[borders={top,bottom}]{1-1}{% + \xintifboolexpr{\PfCMentaloListeOperationslen==1}{% + \StrSubstitute{\PfCMentaloListeOperations[1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$% + }{% + \StrSubstitute{\PfCMentaloListeOperations[##1]}{*}{\times}[\PfCCBAffiche]$\PfCCBAffiche$% + }% + }&% + \Block[borders={top,bottom}]{1-1}{\xdef\PfCMentaloDeuxiemeTerme{\fpeval{randint(\useKV[Mentalo]{ValeurMin},\useKV[Mentalo]{ValeurMax})}}% + \PfCNum{\PfCMentaloDeuxiemeTerme}}&\Block[borders={top,bottom}]{1-1}{$=$}&\Block[borders={top,bottom}]{1-1}{\pointilles[20pt]}&% + \Block[borders={top,right,bottom}]{1-\fpeval{##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{##1}}}\do{&}% + \Block{1-\fpeval{\PfCMentaloEtages-##1}}{~}\xintFor* ##2 in{\xintSeq{1}{\fpeval{\PfCMentaloEtages-##1}}}\do{&}% + &&&&\Block{1-2}{% + \xintifboolexpr{\PfCMentaloListeOperationslen==1}{% + \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[1]\PfCMentaloDeuxiemeTerme}} + }{% + \num{\fpeval{\PfCMentaloPremierTerme\PfCMentaloListeOperations[##1]\PfCMentaloDeuxiemeTerme}} + }% + }&\\ + }% + \Block[draw,fill=gray!15]{1-\fpeval{2*\PfCMentaloEtages+5}}{Départ}\xintFor* ##2 in{\xintSeq{1}{\fpeval{2*\PfCMentaloEtages+5}}}\do{&}\\% + \CodeAfter + \tikz\draw[dashed] (1-|\fpeval{5+5+2+2*\PfCMentaloEtages-2})--(last-|\fpeval{5+5+2+2*\PfCMentaloEtages-2}); + \end{NiceTabular} + }% }%
\ No newline at end of file diff --git a/macros/latex/contrib/profcollege/latex/ProfCollege.sty b/macros/latex/contrib/profcollege/latex/ProfCollege.sty index de1b3c5da0..a7af54cbf8 100644 --- a/macros/latex/contrib/profcollege/latex/ProfCollege.sty +++ b/macros/latex/contrib/profcollege/latex/ProfCollege.sty @@ -2,9 +2,9 @@ % licence : Released under the LaTeX Project Public License v1.3c % or later, see http://www.latex-project.org/lppl.txtf \NeedsTeXFormat{LaTeX2e}% -\def\filedate{2023/08/15}% +\def\filedate{2023/08/16}% \let\PfCfiledate\filedate% -\def\fileversion{0.99-z-r}% +\def\fileversion{0.99-z-s}% \let\PfCfileversion\fileversion% \ProvidesPackage{ProfCollege}[\filedate\space v\fileversion\space Aide pour utiliser LaTeX au college]% @@ -573,6 +573,7 @@ }%\emoticon }%\raisebox }% +\input{PfCDefiCalc} \input{PfCMulArt} \input{PfCGrimuku} \input{PfCHorloge} diff --git a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp index 633b3ab6a7..daae0553f7 100644 --- a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp +++ b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp @@ -168,6 +168,7 @@ vardef Test(expr cptk)(text cptnt)= elseif substring(cptk,cptk+1) of cptnt="&":draw Affichage("00000100001100011100110001000000000") shifted(Decalage); elseif substring(cptk,cptk+1) of cptnt="$":draw Affichage("00000000000000100001000010000111111") shifted(Decalage); elseif substring(cptk,cptk+1) of cptnt="^":draw Affichage("00100010101000100000000000000000000") shifted(Decalage); + elseif substring(cptk,cptk+1) of cptnt="_":draw Affichage("11111111111111111111111111111111111") shifted(Decalage); fi; enddef; @@ -178,10 +179,12 @@ vardef LCD(text nt)(text rep)(expr NB)= Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1))); fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi; draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi; + if length(nt)>0: for k=0 upto length(nt)-1: BlocAffichage; Test(k,nt); endfor; + fi; for k=1 upto NB: nblignes:=nblignes+1; Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1))); diff --git a/macros/latex/contrib/zref-vario/CHANGELOG.md b/macros/latex/contrib/zref-vario/CHANGELOG.md index 876440be3e..ac681c2740 100644 --- a/macros/latex/contrib/zref-vario/CHANGELOG.md +++ b/macros/latex/contrib/zref-vario/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog -## [Unreleased](https://github.com/gusbrs/zref-vario/compare/v0.1.8...HEAD) +## [Unreleased](https://github.com/gusbrs/zref-vario/compare/v0.1.9...HEAD) + +## [v0.1.9](https://github.com/gusbrs/zref-vario/compare/v0.1.8...v0.1.9) (2023-08-15) + +### Changed +- `zref-vario` no longer delays the loading of `varioref`. So there's no + longer need to load the latter separately but, on the other hand, + `zref-vario` becomes subject to the same load order restrictions as + `varioref`. +- Use `\label` instead of `\zlabel` in regression tests. ## [v0.1.8](https://github.com/gusbrs/zref-vario/compare/v0.1.7...v0.1.8) (2023-06-14) diff --git a/macros/latex/contrib/zref-vario/zref-vario-code.pdf b/macros/latex/contrib/zref-vario/zref-vario-code.pdf Binary files differindex b035eabb67..a27a211487 100644 --- a/macros/latex/contrib/zref-vario/zref-vario-code.pdf +++ b/macros/latex/contrib/zref-vario/zref-vario-code.pdf diff --git a/macros/latex/contrib/zref-vario/zref-vario-doc.pdf b/macros/latex/contrib/zref-vario/zref-vario-doc.pdf Binary files differindex 0119708112..df0b0813a2 100644 --- a/macros/latex/contrib/zref-vario/zref-vario-doc.pdf +++ b/macros/latex/contrib/zref-vario/zref-vario-doc.pdf diff --git a/macros/latex/contrib/zref-vario/zref-vario-doc.tex b/macros/latex/contrib/zref-vario/zref-vario-doc.tex index 0923b299ae..0adfee69b2 100644 --- a/macros/latex/contrib/zref-vario/zref-vario-doc.tex +++ b/macros/latex/contrib/zref-vario/zref-vario-doc.tex @@ -139,11 +139,9 @@ As usual: \usepackage{zref-vario} \end{zvexample} -\pkg{zref-vario} loads \pkg{zref-clever}, and will load \pkg{varioref} at -\texttt{begindocument/before}, if it hasn't already been loaded. However, -considering \pkg{varioref} has known load order interaction with other -packages, prominently with \pkg{hyperref}, you may wish to load it explicitly -to ensure its load order requirements are met. +\pkg{zref-vario} requires \pkg{zref-clever} and \pkg{varioref}. As a result, +\pkg{zref-vario} is subject to the same load order requirements as +\pkg{varioref}, prominently in relation to \pkg{hyperref}. \section{Package options} @@ -345,6 +343,8 @@ generously provided by (in chronological order): % 2023-01-02: https://github.com/gusbrs/zref-vario/issues/1 Ulrike Fischer, % 2023-01-02: https://tex.stackexchange.com/q/670399 (comments) + % 2023-08-04: https://chat.stackexchange.com/transcript/message/64125129#64125129 + % and following discussion. David Carlisle, % 2023-01-02: https://chat.stackexchange.com/transcript/message/62684358#62684358 % and following discussion. diff --git a/macros/latex/contrib/zref-vario/zref-vario.dtx b/macros/latex/contrib/zref-vario/zref-vario.dtx index e029af643c..0be32b12bf 100644 --- a/macros/latex/contrib/zref-vario/zref-vario.dtx +++ b/macros/latex/contrib/zref-vario/zref-vario.dtx @@ -133,24 +133,17 @@ % % Identify the package. % \begin{macrocode} -\ProvidesExplPackage {zref-vario} {2023-06-14} {0.1.8} +\ProvidesExplPackage {zref-vario} {2023-08-15} {0.1.9} {Extended LaTeX page cross-references with varioref and zref-clever} % \end{macrocode} % % -% Required packages. The loading of \pkg{varioref} is delayed until -% \texttt{begindocument/before} since it has potential load order issues -% (e.g.\ with \pkg{hyperref}) so, ideally, it should be explicitly loaded by -% the user (and the manual recommends it). But we do it, if it hasn't been -% done. -% -% Note that \pkg{zref-clever} \texttt{v0.2.0-alpha}, from 2022-01-28, requires -% a kernel 2021-11-15 or newer. +% Required packages. Note that \pkg{zref-clever} \texttt{v0.2.0-alpha}, from +% 2022-01-28, requires a kernel 2021-11-15 or newer. % % \begin{macrocode} \RequirePackage { zref-clever } [ 2022-01-28 ] % v0.2.0-alpha -\AddToHook { begindocument/before } - { \RequirePackage { varioref } } +\RequirePackage { varioref } % \end{macrocode} % % Also note that, contrary to \pkg{zref-clever}, \pkg{zref-vario} is diff --git a/macros/luatex/latex/luatruthtable/README.txt b/macros/luatex/latex/luatruthtable/README.txt index 60217b2ce6..3e6ca97d21 100644 --- a/macros/luatex/latex/luatruthtable/README.txt +++ b/macros/luatex/latex/luatruthtable/README.txt @@ -1,3 +1,8 @@ +# The luatruthtable package +# version 1.2 +# Authors: Chetan Shirore and Ajit Kumar +# Email: mathsbeauty@gmail.com + # Introduction The luatruthtable package is developed to generate Truth Tables of boolean values in LaTeX. It provides an easy way for generating truth tables in LaTeX . There is no need of special environment in the package for generation of Truth Tables. It is written in lua and tex file is to be compiled with LuaLatex engine. The time required for operations is no issue while compiling with LuaLaTeX. There is no need to install lua on users system as tex distributions (TeXLive or MikTeX) come bundled with LuaLaTeX. It is useful for generation of Truth Tables in tex file itself. The package supports nesting of commands for multiple operations. It can be modified or extended by writing custom lua programs. diff --git a/macros/luatex/latex/luatruthtable/luatruthtable.bib b/macros/luatex/latex/luatruthtable/luatruthtable.bib index 81ee09ad4d..c091f4d379 100644 --- a/macros/luatex/latex/luatruthtable/luatruthtable.bib +++ b/macros/luatex/latex/luatruthtable/luatruthtable.bib @@ -1,13 +1,9 @@ - - - @online{online.latextruthtable, title = {Macro for automating truth tables in LaTeX}, url = {https://tex.stackexchange.com/questions/505994}, note = {visited on 2022-02-22} } - @online{online.luacustomoperator, title = {Lua Custom Operator}, url = {http://lua-users.org/wiki/CustomOperators}, @@ -17,4 +13,3 @@ - diff --git a/macros/luatex/latex/luatruthtable/luatruthtable.pdf b/macros/luatex/latex/luatruthtable/luatruthtable.pdf Binary files differindex 3e8a60bf51..bdc5afdfdc 100644 --- a/macros/luatex/latex/luatruthtable/luatruthtable.pdf +++ b/macros/luatex/latex/luatruthtable/luatruthtable.pdf diff --git a/macros/luatex/latex/luatruthtable/luatruthtable.sty b/macros/luatex/latex/luatruthtable/luatruthtable.sty index 7f57bbe254..c839b98700 100644 --- a/macros/luatex/latex/luatruthtable/luatruthtable.sty +++ b/macros/luatex/latex/luatruthtable/luatruthtable.sty @@ -1,9 +1,9 @@ -% luaset package -% version 1.1 +% The luatruthtable package +% Authors: Chetan Shirore and Ajit Kumar +% Version 1.2, Date=15-Aug-2023 % Licensed under LaTeX Project Public License v1.3c or later. The complete license text is available at http://www.latex-project.org/lppl.txt. -%Authors: Chetan Shirore and Dr. Ajit Kumar -\ProvidesPackage{luatruthtable}[1.1] +\ProvidesPackage{luatruthtable}[1.2] \RequirePackage{xkeyval} \RequirePackage{amsmath} \RequirePackage{luacode} @@ -263,6 +263,8 @@ local res="" local sep=" & " trtext = trtext or "$T$" fltext = fltext or "$F$" +local str0 = string.gsub(str0, "%s+", "") +local str = string.gsub(str, "%s+", "") for variables in string.gmatch(str0, '([^,]+)') do vars[countvars] = variables countvars = countvars + 1 @@ -276,16 +278,14 @@ 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 .."\\\\" +eval = table.concat(toBinary(i,n)," & ") .. res .."\\\\" ..eval else eval = eval .. table.concat(toBinary(i,n)," & ") .. res end @@ -305,14 +305,14 @@ end \end{luacode*} % ========= KEY DEFINITIONS ========= -\define@key{luatruthtable}{trtext}{\def\luatrtbl@trtext{#1}} -\define@key{luatruthtable}{fltext}{\def\luatrtbl@fltext{#1}} +\define@key{luatruthtable}{trtext}{\def\luatrtbl@trtext{#1}}% +\define@key{luatruthtable}{fltext}{\def\luatrtbl@fltext{#1}}% % ========= KEY DEFAULTS ========= \setkeys{luatruthtable}{trtext=$T$,fltext=$F$}% % ========= Defining Command ========= \newcommand{\luaTruthTable}[3][]{% - \setkeys{luatruthtable}{#1} + \setkeys{luatruthtable}{#1}% \directlua{tex.sprint(truthTable(\luastringN{#2},\luastringN{#3},'\luatrtbl@trtext','\luatrtbl@fltext'))}} % \endinput diff --git a/macros/luatex/latex/luatruthtable/luatruthtable.tex b/macros/luatex/latex/luatruthtable/luatruthtable.tex index f50267f6f8..851814bbf9 100644 --- a/macros/luatex/latex/luatruthtable/luatruthtable.tex +++ b/macros/luatex/latex/luatruthtable/luatruthtable.tex @@ -1,7 +1,8 @@ \documentclass{article} -\usepackage{listings,color,parskip,booktabs,longtable,array, +\usepackage{listings,color,booktabs,longtable,array, hyperref,multirow,multicol,luatruthtable, enumitem} \usepackage[top=1.1in, bottom=1.1in, left=1in, right=1in]{geometry} +\renewcommand{\arraystretch}{1.2} \hypersetup{colorlinks,urlcolor=blue} \lstset{frame=none, language=[LaTeX]{TeX}, @@ -20,34 +21,35 @@ hyperref,multirow,multicol,luatruthtable, enumitem} \usepackage[backend=bibtex]{biblatex} \addbibresource{luatruthtable} \begin{document} -\title{luatruthtable Package} -\author{Chetan Shirore and Dr. Ajit Kumar} +\title{The luatruthtable Package} +\author{Chetan Shirore\thanks{Email id: mathsbeauty@gmail.com} \space and Ajit Kumar} \maketitle -\section{luatruthtable Package} -The \emph{luatruthtable} package is developed to generate Truth Tables of boolean values in LaTeX. It provides an easy way for generating truth tables in LaTeX . There is no need of special environment in the package for generation of Truth Tables. It is written in lua and tex file is to be compiled with LuaLatex engine. The time required for operations is no issue while compiling with LuaLaTeX. There is no need to install lua on users system as tex distributions (TeXLive or MikTeX) come bundled with LuaLaTeX. It is useful for generation of Truth Tables in tex file itself. The package supports nesting of commands for multiple operations. It can be modified or extended by writing custom lua programs. +\section{The luatruthtable Package} +The \verb|luatruthtable| package is developed to generate Truth Tables of boolean values in LaTeX. It provides an easy way for generating truth tables in LaTeX . There is no need of special environment in the package for generation of Truth Tables. It is written in lua and tex file is to be compiled with LuaLatex engine. The time required for operations is no issue while compiling with LuaLaTeX. There is no need to install lua on users system as tex distributions (TeXLive or MikTeX) come bundled with LuaLaTeX. It is useful for generation of Truth Tables in tex file itself. The package supports nesting of commands for multiple operations. It can be modified or extended by writing custom lua programs. -The progamming capabilities of Lua are effectively used in the development of pacakage. The other approaches of generating Truth Table in LaTeX get weired \cite{online.latextruthtable} and probably without using Lua it can't be done in an easier way in LaTeX. The \emph{xkeyval} package is used in its development apart from the \emph{luacode*} package. +The programming capabilities of Lua are effectively used in the development of pacakage. The other approaches of generating Truth Table in LaTeX get weired \cite{online.latextruthtable} and probably without using Lua it can't be done in an easier way in LaTeX. The \emph{xkeyval} package is used in its development apart from the \emph{luacode*} package. -\section{License} The \emph{luatruthtable} package is released under the LaTeX Project Public License v1.3c or later. The complete license text is available at \url{http://www.latex-project.org/lppl.txt}. +\section{License} The \verb|luatruthtable| package is released under the LaTeX Project Public License v1.3c or later. The complete license text is available at \url{http://www.latex-project.org/lppl.txt}. It is developed in lua. Lua is certified open source software available. Its license is simple and liberal which is compatible with GPL. \section{Installation and Inclusion} -The installation of \emph{luatruthtable} package is similar to plain latex package where \texttt{.sty} file is in \LaTeX directory of texmf tree. The package can be used by including the command \texttt{\textbackslash usepackage\{luatruthtable\}} in the preamble of latex document. The tex file is to be compiled using the LuaLaTeX engine. +The installation of \verb|luatruthtable| package is similar to plain latex package where \texttt{.sty} file is in LaTeX directory of texmf tree. The package can be used by including the command \verb|\luatruthtable| in the preamble of latex document. The tex file is to be compiled using the LuaLaTeX engine. \section{Core Ideas used in the development of the package} The function \verb|toBinary(x,y)| is used to produce sequence of \emph{True} and \emph{False} values of boolean variables. This function converts the decimal number \verb|x| to a binary number by adding \verb|y| number of leading zeroes. The result of this is stored in a table in Lua. Here \verb|y| corresponds to number of boolean variables. As \(2^y\) permutations of boolean variables are to be produced, the function \verb|toBinary(x,y)| runs inside a loop where \verb|x| takes values from \(1\) to \(y\). The splitting of variables and expressions is done using string methods available in Lua. The nested \emph{metamethods} in Lua are used to define several logical operators. The \emph{load} function in Lua is used to evaluate logical expressions. -\section{Command luaTruthTable in luatruthtable package} +\section{The luaTruthTable command} The \verb|\luaTruthTable| command is the main command in the \emph{luatruthtable} package which generates truth tables. It has the following syntax. -\begin{lstlisting} -\luaTruthTable[trtext,fltext]{list of boolean / logical variables}{list of expressions} +\begin{lstlisting}[caption={[]}] +\luaTruthTable[trtext,fltext]{list of boolean/logical variables} +{list of expressions} \end{lstlisting} The command has two mandatory arguments. \\ -i) \verb|list of boolean / logical variables| : The list of boolean or logical variables should be separated by comma. \\ -ii) \verb|list of expressions| : The list of logical expressions that are to be evaluated should be separated by comma. \\ +i) \verb|list of boolean / logical variables| : The list of boolean or logical variables should be separated by a comma. \\ +ii) \verb|list of expressions| : The list of logical expressions that are to be evaluated should be separated by a comma. \\ The command has two optional arguments. \\ i) \verb|trtext| : The \verb|trtext| is the display value for the boolean value \emph{True}. It has the default value \verb|$T$| in the package. It can be any string or number. Assigning value \(0\) should be avoided to \verb|trtext| variable. \\ ii) \verb|fltext| : The \verb|fltext| is the display value for the boolean value \emph{False}. It has the default value \verb|$F$| in the package. It can be any string or number. Assigning value \(1\) should be avoided to \verb|fltext| variable. -The \verb|\luaTruthTable| command should be used within in the environment \verb|\begin{tabular} ... \end{tabular}| or any other environment in LaTeX for Tables. The sequence of column heads should be same as sequence of \verb|list of boolean / logical variables| and \verb|list of expressions|. Without these correct inputs, the command \verb|\luaTruthTable| can't produce the expected output. +The \verb|\luaTruthTable| command should be used within in the environment \verb|\begin{tabular} ... \end{tabular}| or any other environment in LaTeX for tables. The sequence of column heads should be same as sequence of \verb|list of boolean/logical variables| and \verb|list of expressions|. Without these correct inputs, the command \verb|\luaTruthTable| can not produce the desired output. -\section{Operations in luatruthtable package} +\section{Operations in the luatruthtable package} \begin{enumerate}[label=\alph*)] \item \emph{not}: The value of \emph{ not p} is False when \(p\) is True and it is True when \(p\) is False. \begin{center} @@ -157,200 +159,142 @@ The command \verb|*lognor*| is used in the package to generate truth table for The command \verb|*logxnor*| is used in the package to generate truth table for \emph{XNOR} operation. \end{enumerate} -The following table summarises logical operators in the package. +Table \ref{tbl:truthop} describes operators in the \verb|luatruthtable| package. \begin{center} -\begin{longtable}{llm{8cm}} +\begin{longtable}{llm{9cm}} \toprule \multicolumn{1}{c}{\textcolor{blue}{Operator}} & \multicolumn{1}{l}{\textcolor{blue}{Syntax}} & \multicolumn{1}{c}{\textcolor{blue}{Description}} \\ \toprule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] lognot* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] lognot*p -\end{lstlisting} & Negates the boolean variable \(p\)\\ +\end{lstlisting} & Negates the boolean variable \(p\).\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *logand* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*logand*q -\end{lstlisting} & Gives the truth of the expression \emph{p and q} for boolean variables \(p\) and \(q\).\\ +\end{lstlisting} & Gives the truth value of the expression \emph{p and q}.\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *logor* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*logor*q -\end{lstlisting} & Gives the truth of the expression \emph{p or q} for boolean variables \(p\) and \(q\).\\ +\end{lstlisting} & Gives the truth value of the expression \emph{p or q}.\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *imp* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*imp*q -\end{lstlisting} & Gives the truth of the expression \emph{if p then q} for boolean variables \(p\) and \(q\).\\ +\end{lstlisting} & Gives the truth value of the expression \emph{if p then q}.\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *iff* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*iff*q -\end{lstlisting} & Gives the truth of the expression \emph{p if and only if q} for boolean variables \(p\) and \(q\).\\ +\end{lstlisting} & Gives the truth value of the expression \emph{p if and only if q}.\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *lognand* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*lognand*q -\end{lstlisting} & Gives the truth of the expression \emph{ p NAND q} for boolean variables \(p\) and \(q\).\\ +\end{lstlisting} & Gives the truth value of the expression \emph{ p NAND q}.\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *logxor* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*logxor*q -\end{lstlisting} & Gives the truth of the expression \emph{ p XOR q} for boolean variables \(p\) and \(q\).\\ +\end{lstlisting} & Gives the truth value of the expression \emph{ p XOR q}.\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *lognor* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*lognor*q -\end{lstlisting} & Gives the truth of the expression \emph{ p NOR q} for boolean variables \(p\) and \(q\).\\ +\end{lstlisting} & Gives the truth value of the expression \emph{ p NOR q}.\\ \midrule -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] *logxnor* \end{lstlisting} & -\begin{lstlisting} +\begin{lstlisting}[caption={[]}] p*logxnor*q -\end{lstlisting} & Gives the truth of the expression \emph{ p XNOR q} for boolean variables \(p\) and \(q\).\\ - -\bottomrule +\end{lstlisting} & Gives the truth value of the expression \emph{ p XNOR q}.\\ +\bottomrule \\ +\caption{Operators in the luatruthtable package} +\label{tbl:truthop} \end{longtable} \end{center} -\section{Examples and Usage} The \emph{luatruthtable} package can accept finite number of variables. It supports finite number of variables that one would practically need. Few examples of usage are given here. -\begin{lstlisting} +\section{Illustrations of commands in the luatruthtable package}\label{illtruth} + +The \emph{luatruthtable} package can accept a finite number of variables. It supports a finite number of variables that one would need. + +\begin{lstlisting}[label={code:illluatruth}, caption={LaTeX document with luatruthtable package}] \begin{tabular}{|cc|c|c|c|c|c|c|c|c|c|} \hline \(p\) & \(q\) & \(\neg p\) & \(p \land q\) & \(p\lor q\) & \(p \rightarrow q\) & \(p \leftrightarrow q\) & \( p\) nand \(q\) & \(p\) xor \(q\) & \( p\) nor \(q\) & \(p\) xnor \(q\) \\ \hline -\luaTruthTable{p,q}{lognot*p,p*logand*q, p*logor*q, p*imp*q, p*iff*q, -p*lognand*q, p*logxor*q, p*lognor*q, p*logxnor*q } \\ +\luaTruthTable{p,q}{lognot*p, p*logand*q, p*logor*q, p*imp*q, p*iff*q, +p*lognand*q, p*logxor*q, p*lognor*q, p*logxnor*q } \\ \hline \end{tabular} -\end{lstlisting} -With the packages \emph{luatruthtable},the above code outputs to -\ \\ \ \\ +\end{lstlisting} + +The LaTeX code (Listing \ref{code:illluatruth}) generates the output shown in Table \ref{tbl:luatruthtbl}. +\begin{table}[h] +\centering \begin{tabular}{|cc|c|c|c|c|c|c|c|c|c|} \hline \(p\) & \(q\) & \(\neg p\) & \(p \land q\) & \(p\lor q\) & \(p \rightarrow q\) & \(p \leftrightarrow q\) & \( p\) nand \(q\) & \(p\) xor \(q\) & \( p\) nor \(q\) & \(p\) xnor \(q\) \\ \hline -\luaTruthTable{p,q}{lognot*p,p*logand*q, p*logor*q, p*imp*q, p*iff*q, -p*lognand*q, p*logxor*q, p*lognor*q, p*logxnor*q } \\ -\hline -\end{tabular} -\ \\ \\ -The following is the code generated by the command \verb|\luaTruthTable| in above code. - \begin{lstlisting} -$F$ & $T$ & $T$ & $F$ & $T$ & $T$ & $F$ & $T$ & $T$ & $F$ & $F$\\ -$T$ & $F$ & $F$ & $F$ & $T$ & $F$ & $F$ & $T$ & $T$ & $F$ & $F$\\ -$T$ & $T$ & $F$ & $T$ & $T$ & $T$ & $T$ & $F$ & $F$ & $F$ & $T$\\ -$F$ & $F$ & $T$ & $F$ & $F$ & $T$ & $T$ & $T$ & $F$ & $T$ & $T$ - \end{lstlisting} - The following example illustrates the use use of \emph{trtext} and \emph{fltext}. Here \(0\) is assigned to \emph{trtext} and \(1\) is assigned to \emph{fltext}. - \begin{lstlisting} - \begin{tabular}{|cc|c|c|c|c|c|c|c|c|c|} -\hline -\(p\) & \(q\) & \(\neg p\) & \(p \land q\) & \(p\lor q\) & \(p \rightarrow q\) - & \(p \leftrightarrow q\) & \( p\) nand \(q\) & \(p\) xor \(q\) & \( p\) nor \(q\) & \(p\) xnor \(q\) \\ -\hline -\luaTruthTable[trtext=$1$,fltext=$0$]{p,q}{lognot*p,p*logand*q, p*logor*q, p*imp*q, p*iff*q, -p*lognand*q, p*logxor*q, p*lognor*q, p*logxnor*q } \\ -\hline -\end{tabular} - \end{lstlisting} - - With the packages \emph{luatruthtable},the above code outputs to -\ \\ \ \\ - \begin{tabular}{|cc|c|c|c|c|c|c|c|c|c|} -\hline -\(p\) & \(q\) & \(\neg p\) & \(p \land q\) & \(p\lor q\) & \(p \rightarrow q\) - & \(p \leftrightarrow q\) & \( p\) nand \(q\) & \(p\) xor \(q\) & \( p\) nor \(q\) & \(p\) xnor \(q\) \\ -\hline -\luaTruthTable[trtext=$1$,fltext=$0$]{p,q}{lognot*p,p*logand*q, p*logor*q, p*imp*q, p*iff*q, -p*lognand*q, p*logxor*q, p*lognor*q, p*logxnor*q } \\ -\hline -\end{tabular} -\ \\ \\ -The following is the code generated by the command \verb|\luaTruthTable| in above code. -\begin{lstlisting} -$0$ & $1$ & $1$ & $0$ & $1$ & $1$ & $0$ & $1$ & $1$ & $0$ & $0$\\ -$1$ & $0$ & $0$ & $0$ & $1$ & $0$ & $0$ & $1$ & $1$ & $0$ & $0$\\ -$1$ & $1$ & $0$ & $1$ & $1$ & $1$ & $1$ & $0$ & $0$ & $0$ & $1$\\ -$0$ & $0$ & $1$ & $0$ & $0$ & $1$ & $1$ & $1$ & $0$ & $1$ & $1$ -\end{lstlisting} -The following example involves three variables. -\begin{lstlisting} -\begin{tabular}{|ccc|c|} -\hline -\(p\) & \(q\) & \(r\) & \((p \land q)\) \rightarrow \(\neg r\) \\ -\hline -\luaTruthTable{p,q,r}{(p*logand*q) *imp* (lognot*r)} \\ +\luaTruthTable{p,q}{lognot*p, p*logand*q, p*logor*q, p*imp*q, p*iff*q, +p*lognand*q, p*logxor*q, p*lognor*q, p*logxnor*q } \\ \hline \end{tabular} -\end{lstlisting} - With the packages \emph{luatruthtable},the above code outputs to -\ \\ \ \\ -\begin{tabular}{|ccc|c|} + \caption{Example 1} + \label{tbl:luatruthtbl} + \end{table} + + +\begin{lstlisting}[label={code:illluatruth2}, caption={LaTeX document with luatruthtable package}] +\begin{tabular}{|cccc|c|} \hline -\(p\) & \(q\) & \(r\) & \((p \land q)\) \rightarrow \(\neg r\) \\ +\(p\) & \(q\) & \( r\) & \(s\) & \(((p\land q) \rightarrow \neg r) \land s \) \\ \hline -\luaTruthTable{p,q,r}{(p*logand*q) *imp* (lognot*r)} \\ +\luaTruthTable{p,q,r,s}{((p*logand*q)*imp*(lognot*r))*logand*s } \\ \hline \end{tabular} -\ \\ \\ -Here \emph{lognot*r} should be enclosed in parenthesis in order to produce correct results in generated truth table. -\ \\ -The following is the code generated by the command \verb|\luaTruthTable| in above code. -\begin{lstlisting} -$F$ & $F$ & $T$ & $T$\\ -$F$ & $T$ & $F$ & $T$\\ -$F$ & $T$ & $T$ & $T$\\ -$T$ & $F$ & $F$ & $T$\\ -$T$ & $F$ & $T$ & $T$\\ -$T$ & $T$ & $F$ & $T$\\ -$T$ & $T$ & $T$ & $F$\\ -$F$ & $F$ & $F$ & $T$ -\end{lstlisting} -With the use of optional arguments \verb|[trtext=True, fltext=False]| in the previous example, one gets the following output. -\ \\ \ \\ \ \\ -\begin{tabular}{|ccc|c|} +\end{lstlisting} + +The LaTeX code (Listing \ref{code:illluatruth2}) generates the output shown in Table \ref{tbl:luatruthtbl2}. +\begin{table}[h] +\centering +\begin{tabular}{|cccc|c|} \hline -\(p\) & \(q\) & \(r\) & \((p \land q)\) \rightarrow \(\neg r\) \\ +\(p\) & \(q\) & \( r\) & \(s\) & \(((p\land q) \rightarrow \neg r) \land s \) \\ \hline -\luaTruthTable[trtext=True, fltext=False]{p,q,r}{(p*logand*q) *imp* (lognot*r)} \\ +\luaTruthTable{p,q,r,s}{((p*logand*q)*imp*(lognot*r))*logand*s } \\ \hline \end{tabular} -\ \\ \\ + \caption{Example 2} + \label{tbl:luatruthtbl2} + \end{table} + + -It is possible to input \emph{trtext} and \emph{trfalse} in mathematics environment. So with the use of optional arguments \verb|[trtext=$True$, fltext=$False$]| in the previous example, one gets the following output. -\ \\ \ \\ \ \\ -\begin{tabular}{|ccc|c|} -\hline -\(p\) & \(q\) & \(r\) & \((p \land q)\) \rightarrow \(\neg r\) \\ -\hline -\luaTruthTable[trtext=$True$, fltext=$False$]{p,q,r}{(p*logand*q) *imp* (lognot*r)} \\ -\hline -\end{tabular} -\ \\ \ \\ \ \\ -Since \emph{luacode*} package is used, the backslash is to be escaped while assigning values to \emph{trtext} and \emph{trfalse}. For example \verb|[trtext=\\(True\\), fltext=\\(False\\)]| -\section{Known Issues,Limitations and Scope of the package} The associativity and precedence of operator is not yet supported. The package can give appropriate results only when parentheses are used for each of the operation. It gives eraneous result when parentheses are not used. This point is of utmost importance in using the package. These issues are there is no native way of defining custom operations in Lua \cite{online.luacustomoperator}. However some metamethods can be nested in a way to glimpse the operators. All operators defined in this package are instances of such nestings. The question may be raised that is there better way of accomplishing this in Lua. The answer to the point is that there are alternative ways of doing this. They may be better in some or other sense. For example, instead of defining \emph{*logand*} operator and using it in the fashion \emph{p*logand*q}, one could define function \emph{logand} that takes two arguments and use it in a way \emph{logand(p,q)}. But when it comes to embedding it in LaTeX, again one has to use more and more nested parentheses as number of statements and operations increase. This is the exact reason why such approach is not used in the development of package. Instead of using \emph{implies(logand(p,logor(q,r)),s)} it sounds more natural to use \emph{(p *logand* (q*logor*r) )*implies* s}. +\section{Known Issues, Limitations and Scope of the package} The associativity and precedence of operator is not yet supported. The package can give appropriate results only when parentheses are used for each of the operation. It gives eraneous result when parentheses are not used. This point is of utmost importance in using the package. These issues are there is no native way of defining custom operations in Lua \cite{online.luacustomoperator}. However some metamethods can be nested in a way to glimpse the operators. All operators defined in this package are instances of such nestings. The question may be raised that is there better way of accomplishing this in Lua. The answer to the point is that there are alternative ways of doing this. They may be better in some or other sense. For example, instead of defining \emph{*logand*} operator and using it in the fashion \emph{p*logand*q}, one could define function \emph{logand} that takes two arguments and use it in a way \emph{logand(p,q)}. But when it comes to embedding it in LaTeX, again one has to use more and more nested parentheses as number of statements and operations increase. This is the exact reason why such approach is not used in the development of package. Instead of using \emph{implies(logand(p,logor(q,r)),s)} it sounds more natural to use \emph{(p *logand* (q*logor*r) )*implies* s}. Apart from these issues, there is no error handling mechanism used in the package. It relies on the error handling of Lua and TeX itself. The package currently supports 9 operations viz. \emph{not,and,nand,or, xor, implies, iff, nor, xnor}. The error handling and extending number of operations may be considered in future versions of the package. |