Skip to content

A simple axum API for compiling TeX/LaTeX with Tectonic, hosted on Hugging Face Spaces.

Notifications You must be signed in to change notification settings

winstxnhdw/tectonic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tectonic-api

main.yml build.yml warmer.yml dependabot.yml

Open in Spaces Open a Pull Request

A simple axum API for compiling TeX/LaTeX with Tectonic, hosted on Hugging Face Spaces.

Usage

Simply cURL the endpoint like in the following.

curl -O 'https://winstxnhdw-tectonic-api.hf.space/v1/compile' \
     -H 'Content-Type: application/json' \
     -d \
'{
    "latex": "\\\documentclass{article}\\\begin{document}Hello, world!\\\end{document}"
 }'

Development

You can spin the server up locally with the following.

docker build -f Dockerfile.build -t tectonic-api .
docker run --rm -e SERVER_PORT=5000 -p 5000:5000 tectonic-api