summaryrefslogtreecommitdiff
path: root/macros/luatex/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-01-11 03:01:30 +0000
committerNorbert Preining <norbert@preining.info>2024-01-11 03:01:30 +0000
commitb14090c9f3c7797e26fed9eb2b83ce144dcb16a3 (patch)
tree95ddb409d32efce7b7e9c8353ccdbe648b86ae1f /macros/luatex/latex
parentcdb8117b8f1ac752d1927b82759c5be9f0ec0ab5 (diff)
CTAN sync 202401110301
Diffstat (limited to 'macros/luatex/latex')
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.lua12
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.pdfbin83317 -> 83317 bytes
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.sty2
-rw-r--r--macros/luatex/latex/pyluatex/pyluatex.tex2
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
index c3623287dd..0ad3ce0a45 100644
--- a/macros/luatex/latex/pyluatex/pyluatex.pdf
+++ b/macros/luatex/latex/pyluatex/pyluatex.pdf
Binary files differ
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