diff options
author | Norbert Preining <norbert@preining.info> | 2024-01-11 03:01:30 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-01-11 03:01:30 +0000 |
commit | b14090c9f3c7797e26fed9eb2b83ce144dcb16a3 (patch) | |
tree | 95ddb409d32efce7b7e9c8353ccdbe648b86ae1f /macros/luatex/latex | |
parent | cdb8117b8f1ac752d1927b82759c5be9f0ec0ab5 (diff) |
CTAN sync 202401110301
Diffstat (limited to 'macros/luatex/latex')
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.lua | 12 | ||||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.pdf | bin | 83317 -> 83317 bytes | |||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.sty | 2 | ||||
-rw-r--r-- | macros/luatex/latex/pyluatex/pyluatex.tex | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/macros/luatex/latex/pyluatex/pyluatex.lua b/macros/luatex/latex/pyluatex/pyluatex.lua index 7ec06f8ea6..3540748020 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.lua +++ b/macros/luatex/latex/pyluatex/pyluatex.lua @@ -67,6 +67,14 @@ local function not_empty(str) return str ~= nil and str ~= "" end +local function split_lines(str) + local lines = str:splitlines() + if lines[#lines] == "" then + table.remove(lines, #lines) + end + return lines +end + function pyluatex.start(executable, local_imports) local script = file.join(folder, "pyluatex-interpreter.py") @@ -130,8 +138,8 @@ function pyluatex.execute(code, auto_print, write, repl_mode, store) repl_mode = repl_mode, ignore_errors = pyluatex.ignore_errors }) - local code_lines = code:splitlines() - local output_lines = resp.output:splitlines() + local code_lines = split_lines(code) + local output_lines = split_lines(resp.output) if store then last_code = code_lines last_output = output_lines diff --git a/macros/luatex/latex/pyluatex/pyluatex.pdf b/macros/luatex/latex/pyluatex/pyluatex.pdf Binary files differindex c3623287dd..0ad3ce0a45 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.pdf +++ b/macros/luatex/latex/pyluatex/pyluatex.pdf diff --git a/macros/luatex/latex/pyluatex/pyluatex.sty b/macros/luatex/latex/pyluatex/pyluatex.sty index 2b0575a830..1f0eb3bd53 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.sty +++ b/macros/luatex/latex/pyluatex/pyluatex.sty @@ -9,7 +9,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{pyluatex}[2024/01/07 v0.6.2 Execute Python code on the fly] +\ProvidesPackage{pyluatex}[2024/01/10 v0.6.3 Execute Python code on the fly] \RequirePackage{expl3} \ExplSyntaxOn diff --git a/macros/luatex/latex/pyluatex/pyluatex.tex b/macros/luatex/latex/pyluatex/pyluatex.tex index 5080c4b52f..15e8c4f9f2 100644 --- a/macros/luatex/latex/pyluatex/pyluatex.tex +++ b/macros/luatex/latex/pyluatex/pyluatex.tex @@ -15,7 +15,7 @@ \usepackage{url} \title{The \emph{pyluatex} package} \author{Tobias Enderle\\\url{https://github.com/tndrle/PyLuaTeX}} -\date{v0.6.2 (2024/01/07)} +\date{v0.6.3 (2024/01/10)} \begin{document} \maketitle \raggedright |