Interactive Demo
Try out LaTeX compilation below. Select an engine, configure options, and compile your LaTeX code.
Fonts must be referenced by filename rather than by font name, e.g. \setmainfont{FiraSans-Regular.otf} instead of \setmainfont{Fira Sans}.
Features requiring external tools such as SVG inclusion, bibliography processing with biber, or shell escape (e.g. minted) are not supported in WebAssembly.
Input
PDF Preview
Compilation Log
Features
- XeLaTeX: Compile with XeTeX engine + bibtex8 + dvipdfmx
- PdfLaTeX: Compile with PdfTeX engine + bibtex8
- LuaLaTeX: Compile with LuaHBTeX engine + bibtex8
- Multi-file Support: Handle complex projects with multiple .tex and .bib files
- SyncTeX: Generate SyncTeX files for editor synchronization
- On-Demand Packages: Optional TeX Live remote endpoint fetches additional packages at compile time, beyond those bundled in
texlive-extra - All compilation runs entirely in the browser with no server required (aside from optional on-demand package fetching)
Installation
npm install texlyre-busytex
npx texlyre-busytex download-assetsUsage
import { BusyTexRunner, XeLatex, PdfLatex, LuaLatex } from 'texlyre-busytex';
// Combined mode (single WASM with all engines, default)
const runner = new BusyTexRunner({
busytexBasePath: '/core/busytex'
});
await runner.initialize();
const xelatex = new XeLatex(runner);
const result = await xelatex.compile({
input: '\\documentclass{article}\\begin{document}Hello\\end{document}',
bibtex: true,
makeindex: true,
rerun: true,
});
if (result.success && result.pdf) {
const blob = new Blob([result.pdf], { type: 'application/pdf' });
window.open(URL.createObjectURL(blob));
}
// Split mode (per-engine WASM, smaller downloads)
const pdftexRunner = new BusyTexRunner({
busytexBasePath: '/core/busytex',
engineMode: 'pdftex'
});
await pdftexRunner.initialize();
const pdflatex = new PdfLatex(pdftexRunner);
const pdfResult = await pdflatex.compile({
input: '\\documentclass{article}\\begin{document}Hello\\end{document}'
});
// Switch engines with split builds
const xetexRunner = new BusyTexRunner({
busytexBasePath: '/core/busytex',
engineMode: 'xetex'
});
await xetexRunner.initialize();
const xelatexSplit = new XeLatex(xetexRunner);
const xeResult = await xelatexSplit.compile({
input: '\\documentclass{article}\\begin{document}Hello\\end{document}'
});