reStructuredText Note

reStructuredText Note

转载自
http://docutils.sourceforge.net/docs/user/rst/quickref.html

Inline Markup


















Plain text
Typical result
Notes
emphasis
emphasis
Normally rendered as italics.

strong emphasis
strong emphasis
Normally rendered as boldface.

interpreted text
(see note at right)
The rendering and meaning of interpreted text is
domain- or application-dependent. It can be used for things
like index entries or explicit descriptive markup (like program
identifiers).

inline literal
inline literal
Normally rendered as monospaced text. Spaces should be
preserved, but line breaks will not be.

reference
reference
A simple, one-word hyperlink reference. See Hyperlink Targets.

phrase reference
phrase reference
A hyperlink reference with spaces or punctuation needs to be
quoted with backquotes. See Hyperlink Targets.

anonymous_
anonymous
With two underscores instead of one, both simple and phrase
references may be anonymous (the reference text is not repeated
at the target). See Hyperlink Targets.

inline internal target
inline internal target
A crossreference target within text.
See Hyperlink Targets.

|substitution reference|
(see note at right)
The result is substituted in from the substitution
definition
. It could be text, an image, a hyperlink, or a
combination of these and others.

footnote reference [1]
footnote reference 1
See Footnotes.

citation reference [CIT2002]
citation reference [CIT2002]
See Citations.

http://docutils.sf.net/
http://docutils.sf.net/
A standalone hyperlink.

分隔符(delimiter)

  • start-string 后不能有空格
  • end-string 前不能有空格






Plain text
Typical result

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, indented relative to the

  term. Blank lines are not allowed

  between term and definition.
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, indented relative to the
term. Blank lines are not allowed
between term and definition.








Plain text
Typical result

:Authors:

    Tony J. (Tibs) Ibbs,

    David Goodger

    (and sundry other good-natured folks)

:Version: 1.0 of 2001/08/08

:Dedication: To my father.




Authors:
Tony J. (Tibs) Ibbs,
David Goodger
(and sundry other good-natured folks)
Version:1.0 of 2001/08/08
Dedication:To my father.

Explicit Markup

Footnotes

1
2
3
4
5
6
7
Footnote references, like [5]_.
Note that footnotes may get
rearranged, e.g., to the bottom of
the "page".
.. [5] A numerical footnote. Note
there's no colon after the ``]``.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Footnote references, like 5. Note that footnotes may get rearranged, e.g., to the bottom of the "page".
[5] A numerical footnote. Note there's no colon after the ].
Autonumbered footnotes are
possible, like using [#]_ and [#]_.
.. [#] This is the first one.
.. [#] This is the second one.
They may be assigned 'autonumber
labels' - for instance,
[#fourth]_ and [#third]_.
.. [#third] a.k.a. third_
.. [#fourth] a.k.a. fourth_
1
2
3
4
5
Auto-symbol footnotes are also
possible, like this: [*]_ and [*]_.
.. [*] This is the first one.
.. [*] This is the second one.

Citations

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Citation references, like [CIT2002]_.
Note that citations may get
rearranged, e.g., to the bottom of
the "page".
.. [CIT2002] A citation
(as often used in journals).
Citation labels contain alphanumerics,
underlines, hyphens and fullstops.
Case is not significant.
Given a citation like [this]_, one
can also refer to it like this_.
.. [this] here.
1
2
3
External hyperlinks, like Python_.
.. _Python: http://www.python.org/
1
2
External hyperlinks, like `Python
<http://www.python.org/>`_.
1
2
3
4
5
Internal crossreferences, like example_.
.. _example:
This is an example crossreference target.
1
2
3
4
5
6
Python_ is `my favourite
programming language`__.
.. _Python: http://www.python.org/
__ Python_

Example

1
2
3
4
5
6
7
8
9
10
Please reference the procedures of `section 4.3.1`_ to create AS2 Plus partnership.
__ 4.3.1_
----------------------------
.. _4.3.1:
4.3.1. Creating AS2 Partnership
"""""""""""""""""""""""""""""""

添加高亮语法(注意对齐)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.. codeblock:: xml
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="hk.hku.cecid.edi.as2"
name="Corvus AS2 Plugin"
version="1.0.1"
provider-name="hk.hku.cecid"
class="hk.hku.cecid.edi.as2.AS2Processor"
>
<parameters>
<parameter name="module-group-descriptor" value="hk/hku/cecid/edi/as2/conf/as2.module-group.xml"/>
</parameters>
...
</plugin>

添加图片

1
.. image:: _static/image/2-overview-1.jpeg