summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/iexec
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-10-09 20:17:02 +0000
committerKarl Berry <karl@freefriends.org>2022-10-09 20:17:02 +0000
commit8a6d48a527b72509e633ae27ce04f49a09abd7fa (patch)
treef0387c918616a771255b8d73971e7564c7b78f20 /Master/texmf-dist/tex/latex/iexec
parent397183e0ea8dbd39bacd6c3e44225ef8755e72af (diff)
iexec (9oct22)
git-svn-id: svn://tug.org/texlive/trunk@64663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/iexec')
-rw-r--r--Master/texmf-dist/tex/latex/iexec/iexec.sty36
1 files changed, 31 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/iexec/iexec.sty b/Master/texmf-dist/tex/latex/iexec/iexec.sty
index 1476f02bdc5..5477d07a062 100644
--- a/Master/texmf-dist/tex/latex/iexec/iexec.sty
+++ b/Master/texmf-dist/tex/latex/iexec/iexec.sty
@@ -31,7 +31,9 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{iexec}
-[01.10.2022 0.6.1 Inputable Shell Executions]
+[09.10.20220 0.7.0 Inputable Shell Executions]
+
+
@@ -45,6 +47,8 @@
\RequirePackage{shellesc}
\RequirePackage{pgfkeys}
+\RequirePackage{expl3}
+
\RequirePackage{xkeyval}
\makeatletter\newif\ifiexec@trace
\DeclareOptionX{trace}{\iexec@tracetrue}
@@ -55,15 +59,30 @@
stdout/.estore in = \iexec@stdout,
stdout/.default = iexec.tmp,
trace/.estore in = \iexec@traceit,
+ append/.estore in = \iexec@append,
+ log/.estore in = \iexec@log,
quiet/.estore in = \iexec@quiet,
stdout
}\makeatother
+\makeatletter\ExplSyntaxOn
+\NewDocumentCommand{\iexec@typeout}{m}{
+ \iexec_typeout_file:n { #1 }}
+\ior_new:N \g_iexec_typeout_ior
+\cs_new_protected:Nn \iexec_typeout_file:n
+{
+ \ior_open:Nn \g_iexec_typeout_ior { #1 }
+ \ior_str_map_inline:Nn \g_iexec_typeout_ior
+ {\iow_term:n { ##1 }}
+ \ior_close:N \g_iexec_typeout_ior
+}
+\ExplSyntaxOff\makeatother
+
\makeatletter\newcommand\iexec[2][]{%
\begingroup
\pgfqkeys{/iexec}{#1}%
\ifdefined\pdfshellescape\ifnum\pdfshellescape=1\else%
- \PackageError{iexec}{You must run latex with
+ \PackageError{iexec}{You must run TeX processor with
--shell-escape option}{}%
\fi\fi%
\begingroup%
@@ -71,13 +90,20 @@
\let\\\@backslashchar%
\let\{\@charlb%
\let\}\@charrb%
- \ShellEscape{#2 > \iexec@stdout}%
+ \ShellEscape{#2 \ifdefined\iexec@append>\fi> \iexec@stdout}%
\message{^^Jiexec: [#2 > \iexec@stdout]^^J}%
\endgroup%
+ \ifdefined\iexec@log
+ \message{^^Jiexec: this is the content of \iexec@stdout:^^J}%
+ \iexec@typeout{\iexec@stdout}
+ \message{^^J<EOF>^^J}%
+ \fi%
\ifdefined\iexec@quiet
- \message{^^Jiexec: Due to 'quiet' we didn't read
- the content of '\iexec@stdout'^^J}%
+ \message{^^Jiexec: Due to 'quiet' option we didn't read
+ the content of '\iexec@stdout' (\pdffilesize{} bytes)^^J}%
\else%
+ \message{^^Jiexec: We include the content of
+ '\iexec@stdout' (\pdffilesize{} bytes)...^^J}%
\input{\iexec@stdout}%
\message{^^Jiexec: The content of '\iexec@stdout'
was included into the document^^J}%