Provides LaTeX.js preview in VSCode.
Showcase document by Michael Brade
- VSCode (>= 1.32.0)
- An internet connection: To pull the most current LaTeX.js package
- Optional but recommended: LaTeX Workshop
- Provides syntax highlighting, autocomplete, colorise and more.
- ❗ IMPORTANT ❗: Please turn off compilation features in LaTeX Workshop to not let it interfere with this extension.
- Install this extension
- Open any valid LaTeX.js-supported file
- Open the command palette (Windows:
Ctrl+Shift+P
, Mac:Cmd+Shift+P
) - Run the
LaTeX.js: Open Preview
orLaTeX.js: Open Preview to The Side
command.
- Does not support
CustomMacros
orlanguagePatterns
in LaTeX.js HtmlGenerator options.
- LaTeX.js requires a DOM to function--VSCode on Electron does not have a DOM, so rendering is done inside the webview (that contains a DOM). There are ways to get around this (such as jsdom), but it is not that straightforward.
- Compilation requires passing the generated HTML from the webview to the extension, I will look into this if there is demand.
- There can be an option for selecting the LaTeX.js version wanted, I will add this feature if there exists a need.
- File bugs and/or feature requests in the GitHub repository
- Pull requests are welcome in the GitHub repository
- Buy me a Coffee ☕️ via PayPal