Skip to content

Coming from VSCode LaTeX workshop

Luke Naylor edited this page Aug 31, 2025 · 1 revision

Here are some instructions for doing some of the stuff available in the VSCode UI and LaTeX workshop settings. Most of these are pointing the user to use a configuration file for latexmk (latexmkrc). These assume that you are using latexmk (the default for this extension) for your project.

image

you can clean auxiliary and other files by running this in the terminal:

latexmk -C

The LaTeX compiler can be set in a latexmkrc file:

$pdf_mode = 1; # to use pdflatex
$pdf_mode = 2; # tex -> ps -> pdf
$pdf_mode = 2; # tex -> dvi -> pdf
$pdf_mode = 4; # to use lualatex
$pdf_mode = 5; # to use xelatex

"latex-workshop.docker.image.latex" setting
(building inside a docker container)

See this section of the build page in this wiki.

"latex-workshop.formatting.latex"
"latex-workshop.formatting.latexindent.args"
"latex-workshop.formatting.latexindent.path"
"latex-workshop.formatting.tex-fmt.args"

See the formatting wiki page

"latex-workshop.latex.texDirs"
"latex-workshop.latex.bibDirs"

Set BIBINPUTS and/or TEXINPUTS for the texlab process (see this section). Note that unlike VSCode, this affects both completions and the build.

"latex-workshop.latex.clean.command"
"latex-workshop.latex.clean.args"
"latex-workshop.latex.clean.fileTypes"

There is no in-editor UI or shortcut for cleaning. You could use latexmk -C in the terminal or setup a Zed task for this. It's behaviour can be configured in a project latexmkrc file.

"latex-workshop.latex.external.build.command"

See this section

"latex-workshop.latex.outDir"

Specify in latexmkrc with $out_dir

"latex-workshop.latex.rootFile.*"

Specify in latexmkrc with @default_files

"latex-workshop.latex.verbatimEnvs"

There is a texlab workspace configuration for this. Note that there also other similar texlab configurations for bespoke commands and environments that should be recognised as a certain "type".

Clone this wiki locally