I'm not sure what changed between 2015 and now, but when I use ipython-tikzmagic without the contents of this PR, I end up seeing the output of pdflatex whether or not there's an error. subprocess.call forwards the subprocess stdout to the process stdout and then something (I'm not sure what) relays it to the notebook. It makes users think that something is wrong when it isn't.
If I had to guess, I'd say that this is an ipython feature that was added since 2015, but I don't have proof of that. This caused me to go in a wild goose chase resolving the pictured warning, when I could've just ignored the warning.
This PR does the following:
when pdflatex returns nonzero, provide the user with enough to recreate the issue from the CLI
when pdflatex returns zero, show nothing to the user (this hides warnings, which is probably what happened before, and is probably ok)
I'm not sure what changed between 2015 and now, but when I use ipython-tikzmagic without the contents of this PR, I end up seeing the output of
pdflatex
whether or not there's an error.subprocess.call
forwards the subprocessstdout
to the processstdout
and then something (I'm not sure what) relays it to the notebook. It makes users think that something is wrong when it isn't.If I had to guess, I'd say that this is an ipython feature that was added since 2015, but I don't have proof of that. This caused me to go in a wild goose chase resolving the pictured warning, when I could've just ignored the warning.
This PR does the following:
pdflatex
returns nonzero, provide the user with enough to recreate the issue from the CLIpdflatex
returns zero, show nothing to the user (this hides warnings, which is probably what happened before, and is probably ok)