Tables¶
Simple¶
|
to indicate |
the |
columns |
Code:
============= ===========
``=`` is used to indicate
the columns
============= ===========
1 |
2 multiline |
3 first column cannot be multiline |
4 |
Code:
================================== =========
1 2
multiline
3 first column cannot be multiline 4
================================== =========
with |
header |
|---|---|
1 |
2 |
3 |
4 |
Code:
==== ======
with header
==== ======
1 2
3 4
==== ======
column |
spans |
are created |
|---|---|---|
using a |
sequence of - |
|
except |
for the last row |
|
and |
last |
header |
where |
= is |
a must |
Code:
======== ====== ==================
column spans are created
======== ====== ==================
using a sequence of `-`
---------------- ------------------
except for the last row
-------- ---------------------------
and last header
where `=` is a must
======== ====== ==================
Grid¶
grid |
tables combine + and - symbols |
and |
more complex types can be expressed |
Example:
+-----------------------+-------------------------+---------------+
| headers are | separated by `=` |
+=======================+=========================+===============+
| Literal blocks | Lists | Lines |
+-----------------------+ - one +---------------+
| Example:: | - two | | line 1 |
| | | Multiline |
| **C** | | | line 2 |
+-----------------------+-------------------------+---------------+
CSV¶
Todo
Example of CSV table
List¶
Rows |
each cell |
can contain |
markup |
|---|---|---|---|
Columns |
its number |
must be |
constant |
Code:
.. list-table:: list table
:header-rows: 0
:widths: 10 10 10 10
:stub-columns: 1
:name: list example
* - Rows
- each cell
- can contain
- **markup**
* - Columns
- its number
- must be
- constant
Title¶
The table directive can be used to create a table with title.
simple |
table |
with |
title |
Code:
.. table:: table title
============= ===========
simple table
with title
============= ===========