Skip to content

kwvg/LaTeX.js

 
 

Repository files navigation

VSCode LaTeX.js Preview

Provides LaTeX.js preview in VSCode.

Preview

Showcase document by Michael Brade

Requirements

  • 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.

Usage Guide

  • 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 or LaTeX.js: Open Preview to The Side command.

Extension Controls, Commands and Settings

Limitations

Notes

  • 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.

Contributing

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.0%
  • JavaScript 4.0%