Node.js LaTeX compiler wrapper using Tectonic engine with automatic binary download. Current stable version 1.0.5, actively maintained. Key differentiators: zero system dependencies, cross-platform binary auto-detection (Windows, macOS Intel/ARM, Linux), automatic CTAN package management, multiple I/O formats (file, text, buffer), real-time stdout/stderr streaming, and full TypeScript definitions. Unlike traditional LaTeX distributions (MiKTeX, TeX Live) or other Node wrappers (node-latex, latex-js), this package requires no manual installation of LaTeX binaries and handles platform-specific binaries automatically.
npm install node-latex-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a LaTeX string to PDF buffer with real-time stdout/stderr streaming and writes the output file.
Pre-download the binary for your platform and set the TECTONIC_BIN environment variable to its path before running compile.
Always check result.status first, then access result.pdfPath (file output) or result.pdfBuffer (buffer output) accordingly.
Pass exactly one of tex or texFile. Do not pass both.
Install libfontconfig1 on Debian/Ubuntu: sudo apt-get install libfontconfig1
If you need a custom binary, consider forking the package or pre-placing your binary at the expected location.
Reinstall: rm -rf node_modules && npm install node-latex-compiler
Reinstall the package or manually set executable permissions: chmod +x node_modules/node-latex-compiler/bin/tectonic-*
Use correct import: import { compile } from 'node-latex-compiler' (ESM) or const { compile } = require('node-latex-compiler') (CJS).Provide only one of tex (string content) or texFile (file path).
No dependency data recorded yet.