Typst & LaTeX Compiler
Compile Typst and LaTeX documents to PDF via API. Send source code, get back a PDF.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/gregm711/typetexTypst & LaTeX Compiler
Compile Typst (.typ) and LaTeX (.tex) documents to PDF using the TypeTex compilation API.
API Endpoint
Base URL: https://studio-intrinsic--typetex-compile-app.modal.run
Endpoints
Compile Typst
POST /public/compile/typst
Content-Type: application/json
Request Body:
{
"content": "#set page(paper: \"a4\")\n\n= Hello World\n\nThis is a Typst document.",
"main_filename": "main.typ",
"auxiliary_files": {}
}
Response (Success):
{
"success": true,
"pdf_base64": "JVBERi0xLjQK..."
}
Response (Failure):
{
"success": false,
"error": "error: file not found: missing.typ"
}
Compile LaTeX
POST /public/compile/latex
Content-Type: application/json
Request Body:
{
"content": "\\documentclass{article}\n\\begin{document}\nHello World\n\\end{document}",
"main_filename": "main.tex",
"auxiliary_files": {}
}
Response (Success):
{
"success": true,
"pdf_base64": "JVBERi0xLjQK..."
}
Response (Failure):
{
"success": false,
"error": "! LaTeX Error: Missing \\begin{document}.",
"log_output": "This is pdfTeX..."
}
Health Check
GET /public/compile/health
Returns {"status": "ok", "service": "public-compile"} if the service is running.
Usage Examples
Simple Typst Document
import requests
import base64
response = requests.post(
"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst",
json={
"content": """
#set page(paper: "a4", margin: 2cm)
#set text(font: "New Computer Modern", size: 11pt)
= My Document
This is a paragraph with *bold* and _italic_ text.
== Section 1
- Item 1
- Item 2
- Item 3
""",
"main_filename": "main.typ"
}
)
result = response.json()
if result["success"]:
pdf_bytes = base64.b64decode(result["pdf_base64"])
with open("output.pdf", "wb") as f:
f.write(pdf_bytes)
print("PDF saved to output.pdf")
else:
print(f"Compilation failed: {result['error']}")
Simple LaTeX Document
import requests
import base64
response = requests.post(
"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/latex",
json={
"content": r"""
\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\title{My Document}
\author{Author Name}
\begin{document}
\maketitle
\section{Introduction}
This is a LaTeX document with math: $E = mc^2$
\end{document}
""",
"main_filename": "main.tex"
}
)
result = response.json()
if result["success"]:
pdf_bytes = base64.b64decode(result["pdf_base64"])
with open("output.pdf", "wb") as f:
f.write(pdf_bytes)
else:
print(f"Compilation failed: {result['error']}")
if result.get("log_output"):
print(f"Log: {result['log_output']}")
Multi-File Project (Typst)
import requests
import base64
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-gregm711-typetex": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
agentyard
This skill enables agents to collaborate on AgentYard (agentyard.dev) - the world's first agent-only codebase. Use this skill when an agent wants to build, contribute, or collaborate on the AgentYard repository. Provides registration workflow, secure token storage, and GitHub operations (branches, PRs, issues, discussions). Triggers on "agentyard", "agent-only codebase", "collaborate with other agents", or requests to build on a shared agent repository.
clawdaddy
The world's
clawdaddy
The world's