Awesome
Visual Studio Code LaTeX Workshop Extension
LaTeX Workshop is an extension for Visual Studio Code, aiming to provide core features for LaTeX typesetting with Visual Studio Code.
This project won't be successful without contributions from the community, especially from the current and past key contributors:
- Jerome Lelong
@jlelong
- Takashi Tamura
@tamuratak
- Tecosaur
@tecosaur
- James Booth
@jabooth
Thank you so much!
Note that the latest version of LaTeX-Workshop requires at least VSCode 1.88.0
(March 2024 or later).
Manual
The manual of the extension is maintained as a wiki
Table of Contents
- Home
- Installation and basic settings
- Compiling
- Linting
- Viewing & SyncTeX
- Formatting
- Intellisense
- Snippets and shortcuts
- Hovering and previewing features
- Playing with environments
- Extra features
- VS Code Remote Development
- FAQ and common issues
Features (Taster)
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.
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/build.gif" alt="build process gif" height="20px"> -
View PDF on-the-fly (in VS Code or browser).
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/preview.gif" alt="demo of preview feature" height="220px"> -
Direct and reverse SyncTeX. Click to jump between location in
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/synctex.gif" alt="demo of SyncTeX" height="220px">.tex
source and PDF and vice versa. -
Intellisense, including completions for bibliography keys (
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/ref.gif" alt="intellisense demo" height="80px">\cite{}
) and labels (\ref{}
). -
LaTeX log parser, with errors and warnings in LaTeX build automatically reported in VS Code.
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/errors.png" alt="error reporting demo" height="125px">- Linting
-
-
A lot of LaTeX commands can be typed using snippets starting in
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/subparagraph.gif" alt="auto \item demo" height="80px">\
, then type part of the command to narrow the search. -
Surround some selected text with a LaTeX command using <kbd>ctrl</kbd>+<kbd>l</kbd>, <kbd>ctrl</kbd>+<kbd>w</kbd> (<kbd>⌘</kbd>+<kbd>l</kbd>, <kbd>⌘</kbd>+<kbd>w</kbd> on Mac). A new menu pops up to select the command. This works with multi selections. The former approach using
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/wrap.gif" alt="wrap demo" height="140px">\
has been deprecated. -
We also provide a few other suggestion mechanisms
-
Greek letters are obtained as
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/greek letter.gif" alt="greek letters demo" height="20px">@
+letter
. Some letters have variants, which are available as@v
+letter
. See here. -
Common environments can be obtained by
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/BSAL snippet.gif" alt="BSAL demo" height="55px">BXY
whereXY
are the first two letters of the environment name, eg.BEQ
gives theequation
environment. If you want the star version of the environment, useBSXX
, eg.BSEQ
gives theequation*
environment. See here. -
Common font commands can be obtained by
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/FBF snippet.gif" alt="FBF demo" height="20px">FXY
whereXY
are the last two letters of the font command name, eg.FIT
gives\textit{}
. See here. -
Many other maths symbols can be obtained with the
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/frac.gif" alt="\frac shortcut demo" height="20px"> <img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/int.gif" alt="\int shortcut demo" height="20px">@
prefix. See here.
-
-
-
-
In addition to snippets, there are shortcuts provided by the extension that allow you to easily format text (and one or two other things).
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/emph.gif" alt="\emph{} demo" height="20px">
-
-
When the current line starts with
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/auto item.gif" alt="auto \item demo" height="80px">\item
or\item[]
, hittingEnter
automatically adds a newline starting in the same way. For a better handling of the last item, hittingEnter
on a line only containing\item
or\item[]
actually deletes the content of the line. Thealt+Enter
is bind to the standard newline command. This automatic insertion of\item
can be deactivated by settinglatex-workshop.bind.enter.key
tofalse
. -
Preview on hover. Hovering over the start tag of a math environment causes a mathjax preview to pop up.
<img src="https://github.com/James-Yu/LaTeX-Workshop/raw/master/demo_media/hover.gif" alt="equation hover demo" height="120px">
GitHub
The code for this extension is available on github at: https://github.com/James-Yu/LaTeX-Workshop
Like this work?
- :smile: Star this project on GitHub and Visual Studio Marketplace
- :blush: Leave a comment
- :relaxed: Thank the develops and community for their effort.