Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>mTeX for VSCodeNew to Visual Studio Code? Get it now.
mTeX for VSCode

mTeX for VSCode

mTeX developers

|
2 installs
| (0) | Free
Read LaTeX beside your VS Code editor with a bundled offline reader and two-way source navigation.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

mTeX for VSCode

Read LaTeX beside its source, including changes you have not saved. The VSIX contains the reader, compiler worker, styles and math fonts. No separate server, TeX distribution, Node.js installation or Git installation is needed to use it.

  1. Install mTeX-for-vscode-0.2.3.vsix using Extensions → … → Install from VSIX…. Build it from the mtex checkout with pnpm vscode:package.
  2. Open and trust your LaTeX project folder, then open a .tex file.
  3. Click mtex: Open Reader to the Side in the editor's title bar, or run that command from the command palette.

The reader opens in a new tab in the adjacent editor group, keeping existing source and reader tabs. Opening the same main document again reuses its reader and reading position. Different documents keep independent live previews and source navigation. A standalone .tex file also works; its containing directory becomes the source boundary.

The Marketplace extension ID is mTeXdevelopers.mTeX-for-vscode. After publication, install it with code --install-extension mTeXdevelopers.mTeX-for-vscode.

If you installed the earlier mtex.mtex-preview or mTeXdevelopers.mTeX package, uninstall it before installing this extension: they register the same reader commands.

  • Editor → reader: put the cursor in the source and press Ctrl+Alt+J (Cmd+Alt+J on macOS), or use mtex: Show in Reader in the context menu. The reader reveals the corresponding block and opens collapsed ancestors.
  • Reader → editor: double-click a source-mapped paragraph or equation. VS Code opens its file and places the cursor at the mapped source position.
  • Close: run mtex: Close Reader, or close its tab. Other readers stay open and continue updating.

Included files and bibliographies use their current editor buffers. Edits are sent directly through VS Code's message API, without server polling. The extension never saves source files, changes Git history or adds a managed mtex project. Saving remains under your control in VS Code.

Choose the main document with % !TeX root = ../main.tex, the mtex: Entry File setting, or the document picker. Entry File paths are relative to the workspace folder. Symlinks, outside paths, tool/build directories and generated PDF/auxiliary files are excluded. Limits are 100 files, 5 MiB per file and 20 MiB total.

Source navigation uses mtex's HTML source maps at rendered block boundaries, including CRLF/Unicode and included files. Pending/stale previews cannot select old offsets in a newly edited buffer. Wait for the preview to update and try again if needed. PDF SyncTeX files are not required.

Readers start in Compact view at every window width: the header and status bar disappear, the outline sits beside the prose in wide groups or above it in narrow groups, and clicked footnotes, citations and quick views open in stacked cards at the bottom right. Focus the reader and press > (Shift+.) to choose Exit compact view from its command palette. Choose Enter compact view there to enable it at any width. Your explicit choice survives resizing and webview reloads, and takes precedence over the default. To start new readers in regular view, turn off mtex: Compact Mode By Default in VS Code settings, or add "mtex.compactModeByDefault": false to your user or workspace settings. Readers without an explicit palette choice follow changes to this setting immediately, without recompiling the document.

The reader palette also offers Compact side outline: On / Off / Auto. Auto is the default and shows the full side outline when there is room. On keeps it beside the prose; Off uses the compact Contents bar at any width. Other compact features stay enabled. This choice survives webview reloads. Vertical guides in the expanded outline and All sections make heading depth easier to follow.

The outline, notes, references, reading-width/font controls, themes and Beamer presentations work inside the reader. Source editing stays in VS Code. The regular mtex server app remains available independently; the old Server URL setting is no longer needed.

See the complete guide for setup, multi-file behavior and development checks.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft