texlive[64809] Master/texmf-dist: eolang (25oct22)

commits+karl at tug.org commits+karl at tug.org
Tue Oct 25 22:14:00 CEST 2022


Revision: 64809
          http://tug.org/svn/texlive?view=revision&revision=64809
Author:   karl
Date:     2022-10-25 22:14:00 +0200 (Tue, 25 Oct 2022)
Log Message:
-----------
eolang (25oct22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/eolang/README.md
    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/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/eolang/README.md	2022-10-25 20:13:48 UTC (rev 64808)
+++ trunk/Master/texmf-dist/doc/latex/eolang/README.md	2022-10-25 20:14:00 UTC (rev 64809)
@@ -1,6 +1,6 @@
-[![l3build](https://github.com/yegor256/eolang.sty/actions/workflows/l3build.yml/badge.svg)](https://github.com/yegor256/eolang.sty/actions/workflows/l3build.yml)
+[![l3build](https://github.com/objectionary/eolang.sty/actions/workflows/l3build.yml/badge.svg)](https://github.com/objectionary/eolang.sty/actions/workflows/l3build.yml)
 [![CTAN](https://img.shields.io/ctan/v/eolang.sty)](https://ctan.org/pkg/eolang.sty)
-[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/eolang.sty/blob/master/LICENSE.txt)
+[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/objectionary/eolang.sty/blob/master/LICENSE.txt)
 
 This LaTeX package helps you write 𝜑-calculus formulas and
 [SODG](https://github.com/objectionary/sodg) graphs

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-10-25 20:13:48 UTC (rev 64808)
+++ trunk/Master/texmf-dist/source/latex/eolang/eolang.dtx	2022-10-25 20:14:00 UTC (rev 64809)
@@ -50,7 +50,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{eolang}
 %<*package>
-[2022-10-20 0.0.1 Formulas and Graphs for EO Programming Language]
+[2022-10-25 0.0.2 Formulas and Graphs for EO Programming Language]
 %</package>
 %<*driver>
 \documentclass{ltxdoc}
@@ -60,7 +60,6 @@
 \usepackage{microtype}
 \usepackage{graphicx}
 \usepackage[runs=1,dtx]{docshots}
-\docshotPrerequisite{eolang.sty}
 \usepackage{eolang}
 \usepackage{href-ul}
 \PageIndex
@@ -75,7 +74,7 @@
 %</driver>
 % \fi
 
-% \title{\includegraphics[height=1in]{cactus.pdf} \\ |eolang|: \LaTeX{} Package \\ for Formulas and Graphs \\ of EO Programming Language \\ and $\varphi$-calculus\thanks{The sources are in GitHub at \href{https://github.com/yegor256/eolang.sty}{yegor256/eolang.sty}}}
+% \title{\includegraphics[height=1in]{cactus.pdf} \\ |eolang|: \LaTeX{} Package \\ for Formulas and Graphs \\ of EO Programming Language \\ and $\varphi$-calculus\thanks{The sources are in GitHub at \href{https://github.com/objectionary/eolang.sty}{objectionary/eolang.sty}}}
 % \author{Yegor Bugayenko \\ \texttt{yegor256 at gmail.com}}
 % \date{\filedate, \fileversion}
 %
@@ -98,12 +97,13 @@
 % \usepackage{eolang}
 % \begin{document}
 % \begin{phiquation*}
-% a -> [
-%   b -> [ c -> |x|(56),
-%     \rho -> |hello|(\xi),
-%     \Delta ~> |01-FE-C3| ]],
+% a -> [[
+%   ^ !-> $.b,
+%   b -> [[ c -> |fn|(56),
+%     @ -> |hello|($),
+%     \Delta ~> |01-FE-C3| ]]]],
 
-% x -> [ \lambda ~> M_1 ].
+% x -> [[ \alpha_0 -> ? ]]
 % \end{phiquation*}
 % \end{document}
 % \end{docshot}
@@ -112,12 +112,36 @@
 % The environment |phiquation| lets you write a $\varphi$-calculus expressions
 % using simple plain-text notation, where:
 % \begin{itemize}\setlength\itemsep{0em}
-%   \item ``|->|'' maps to ``$\mapsto$'' (|\mapsto|),
-%   \item ``|~>|'' maps to ``$\mapstochar\dashrightarrow$'' (|\mapstochar\dashrightarrow|),
-%   \item ``|[|'' maps to ``$\llbracket$'' (|\llbracket|),
-%   \item ``|]|'' maps to ``$\rrbracket$'' (|\rrbracket|),
-%   \item ``$\vert$|abc|$\vert$'' maps to ``\texttt{abc}'' (|\texttt{abc}|).
+%   \item ``|@|'' maps to ``$\varphi$''
+%     (|\varphi|),
+%   \item ``|^|'' maps to ``$\rho$''
+%     (|\rho|),
+%   \item ``|$|'' maps to ``$\xi$''
+%     (|\xi|),
+%   \item ``|&|'' maps to ``$\sigma$''
+%     (|\sigma|),
+%   \item ``|?|'' maps to ``$\varnothing$''
+%     (|\varnothing|),
+%   \item ``|->|'' maps to ``$\mapsto$''
+%     (|\mapsto|),
+%   \item ``|!->|'' maps to ``$\mapstochar\relbar\mathrel{\mkern-12mu}\mapsto$''
+%     (|\mapstochar\relbar\mathrel{\mkern-12mu}\mapsto|),
+%   \item ``|~>|'' maps to ``$\mapstochar\dashrightarrow$''
+%     (|\mapstochar\dashrightarrow|),
+%   \item ``|[[|'' maps to ``$\llbracket$''
+%     (|\llbracket|),
+%   \item ``|]]|'' maps to ``$\rrbracket$''
+%     (|\rrbracket|),
+%   \item ``$\vert$|abc|$\vert$'' maps to ``\texttt{abc}''
+%     (|\texttt{abc}|).
 % \end{itemize}
+% Also, a few symbols are supported for $\varphi$PU architecture:
+% \begin{itemize}\setlength\itemsep{0em}
+%   \item ``|-abc>|'' maps to ``$\xrightarrow{\text{\sffamily\scshape abc}}$''
+%     (|\xrightarrow{\text{\sffamily\scshape abc}}|),
+%   \item ``|:=|'' maps to ``$\vDash$''
+%     (|\vDash|).
+% \end{itemize}
 
 % \DescribeMacro{\phiq}
 % The command |\phiq| lets you inline a $\varphi$-calculus expressions
@@ -129,21 +153,21 @@
 % \usepackage{eolang}
 % \begin{document}
 % A simple object
-% \phiq{x -> [\varphi -> y]}
+% \phiq{x -> [[@ -> y]]}
 % is a decorator of
 % the data object
-% \phiq{y -> [\Delta ~> 42]}.
+% \phiq{y -> [[\Delta ~> 42]]}.
 % \end{document}
 % \end{docshot}
 
-% \DescribeEnv{phigure}
-% The environment |phigure| allows you to draw a \href{https://github.com/objectionary/sodg}{SODG} graph:
+% \DescribeEnv{sodg}
+% The environment |sodg| allows you to draw a \href{https://github.com/objectionary/sodg}{SODG} graph:
 % \begin{docshot}
 % \documentclass{article}
 % \pagestyle{empty}
 % \usepackage{eolang}
 % \begin{document}
-% \begin{phigure}
+% \begin{sodg}
 % v0
 % v1 xy:v0,-2,+1 data:|42|
 % v0->v1 a:$x$ rho
@@ -150,7 +174,7 @@
 % v2 xy:v0,+1,+1 atom:$\xi.x+1$
 % v1->v2 a:|hi| bend:-15
 % v2->v0 pi bend:10
-% \end{phigure}
+% \end{sodg}
 % \end{document}
 % \end{docshot}
 % The content of the environment is parsed line by line. Markers in each line are
@@ -178,12 +202,11 @@
 
 % \section{Implementation}
 
-% \changes{v0.0.1}{2022/10/05}{Initial version}
-
 % First, we include a few packages:
 %    \begin{macrocode}
 \RequirePackage{stmaryrd}
 \RequirePackage{amsmath}
+\RequirePackage{amssymb}
 \RequirePackage{amsfonts}
 \RequirePackage{iexec}
 \RequirePackage{fancyvrb}
@@ -190,6 +213,9 @@
 %    \end{macrocode}
 
 % \begin{macro}{\eolang at env}
+% \changes{0.0.2}{2022/10/21}{The symbols ``['' and ``]'' replaced with ``[['' and ``]]'' for abstract object brackets, because they conflicted with normal square brackets}
+% \changes{0.0.2}{2022/10/21}{New symbol added for basket slots}
+% \changes{0.0.2}{2022/10/21}{Parsing of symbols ``@,'' ``\^{},'' and ``\&'' enabled (varphi, rho, and sigma)}
 % Then, we define |\eolang at env| supplementary command.
 % It is implemented with the help of |\iexec| from
 % \href{https://github.com/yegor256/iexec}{iexec} package:
@@ -196,20 +222,29 @@
 %    \begin{macrocode}
 \makeatletter\newcommand\eolang at env[2]{
   \iexec[trace]{
-    /bin/echo -n '\\begin{#1}\\begin{split} &';
+    /bin/echo -n '\\begin{#1}\\begin{split} &'
+    &&
     /bin/echo -n '\detokenize{#2}'
       | perl -pe 's/^\\r\\+//g'
       | perl -pe 's/\\r\\+$//g'
+      | perl -pe 's/\\?/\\\\varnothing/g'
+      | perl -pe 's/@/\\\\varphi/g'
+      | perl -pe 's/&/\\\\sigma/g'
+      | perl -pe 's/\\^/\\\\rho/g'
+      | perl -pe 's/\\$/\\\\xi/g'
+      | perl -pe 's/-([a-z]+)>/\\\\xrightarrow{\\\\text{\\\\sffamily\\\\scshape \\1}}/g'
+      | perl -pe 's/!->/\\\\mapstochar\\\\relbar\\\\mathrel{\\\\mkern-12mu}\\\\mapsto/g'
       | perl -pe 's/->/\\\\mapsto/g'
+      | perl -pe 's/:=/\\\\vDash/g'
       | perl -pe 's/\unexpanded{~}>/\\\\mapstochar\\\\dashrightarrow/g'
       | perl -pe 's/\\|([^\\|]+)\\|/\\\\texttt{\\1}/g'
-      | perl -pe 's/\\[/\\\\llbracket/g'
-      | perl -pe 's/\\]/\\\\rrbracket/g'
+      | perl -pe 's/\\[\\[/\\\\llbracket/g'
+      | perl -pe 's/\\]\\]/\\\\rrbracket/g'
       | perl -pe 's/\\r\\r/\\\\\\\\ \&/g'
       | perl -pe 's/\\r/\\\\\\\\[-4pt] \&/g'
       | perl -pe 's/([^& ]) {2}([^ ])/\\1 \\2/g'
       | perl -pe 's/ {2}/\\\\quad{}/g'
-      ;
+      &&
     /bin/echo -n '\\end{split}\\end{#1}\\endinput'
   }%
 }\makeatother
@@ -233,17 +268,27 @@
 % \end{macro}
 
 % \begin{macro}{\phiq}
+% \changes{0.0.2}{2022/10/21}{Parsing of additional symbols enabled}
 % Then, we define |\phiq| command:
 %    \begin{macrocode}
 \newcommand\phiq[1]{
   \iexec[trace]{
-    /bin/echo -n '$';
+    /bin/echo -n '$'
+    &&
     /bin/echo -n '\detokenize{#1}'
+      | perl -pe 's/\\^/\\\\rho/g'
+      | perl -pe 's/\\$/\\\\xi/g'
+      | perl -pe 's/&/\\\\sigma/g'
+      | perl -pe 's/\\?/\\\\varnothing/g'
+      | perl -pe 's/@/\\\\varphi/g'
+      | perl -pe 's/!->/\\\\mapstochar\\\\relbar\\\\mathrel{\\\\mkern-12mu}\\\\mapsto/g'
       | perl -pe 's/->/\\\\mapsto/g'
+      | perl -pe 's/-([a-z]+)>/\\\\xrightarrow{\\\\text{\\\\sffamily\\\\scshape \\1}}/g'
       | perl -pe 's/\unexpanded{~}>/\\\\mapstochar\\\\dashrightarrow/g'
-      | perl -pe 's/\\[/\\\\llbracket/g'
-      | perl -pe 's/\\]/\\\\rrbracket/g'
-      ;
+      | perl -pe 's/:=/\\\\vDash/g'
+      | perl -pe 's/\\[\\[/\\\\llbracket/g'
+      | perl -pe 's/\\]\\]/\\\\rrbracket/g'
+    &&
     /bin/echo -n '$\\endinput'
   }%
 }
@@ -251,9 +296,10 @@
 % \end{macro}
 
 % \begin{macro}{Perl}
+% \changes{0.0.2}{2022/10/24}{The Perl file now has a fixed name, which doesn't depend on the name of the TeX job. This file may be shared among jobs, no need to make it uniquely named.}
 % Then, create a Perl script:
 %    \begin{macrocode}
-\begin{VerbatimOut}{\jobname.pl.eolang}
+\begin{VerbatimOut}{eolang.pl}
 $tex = $ARGV[0];
 $tex =~ s/^\s+|\s+$//g;
 $tex =~ s/(\\[a-zA-Z]+)\s+/\1/g;
@@ -336,13 +382,12 @@
 }
 print '\end{phig}', "\n", '\endinput';
 \end{VerbatimOut}
-\message{^^Jeolang: file with Perl script (\jobname.pl.eolang) saved^^J}%
-\iexec[trace,stdout=/dev/null]{
-  perl -pi -e 's/(\\\\[a-zA-Z])\\s+/\\1/g' \jobname.pl.eolang}
+\message{^^Jeolang: File with Perl script (eolang.pl) saved^^J}%
+\iexec[trace,null]{perl -pi -e 's/(\\\\[a-zA-Z])\\s+/\\1/g' eolang.pl}
 %    \end{macrocode}
 % \end{macro}
 
-% \begin{macro}{phigure}
+% \begin{macro}{tikz}
 % Then, we include |tikz| package and its libraries:
 %    \begin{macrocode}
 \RequirePackage{tikz}
@@ -352,7 +397,6 @@
   \usetikzlibrary{decorations.pathmorphing}
   \usetikzlibrary{intersections}
   \usetikzlibrary{positioning}
-  \usetikzlibrary{backgrounds}
   \usetikzlibrary{calc}
   \usetikzlibrary{shapes.arrows}
 %    \end{macrocode}
@@ -389,27 +433,28 @@
 %    \end{macrocode}
 % \end{macro}
 
-% \begin{macro}{phigure}
-% Then, create a new environment |figure|, as suggested
+% \begin{macro}{sodg}
+% \changes{0.0.2}{2022/10/20}{The environment ``phigure'' renamed to ``sodg'' for the sake of better semantic. The graph in the picture is solely a SODG graph, that's why the name ``sodg'' is better.}
+% Then, create a new environment |sodg|, as suggested
 % \href{https://tex.stackexchange.com/questions/661056}{here}:
 %    \begin{macrocode}
-\NewDocumentEnvironment{phigure}{b}{%
+\NewDocumentEnvironment{sodg}{b}{%
   \catcode`\ =10 %
   \catcode`\^^M=5 %
   \iexec[trace,stdout=\jobname.tex.eolang]{
-    perl \jobname.pl.eolang '\detokenize{#1}'}%
+    perl eolang.pl '\detokenize{#1}'}%
 }{}
-\AddToHook{env/phigure/before}{\bgroup\obeylines\obeyspaces}
-\AddToHook{env/phigure/after}{\egroup}
+\AddToHook{env/sodg/before}{\bgroup\obeylines\obeyspaces}
+\AddToHook{env/sodg/after}{\egroup}
 %    \end{macrocode}
 % \end{macro}
 
 % \Finale
 
-%\clearpage
-
+% \clearpage
 % \printbibliography
+% \clearpage
 
-%\PrintChanges
-%\clearpage
-%\PrintIndex
+% \PrintChanges
+% \clearpage
+% \PrintIndex

Modified: trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty	2022-10-25 20:13:48 UTC (rev 64808)
+++ trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty	2022-10-25 20:14:00 UTC (rev 64809)
@@ -31,7 +31,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{eolang}
-[2022-10-20 0.0.1 Formulas and Graphs for EO Programming Language]
+[2022-10-25 0.0.2 Formulas and Graphs for EO Programming Language]
 
 
 
@@ -41,9 +41,9 @@
 
 
 
-
 \RequirePackage{stmaryrd}
 \RequirePackage{amsmath}
+\RequirePackage{amssymb}
 \RequirePackage{amsfonts}
 \RequirePackage{iexec}
 \RequirePackage{fancyvrb}
@@ -50,20 +50,29 @@
 
 \makeatletter\newcommand\eolang at env[2]{
   \iexec[trace]{
-    /bin/echo -n '\\begin{#1}\\begin{split} &';
+    /bin/echo -n '\\begin{#1}\\begin{split} &'
+    &&
     /bin/echo -n '\detokenize{#2}'
       | perl -pe 's/^\\r\\+//g'
       | perl -pe 's/\\r\\+$//g'
+      | perl -pe 's/\\?/\\\\varnothing/g'
+      | perl -pe 's/@/\\\\varphi/g'
+      | perl -pe 's/&/\\\\sigma/g'
+      | perl -pe 's/\\^/\\\\rho/g'
+      | perl -pe 's/\\$/\\\\xi/g'
+      | perl -pe 's/-([a-z]+)>/\\\\xrightarrow{\\\\text{\\\\sffamily\\\\scshape \\1}}/g'
+      | perl -pe 's/!->/\\\\mapstochar\\\\relbar\\\\mathrel{\\\\mkern-12mu}\\\\mapsto/g'
       | perl -pe 's/->/\\\\mapsto/g'
+      | perl -pe 's/:=/\\\\vDash/g'
       | perl -pe 's/\unexpanded{~}>/\\\\mapstochar\\\\dashrightarrow/g'
       | perl -pe 's/\\|([^\\|]+)\\|/\\\\texttt{\\1}/g'
-      | perl -pe 's/\\[/\\\\llbracket/g'
-      | perl -pe 's/\\]/\\\\rrbracket/g'
+      | perl -pe 's/\\[\\[/\\\\llbracket/g'
+      | perl -pe 's/\\]\\]/\\\\rrbracket/g'
       | perl -pe 's/\\r\\r/\\\\\\\\ \&/g'
       | perl -pe 's/\\r/\\\\\\\\[-4pt] \&/g'
       | perl -pe 's/([^& ]) {2}([^ ])/\\1 \\2/g'
       | perl -pe 's/ {2}/\\\\quad{}/g'
-      ;
+      &&
     /bin/echo -n '\\end{split}\\end{#1}\\endinput'
   }%
 }\makeatother
@@ -81,18 +90,27 @@
 
 \newcommand\phiq[1]{
   \iexec[trace]{
-    /bin/echo -n '$';
+    /bin/echo -n '$'
+    &&
     /bin/echo -n '\detokenize{#1}'
+      | perl -pe 's/\\^/\\\\rho/g'
+      | perl -pe 's/\\$/\\\\xi/g'
+      | perl -pe 's/&/\\\\sigma/g'
+      | perl -pe 's/\\?/\\\\varnothing/g'
+      | perl -pe 's/@/\\\\varphi/g'
+      | perl -pe 's/!->/\\\\mapstochar\\\\relbar\\\\mathrel{\\\\mkern-12mu}\\\\mapsto/g'
       | perl -pe 's/->/\\\\mapsto/g'
+      | perl -pe 's/-([a-z]+)>/\\\\xrightarrow{\\\\text{\\\\sffamily\\\\scshape \\1}}/g'
       | perl -pe 's/\unexpanded{~}>/\\\\mapstochar\\\\dashrightarrow/g'
-      | perl -pe 's/\\[/\\\\llbracket/g'
-      | perl -pe 's/\\]/\\\\rrbracket/g'
-      ;
+      | perl -pe 's/:=/\\\\vDash/g'
+      | perl -pe 's/\\[\\[/\\\\llbracket/g'
+      | perl -pe 's/\\]\\]/\\\\rrbracket/g'
+    &&
     /bin/echo -n '$\\endinput'
   }%
 }
 
-\begin{VerbatimOut}{\jobname.pl.eolang}
+\begin{VerbatimOut}{eolang.pl}
 $tex = $ARGV[0];
 $tex =~ s/^\s+|\s+$//g;
 $tex =~ s/(\\[a-zA-Z]+)\s+/\1/g;
@@ -175,9 +193,8 @@
 }
 print '\end{phig}', "\n", '\endinput';
 \end{VerbatimOut}
-\message{^^Jeolang: file with Perl script (\jobname.pl.eolang) saved^^J}%
-\iexec[trace,stdout=/dev/null]{
-  perl -pi -e 's/(\\\\[a-zA-Z])\\s+/\\1/g' \jobname.pl.eolang}
+\message{^^Jeolang: File with Perl script (eolang.pl) saved^^J}%
+\iexec[trace,null]{perl -pi -e 's/(\\\\[a-zA-Z])\\s+/\\1/g' eolang.pl}
 
 \RequirePackage{tikz}
   \usetikzlibrary{arrows}
@@ -186,7 +203,6 @@
   \usetikzlibrary{decorations.pathmorphing}
   \usetikzlibrary{intersections}
   \usetikzlibrary{positioning}
-  \usetikzlibrary{backgrounds}
   \usetikzlibrary{calc}
   \usetikzlibrary{shapes.arrows}
 
@@ -216,18 +232,17 @@
   above=2pt,sloped/.append style={transform shape},
   font={\scriptsize},color=black]
 
-\NewDocumentEnvironment{phigure}{b}{%
+\NewDocumentEnvironment{sodg}{b}{%
   \catcode`\ =10 %
   \catcode`\^^M=5 %
   \iexec[trace,stdout=\jobname.tex.eolang]{
-    perl \jobname.pl.eolang '\detokenize{#1}'}%
+    perl eolang.pl '\detokenize{#1}'}%
 }{}
-\AddToHook{env/phigure/before}{\bgroup\obeylines\obeyspaces}
-\AddToHook{env/phigure/after}{\egroup}
+\AddToHook{env/sodg/before}{\bgroup\obeylines\obeyspaces}
+\AddToHook{env/sodg/after}{\egroup}
 
 
 
-
 \endinput
 %%
 %% End of file `eolang.sty'.



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