---
type: Attested Computation
title: latex-to-pdf
identifier: doc/latex-to-pdf
description: Compile a LaTeX document to PDF (full TeX Live, offline, deterministic -- no runtime package fetching). Mounts input TeX file via fragletc file-shaped param (:file) to /input/tex_source.
pack: doc
tags:
- documents
runtime: fragletc
image: ofthemachine/latex@sha256:add4f310e2fb92ebeeb7bc7fa5a95f920fa78adabcc8565301bbb178eac2a0b3
network: none
stdin: none
execution_class: hermetic
procedure_hash: sha256:622b336d2bfb0c768489d11f83120619576f95d1882a5ce46cbd83a51122c052
parameters:
- name: tex_source
  type: file
  required: true
  description: TeX source mounted at /input/tex_source
- name: engine
  type: string
  required: false
  default: pdflatex
  description: 'TeX engine: pdflatex, xelatex, or lualatex'
computation: https://tools.ofthemachine.com/doc/latex-to-pdf.sh
executor:
  resource: https://github.com/ofthemachine/fraglet
  receipt:
  - schema
  - fragletc
  - procedure
  - procedure_hash
  - image
  - image_digest
  - network
  - stdin_mode
  - params
  - inputs
  - argv
  - env
  - memo_key
  - started
  - finished
  - exit_code
  - stdout
  - outputs
  format: fraglet-receipt/2 (fragletc --receipt <path>, or FRAGLETC_RECEIPT_DIR)
attester:
  resource: https://tools.ofthemachine.com/receipt/attest.py
  method: 'deterministic, no re-execution: procedure_hash equals sha256 of computation; memo_key recomputes from the receipt''s own fields; claimed params and any artifact hash match the receipt'
generated:
  by: process:tools/catalog/compile.py
  at: '2026-11-13T18:27:40Z'
outputs:
- paper.pdf
---

# latex-to-pdf

Compile a LaTeX document to PDF (full TeX Live, offline, deterministic -- no runtime package fetching). Mounts input TeX file via fragletc file-shaped param (:file) to /input/tex_source.

Use when the user has LaTeX source and wants the compiled PDF.

# Schema

## Parameters
- `tex_source` (file, required) — TeX source mounted at /input/tex_source
- `engine` (string, optional, default `pdflatex`) — TeX engine: pdflatex, xelatex, or lualatex

## Outputs
- `paper.pdf` (declared file under /output)

# Execution

The computation is [`doc/latex-to-pdf.sh`](https://tools.ofthemachine.com/doc/latex-to-pdf.sh) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `doc/latex-to-pdf.sh` beside this bundle), run by `fragletc` in `ofthemachine/latex@sha256:add4f310e2fb92ebeeb7bc7fa5a95f920fa78adabcc8565301bbb178eac2a0b3` with network `none`. Its identity is `procedure_hash` = sha256 of that file, shebang included — the same value every receipt records. Parameters are passed as `-p name=value`; `--receipt run.json` (or `FRAGLETC_RECEIPT_DIR`) writes the receipt, a `fraglet-receipt/2` JSON document with the fields listed under `executor.receipt`.

# Attestation

A run's receipt is attested with [`receipt/attest.py`](https://tools.ofthemachine.com/receipt/attest.py): the computation that ran is this script (`procedure_hash`), the receipt is internally consistent (`memo_key` recomputes from its own fields), the claimed parameters are the ones that ran, and an artifact claimed as an output hashes to what the receipt recorded. No re-execution: attestation is provenance fidelity, not reproduction.

Hermetic: no network, so `memo_key` also fully determines the outputs — a re-run with the same inputs must reproduce them, which makes results from this tool safely memoizable.

Skill: [SKILL.md](https://tools.ofthemachine.com/doc/SKILL.md)
