Notenik Knowledge Base

Back to Notenik.app

#### 9.2.11 Tables

As an extension to the original Markdown spec from John Gruber, tables are supported.

This is an extension documented in the Markdown Guide.

(Also see the Make a Table Sortable command if you’d like the user to be able to click on a column heading in order to sort the table by the values in that column.)

To create a table, use the pipe character (|) to form a vertical border before, after, and/or between the columns, and use three or more consecutive dashes in each column to form a horizontal border between the header row and the start of the data rows, as in the following example:


| Syntax      | Description |
| ----------- | ----------- |
| Paragraph   | Text        |


…which will then display as follows:

Syntax Description
Paragraph Text

You can control horizontal alignment within each column by placing a colon before, after, or before and after the string of dashes, for left-, right- or centering alignment. See the following example:


| Syntax      | Description | Test Text     |
| :---        |    :----:   |          ---: |
| Header      | Title       | Here's this   |
| Paragraph   | Text        | + more      |


…which will display as follows:

Syntax Description Test Text
Paragraph Text + more

Note that the pipes do not need to be lined up, and the trailing pipes are optional. So the following code is valid.


| Syntax      | Description | Test Text
| :---        |    :----:   |          ---:
| Header      | Title       | Here's this
| Paragraph   | Text        | + more


And will still display as desired:

Syntax Description Test Text
Paragraph Text + more

Pipe characters may be escaped in order to include them as part of the contents of a cell, rather than having them mark the end of the column.

Per the MultiMarkdown convention, you can indicate that a cell should span multiple columns by simply adding additional pipes (|) at the end of the cell. The number of pipes equals the number of columns the cell should span.

So the following code:


| ------------ | :-----------: | -----------: |
| Content      |          *Long Cell*        ||
| Content       |   **Cell**   |         Cell |
| And more      | With an escaped '\|'       ||


Will render as follows:

Content Long Cell
Content Cell Cell
And more With an escaped ‘|’
##### Unsupported MultiMarkdown Features

There are several differences between MultiMarkdown (MMD) tables and what one might call more ordinary Markdown tables, as currently implemented by Notenik.

Here are the more notable differences:

1. MMD allows for multiple lines of table headings, where Notenik only expects one.

2. MMD is rather liberal in terms of its requirement for each line to start with a pipe character; Notenik allows a trailing pipe character to be omitted, but not the starting pipe.

3. MMD has some extra syntax to specify table captions, whereas Notenik does not.

4. Notenik does not support use of a blank line to create a new TBODY tag, as does MMD.

While these additional features are fully supported by apps such as iA Writer and Marked, Notenik does not currently support them.