YaTex is a LaTeX and notebook-based extension for VS Code, aiming to streamline the process of creating high-quality formatted PDF documents.
The content of notebooks is composed of YAML and Markdown cells. The YAML cells are used to generate .tex files for building LaTeX documents.
Environment Requirements
XeLaTeX compiler for building LaTeX documents
It is strongly recommended to install MikTeX with XeLaTeX compiler. MikTeX will automatically install missing LaTeX packages during the build process.
Quick Start
Open the Command Palette (Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows and Linux) and run the command YaTeX: Initialize Workspace to set up a new YaTeX workspace with sample files.
Open the Command Palette again and run YaTeX: Build PDF to compile the LaTeX document and generate a PDF.
Check the build folder in your workspace for the generated PDF file.
Compose Your Document
See the example.ytx file generated in the workspace for an example of how to structure your notebook with YAML and Markdown cells.
Add a .ytx file under the preferred language folder in the notebooks folder.
Become a composer.
Register your .ytx file in the sections.ytx, which controls the order of sections of the output document.
Build the PDF to see the result.
Development
Build & Compile
# Development build (with sourcemap)
npm run compile
# Watch mode (auto-rebuild on file changes)
npm run watch
# Production build (optimized & minified)
npm run package
Publishing to VS Code Marketplace
Install VSCE (one-time setup):
npm install -g @vscode/vsce
Update version in package.json:
Increment version field (e.g., 0.0.6 → 0.0.7)
Publish to the marketplace:
# Automatic patch version bump
vsce publish patch
# Or specify version explicitly
vsce publish 0.0.7
# Major/minor version bumps
vsce publish minor # 0.0.6 → 0.1.0
vsce publish major # 0.0.6 → 1.0.0
Note: Requires authentication with GitHub/Microsoft account associated with the BennettHu publisher account.