diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/eolang/DEPENDS.txt | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/eolang/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/eolang/eolang.pdf | bin | 1931964 -> 1935887 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/eolang/eolang.dtx | 115 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/eolang/eolang.sty | 98 |
5 files changed, 151 insertions, 66 deletions
diff --git a/Master/texmf-dist/doc/latex/eolang/DEPENDS.txt b/Master/texmf-dist/doc/latex/eolang/DEPENDS.txt index ea34111dee2..d4273d33234 100644 --- a/Master/texmf-dist/doc/latex/eolang/DEPENDS.txt +++ b/Master/texmf-dist/doc/latex/eolang/DEPENDS.txt @@ -18,6 +18,7 @@ soft cmap soft comment soft docshots soft environ +soft float soft href-ul soft hypdoc soft hyperxmp @@ -25,6 +26,7 @@ soft iexec soft ifmtarg soft l3build soft libertine +soft microtype soft ncctools soft scheme-basic soft setspace diff --git a/Master/texmf-dist/doc/latex/eolang/README.md b/Master/texmf-dist/doc/latex/eolang/README.md index 27d09c503e9..588b1557801 100644 --- a/Master/texmf-dist/doc/latex/eolang/README.md +++ b/Master/texmf-dist/doc/latex/eolang/README.md @@ -22,7 +22,7 @@ x -> [ \end{document} ``` -Otherwise, you can download [`eolang.sty`](https://raw.githubusercontent.com/objectionary/eolang.sty/gh-pages/eolang/eolang.sty) and add to your project. +Otherwise, you can download [`eolang.sty`](https://yegor256.github.io/eolang/eolang.sty) and add to your project. If you want to contribute yourself, make a fork, then create a branch, then run `l3build ctan` in the root directory. diff --git a/Master/texmf-dist/doc/latex/eolang/eolang.pdf b/Master/texmf-dist/doc/latex/eolang/eolang.pdf Binary files differindex 612b3eda536..c970e3b1899 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 32a617a0839..9407f46eb61 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> -[2023-08-10 0.15.0 Formulas and Graphs for EO Programming Language] +[2023-12-28 0.17.0 Formulas and Graphs for EO Programming Language] %</package> %<*driver> \documentclass{ltxdoc} @@ -86,7 +86,14 @@ % \textbf{\color{red}NB!} % You must run \TeX{} processor with |--shell-escape| option % and you must have \href{https://www.perl.org}{Perl} installed. -% This package doesn't work on Windows. +% If you omit the |--shell-escape| option, the package will try +% to use cached files, if they exist. If they don't, compilation will +% crash. Thus, when you must prepare your document for a compilation +% without the |--shell-escape| option, run it locally with the option +% and then package all files (including the files in the |_eolang| directory) +% into a single ZIP archive. +% +% If |--shell-escape| is set, this package doesn't work on Windows. % \section{Introduction} % @@ -771,7 +778,12 @@ % Then, we make a directory where all temporary files will be kept: % \begin{macrocode} -\iexec[null]{mkdir -p "\eolang@tmpdir/\jobname"}% +\ifnum\ShellEscapeStatus=1% + \iexec[null]{mkdir -p "\eolang@tmpdir/\jobname"}% +\else% + \message{eolang: Temporary directory "\eolang@tmpdir/\jobname" + is not created, because --shell-escape is not set^^J}% +\fi% % \end{macrocode} % \begin{macro}{\eolang@lineno} @@ -820,7 +832,7 @@ $macro = $ARGV[0]; open(my $fh, '<', $ARGV[1]); my $tex; { local $/; $tex = <$fh>; } -print "% This file is auto-generated by 0.15.0\n"; +print "% This file is auto-generated by 0.17.0\n"; print '% There are ', length($tex), ' chars in the input: ', $ARGV[1], "\n"; print '% ---', "\n"; @@ -1002,22 +1014,51 @@ print '\endinput'; % \end{macrocode} % \end{macro} +% \begin{macro}{\eolang@ifabsent} +% \changes{0.17.0}{2023/12/28}{A new supplementary \texttt{eolang@ifabsent} command added} +% Then, we define the |\eolang@ifabsent| command, which if a given file is absent, runs a processing command, otherwise just inputs it: +% \begin{macrocode} +\makeatletter +\newcommand\eolang@ifabsent[2]{% + \IfFileExists + {#1} + {% + \message{eolang: File "#1" already exists ^^J}% + \input{#1}} + {% + \ifnum\ShellEscapeStatus=1\else% + \message{eolang: The --shell-escape command line + option is not provided, most probably compilation + will fail now:^^J}% + \fi% + #2% + }% +} +\makeatother +% \end{macrocode} +% \end{macro} + % \begin{macro}{phiquation} +% \changes{0.16.0}{2023/12/27}{The processing of \texttt{phiquation} data is done only if it's the first time processing, otherwise cache is used, thus making processing faster.} % Then, we define the |phiquation| and the |phiquation*| environments through a supplementary % |\eolang@process| command: % \begin{macrocode} \makeatletter\newcommand\eolang@process[1]{ \def\hash{\eolang@mdfive - {\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' - "\eolang@tmpdir/\jobname/\hash.tex" - \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi - \ifdefined\eolang@phiSaveTo > \eolang@phiSaveTo\fi}% + {\eolang@tmpdir/\jobname/phiquation.tex}-\the\inputlineno}% + \eolang@ifabsent + {\eolang@tmpdir/\jobname/\hash-post.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' + "\eolang@tmpdir/\jobname/\hash.tex" + \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi + \ifdefined\eolang@phiSaveTo > \eolang@phiSaveTo\fi}% + }% \setcounter{FancyVerbLine}{\value{eolang@lineno}}% \def\eolang@phiSaveTo{\relax}% } @@ -1046,17 +1087,20 @@ print '\endinput'; \RequirePackage{xstring} \makeatletter\newcommand\phiq[1]{% \StrSubstitute{\detokenize{#1}}{'}{'"'"'}[\clean]% - \iexec[log,trace,quiet,stdout=\eolang@tmpdir/\jobname/phiq.tex]{ - /bin/echo '\clean'}% - \def\hash{\eolang@mdfive - {\eolang@tmpdir/\jobname/phiq.tex}}% - \iexec[null]{cp "\eolang@tmpdir/\jobname/phiq.tex" - "\eolang@tmpdir/\jobname/\hash.tex"}% + \def\hash{\pdf@mdfivesum{\clean}-\the\inputlineno}% \ifdefined\eolang@nodollar\else\catcode`\$=3 \fi% - \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-post.tex]{ - perl \eolang@tmpdir/eolang-phi.pl 'phiq' - "\eolang@tmpdir/\jobname/\hash.tex" - \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi}% + \eolang@ifabsent + {\eolang@tmpdir/\jobname/\hash-phiq-post.tex} + {% + \iexec[log,trace,quiet,stdout=\eolang@tmpdir/\jobname/phiq.tex]{ + /bin/echo '\clean'}% + \iexec[quiet,null]{cp "\eolang@tmpdir/\jobname/phiq.tex" + "\eolang@tmpdir/\jobname/\hash-phiq.tex"}% + \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-phiq-post.tex]{ + perl \eolang@tmpdir/eolang-phi.pl 'phiq' + "\eolang@tmpdir/\jobname/\hash-phiq.tex" + \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g' \fi}% + }% \ifdefined\eolang@nodollar\else\catcode`\$\active\fi% }\makeatother % \end{macrocode} @@ -1495,6 +1539,7 @@ print '\endinput'; % \begin{macro}{sodg} % \changes{0.0.2}{2022/10/20}{The environment \texttt{phigure} renamed to \texttt{sodg} for the sake of better semantic. The graph in the picture is solely a SODG graph, that's why the name \texttt{sodg} is better.} +% \changes{0.16.0}{2023/12/27}{The processing of \texttt{sodg} data is done only if it's the first time processing, otherwise cache is used, thus making processing faster.} % Then, we create a new environment |sodg|, as suggested % \href{https://tex.stackexchange.com/questions/661056}{here}: % \begin{macrocode} @@ -1505,16 +1550,20 @@ print '\endinput'; {\eolang@tmpdir/\jobname/sodg.tex}} {\end{VerbatimOut}% \def\hash{\eolang@mdfive - {\eolang@tmpdir/\jobname/sodg.tex}}% - \iexec[null]{cp "\eolang@tmpdir/\jobname/sodg.tex" - "\eolang@tmpdir/\jobname/\hash.tex"}% + {\eolang@tmpdir/\jobname/sodg.tex}-\the\inputlineno}% \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" - \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi - \ifdefined\eolang@sodgSaveTo > \eolang@sodgSaveTo\fi}% + \eolang@ifabsent + {\eolang@tmpdir/\jobname/\hash-sodg-post.tex} + {% + \iexec[null]{cp "\eolang@tmpdir/\jobname/sodg.tex" + "\eolang@tmpdir/\jobname/\hash.tex"}% + \message{eolang: Start parsing `sodg' at line no. \the\inputlineno^^J} + \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-sodg-post.tex]{ + perl "\eolang@tmpdir/eolang-sodg.pl" + "\eolang@tmpdir/\jobname/\hash.tex" + \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi + \ifdefined\eolang@sodgSaveTo > \eolang@sodgSaveTo\fi}% + } \catcode`\$\active% \setcounter{FancyVerbLine}{\value{eolang@lineno}}% \def\eolang@sodgSaveTo{\relax}% diff --git a/Master/texmf-dist/tex/latex/eolang/eolang.sty b/Master/texmf-dist/tex/latex/eolang/eolang.sty index a8637e129c9..33b104035f6 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} -[2023-08-10 0.15.0 Formulas and Graphs for EO Programming Language] +[2023-12-28 0.17.0 Formulas and Graphs for EO Programming Language] @@ -99,7 +99,12 @@ } \ProcessPgfPackageOptions{/eolang} -\iexec[null]{mkdir -p "\eolang@tmpdir/\jobname"}% +\ifnum\ShellEscapeStatus=1% + \iexec[null]{mkdir -p "\eolang@tmpdir/\jobname"}% +\else% + \message{eolang: Temporary directory "\eolang@tmpdir/\jobname" + is not created, because --shell-escape is not set^^J}% +\fi% \makeatletter\newcounter{eolang@lineno}\makeatother @@ -113,7 +118,7 @@ $macro = $ARGV[0]; open(my $fh, '<', $ARGV[1]); my $tex; { local $/; $tex = <$fh>; } -print "% This file is auto-generated by 0.15.0\n"; +print "% This file is auto-generated by 0.17.0\n"; print '% There are ', length($tex), ' chars in the input: ', $ARGV[1], "\n"; print '% ---', "\n"; @@ -287,18 +292,40 @@ print '\endinput'; \newcommand\phiSaveTo[1]{\def\eolang@phiSaveTo{#1}} \makeatother +\makeatletter +\newcommand\eolang@ifabsent[2]{% + \IfFileExists + {#1} + {% + \message{eolang: File "#1" already exists ^^J}% + \input{#1}} + {% + \ifnum\ShellEscapeStatus=1\else% + \message{eolang: The --shell-escape command line + option is not provided, most probably compilation + will fail now:^^J}% + \fi% + #2% + }% +} +\makeatother + \makeatletter\newcommand\eolang@process[1]{ \def\hash{\eolang@mdfive - {\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' - "\eolang@tmpdir/\jobname/\hash.tex" - \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi - \ifdefined\eolang@phiSaveTo > \eolang@phiSaveTo\fi}% + {\eolang@tmpdir/\jobname/phiquation.tex}-\the\inputlineno}% + \eolang@ifabsent + {\eolang@tmpdir/\jobname/\hash-post.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' + "\eolang@tmpdir/\jobname/\hash.tex" + \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi + \ifdefined\eolang@phiSaveTo > \eolang@phiSaveTo\fi}% + }% \setcounter{FancyVerbLine}{\value{eolang@lineno}}% \def\eolang@phiSaveTo{\relax}% } @@ -319,17 +346,20 @@ print '\endinput'; \RequirePackage{xstring} \makeatletter\newcommand\phiq[1]{% \StrSubstitute{\detokenize{#1}}{'}{'"'"'}[\clean]% - \iexec[log,trace,quiet,stdout=\eolang@tmpdir/\jobname/phiq.tex]{ - /bin/echo '\clean'}% - \def\hash{\eolang@mdfive - {\eolang@tmpdir/\jobname/phiq.tex}}% - \iexec[null]{cp "\eolang@tmpdir/\jobname/phiq.tex" - "\eolang@tmpdir/\jobname/\hash.tex"}% + \def\hash{\pdf@mdfivesum{\clean}-\the\inputlineno}% \ifdefined\eolang@nodollar\else\catcode`\$=3 \fi% - \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-post.tex]{ - perl \eolang@tmpdir/eolang-phi.pl 'phiq' - "\eolang@tmpdir/\jobname/\hash.tex" - \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi}% + \eolang@ifabsent + {\eolang@tmpdir/\jobname/\hash-phiq-post.tex} + {% + \iexec[log,trace,quiet,stdout=\eolang@tmpdir/\jobname/phiq.tex]{ + /bin/echo '\clean'}% + \iexec[quiet,null]{cp "\eolang@tmpdir/\jobname/phiq.tex" + "\eolang@tmpdir/\jobname/\hash-phiq.tex"}% + \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-phiq-post.tex]{ + perl \eolang@tmpdir/eolang-phi.pl 'phiq' + "\eolang@tmpdir/\jobname/\hash-phiq.tex" + \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g' \fi}% + }% \ifdefined\eolang@nodollar\else\catcode`\$\active\fi% }\makeatother @@ -722,16 +752,20 @@ print '\endinput'; {\eolang@tmpdir/\jobname/sodg.tex}} {\end{VerbatimOut}% \def\hash{\eolang@mdfive - {\eolang@tmpdir/\jobname/sodg.tex}}% - \iexec[null]{cp "\eolang@tmpdir/\jobname/sodg.tex" - "\eolang@tmpdir/\jobname/\hash.tex"}% + {\eolang@tmpdir/\jobname/sodg.tex}-\the\inputlineno}% \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" - \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi - \ifdefined\eolang@sodgSaveTo > \eolang@sodgSaveTo\fi}% + \eolang@ifabsent + {\eolang@tmpdir/\jobname/\hash-sodg-post.tex} + {% + \iexec[null]{cp "\eolang@tmpdir/\jobname/sodg.tex" + "\eolang@tmpdir/\jobname/\hash.tex"}% + \message{eolang: Start parsing `sodg' at line no. \the\inputlineno^^J} + \iexec[trace,stdout=\eolang@tmpdir/\jobname/\hash-sodg-post.tex]{ + perl "\eolang@tmpdir/eolang-sodg.pl" + "\eolang@tmpdir/\jobname/\hash.tex" + \ifdefined\eolang@nocomments | perl -pe 's/\%.*(\\n|$)//g'\fi + \ifdefined\eolang@sodgSaveTo > \eolang@sodgSaveTo\fi}% + } \catcode`\$\active% \setcounter{FancyVerbLine}{\value{eolang@lineno}}% \def\eolang@sodgSaveTo{\relax}% |