yegor256 / iexec

Execute a command-line command from LaTeX, check the exit code, and then \input the result into the document
https://ctan.org/pkg/iexec
MIT License
6 stars 2 forks source link
latex latex-package shell

l3build CTAN License

This LaTeX package helps you execute commands from the document and then input their output. The package uses shellesc package. The development of this package was motivated by this.

First, install it from CTAN and then use in the preamble:

\documentclass{article}
\usepackage[unskip]{iexec}
\begin{document}
Today is \iexec{date +\%e-\%b-\%Y}.
\end{document}

Otherwise, you can download iexec.sty and add to your project.

The full example and all commands are available in the iexec.pdf file.

If you want to contribute yourself, make a fork, then create a branch, then run make in the root directory. It should compile everything without errors. If not, submit an issue and wait. Otherwise, make your changes and then run make again. If the build is still clean, submit a pull request.