LaTeX Workshop 默认的编译工具是 latexmk,大家根据需要修改所需的工具和命令,我不需要用到 latexmk,因此我把其修改为中文环境常用的 xelatex,大家根据需要自行修改。(感谢 @huan Yu ,将 tools 中的%DOC%. Visual Studio Code.
- Working with Jupyter Notebooks in Visual Studio Code. Jupyter (formerly IPython Notebook) is an open-source project that lets you easily combine Markdown text and executable Python source code on one canvas called a notebook.Visual Studio Code supports working with Jupyter Notebooks natively, as well as through Python code files.This topic covers the native support available for Jupyter.
- This is my first video on youtube with voice recording. LaTeX live on Visual Studio Code link for MikTeXfor MacTeXhttps://www.
- 1) Open your VS Code and go to the Commands tab (Cmd + Shift + P generally), and open the settings by typing Preference: Open Settings. 2) In the window that appears, locate the Extensions tab. Click and find LaTex. 3) Fill in the required fields with the paths discovered in the previous step.
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.50.0
.Manual
The manual of the extension is maintained as a wiki
Table of Contents
- Installation and basic settings
- Usage
- Compiling
- Viewing & SyncTeX
- Internal PDF viewer
- External PDF viewer
- Formatting
- Intellisense
- Snippets and shortcuts
- Hovering and previewing features
- Playing with environments
- Extra features
Features (Taster)
![Latex in visual studio code Latex in visual studio code](/uploads/1/2/1/4/121426476/815130767.png)
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
.tex
source 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
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
FXY
whereXY
are the last two letters of the font command name, eg.FIT
givestextit{}
. See here. - Many other maths symbols can be obtained with the
@
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).
- When the current line starts with
item
oritem[]
, hittingEnter
automatically adds a newline starting in the same way. For a better handling of the last item, hittingEnter
on a line only containingitem
oritem[]
actually deletes the content of the line. Thealt+Enter
is bind to the standard newline command. This automatic insertion ofitem
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.
GitHub
Vscode Latex Setting
The code for this extension is available on github at: https://github.com/James-Yu/LaTeX-Workshop
Like this work?
Use Latex In Visual Studio Code
- :smile: Star this project on GitHub and Visual Studio Marketplace
- :blush: Leave a comment
- :relaxed: Spare me some coffee via Paypal