Skip to content

Commit

Permalink
Typeset & View: Always add location of ps2pdf
Browse files Browse the repository at this point in the history
After this update TextMate should successfully translates a document
that requires `ps2pdf`, even if the command `ps2pdf` is not accessible
via `PATH`. Before this change this only worked if you used the engine
“PDFLaTeX”.
  • Loading branch information
sanssecours committed May 31, 2018
1 parent 4048e10 commit 0c52669
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Support/bin/texmate.py
Expand Up @@ -967,6 +967,9 @@ def file_exists(filename):

pdffile_path = "{}/{}.pdf".format(file_path, file_without_suffix)

# Add default location of `ps2pdf` to `PATH`
putenv('PATH', getenv('PATH') + ':/usr/local/bin')

if command == "version":
process = Popen("{} --version".format(engine), stdout=PIPE, shell=True,
universal_newlines=True)
Expand Down Expand Up @@ -1055,8 +1058,6 @@ def file_exists(filename):
if engine == 'latex':
call("dvips {0}.dvi -o '{0}.ps'".format(file_without_suffix),
shell=True)
# Add default location of `ps2pdf` to `PATH`
putenv('PATH', getenv('PATH') + ':/usr/local/bin')
call("ps2pdf '{}.ps'".format(file_without_suffix), shell=True)
if tm_autoview and number_errors < 1 and not suppress_viewer:
viewer_status = run_viewer(
Expand Down

0 comments on commit 0c52669

Please sign in to comment.