diff options
author | Karl Berry <karl@freefriends.org> | 2022-11-29 21:09:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-11-29 21:09:04 +0000 |
commit | 24d395b004e4e1f571430b915fcc2e4bb95326cb (patch) | |
tree | 97ecc84b81f18077e5c0e48ff003db1f95813395 /Master/texmf-dist/tex | |
parent | be54347cca905f0baabd59f0bd63a09800b942bb (diff) |
eolang (29nov22)
git-svn-id: svn://tug.org/texlive/trunk@65142 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/eolang/eolang.sty | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/latex/eolang/eolang.sty b/Master/texmf-dist/tex/latex/eolang/eolang.sty index ff8b74b6f5b..66a31bd43b2 100644 --- a/Master/texmf-dist/tex/latex/eolang/eolang.sty +++ b/Master/texmf-dist/tex/latex/eolang/eolang.sty @@ -31,7 +31,8 @@ \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] + @@ -87,9 +88,10 @@ tmpdir/.store in=\eolang@tmpdir, tmpdir/.default=_eolang\ifxetex-xe\else\ifluatex-lua\fi\fi, nocomments/.store in=\eolang@nocomments, + anonymous/.store in=\eolang@anonymous, tmpdir } -\ProcessPgfOptions{/eolang} +\ProcessPgfPackageOptions{/eolang} \iexec[null]{mkdir -p "\eolang@tmpdir/\jobname"}% @@ -177,11 +179,11 @@ if ($macro ne 'phiq') { $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+@leads == 0+@eols && 0+@eols > 0) { - $tex =~ s/&${lead}/\1&/g; + if (0+@leads == 0+@eols && 0+@eols > 1) { + $tex =~ s/&(${lead})/\1&/g; $gathered = 0; print '% The "gathered" is NOT used because all ' . (0+@eols) . ' lines are ' . (0+@leads) . " leads\n"; @@ -252,6 +254,7 @@ print '\endinput'; {\eolang@tmpdir/\jobname/phiquation.tex}}% \iexec[null]{cp "\eolang@tmpdir/\jobname/phiquation.tex" "\eolang@tmpdir/\jobname/\hash.tex"}% + \message{Start parsing 'phi' at line no. \the\inputlineno^^J} \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-post.tex]{ perl "\eolang@tmpdir/eolang-phi.pl" '#1' @@ -677,6 +680,7 @@ print '\endinput'; \iexec[null]{cp "\eolang@tmpdir/\jobname/sodg.tex" "\eolang@tmpdir/\jobname/\hash.tex"}% \catcode`\$=3 % + \message{Start parsing `sodg' at line no. \the\inputlineno^^J} \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-post.tex]{ perl "\eolang@tmpdir/eolang-sodg.pl" "\eolang@tmpdir/\jobname/\hash.tex" @@ -687,31 +691,27 @@ print '\endinput'; \def\eolang@sodgSaveTo{\relax}% }\makeatother -\newcommand\eolang{% - \ifdefined\anon% - \anon[XYZ]{{\sffamily EO}}% +\makeatletter +\NewExpandableDocumentCommand{\eolang@anon}{O{ANONYMIZED}m}{% + \ifdefined\eolang@anonymous% + \textcolor{orange}{#1}% \else% - {\sffamily EO}% + #2% \fi% -} +}\makeatother + +\makeatletter\newcommand\eolang{% + \eolang@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@anon[$\alpha$-cal\-cu\-lus]{$\varphi$-cal\-cu\-lus}} +\makeatother -\newcommand\xmir{% - \ifdefined\anon% - \anon[XML$^+$]{XMIR}% - \else% - XMIR% - \fi% -} +\makeatletter\newcommand\xmir{% + \eolang@anon[XML$^+$]{XMIR}} +\makeatother \newcommand\phiConst{% \mathrel{\hspace{.15em}}% |