One source, three formats
The same JSON renders to docx, pdf and html. If a format can’t express a style, you get a warning, not an error.
The JSON says what goes on the page: headings, paragraphs, lists, tables, images, plus a little styling. fmtagno does the layout.
{ "version": "0.1", "meta": { "title": "Quarterly report", "lang": "en", "page": { "size": "A4", "margin": "20mm" } }, "styles": { "muted": { "color": "#666666", "fontSize": 10 } }, "root": "doc", "elements": { "doc": { "type": "Document", "children": ["title", "intro", "items"] }, "title": { "type": "Heading", "props": { "level": 1, "text": "Quarterly report" } }, "intro": { "type": "Text", "props": { "text": "One JSON file, three formats." }, "style": "muted" }, "items": { "type": "List", "props": { "items": ["docx", "pdf", "html"] } } }}fmtagno render hello.json -o hello.docxfmtagno render hello.json -o hello.pdffmtagno render hello.json -o hello.html --pagedOne source, three formats
The same JSON renders to docx, pdf and html. If a format can’t express a style, you get a warning, not an error.
CSS-like styles
Field names follow CSS: fontSize, lineHeight, border. Values follow what Word can express.
Style sets
Put a house style in a style set and share it across documents. Switch the set, switch the look.
Tables and sections
Merged cells, column widths, row heights, repeated headers; sections with their own paper, headers, footers and page numbers.
Custom components
Combine built-ins into your own components and use them in one line.
Easy for AI to write
Elements are flat and reference each other by id. An AI can emit them one by one, and fmtagno check tells it exactly what’s wrong.