One source, three deliverables: Quarto to Word, PDF and HTML
A recurring request on reporting projects: “Can we get this as a Word doc?” — then, a week later, “…and a PDF for the appendix?” With Quarto you don’t maintain three documents. You write one .qmd and render whichever format the moment calls for.
List the formats you want
Put them under format in the YAML header:
---
title: "Quarterly Report"
format:
html: default
docx: default
pdf: default
---Now a single command builds all three:
quarto render report.qmdYou get report.html, report.docx and report.pdf from the same text and the same code. To build just one on demand:
quarto render report.qmd --to docxWhat each format needs — and when to use it
- HTML works out of the box. It’s the richest format: interactive tables, folded code, live widgets. Best for something read on screen or published to the web.
- Word (
docx) also needs nothing extra, and it’s what most clients and journals want because they can track-change it. Supply areference-docto match a house style. - PDF needs a typesetting engine. The classic route is LaTeX — install it once with
quarto install tinytex. To skip LaTeX entirely, use the Typst engine (format: typst), which is far faster.
Matching a house style
Word and PDF both accept a template so the output lands on-brand:
---
format:
docx:
reference-doc: company-template.docx
pdf:
include-in-header: styles.tex
---The reference-doc is just a Word file whose styles (fonts, heading colours, margins) Quarto copies. Design it once; every report inherits it.
The payoff
Because all three come from one source, a fix to a number, a chart or a sentence lands in every format at the next render — nothing drifts out of sync. That single-source discipline is the whole point of reproducible reporting.
Want reports that render to your clients’ preferred format, on brand, in one command? We build that pipeline.