20. sphinx模板

20.1. 一级标题

20.1.1. 二级标题

三级标题

个人的写作习惯,习惯把三级标题用斜体表示

20.1.2. 段落

REST 是松散的文本结构,使用预定义的模式描述文章的结构。首先学习最基本的结构:段落。 段落是被空行分割的文字片段,左侧必须对齐(没有空格,或者有相同多的空格)。

段落还可以进行缩进;
REST 是松散的文本结构,使用预定义的模式描述文章的结构。首先学习最基本的结构:段落。 段落是被空行分割的文字片段,左侧必须对齐(没有空格,或者有相同多的空格)。

段落还可以进行缩进;

REST 是松散的文本结构,使用预定义的模式描述文章的结构。首先学习最基本的结构:段落。 段落是被空行分割的文字片段,左侧必须对齐(没有空格,或者有相同多的空格)。

超链接 超链接

单星号: 文本 强调 (斜体 对中文一般效果不好)

双星号: 文本 加重 (加黑)

反引号: 文本 代码引用

代码

a={1: 2, 3: 4}
pprint.pprint(a)

{1: 2, 3: 4}

20.2. 列表和引用块

只要自然的在段落的开始放置一个星号并正确缩进. 这同样适用于带编号的列表; 也可以使用``#``签署自动编号:

  • This is a bulleted list.
  • It has two items, the second item uses two lines.
  1. This is a numbered list.
  2. It has two items too.
    1. This is a numbered list.
    2. It has two items too.
  3. End.

嵌套的列表是允许的但必须用空行同父列表分离开:

  • this is
  • a list
    • with a nested list
    • and some subitems
  • and here the parent list continues

创建引用段落 (参考)只需要用缩进和其它段落区分即可.

线块 (ref) 是保留换行符的一种方法:

These lines are
broken exactly like in
the source file.

20.3. 表格

20.3.1. 简单表

Header row, column 1 (header rows optional) Header 2 Header 3 Header 4
body row 1, column 1 column 2 column 3 column 4
body row 2  

20.3.2. 网格表

A B A and B
False False False
True False False
False True False
True True True

20.3.3. CSV表格

Frozen Delights!
Treat Quantity Description
Albatross 2.99 On a stick!
Crunchy Frog 1.49 If we took the bones out, it wouldn’t be crunchy, now would it?
Gannet Ripple 1.99 On a stick!

20.3.4. 列表表格

Frozen Delights!
Treat Quantity Description
Albatross 2.99 On a stick!
Crunchy Frog 1.49 If we took the bones out, it wouldn’t be crunchy, now would it?
Gannet Ripple 1.99 On a stick!

20.3.5. Section to cross-reference

This is the text of the section.

It refers to the section itself, see Section to cross-reference.


[1]“Hello, world”最为程序员所熟知,2002年申请不到helloworld相关域名便退而求其次,申请了 worldhello.net。
[2]http://liquidmarkup.org/
[3]https://github.com/mojombo/jekyll/wiki/configuration
[4]http://docutils-zh-cn.readthedocs.io/zh_CN/latest/index.html#