sphinx/tests/root/markup.txt

259 lines
3.4 KiB
Plaintext
Raw Normal View History

:tocdepth: 2
.. title:: set by title directive
Testing various markup
======================
2009-08-09 15:44:41 -05:00
Meta markup
-----------
.. sectionauthor:: Georg Brandl
.. contents:: TOC
.. meta::
:author: Me
:keywords: docs, sphinx
2009-08-09 15:44:41 -05:00
Generic reST
------------
A |subst| (the definition is in rst_epilog).
2008-10-28 11:53:05 -05:00
.. _label:
::
some code
2009-08-09 15:44:41 -05:00
Option list:
2009-08-09 15:44:41 -05:00
-h help
--help also help
Body directives
2009-08-09 15:44:41 -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
2009-08-09 15:44:41 -05:00
Admonitions
^^^^^^^^^^^
.. admonition:: My Admonition
Admonition text.
.. note::
Note text.
.. warning::
Warning text.
.. tip::
Tip text.
Inline markup
-------------
*Generic inline markup*
* :command:`command`
* :dfn:`dfn`
* :guilabel:`guilabel`
* :kbd:`kbd`
* :mailheader:`mailheader`
* :makevar:`makevar`
* :manpage:`manpage`
* :mimetype:`mimetype`
* :newsgroup:`newsgroup`
* :program:`program`
* :regexp:`regexp`
2009-08-09 16:01:48 -05:00
* :menuselection:`File --> Close`
* :file:`a/{varpart}/b`
* :samp:`print {i}`
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>`
* :doc:`subdir/includes`
* ``:download:`` is tested in includes.txt
* :option:`Python -c option <python -c>`
2009-08-09 15:44:41 -05:00
Test :abbr:`abbr (abbreviation)` and another :abbr:`abbr (abbreviation)`.
2009-08-09 16:01:48 -05:00
.. _with:
With
----
(Empty section.)
Tables
------
.. tabularcolumns:: |L|p{5cm}|R|
+----+----------------+----+
| 1 | * Block elems | x |
| | * In table | |
+----+----------------+----+
| 2 | Empty cells: | |
+----+----------------+----+
Version markup
--------------
.. versionadded:: 0.6
Some funny **stuff**.
.. versionchanged:: 0.6
Even more funny stuff.
.. deprecated:: 0.6
Boring stuff.
Misc stuff
----------
Stuff [#]_
2008-10-25 10:54:34 -05:00
Reference lookup: [Ref1]_ (defined in another file).
.. seealso:: something, something else, something more
`Google <http://www.google.com>`_
For everything.
.. hlist::
:columns: 4
* This
* is
* a horizontal
* list
* with several
* items
.. rubric:: Side note
This is a side note.
2008-10-16 15:41:05 -05:00
This tests :CLASS:`role names in uppercase`.
.. centered:: LICENSE AGREEMENT
.. acks::
* Terry Pratchett
* J. R. R. Tolkien
* Monty Python
.. glossary::
boson
Particle with integer spin.
fermion
Particle with half-integer spin.
.. productionlist::
2009-08-09 15:44:41 -05:00
try_stmt: `try1_stmt` | `try2_stmt`
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
triple: index; entry; triple
keyword: with
Invalid index markup...
.. index::
single:
pair:
keyword:
2008-10-18 12:57:35 -05:00
Ö... Some strange characters
----------------------------
Testing öäü...
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.
.. rubric:: Footnotes
.. [#] Like footnotes.