tex.gaato.net provides endpoints to render LaTeX strings as SVG or PNG images.
- Cloudflare Workers compatible runtime
- TypeScript
- MathJax v4.1.0
- optional Node.js container runtime for PNG rendering
pnpm installThis project enforces dependency build-script policy in pnpm-workspace.yaml. If a new dependency requires install scripts, explicitly review and allow it there.
pnpm install --frozen-lockfile
pnpm buildpnpm dev:nodeThis starts a local HTTP server on 127.0.0.1:8080 with the compatibility
endpoints used by coderunbot.
pnpm devThis builds TypeScript and starts wrangler dev using wrangler.toml.
pnpm deployBefore first deploy, authenticate once:
pnpm dlx wrangler loginThe repository includes deploy workflow.
Set the following repository secrets before using it:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
The repository also includes container workflow.
Set the following repository secret before using it:
GHCR_PAT
When running the Node server directly, use LISTEN_HOST and PORT to override
the bind address.
Renders a LaTeX string as an SVG image.
Alias for /render.
Renders a LaTeX string as a PNG image. This endpoint is available from the Node
server / container runtime and is the compatibility endpoint currently used by
coderunbot.
| Parameter | Type | Description |
|---|---|---|
| latex | string | LaTeX string to be rendered |
- 200 OK
image/svg+xml: SVG image
- 400 Bad Request
text/plain: Error message if the LaTeX string is missing or if there's a LaTeX syntax error
- 500 Internal Server Error
text/plain: Error message if any other error occurs