\usepackage{integrations}
Drop into any stack.
FormaTeX is a plain HTTP API. If your language can make a POST request, it can compile LaTeX. Here are ready-to-use examples for the most common stacks.
\env
bash
# .env
FORMATEX_API_URL=https://api.formatex.io
FORMATEX_API_KEY=fex_... # from your dashboardnpm SDK
formatex · Node.js · Bun · Deno
\install
bash
npm install formatex-sdkcompile.ts
import { writeFileSync } from "node:fs";
import { FormaTexClient } from "formatex-sdk";
const client = new FormaTexClient(process.env.FORMATEX_API_KEY!);
const latex = `
\\documentclass{article}
\\begin{document}
Hello, FormaTeX!
\\end{document}`;
const result = await client.compile(latex);
writeFileSync("output.pdf", result.pdf);\env
bash
# .env
FORMATEX_API_URL=https://api.formatex.io
FORMATEX_API_KEY=fex_... # from your dashboard\and{more}
Any language. Any runtime.
FormaTeX is plain HTTP with JSON. If it runs on a server and can make a POST request, it works.
RustJavaKotlinSwiftC#ElixirHaskellScalaDartLuaJuliaRMATLAB
