Syntax

Comment

.. This text will not be shown
   And neither will this text.

Definition lists

what
  Definition lists associate a term with
  a definition.

how
  The term is a one-line phrase, and the
  definition is one or more paragraphs or
  body elements

Escape

Escape characters with a back-slash e.g:

\*\*\*\*

Format

*Italics*

**Bold**

``mono spaced``

::

  print 'we love work'

We can also append double colon to the previous paragraph like this::
  print 'we love work'

Note: See Syntax Highlighting below…

Images

Create an images folder alongside the folder containing the rst files:

doc/source/
doc/images/

Copy in your images (png format is probably best). To reference the image from the rst file:

.. image:: ../images/project.png
   :scale: 60

Here we use the scale directive. For others see: Image Directives

Line

Horizontal line of 4 or more repeated punctuation characters:

_____________________________________________________________________________

List

- Apples
- Oranges

1. User pays for their purchase.
2. The user is instructed to text the first 6 digits.

…or for automatic numbering:

#. User pays for their purchase.
#. The user is instructed to text the first 6 digits.

Sections and Title

Titles are underlined (or over-and underlined) with a printing non-alphanumeric 7-bit ASCII character:

Starfish - Introduction
=====================
Simple Description
---------------------

Note: The underline/overline must be at least as long as the title text.

Note

.. note:: We are considering merging the latest version with the outstanding
   code on the old branch.

The following admonition directives have been implemented:

attention
caution
danger
error
hint
important
note
tip
warning

For more information, see: Specific Admonitions

The title for a generic, titled admonition may be anything (e.g. Question):

.. admonition:: Question

  Is the world flat?

Syntax Highlighting

To set the highlight value for all following literal blocks:

.. highlight:: xml

::

  <com.sample.ImageView
      android:id="@+id/img_banner" />

To set the language for one block:

.. code-block:: xml

  <LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"

Note Do not put in the :: when using a code-block.

Tables

Simple

=====  =====  ======
   Inputs     Output
------------  ------
  A      B    A or B
=====  =====  ======
False  False  False
True   False  True
False  True   True
True   True   True
=====  =====  ======

Complex

+------------+------------+-----------+
| Header 1   | Header 2   | Header 3  |
+============+============+===========+
| body row 1 | column 2   | column 3  |
+------------+------------+-----------+
| body row 2 | Cells may span columns.|
+------------+------------+-----------+

Text (Line Blocks)

| 96 St Georges Rd
| Exeter
|     Line breaks and initial indents
|     are preserved.
| Continuation lines are wrapped
  portions of long lines; they begin
  with spaces in place of vertical bars.