1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
Directives
----------
.. contents:: :local:
These are just a sample of the many reStructuredText Directives. For
others, please see http://docutils.sf.net/spec/rst/directives.html.
Document Parts
``````````````
An example of the "contents" directive can be seen above this section
(a local, untitled table of contents_) and at the beginning of the
document (a document-wide `table of contents`_).
Images
``````
An image directive:
.. image:: images/title.png
A figure directive:
.. figure:: images/title.png
:alt: reStructuredText, the markup syntax
A figure is an image with a caption and/or a legend:
+------------+-----------------------------------------------+
| re | Revised, revisited, based on 're' module. |
+------------+-----------------------------------------------+
| Structured | Structure-enhanced text, structuredtext. |
+------------+-----------------------------------------------+
| Text | Well it is, isn't it? |
+------------+-----------------------------------------------+
This paragraph is also part of the legend.
Admonitions
```````````
.. Attention:: Directives at large.
.. Caution::
Don't take any wooden nickels.
.. DANGER:: Mad scientist at work!
.. Error:: Does not compute.
.. Hint:: It's bigger than a bread box.
.. Important::
- Wash behind your ears.
- Clean up your room.
- Call your mother.
- Back up your data.
.. Note:: This is a note.
.. Tip:: 15% if the service is good.
.. WARNING:: Strong prose may provoke extreme mental exertion.
Reader discretion is strongly advised.
.. admonition:: And, by the way...
You can make up your own admonition too.
Topics, Sidebars, and Rubrics
`````````````````````````````
.. sidebar:: Sidebar Title
:subtitle: Optional Subtitle
This is a sidebar. It is for text outside the flow of the main
text.
.. rubric:: This is a rubric inside a sidebar
Sidebars often appears beside the main text with a border and
background color.
.. topic:: Topic Title
This is a topic.
.. rubric:: This is a rubric
Target Footnotes
````````````````
.. target-notes::
Line Blocks
```````````
Take it away, Eric the Orchestra Leader!
.. line-block::
A one, two, a one two three four
Half a bee, philosophically,
must, *ipso facto*, half not be.
But half the bee has got to be,
*vis a vis* its entity. D'you see?
But can a bee be said to be
or not to be an entire bee,
when half the bee is not a bee,
due to some ancient injury?
Singing...
Replacement Text
````````````````
I recommend you try |Python|_.
.. |Python| replace:: Python, *the* best language around
|