Open OsbertWang opened 5 years ago
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 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.
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
https://marcus.handte.org/2017/11/18/using-texstudio-with-texlive-from-ubuntu-on-wsl/
Used that and it works so far :)
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.
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.
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.
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:
.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:
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
Dockerfile.latest-cache
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).
Environment
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?