# LaTeXTools: Sublime Text 3 support is now live!

I have just merged support for Sublime Text 3 into the main (master) branch. So, this is no longer in development: you will be getting it automatically via Package Control (update manually if necessary), or you can get it from GitHub.

As I explained in a previous post, the same code will work on Sublime Text 2 and Sublime Text 3. Hence, there will be feature parity on both versions of our beloved editor.

I have done my best to test extensively on various combinations of ST versions and platforms, but let me know if you see something strange.

Also, in case something is seriously broken, I have created an “st2” branch on GitHub hosting the code right before today’s merge. Consider this an emergency fallback only; the new code on the master branch should work fine.

### 21 responses to “LaTeXTools: Sublime Text 3 support is now live!”

1. Great work! Thank you! Sublime Text + LaTeXTools is by far the best Latex editor I have ever used!

2. sou

I have sublime 3 installed on ubuntu 12.04 with evince, texmk, etc
when I try view PDF i have this:
Cannot launch Viewer. Make sure it is on your PATH
is the any way to repair this?

• sou

no, nothing happens, without any errors

3. Shu Cheng

Hello,
First of all, thanks very much for you work. This plugin is really helpful.

I currently use sublime text 3 with LaTeXTools to do my writing work. The only thing confuses me is I can’t find structure view for my document. I searched the keybinding file and the setting file of LaTeXTools, and there’s noting help about this. After some search, I found that in your source code there’s a file(texSections.py). It seems it works fine to get the structured view of the document. I uncommented the last line, added a further argument 0 at the last and added a keybinding for it. It works for me. Just confusing is there any problem about that file, why it’s abandoned initially?

BTW, another thing is that installing the package with Package Control does’t work for my system(Sublime text 3047 + MacOS 10.7.5). But if I unzip the package and move it to Package folder. Everything’s fine.

Thanks very much again 🙂

Best,

4. Shu Cheng

Hi,

I uncommented and change the last line to self.view.window().show_quick_panel(prettySecs, onSelect, 0, 0)

further add if i >= 0: to the function onSelect(i) to prevent cursor move to the last section, when canceled the quick panel.

Sorry for mistake.

• Hi,

The structure view uses ST’s default “go to anything” command; check the readme. The texsections command is a leftover from the very first version of the plugin. Then again, thanks a ton for getting it to work! This is something I have been meaning to do in a while, and your work gives me a head start.

Second, I believe package control does not yet support st3, only st2.

5. haench

Hi,

this tools are a really great help! Thank you for that.
But.. I need to bother you with a problem of mine:
My latex document are structured in several tex files. One of them is the main file. When I use the “go to anything” (CTRL+r) only the symbols (sections, labels) in the current file are shown. I would like to see all within my project/currently opend files. Is that possible?

Thanks,
Haench

• Check the README. You need to specify the root file with a %!TEX directive.

On Wed, Aug 21, 2013 at 11:25 AM, Tech, TeX and Theory

• haench

Hi,

thanks for the fast reply. I did that alredy. The \ref and \cite autocompletion are working perfectly with that. But CTRL+r searches only work on the current file(view). CTRL+SHIFT+r doesnt seem to work as well, because it only finds symbols with trailing ‘@’ exclusevly (!?).

Nervertheless I was also interested in a structure view (saw that in the post of Shu Cheng). But sadly this also only retrieves the information from the current file, not from all files which are currently open. So I changed some code in the texSections.py, it now searches thorugh all open views and displays a list of chapters/sections/subsections from the whole project. If you are interested in the code changes I will post them here (or send them via email?). But be aware that I have no idea what I am doing 🙂

Thanks again fot the GREAT tools!!

– Haench

6. Bonaqa

Hey man,
nice work. The plugin is great and it must have saved many hours of life by now.
I do have a feature request as well. Is it possible to make font of \section{ABC} bigger than other text. Something what emacs+AuCtex does as well. Do you think its doable? if I try to do this, how much time would be needed ?

Thanks,
Bonaqa

• Sadly, this is not possible. Unfortunately ST does not allow one to control the size of the font used in the buffer. Maybe in a future release…

On Tue, Sep 17, 2013 at 3:10 PM, Tech, TeX and Theory

7. ystop

I am running LatexTools on ST3 on OSX 10.8.5 and the latest (2013) MacTex distribution. When I try to compile, the small log window in ST3 opens and tells me the file is compiling, but then it just hangs forever. I have tried uninstalling and re-installing absolutely everything and simply cannot get it to work. Any help would be greatly appreciated.

• What’s in the ST3 console (open it with Ctrl+`)?

On Fri, Oct 4, 2013 at 12:46 PM, Tech, TeX and Theory

• ystop

I copy-pasted the whole thing (and deleted my personal info). Thanks!

———————————————————————
startup, version: 3047 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/—–/Library/Application Support/Sublime Text 3/Packages
state path: /Users/—–/Library/Application Support/Sublime Text 3/Local
hardware concurrency: 2
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/—-/Library/Application Support/Sublime Text 3/Installed Packages
found 4 files for base name Default.sublime-keymap
found 1 files for base name Default.sublime-mousemap
found 3 files for base name Main.sublime-menu
found 1 files for base name Default.sublime-theme
startup cache, total files: 157 cache hits: 157
pre session restore time: 0.930109
using gamma: 2 (err: 6.9282)
first paint time: 1.29784
startup time: 1.31158
launching: /Applications/Sublime Text.app/Contents/MacOS/plugin_host
Package Control: Skipping automatic upgrade, last run at 2013-10-04 11:26:15, next run at 2013-10-04 12:26:15 or after
[‘latexmk’, ‘-cd’, ‘-e’, “$pdflatex = ‘pdflatex -interaction=nonstopmode -synctex=1 %S %O'”, ‘-f’, ‘-pdf’, ‘/Users/—–.tex’] 2 Welcome to thread Thread-3 Finished normally 0 Exception in thread Thread-3: Traceback (most recent call last): File “X/threading.py”, line 639, in _bootstrap_inner File “/Users/—–/Library/Application Support/Sublime Text 3/Packages/LaTeXTools/makePDF.py”, line 138, in run data = open(self.caller.tex_base + “.log”, ‘rb’).read() FileNotFoundError: [Errno 2] No such file or directory: ‘/Users/—-.log’ • OK, looks like the tex file is not getting compiled. Did you install the full MacTeX 2013 distro, or just the basic package? In the latter case, you need to install latexmk (see the README). Otherwise, can you try invoking latexmk from the command line, with latexmk -cd -e “$pdflatex = ‘pdflatex -interaction=nonstopmode -synctex=1 %S %O’ -f -pdf

On Fri, Oct 4, 2013 at 1:07 PM, Tech, TeX and Theory

• ystop

I installed the full distro but latexmk seems missing. Thanks for the help!

8. ystop

I’ve double checked the distro, and my documents are compiling fine with Textmate, but I’m getting the following message in the ST3 console:

[Compiling /Users/——.tex]

COULD NOT COMPILE!

Attempted command:latexmk -cd -e $pdflatex = ‘pdflatex -interaction=nonstopmode -synctex=1 %S %O’ -f -pdf /Users/—–.tex (note: when I enter the command directly in terminal it says latexmk command not found). • OK, so the problem is that you don’t have latexmk. Otherwise, it would work at least from the command line. That’s weird—I thought MacTeX 2013 included it by default. Then again, I’m still on 2012. Anyway, you can install latexmk using the MacTeX package manager, or from the command line using “sudo tlmgr install latexmk” (Textmate works bcause, by default, it does not use latexmk). On Fri, Oct 4, 2013 at 2:49 PM, Tech, TeX and Theory 9. brett Hi, continuing on with the last post (as I have the same problem), I do have latexmk installed with MacTec2013 – been using it with TexShop for a long time – and my$PATH does include the location of latexmk. However when I try the above command:
Attempted command:latexmk -cd -e \$pdflatex = ‘pdflatex -interaction=nonstopmode -synctex=1 %S %O’ -f -pdf /Users/—–.tex
it fails, but if I take the spaces out from each side of the equals sign it compiles fine in the terminal. Maybe I just need to take these out of the build command in ST3?

10. Have you thought of porting LatexTools to Atom?