4. Lists & Tables

4.1. Lists

4.1.1. Enumerated Lists

  1. Arabic numerals.

    1. lower alpha)

      1. (lower roman)

        1. upper alpha.

          1. upper roman)

  2. Lists that don’t start at 1:

    1. Three

    2. Four

    1. C

    2. D

    1. iii

    2. iv

  3. List items may also be auto-enumerated.

4.1.2. Definition Lists

Term

Definition

Termclassifier

Definition paragraph 1.

Definition paragraph 2.

Term

Definition

I have no clue why the definition list below is classified as a different style of definition list than the one above.

Is it the spaces in the term?

Maybe it was the multiple line paragraph in the line below that caused this?

Is it the paragraph above the list maybe?

I guess a lot of these lists don’t have leading paragraphs?

Is it everything all at once?

Who knows?!

4.1.3. Option Lists

For listing command-line options:

-a

command-line option “a”

-b file

options can have arguments and long descriptions

--long

options can be long also

--input=file

long options can also have arguments

--very-long-option

The description can also start on the next line.

The description may contain multiple body elements, regardless of where it starts.

-x, -y, -z

Multiple options are an “option group”.

-v, --verbose

Commonly-seen: short & long options.

-1 file, --one=file, --two file

Multiple options with arguments.

/V

DOS/VMS-style options too

There must be at least two spaces between the option and the description.

4.1.4. Field list

Author:

David Goodger

Address:

123 Example Street Example, EX Canada A1B 2C3

Contact:

docutils-develop@lists.sourceforge.net

Authors:

Me; Myself; I

organization:

humankind

date:

$Date: 2012-01-03 19:23:53 +0000 (Tue, 03 Jan 2012) $

status:

This is a “work in progress”

revision:

$Revision: 7302 $

version:

1

copyright:

This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else’s heart desires.

field name:

This is a generic bibliographic field.

field name 2:

Generic bibliographic fields may contain multiple body elements.

Like this.

Dedication:

For Docutils users & co-developers.

abstract:

This document is a demonstration of the reStructuredText markup language, containing examples of all basic reStructuredText constructs and many advanced constructs.

4.1.5. Bullet Lists

4.1.5.1. Simple

  • A simple list.

  • There are no margins between list items.

  • Simple lists do not contain multiple paragraphs. That’s a complex list.

  • In the case of a nested list

    • There are no margins between elements

      • Still no margins

        • Still no margins

4.1.5.2. Complex

  • A bullet list

    • Nested bullet list.

    • Nested item 2.

  • Item 2.

    Paragraph 2 of item 2.

    • Nested bullet list.

    • Nested item 2.

      • Third level.

      • Item 2.

    • Nested item 3.

  • inline literall

  • inline literall

  • inline literall

  • This item has multiple paragraphs.

    This item has multiple paragraphs.

  • This item has multiple paragraphs.

    This item has multiple paragraphs.

4.1.5.3. Second list level

  • here is a list in a second-level section.

  • yahoo

  • yahoo

    • yahoo

    • here is an inner bullet oh

      • one more with an inline literally. yahoo

        heh heh. child. try to beat this embed:

         1# -*- coding: utf-8 -*-
         2"""Test Module for sphinx_rtd_theme."""
         3
         4
         5class Foo:
         6
         7    """Docstring for class Foo.
         8
         9    This text tests for the formatting of docstrings generated from output
        10    ``sphinx.ext.autodoc``. Which contain reST, but sphinx nests it in the
        
    • and another. yahoo

    • yahoo

    • hi

  • how about an admonition?

    Note

    This is a note nested in a list.

  • and hehe

4.1.5.3.1. But deeper down the rabbit hole
  • I kept saying that, “deeper down the rabbit hole”. yahoo

    • I cackle at night yahoo.

  • I’m so lonely here in GZ guangzhou

  • A man of python destiny, hopes and dreams. yahoo

4.1.6. Hlists

  • First item

  • Second item

  • Third item

  • Forth item

  • Fifth item

  • Sixths item

Hlist with images

  • ../_images/yi_jing_01_chien.jpg

    This is a short caption for a figure.

  • ../_images/yi_jing_01_chien.jpg

    This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.

4.1.7. Numbered List

  1. One,

  2. Two.

  3. Three with long text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed feugiat sagittis neque quis eleifend. Duis rutrum lectus sit amet mattis suscipit.

    1. Using bullets and letters. (A)

    1. Using bullets and letters. (B)

    1. Using bullets and letters. (C)

4.2. Tables

4.2.1. Grid Tables

Here’s a grid table followed by a simple table:

Header row, column 1 (header rows optional)

Header 2

Header 3

Header 4

body row 1, column 1

column 2

column 3

column 4

body row 2

Cells may span columns.

body row 3

Cells may span rows.

  • Table cells

  • contain

  • body elements.

body row 4

body row 5

Cells may also be empty: -->

Inputs

Output

A

B

A or B

False

False

False

True

False

True

False

True

True

True

True

True

4.2.1.1. Giant Tables

Header 1

Header 2

Header 3

Header 1

Header 2

Header 3

Header 1

Header 2

Header 3

Header 1

Header 2

Header 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

body row 1

column 2

column 3

4.2.2. List Tables

List tables can have captions like this one.

List table

Header 1

Header 2

Header 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.

Stub Row 1

Row 1

Column 2

Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.

Stub Row 2

Row 2

Column 2

Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.

Stub Row 3

Row 3

Column 2

Column 3 long. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet mauris arcu.

This is a list table with images in it.
../_images/yi_jing_01_chien.jpg

This is a short caption for a figure.

../_images/yi_jing_01_chien.jpg

This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.