Lecture notes with maths in Markdown, drawn as you type
Checked November 2026 on macOS 26.
Maths lectures move fast, and a full LaTeX document is slow to write and slower to compile. Markdown with TeX maths is the middle way: plain text for the words, TeX only for the formulas, and an editor that draws them as you go.
The two kinds of maths
Inside a sentence, put TeX between single dollar signs:
The derivative of $x^n$ is $n x^{n-1}$.
For a formula on its own line, use double ones:
$$
\int_0^1 x^2 \, dx = \frac{1}{3}
$$
That's nearly all you need. The rest is the TeX you already know, or learn as you go.
TeX worth knowing for lectures
| You want | Write |
|---|---|
| Fraction | \frac{a}{b} |
| Root | \sqrt{x} |
| Sum and integral with limits | \sum_{i=1}^{n}, \int_a^b |
| Greek letters | \alpha, \beta, \Omega |
| Sets | \mathbb{R}, \in, \subset |
| Matrix | \begin{pmatrix} a & b \\ c & d \end{pmatrix} |
| Cases | \begin{cases} 1 & x > 0 \\ 0 & x \le 0 \end{cases} |
| Aligned lines | \begin{aligned} a &= b \\ &= c \end{aligned} |
There's a longer list in maths in Markdown.
Keeping up in the lecture
- Words first, maths later. If the lecturer is ahead of you, write the formula roughly and fix the TeX after.
- One note per lecture, named by course and date, such as
MA201 2026-11-21.md. - Headings for each topic, so you can find the proof of the theorem a week later.
- Diagrams as text, with a Mermaid block for a flowchart or a tree, rather than a photo of the board.
Seeing the formula as you write
What makes this work in a lecture is seeing the result straight away, so a missing brace shows now and not the night before the exam.
Coffee draws formulas natively as you type, right in the note: inline $…$ in its sentence, and a $$ block shows only its formula once the caret leaves it. It covers everyday TeX, from Greek letters and fractions to matrices, cases and aligned lines, and works inside tables too. Anything it can't read stays as TeX, with a hint and the line number.
Formulas use STIX Two, and you can switch to Latin Modern, the look of TeX, in Settings › Look under Maths. The TeX in your notes stays the same either way.
Revising and printing
Before an exam, export the course as PDF for printing or reading on a tablet. Coffee's export carries the formulas into PDF, HTML, Word and EPUB, so a printed page looks like the note. See Markdown to PDF.
Because the notes are plain text, you can also search them all at once for a term like eigenvalue, which is hard with handwritten notes.
For students
Coffee is free for 14 days, and students and teachers get 30% off: enter your school email on the students page and a code comes for checkout.
Questions
Can I write LaTeX in Markdown?
Yes, for the maths. Put TeX between $ marks inside a sentence or $$ marks for a formula on its own. The rest of the note stays Markdown.
Do I need to install LaTeX?
Not for notes like these. An editor that draws TeX maths, like Coffee, needs no LaTeX installation.
Will my formulas print?
Yes, when your editor carries them into its export. Coffee draws them in PDF, HTML, Word and EPUB.
Can I type maths fast enough for a lecture?
With a few common commands in your fingers, yes. Write rough TeX in the lecture and tidy it afterwards.