A lab notebook in Markdown, kept as plain files

Checked November 2026 on macOS 26.

A lab notebook has to outlast the software it's written in. Files from a notebook app you stopped paying for, or one that closed, are hard to read in ten years. Plain Markdown files open in anything, on any computer, and they're easy to search, back up and keep in Git.

This is how to set one up.

One note per day

Make a folder for the notebook, and in it one note per day, named by date so they sort in order:

Notebook/
  2026-11-21.md
  2026-11-22.md
  attachments/

A template keeps each day the same:

# 2026-11-21

## Aim

## Method

## Results

## Next

There's more on templates in a daily note template.

Pictures, plots and gel photos go in attachments/, linked from the note with ![](attachments/gel-3.png). Keep the originals there too, as Markdown only points at them.

Equations and reactions

Write TeX between $$ lines, or between single $ inside a sentence, and editors with maths support draw it:

The rate is $k = A e^{-E_a/RT}$.

$$
\ce{2H2 + O2 -> 2H2O} \tag{1}
$$

Coffee draws formulas natively in the note, including \ce{} for chemistry and \tag{} for numbered equations, and carries them into PDF, HTML and Word exports. See maths in Markdown.

Diagrams of a setup or a protocol

A Mermaid block turns a few lines of text into a flowchart, which suits a protocol with branches:

flowchart LR
A[Sample] --> B{Clear?}
B -->|yes| C[Measure]
B -->|no| D[Filter] --> C

The diagram stays as text in the file, so it changes with the protocol. More in Mermaid diagrams in Markdown.

Quick numbers

Concentrations, dilutions and conversions come up all day. In Coffee, a sum gets its answer beside the line, and a name with = keeps a value for the lines below:

stock = 2.5
volume = 0.4
stock * volume
3 hours in min

Change stock and every answer that uses it changes too. The note keeps what you wrote, and the answers are drawn beside the lines.

A record of changes

A notebook is evidence, so you'll want to know what changed and when. Two ways:

  • Git. Commit at the end of each day. Each commit is dated, and git log -p shows what changed.
  • Version history. Coffee keeps earlier versions of each note. Note › Version History… shows what changed word by word, and you can name a version, such as Before the analysis, so it's kept. If another app or a Git pull changes a note you have open, Coffee shows each change and keeps a version first.

Neither one is a signed, regulated record. If your lab needs one for compliance, check with whoever sets the rules before you rely on plain files.

Questions

Is Markdown good for an electronic lab notebook?

For many labs, yes. It's plain text that stays readable, works with Git, and holds equations, tables and pictures. Labs that need signed, regulated records may need a dedicated system as well.

How do I add equations?

Write TeX between $$ lines for a formula on its own, or between single $ inside a sentence. Coffee also draws chemistry written with \ce{}.

Where do images go?

In a folder beside your notes, linked with a relative path such as ![](attachments/plot.png). See images in Markdown.

Can I keep a lab notebook in Git?

Yes. Plain files suit Git well: commit daily and you have a dated history of every change.