Sublime Forum

[Solved] Build system is changed when saving LaTeX document

#1

Hi
I’m using SublimeText build 3103 on a Mac machine. I have installed the package control and latextools packages. The issue I’m facing is that when I open a TeX file (in fact, a LaTeX beamer file), the latex build system is automatically selected (which is fine); but if I change it to ‘Latex beamer’, then it reverts to Latex whenever I save the document.
I guess this is a bug?
Thanks

Jean-Noël

0 Likes

#2

sounds like a similar problem to this: [Solved] Can someone please check if LaTeX syntax selection is persistent or not?

could it be related to this LaTeXTools setting? if true, the syntax is changed on save, and likely the build system is too

0 Likes

#3

I don’t think it’s linked to Latextools because I see the same behavior with Latexing. It is easy to reproduce. Set build system (right of the bottom bar) to latexing beamer, save, and boof, the build system is back to latexing

0 Likes

#4

Okay, to rule it out, can you temporarily disable the LatexTools package and try your reproduction steps again.

sounds like you mean “syntax highlighting”, and not “build system”.

0 Likes

#5

You are right, it’s more about the syntax highlighting, although it also affects the menus. For instance, in latex beamer mode, I see different snippets than in latex mode.

Here’s what I did:

  • remove latextools and latexing packages and restart; if I change the syntax and save, the syntax is kept
  • install latextools and restart; if I change the syntax to latex beamer and save, the syntax jumps back to latex
  • remove latextools, install latexing and restart; the syntax is set to ‘latexing beamer’; if I change it to ‘latex/latex’ and save, it is set back to latexing beamer
0 Likes

#6

so the bug is with LaTeXTools. A fix has already been made, I believe that it is just waiting for review, merge and release.

0 Likes

#7

thanks for that. but why do I still see the behaviour with latexing? I can share a video showing what happens. I open the file, syntax is set to ‘latexing’; I change it to ‘latexing beamer’ and save, and syntax is changed automatically to latexing.

0 Likes

#8

Basically, whatever syntax is selected, when the file is saved, if LaTeXTools (with the previously mentioned setting and before the previously mentioned fix) detects that it is a LaTeX file, it sets the syntax to LaTeX.

I guess LaTeXing overrides the default LaTeX syntax, and so when LaTeXTools sets the syntax to LaTeX, it actually gets set to LaTeXing.

0 Likes

#9

but as I said for this last test, latextools was not installed. The only package was latexing.

0 Likes

#10

oh I see, sorry. LaTeXing must also be doing something on save to set the syntax. No way of seeing exactly what because it isn’t open source. I would suggest to log an issue if you don’t like it.

0 Likes

#11

ok, thanks for your follow-up

0 Likes