Sublime Text 3无法打开SumatraPDF

时间:2016-03-13 13:55:01

标签: latex sublimetext3 pdf-viewer

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

现在我正在尝试使用Sublime Text 3运行LaTeX。它可以编译PDF,但是,SumatraPDF不会通过Sublime打开(我可以手动启动并打开之前在SumatraPDF中编译过的PDF)。 / p>

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
},

你能提出建议吗?这个线程(Sublime Text 2 LatexTools not launching SumatraPDF)感觉相似,但我在我的情况下正确设置了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 \ 3.0 \ bin \ x86; C:\ Program Files(x86)\ Intel \ OpenCL SDK \ 3.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)管理引擎组件\ DAL; C:\ Program Files(x86)\ Intel \ Intel(R)管理引擎组件\ IPT; C:\ Program Files \ Intel \ Intel(R)管理引擎组件\ 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:\ texlive \ 2015 \ bin \ win32; C:\ Program Files \ S umatraPDF \'

  

1 个答案:

答案 0 :(得分:1)

因此事实证明是1s问题。 SumatraPDF安装在C:\ Program Files(x86)\ SumatraPDF而不是C:\ Program Files \ SumatraPDF。