Tables
There are several ways to create tables in reST.
It is recommended that you do not use large tables as they are not responsive.
Grid table
+----------+----------+
| Header 1 | Header 2 |
+==========+==========+
| 1 | one |
+----------+----------+
| 2 | two |
+----------+----------+
| Header 1 | Header 2 |
|---|---|
| 1 | one |
| 2 | two |
http://docutils.sourceforge.net/docs/user/rst/quickref.html#tables
You can use this table generator to create a grid table.
Simple table
======== ========
Header 1 Header 2
======== ========
1 one
2 two
======== ========
| Header 1 | Header 2 |
|---|---|
| 1 | one |
| 2 | two |
http://docutils.sourceforge.net/docs/user/rst/quickref.html#tables
CSV table
.. csv-table:: Numbers
:header: "Header 1", "Header 2"
:widths: 15, 15
1, "one"
2, "two"
| Header 1 | Header 2 |
|---|---|
| 1 | one |
| 2 | two |
https://docutils.sourceforge.io/docs/ref/rst/directives.html#csv-table-1
t3-field-list-table tables
t3- is a custom directive of the TYPO3 rendering. If you
want your .rst file to be correctly rendered on other platforms as well (for
example GitHub), you should not use this.
Each item of the list is one row, and the field names are the columns.
:header- says how many of the first items are header rows, as it
does in a list-: 1 for the usual single header row, 2 for two, and
0 for a table without a header. Without the option the first row is the
header.
Note
Before render-guides 0.44.0 the option was read but never used: the first
row was always the header. A table written with
:header- or
:header- therefore changes its appearance once it is
rendered again.
.. t3-field-list-table::
:header-rows: 1
- :Header1: Header1
:Header2: Header2
- :Header1: 1
:Header2: one
- :Header1: 2
:Header2: two
|
Header1 |
Header2 |
|---|---|
|
1 |
one |
|
2 |
two |