Reference
Syntax matrix
How Comark syntax maps to comark-pdf and jasy PDF primitives.
Status: yes mapped · fallback still a valid PDF · workaround host-side until jasy grows the primitive · host renderPdf option, not markdown · no not mapped · jasy use @jasy/pdf (or a custom component) directly.
Comark syntax → PDF
| Feature | Comark | comark-pdf | jasy |
|---|---|---|---|
Frontmatter / pdf: | YAML | Merged into page config | Page / Document props |
Headings h1–h6 | yes | Text + Bookmark + Anchor (outline) | Bookmark, Anchor, Text |
| Paragraph | yes | Paragraph | Paragraph / Text |
| Bold / italic / strike | ** _ ~~ | span flags | span({ bold, italic, strikethrough }) |
| Inline code | ` | span Courier | span({ font: 'Courier' }) |
sup / sub | HTML | span({ verticalAlign }) | span({ verticalAlign: 'super' | 'sub' }) |
| Link | [text](url) | span({ href }) | span({ href }) / Link |
| Unordered / ordered list | yes | Row marker + Column | Row, Column, Text |
| Nested list | yes | Recursive list map | same primitives |
| GFM task list | - [x] / - [ ] | Printed [x] / [ ] (Courier). Drops input. Does not create AcroForm. | Text. Checkbox is a form field — not used here. |
| Blockquote | > | Tinted Box (+ bar when visuals.quote) | Box |
| Horizontal rule | --- | Divider | Divider |
| GFM table | yes | Table | Table |
| Key-value table | 2-col empty header | visuals.table.keyValue → auto / 2fr | Table({ columns }) |
| Fenced code | yes | Monospace Box. Token color: → span when rangi / Shiki rewrote pre | Colored span in Text |
| Image (default) |  | Alt-text | — |
| Image embed | same | visuals.image: 'embed': data URI, path, or HTTP fetch (15 s / 8 MB). Fail → alt-text. | Image(path | bytes). No Image(url) yet. |
| Inline image + embed |  in a p | Workaround: Column of text + Image + text | Needs an inline-replaced image for in-sentence layout |
| SVG node | HTML <svg> | Svg(sanitizeSvgLengths(…)) | Svg |
::page-break | component | PageBreak() or Box({ breakBefore }) | PageBreak, breakBefore |
| Multi-page flow | long AST | One Page; jasy paginates | Automatic pagination |
| Header / footer strings | pdf.header / footer | Compiled chrome; {{ page }} / {{ totalPages }} | Page.header / footer, PageNumber, PageCount |
{{ }} / :bind | binding plugin | Interpolates data / frontmatter / props | — (host data) |
::if / ::for / ::include | binding plugin | Built-in jasy components | — |
Custom ::tag | Comark component | components.tag → JasyComponentFn | Any jasy element |
Math $…$ / $$…$$ | math plugin | Optional mathjax-full → Svg. Else Courier source. | Svg |
| Mermaid fence | mermaid plugin | Optional mermaid (+ DOM / happy-dom) → Svg. Else source box. | Svg |
| Raw HTML as layout | HTML blocks | no — flattened / ignored. jasy is not a CSS engine. | no — do not ask for Html() |
| Page-foot footnotes | not a first-class map | no — needs a jasy page-foot / endnote region | Header/footer chrome is the wrong tool |
Future jasy parity
A native jasy Image(url) (parity with addFontFromUrl) would replace the HTTP fetch workaround. A footnote / endnote page region would enable page-foot notes. They are useful, not blockers.
See Host options for renderer options that are not markdown syntax.