# Documents and versions

A document is a set of Markdown pages with the images they show, every version of them, and the comments on them.

## Pages and files

- **Pages** are Markdown, each named by its first `#` heading. Rename a page by editing its heading.
- **Images** are png, jpg, gif, webp or svg. While editing, the panel lists them and **Add images** adds to the list; drag one into a page to show it, as often as you like, or press one to see it. An image dropped on a page from your computer is added and shown where you drop it. A page can also show an `https` image from another site.
- **A document's name** is its first page's heading unless you give it one, so it follows the page. **New document** opens an empty page straight away; nothing exists until the first Save.
- **Sections** group pages. While editing, **Add section** and **Add subsection** add them; drag a page or section to move it, or press Alt and an arrow key, and press a section to rename it. The order and the sections are saved with the version, so a draft can restructure and merge back. If both sides changed them, the merge keeps the target's and adds the draft's new pages, without asking.
- **Links:** drag a page or section into a page while editing to link to it. Hover over a heading in the page for a link to copy, which you can hand to a colleague or a tool.

## Bibliography and typesetting

- **Bibliography**, in the panel while editing, lists the references. Drag one into a page to cite it as `[@key]`; the page and the PDF show the citation and a list of references.
- **Add a reference** takes a DOI, an arXiv link or any other address. A DOI is looked up at doi.org; any other address becomes a reference holding it and today's date, for you to fill in. Press a reference to edit it.
- **Import a .bib** merges a BibTeX file in. Both it and **Add a reference** appear while editing, and the bibliography is kept as `references.bib`, saved with the edit.

## Document settings

**Document settings**, in the ⋯ menu, holds the name, a line of description, the tags, and the typesetting: paper, text size, line spacing, margins, citation style, numbered headings, and whether each section starts a new page. They apply at once, to every version.

## Edit and save

**Edit** holds your changes, on any number of pages, until **Save**. The panel says *changed* beside each page you changed. **Save** asks whether this is a new version of the draft you are on, or a new draft. **Cancel** asks before discarding.

If somebody saves while you edit, your save goes on top of theirs when you changed other pages, and becomes a new draft beside theirs when you both changed the same page.

## Drafts and merging

Every document starts with one draft, **Main**. Another draft is a line of work that begins at the newest version of a draft, often Main. The draft row at the top of the panel opens **Drafts**, where you see them all side by side, open one, rename one, or start a new one. On a draft, **Merge into Main** sits just below it.

A merge with nothing to settle is one press. Where both sides changed the same lines, each passage shows both versions: keep one, or write it yourself, then **Merge**. A draft merges only back into the draft it began from.

## Versions and changes

The version row opens **Versions**: every version of the document, whichever draft it is on, and one press opens it as it was. Each has its own number, counting up across the whole document. **See changes** compares the version on screen with one you pick, marking added and removed words, and the panel says how many passages each page changed.

## Export

From the document's ⋯ menu:

- **Download PDF**, with or without the comments, typesets the whole document with Typst, in your browser, in the same type as the app: a title block with its description, linked contents, sections as chapters, a running header and numbered pages. The first page may set the title block's `title`, `authors` and `date` in front matter:

```yaml
---
title: A repeatable calibration method
authors: [A. Researcher, B. Researcher]
date: 2026-10-19
---
```

- **Download a copy** gives the owner a zip of the document as it is now: the pages named by their headings, with the links between them still working, the images, the bibliography and style, each open draft under `Drafts/`, and the comments as `comments.json`.

## Finding documents

Press / to search. The chips above the results narrow them: by whether a document is pinned, whose it is, and its tags. One press keeps what the chip names, a second keeps everything but, and a third takes it off.

## The trash

**Trash** sits beside **Documents** and **Feedback**. You can move a document there from its card or its ⋯ menu, and only download, restore or delete it there. You're emailed about what's there, at most once a day, with the date each will be deleted. **Restore** counts as using a document.

Free use, where a server sets it, holds your most recently used documents, and anything left unused goes to the trash. On a subscription, past 80% of your limit, the least recently used go there. **Pin**, in a document's ⋯ menu, keeps one from being chosen, and puts it at the top of your list. A document somebody is being asked about stays out of the trash while the request is open, for up to 14 days, so that their link keeps working. Your limit counts the trash and never comments: at the limit, your saves stop until you subscribe, empty the trash, or its days are up, and what you were writing stays on screen until it saves.
