This and that 

Maaaaath! 

This is a test. Here is an equation: X_{0:5} = (X_0, X_1, X_2, X_3, X_4). Here is another:

\nabla^2 f = \frac{1}{r^2} \frac{\partial}{\partial r} \left( r^2 \frac{\partial f}{\partial r} \right) + \frac{1}{r^2 \sin \theta} \frac{\partial f}{\partial \theta} \left( \sin \theta \, \frac{\partial f}{\partial \theta} \right) + \frac{1}{r^2 \sin^2\theta} \frac{\partial^2 f}{\partial \phi^2}

Rubric 

This directive creates a paragraph heading that is not used to create a table of contents node.

-- `sphinx-doc.org
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html?highlight=rubric#directive-rubric>`__
Rubric 001

On we go.

Rubric 002
Rubric 003

Subsection 1 

Rubric sub 001

On we go.

Rubric sub 002
Rubric sub 003

Hlist 

This directive must contain a bullet list. It will transform it into a more compact list by either distributing more than one item horizontally, or reducing spacing between items, depending on the builder.

For builders that support the horizontal distribution, there is a columns option that specifies the number of columns; it defaults to 2. Example:

-- `sphinx-doc.org
<https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html?highlight=rubric#directive-hlist>`__
  • A list of
  • short items
  • that should be
  • displayed
  • horizontally

Optional parameter args 

At this point optional parameters cannot be generated from code. However, some projects will manually do it, like so:

This example comes from django-payments module docs.

This backend implements payments using a popular Polish gateway, Dotpay.pl.

Due to API limitations there is no support for transferring purchased items.

param seller_id

Seller ID assigned by Dotpay

param pin

PIN assigned by Dotpay

param channel

Default payment channel (consult reference guide)

param lang

UI language

param lock

Whether to disable channels other than the default selected above

Code test 

parsed-literal 

# parsed-literal test
curl -O http://someurl/release-|version|.tar-gz
Copied!

code-block 

{
"windows": [
    {
    "panes": [
        {
        "shell_command": [
            "echo 'did you know'",
            "echo 'you can inline'"
        ]
        },
        {
        "shell_command": "echo 'single commands'"
        },
        "echo 'for panes'"
    ],
    "window_name": "long form"
    }
],
"session_name": "shorthands"
}
Copied!

Code with Sidebar 

Inline code and references 

reStructuredText is a markup language. It can use roles and declarations to turn reST into HTML.

In reST, *hello world* becomes <em>hello world</em>. This is because a library called Docutils was able to parse the reST and use a Writer to output it that way.

If I type ``an inline literal`` it will wrap it in <tt>. You can see more details on the Inline Markup on the Docutils homepage.

Also with sphinx.ext.autodoc, which I use in the demo, I can link to :class:`test_py_module.test.Foo`. It will link you right my code documentation for it.

Emphasized lines with line numbers 

def some_function():
    interesting = False
    print 'This line is highlighted.'
    print 'This one is not...'
    print '...but this one is.'
Copied!

Citation 

Here I am making a citation [1]

[1]
This is the citation I made, let's make this extremely long so that we can tell that it doesn't follow the normal responsive table stuff.