Sublime Forum

LaTeX plugin for ST2

#10

Driple and jesse.robertson — since sometime in late July (can’t remember when exactly) it is no longer necessary to configure paths on Mac OS X. If you pull the current version from GitHub, you will be good to go without creating the .MacOS/environment.plist file.

Also, there is now a semi-legible README file with an explanation of the installation procedure (not much to do on the Mac) and features.

0 Likes

#11

First of all, thanks for this plugin, it makes my life a lot easier. I just installed it and enjoying it already. I just have one question, when i have SumatraPDF closed and the plugin tries to open it I get the error: “Cannot launch Viewer. Make sure it is on your PATH”. Of course I’m not that much of a moron that I didn’t understand the error, but what I can’t figure out is what the error message means by “PATH”. Where can I change it? (Or where is it set so I can change SumatraPDF’s location?).

Thanks for all the hard work and if anyone could help me i would be grateful!

0 Likes

#12

I do plan to remove this limitation at some point soon, but right now, you need to add the SumatraPDF executable to your “path”. This is the list of directories where Windows looks for programs (EXE files) to run when e.g. you invoke them from the command line. See e.g. here:

geekswithblogs.net/renso/archive … ows-7.aspx

Sumatra should be installed in

C:\Program Files\SumatraPDF\SumatraPDF.exe

unless you have put it somewhere else.

Hope this helps—M

0 Likes

#13

Worked perfectly! Thank you very much.
If you ever need help (testing or something), you just need to ask!

0 Likes

#14

Hey Marciano - should the LaTeXTools plugin be able to find all my *tex executables on a Mac? I still had to mod the environment.plist file when I did a clean install on a new Mac in Lion to get everything to work.

0 Likes

#15

Er… yes, it should. I have no environment.plist file on the machine I’m working on right now, and I am using LaTeXTools with no trouble at all. Are you sure you have a current version of the plugin?

0 Likes

#16

Hmm, maybe I’ll try a clean install with the new plugin and see whether it works. The old one might have come across when I shifted to the new machine. I’ll let you know how I get on.

0 Likes

#17

Ok, that fixed it! Thanks for sorting that our Marciano. :smile:

0 Likes

#18

Hi.

I’ve just buy a license of this text editor and I’ve followed your instructions and it works.

Now, I’d like to know to use my toolchain for compiling tex files. Considering that I use PSTricks and bibtex, che toolchain that I use in texmaker is the following:

latex -interaction=nonstopmode %.tex|bibtex %.aux|latex -interaction=nonstopmode %.tex|latex -interaction=nonstopmode %.tex|dvips -o %.ps %.dvi|ps2pdf %.ps

As you can see, I invoke the latex-bibtex-latex-latex chain for bibtex, giving the .dvi, and then the dvips-ps2pdf chain to create the pdf from the .dvi.
How can I invoke the same toolchain using your plugin?

0 Likes

#19

I don’t have direct experience with that, but LaTeXTools uses the latexmk script to actually drive tex & friends, and you can customize the way latexmk is invoked.

Take a look at the documentation for latexmk:

phys.psu.edu/~collins/softwa … k-427a.txt

There is an option -pdfps that instructs latexmk to generate a pdf file from a ps file, via ps2pdf. Look in the relevant (“osx”, I assume) section of the LaTeX.sublime-build file (it’s best if you first copy to the User directory, so it doesn’t get clobbered by subsequent updates). Check the “cmd” keyword and try modifying the options passed to latexmk.

Please report back your findings. Thanks!

0 Likes

#20

What do I need to change to run this on Linux Ubuntu?

I have pdflatex installed and can compile .tex files with it on the command line. I also installed this plugin, but when I hit Ctrl+B it doesn’t do anything except echoing this at this console like window:

It would be so great if I could run this on Linux. :smile:

0 Likes

#21

sorry for my ignorance and lack of knowledge, but… how can I install this in ST2?

Thanks a lot

0 Likes

#23

My guess would be that the whitespace in “program files” isn’t properly quoted by the plugin.

0 Likes

#24

I had this same issue.

As a work around I went into the viewPDF.py file that resides in the C:\Users\MyName\AppData\Roaming\Sublime Text 2\Packages\LatexTools\ directory and changed the windows viewercmd line to this:

viewercmd = “C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe”, “-reuse-instance”]

It seems to work.

0 Likes

#25

Hi!

I’m trying to use this plugin with Ubuntu 12.04, but so far I have not been able to compile.
I suspect it’s the same problem fjolle mentions in the second post of the thread. I would like to try the same solution, but I don’t know what file to edit and line to comment out.

Could I please ask for assistance on this point?

Second EDIT:
The problem is with the build system. However, here is a solution/workaround that works: http://elleestcrimi.me/2012/04/09/sublime-text-latex-build-system/.
It is to make a new build system: Tools > Build System > New Build System and insert the code below. This compiles using pdflatex and opens the file.
Not as fancy as the regulat LaTeXTools builder, but it compiles from within ST2.

{ "cmd": "pdflatex $file && gnome-open $file_base_name.pdf"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.latex.tex", "shell": true }

0 Likes

#26

[quote=“foxthorn”]I had this same issue.

As a work around I went into the viewPDF.py file that resides in the C:\Users\MyName\AppData\Roaming\Sublime Text 2\Packages\LatexTools\ directory and changed the windows viewercmd line to this:

viewercmd = “C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe”, “-reuse-instance”]

It seems to work.[/quote]

Worked for me as well. :smile:

0 Likes

#27

Please report this issue on github. However, first make sure to download the latest version, ideally straight from github. I have been using the plugin on Windows with no path issues, on a variety of machines.

On Linux, again make sure you have the latest version. Compilation DOES work (am running it on Linux right now—Ubuntu 12.04 to be precise. Make sure you have isntalled the latexmk package, which Ubuntu does not do by default when you install texlive). However the previewer (Evince) doesn’t get launched because there’s no specific code for that yet. This has already been reported on github BTW, and it’s high on my list as I’m now running Ubuntu myself.

Marciano (developer of the LaTeXTools plugin)

0 Likes

#28

Folks, just a heads-up: a major update to the plugin has just landed (well technically there have been a few commits over the past few days, but they’re all in now). You get:

  • smarter ref and cite compretion
  • full multi-file document support for ref and cite completion (thanks to Wallace Wu and Juerg Rast)
  • project support for building and ref / cite completion, too (not yet documented, but the code is in)
  • preliminary Linux support
  • various fixes.

See the README for details (again, the project docs are still missing).

Also, another big change is landing soon: new keybindings. Just so you are prepared. As usual, check out github and/or tekonomist.wordpress.com for details.

0 Likes

#29

More LaTeXTools news: the new keybindings are in! Go read the README file on github for details. I will soon post about the rationale for the changes at tekonimist.wordpress.com.

0 Likes

#30

Inconsistent keyboard shortcut: Jump to Matching Bracket and Expand Selection to Brackets

When editing with LaTeX highlighting and this otherwise really nice package installed, the Jump to Matching Bracket and Expand Selection to Brackets commands does not work as expected (or or the same way as in plain text highlighting, which is why I assume this package is the sinner). The commands work perfectly on the code-snippet below,

one point (decided [to {start (and much) more} and] over). This report

but this one is another story. Trying the commanda inside the (\omega)-bracket moves/selects all the way to the \caption{}-brackets.

\caption{Plot of $\text{"Integrated values"}(\omega) = \int_1^2 E(t) \mathrm{d} t$.}

Normally I use these functions a lot, so really hope someone can suggest a solution.

0 Likes