| ✅ | Requires math packages (bundled in the default header) |\n| Display math `$...$` | ✅ | |\n| `\\(...\\)` / `\\[...\\]` math | ✅ | Reader extension enabled |\n| `\\require{...}` (MathJax) | ✅ | No-op definition; safe |\n| Local images `![](rel.png)` | ✅ | Relative to the Markdown file's directory |\n| Reference-style images `![a][id]` | ✅ | Definitions are resolved and copied |\n| Image sizing `{width=...}` | ✅ | `%`, `px`, `cm`, etc. |\n| SVG as an image reference | ✅ | Converted by pandoc via `rsvg-convert` |\n| Inline raw `\u003csvg\u003e…\u003c/svg\u003e` | ✅ | Extracted and converted by remarquee |\n| HTML `\u003cimg src=\"*.svg\"\u003e` | ✅ | Rewritten to Markdown, then converted |\n| `data:image/svg+xml;base64,…` | ✅ | Handled by pandoc |\n| Mermaid ` ```mermaid ` blocks | ✅¹ | Requires `mmdc` (mermaid-cli) |\n| YAML frontmatter | ✅ (stripped) | Removed before pandoc; never printed |\n| Absolute/remote image paths | ⚠️ | Not copied; passed through to pandoc |\n| Raw HTML (other than SVG `\u003cimg\u003e`) | ❌ | Dropped by the LaTeX writer |\n| Nested lists deeper than 4 | ⚠️ | Flattened to depth 4 |\n| Embedding video / audio | ❌ | Not a PDF feature |\n| Unsupported LaTeX packages | ❌ | Only the default header + your `--latex-header-file` are loaded |\n\n¹ When `mmdc` is absent, Mermaid blocks are left as plain code listings instead of\ndiagrams.\n\n## YAML frontmatter\n\nA leading `---` block is stripped before conversion, so docmgr-style metadata never\nappears in the PDF and cannot break the pandoc YAML parser. A `---` thematic break\nelsewhere in the document is unaffected (the `yaml_metadata_block` extension is\ndisabled).\n\n## Math\n\nInline and display math are supported, along with the MathJax-style `\\(...\\)` and\n`\\[...\\]` delimiters. The default LaTeX header loads the packages needed for common\nsymbols exported from AI chats:\n\n- `stmaryrd` (`\\llbracket`, `\\rrbracket`, `\\rightsquigarrow`)\n- `centernot` (`\\centernot\\Longrightarrow`)\n- `mathtools` / `amscd` (extensible arrows, `CD` commutative diagrams)\n- MathJax's `\\require{...}` is defined as a no-op so surrounding math still compiles\n\nPass `--latex-header-file` to add packages yourself. `--pandoc-from` controls the\npandoc reader extensions if you need a different math dialect.\n\n## Images\n\nMarkdown image syntax works in all its forms:\n\n```markdown\n![diagram](./assets/arch.png) \u003c!-- relative path --\u003e\n![diagram][arch] \u003c!-- reference style --\u003e\n[arch]: ./assets/arch.png\n\n![diagram](./assets/arch.svg){width=60%} \u003c!-- sized --\u003e\n```\n\nBehavior:\n\n- Relative paths are resolved against the directory of the Markdown file and copied\n into the conversion temp directory.\n- Absolute paths and `http(s)://` URLs are **not** copied; pandoc receives them\n as-is.\n- `--resolve-images=false` disables image resolving and copying entirely (and also\n disables HTML `\u003cimg src=*.svg\u003e` rewriting, which depends on it).\n\n## SVG\n\nSVG has three authoring forms; all are supported now.\n\n### 1. Referenced SVG (already vector)\n\n```markdown\n![architecture](./assets/arch.svg)\n```\n\nPandoc converts this to a vector PDF using `rsvg-convert` and includes it with\n`\\includegraphics`. No LaTeX shell escape is involved.\n\n### 2. Inline raw SVG\n\n```markdown\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\"\u003e\n \u003ccircle cx=\"50\" cy=\"50\" r=\"40\" fill=\"steelblue\"/\u003e\n\u003c/svg\u003e\n```\n\nremarquee extracts the block (skipping fenced code), converts it to a vector PDF,\nand substitutes a Markdown image. This is a change from older releases, where raw\n`\u003csvg\u003e` blocks were silently dropped.\n\n### 3. HTML `\u003cimg\u003e` referencing an SVG\n\n```markdown\n\u003cimg src=\"./assets/arch.svg\" width=\"300\" alt=\"architecture\"\u003e\n```\n\nremarquee rewrites this to `![architecture](./assets/arch.svg){width=300px}` and\nthen handles it like a normal referenced image.\n\n### SVG flags\n\n- `--svg` (default `true`): enable/disable inline block and HTML `\u003cimg\u003e` handling.\n Disabling leaves them to pandoc, which drops them.\n- `--svg-converter PATH`: use a specific converter (default: auto-detect\n `rsvg-convert`, then `inkscape`).\n- `--svg-default-width W`: width applied to extracted inline SVGs (e.g. `70%`,\n `12cm`). Default is the SVG's natural size.\n\n### Converter requirements and degradation\n\n- Referenced SVG needs `rsvg-convert` on `PATH` (pandoc falls back to the LaTeX\n `svg` package, which requires `--shell-escape` and fails in this pipeline).\n- Inline/HTML SVG uses remarquee's own converter. If none is found, remarquee warns\n and leaves the source unchanged, and the document still converts:\n\n ```\n WARNING: SVG: no SVG converter found; inline \u003csvg\u003e blocks left as-is\n ```\n\n### Limitations\n\n- SVG features unsupported by `rsvg-convert` (some CSS, filters, `foreignObject`)\n will not render. On conversion failure, remarquee warns and leaves the block.\n- Only `\u003cimg\u003e` tags whose `src` ends in `.svg` are rewritten; other HTML images are\n still dropped by the LaTeX writer.\n\n## Mermaid\n\nFenced ```` ```mermaid ```` blocks are rendered to PNG diagrams when `mmdc`\n(mermaid-cli) is installed:\n\n````markdown\n```mermaid\ngraph TD\n A[Markdown] --\u003e B[pandoc]\n B --\u003e C[PDF]\n```\n````\n\nFlags: `--mermaid` (enable), `--mmdc-path`, `--mermaid-scale`, `--mermaid-theme`,\n`--mermaid-bg`, `--mermaid-width`, `--mermaid-no-sandbox`, `--mermaid-pdf-width`.\n\nIf `mmdc` is missing, blocks are left as plain code listings (warn and continue).\n\n## Code blocks\n\nFenced and indented code are preserved verbatim. List-spacing normalization never\ntouches code fences or display math. `remarquee upload src` adds syntax\nhighlighting via `--theme` (pandoc highlight style) and `--listings`.\n\n## Not supported\n\n- Raw HTML other than SVG `\u003cimg\u003e` (tables, `\u003cdiv\u003e`, `\u003cdetails\u003e`, `\u003cvideo\u003e`, …):\n dropped by the LaTeX writer.\n- Lists nested deeper than 4 levels: flattened to 4 (LaTeX's limit).\n- Arbitrary LaTeX beyond the default header and `--latex-header-file`.\n- Remote asset fetching: URLs are passed to pandoc, which may or may not fetch\n them depending on your pandoc configuration.\n\n## Layout and bundles\n\n- `--layout editor` uses wider margins and looser spacing for annotation-heavy\n reading.\n- `remarquee upload bundle` concatenates inputs with a table of contents\n (`--toc-depth`) and a page break between documents.\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---|---|---|\n| `Package svg Error: File ... is missing` | A referenced SVG could not be converted | Install `rsvg-convert` (or pass `--svg-converter`) |\n| A diagram is missing with no error | Raw HTML (dropped) or the feature is disabled | Check `--svg` / `--mermaid` and whether the converter is installed |\n| `Missing character` warnings in a local test render | Rendering without remarquee's DejaVu font variables | Use the real pipeline, or pass `-V mainfont=\"DejaVu Sans\" -V monofont=\"DejaVu Sans Mono\"` |\n| `Unknown alias` from pandoc | Malformed code-block fences | Fix the fence (use explicit language tags) |\n\n## See Also\n\n- `remarquee help remarquee-upload-reference` — upload command flags and behavior\n- `remarquee help remarquee-upload-bundle` — bundling multiple documents\n- `remarquee help remarquee-upload-getting-started` — first upload walkthrough\n"},"fulfilledTimeStamp":1789991345184}},"mutations":{},"provided":{"tags":{"Section":{"remarquee-cloud-getting-started":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee-cloud-reference":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee-cloud-usage-examples":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"device-capture":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"filetree-and-sync15-model":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"how-to-create-a-web-app-with-react-rtk-vite-dagger-gen":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"markdown-format-support":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"rmdsl-getting-started":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee-add-glazed-command":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee-upload-getting-started":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee-upload-reference":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee-upload-bundle":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee-upload-src":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"LIST":["listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})"],"remarquee:v0.0.14:markdown-format-support":["getSection({\"packageName\":\"remarquee\",\"slug\":\"markdown-format-support\",\"version\":\"v0.0.14\"})"]}},"keys":{"listPackages(undefined)":[],"listSections({\"packageName\":\"remarquee\",\"version\":\"v0.0.14\"})":[{"type":"Section","id":"remarquee-cloud-getting-started"},{"type":"Section","id":"remarquee-cloud-reference"},{"type":"Section","id":"remarquee-cloud-usage-examples"},{"type":"Section","id":"device-capture"},{"type":"Section","id":"filetree-and-sync15-model"},{"type":"Section","id":"how-to-create-a-web-app-with-react-rtk-vite-dagger-gen"},{"type":"Section","id":"markdown-format-support"},{"type":"Section","id":"rmdsl-getting-started"},{"type":"Section","id":"remarquee-add-glazed-command"},{"type":"Section","id":"remarquee-upload-getting-started"},{"type":"Section","id":"remarquee-upload-reference"},{"type":"Section","id":"remarquee-upload-bundle"},{"type":"Section","id":"remarquee-upload-src"},{"type":"Section","id":"LIST"}],"getSection({\"packageName\":\"remarquee\",\"slug\":\"markdown-format-support\",\"version\":\"v0.0.14\"})":[{"type":"Section","id":"remarquee:v0.0.14:markdown-format-support"}]}},"subscriptions":{},"config":{"online":true,"focused":true,"middlewareRegistered":true,"refetchOnFocus":false,"refetchOnReconnect":false,"refetchOnMountOrArgChange":false,"keepUnusedDataFor":60,"reducerPath":"helpApi","invalidationBehavior":"delayed"}}};

Markdown Format Support — What Renders on reMarkable

A practical guide to which Markdown features remarquee supports, which are dropped, and how images, SVG, Mermaid and math are handled on the way to a reMarkable PDF.

Sections

Terminology & Glossary
📖 Documentation
Navigation
13 sectionsv0.1
📄 Markdown Format Support — What Renders on reMarkable — glaze help markdown-format-support
markdown-format-support

Markdown Format Support — What Renders on reMarkable

A practical guide to which Markdown features remarquee supports, which are dropped, and how images, SVG, Mermaid and math are handled on the way to a reMarkable PDF.

Topicmarkdownpdfsvgmermaidimagesmathupload mdupload bundleupload srcresolve-imagessvgsvg-convertersvg-default-width+3

This page documents what actually survives the trip from a .md file to a PDF on a reMarkable device: what renders, what is transformed, what is silently dropped, and which flags change the behavior.

The pipeline (why this page exists)

reMarkable never receives your Markdown. The conversion is:

.md
  → strip YAML frontmatter
  → resolve/convert images, inline SVG, Mermaid
  → normalize list spacing, flatten deep lists
  → pandoc --from=markdown --pdf-engine=xelatex
  → PDF  → upload

Two consequences:

  1. Anything pandoc's LaTeX writer cannot represent may be dropped without a warning. The most common example is raw HTML.
  2. Anything that requires an external tool (rsvg-convert for SVG, mmdc for Mermaid) degrades differently depending on whether that tool is installed.

Use remarquee upload md <file> --pdf-only --output-dir ./out to inspect the PDF without uploading.

Support matrix (quick reference)

FeatureStatusNotes
Headings, emphasis, linksStandard pandoc Markdown
Bullet / numbered listsNested lists flattened to a maximum depth of 4
Tables (pipe tables)Standard pandoc Markdown
Blockquotes, horizontal rules
Fenced code blocksPreserved verbatim; optional syntax highlighting
Indented code blocksPreserved verbatim
Inline math $...$Requires math packages (bundled in the default header)
Display math $...$
\(...\) / \[...\] mathReader extension enabled
\require{...} (MathJax)No-op definition; safe
Local images ![](rel.png)Relative to the Markdown file's directory
Reference-style images ![a][id]Definitions are resolved and copied
Image sizing {width=...}%, px, cm, etc.
SVG as an image referenceConverted by pandoc via rsvg-convert
Inline raw <svg>…</svg>Extracted and converted by remarquee
HTML <img src="*.svg">Rewritten to Markdown, then converted
data:image/svg+xml;base64,…Handled by pandoc
Mermaid ```mermaid blocks✅¹Requires mmdc (mermaid-cli)
YAML frontmatter✅ (stripped)Removed before pandoc; never printed
Absolute/remote image paths⚠️Not copied; passed through to pandoc
Raw HTML (other than SVG <img>)Dropped by the LaTeX writer
Nested lists deeper than 4⚠️Flattened to depth 4
Embedding video / audioNot a PDF feature
Unsupported LaTeX packagesOnly the default header + your --latex-header-file are loaded

¹ When mmdc is absent, Mermaid blocks are left as plain code listings instead of diagrams.

YAML frontmatter

A leading --- block is stripped before conversion, so docmgr-style metadata never appears in the PDF and cannot break the pandoc YAML parser. A --- thematic break elsewhere in the document is unaffected (the yaml_metadata_block extension is disabled).

Math

Inline and display math are supported, along with the MathJax-style \(...\) and \[...\] delimiters. The default LaTeX header loads the packages needed for common symbols exported from AI chats:

  • stmaryrd (\llbracket, \rrbracket, \rightsquigarrow)
  • centernot (\centernot\Longrightarrow)
  • mathtools / amscd (extensible arrows, CD commutative diagrams)
  • MathJax's \require{...} is defined as a no-op so surrounding math still compiles

Pass --latex-header-file to add packages yourself. --pandoc-from controls the pandoc reader extensions if you need a different math dialect.

Images

Markdown image syntax works in all its forms:

![diagram](./assets/arch.png)          <!-- relative path -->
![diagram][arch]                        <!-- reference style -->
[arch]: ./assets/arch.png

![diagram](./assets/arch.svg){width=60%} <!-- sized -->

Behavior:

  • Relative paths are resolved against the directory of the Markdown file and copied into the conversion temp directory.
  • Absolute paths and http(s):// URLs are not copied; pandoc receives them as-is.
  • --resolve-images=false disables image resolving and copying entirely (and also disables HTML <img src=*.svg> rewriting, which depends on it).

SVG

SVG has three authoring forms; all are supported now.

1. Referenced SVG (already vector)

![architecture](./assets/arch.svg)

Pandoc converts this to a vector PDF using rsvg-convert and includes it with \includegraphics. No LaTeX shell escape is involved.

2. Inline raw SVG

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="steelblue"/>
</svg>

remarquee extracts the block (skipping fenced code), converts it to a vector PDF, and substitutes a Markdown image. This is a change from older releases, where raw <svg> blocks were silently dropped.

3. HTML <img> referencing an SVG

<img src="./assets/arch.svg" width="300" alt="architecture">

remarquee rewrites this to ![architecture](./assets/arch.svg){width=300px} and then handles it like a normal referenced image.

SVG flags

  • --svg (default true): enable/disable inline block and HTML <img> handling. Disabling leaves them to pandoc, which drops them.
  • --svg-converter PATH: use a specific converter (default: auto-detect rsvg-convert, then inkscape).
  • --svg-default-width W: width applied to extracted inline SVGs (e.g. 70%, 12cm). Default is the SVG's natural size.

Converter requirements and degradation

  • Referenced SVG needs rsvg-convert on PATH (pandoc falls back to the LaTeX svg package, which requires --shell-escape and fails in this pipeline).

  • Inline/HTML SVG uses remarquee's own converter. If none is found, remarquee warns and leaves the source unchanged, and the document still converts:

    WARNING: SVG: no SVG converter found; inline <svg> blocks left as-is
    

Limitations

  • SVG features unsupported by rsvg-convert (some CSS, filters, foreignObject) will not render. On conversion failure, remarquee warns and leaves the block.
  • Only <img> tags whose src ends in .svg are rewritten; other HTML images are still dropped by the LaTeX writer.

Mermaid

Fenced ```mermaid blocks are rendered to PNG diagrams when mmdc (mermaid-cli) is installed:

```mermaid
graph TD
  A[Markdown] --> B[pandoc]
  B --> C[PDF]
```

Flags: --mermaid (enable), --mmdc-path, --mermaid-scale, --mermaid-theme, --mermaid-bg, --mermaid-width, --mermaid-no-sandbox, --mermaid-pdf-width.

If mmdc is missing, blocks are left as plain code listings (warn and continue).

Code blocks

Fenced and indented code are preserved verbatim. List-spacing normalization never touches code fences or display math. remarquee upload src adds syntax highlighting via --theme (pandoc highlight style) and --listings.

Not supported

  • Raw HTML other than SVG <img> (tables, <div>, <details>, <video>, …): dropped by the LaTeX writer.
  • Lists nested deeper than 4 levels: flattened to 4 (LaTeX's limit).
  • Arbitrary LaTeX beyond the default header and --latex-header-file.
  • Remote asset fetching: URLs are passed to pandoc, which may or may not fetch them depending on your pandoc configuration.

Layout and bundles

  • --layout editor uses wider margins and looser spacing for annotation-heavy reading.
  • remarquee upload bundle concatenates inputs with a table of contents (--toc-depth) and a page break between documents.

Troubleshooting

ProblemCauseSolution
Package svg Error: File ... is missingA referenced SVG could not be convertedInstall rsvg-convert (or pass --svg-converter)
A diagram is missing with no errorRaw HTML (dropped) or the feature is disabledCheck --svg / --mermaid and whether the converter is installed
Missing character warnings in a local test renderRendering without remarquee's DejaVu font variablesUse the real pipeline, or pass -V mainfont="DejaVu Sans" -V monofont="DejaVu Sans Mono"
Unknown alias from pandocMalformed code-block fencesFix the fence (use explicit language tags)

See Also

  • remarquee help remarquee-upload-reference — upload command flags and behavior
  • remarquee help remarquee-upload-bundle — bundling multiple documents
  • remarquee help remarquee-upload-getting-started — first upload walkthrough