Visual Studio Code extension for interacting with TeXpresso, which provides a "live rendering" experience when editing LaTeX documents. TeXpresso needs to be installed separately to use this extension, following its install guide which contains instructions for macOS, Fedora, Arch Linux, Debian, and Ubuntu. The extension can be used simultaneously with other LaTeX extensions such as LaTeX Workshop.
After installing the extension, you need to configure the path to the TeXpresso binary in the settings.
To use this extension, open the .tex
document you wish to edit, then open the command pallete (Ctrl + Shift + P), and select TeXpresso: Start Document
. A separate window will open showing the compiled preview. The preview immediately updates when you edit the file in VS Code, and using SyncTeX the preview automatically jumps to the current code position (and vice versa for clicks in the preview window). Buttons at the top of the editor are provided to switch pages, and a compile log for seeing compilation errors can be found by using the Output panel.
To change pages, use the buttons:
Use SyncTeX (forwards - editor to preview):
Use SyncTeX (backwards - preview to editor):
Use theme colors in preview (if the useEditorTheme
setting is activated):
TeXpresso must be installed, and must be callable at the path provided in the texpresso.command
setting.
This extension contributes the following settings:
texpresso.command
: The path to the texpresso binary.texpresso.useWSL
: Controls whether to run TeXpresso within Windows Subsystem for Linux (WSL).texpresso.syncTeXForwardOnSelection
: Controls whether the preview should be updated when the selection in the editor changes.texpresso.useEditorTheme
: Controls whether the preview should use the same color theme as the editor.TeXpresso and the underlying LaTeX compilers are based on a UTF-8 byte representation, and communication between the editor and TeXpresso occurs in terms of byte offsets. However, VS Code only provides access to character positions and not their byte position. Thus, this extension keeps a copy of the current document in a rope data structure (wikipedia), enriched with byte offsets. This allows for efficient conversion between character and byte positions, and also allows for efficient edits to the underlying text string. The code for the rope data structure builds on https://github.com/component/rope.
The extension does not yet react instantaenously to changes to files that are included using commands like \input
.
Loses connection if the filename of the main document is changed.
Add support for executing TeXpresso on WSL (Windows Subsystem for Linux).
Add a button for toggling automatic SyncTeX forward when the selection changes.
Turn off the extension when the TeXpresso window is closed.
Added support for color themes.
Changed settings identifiers.
Initial release of the extension.