mTeX for VSCodeRead 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.
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. Use mtex: Open Another Reader for
a separate tab, or mtex: Open Reader in Browser for a private live reader
that also follows unsaved changes. A standalone The Marketplace extension ID is If you installed the earlier
Included files, local macro packages 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. The source that opened the reader is its entry candidate. If there is a nearby
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 toggle Compact view in its command
palette. 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 Select Compact side outline in the reader palette to choose On, Off, or Auto in the right panel. 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. Open equation quick views stay open while you edit, updating their formulas and numbers after the preview catches up. Labels and source positions keep them on the same target when earlier equations are inserted. Removing a target closes its card; edits do not reopen cards you have dismissed. Right-click prose and choose Add bookmark to keep a numbered marker beside the scrollbar. It follows the passage while visible and pins to the top or bottom corner while you read elsewhere. Click its icon to return, or × to remove it. Multiple bookmarks are supported; they survive unsaved edits and closing/reopening the reader, using local extension storage without changing your TeX files. Right-click a marker (or focus it and press Shift+F10) to set a text label and choose a color. Hovering shows its label; labels and colors survive reloads too. Small prose corrections retain places when their context is unambiguous. 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. Press ? (Shift+/) while reading to find highlights, underlines and remarks.
To keep marks with the project, set Press ! (Shift+1) in the reader to open Diagnostics, including in compact view. The tab lists errors, warnings and document statistics for the current preview, including unsaved edits. Use Enter on an issue to open its source location in VS Code. From the reader palette, enable developer mode and select Measure typing to render latency to log each measured edit in VS Code's mtex Reader output channel. Standard text sizes ( For a Beamer document, run mtex: Enter Presentation Mode in VS Code's command palette, use the play action on the reader tab, or focus the reader and choose Enter presentation mode from its > palette. The native command opens the reader if needed and waits for the current unsaved buffers to be ready. Present slides inside the reader tab with arrow/Page Up/Page Down keys and the progress, aspect-ratio and font controls. Escape restores the reading layout, including compact view. Fullscreen is optional and depends on the webview host; no separate browser or server is required. Choose Export HTML or Export PDF in the reader's command palette (>), or use mtex: Export HTML / mtex: Export PDF (via Browser) in VS Code's command palette. HTML saves a complete offline file, including accepted unsaved edits, math, images, fonts and Beamer presentation mode. PDF opens an offline copy in your default browser; choose Save as PDF in its print dialog, or use the page's Print / save PDF control if automatic printing is blocked. No server, Chromium bundle or TeX installation is needed. Source files and Git are untouched; private comments and personal annotations are excluded. Private print pages are removed on extension shutdown. Remote-host browser opening depends on that host's setup; HTML can be copied to a local machine and printed there. See the complete guide for setup, multi-file behavior and development checks. |