typetex
Compile Typst and LaTeX documents to PDF via API.
Installation
npx clawhub@latest install typetexView the full skill documentation and source below.
Documentation
Typst & LaTeX Compiler
Compile Typst (.typ) and LaTeX (.tex) documents to PDF using the TypeTex compilation API.
API Endpoint
Base URL:
## Endpoints
### Compile Typst
__CODE_BLOCK_0__
**Request Body:**
__CODE_BLOCK_1__
**Response (Success):**
__CODE_BLOCK_2__
**Response (Failure):**
__CODE_BLOCK_3__
### Compile LaTeX
__CODE_BLOCK_4__
**Request Body:**
__CODE_BLOCK_5__
**Response (Success):**
__CODE_BLOCK_6__
**Response (Failure):**
__CODE_BLOCK_7__
### Health Check
__CODE_BLOCK_8__
Returns {"status": "ok", "service": "public-compile"} if the service is running.
## Usage Examples
### Simple Typst Document
__CODE_BLOCK_9__
### Simple LaTeX Document
__CODE_BLOCK_10__
### Multi-File Project (Typst)
__CODE_BLOCK_11__
### Including Images
For binary files like images, base64-encode them:
__CODE_BLOCK_12__
### Using curl
__CODE_BLOCK_13__
## Supported Features
### Typst
- Full Typst language support
- Multi-file projects with imports
- Images (PNG, JPG, SVG)
- Custom fonts (New Computer Modern, etc.)
- Math equations
- Tables and figures
- Bibliography (using Hayagriva format)
### LaTeX
- Full TeX Live distribution via Tectonic
- Multi-file projects (\input, \include)
- BibTeX/BibLaTeX bibliography
- Custom style files (.sty, .cls)
- All standard packages (amsmath, graphicx, etc.)
- TikZ/PGFPlots graphics
- Images (PNG, JPG, PDF, EPS)
## Error Handling
When compilation fails, the response includes:
- success: false
- error: Human-readable error message
- log_output (LaTeX only): Full compilation log for debugging
Common errors:
- **Syntax errors**: Check your source code for typos
- **Missing files**: Ensure all imported/included files are in auxiliary_files
- **Package not found**: Most common packages are available; contact support for additions
- **Timeout**: Complex documents may timeout after 60 seconds
## Rate Limits
- No authentication required
- Please be respectful of shared resources
- For high-volume usage, contact support
## Tips for Agents
1. **Always check success** before accessing pdf_base64
2. **Parse errors** to provide helpful feedback to users
3. **Use minimal documents** when testing - complex documents take longer
4. **Cache results** if compiling the same content multiple times
5. **Include all dependencies** in auxiliary_files` for multi-file projects
Related Resources
- [Typst Documentation]()
- [LaTeX Wikibook]()
- [TypeTex]() - Full document editor with AI assistance