1

The issue of converting && in Bash to Python has been resolved with the assistance of Xymostech, whose help is greatly appreciated -- thank you!

The command line at issue (from the Bash terminal) is: latexmk file.tex && latexmk -c file.tex.

Here is the plugin if anyone is interested:

https://github.com/lawlist/ST2-plugin-latexmk-save-build-clean

4

1 回答 1

4

The && is a feature that is supported by bash. You can do the same thing in python though, using subprocess's check_call:

import subprocess

try:
    subprocess.check_call(["latexmk", "file.tex"])
except subprocess.CalledProcessError:
    print "Failed making"
else:
    subprocess.call(["latexmk", "-c", "file.tex"])
于 2013-03-30T06:14:00.067 回答