houbaoshu

Online LaTeX Compiler

Write LaTeX in the browser; the server compiles it to PDF with Tectonic, one sandbox per compile. Press ⌘/Ctrl + Enter to compile.

main.tex

Download PDF

The PDF appears here once you compile.

Nothing compiled yet.
Loading the editor… Tectonic

Drafts stay in this device’s browser. Everything in the sample can be edited.

  1. 01

    It really compiles

    The browser sends main.tex as JSON to the site’s own Rust service. For each request the service creates a private temporary directory, writes only main.tex into it, runs Tectonic once and returns the PDF together with the compiler log. The directory is removed on every return path, so the server keeps no documents; drafts live only in your browser.

  2. 02

    One sandbox per compile

    The source is treated as untrusted code: Tectonic runs with --untrusted and no shell escape. In production, Linux Landlock fences in each compile: it may execute only Tectonic itself, read only the package cache and two runtime files, and read and write only its own temporary directory. Local development uses macOS sandbox-exec, which denies everything by default, network included. If neither sandbox is available, the service refuses to compile.

  3. 03

    Limits on the process and the container too

    The compiler runs in its own process group: files up to 8 MiB, at most 64 open files and 32 processes, capped CPU time, no core dumps, and on Linux no privilege escalation. Its environment is cleared and standard input closed. After 10 seconds the whole process group is killed, and it is cleaned up after a normal exit too, so no background process outlives the request. The container has a read-only root filesystem, a non-root user, all capabilities dropped, an internal network, a 64 MiB /tmp, 512 MiB of memory, one CPU and at most 64 processes.

  4. 04

    Only cached packages

    Tectonic runs with --only-cached and never goes online while compiling. The package cache is prewarmed with this page’s sample résumé when the image is built, verified again with the network off, then made read-only. Packages the sample uses all work; others will most likely be reported missing. For Chinese, add \usepackage{ctex} or use the ctexart class; it typesets with TeX’s own Fandol fonts, cached when the image is built. Fandol covers common characters only, so rare ones are skipped.

  5. 05

    Limits for a small server

    Sources are capped at 256 KiB, and a request body must arrive within 5 seconds and stay under 2 MiB. Only one document compiles at a time; a second request is told the compiler is busy rather than queued. The whole site allows 20 compiles a minute. Generated PDFs are capped at 8 MiB and logs at 128 KiB. When the compiler is busy, the page waits as long as the server asks and retries once.