summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/iexec/iexec.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/iexec/iexec.dtx')
-rw-r--r--macros/latex/contrib/iexec/iexec.dtx50
1 files changed, 35 insertions, 15 deletions
diff --git a/macros/latex/contrib/iexec/iexec.dtx b/macros/latex/contrib/iexec/iexec.dtx
index f991912e78..12eabd6e28 100644
--- a/macros/latex/contrib/iexec/iexec.dtx
+++ b/macros/latex/contrib/iexec/iexec.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{iexec}
%<*package>
-[2022-11-01 0.11.4 Inputable Shell Executions]
+[2023-10-12 0.12.0 Inputable Shell Executions]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -94,7 +94,7 @@
% \pagestyle{empty}
% \begin{document}
% Today is \textbf{%
-% \iexec{date +\%e-\%b-\%Y}}
+% \iexec{date +\%e-\%b-\%Y}}\unskip!
% \end{document}
% \end{docshot}
@@ -114,7 +114,7 @@
% \DescribeMacro{quiet}
% If you don't want the output to be visible,
% use |\phantom\{\iexec{...}}|.
-% Otherwise, you can use |quiet| option:
+% Otherwise, you can use the ``|quiet|'' option:
%\iffalse
%<*verb>
%\fi
@@ -130,7 +130,7 @@ I just want to delete some file:
% \DescribeMacro{stdout}
% The output of your code is saved into the file provided as an
-% optional argument of |\iexec| (the default value is |iexec.tmp|):
+% optional argument of |\iexec| (the default value is ``|iexec.tmp|''):
%\iffalse
%<*verb>
%\fi
@@ -145,7 +145,7 @@ Today is \iexec[stdout=date.txt]{date +\%e-\%b-\%Y | tr -d '\\n'}.
% \DescribeMacro{stderr}
% The error output of the code is saved into the file provided as an
% optional argument of |\iexec| (by default the error output
-% is streamed into |stdout|):
+% is streamed into ``|stdout|''):
%\iffalse
%<*verb>
%\fi
@@ -157,8 +157,8 @@ Today is \iexec[stderr=my.txt]{broken-command}.
%\fi
% \DescribeMacro{exit}
-% The exit code of the command it saved into a file. You can change the name of it
-% using |exit| option:
+% The exit code of the command is saved into a file. You can change the name of it
+% using the ``|exit|'' option:
%\iffalse
%<*verb>
%\fi
@@ -171,10 +171,10 @@ Today is \iexec[exit=code.txt]{./broken-command.sh}.
% \DescribeMacro{trace}
% The file specified will be deleted right after its usage. If you don't
-% want this to happen, use |trace| package option: all files will remain
+% want this to happen, use the ``|trace|'' package option: all files will remain
% in the directory where they were created.
-% It's possible to turn tracing on globbaly, for the entire document, using
-% |trace| option of the package:
+% It's possible to turn on the tracing globbaly, for the entire document, using
+% the ``|trace|'' option of the package:
%\iffalse
%<*verb>
%\fi
@@ -190,7 +190,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
%\fi
% \DescribeMacro{append}
-% The stdout produced will be appended to the file specified:
+% The ``stdout'' produced will be appended to the file specified:
%\iffalse
%<*verb>
%\fi
@@ -207,8 +207,25 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
%</verb>
%\fi
+% \DescribeMacro{unskip}
+% In order to remove the tailing spacing after the content, you may use |unskip| package option,
+% which will append |\unskip| commmand to every |\iexec|:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\documentclass{article}
+\usepackage[unskip]{iexec}
+\begin{document}
+Today is \iexec{date +\%Y}!
+\end{document}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+
% \DescribeMacro{log}
-% The stdout produced will be printed in \TeX{} log:
+% The ``stdout'' produced will be printed in the \TeX{} log:
%\iffalse
%<*verb>
%\fi
@@ -220,7 +237,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
%\fi
% \DescribeMacro{null}
-% The stdout of the command will be sent to |/dev/null|:
+% The ``stdout'' of the command will be sent to ``|/dev/null|'':
%\iffalse
%<*verb>
%\fi
@@ -232,8 +249,8 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
%\fi
% \DescribeMacro{ignore}
-% By default, we report an error if exit code is not equal to zero. You can suppress
-% this with |ignore| option:
+% By default, we report an error if the exit code is not equal to zero. You can suppress
+% this with the ``|ignore|'' option:
%\iffalse
%<*verb>
%\fi
@@ -269,6 +286,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
% \changes{0.7.0}{2022/09/25}{The option "append" was introduced --- if it's turned on, stdout will be appended to the file, instead of rewriting it (this is how it was before).}
% \changes{0.7.0}{2022/09/25}{The option ``\texttt{log}'' was introduced, to turn on log/debug messages in TeX log (they were all visible always, which was sometimes annoying. Also, this option enables printing of the entire content of stdout to the log too (this may be pretty convenient for debugging).}
% \changes{0.11.0}{2022/10/22}{The option ``\texttt{exit}'' allows to change the name of the file with exit code.}
+% \changes{0.12.0}{2023/10/12}{The option ``\texttt{unskip}'' adds \texttt{\char`\\unskip} after each \texttt{\char`\\iexec}, in order to trip the tailing end of line space.}
% \begin{macrocode}
\RequirePackage{pgfkeys}
\makeatletter\pgfkeys{
@@ -283,6 +301,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
append/.store in = \iexec@append,
log/.store in = \iexec@log,
null/.store in = \iexec@null,
+ unskip/.store in = \iexec@unskip,
quiet/.store in = \iexec@quiet,
ignore/.store in = \iexec@ignore,
stdout,exit
@@ -423,6 +442,7 @@ This file won't be deleted: \iexec[stdout=me.txt]{whoami}.
{\iexec@stdout} bytes)\fi...^^J}%
\fi%
\input{\iexec@stdout}%
+ \ifdefined\iexec@unskip\unskip\fi%
\message{iexec: The content of '\iexec@stdout'
was included into the document^^J}%
\fi\fi%