Diagrams and maths
On this page
Notes can hold diagrams written in Mermaid and equations written in LaTeX. You type a short text description, and Midmorning draws the result. Both are stored as plain Markdown, so they survive export and import.
Add a diagram
- Type
/diagramand press ↩ / Enter to insert Diagram (Mermaid). - Edit the sample flowchart, or replace it with your own Mermaid code.
- Click outside the diagram to see it drawn.
You can also turn any code block into a diagram: select its language button and choose Mermaid. Typing three backticks followed by mermaid and a space works too.
Edit a diagram
- Select Source to edit the diagram’s code. While your cursor is inside the diagram, you see the code.
- Select Preview, or move your cursor out of the diagram, to see the drawing again.
If the code has a mistake, you’ll see Diagram could not be rendered with the error message and your code, so you can fix it.
A note that starts with a diagram is titled “Diagram” until you add a first line of text above it.
Add maths
| To add | Do this |
|---|---|
| An equation in a sentence | Type the LaTeX between single dollar signs, for example $E = mc^2$. It’s drawn as soon as you type the closing $. Or type /inline math. |
| An equation on its own line | Type $$ on an empty line and press ↩ / Enter , or type /math block. |
Prices such as “$5 and $10” stay as normal text.
Edit maths
Click an equation (its tooltip says Edit maths) to open its LaTeX source. Edit it and press ⎋ / Esc or click elsewhere to finish. An empty equation shows “Math” until you type something.
If the LaTeX has an error, the equation is highlighted and the error appears when you hover over it.
Tips
- Diagrams and equations are included when you print a note or save it as a PDF. See Print and export.
- In raw Markdown, a diagram is a code block marked
mermaid, an inline equation sits between$signs, and a block equation sits between lines of$$. - Diagrams use the light or dark colours of your theme.
Last updated 20 November 2026