LaTeXTools icon indicating copy to clipboard operation
LaTeXTools copied to clipboard

Support for Sublime Text 4

Open sahibaulakh opened this issue 3 years ago • 5 comments

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.

sahibaulakh avatar Jul 20 '21 02:07 sahibaulakh

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.

VadokDev avatar Jul 31 '21 06:07 VadokDev

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

alexander-novo avatar Sep 08 '21 04:09 alexander-novo

Has there been any update in this regard?

ankitp94 avatar Feb 08 '24 16:02 ankitp94

@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.

alexander-novo avatar Mar 10 '24 04:03 alexander-novo