Use Markdown Tables

Authors can use Markdown Tables. Tables can also be used to render charts on presentation slides.

Screenshot of marmota.app rendering a markdown table

General Format

Column Specifications and Headings

Column specifications (called "delimiter row" in Github Flavored Markdown) are defined in a line where all columns only contain hyphens (-), colons (:) and whitespace characters. They are not optional: Every table must contain column specifications as either the first or the second line. So, this table has valid column specifications:

| Value | Series 1 | Series 2 |
| ----- | -------- | -------- |

And this table also has valid column specifications:

| - | ----- | - | --- |

The following table is not valid because it does not contain column specifications:

| 1 | 2 | 3 | 4 |

... and the next table is not valid because the column specifications are neither in the first nor in the second row:

| a | b | c | d |
| 1 | 2 | 3 | 4 |
| - | ----- | - | --- |

If the first row contains data (and thus the second row contains the column specifications), the first row defines the table's headings:

| Value | Series 1 | Series 2 |
| ----- | -------- | -------- |

"Value", "Series 1" and "Series 2" are rendered as the headings of the three columns of this table.

Column Alignment

Use colons (:) in the columns specification to define the alignment of table columns:

| Left | Centered | Right |
| :--- | :------: | ----: |

Options

If you want to add Options to your table (which is especially useful when you want to render the data as a chart), you can do so after the first line. Both of the two tables below contain valid options:

| Value | Series 1 | Series 2 |{option1=value1;option1=value1}
| ----- | -------- | -------- |
| foo   | 1        | 2        |

| ----- | -------- | -------- |{option1=value1;option1=value1}
| foo   | 1        | 2        |

Content and Alignment

Content in tables does not have to be aligned. Also, adding spaces before and after the data in a column is not strictly necessary. The pipe symbol after the last column can be left out.

The two tables below render exaclty the same, but the second one is easier to create and change:

| Value | Series 1 | Series 2 |
| ----- | -------- | -------- |
| foo   | 1        | 200      |

| Value | Series 1 | Series 2 
|-|-|-
|foo|1|200|