Skip to content

Markdown Syntax ​

Every standard Markdown element rendered by marknative. Each section shows the Markdown source and the actual rendered PNG output.

Headings ​

All six heading levels — H1 through H6. H1–H4 render at distinct sizes; H5 and H6 share the H4 style.

markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

Inline Styles ​

Bold, italic, strikethrough, inline code, and links.

markdown
**Bold text** stands out from surrounding prose.
*Italic text* adds emphasis without weight.
***Bold and italic*** applies both simultaneously.
~~Strikethrough~~ marks removed content.
`inline code` renders in monospace.
[A hyperlink](https://example.com) navigates to a URL.

Unordered List ​

Bullet lists with unlimited nesting depth.

markdown
- Item
- Item with **bold**
  - Nested item
    - Doubly nested
  - Back to level 2
- Final item

Ordered List ​

Numbered lists with nested sub-steps.

markdown
1. Step one
2. Step two
   1. Sub-step
   2. Sub-step
3. Step three

Task List ​

GFM task lists with checked and unchecked items.

markdown
- [x] Done
- [x] Also done
- [ ] Not yet
- [ ] Pending

Blockquote ​

Single-level and nested blockquotes.

markdown
> Simple quote

> **Bold** inside a quote.
> With *italic* too.

> Outer
>
> > Inner nested quote

Code Block ​

Fenced code blocks with syntax-highlighted language tags.

markdown
```typescript
const pages = await renderMarkdown(md)
```

```bash
bun add marknative
```

Table ​

GFM tables with left, center, and right column alignment.

markdown
| Name       |  Type   | Default |
| :--------- | :-----: | ------: |
| format     | string  |   'png' |
| singlePage | boolean |   false |

Image ​

Block-level images fetched from remote HTTP URLs.

markdown
![Landscape](https://picsum.photos/id/10/560/240 "A scenic landscape")

Thematic Break ​

Horizontal rules — ---, ***, and ___ all render identically.

markdown
Above

---

Middle

***

Below

Math ​

Block display formulas ($$...$$) and inline formulas ($...$) rendered via MathJax.

markdown
Block formula:

$$
\int_a^b f'(x)\,dx = f(b) - f(a)
$$

$$
p(\mathbf{x}) = \frac{1}{(2\pi)^{d/2}|\Sigma|^{1/2}}
\exp\!\left(-\tfrac{1}{2}(\mathbf{x}-\boldsymbol{\mu})^T\Sigma^{-1}(\mathbf{x}-\boldsymbol{\mu})\right)
$$

Inline: the gradient $\nabla f$, entropy $H(X) = -\sum p \log p$,
and norm $\|\mathbf{x}\|_2 = \sqrt{\sum x_i^2}$.

Full Syntax Fixture ​

The complete multi-page fixture combines every supported Markdown element in one render, including syntax-highlighted fenced code blocks.

Full syntax fixture page 1Full syntax fixture page 2Full syntax fixture page 3Full syntax fixture page 4Full syntax fixture page 5Full syntax fixture page 6Full syntax fixture page 7Full syntax fixture page 8Full syntax fixture page 9Full syntax fixture page 10

Released under the MIT License.