Sublime Text 2 LatexTools not launching SumatraPDF

2019-05-21 06:39发布

I'm trying to run the LaTexTools plugin in Sublime Text 2.0.2, build 2221. I'm running a 64-bit, Windows 8.1 computer.

LaTexTools is installed and working - it produces a compiled PDF, which is viewable in SumtraPDF and Adobe Reader if I open it manually from the windows folder location. However after building the Tex file, the PDF does not automatically launch. When I try to shift the view to the PDF, Sublime Text throws the following error:

Cannot launch Viewer. Make sure it is on you PATH.

Doing a normal build on the .tex file produces the following output:

[Compiling C:\Users\Mpaull15\Dropbox\Stanford\Project
Planning\research_report.tex]

TraditionalBuilder: Invoking texify... done.

No errors.

[Done!]

And the console shows the following:

<module 'traditionalBuilder' from 'C:\Users\Mpaull15\AppData\Roaming\Sublime Text 2\Packages\LaTeXTools\builders\traditionalBuilder.pyc'>
<class 'traditionalBuilder.TraditionalBuilder'>
Welcome to thread Thread-4
2
['texify', '-b', '-p', '--tex-option="--synctex=1"', u'research_report.tex']
Finished normally
0
False True True
!TEX root =  u'C:\\Users\\Mpaull15\\Dropbox\\Stanford\\Project Planning\\research_report.tex'
Jump to:  5 0
Windows, Calling Sumatra
Traceback (most recent call last):
  File ".\sublime_plugin.py", line 356, in run_
  File ".\jumpToPDF.py", line 109, in run
  File ".\subprocess.py", line 633, in __init__
  File ".\subprocess.py", line 842, in _execute_child
WindowsError: [Error 2] The system cannot find the file specified

SumatraPDF is installed, is set as my default viewer, and is in my path as the following:

"C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe"

The .tex file I am compiling is in my Dropbox folder if that could be relevant, although I tried moving the entire folder to my Desktop and building there, resulting in the exact same error.

I've looked through StackExchange and past entries on the Sublime Text forums about this issue, and all either seem to result from SumtraPDF not being in the path, or to relate to a different program being called from Sublime Text, with solutions not obviously relevant to the LaTexTools/SumtraPDF interaction here.

Any advice or help would be appreciated!

1条回答
叛逆
2楼-- · 2019-05-21 07:16

Your path should only refer to the folder, not the exact .exe.

"C:\Program Files (x86)\SumatraPDF"
查看更多
登录 后发表回答