python-sty icon indicating copy to clipboard operation
python-sty copied to clipboard

Fix return code parsing error

Open dmcdougall opened this issue 12 years ago • 2 comments

I got an error when compiling the following with pdflatex -shell-escape eg.tex. The error was:

(./eg.out) (./eg.out) [1{/opt/local/var/db/texmf/fonts/map/pdftex/updmap/pdftex
.map}pdfTeX warning (ext4): destination with the same identifier (name{equation
.2.2}) has been already used, duplicate ignored

\AtBegShi@Output ...ipout \box \AtBeginShipoutBox
                                                  \fi \fi
l.84 \begin{verbatim}
                     pdfTeX warning (ext4): destination with the same identifie
r (name{equation.2.2}) has been already used, duplicate ignored

\AtBegShi@Output ...ipout \box \AtBeginShipoutBox
                                                  \fi \fi
l.84 \begin{verbatim}
                     ] [2] (./eg1.py.out)
! Missing number, treated as zero.
<to be read again>
                   n
l.152 \end{python}

?
! Missing = inserted for \ifnum.
<to be read again>
                   n
l.152 \end{python}

?
! Missing number, treated as zero.
<to be read again>
                   n
l.152 \end{python}

?
! You can't use `\numexpr' in horizontal mode.
\ifnumcomp ...\ifnum \numexpr #1\relax #2\numexpr
                                                  #3\relax \expandafter \@fi...
l.152 \end{python}

?
[3] (./eg.aux) )</opt/local/share/texmf-texlive-dist/fonts/type1/public/amsfont

It turns out the write18 command was printing the -n flag to the .rc file. I removed the -n flag and everything now works. Tested only on a Mac. I'm not sure about linux.

dmcdougall avatar May 26 '13 20:05 dmcdougall

Thanks, was working fine on Linux, never tested on OSX. I'll check that this change doesn't break Linux support. If so, then perhaps there's some way of conditionally adding the -n when the OS is OSX.

brotchie avatar May 27 '13 22:05 brotchie

Yeah, I'm not sure why it's doing that. I can also try testing on linux at work and see what happens. This might be one of those weird GNU/BSD issues that crop up occasionally when dealing with shell commands.

dmcdougall avatar May 31 '13 03:05 dmcdougall