Headings: # H1, ## H2, ### H3 up to ###### H6. Use exactly one H1 per document - that becomes the title in the printed output and the filename suggestion for PDF downloads.
Emphasis: *italic* or _italic_, **bold** or __bold__, ~~strikethrough~~. Combine with **_bold italic_** if you must.
Lists: unordered with -, *, or +; ordered with 1., 2., 3. (numbers don't have to be sequential - Markdown renumbers them). Indent two or four spaces for nesting. Task lists use - [ ] for unchecked and - [x] for checked.
Links and images: [text](https://example.com) for links,  for images. Reference-style links with [text][id] and a separate [id]: https://example.com line keep prose readable.
Code: backticks for inline `code`, triple backticks with an optional language tag for blocks. Specify the language (```python, ```typescript) so the syntax highlighter picks the right grammar.
Tables: pipe and dash syntax. | Column | Column | on one line, |---|---| on the next, then data rows. Alignment markers (:--, --:, :-:) control column alignment in the printed output.
Math: inline with $E = mc^2$, block with $$ \int_0^\infty e^{-x} dx = 1 $$. mdprint uses KaTeX, which renders fast and prints crisply.
Diagrams: a fenced code block with the language tag mermaid becomes a rendered SVG diagram. Flowcharts, sequence diagrams, gantt charts, state machines, class diagrams - all supported.