diff options
author | Karl Berry <karl@freefriends.org> | 2022-10-29 19:46:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-10-29 19:46:16 +0000 |
commit | 7a9659a5630b34eda3c9d32789969091b07deade (patch) | |
tree | d0fe83062dacea8680820b2948c7b27c4635f333 /Master/texmf-dist | |
parent | 92a382a44464ed25e5c2768c9f94de09bc191ef4 (diff) |
eolang (29oct22)
git-svn-id: svn://tug.org/texlive/trunk@64847 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/eolang/eolang.pdf | bin | 957255 -> 969068 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/eolang/eolang.dtx | 63 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/eolang/eolang.sty | 31 |
3 files changed, 70 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/latex/eolang/eolang.pdf b/Master/texmf-dist/doc/latex/eolang/eolang.pdf Binary files differindex 7bc02804788..e2b1d20e831 100644 --- a/Master/texmf-dist/doc/latex/eolang/eolang.pdf +++ b/Master/texmf-dist/doc/latex/eolang/eolang.pdf diff --git a/Master/texmf-dist/source/latex/eolang/eolang.dtx b/Master/texmf-dist/source/latex/eolang/eolang.dtx index c277d02c14c..65e87c220ac 100644 --- a/Master/texmf-dist/source/latex/eolang/eolang.dtx +++ b/Master/texmf-dist/source/latex/eolang/eolang.dtx @@ -50,7 +50,7 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{eolang} %<*package> -[2022-10-27 0.1.0 Formulas and Graphs for EO Programming Language] +[2022-10-29 0.2.0 Formulas and Graphs for EO Programming Language] %</package> %<*driver> \documentclass{ltxdoc} @@ -104,7 +104,7 @@ % ^ !-> $.b, % b -> [[ c -> |fn|(56), % @ -> |hello|($), -% \Delta ..> |01-FE-C3| ]]]],\\ +% \Delta ..> 01-FE-C3 ]]]],\\ % x -> [[ \alpha_0 -> ? ]]. % \end{phiquation*} % \end{document} @@ -170,9 +170,9 @@ % \begin{document} % \begin{sodg} % v0 -% v1 xy:v0,-2,+1 data:|42| +% v1 xy:v0,-2,+1 data:42 % v0->v1 a:$x$ rho -% v2 xy:v0,+1,+1 atom:$\xi.x+1$ +% v2 xy:v0,+1,+1 atom:\xi.x+1 % v1->v2 a:|hi| bend:-15 % v2->v0 pi bend:10 % \end{sodg} @@ -184,8 +184,8 @@ % unary like |rho| or binary like |atom:$\xi.x+1$|. Binary markers have two % parts, separated by colon. The following markers are supported for a vertex: % \begin{itemize}\setlength\itemsep{0em} -% \item ``|data:[<box>]|'' makes it a data vertex with an optional attached |<box>|, -% \item ``|atom:[<box>]|'' makes it an atom with an optional attached |<box>|, +% \item ``|data:[<box>]|'' makes it a data vertex with an optional attached |<box>| (the content of the box may only be numeric data), +% \item ``|atom:[<box>]|'' makes it an atom with an optional attached |<box>| (the content of the box is a math formula), % \item ``|box:<txt>|'' attaches a |<box>| to it, % \item ``|xy:<v>,<r>,<d>|'' places this vertex in a position relative to the vertex |<v>|, % shifting it right by |<r>| % and down by |<d>| centimetres. @@ -201,10 +201,11 @@ % \DescribeMacro{\eolang} % \DescribeMacro{\phic} +% \DescribeMacro{\xmir} % There is also a no-argument command |\eolang| to help you print the name of % \eolang{} language. It understands |anonymous| mode of \href{https://ctan.org/pkg/acmart}{acmart} 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 name of \phic{}, also sensitive to |anonymous| mode. The macro |\xmir| prints "XMIR". % \begin{docshot} % \documentclass[anonymous]{acmart} % \thispagestyle{empty} @@ -212,8 +213,9 @@ % \begin{document} % In our research we use \eolang{}, \\ % an experimental object-oriented \\ -% dataflow language, and \phic{}, \\ -% its formal foundation. +% dataflow language, \phic{}, \\ +% as its formal foundation, and \xmir{} \\ +% --- its XML-based presentation. % \end{document} % \end{docshot} @@ -258,8 +260,8 @@ % \begin{document} % \begin{phiquation*} % \dfrac \ -% {x->[[@->y]] \quad y->[[z->|42|]]} \ -% {x.z -> |42|} \ +% {x->[[@->y]] \quad y->[[z->42]]} \ +% {x.z -> 42} \ % \text{\sffamily R1} % \end{phiquation*} % \end{document} @@ -358,6 +360,7 @@ % \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)} % \changes{0.1.0}{2022/10/26}{A new Perl script "eolang-phi.pl" added for parsing of phi expressions.} +% \changes{0.2.0}{2022/10/29}{Numbers automatically render as "texttt". No need to use vertical bars around them anymore.} % Then, we create a Perl script for |phiquation| processing: % \begin{macrocode} \makeatletter @@ -388,6 +391,7 @@ if ($env ne 'phiq') { $tex =~ s/\s+\\\n\s*//g; $tex =~ s/\\\\\n/\n\n/g; } +$tex =~ s/([\s,>\(])([0-9A-F][0-9A-F-]*)/\1|\2|/g; $tex =~ s/\?/\\varnothing{}/g; $tex =~ s/@/\\varphi{}/g; $tex =~ s/&/\\sigma{}/g; @@ -476,6 +480,7 @@ print '\endinput', "\n"; % \begin{macro}{eolang-sodg.pl} % \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.} % \changes{0.1.0}{2022/10/26}{There are two Perl scripts now: one for phiquation, another one for sodg.} +% \changes{0.2.0}{2022/10/28}{The content of "atom" and "data" boxes is parsed automatically as formulas and numbers, respectively.} % Then, we create a Perl script for |sodg| graphs processing: % \begin{macrocode} \makeatletter @@ -521,12 +526,20 @@ foreach my $c (@cmds) { if (exists $opts{'data'}) { print ',phi-data'; if (not $opts{'data'} eq '') { - $opts{'box'} = $opts{'data'}; + my $d = $opts{'data'}; + if (index($d, '|') == -1) { + $d = '\texttt{' . $d . '}'; + } + $opts{'box'} = $d; } } elsif (exists $opts{'atom'}) { print ',phi-atom'; if (not $opts{'atom'} eq '') { - $opts{'box'} = $opts{'atom'}; + my $a = $opts{'atom'}; + if (index($a, '$') == -1) { + $a = '$' . $a . '$'; + } + $opts{'box'} = $a; } } else { print ',phi-object'; @@ -650,30 +663,46 @@ print '\end{phicture}', "\n", '\endinput'; % \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 "eolang" added to print the name of the language in both % normal and anonymous mode of "acmart"} % \begin{macrocode} -\makeatletter\newcommand\eolang{% +\newcommand\eolang{% \ifdefined\anon% \anon[XYZ]{{\sffamily EO}}% \else% {\sffamily EO}% \fi% -}\makeatother +} % \end{macrocode} % \end{macro} % \begin{macro}{\phic} +% Then, we define a simple supplementary command to help you print \phic{}, the name of our formal apparatus. % \changes{0.1.0}{2022/10/25}{New command "phic" prints the name of $\varphi$-calculus in both % normal and anonymous mode of "acmart"} % \begin{macrocode} -\makeatletter\newcommand\phic{% +\newcommand\phic{% \ifdefined\anon% \anon[$\alpha$-calculus]{$\varphi$-calculus}% \else% $\varphi$-calculus% \fi% -}\makeatother +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\xmir} +% 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 "xmir" prints XMIR in both normal and anonymous mode of "acmart"} +% \begin{macrocode} +\newcommand\xmir{% + \ifdefined\anon% + \anon[XML']{XMIR}% + \else% + XMIR% + \fi% +} % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/tex/latex/eolang/eolang.sty b/Master/texmf-dist/tex/latex/eolang/eolang.sty index ad40f34c039..8902d48a616 100644 --- a/Master/texmf-dist/tex/latex/eolang/eolang.sty +++ b/Master/texmf-dist/tex/latex/eolang/eolang.sty @@ -31,7 +31,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{eolang} -[2022-10-27 0.1.0 Formulas and Graphs for EO Programming Language] +[2022-10-29 0.2.0 Formulas and Graphs for EO Programming Language] @@ -98,6 +98,7 @@ if ($env ne 'phiq') { $tex =~ s/\s+\\\n\s*//g; $tex =~ s/\\\\\n/\n\n/g; } +$tex =~ s/([\s,>\(])([0-9A-F][0-9A-F-]*)/\1|\2|/g; $tex =~ s/\?/\\varnothing{}/g; $tex =~ s/@/\\varphi{}/g; $tex =~ s/&/\\sigma{}/g; @@ -212,12 +213,20 @@ foreach my $c (@cmds) { if (exists $opts{'data'}) { print ',phi-data'; if (not $opts{'data'} eq '') { - $opts{'box'} = $opts{'data'}; + my $d = $opts{'data'}; + if (index($d, '|') == -1) { + $d = '\texttt{' . $d . '}'; + } + $opts{'box'} = $d; } } elsif (exists $opts{'atom'}) { print ',phi-atom'; if (not $opts{'atom'} eq '') { - $opts{'box'} = $opts{'atom'}; + my $a = $opts{'atom'}; + if (index($a, '$') == -1) { + $a = '$' . $a . '$'; + } + $opts{'box'} = $a; } } else { print ',phi-object'; @@ -321,21 +330,29 @@ print '\end{phicture}', "\n", '\endinput'; "\eolang@tmpdir/\jobname/\hash.tex"}% }\makeatother -\makeatletter\newcommand\eolang{% +\newcommand\eolang{% \ifdefined\anon% \anon[XYZ]{{\sffamily EO}}% \else% {\sffamily EO}% \fi% -}\makeatother +} -\makeatletter\newcommand\phic{% +\newcommand\phic{% \ifdefined\anon% \anon[$\alpha$-calculus]{$\varphi$-calculus}% \else% $\varphi$-calculus% \fi% -}\makeatother +} + +\newcommand\xmir{% + \ifdefined\anon% + \anon[XML']{XMIR}% + \else% + XMIR% + \fi% +} \newcommand\phiConst{% \mathrel{\hspace{.15em}}\mapstochar\mathrel{\hspace{-.15em}}\mapsto} |