From b7e54219e4294fa527035f0bd2819ca11c3c6964 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 5 Aug 2021 03:02:12 +0000 Subject: CTAN sync 202108050302 --- macros/latex/contrib/python/python.sty | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'macros/latex/contrib/python') diff --git a/macros/latex/contrib/python/python.sty b/macros/latex/contrib/python/python.sty index 2d08fdf6cd..760476ee53 100644 --- a/macros/latex/contrib/python/python.sty +++ b/macros/latex/contrib/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 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 -- cgit v1.2.3