Skip to content

#Quarto

1 ideas

Get new #Quarto ideas by email

Every Thursday: the week's best ideas, with the newest from #Quarto.

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.

#Quarto: frequently asked questions

What exactly is Quarto, and what problem does it solve?

Quarto is an open-source publishing system that keeps your writing, your code and the results they produce inside a single plain-text file, then generates the finished document from that one source. It solves the familiar problem of a report whose chart lives in one place, its analysis in another and its explanation in a third that drifts out of date, because re-rendering updates everything together. Think of it less as a word processor and more as a way of writing once and publishing everywhere.

How do I get started with Quarto if I have never used it before?

Start with plain markdown — headings, lists, bold and italic are all just typed characters — and get comfortable writing in a simple text editor. From there, learn what the short header at the top of a document controls, mainly the title and the output format, and how a code chunk is labelled so you can decide whether it is shown, run or skipped. A render button or a single command is enough to produce your first file; the remaining options can wait until a real question comes up.

Which output format should I pick for my document?

Choose based on how the document will be read rather than on what looks impressive. A shareable page that should stay readable on any screen suits HTML, a layout that must look identical wherever it travels suits print-oriented formats, and a talk suits slides written in the same file as the material behind it. Longer projects can be assembled from separate chapter files into one structured whole, so you are not locked into a choice made early.

Can I put code in a Quarto document and show what it produces?

Yes — that is the point of the format. Code is organised into chunks in whatever language you work in, and each chunk's output, whether a table, a chart or a printed result, appears directly beneath it. Because the narrative and the computation are never separated, the reader sees the step that produced the conclusion, which makes the whole thing reproducible.

What are the most common mistakes beginners make?

The usual ones are cramming a whole project into a single sprawling file, scattering data and text across unclear folder names, and saving the explanation for the end. Another is rendering rarely, which lets small errors pile up until fixing them becomes a chore. Keep each document short with a single job, render after every change, and write the explanation as you go — the document itself is the record.

How much time does learning Quarto really take?

Expect the first document to take an afternoon, mostly spent getting used to the header and the chunk options rather than fighting the tool. After that the habit of writing once and publishing in several formats tends to click quickly. It rewards patience more than speed, and the old routine of assembling reports by hand starts to look like unnecessary work.

Videos come from YouTube and posts from Instagram; titles and summaries are our own. All rights belong to their creators.