SublimeText / LaTeXTools

LaTeX plugin for Sublime Text
https://latextools.readthedocs.io/
2.01k stars 365 forks source link

Support for Sublime Text 4 #1531

Open sahibaulakh opened 3 years ago

sahibaulakh commented 3 years ago

I just upgraded to sublime text 4 and found problems with LatexTools.

I had to revert back to sublime text 3. While I am quite happy to stay on 3 since latex is mainly what I do with sublime, I was wondering how long I can drag out 3.

Are there plans to support ST4?

Also, I am so dependent on LatexTools that I am quite willing to pay for it. May be if you make it a licensed product, you can have a more reasonable scenario. If there is any way to contribute monetarily to the project, kindly let me know.

Thanks.

VadokDev commented 3 years ago

I'm also looking for a fix to this bug, but looking for a workaround, I disabled the code that opens SumatraPDF after build by commenting it to not switch into the SumatraPDF window. With this, you manually open the PDF file and let open the SumatraPDF window. SumatraPDF will update the file view after recompiling the .tex, letting you build from Sublime Text 4 without change to the SumatraPDF window.

You can try this by commenting the lines 100-103 of the sumatra_viewer.py file:

        ...
        try:
            #external_command(
            #    [sumatra_binary] + commands,
            #    use_texpath=False, show_window=True
            #)
        except OSError:
        ...

Also, here is a gist that I make to focus on the Sublime Text 4 window without comment the code above. I don't know how to implement it on the LateXTools source, but I leave it here if anyone wants to give it a try.

https://gist.github.com/VadokDev/491a68bede11dc89fb8df4a87117bccd

By the way, here is more info about why when you execute the LateXTool command to focus the sbt4 window, it opens a new sbt4 instance: https://forum.sublimetext.com/t/4109-always-opens-a-new-windows-after-build/59133.

I hope this could help you.

alexander-novo commented 3 years ago

I would like to mention that in addition to the Sumatra issue as mentioned above (which the sublime text maintainers seem adamant is the correct behavior), some of the macros are also broken. For instance, expanding begin with tab leads to this:

image

ankitp94 commented 7 months ago

Has there been any update in this regard?

alexander-novo commented 6 months ago

@ankitp94 This extension is several years unsupported now. Unfortunately, I think extensions in Sublime Text 4 are, in general, dead. If you want extension support, you probably need to move to where all of the authors moved several years ago now (Visual Studio Code). I felt like in 2021 the LaTeX extension in VS Code (Latex Workshop) severely lacked compared to LatexTools, however they have caught up in the past few years.

ankitp94 commented 2 months ago

It is really unfortunate. I always found Sublime Text + LatexTools to be much faster than VSCode (and Atom). I hope someone will get around to updating this extension.