~/tools/

Recipe Table

Serves

Untitled

Add a step (any line) with ingredients (- name: amount) under it to build the table.

How recipe tables work

Reading the table

This is an action table in the style Michael Chu popularised on Cooking for Engineers. Ingredients run down the left. Each step is a cell that spans every row it uses: its own ingredients, the step before it, and any named results it pulls in. Steps merge rightwards until the last one spans the whole recipe. Read a row left to right to follow one ingredient; read a column top to bottom to see what happens at each stage.

You write the recipe as plain text and the table is drawn from it. Only the text is stored, in this browser, so there is nothing to upload and nothing to lose if you clear a cell: fix the text and the table follows.

Rules worth knowing

  • One line, one thing. The first character decides what a line is. Blank lines are ignored.
  • Steps read top to bottom and chain into each other. Only = breaks the chain; use it when you finish a component you will combine later.
  • Results and byproducts must be declared above the line that uses them. Names are matched without regard to case.
  • A result (=) has no amount, you use all of it. A byproduct (->) can be used in part, so @ pasta water: 1/4 cup is allowed.
  • The time on a step must be last on the line: fry 2 min, bake 10-12 min, rest 1 h. Anything else stays part of the action.
  • Header fields only count before the first step. A serves: line after a step is read as a step.
  • Mistakes never break the table. Lines that do not make sense are listed under the editor with their line number, and the rest still renders.

The syntax, line by line

Starts withMeaningExample
#Title. The first heading line is the recipe name. Everything above the first step is the header.
# Aglio e olio
key:Header field. serves is used for scaling, tags is a comma list, source is kept as a link. Any other key is stored as-is.
serves: 2
tags: pasta, weeknight
source: https://example.com
(none)Step. Any line with no prefix is a step: an action, then an optional time at the end. Each step uses the step above it unless that one was closed with =.
fry 2 min
bake 10-12 min
rest
-Ingredient. Belongs to the step above. Write name: amount, prep. Text after the first comma is prep and is never scaled.
- garlic: 2 cloves, sliced
- water: salted
=Name a result. Names what the step above produced and closes the chain. The next step starts a new branch instead of continuing this one.
= sauce
@Use a result or byproduct. Pulls a named result or byproduct into the current step. This is how branches merge. The name must be declared above.
@ sauce
@ pasta water: 1/4 cup
->Byproduct. Keeps something a step sets aside, so a later step can take it back with @. Works on its own line or at the end of a step line.
drain -> pasta water
xDiscard. A note about what the step above throws away. Shown in the step's cell.
x most of the water
>Note. Before the first step it is a banner above the table. After a step it is a footnote in that step's cell.
> Salt a large pot of water

Branches, in practice

Two components prepared separately and joined: close each with =, then pull both into one step with @.

whisk
- flour: 1 1/2 cups
- salt: 1/4 tsp
= dry

whisk
- milk: 1 1/4 cups
- egg: 1
= wet

combine
@ dry
@ wet
fry 2-3 min

In the table, dry and wet become two stacks of rows with their own step cells, and combine spans both.

Amounts, scaling and units

  • Amounts are read from the number at the front: 2, 1.5, 1/2, 1 1/2, ½ or a range like 2-3. If there is no leading number the amount is kept as plain text (to taste, a splash) and never changes.
  • Weight (g, kg, oz, lb) and volume (ml, l, tsp, tbsp, cup, fl oz) are converted between metric and imperial. Counts (2 cloves, 1 egg) only scale.
  • Scaling multiplies by target serves divided by the recipe's serves. Without a serves: line the recipe counts as 1 serving.
  • Converted spoon and cup amounts snap to the fractions on real measuring tools (¼, ⅓, ½, ⅔, ¾), and grams round to 5 above 100. Treat converted numbers as kitchen-accurate, not lab-accurate.
  • The ingredient list merges lines with the same name and adds amounts that share a unit family. 200 g and 1 cup of the same thing stay separate.