Sublime Text 3 无法打开 SumatraPDF

Sublime Text 3 fails to open SumatraPDF

我正在使用带有最新 Sublime Text 3 Build 3013 的 Windows 7 机器。SumatraPDF 作为用户和系统 PATH 变量正确入站:(...\;C:\Program Files\SumatraPDF)

现在我正在尝试获取 LaTeX 运行 Sublime Text 3。它可以编译 PDF,但是 SumatraPDF 无法通过 Sublime 打开(我可以手动启动并打开之前编译好的 PDF在 SumatraPDF)。

Welcome to thread Thread-5
['latexmk', '-cd', '-e', '-f', '-pdf', '-interaction=nonstopmode', '-synctex=1', 'neu.tex']
Finished normally
0
False True True

!TEX root =  'C:\Users\Jens\Desktop\Arbeit\Jens\Sublime\neu.tex'
Jump to:  9 14
Windows, Calling Sumatra
Traceback (most recent call last):
    File "./subprocess.py", line 1112, in _execute_child
    FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
      File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 568, in run_
      return self.run(edit, **args)
      File "C:\Users\Jens\AppData\Roaming\Sublime Text 3\Packages\LaTeXTools\jumpToPDF.py", line 233, in run
      subprocess.Popen(startCommands, startupinfo = si)
      File "./subprocess.py", line 824, in __init__
      File "./subprocess.py", line 1118, in _execute_child

FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden

我的 LaTeX 工具设置是:

"windows": {
    // Path used when invoking tex & friends; "" is fine for MiKTeX
    // For TeXlive 2011 (or other years) use
    // "texpath" : "C:\texlive\2011\bin\win32;$PATH",
    "texpath" : "C:\texlive\2015\bin\win32;$PATH",
    // TeX distro: "miktex" or "texlive"
    "distro" : "texlive",
    // Command to invoke Sumatra. If blank, "SumatraPDF.exe" is used (it has to be on your PATH)
    "sumatra": "",
    // Command to invoke Sublime Text. Used if the keep_focus toggle is true.
    // If blank, "subl.exe" or "sublime_text.exe" will be used.
    "sublime_executable": "",
    // how long (in seconds) to wait after the jump_to_pdf command completes
    // before switching focus back to Sublime Text. This may need to be
    // adjusted depending on your machine and configuration.
    "keep_focus_delay": 0.5
},

你能给个建议吗?这个线程 () 感觉很相似,但我在我的例子中正确设置了 PATH 变量。

编辑:在评论中添加了这一条。

import os; os.environ['PATH']

'C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK.0\bin\x64;C:\Program Files\Lenovo\Fingerprint Manager Pro\;C:\Program Files (x86)\Common Files\Lenovo;C:\SWTOOLS\ReadyApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Lenovo\Access Connections\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\SumatraPDF\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\texlive15\bin\win32;C:\Program Files\SumatraPDF\'

原来是%PATH%的问题。 SumatraPDF 安装在 C:\Program Files (x86)\SumatraPDF 而不是 C:\Program Files\SumatraPDF.