texlive[64867] Master/texmf-dist: eolang (30oct22)
commits+karl at tug.org
commits+karl at tug.org
Sun Oct 30 21:43:08 CET 2022
Revision: 64867
http://tug.org/svn/texlive?view=revision&revision=64867
Author: karl
Date: 2022-10-30 21:43:08 +0100 (Sun, 30 Oct 2022)
Log Message:
-----------
eolang (30oct22)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/eolang/DEPENDS.txt
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/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/eolang/DEPENDS.txt 2022-10-30 20:42:52 UTC (rev 64866)
+++ trunk/Master/texmf-dist/doc/latex/eolang/DEPENDS.txt 2022-10-30 20:43:08 UTC (rev 64867)
@@ -9,3 +9,4 @@
hard ifluatex
hard ifxetex
hard adjustbox
+hard hyperref
\ No newline at end of file
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-30 20:42:52 UTC (rev 64866)
+++ trunk/Master/texmf-dist/source/latex/eolang/eolang.dtx 2022-10-30 20:43:08 UTC (rev 64867)
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{eolang}
%<*package>
-[2022-10-29 0.2.0 Formulas and Graphs for EO Programming Language]
+[2022-10-30 0.3.0 Formulas and Graphs for EO Programming Language]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -126,6 +126,8 @@
% (|\varnothing|),
% \item ``|->|'' maps to ``$\mapsto$''
% (|\mapsto|),
+% \item ``|~>|'' maps to ``$\phiWave$''
+% (|\phiWave|),
% \item ``|!->|'' maps to ``$\phiConst$''
% (|\phiConst|),
% \item ``|..>|'' maps to ``$\phiDotted$''
@@ -153,9 +155,9 @@
% \pagestyle{empty}
% \usepackage{eolang}
% \begin{document}
-% A simple object \\
+% A simple object
% \phiq{x -> [[@ -> y]]} \\
-% is a decorator of \\
+% is a decorator of
% the data object \\
% \phiq{y -> [[\Delta ..> 42]]}.
% \end{document}
@@ -267,6 +269,27 @@
% \end{document}
% \end{docshot}
+% This is how you can use |\dfrac| from |amsmath| for large inference rules,
+% with the help of |\begin{split}| and |\end{split}|:
+% \begin{docshot}
+% \documentclass{article}
+% \usepackage{amsmath}
+% \usepackage{eolang}
+% \pagestyle{empty}
+% \begin{document}
+% \begin{phiquation*}
+% \dfrac{\begin{split}
+% x->[[@->y, z->42,
+% \alpha_0->?, \alpha_1->42]]
+% \end{split}}{\begin{split}
+% x->[[@->y, z->?, f ~> |pi|(
+% \alpha_0->[[ \psi !-> |hello|(12) ]],
+% \alpha_1->42)]]
+% \end{split}}\text{R2}.
+% \end{phiquation*}
+% \end{document}
+% \end{docshot}
+
% The |phiquation| environment may be used together with \href{https://ctan.org/pkg/acmart}{acmart}:
% \begin{docshot}
% \documentclass{acmart}
@@ -346,12 +369,22 @@
\iexec[null]{mkdir -p "\eolang at tmpdir/\jobname"}%
% \end{macrocode}
+% \begin{macro}{\eolang at lineno}
+% \changes{0.3.0}{2022/10/30}{New counter for protecting lineno.}
+% Then, we define an internal counter to protect line number from changing:
+% \begin{macrocode}
+\makeatletter\newcounter{eolang at lineno}\makeatother
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\eolang at mdfive}
% \changes{0.1.0}{2022/10/26}{New supplementary command added to calculate MD5 sum of a file.}
% Then, we define a command for MD5 hash calculating of a file:
% \begin{macrocode}
\RequirePackage{pdftexcmds}
-\makeatletter\newcommand\eolang at mdfive[1]{\pdf at filemdfivesum{#1}}\makeatother
+\makeatletter
+\newcommand\eolang at mdfive[1]{\pdf at filemdfivesum{#1}}
+\makeatother
% \end{macrocode}
% \end{macro}
@@ -361,7 +394,9 @@
% \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:
+% \changes{0.3.0}{2022/10/30}{New arrow added, that looks like "leadsto".}
+% Then, we create a Perl script for |phiquation| processing using |VerbatimOut| from
+% \href{https://ctan.org/pkg/fancyvrb}{fancyvrb}:
% \begin{macrocode}
\makeatletter
\begin{VerbatimOut}{\eolang at tmpdir/eolang-phi.pl}
@@ -400,12 +435,15 @@
$tex =~ s/-([a-z]+)>/\\mathrel{\\xrightarrow{\\text{\\sffamily\\scshape \1}}}/g;
$tex =~ s/!->/\\mathrel{\\phiConst}/g;
$tex =~ s/->/\\mathrel{\\mapsto}/g;
+$tex =~ s/~>/\\mathrel{\\phiWave}/g;
$tex =~ s/:=/\\mathrel{\\vDash}/g;
$tex =~ s/..>/\\mathrel{\\phiDotted}/g;
-$tex =~ s/\|([^\|]+)\|/\\texttt{\1}{}/g;
+$tex =~ s/\|([^\|]+)\|/\\textnormal{\\texttt{\1}}{}/g;
$tex =~ s/\[\[/\\llbracket\\mathrel{}/g;
$tex =~ s/\]\]/\\mathrel{}\\rrbracket{}/g;
if ($env ne 'phiq') {
+ $tex =~ s/\\begin\{split\}\n/\\begin{split}&/g;
+ $tex =~ s/\n\s*\\end\{split\}/\\end{split}/g;
$tex =~ s/\n\n/\\\\&/g;
$tex =~ s/\n/\\\\[-4pt]&/g;
$tex =~ s/([^&\s])\s{2}([^\s])/\1 \2/g;
@@ -446,13 +484,18 @@
perl "\eolang at tmpdir/eolang-phi.pl"
'#1'
"\eolang at tmpdir/\jobname/\hash.tex"}%
+ \setcounter{FancyVerbLine}{\value{eolang at lineno}}%
}
\newenvironment{phiquation*}%
-{\VerbatimEnvironment\begin{VerbatimOut}
+{\VerbatimEnvironment%
+\setcounter{eolang at lineno}{\value{FancyVerbLine}}%
+\begin{VerbatimOut}
{\eolang at tmpdir/\jobname/phiquation.tex}}
{\end{VerbatimOut}\eolang at process{equation*}}
\newenvironment{phiquation}%
-{\VerbatimEnvironment\begin{VerbatimOut}
+{\VerbatimEnvironment%
+\setcounter{eolang at lineno}{\value{FancyVerbLine}}%
+\begin{VerbatimOut}
{\eolang at tmpdir/\jobname/phiquation.tex}}
{\end{VerbatimOut}\eolang at process{equation}}
\makeatother
@@ -460,12 +503,12 @@
% \end{macro}
% \begin{macro}{\phiq}
-% \changes{0.0.2}{2022/10/21}{Parsing of additional symbols enabled}
+% \changes{0.0.2}{2022/10/21}{Parsing of additional symbols enabled.}
% Then, we define |\phiq| command:
% \begin{macrocode}
-\makeatletter\newcommand\phiq[1]{
+\makeatletter\newcommand\phiq[1]{%
\iexec[trace,quiet,stdout=\eolang at tmpdir/\jobname/phiq.tex]{
- /bin/echo '\detokenize{#1}'}
+ /bin/echo '\detokenize{#1}'}%
\def\hash{\eolang at mdfive
{\eolang at tmpdir/\jobname/phiq.tex}}%
\iexec[null]{cp "\eolang at tmpdir/\jobname/phiq.tex"
@@ -481,7 +524,8 @@
% \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:
+% Then, we create a Perl script for |sodg| graphs processing using |VerbatimOut| from
+% \href{https://ctan.org/pkg/fancyvrb}{fancyvrb}:
% \begin{macrocode}
\makeatletter
\begin{VerbatimOut}{\eolang at tmpdir/eolang-sodg.pl}
@@ -498,7 +542,7 @@
$tex =~ s/^\s+|\s+$//g;
$tex =~ s/(\\[a-zA-Z]+)\s+/\1/g;
$tex =~ s/\n\s+/\n/g;
-$tex =~ s/\|([^\|]+)\|/\\texttt{\1}/g;
+$tex =~ s/\|([^\|]+)\|/\\textnormal{\\texttt{\1}}/g;
my @cmds = split (/\n/g, $tex);
foreach my $t (@cmds) {
print '% ', $t, "\n";
@@ -528,7 +572,7 @@
if (not $opts{'data'} eq '') {
my $d = $opts{'data'};
if (index($d, '|') == -1) {
- $d = '\texttt{' . $d . '}';
+ $d = '\textnormal{\texttt{' . $d . '}}';
}
$opts{'box'} = $d;
}
@@ -596,6 +640,14 @@
% \end{macrocode}
% \end{macro}
+% \begin{macro}{FancyVerbLine}
+% Then, we reset the counter for \href{https://ctan.org/pkg/fancyvrb}{fancyvrb}, so that
+% it starts counting lines from zero when the document starts rendering:
+% \begin{macrocode}
+\setcounter{FancyVerbLine}{0}
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{tikz}
% Then, we include |tikz| package and its libraries:
% \begin{macrocode}
@@ -648,7 +700,9 @@
% \href{https://tex.stackexchange.com/questions/661056}{here}:
% \begin{macrocode}
\makeatletter\newenvironment{sodg}%
-{\VerbatimEnvironment\begin{VerbatimOut}
+{\VerbatimEnvironment%
+\setcounter{eolang at lineno}{\value{FancyVerbLine}}%
+\begin{VerbatimOut}
{\eolang at tmpdir/\jobname/sodg.tex}}
{\end{VerbatimOut}%
\def\hash{\eolang at mdfive
@@ -658,6 +712,7 @@
\iexec[trace,stdout=\eolang at tmpdir/\jobname/\hash-post.tex]{
perl "\eolang at tmpdir/eolang-sodg.pl"
"\eolang at tmpdir/\jobname/\hash.tex"}%
+ \setcounter{FancyVerbLine}{\value{eolang at lineno}}%
}\makeatother
% \end{macrocode}
% \end{macro}
@@ -682,11 +737,12 @@
% \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}
+\RequirePackage{hyperref}
\newcommand\phic{%
\ifdefined\anon%
- \anon[$\alpha$-calculus]{$\varphi$-calculus}%
+ \anon[\texorpdfstring{$\alpha$}{a}-calculus]{\texorpdfstring{$\varphi$}{phi}-calculus}%
\else%
- $\varphi$-calculus%
+ \texorpdfstring{$\varphi$}{phi}-calculus%
\fi%
}
% \end{macrocode}
@@ -716,6 +772,16 @@
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\phiWave}
+% \changes{0.3.0}{2022/10/30}{New command "phiWave" added to denote a link to a multi-layer attribute.}
+% Then, we define a command to render an arrow for a multi-layer attribute,
+% as suggested \href{https://tex.stackexchange.com/questions/198755}{here}:
+% \begin{macrocode}
+\newcommand\phiWave{%
+ \mapstochar\mathrel{\mspace{0.45mu}}\leadsto}
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\phiDotted}
% \changes{0.1.0}{2022/10/27}{New command "phiDotted" added to denote a link to a special attribute.}
% Then, we define a command to render an arrow for a special attribute,
Modified: trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty 2022-10-30 20:42:52 UTC (rev 64866)
+++ trunk/Master/texmf-dist/tex/latex/eolang/eolang.sty 2022-10-30 20:43:08 UTC (rev 64867)
@@ -31,7 +31,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{eolang}
-[2022-10-29 0.2.0 Formulas and Graphs for EO Programming Language]
+[2022-10-30 0.3.0 Formulas and Graphs for EO Programming Language]
@@ -48,6 +48,7 @@
+
\RequirePackage{stmaryrd}
\RequirePackage{amsmath}
\let\Bbbk\relax\RequirePackage{amssymb}
@@ -67,8 +68,12 @@
\iexec[null]{mkdir -p "\eolang at tmpdir/\jobname"}%
+\makeatletter\newcounter{eolang at lineno}\makeatother
+
\RequirePackage{pdftexcmds}
-\makeatletter\newcommand\eolang at mdfive[1]{\pdf at filemdfivesum{#1}}\makeatother
+\makeatletter
+\newcommand\eolang at mdfive[1]{\pdf at filemdfivesum{#1}}
+\makeatother
\makeatletter
\begin{VerbatimOut}{\eolang at tmpdir/eolang-phi.pl}
@@ -107,12 +112,15 @@
$tex =~ s/-([a-z]+)>/\\mathrel{\\xrightarrow{\\text{\\sffamily\\scshape \1}}}/g;
$tex =~ s/!->/\\mathrel{\\phiConst}/g;
$tex =~ s/->/\\mathrel{\\mapsto}/g;
+$tex =~ s/~>/\\mathrel{\\phiWave}/g;
$tex =~ s/:=/\\mathrel{\\vDash}/g;
$tex =~ s/..>/\\mathrel{\\phiDotted}/g;
-$tex =~ s/\|([^\|]+)\|/\\texttt{\1}{}/g;
+$tex =~ s/\|([^\|]+)\|/\\textnormal{\\texttt{\1}}{}/g;
$tex =~ s/\[\[/\\llbracket\\mathrel{}/g;
$tex =~ s/\]\]/\\mathrel{}\\rrbracket{}/g;
if ($env ne 'phiq') {
+ $tex =~ s/\\begin\{split\}\n/\\begin{split}&/g;
+ $tex =~ s/\n\s*\\end\{split\}/\\end{split}/g;
$tex =~ s/\n\n/\\\\&/g;
$tex =~ s/\n/\\\\[-4pt]&/g;
$tex =~ s/([^&\s])\s{2}([^\s])/\1 \2/g;
@@ -147,20 +155,25 @@
perl "\eolang at tmpdir/eolang-phi.pl"
'#1'
"\eolang at tmpdir/\jobname/\hash.tex"}%
+ \setcounter{FancyVerbLine}{\value{eolang at lineno}}%
}
\newenvironment{phiquation*}%
-{\VerbatimEnvironment\begin{VerbatimOut}
+{\VerbatimEnvironment%
+\setcounter{eolang at lineno}{\value{FancyVerbLine}}%
+\begin{VerbatimOut}
{\eolang at tmpdir/\jobname/phiquation.tex}}
{\end{VerbatimOut}\eolang at process{equation*}}
\newenvironment{phiquation}%
-{\VerbatimEnvironment\begin{VerbatimOut}
+{\VerbatimEnvironment%
+\setcounter{eolang at lineno}{\value{FancyVerbLine}}%
+\begin{VerbatimOut}
{\eolang at tmpdir/\jobname/phiquation.tex}}
{\end{VerbatimOut}\eolang at process{equation}}
\makeatother
-\makeatletter\newcommand\phiq[1]{
+\makeatletter\newcommand\phiq[1]{%
\iexec[trace,quiet,stdout=\eolang at tmpdir/\jobname/phiq.tex]{
- /bin/echo '\detokenize{#1}'}
+ /bin/echo '\detokenize{#1}'}%
\def\hash{\eolang at mdfive
{\eolang at tmpdir/\jobname/phiq.tex}}%
\iexec[null]{cp "\eolang at tmpdir/\jobname/phiq.tex"
@@ -185,7 +198,7 @@
$tex =~ s/^\s+|\s+$//g;
$tex =~ s/(\\[a-zA-Z]+)\s+/\1/g;
$tex =~ s/\n\s+/\n/g;
-$tex =~ s/\|([^\|]+)\|/\\texttt{\1}/g;
+$tex =~ s/\|([^\|]+)\|/\\textnormal{\\texttt{\1}}/g;
my @cmds = split (/\n/g, $tex);
foreach my $t (@cmds) {
print '% ', $t, "\n";
@@ -215,7 +228,7 @@
if (not $opts{'data'} eq '') {
my $d = $opts{'data'};
if (index($d, '|') == -1) {
- $d = '\texttt{' . $d . '}';
+ $d = '\textnormal{\texttt{' . $d . '}}';
}
$opts{'box'} = $d;
}
@@ -281,6 +294,8 @@
"\eolang at tmpdir/eolang-sodg.pl"}
\makeatother
+\setcounter{FancyVerbLine}{0}
+
\RequirePackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{shapes}
@@ -318,7 +333,9 @@
font={\scriptsize},color=black]
\makeatletter\newenvironment{sodg}%
-{\VerbatimEnvironment\begin{VerbatimOut}
+{\VerbatimEnvironment%
+\setcounter{eolang at lineno}{\value{FancyVerbLine}}%
+\begin{VerbatimOut}
{\eolang at tmpdir/\jobname/sodg.tex}}
{\end{VerbatimOut}%
\def\hash{\eolang at mdfive
@@ -328,6 +345,7 @@
\iexec[trace,stdout=\eolang at tmpdir/\jobname/\hash-post.tex]{
perl "\eolang at tmpdir/eolang-sodg.pl"
"\eolang at tmpdir/\jobname/\hash.tex"}%
+ \setcounter{FancyVerbLine}{\value{eolang at lineno}}%
}\makeatother
\newcommand\eolang{%
@@ -338,11 +356,12 @@
\fi%
}
+\RequirePackage{hyperref}
\newcommand\phic{%
\ifdefined\anon%
- \anon[$\alpha$-calculus]{$\varphi$-calculus}%
+ \anon[\texorpdfstring{$\alpha$}{a}-calculus]{\texorpdfstring{$\varphi$}{phi}-calculus}%
\else%
- $\varphi$-calculus%
+ \texorpdfstring{$\varphi$}{phi}-calculus%
\fi%
}
@@ -357,6 +376,9 @@
\newcommand\phiConst{%
\mathrel{\hspace{.15em}}\mapstochar\mathrel{\hspace{-.15em}}\mapsto}
+\newcommand\phiWave{%
+ \mapstochar\mathrel{\mspace{0.45mu}}\leadsto}
+
\RequirePackage{trimclip}
\RequirePackage{amsfonts}
\makeatletter
More information about the tex-live-commits
mailing list.