texlive[65142] Master/texmf-dist: eolang (29nov22)

commits+karl at tug.org commits+karl at tug.org
Tue Nov 29 22:09:05 CET 2022


Revision: 65142
          http://tug.org/svn/texlive?view=revision&revision=65142
Author:   karl
Date:     2022-11-29 22:09:04 +0100 (Tue, 29 Nov 2022)
Log Message:
-----------
eolang (29nov22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/eolang/eolang.pdf
    trunk/Master/texmf-dist/source/latex/eolang/eolang.dtx
    trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty

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

Modified: trunk/Master/texmf-dist/source/latex/eolang/eolang.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/eolang/eolang.dtx	2022-11-29 21:08:43 UTC (rev 65141)
+++ trunk/Master/texmf-dist/source/latex/eolang/eolang.dtx	2022-11-29 21:09:04 UTC (rev 65142)
@@ -50,7 +50,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{eolang}
 %<*package>
-[2022-11-28 0.7.1 Formulas and Graphs for EO Programming Language]
+[2022-11-29 0.8.0 Formulas and Graphs for EO Programming Language]
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
@@ -251,11 +251,25 @@
 % \DescribeMacro{\phic}
 % \DescribeMacro{\xmir}
 % There is also a no-argument command |\eolang| to help you print the name of
-% \eolang{} language. It understands the |anonymous| mode of \href{https://ctan.org/pkg/acmart}{acmart} and prints itself
+% \eolang{} language. It understands the |anonymous| package option and prints itself
 % differently, to double-blind your paper. There is also |\phic| command to print
 % the name of \phic{}, also sensitive to |anonymous| mode. The macro |\xmir| prints "XMIR".
-% \docshotOptions{firstline=4,lastline=10}
+% \docshotOptions{firstline=3,lastline=10}
 % \begin{docshot}
+% \documentclass{acmart}
+% \thispagestyle{empty}
+% \usepackage[anonymous]{eolang}
+% \begin{document}
+% In our research we use \eolang{}, \\
+% an experimental object-oriented \\
+% dataflow language, \phic{}, as its \\
+% formal foundation, and \xmir{} --- \\
+% its XML-based presentation.
+% \end{document}
+% \end{docshot}
+% Without the |anonymous| option there will be no orange color:
+% \docshotOptions{firstline=3,lastline=10}
+% \begin{docshot}
 % \documentclass[anonymous]{acmart}
 % \thispagestyle{empty}
 % \usepackage{eolang}
@@ -377,6 +391,18 @@
 %</verb>
 %\fi
 
+% \DescribeMacro{anonymous}
+% You may anonymize |\eolang|, |\XMIR|, and |\phic| commands by using |anonymous| package option:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\usepackage[anonymous]{eolang}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+
 % \section{More Examples}
 
 % The |phiquation| environment treats ends of line as signals to start
@@ -633,6 +659,7 @@
 % Then, we process package options:
 % \changes{0.1.0}{2022/10/26}{Parsing of package options introduced.}
 % \changes{0.6.0}{2022/11/14}{Package option \texttt{nocomments} added in order to enable comments suppression in temporary \texttt{.tex} files (may be pretty important for \texttt{.dtx} documents).}
+% \changes{0.8.0}{2022/11/29}{The \texttt{anonymous} package option added.}
 %    \begin{macrocode}
 \RequirePackage{pgfopts}
 \RequirePackage{ifluatex}
@@ -642,9 +669,10 @@
   tmpdir/.store in=\eolang at tmpdir,
   tmpdir/.default=_eolang\ifxetex-xe\else\ifluatex-lua\fi\fi,
   nocomments/.store in=\eolang at nocomments,
+  anonymous/.store in=\eolang at anonymous,
   tmpdir
 }
-\ProcessPgfOptions{/eolang}
+\ProcessPgfPackageOptions{/eolang}
 %    \end{macrocode}
 
 % Then, we make a directory where all temporary files will be kept:
@@ -766,11 +794,11 @@
   $tex =~ s/([^&\s])\s{2}([^\s])/\1 \2/g;
   $tex =~ s/\s{2}/ \\quad{}/g;
   $tex = '&' . $tex;
-  my $lead = '[^\s]+\s(->|:=|=)';
+  my $lead = '[^\s]+\s(?:->|:=|=)';
   my @leads = $tex =~ /&${lead}/g;
   my @eols = $tex =~ /&/g;
-  if (0+ at leads == 0+ at eols && 0+ at eols > 0) {
-    $tex =~ s/&${lead}/\1&/g;
+  if (0+ at leads == 0+ at eols && 0+ at eols > 1) {
+    $tex =~ s/&(${lead})/\1&/g;
     $gathered = 0;
 	  print '% The "gathered" is NOT used because all ' .
 	    (0+ at eols) . ' lines are ' . (0+ at leads) . " leads\n";
@@ -853,6 +881,7 @@
     {\eolang at tmpdir/\jobname/phiquation.tex}}%
   \iexec[null]{cp "\eolang at tmpdir/\jobname/phiquation.tex"
     "\eolang at tmpdir/\jobname/\hash.tex"}%
+  \message{Start parsing 'phi' at line no. \the\inputlineno^^J}
   \iexec[trace,stdout=\eolang at tmpdir/\jobname/\hash-post.tex]{
     perl "\eolang at tmpdir/eolang-phi.pl"
     '#1'
@@ -1337,6 +1366,7 @@
   \iexec[null]{cp "\eolang at tmpdir/\jobname/sodg.tex"
     "\eolang at tmpdir/\jobname/\hash.tex"}%
   \catcode`\$=3 %
+  \message{Start parsing `sodg' at line no. \the\inputlineno^^J}
   \iexec[trace,stdout=\eolang at tmpdir/\jobname/\hash-post.tex]{
     perl "\eolang at tmpdir/eolang-sodg.pl"
     "\eolang at tmpdir/\jobname/\hash.tex"
@@ -1349,18 +1379,29 @@
 %    \end{macrocode}
 % \end{macro}
 
+% \begin{macro}{\eolang at anon}
+% Then, we define a supplementary command to help us anonymize some content.
+% \changes{0.9.0}{2022/11/29}{New command \texttt{\char`\\eolang at anon} added.}
+%    \begin{macrocode}
+\makeatletter
+\NewExpandableDocumentCommand{\eolang at anon}{O{ANONYMIZED}m}{%
+  \ifdefined\eolang at anonymous%
+	  \textcolor{orange}{#1}%
+  \else%
+    #2%
+  \fi%
+}\makeatother
+%    \end{macrocode}
+% \end{macro}
+
 % \begin{macro}{\eolang}
 % Then, we define a simple supplementary command to help you print \eolang{}, the name of our language.
 % \changes{0.1.0}{2022/10/25}{New command \texttt{\char`\\eolang} added to print the name of the language in both
 % normal and the anonymous mode of \texttt{acmart}.}
 %    \begin{macrocode}
-\newcommand\eolang{%
-  \ifdefined\anon%
-    \anon[XYZ]{{\sffamily EO}}%
-  \else%
-    {\sffamily EO}%
-  \fi%
-}
+\makeatletter\newcommand\eolang{%
+  \eolang at anon[XYZ]{{\sffamily EO}}}
+\makeatother
 %    \end{macrocode}
 % \end{macro}
 
@@ -1370,14 +1411,9 @@
 % normal and the anonymous mode of \texttt{acmart}.}
 %    \begin{macrocode}
 \RequirePackage{hyperref}
-\newcommand\phic{%
-  \ifdefined\anon%
-    \anon[\texorpdfstring{$\alpha$}{a}-cal\-cu\-lus]
-      {\texorpdfstring{$\varphi$}{phi}-cal\-cu\-lus}%
-  \else%
-    \texorpdfstring{$\varphi$}{phi}-cal\-cu\-lus%
-  \fi%
-}
+\makeatletter\newcommand\phic{%
+  \eolang at anon[$\alpha$-cal\-cu\-lus]{$\varphi$-cal\-cu\-lus}}
+\makeatother
 %    \end{macrocode}
 % \end{macro}
 
@@ -1385,13 +1421,9 @@
 % Then, we define a simple supplementary command to help you print \xmir{}, the name of our XML-based format of program representation.
 % \changes{0.2.0}{2022/10/28}{New command \texttt{\char`\\xmir} prints XMIR in both normal and the anonymous mode of \texttt{acmart}.}
 %    \begin{macrocode}
-\newcommand\xmir{%
-  \ifdefined\anon%
-    \anon[XML$^+$]{XMIR}%
-  \else%
-    XMIR%
-  \fi%
-}
+\makeatletter\newcommand\xmir{%
+  \eolang at anon[XML$^+$]{XMIR}}
+\makeatother
 %    \end{macrocode}
 % \end{macro}
 

Modified: trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty	2022-11-29 21:08:43 UTC (rev 65141)
+++ trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty	2022-11-29 21:09:04 UTC (rev 65142)
@@ -31,7 +31,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{eolang}
-[2022-11-28 0.7.1 Formulas and Graphs for EO Programming Language]
+[2022-11-29 0.8.0 Formulas and Graphs for EO Programming Language]
 
 
 
@@ -73,6 +73,7 @@
 
 
 
+
 \RequirePackage{stmaryrd}
 \RequirePackage{amsmath}
 \let\Bbbk\relax\RequirePackage{amssymb}
@@ -87,9 +88,10 @@
   tmpdir/.store in=\eolang at tmpdir,
   tmpdir/.default=_eolang\ifxetex-xe\else\ifluatex-lua\fi\fi,
   nocomments/.store in=\eolang at nocomments,
+  anonymous/.store in=\eolang at anonymous,
   tmpdir
 }
-\ProcessPgfOptions{/eolang}
+\ProcessPgfPackageOptions{/eolang}
 
 \iexec[null]{mkdir -p "\eolang at tmpdir/\jobname"}%
 
@@ -177,11 +179,11 @@
   $tex =~ s/([^&\s])\s{2}([^\s])/\1 \2/g;
   $tex =~ s/\s{2}/ \\quad{}/g;
   $tex = '&' . $tex;
-  my $lead = '[^\s]+\s(->|:=|=)';
+  my $lead = '[^\s]+\s(?:->|:=|=)';
   my @leads = $tex =~ /&${lead}/g;
   my @eols = $tex =~ /&/g;
-  if (0+ at leads == 0+ at eols && 0+ at eols > 0) {
-    $tex =~ s/&${lead}/\1&/g;
+  if (0+ at leads == 0+ at eols && 0+ at eols > 1) {
+    $tex =~ s/&(${lead})/\1&/g;
     $gathered = 0;
   print '% The "gathered" is NOT used because all ' .
     (0+ at eols) . ' lines are ' . (0+ at leads) . " leads\n";
@@ -252,6 +254,7 @@
     {\eolang at tmpdir/\jobname/phiquation.tex}}%
   \iexec[null]{cp "\eolang at tmpdir/\jobname/phiquation.tex"
     "\eolang at tmpdir/\jobname/\hash.tex"}%
+  \message{Start parsing 'phi' at line no. \the\inputlineno^^J}
   \iexec[trace,stdout=\eolang at tmpdir/\jobname/\hash-post.tex]{
     perl "\eolang at tmpdir/eolang-phi.pl"
     '#1'
@@ -677,6 +680,7 @@
   \iexec[null]{cp "\eolang at tmpdir/\jobname/sodg.tex"
     "\eolang at tmpdir/\jobname/\hash.tex"}%
   \catcode`\$=3 %
+  \message{Start parsing `sodg' at line no. \the\inputlineno^^J}
   \iexec[trace,stdout=\eolang at tmpdir/\jobname/\hash-post.tex]{
     perl "\eolang at tmpdir/eolang-sodg.pl"
     "\eolang at tmpdir/\jobname/\hash.tex"
@@ -687,31 +691,27 @@
   \def\eolang at sodgSaveTo{\relax}%
 }\makeatother
 
-\newcommand\eolang{%
-  \ifdefined\anon%
-    \anon[XYZ]{{\sffamily EO}}%
+\makeatletter
+\NewExpandableDocumentCommand{\eolang at anon}{O{ANONYMIZED}m}{%
+  \ifdefined\eolang at anonymous%
+  \textcolor{orange}{#1}%
   \else%
-    {\sffamily EO}%
+    #2%
   \fi%
-}
+}\makeatother
 
+\makeatletter\newcommand\eolang{%
+  \eolang at anon[XYZ]{{\sffamily EO}}}
+\makeatother
+
 \RequirePackage{hyperref}
-\newcommand\phic{%
-  \ifdefined\anon%
-    \anon[\texorpdfstring{$\alpha$}{a}-cal\-cu\-lus]
-      {\texorpdfstring{$\varphi$}{phi}-cal\-cu\-lus}%
-  \else%
-    \texorpdfstring{$\varphi$}{phi}-cal\-cu\-lus%
-  \fi%
-}
+\makeatletter\newcommand\phic{%
+  \eolang at anon[$\alpha$-cal\-cu\-lus]{$\varphi$-cal\-cu\-lus}}
+\makeatother
 
-\newcommand\xmir{%
-  \ifdefined\anon%
-    \anon[XML$^+$]{XMIR}%
-  \else%
-    XMIR%
-  \fi%
-}
+\makeatletter\newcommand\xmir{%
+  \eolang at anon[XML$^+$]{XMIR}}
+\makeatother
 
 \newcommand\phiConst{%
   \mathrel{\hspace{.15em}}%



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