So I want to use LaTeX in sublime text 2, and I came across the plugin LaTeXTools. It works great, but it requires me to install Skim PDF Viewer. Is it possible to set it up so that when I compile the latex file it opens it in the PDF preview already installed on my mac?
UPDATE: This does not work as advertised.
I undeleted this post after @Bordaigorl posted the same solution. There are still some unresolved issues. Changing
The PDF-viewer in the LaTeXTools-package is configured in a file called
But I would recommend against it. Skim is an excellent PDF viewer that takes under 10 MiB on your harddisk.
The LaTeXTools plugin invokes the viewer from
Line 39 to 44 is the code which is selecting the commands to invoke when running on OSX:
As you can see the
The simplest patch is replacing line 44 with
but be aware that if you installed
So the best solution would be to open an issue on github suggesting they could read the command to be launched from a setting instead of hard-coding it.
Skim doesn't work currently in OSX Yosemite, so it looks like we're stuck with Preview for the time being.
I'm not sure what line @arjenz is referring to in his comment, since the code may have changed, but I couldn't get his solution to work. Here's what I did:
Find the jumpToPDF.py file, and change the lines (62-70 in commit 517c5a3):
I am also not sure what this breaks, if anything, but the package is working fine so far.
A more updated answer; the best shot for switching to Preview.app is, in viewPDF.py, to set:
With this, after compiling, you should be able to execute
In the previous line.
Hope it helps, tested it last night and it works!