1
votes

I am using a Windows 7 machine with most recent Sublime Text 3 Build 3013. SumatraPDF is properly inbound as user and system PATH variable: (...\;C:\Program Files\SumatraPDF)

Now I am trying to get LaTeX running with Sublime Text 3. It can compile a PDF, however, SumatraPDF does not open via Sublime (I can manually start and open the PDF that has been complied just before in 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

My settings of LaTeX tools is:

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

Can you give an advice? This thread (Sublime Text 2 LatexTools not launching SumatraPDF) feels similar, but I properly set the PATH variable in my case.

Edit: Added this one in respect to comment.

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) 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:\texlive\2015\bin\win32;C:\Program Files\SumatraPDF\'

1
Is there actually a space in your %PATH% variable before C:\Program Files\SumatraPDF? If so, could you remove it?ig0774
Yes, there was a space, I removed it, but it did not help.Jens
From the Sublime console (View | Console) could you run import os; os.environ['PATH']?ig0774
Can you just try changing the "sumatra" setting to C:\Program Files\SumatraPDF\SumatraPDF.exe"? That should at least force things to work...ig0774
Do you perhaps have the 32-bit version of Sumatra on a 64-bit system (which would be installed in c:\program files (x86)\sumstrapdf?ig0774

1 Answers

1
votes

So it turns out to be a %PATH% issue. SumatraPDF was installed in C:\Program Files (x86)\SumatraPDF rather than C:\Program Files\SumatraPDF.