-
Notifications
You must be signed in to change notification settings - Fork 4
Element Reference
There are three basic categories of markdown elements:
-
Container blocks - blocks containing other blocks, e.g. lists
-
Leaf blocks - blocks of text that do not contain other blocks, only inline elements e.g., paragraph
-
Inlines - plain or formatted text spans and images within a leaf block
All bock elements can have style and id attributes, e.g. {.myStyle} or {#myId}. Inline elements can have attributes only if explicitly stated so.
Types: UnorderedList, OrderedList
Syntax: none, defined by the list items
Default style name: UnorderedList, OrderedList
Applicable style parts: Font, Background, Margin, Padding
A block containing list items Attributes:
Types: UnorderedListItem, OrderedListItem
Syntax:
- item
- item
1. item
2. item
Default style name: UnorderedListItem, OrderedListItem
Applicable style parts: Font, Background, Margin, Padding
A list item containing other blocks. Either preceded by a bullet or by a number.
Attributes: none
Types: Quote
Syntax:
> QuoteDefault style name: Quote,
Applicable style parts: Font, Background, Margin, Padding
A block styled as a quote containing other blocks.
Attributes: none
Types: Table
Syntax:
| Col 1 | Col 2 |
| ----- | ----: |
| data | data |
+---+---+---+
| AAAAA | B |
+---+---+---+Default style name: Table,
Applicable style parts: Font, Background, Margin, Table, Border (only the entire border, not side by side)
A table containing table rows.
If a table width is defined, the column widths are scaled to fit into the table width.
If a table width is not defined, the width is a sum of column widths. If it exceeds the maximum available width, column widths are scaled to fit into the maximum width.
Attributes:
| Attribute | Values | Note |
|---|---|---|
| width | width expressed in Dimension units |
|
| columns | comma separated widths expressed in Dimension units |
|
| align | left, right, center | horizontal table alignment |
Types: TableHeader, TableRowEven, TableRowOdd
Syntax: see Table
Default style name: TableHeader, TableRowEven, TableRowOdd
Applicable style parts: Font, Background
A table row.
Attributes: none
Types: TableCell
Syntax: see Table
Default style name: TableCell
Applicable style parts: Font, Background, Table.VerticalCellAlignment
A table cell.
Attributes: none
Types: FootnoteGroup
Syntax: -
Default style name: FootnoteGroup
Applicable style parts: Font, Background
A block of footnotes
Attributes: none
Types: Footnote
Syntax:
[^first]: FootnoteDefault style name: Footnote
Applicable style parts: Font, Background, Bullet
A block containing one footnote, preceded by a numbering bullet
Attributes: none
Types: CustomContainer
Syntax:
:::
content
:::Default style name: CustomContainer
Applicable style parts: Font, Background
A block containing other blocks
Attributes: none
Types: Paragraph
Syntax:
Just a text paragraph.
Default style name: Paragraph
Applicable style parts: Font, Background, Margin, Padding, Border, Paragraph
A block containing other blocks
Attributes:
| Attribute | Values | Note |
|---|---|---|
| align | left, right, center, justified | paragraph alignment |
Types: Heading1 - Heading6
Syntax:
# Heading 1
## Heading 2
...
###### Heading 6Default style name: Heading1 - Heading6
Applicable style parts: Font, Background, Margin, Padding, Border, Paragraph
A heading.
Attributes:
| Attribute | Values | Note |
|---|---|---|
| align | left, right, center, justified | heading alignment |
| outline | true, false | if false, the heading is excluded from PDF document tree outline |
Types: Code
Syntax:
```optional_syntax_name
code();
```
....code(); // 4 spaces before code
Default style name: Code
Applicable style parts: Font, Background, Margin, Padding, Border, Paragraph
A block of code.
Attributes: none
Types: Break
Syntax:
---
***
___Default style name: Break
Applicable style parts: Background, Margin, Padding, Border, Paragraph, Bullet
A paragraph representing a horizontal divider.
Attributes: none
Types: Bold, Italic, Superscript, Subscript, Marked, Cite, Strike, Inserted
Syntax:
**Bold**
__Bold__
*Italic*
_Italic_
^SuperScript^
~Subscript~
==Marked text==
""Citation""
~~strike~~
++Inserted text++Default style name: Bold, Italic, Superscript, Subscript, Marked, Cite, Strike, Inserted
Applicable style parts: Font
A text styling/emphasis.
Attributes: none
Types: InlineCode
Syntax:
`code`Default style name: InlineCode
Applicable style parts: Font
A text span representing a code snippet.
Attributes:
| Attribute | Values | Note |
|---|---|---|
| .style | language | Syntax highlighting. Although it is not exactly a style, it is used this way for compatibility reasons with other engines, e.g. {.python}
|
Types: Hyperlink
Syntax:
[Description](url)Default style name: Hyperlink
Applicable style parts: Font
A hyperlink to a cross reference (with # prefix) or to a url.
Attributes: none
Types: Hyperlink
Syntax:
Default style name: Hyperlink
Applicable style parts: -
A raster image or embedded PDF.
Attributes:
| Attribute | Values | Note |
|---|---|---|
| width | Dimension |
image width |
| height | Dimension |
image height |
| dpi | number | enforced DPI to be used |
| align | left, right, center | image alignment (must be alone in paragraph) |
| watermark | image is rendered below the following text (must be alone in paragraph) |
Types: Footnote Reference
Syntax:
Footnote 1 link[^first].Default style name: Footnote Reference
Applicable style parts: Font
A reference to a footnote.
Attributes: -
Types: -
Syntax:
©Default style name: -
Applicable style parts: -
An HTML entity in form &name; or &number;
Attributes: none
Types: Toc1 - Toc6, Index
Syntax:
[Chapter 1](target){.Toc1}
[Chapter 1.1](target){.Toc2}
...Default style name: Toc1 - Toc6, Index
Applicable style parts: -
A special hyperlink converting the paragraph to a Table of Contents line, see an example in Examples
Attributes: Toc1 - Toc6, Index