summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-08-04 21:14:59 +0000
committerKarl Berry <karl@freefriends.org>2021-08-04 21:14:59 +0000
commitf44b7d6fa3f23958c1e1d7280b318ff4dbf6ba52 (patch)
tree59c0173892187e81514df059a83e3b154df101a5
parent7873c292344d714788935f059a599646dfcac097 (diff)
python (4aug21)
git-svn-id: svn://tug.org/texlive/trunk@60162 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/latex/python/python.sty10
1 files changed, 7 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/python/python.sty b/Master/texmf-dist/tex/latex/python/python.sty
index 2d08fdf6cd4..760476ee530 100644
--- a/Master/texmf-dist/tex/latex/python/python.sty
+++ b/Master/texmf-dist/tex/latex/python/python.sty
@@ -25,8 +25,12 @@
%% no more than 15 \newwrites are allowed (and the previous version created a new
%% every time \@writemodule was called.
+%% 0.21 -> 0.22: Fixed bug where spurious spaces were introduced in the output.
+%% Thanks goes to Gernot Salzer <gernot.salzer@tuwien.ac.at> for pointing out
+%% the bug and providing a patch.
+
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{python}[2007/06/07 v0.21 Python in LaTeX]
+\ProvidesPackage{python}[2021/08/03 v0.22 Python in LaTeX]
\newwrite\@out
\newwrite\@module
@@ -39,7 +43,7 @@
\def\python{\kernel@ifnextchar [{\@python}{\@python[]}}
\def\@python[#1]{%
-\gdef\@pythoninclude{#1}
+\gdef\@pythoninclude{#1}%
\immediate\openout\@out=\jobname.py
\newlinechar='15
\begingroup \catcode`\^^M=12 %
@@ -50,7 +54,7 @@
\endgroup
\immediate\closeout\@out
\@writemodule
-\immediate\write18{cat \@pythoninclude\space\jobname.py | python > \jobname.py.out 2> \jobname.py.err}
+\immediate\write18{cat \@pythoninclude\space\jobname.py | python > \jobname.py.out 2> \jobname.py.err}%
\immediate\input\jobname.py.out}
%\immediate\write{\begin{verbatim}}
%\immediate\input\jobname.py.err