Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>MD Math ExportNew to Visual Studio Code? Get it now.
MD Math Export

MD Math Export

vytools

|
2 installs
| (0) | Free
Export Markdown to HTML or PDF with KaTeX math, syntax highlighting, and GFM support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MD Math Export

Export Markdown files to standalone HTML with KaTeX math rendering and syntax-highlighted code blocks. Open the exported file in any browser and use Print → Save as PDF to produce a clean, print-ready PDF.

Features

  • KaTeX math — inline $...$ and display $$...$$ math rendered via KaTeX
  • GitHub Flavored Markdown — tables, strikethrough, task lists, and more
  • Syntax highlighting — code blocks highlighted in a clean light theme
  • Self-contained output — a single .html file you can open anywhere
  • Local images — <img> tags referencing local files are resolved and embedded as absolute paths

Usage

With a .md file open, trigger the export in any of three ways:

  • Click the </> icon in the toolbar at the top right of the editor
  • Right-click the file in the Explorer and choose Export Markdown to HTML
  • Open the Command Palette (Ctrl+Shift+P) and run Export Markdown to HTML

A save dialog will appear. Choose a location and filename for the .html output.

Printing to PDF

Open the exported .html file in a browser, then click the Print / Save as PDF button at the top of the page (or press Ctrl+P / Cmd+P). In the print dialog, choose Save as PDF as the destination.

Math Syntax

Standard KaTeX syntax is supported:

Inline math: $E = mc^2$

Display math:
$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft