LaTeX Workshop is an extension for Visual Studio Code, aiming to provide all-in-one features and utilities for LaTeX typesetting with Visual Studio Code.
This project won't be successful without contributions from the community, especially project maintainers Jerome Lelong @jlelong, James Booth @jabooth, and all code contributors! Thank you!
The manual of the extension is maintained as a wiki
- Installation and basic settings
- Compiling
- Linting
- Viewing & synctex
- Formatting
- Multi file projects
- Intellisense
- Snippets and shortcuts
- Hovering features
- Playing with environments
- FAQ and common issues
This is not a complete list but rather a preview of some of the coolest features.
-
Build LaTeX (including BibTeX) to PDF automatically on save.
-
View PDF on-the-fly (in VS Code or browser).
-
Direct and reverse SyncTeX. Click to jump between location in
.texsource and PDF and vice versa.
-
Intellisense, including completions for bibliography keys (
\cite{}) and labels (\ref{}).
-
LaTeX log parser, with errors and warnings in LaTeX build automatically reported in VS Code.
- Linting
-
-
A lot of LaTeX commands can be typed using snippets starting in
\, then type part of the command to narrow the search.
-
Surround some selected text with a LaTeX command using ctrl+l, ctrl+w (⌘+l, ⌘+w on Mac). A new menu pops up to select the command. This works with multi selections. The former approach using
\has been deprecated.
-
We also provide a few other snippets mechanisms
-
Greek letters are obtained as
@+letter. Some letters have variants, which are available as@v+letter. See here.
-
Common environments can be obtained by
BXYwhereXYare the first two letters of the environment name, eg.BEQgives theequationenvironment. If you want the star version of the environment, useBSXX, eg.BSEQgives theequation*environment. See here.
-
Common font commands can be obtained by
FXYwhereXYare the last two letters of the font command name, eg.FITgives\textit{}. See here.
-
Many other maths symbols can be obtained with the
@prefix. See here.
-
-
-
When the current line starts with
\itemor\item[], hittingEnterautomatically adds a newline starting in the same way. For a better handling of the last item, hittingEnteron a line only containing\itemor\item[]actually deletes the content of the line. Thealt+Enteris bind to the standard newline command. This automatic insertion of\itemcan be deactivated by settinglatex-workshop.bind.enter.keytofalse.
-
Preview on hover. Hovering over the start tag of a math environment causes a mathjax preview to pop up.
The code for this extension is available on github at: https://github.com/James-Yu/LaTeX-Workshop
- 😄 Star this project on GitHub and Visual Studio Marketplace
- 😊 Leave a comment
☺️ Spare me some coffee via Paypal
