# Write math notes or a paper with live --watch.

> Keep your typeset equations visible in one split while you and your agent iterate on proofs, derivations, or drafts in the other.

- Canonical URL: https://hoja.crafter.run/docs/playbooks/write-a-paper-with-live-latex
- Version: 0.2.1

## Open your draft in watch mode.

```sh
hoja derivations.md --watch   # Markdown + $...$ / $$...$$ via Typst + MiTeX
hoja paper.tex --watch        # LaTeX via tectonic
hoja report.typ --watch       # Typst via typst compile --root
```

### Prompt: Co-authoring prompt

> "Add the gradient derivation for scaled dot-product attention to derivations.md using standard $$...$$ blocks and verify the rendered page visually with hoja --png if needed."

```sh
hoja derivations.md --png --page 1 --output /tmp/draft-p1.png --width 1800
```

Every time you or the agent saves the file, hoja recompiles in the background and repaints at the exact scroll offset you were reading.
