texstudio icon indicating copy to clipboard operation
texstudio copied to clipboard

Is there any easy way to use TeXstudio via TeX Live 2019 in WSL

Open OsbertWang opened this issue 5 years ago • 9 comments

Environment

  • TeXstudio: 2.12.16
  • Qt: 5.12.1
  • OS: Windows 10
  • TeX distribution: TeX Live 2019 in WSL

Expected behavior

Now I have installed TeX Live 2019 in WSL. I want to use TeXstudio in Windows 10 and compile files via TeX Live 2019 in WSL.

Actual behavior

Now I can define user command to compile files via bash.exe, e.g., "C:\Windows\WinSxS...\bash.exe" -i -c "?me)". However, I cannot do forward and inverse search. I notice that the reason is the path in synctex.

How to reproduce

Can TeXstudio.exe resolute the path in synctex? Or, does TeXstudio want to develop a WSL edition?

OsbertWang avatar Aug 26 '19 12:08 OsbertWang

I don't think this is a typical usecase. Why don't you simply install TexLive for Windows if you intend to use it from Windows?

ludwigbald avatar Aug 29 '19 11:08 ludwigbald

I don't think this is a typical usecase. Why don't you simply install TexLive for Windows if you intend to use it from Windows?

I used texlive installed in WSL just for fun at first. Then I find that, for the same file, xelatex compiles faster in WSL than that in Windows 10, especially for Chinese character. I think it's the reason that I prefer to compiling in WSL rather than in Windows 10.

I notice that an increasing number of programmers use WSL. The VSCode editor have already support the remote-WSL plug, and The LaTeX Workshop works well with the extension, see LaTeX Workshop FAQ.

However, TeXstudio is the editor I use most, so I really wonder whether there is any easy way to use it via TeX Live in WSL.

OsbertWang avatar Aug 29 '19 13:08 OsbertWang

I have been able to use TexStudio with TexLive on WSL with Ubuntu 18.04 with no issues. The only strange thing is that on one machine I get a high CPU usage compared to the other one. Configuration wise they seem to be both fairly close, so I am not sure what is causing the problem. I am running 2.12.18 version on both machines.

The only thing you need to be careful with, is about the installation of TexLive. If you install it from install-tl you might get issues when installing TexStudio as a package. There are some info here: Link 1 and here Link 2

albspe avatar Dec 28 '19 04:12 albspe

https://marcus.handte.org/2017/11/18/using-texstudio-with-texlive-from-ubuntu-on-wsl/

Used that and it works so far :)

K-miy avatar Jan 16 '20 18:01 K-miy

I have been able to use TexStudio with TexLive on WSL with Ubuntu 18.04 with no issues. The only strange thing is that on one machine I get a high CPU usage compared to the other one. Configuration wise they seem to be both fairly close, so I am not sure what is causing the problem. I am running 2.12.18 version on both machines.

The only thing you need to be careful with, is about the installation of TexLive. If you install it from install-tl you might get issues when installing TexStudio as a package. There are some info here: Link 1 and here Link 2

Thank you. I have installed TeXStudio in Windows instead of WSL because I didn't install GUI plug-in for WSL. About installation of TeX Live, I also notice the two links you gave. They are very useful.

OsbertWang avatar Jan 17 '20 01:01 OsbertWang

https://marcus.handte.org/2017/11/18/using-texstudio-with-texlive-from-ubuntu-on-wsl/

Used that and it works so far :)

Thank you for your help. My actual behavior is also based on this link.

OsbertWang avatar Jan 17 '20 01:01 OsbertWang

Hello, I would recommend to use a docker image (i. e. Island of Tex) and using commands like wsl docker run -i --rm --name latex -v "$PWD":/usr/src/app -w /usr/src/app registry.gitlab.com/islandoftex/images/texlive:latest latexmk -silent -synctex=1 %.tex in Configuration > Commands. It was just an idea in the first place but now this is my daily workflow building tex files.

butcher211 avatar Jan 05 '22 00:01 butcher211

I second the suggestion of Semih, except I recommend the docker image:

registry.gitlab.com/islandoftex/images/texlive:latest-with-cache

which provides more tools (though I don't remember which ones :$).

Two remarks:

  1. The compilation of .tex files is almost 2 times faster with the docker image than with the ordinary (vanilla installed) TeX Live on my Linux box which has the following characteristics:
    • Operating System: Mageia 8
    • KDE Plasma Version: 5.20.4
    • KDE Frameworks Version: 5.76.0
    • Qt Version: 5.15.2
    • Kernel Version: 5.15.11-desktop-3.mga8
    • OS Type: 64-bit
    • Processors: 4 × Intel® Core™ i5-7500 CPU @ 3.40GHz
    • Memory: 15.5 Gio of RAM
    • Graphics Processor: Mesa Intel® HD Graphics 630.
  2. A drawback is that one can't (at least I don't see how to) use the TEXMFHOME personal TDS tree.

dbitouze avatar Jan 05 '22 10:01 dbitouze

I second the suggestion of Semih, except I recommend the docker image:

registry.gitlab.com/islandoftex/images/texlive:latest-with-cache

which provides more tools (though I don't remember which ones :$).

Out of curiosity, I searched a bit and here's what I find:

Currently latest-with-cache comes with pre-generated LuaTeX font cache & ConTeXt file database cache. See

For texlive2022, the cache will be generated for latest image by default, and the *-with-cache images will retire. See islandoftex/images/texlive!11 (the 11th merge request).

muzimuzhi avatar Jan 05 '22 22:01 muzimuzhi