5. Tables¶
5.1. Cells totally surrounded¶
An example of table where cells are too-much surrounded by borders.
When the write with the following reStructuredText
markup / syntax:
+-----------------+------------------+
| Logic Table |
+-----------------+------------------+
| Inputs | Output |
+---------+-------+--------+---------+
| A | B | A or B | A and B |
+=========+=======+========+=========+
| False | False | False | False |
+---------+-------+--------+---------+
| False | True | True | False |
+---------+-------+--------+---------+
| True | False | True | False |
+---------+-------+--------+---------+
| True | False | True | True |
+---------+-------+--------+---------+
The |rst| text written above is generated/rendered as shown below:
Logic Table | |||
---|---|---|---|
Inputs | Output | ||
A | B | A or B | A and B |
False | False | False | False |
False | True | True | False |
True | False | True | False |
True | False | True | True |
5.2. Little Less Surrounding¶
An example of table where cells are less surrounded by borders.
When the write with the following reStructuredText
markup / syntax:
.. tabularcolumns:: |C|C|C|C|
====== ======== ========= ==========
A B A xor B A xnor B
====== ======== ========= ==========
False False False True
False True True False
True False True False
True True False True
====== ======== ========= ==========
The |rst| text written above is generated/rendered as shown below:
A | B | A xor B | A xnor B |
---|---|---|---|
False | False | False | True |
False | True | True | False |
True | False | True | False |
True | True | False | True |
5.3. List like Table¶
An example of table where input text is like a list.
When the write with the following reStructuredText
markup / syntax:
.. list-table:: Bytes and Sizes
:header-rows: 1
:stub-columns: 1
* - Name
- Prefix
- x\ :sup:`n`
* - Kilo
- Ki
- 2\ :sup:`10`
* - Mega
- Mi
- 1024\ :sup:`2`
* - Giga
- Gi
- 1024\ :sup:`3`
* - Tera
- Ti
- 1024\ :sup:`4`
* - Peta
- Pi
- 1024\ :sup:`5`
* - Exa
- Ei
- 1024\ :sup:`6`
* - Zetta
- Zi
- 1024\ :sup:`7`
* - Yotta
- Yi
- 1024\ :sup:`8`
The |rst| text written above is generated/rendered as shown below:
Name | Prefix | xn |
---|---|---|
Kilo | Ki | 210 |
Mega | Mi | 10242 |
Giga | Gi | 10243 |
Tera | Ti | 10244 |
Peta | Pi | 10245 |
Exa | Ei | 10246 |
Zetta | Zi | 10247 |
Yotta | Yi | 10248 |
See more at
Table in
reStructuredText
Directives.CSV Table in
reStructuredText
Directives.List Table in
reStructuredText
Directives.Grid Tables in
reStructuredText
Markup Specification.Simple Tables in
reStructuredText
Markup Specification.