diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty b/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty index 0709ba76000..81fa87ea827 100644 --- a/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty +++ b/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty @@ -9,7 +9,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{pyluatex}[2021/07/26 v0.2.0 Execute Python code on the fly] +\ProvidesPackage{pyluatex}[2021/08/07 v0.3.0 Execute Python code on the fly] \RequirePackage{expl3} \ExplSyntaxOn @@ -30,18 +30,20 @@ \directlua{pyluatex.start([==[\pyluatex@executable]==])} +\newcommand*{\PyLTVerbatimEnv}{\directlua{pyluatex.set_parent_env([==[\@currenvir]==])}} + \newenvironment{python}{\directlua{pyluatex.record_env(false)}}% {\directlua{pyluatex.print_env()}} \newenvironment{pythonq}{\directlua{pyluatex.record_env(true)}}{} -\newcommand*{\python@inline}[3]{\directlua{pyluatex.execute([==[#1]==], #2, #3)}} +\newcommand*{\pyluatex@inline}[3]{\directlua{pyluatex.execute([==[#1]==], #2, #3)}} -\newcommand*{\py}[1]{\python@inline{#1}{true}{true}} -\newcommand*{\pyq}[1]{\python@inline{#1}{true}{false}} +\newcommand*{\py}[1]{\pyluatex@inline{#1}{true}{true}} +\newcommand*{\pyq}[1]{\pyluatex@inline{#1}{true}{false}} -\newcommand*{\pyc}[1]{\python@inline{#1}{false}{true}} -\newcommand*{\pycq}[1]{\python@inline{#1}{false}{false}} +\newcommand*{\pyc}[1]{\pyluatex@inline{#1}{false}{true}} +\newcommand*{\pycq}[1]{\pyluatex@inline{#1}{false}{false}} \newcommand*{\pysession}[1]{\directlua{pyluatex.session = [==[#1]==]}} |