texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.81k stars 345 forks source link

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

Open OsbertWang opened 5 years ago

OsbertWang commented 5 years ago

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?

ludwigbald commented 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?

OsbertWang commented 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 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.

albspe commented 4 years ago

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

K-miy commented 4 years ago

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

Used that and it works so far :)

OsbertWang commented 4 years ago

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 commented 4 years ago

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.

butcher211 commented 2 years ago

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.

dbitouze commented 2 years ago

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.
muzimuzhi commented 2 years ago

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