Is it possible to run a simple script inside LuaLaTeX or LaTeX?
For example, I need to use the calculator from the terminal. I'd like to write
$echo "100.83*4.53" | bc
and obtain the result in LuaLaTeX or LaTeX. Is there a command (called \runscript
, for instance) that runs a script from within LuaLaTeX or LaTeX and that I could use as follows:
\runscript{echo "100.83*4.53" | bc}
and get "456.7599" as result?
Is it possible, perhaps with some Perl or Python script?
os.exec
in LuaTeX? Is it practical?os.exec()
is perfect for that taskLaTeX
solution is explained here.