【发布时间】:2016-06-28 12:30:43
【问题描述】:
我正在使用带有最新 Sublime Text 3 Build 3013 的 Windows 7 机器。SumatraPDF 作为用户和系统 PATH 变量正确入站:(...\;C:\Program Files\SumatraPDF)
现在我正在尝试让 LaTeX 与 Sublime Text 3 一起运行。它可以编译 PDF,但是,SumatraPDF 无法通过 Sublime 打开(我可以手动启动并打开之前在 SumatraPDF 中编译过的 PDF)。
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) 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:\texlive\2015\bin\win32;C:\Program Files\S umatraPDF\'
【问题讨论】:
-
在
C:\Program Files\SumatraPDF之前的%PATH%变量中实际上有一个空格吗?如果是的话,你能把它删掉吗? -
是的,有一个空格,我删除了它,但没有帮助。
-
从 Sublime 控制台(View | Console)你能运行
import os; os.environ['PATH']吗? -
您可以尝试将“sumatra”设置更改为 C:\Program Files\SumatraPDF\SumatraPDF.exe" 吗?这至少应该可以强制工作...
-
您是否在 64 位系统上安装了 32 位版本的 Sumatra(将安装在 c:\program files (x86)\sumstrapdf 中?
标签: latex sublimetext3 pdf-viewer