A formula or diagram doesn't draw
MaciPhone and iPad
A formula or diagram that can't be drawn shows a plain hint with the line number. Mermaid kinds Coffee doesn't draw stay as code, and TeX it can't read stays as TeX.
What to try, in order
- Read the hint. It says what's wrong and on which line. Go to that line and fix it.
- Check the fence. A diagram needs a code block named
mermaid. A formula needs a line of$$above and below it, or$$ … $$on one line. - Check the diagram's kind. Coffee draws flowcharts, pie charts, sequence diagrams, gantt charts, class diagrams, state diagrams, ER diagrams and mind maps. Other kinds stay as code.
- Simplify the TeX. Coffee reads everyday TeX: Greek, operators, scripts, fractions, roots, sums and integrals with limits,
\leftand\right, accents,\text,\mathbb, matrices and cases. Anything it can't read stays as TeX.
Example
A small flowchart Coffee draws under its code:
In Markdown
```mermaid
flowchart LR
Idea --> Draft --> Publish
```Good to know
See maths and Mermaid diagrams for more of what each can do.