Converting from MiKTex to TeXLive on VsCode Latex Workshop Extension

miktextexlive

I am currently using the latex workshop extension by james yu for latex on VSCode. I am on windows and had originally been using MiKTeX. Now I have downloaded TexLive and want to switch to that.

What all settings do I need to change to get TeXLive instead of MiKTeX working on VSCode?
I have just installed TeXLive if I need to add that to path explicitly please do mention that too.

MikTex location: C:\Users\atharva\AppData\Local\Programs\MiKTeX

TeXLive location: C:\texlive\2021

If I need to provide additional info please mention will do that immediately.

Best Answer

The editor you are using (in this case VS Code) simply uses the first application named pdflatex (or latexmk, lualatex depending on your recipe) it can find.

Or more specific: There is a special global variable named PATH which stores all directories that contain applications. When installing MikTeX or TeXLive, they will append their directories to this variable. If you now run a command like pdflatex in a terminal (cmd or PowerShell on Windows) it will go through all directories in the PATH-variable and look for the pdflatex.exe-executable. You should be able to determine which application is run by simply executing pdflatex -version in a terminal. It will show with which distribution it came. VS Code does nothing else than using the systems environment. So you shouldn't have to configure it in any way.

However, what you can do is ensuring that the 'TeXLive' executable can be found before the 'MikTeX' executable. This can be done by moving the respective path entries up in the list (for example as described here

Related Question