Render document to a file
renderGenerate LaTeX, Markdown, JSON, or text source files from registered template documents for PDF compilation or review, applying a selected build mode and writing to the cache.
Instructions
Render a registered template-driven document to a file on disk.
Purpose:
Materializes document templates into concrete source files (LaTeX, Markdown, JSON, text)
under `build/.cache/rendered/` applying the specified build mode.
When to use:
- When generating LaTeX source for PDF compilation and accessibility tagging.
- When generating Markdown or text representations for review or downstream processing.
When NOT to use:
- Do NOT use without discovering valid `doc_id` values first using `list_docs`.
- Do NOT use to compile PDFs directly; this tool produces rendered sources for compilation.
Behavioral transparency:
Non-destructive, idempotent cache writer. Regenerates files under `build/.cache/rendered/`
without modifying template sources or `data/meta.yaml`.
Returns:
Dictionary containing doc_id, format, build mode, output_path, and byte size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fmt | No | Output format the document is rendered to. Must be exactly one of: 'json', 'latex', 'markdown', 'text' (see `render`'s docstring / `list_docs`). | latex |
| mode | No | Build mode / profile applied when rendering. Must be exactly one of: 'camera-ready', 'draft', 'submission'. | draft |
| doc_id | Yes | Registered template document id — see `list_docs`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||