summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/iexec
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-13 03:00:55 +0000
committerNorbert Preining <norbert@preining.info>2021-07-13 03:00:55 +0000
commit4ac920a9909dd7d233ed3662bb576e1ae4ade873 (patch)
tree946aeeae5a3e59d9ec5aec51ee0520dbc712af55 /macros/latex/contrib/iexec
parent1caaed73030c69f9f96c5138594089e2689e768b (diff)
CTAN sync 202107130300
Diffstat (limited to 'macros/latex/contrib/iexec')
-rw-r--r--macros/latex/contrib/iexec/README.md3
-rw-r--r--macros/latex/contrib/iexec/iexec.pdfbin108202 -> 108132 bytes
-rw-r--r--macros/latex/contrib/iexec/iexec.sty8
-rw-r--r--macros/latex/contrib/iexec/iexec.tex12
4 files changed, 14 insertions, 9 deletions
diff --git a/macros/latex/contrib/iexec/README.md b/macros/latex/contrib/iexec/README.md
index 2025d21ebd..226069a29f 100644
--- a/macros/latex/contrib/iexec/README.md
+++ b/macros/latex/contrib/iexec/README.md
@@ -2,7 +2,8 @@
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/iexec/blob/master/LICENSE.txt)
This LaTeX package helps you execute commands from the document and then input
-their output. The package uses [`ShellEscape`](https://ctan.org/pkg/ShellEscape) package.
+their output. The package uses [`shellesc`](https://ctan.org/pkg/shellesc) package.
+The development of this package was motivated by [this](https://stackoverflow.com/questions/3252957).
First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
from [CTAN](https://ctan.org/pkg/iexec)
diff --git a/macros/latex/contrib/iexec/iexec.pdf b/macros/latex/contrib/iexec/iexec.pdf
index 044e9bea67..a47a9869fd 100644
--- a/macros/latex/contrib/iexec/iexec.pdf
+++ b/macros/latex/contrib/iexec/iexec.pdf
Binary files differ
diff --git a/macros/latex/contrib/iexec/iexec.sty b/macros/latex/contrib/iexec/iexec.sty
index 91d10955c3..34898e324c 100644
--- a/macros/latex/contrib/iexec/iexec.sty
+++ b/macros/latex/contrib/iexec/iexec.sty
@@ -21,7 +21,7 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{iexec}[2021/07/10 0.3.0 Inputable Shell Executions]
+\ProvidesPackage{iexec}[2021/07/12 0.3.1 Inputable Shell Executions]
\RequirePackage{shellesc}
@@ -33,12 +33,14 @@
\makeatletter\newcommand\iexec[2][iexec.tmp]{%
\begingroup%
\let\%\@percentchar%
+ \let\\\@backslashchar%
\let\{\@charlb%
\let\}\@charrb%
\ShellEscape{#2 > #1}%
+ \message{iexec executed shell command: [#2 > #1]}%
\endgroup%
- \input{#1}\unskip%
- \iftrace\else\exec{rm #1}\fi%
+ \input{#1}%
+ \iftrace\else\ShellEscape{rm #1}\fi%
}\makeatother
\endinput
diff --git a/macros/latex/contrib/iexec/iexec.tex b/macros/latex/contrib/iexec/iexec.tex
index 150c8fa882..098a297045 100644
--- a/macros/latex/contrib/iexec/iexec.tex
+++ b/macros/latex/contrib/iexec/iexec.tex
@@ -27,7 +27,7 @@
\usepackage{ffcode}
\title{\ff{iexec}: \LaTeX{} Package \\ for Inputable Shell Executions}
\author{Yegor Bugayenko}
-\date{0.3.0 2021/07/10}
+\date{0.3.1 2021/07/12}
\begin{document}
\pagenumbering{gobble}
\raggedbottom
@@ -47,17 +47,17 @@ document and then put their output to the document:
\documentclass{article}
\usepackage{iexec}
\begin{document}
-Today is \iexec{date +\%e-\%b-\%Y}.
+Today is \iexec{date +\%e-\%b-\%Y}
\end{document}
\end{ffcode}
\columnbreak
-Today is \iexec{date +\%e-\%b-\%Y}.
+Today is \iexec{date +\%e-\%b-\%Y | tr -d '\\n'}
\end{multicols}
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.
+in order to let \ff{shellesc} (the package we use) to run shell.
If you don't want the output to be visible,
use \ff{\char`\\phantom\char`\{\char`\\iexec\char`\{...\char`\}\char`\}}.
@@ -66,9 +66,11 @@ 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}.
+Today is \iexec[date.txt]{date +\%e-\%b-\%Y | tr -d '\\n'}.
\end{ffcode}
+The tailing part of the command here removes all ends-of-line.
+
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.