Sublime Text 2 LatexTools not launching SumatraPDF

强颜欢笑 提交于 2019-12-22 14:14:33

问题


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:


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

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


来源:https://stackoverflow.com/questions/28493121/sublime-text-2-latextools-not-launching-sumatrapdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!