2010-02-23 00:51:27| 分类: reStructuredText | 标签: |举报 |字号大中小 订阅
段落 :是以空行分隔的一块文字.段落必须有一样的缩进,否则出错.
在一个段落或一块文本中,可以增加一些标记,标记是以空格来分隔的.
斜体 :标记*斜体*
粗体 :标记**粗体**
这两个标记称为内嵌标记.
固定宽度的文本:标记为``double back-quotes``
要在文本中输入*,可用有三种方法:1)前后没有空格直接输入*;2)使用转义*;3)使用
列表有三种形式: enumerated , bulleted 与 definitions .在所有列表形式中,你可以拥有多个段落与子列表等.
行以数字或字母开头,后面跟随"."或")";也可以是外面加"()".如下所示:
upper-case letters and it goes over many lines
with two paragraphs and all!
bulleted列表
行以字符"-","+"或"*"开头,如:
* a bullet point using "*"
- a sub-list using "-"
+ yet another sub-list- another item
结果如下:
- a bullet point using "*"
- a sub-list using "-"
- yet another sub-list
- another item
definition列表
不象前两种列表,definition列表由term组成.如下:
- what
- Definition lists associate a term with a definition.
- *how*
- The term is a on
e-line phrase, and the definition is on e or more paragraphs or body elements, indented relative to the term. Blank lines are not allowed between term and 结果如下:
- what
- Definition lists associate a term with a definition.
- how
- The term is a on
e-line phrase, and the definition is on e or more paragraphs or body elements, indented relative to the term. Blank lines are not allowed between term and
为了包含一块预定格式,不需另加变动的文本,请在前一段落的结尾处有"::",预定格式块当遇到更高级别的缩进时结束.如下:
Whitespace, newlines, blank lines, and all kinds of markup (like *this* or \this) is preserved by literal blocks. Lookie here, I've dropped an indentation level (but not far enough) no more example
结果为:
Whitespace, newlines, blank lines, and all kinds of markup (like *this* or \this) is preserved by literal blocks. Lookie here, I've dropped an indentation level (but not far enough) no more example
如果一个段落只包含"::",则在输出直接删除了::
为了将一长段文本分成多个节,你可以使用 section headers. 使用节时前面不能有缩进,否则出错.如下:
Chapter 1 Title =============== Section 1.1 Title ----------------- Subsection 1.1.1 Title ~~~~~~~~~~~~~~~~~~~~~~ Section 1.2 Title -----------------
效果如下:
为了在文档中加入图象,可以使用image directive.如下:
.. image:: images/biohazard.png
为了更精确的控制还可以如下:
.. image:: images/biohazzad.png :height: 100 :width: 200 :scale: 50 :alt: alternate text
评论