-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path2010-01-11-153.html
More file actions
62 lines (60 loc) · 4.47 KB
/
2010-01-11-153.html
File metadata and controls
62 lines (60 loc) · 4.47 KB
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
---
layout: post
title: "能否突破 reST 表格语法的局限"
---
<h2>reST 表格的局限</h2>
reST, reStructuredText 是也。今天写了一条博文:<a href="/2010/01/11/143.html">《团队致胜之道——群英汇的解决方案》</a>。其中博文最后嵌入的表格,是用 reST 写的,然后用 DocBones 转换为 HTML。但是只能将表格的第一行设置为 Table Header,想同时将第一列也设置为表头格式,没有成功。
<span id="more-153"></span>
利用 reST 目前对表格的支持,写成如下的 reST 文本:
<pre style="font-family:宋体, Courier New,monospace; font-size:10pt; background: #f7f7f7; overflow:auto; white-space:pre;">
+-----------+--------------------+-----------------------------------------+
| | 个人 | 团队/组织 |
+===========+====================+=========================================+
| 文档 | 软件: FreeMind+ | 软件: FreeMind,DocBook,Markdown, |
| | | reST,DocBones |
| +--------------------+-----------------------------------------+
| | 关键词:脑图,XML | 关键词:单一格式多样输出;像写代码一样 |
| | | 写文档;协作;自动集成 |
+-----------+--------------------+-----------------------------------------+
| 知识管理 | 软件: 博客 | 软件: 维基+,博客+ |
| +--------------------+-----------------------------------------+
| | 关键词:积累, | 关键词:活的文档;语法简洁;面向条目; |
| | 个人营销 | 版本控制;协同编辑; |
+-----------+--------------------+-----------------------------------------+
| 沟通 | | 软件: 邮件列表+,IM+ |
| | +-----------------------------------------+
| | | 关键词:订阅;推至桌面;Web存档; |
+-----------+--------------------+-----------------------------------------+
| 配置管理 | 软件: Hg/Git, | 软件: Subversion+,Git+ |
| | TSVN | |
| +--------------------+-----------------------------------------+
| | 关键词: | 关键词:里程碑;分支管理;授权;协同; |
+-----------+--------------------+-----------------------------------------+
| 项目管理 | | 软件: Redmine+ |
| | +-----------------------------------------+
| | | 关键词:需求管理;缺陷跟踪;项目进度; |
| | | 每日进展; |
+-----------+--------------------+-----------------------------------------+
| 测试管理 | | 软件: Testlink+ |
| | +-----------------------------------------+
| | | 关键词:测试计划;测试用例;测试报告; |
+-----------+--------------------+-----------------------------------------+
| 持续集成 | | 软件: CC+ |
| | +-----------------------------------------+
| | | 关键词:每晚构建; |
+-----------+--------------------+-----------------------------------------+</pre>
该语法生成的表格,只有第一行作为表头。
<h2>能否突破 reST 表格的局限呢?</h2>
我觉得是否可以使用下面的语法更灵活的定义表头?
<pre style="font-family:宋体, Courier New,monospace; font-size:10pt; background: #f7f7f7; overflow:auto; white-space:pre;">
+------+------+------+------+
| TH0 | TH1 | TH2 | TH3 |
+======+======+======+======+
+ TH4 | cell | cell | TH5 |
+======|------+------+======+
+ TH6 | cell | cell | TH7 |
+======|------+------+======+
+ TH8 | cell | cell | TH9 |
+======|------+------+======+
</pre>
初步定位 DocUtils 的代码在文件: /usr/share/pyshared/docutils/writers/html4css1/__init__.py 中,等有时间看看。。。