Guide · Open source
How to use LaTeX Workshop in VS Code: setup and basics
Updated · written with AI from the project's own documentation and checked against our catalogue data
LaTeX Workshop is an open-source extension for Visual Studio Code that adds core tools for writing LaTeX, the markup system used for technical papers and documents. This guide covers what you need before installing, how to get the extension, and the main areas it covers: compiling, previewing, autocomplete, and linting. After reading it, you will know where to find the detailed instructions in the project's wiki.
Quick start
- 1Install prerequisites. Install Visual Studio Code and a LaTeX distribution. Check the Requirements section of the wiki for the current requirements.
- 2Get the extension. Install LaTeX Workshop from the Visual Studio Marketplace listing linked in the README, or clone the repository with git clone https://github.com/James-Yu/LaTeX-Workshop.
- 3Configure the basics. Follow the Installation and basic settings section of the wiki, including PATH setup if your system needs it.
- 4Open a LaTeX project. Open your .tex file or project folder in Visual Studio Code.
- 5Compile the document. Build the document using the Compiling section of the wiki as your guide, and use the error and warning output to fix problems.
- 6Preview the PDF. Use the internal PDF viewer or an external viewer with SyncTeX to move between your source and the output.
- 7Use autocomplete and linting. Use Intellisense suggestions, snippets and hover previews while writing, and run the linting checks before you finish.
What you need before you install LaTeX Workshop
LaTeX Workshop runs inside Visual Studio Code, so you need VS Code installed first. The README states that the latest version of the extension requires a recent VS Code release, so update VS Code before installing if you are on an old version.
The extension does not include a LaTeX distribution. You need one installed separately. The project's wiki has a Requirements section that describes what to install for your system.
- Visual Studio Code, updated to a version the extension supports
- A LaTeX distribution (see the Requirements section of the wiki)
Install the LaTeX Workshop extension
The README lists a git clone command for the repository, which gives you a local copy of the project source. The README badges also link to the extension's page on the Visual Studio Marketplace, which is the listing for the extension itself.
The Installation and basic settings section of the wiki covers installation steps, setting the PATH environment variable, and the settings you can change. It also has notes on using Docker and WSL.
git clone https://github.com/James-Yu/LaTeX-WorkshopHow do you compile a LaTeX document with LaTeX Workshop?
Compiling is one of the core features the project describes. The wiki's Compiling section covers building a document, stopping a compilation that is running, and turning on automatic builds.
For larger projects, the wiki explains multi-file projects, LaTeX recipes (sequences of tools), placeholders, magic comments, and how to clean generated files. It also covers catching errors and warnings from the build output.
- Build the document
- Terminate the current compilation
- Auto build LaTeX
- LaTeX recipes and placeholders
- Multi file projects
- Cleaning generated files
- Catching errors and warnings
- External build command
How do you preview the PDF and jump between source and output?
LaTeX Workshop includes a preview feature. The wiki's Viewing & SyncTeX section describes the internal PDF viewer, including color and invert mode options.
SyncTeX links positions in the source to positions in the PDF. The wiki explains how SyncTeX works in the internal viewer and how to use it with an external PDF viewer.
- Internal PDF viewer, with color and invert mode
- SyncTeX
- External PDF viewer, including using SyncTeX with it
How do you use autocomplete, snippets and hover help?
The extension's Intellisense features cover autocomplete for citations, references, commands, environments, files, and BibTeX files. The wiki also documents @ suggestions, including inserting Greek letters and mathematical helpers.
Snippets and shortcuts cover environments, sectioning, font commands, and surrounding text. Hover features show package and command documentation, previews of equations and graphics, and details for citations and references.
- Citations, references, commands, environments and file completion
- @ suggestions, including Greek letters and mathematical helpers
- Snippets for environments, sectioning and font commands
- Hover previews for equations, graphics, citations and references
How do you check your LaTeX for errors and style problems?
The Linting section of the wiki describes two checks: duplicate labels and Chktex. The Formatting section covers formatting for LaTeX files and BibTeX files.
Use these checks alongside the compile error output so you can fix problems before you submit or share a document.
- Duplicate labels
- Chktex
- Formatting for LaTeX and BibTeX files
What people use it for
- Writing a technical paper in LaTeX while keeping your code and notes in the same editor
- Compiling and previewing a thesis that spans several files
- Using autocomplete for citations, references and commands while writing
- Checking a document for duplicate labels or style issues with the linting tools
Frequently asked questions
Is LaTeX Workshop free?
Yes. The repository is licensed under the MIT License, which is shown in the README badge. The README does not list any paid tier.
What do I need to run LaTeX Workshop?
You need Visual Studio Code, updated to a version the extension supports, and a LaTeX distribution. The wiki's Requirements section describes what to install.
Does LaTeX Workshop work without Visual Studio Code?
No. The project describes itself as an extension for Visual Studio Code. If you want a standalone LaTeX editor, the comparable projects listed for this item are Overleaf, TeXstudio and TeXmaker.
How do I fix compile errors with LaTeX Workshop?
The wiki's Catching errors and warnings section explains how the extension reports build problems. The Compiling section covers building and stopping compilations, and the Linting section covers checks like duplicate labels and Chktex.
Can I use LaTeX Workshop with Docker or WSL?
The wiki's Installation and basic settings section includes Using Docker and Using WSL subsections. Read those for setup details.
How does LaTeX Workshop compare with TeXstudio, TeXmaker or Overleaf?
This guide does not compare the tools feature by feature. LaTeX Workshop is a VS Code extension, while TeXstudio, TeXmaker and Overleaf are listed as comparable projects in the source.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
LaTeX Workshop suits people who already use Visual Studio Code and want compiling, PDF preview, and autocomplete in one place. If you want a standalone LaTeX editor, or you do not write LaTeX, pick a different tool such as TeXstudio, TeXmaker or Overleaf.
Install options & downloads