List table

The list table directive allows you to create a table of data in a two-level enumeration list.

Description

The directive selection consists of an explicit markup start (".. ") followed by the type of directive (list-table) and two colons.

(See also: Directives)

Principle

.. list-table::

Properties

  • The sublists of the enumeration list must contain the same number of list items.
  • A blank line is required between the directive and a preceding text body element (for example, a paragraph with text).

Options

Optionally, the list table row block can contain a flat list of table options. The following option is recognized:

widths : integer [integer...]

weighting of column widths

A list of relative column widths separated by commas or spaces. By default, the columns have the same width (100%/#columns).

header rows : integer

header table

The number of rows to be used as table header. Default value is 0.

stub columns : integer

header column table

The number of columns to be used as table header. Default value is 0.

Sample

(In sample project: B_DocuElements\Tables\FB_Libdoc_ListTable)

(*
.. list-table:: Property list
    :widths: 50 50 50
    :header-rows: 1

    * - Items
      - Property 1
      - Property 2
    * - Item 1
      - angular
      - red
    * - Item 2
      - round
      - blue
*)

List table 1: