Simple LaTeX Preview
English | 日本語
A lightweight LaTeX preview for VS Code.
Unlike other LaTeX extensions, it also works in VS Code for the Web (vscode.dev / github.dev). No TeX installation is required.

Usage
- Open a
.tex file
- Click the preview icon at the top right of the editor, or run
LaTeX Preview: Open Preview to the Side from the Command Palette
- The preview updates as you type
Use the buttons at the top right of the preview to zoom out / in (− / +), show at actual size (100%), or fit to the window (Fit).
Double-click on the preview to jump to that line in the editor.
The preview follows the active .tex editor. Click the lock icon at the top right of the preview tab to keep it on the current file; opening the preview again then creates a new preview, so you can view several files side by side.
Supported syntax
- Math:
$...$ \(...\) $$...$$ \[...\], equation align gather multline (rendered with KaTeX)
- Headings:
\section to \subsubsection (numbered), \paragraph
- Text styles:
\textbf \textit \emph \texttt \textcolor etc., declarations such as {\bf ...} \large \color, and \centering
- Special characters: accents (
\'e \"o \^\i), \ss \o \copyright \S etc.
- Theorems:
\newtheorem (shared / parent counters, *), \theoremstyle, proof
- Table of contents:
\tableofcontents (no page numbers), \appendix
\title \author \date \maketitle
- Text styles:
\textbf \textit \emph \texttt \underline, etc.
- Lists:
itemize enumerate description
figure / table with \caption
- Images:
\includegraphics shows PNG / JPEG / SVG / GIF / WebP from the workspace (width / height / scale / angle, \graphicspath). EPS / PDF are shown as a placeholder with the file name
- Tables:
tabular tabular* tabularx (l c r p{width}, vertical rules |, \hline, \cline, \multicolumn, \multirow)
- Code:
verbatim Verbatim lstlisting (with caption / label) minted, inline \verb / \lstinline (no syntax highlighting)
- Macros:
\newcommand \renewcommand \providecommand \def (with arguments and default optional arguments; also usable inside math)
- Bibliography:
\bibliography reads .bib files in the same folder as the .tex file; \bibliographystyle decides the order (citation order for unsrt / junsrt, by author otherwise; alpha labels). thebibliography / \bibitem and \cite / \nocite are also supported
- Equation numbering for
equation / align / gather / multline (\nonumber / \notag / \tag supported)
- Cross references:
\label with \ref / \eqref (sections, figures, tables and equations; forward references work)
- Font size, line spacing and indentation based on the document class (
jsarticle / article families)
- Two-column layout with
twocolumn, and page breaks based on \textheight
\setlength in the preamble (\textwidth \textheight \columnsep \parindent)
- Japanese:
\ruby (per-character ruby with |), emphasis dots \kenten \bou, \textgt \textmc, \和暦 / \西暦 for \today, and \UTF from the otf package
Unsupported commands do not cause errors; they are shown as dimmed source text.
Settings
| Setting |
Default |
Description |
latexPreview.debounceMs |
200 |
Delay in milliseconds before the preview updates after an edit |
latexPreview.followActiveEditor |
true |
The preview follows the active .tex editor. When false, each file gets its own preview |
latexPreview.mathMacros |
{} |
KaTeX macros available in every document (e.g. { "\\R": "\\mathbb{R}" } in settings.json). \newcommand in the document takes precedence |
latexPreview.paginate |
true |
Split documents with \documentclass into pages of \textheight. When false, show one continuous page |
latexPreview.scrollSync |
true |
Sync scrolling between the editor and the preview |
latexPreview.showUnknownCommands |
true |
Show unsupported commands as dimmed source text |
You can also open them from Open Settings in the preview's "…" menu.
Limitations
- EPS / PDF images cannot be displayed
- Default dimensions are approximations of each document class
- Bibliography entries follow the
plain / jplain / abbrv / ieeetr families in a simplified form
Bug reports and feature requests
For developers, see docs/README.en.md.
License
| |