texlive[59891] Master: iexec (10jul21)
commits+karl at tug.org
commits+karl at tug.org
Sat Jul 10 23:04:20 CEST 2021
Revision: 59891
http://tug.org/svn/texlive?view=revision&revision=59891
Author: karl
Date: 2021-07-10 23:04:20 +0200 (Sat, 10 Jul 2021)
Log Message:
-----------
iexec (10jul21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/iexec/iexec.pdf
trunk/Master/texmf-dist/doc/latex/iexec/iexec.tex
trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty
trunk/Master/tlpkg/tlpsrc/iexec.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/iexec/DEPENDS.txt
Added: trunk/Master/texmf-dist/doc/latex/iexec/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/iexec/DEPENDS.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/iexec/DEPENDS.txt 2021-07-10 21:04:20 UTC (rev 59891)
@@ -0,0 +1,2 @@
+hard shellesc
+hard xkeyval
Property changes on: trunk/Master/texmf-dist/doc/latex/iexec/DEPENDS.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/iexec/iexec.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/iexec/iexec.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/iexec/iexec.tex 2021-07-10 21:03:31 UTC (rev 59890)
+++ trunk/Master/texmf-dist/doc/latex/iexec/iexec.tex 2021-07-10 21:04:20 UTC (rev 59891)
@@ -21,13 +21,13 @@
% SOFTWARE.
\documentclass[12pt]{article}
+\usepackage[trace]{iexec}
\usepackage[tt=false,type1=true]{libertine}
\usepackage{multicol}
\usepackage{ffcode}
-\usepackage{iexec}
\title{\ff{iexec}: \LaTeX{} Package \\ for Inputable Shell Executions}
\author{Yegor Bugayenko}
-\date{0.1.0 2021/07/08}
+\date{0.3.0 2021/07/10}
\begin{document}
\pagenumbering{gobble}
\raggedbottom
@@ -43,13 +43,13 @@
\setlength{\parskip}{0pt}
\scriptsize
\raggedcolumns
-\begin{verbatim}
+\begin{ffcode}
\documentclass{article}
\usepackage{iexec}
\begin{document}
Today is \iexec{date +\%e-\%b-\%Y}.
\end{document}
-\end{verbatim}
+\end{ffcode}
\columnbreak
@@ -56,13 +56,23 @@
Today is \iexec{date +\%e-\%b-\%Y}.
\end{multicols}
-You have to run \ff{pdflatex} with the \ff{--shell-escape} flag
+You have to run \ff{pdflatex} (or just \ff{latex}) with the \ff{--shell-escape} flag
in order to let \ff{ShellEscape} (the package we use) to run shell.
-There are two commands: \ff{\char`\\exec} and \ff{\char`\\iexec}.
-The first one executes, while the second one also inputs the output
-of the execution.
+If you don't want the output to be visible,
+use \ff{\char`\\phantom\char`\{\char`\\iexec\char`\{...\char`\}\char`\}}.
+The output of your code is saved into the file provided as the
+second optional argument of \ff{\char`\\iexec} (the default value is \ff{iexec.tmp}):
+
+\begin{ffcode}
+Today is \iexec[date.txt]{date +\%e-\%b-\%Y}.
+\end{ffcode}
+
+The file specified will be deleted right after its usage. If you don't
+want this to happen, use \ff{trace} package option: all files will remain
+in the directory.
+
More details about this package you can find
in the \ff{yegor256/iexec} GitHub repository.
Modified: trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty 2021-07-10 21:03:31 UTC (rev 59890)
+++ trunk/Master/texmf-dist/tex/latex/iexec/iexec.sty 2021-07-10 21:04:20 UTC (rev 59891)
@@ -21,22 +21,24 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{iexec}[2021/07/08 0.1.0 Inputable Shell Executions]
+\ProvidesPackage{iexec}[2021/07/10 0.3.0 Inputable Shell Executions]
-\makeatletter\newcommand\exec[1]{%
+\RequirePackage{shellesc}
+
+\RequirePackage{xkeyval}
+\newif\iftrace
+\DeclareOptionX{trace}{\tracetrue}
+\ProcessOptionsX\relax
+
+\makeatletter\newcommand\iexec[2][iexec.tmp]{%
\begingroup%
\let\%\@percentchar%
\let\{\@charlb%
\let\}\@charrb%
- \ShellEscape{#1}%
+ \ShellEscape{#2 > #1}%
\endgroup%
+ \input{#1}\unskip%
+ \iftrace\else\exec{rm #1}\fi%
}\makeatother
-\newcommand\iexec[1]{%
- \exec{#1 > iexec.tmp}%
- \exec{echo >> iexec.tmp}%
- \input{iexec.tmp}\unskip%
- \exec{rm iexec.tmp}%
-}\makeatother
-
\endinput
Modified: trunk/Master/tlpkg/tlpsrc/iexec.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/iexec.tlpsrc 2021-07-10 21:03:31 UTC (rev 59890)
+++ trunk/Master/tlpkg/tlpsrc/iexec.tlpsrc 2021-07-10 21:04:20 UTC (rev 59891)
@@ -0,0 +1,2 @@
+depend shellesc
+depend xkeyval
More information about the tex-live-commits
mailing list.