Quarto: Documents That Reproduce Themselves
If you write about data, you already know the awkward part: the analysis lives in one file, the chart in another, and the written explanation in a third that goes out of date the moment a number changes. Quarto exists to close that gap. It is an open-source publishing system in which the text, the code and the results sit in one plain-text document, and the finished output is generated from that single source. Change a figure, re-render, and the prose follows.
Quarto files are written in markdown, the lightweight formatting syntax that uses plain characters for headings, lists and emphasis. Around that markdown you add short instructions, called YAML at the top and options in the text, that tell the system what kind of document you want. Anything you can type in a text editor, you can turn into something polished.
One source, many outputs
The same file can render as an HTML page, a PDF, a Word document, a slide deck, a dashboard or a full website. You choose the format with a single setting rather than rebuilding the work in different software.
Read more
- HTML and websites: easy to share, readable on any screen, good for reports and documentation.
- PDF and print formats: fixed layout, useful when a document must look identical everywhere.
- Slides: presentations written in the same file as the material behind them.
- Books and long documents: chapters assembled from separate files into one structured whole.
Code and words together
A Quarto document can contain code in R, Python, Julia and other languages, organised into chunks. Each chunk can be shown, hidden, run or skipped, and its output, whether a table, a chart or a printed result, appears directly beneath it. This is what makes the format valuable for anything that should be reproducible: the reader sees not only the conclusion but the step that produced it. Narrative and computation stay honest with each other because they are never separated.
What to learn first
You do not need to know everything before you start. Begin with the basics of markdown, then learn how a document's header controls its title and output format, then how code chunks are labelled and what their options do. A little familiarity with a terminal or an editor's render button is enough to produce your first file; the rest can be picked up as questions arise.
Habits that help
- Keep each document short and give it one job; split long projects into separate files.
- Name files and folders plainly and keep data, code and text in predictable places.
- Render often. Errors are easier to fix one paragraph after they appear.
- Store documents in version control so that you can see what changed and when.
- Write the explanation as you go rather than leaving it to the end; the document is the record.
Quarto rewards patience more than speed. The first document takes an afternoon. After that, the habit of writing once and publishing everywhere starts to feel obvious, and the older way of assembling reports by hand begins to look like unnecessary work.