How swiftlatex/texlive-ondemand works
Project type and purpose
• This is a single-service, backend‐only application implemented in Python.
• Purpose: serve TeX Live files (formats, fonts, macro packages, etc.) on demand over HTTP so TeX engines (pdftex, xetex) can fetch needed resources lazily instead of bundling a full local TeX Live tree.
File structure
• Top-level scripts and config:
• Dockerfile, docker-compose.yml: containerized deployment
• app.py, wsgi.py: Python WSGI web application
• requirements.txt: Python dependencies
• kpathsea_*.py, pykpathsea_*.c: custom path‐resolution modules binding to kpathsea C library
• .fmt and .txt files: prebuilt TeX format files and font listings served to clients
• sign.bat: Windows helper, not in main request path
• No separate “frontend” or databases—pure HTTP file‐server logic wrapping kpathsea lookups.
README for additional insights
• Confirms the goal is “Serving TexLive Files in an On-Demand Manner.”
Final advice
• Every single moving part: C-extensions, format files, Docker layers.
• Keep labels precise (“HTTP GET /fonts/cm-unicode.ttf”) to show real endpoints.
• Use consistent iconography: containers, servers, libraries.