2008-08-06 09:46:11 -05:00
|
|
|
:tocdepth: 2
|
|
|
|
|
2009-05-17 12:15:28 -05:00
|
|
|
.. title:: set by title directive
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
Testing various markup
|
|
|
|
======================
|
|
|
|
|
2009-08-09 15:44:41 -05:00
|
|
|
Meta markup
|
|
|
|
-----------
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
.. sectionauthor:: Georg Brandl
|
2009-08-09 16:12:01 -05:00
|
|
|
.. moduleauthor:: Georg Brandl
|
2008-08-06 09:46:11 -05:00
|
|
|
|
|
|
|
.. contents:: TOC
|
|
|
|
|
2008-10-18 12:29:56 -05:00
|
|
|
.. meta::
|
|
|
|
:author: Me
|
|
|
|
:keywords: docs, sphinx
|
|
|
|
|
2009-08-09 15:44:41 -05:00
|
|
|
|
|
|
|
Generic reST
|
|
|
|
------------
|
|
|
|
|
|
|
|
A |subst| (the definition is in rst_epilog).
|
2009-02-07 12:41:10 -06:00
|
|
|
|
2008-10-28 11:53:05 -05:00
|
|
|
.. _label:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
some code
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2009-08-09 15:44:41 -05:00
|
|
|
Option list:
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2009-08-09 15:44:41 -05:00
|
|
|
-h help
|
|
|
|
--help also help
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2010-10-22 05:10:11 -05:00
|
|
|
Line block:
|
|
|
|
|
|
|
|
| line1
|
|
|
|
| line2
|
|
|
|
| line3
|
|
|
|
| line4
|
|
|
|
| line5
|
|
|
|
| line6
|
|
|
|
| line7
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2008-11-01 09:40:02 -05:00
|
|
|
Body directives
|
2009-08-09 15:44:41 -05:00
|
|
|
^^^^^^^^^^^^^^^
|
2008-11-01 09:40:02 -05:00
|
|
|
|
|
|
|
.. topic:: Title
|
|
|
|
|
|
|
|
Topic body.
|
|
|
|
|
|
|
|
.. sidebar:: Sidebar
|
|
|
|
:subtitle: Sidebar subtitle
|
|
|
|
|
|
|
|
Sidebar body.
|
|
|
|
|
|
|
|
.. rubric:: Test rubric
|
|
|
|
|
|
|
|
.. epigraph:: Epigraph title
|
|
|
|
|
|
|
|
Epigraph body.
|
|
|
|
|
|
|
|
-- Author
|
|
|
|
|
|
|
|
.. highlights:: Highlights
|
|
|
|
|
|
|
|
Highlights body.
|
|
|
|
|
|
|
|
.. pull-quote:: Pull-quote
|
|
|
|
|
|
|
|
Pull quote body.
|
|
|
|
|
|
|
|
.. compound::
|
|
|
|
|
|
|
|
a
|
|
|
|
|
|
|
|
b
|
|
|
|
|
2014-01-11 03:25:34 -06:00
|
|
|
.. parsed-literal::
|
|
|
|
|
|
|
|
with some *markup* inside
|
|
|
|
|
2009-08-09 15:44:41 -05:00
|
|
|
|
2010-05-24 05:57:07 -05:00
|
|
|
.. _admonition-section:
|
|
|
|
|
2009-08-09 15:44:41 -05:00
|
|
|
Admonitions
|
|
|
|
^^^^^^^^^^^
|
|
|
|
|
|
|
|
.. admonition:: My Admonition
|
|
|
|
|
|
|
|
Admonition text.
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
Note text.
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
Warning text.
|
|
|
|
|
2010-05-24 05:57:07 -05:00
|
|
|
.. _some-label:
|
|
|
|
|
2009-08-09 15:44:41 -05:00
|
|
|
.. tip::
|
|
|
|
Tip text.
|
|
|
|
|
|
|
|
|
|
|
|
Inline markup
|
|
|
|
-------------
|
|
|
|
|
|
|
|
*Generic inline markup*
|
|
|
|
|
2010-07-21 05:33:24 -05:00
|
|
|
Adding \n to test unescaping.
|
|
|
|
|
|
|
|
* :command:`command\\n`
|
|
|
|
* :dfn:`dfn\\n`
|
|
|
|
* :guilabel:`guilabel with &accelerator and \\n`
|
|
|
|
* :kbd:`kbd\\n`
|
|
|
|
* :mailheader:`mailheader\\n`
|
|
|
|
* :makevar:`makevar\\n`
|
|
|
|
* :manpage:`manpage\\n`
|
|
|
|
* :mimetype:`mimetype\\n`
|
|
|
|
* :newsgroup:`newsgroup\\n`
|
|
|
|
* :program:`program\\n`
|
|
|
|
* :regexp:`regexp\\n`
|
|
|
|
* :menuselection:`File --> Close\\n`
|
2010-05-24 05:57:07 -05:00
|
|
|
* :menuselection:`&File --> &Print`
|
2010-07-21 05:33:24 -05:00
|
|
|
* :file:`a/{varpart}/b\\n`
|
|
|
|
* :samp:`print {i}\\n`
|
2009-08-09 15:44:41 -05:00
|
|
|
|
|
|
|
*Linking inline markup*
|
|
|
|
|
|
|
|
* :pep:`8`
|
|
|
|
* :rfc:`1`
|
|
|
|
* :envvar:`HOME`
|
2009-08-09 16:01:48 -05:00
|
|
|
* :keyword:`with`
|
|
|
|
* :token:`try statement <try_stmt>`
|
2010-05-24 05:57:07 -05:00
|
|
|
* :ref:`admonition-section`
|
|
|
|
* :ref:`here <some-label>`
|
2010-05-30 05:42:05 -05:00
|
|
|
* :ref:`my-figure`
|
|
|
|
* :ref:`my-table`
|
2009-08-09 16:01:48 -05:00
|
|
|
* :doc:`subdir/includes`
|
|
|
|
* ``:download:`` is tested in includes.txt
|
|
|
|
* :option:`Python -c option <python -c>`
|
2014-01-10 15:04:03 -06:00
|
|
|
* This used to crash: :option:`Python c option`
|
2009-08-09 15:44:41 -05:00
|
|
|
|
|
|
|
Test :abbr:`abbr (abbreviation)` and another :abbr:`abbr (abbreviation)`.
|
|
|
|
|
2010-08-25 06:33:30 -05:00
|
|
|
Testing the :index:`index` role, also available with
|
|
|
|
:index:`explicit <pair: title; explicit>` title.
|
2009-08-09 15:44:41 -05:00
|
|
|
|
2009-08-09 16:01:48 -05:00
|
|
|
.. _with:
|
|
|
|
|
|
|
|
With
|
|
|
|
----
|
|
|
|
|
|
|
|
(Empty section.)
|
|
|
|
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
Tables
|
|
|
|
------
|
|
|
|
|
2008-08-06 10:13:42 -05:00
|
|
|
.. tabularcolumns:: |L|p{5cm}|R|
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2011-01-08 13:02:38 -06:00
|
|
|
.. _my-table:
|
2011-01-08 15:18:10 -06:00
|
|
|
|
2010-05-30 05:42:05 -05:00
|
|
|
.. table:: my table
|
|
|
|
|
|
|
|
+----+----------------+----+
|
|
|
|
| 1 | * Block elems | x |
|
|
|
|
| | * In table | |
|
|
|
|
+----+----------------+----+
|
|
|
|
| 2 | Empty cells: | |
|
|
|
|
+----+----------------+----+
|
|
|
|
|
2011-09-17 14:05:12 -05:00
|
|
|
Table with multicol:
|
|
|
|
|
2011-09-19 02:02:00 -05:00
|
|
|
.. only:: latex
|
|
|
|
|
2011-09-17 14:05:12 -05:00
|
|
|
+----+---------------------+
|
|
|
|
| 1 | test! |
|
|
|
|
+----+---------+------+----+
|
|
|
|
| 2 | col | col | c |
|
|
|
|
| y +---------+------+----+
|
|
|
|
| x | test |
|
|
|
|
+----+---------------------+
|
|
|
|
|
2010-05-30 05:42:05 -05:00
|
|
|
|
|
|
|
Figures
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. _my-figure:
|
|
|
|
|
|
|
|
.. figure:: img.png
|
|
|
|
|
|
|
|
My caption of the figure
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2013-01-04 03:18:43 -06:00
|
|
|
My description paragraph of the figure.
|
|
|
|
|
|
|
|
Description paragraph is wraped with legend node.
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
|
|
|
|
Version markup
|
|
|
|
--------------
|
|
|
|
|
2009-02-21 10:17:21 -06:00
|
|
|
.. versionadded:: 0.6
|
2008-08-06 09:46:11 -05:00
|
|
|
Some funny **stuff**.
|
|
|
|
|
2009-02-21 10:17:21 -06:00
|
|
|
.. versionchanged:: 0.6
|
2008-08-06 10:13:42 -05:00
|
|
|
Even more funny stuff.
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2009-02-21 10:17:21 -06:00
|
|
|
.. deprecated:: 0.6
|
2008-08-06 09:46:11 -05:00
|
|
|
Boring stuff.
|
|
|
|
|
2013-01-06 03:05:49 -06:00
|
|
|
.. versionadded:: 1.2
|
|
|
|
|
|
|
|
First paragraph of versionadded.
|
|
|
|
|
|
|
|
.. versionchanged:: 1.2
|
|
|
|
First paragraph of versionchanged.
|
|
|
|
|
|
|
|
Second paragraph of versionchanged.
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2009-08-09 16:12:01 -05:00
|
|
|
Code blocks
|
|
|
|
-----------
|
|
|
|
|
|
|
|
.. code-block:: ruby
|
|
|
|
:linenos:
|
|
|
|
|
|
|
|
def ruby?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
Misc stuff
|
|
|
|
----------
|
|
|
|
|
2008-08-06 10:13:42 -05:00
|
|
|
Stuff [#]_
|
|
|
|
|
2008-10-25 10:54:34 -05:00
|
|
|
Reference lookup: [Ref1]_ (defined in another file).
|
|
|
|
|
2008-11-04 14:35:05 -06:00
|
|
|
.. seealso:: something, something else, something more
|
2008-08-06 09:46:11 -05:00
|
|
|
|
|
|
|
`Google <http://www.google.com>`_
|
|
|
|
For everything.
|
|
|
|
|
2009-01-04 15:00:40 -06:00
|
|
|
.. hlist::
|
|
|
|
:columns: 4
|
|
|
|
|
|
|
|
* This
|
|
|
|
* is
|
|
|
|
* a horizontal
|
|
|
|
* list
|
|
|
|
* with several
|
|
|
|
* items
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
.. rubric:: Side note
|
|
|
|
|
|
|
|
This is a side note.
|
|
|
|
|
2008-10-16 15:41:05 -05:00
|
|
|
This tests :CLASS:`role names in uppercase`.
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
.. centered:: LICENSE AGREEMENT
|
|
|
|
|
|
|
|
.. acks::
|
|
|
|
|
|
|
|
* Terry Pratchett
|
|
|
|
* J. R. R. Tolkien
|
|
|
|
* Monty Python
|
|
|
|
|
|
|
|
.. glossary::
|
2011-01-06 13:34:41 -06:00
|
|
|
:sorted:
|
2008-08-06 09:46:11 -05:00
|
|
|
|
|
|
|
boson
|
|
|
|
Particle with integer spin.
|
|
|
|
|
2011-01-06 13:34:41 -06:00
|
|
|
*fermion*
|
2008-08-06 09:46:11 -05:00
|
|
|
Particle with half-integer spin.
|
|
|
|
|
2011-01-06 13:34:41 -06:00
|
|
|
tauon
|
|
|
|
myon
|
|
|
|
electron
|
|
|
|
Examples for fermions.
|
|
|
|
|
|
|
|
über
|
|
|
|
Gewisse
|
|
|
|
|
|
|
|
änhlich
|
|
|
|
Dinge
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
.. productionlist::
|
2009-08-09 15:44:41 -05:00
|
|
|
try_stmt: `try1_stmt` | `try2_stmt`
|
2008-08-06 09:46:11 -05:00
|
|
|
try1_stmt: "try" ":" `suite`
|
|
|
|
: ("except" [`expression` ["," `target`]] ":" `suite`)+
|
|
|
|
: ["else" ":" `suite`]
|
|
|
|
: ["finally" ":" `suite`]
|
|
|
|
try2_stmt: "try" ":" `suite`
|
|
|
|
: "finally" ":" `suite`
|
|
|
|
|
|
|
|
|
|
|
|
Index markup
|
|
|
|
------------
|
|
|
|
|
|
|
|
.. index::
|
|
|
|
single: entry
|
|
|
|
pair: entry; pair
|
2009-12-30 06:13:57 -06:00
|
|
|
double: entry; double
|
2008-08-06 09:46:11 -05:00
|
|
|
triple: index; entry; triple
|
2008-11-30 14:06:07 -06:00
|
|
|
keyword: with
|
2011-01-07 12:00:29 -06:00
|
|
|
see: from; to
|
|
|
|
seealso: fromalso; toalso
|
2008-11-30 14:06:07 -06:00
|
|
|
|
|
|
|
Invalid index markup...
|
|
|
|
|
|
|
|
.. index::
|
|
|
|
single:
|
|
|
|
pair:
|
|
|
|
keyword:
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2011-01-07 12:00:29 -06:00
|
|
|
.. index::
|
|
|
|
!Main, !Other
|
|
|
|
!single: entry; pair
|
|
|
|
|
|
|
|
:index:`!Main`
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2010-05-26 12:51:09 -05:00
|
|
|
.. _ölabel:
|
|
|
|
|
2008-10-18 12:57:35 -05:00
|
|
|
Ö... Some strange characters
|
|
|
|
----------------------------
|
|
|
|
|
|
|
|
Testing öäü...
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
|
2009-02-19 14:56:34 -06:00
|
|
|
Only directive
|
|
|
|
--------------
|
|
|
|
|
|
|
|
.. only:: html
|
|
|
|
|
|
|
|
In HTML.
|
|
|
|
|
|
|
|
.. only:: latex
|
|
|
|
|
|
|
|
In LaTeX.
|
|
|
|
|
|
|
|
.. only:: html or latex
|
|
|
|
|
|
|
|
In both.
|
|
|
|
|
|
|
|
.. only:: confpytag and (testtag or nonexisting_tag)
|
|
|
|
|
|
|
|
Always present, because set through conf.py/command line.
|
|
|
|
|
|
|
|
|
2008-08-06 09:46:11 -05:00
|
|
|
.. rubric:: Footnotes
|
|
|
|
|
|
|
|
.. [#] Like footnotes.
|
2009-07-05 05:24:27 -05:00
|
|
|
|