|
|
简单文档标记语言
简单文档标记语言(暂用名,Simple Document Marking Language,SDML),
是一种在准备道语言文档和网站过程中开发的简单标记语言。
用此语言写的文档可以方便地转换到HTML或TEX文档。
此语言目前主要用于开发道语言文档和道网站内容。
基本标记元素:
- 文档标题: <title> example </title> ;
下列标记也可用于文档标题,不过,目前它们只在转换到LATEX文档时有效,
并与LATEX的文档类相对应:
- <article> example </article> ;
- <report> example </report> ;
- <book> example </book> ;
- 作者姓名: <author> somebody </author> ;
- 章节名称: <===>section</===> ;
标记里可含一个或多个等号,等号的多少将觉得章节的嵌套层次。
- 字体:粗体 <bf>text</bf> ; 斜体 <it>text</it> ;
- 链接: <link>text=url</link> ;
当文档被用作网站内容时,如果 url 只含有字母数字和下划线,
那么, url 将被当作网站上的一个命名页面;
否则,被认为是一个普通的HTTP URL。
<link>Dao Documentations=document</link>
<link>daovm.net=http://www.daovm.net</link>
Dao Documentations
daovm.net
- 图片: <image>name</image> ;
当文档被用作网站内容时,如果 url 只含有字母数字和下划线,
那么, url 将被当作网站上的一个命名图片;
否则,被认为是一个由HTTP URL指向的图片。
<image>Test</image>
<image>images/calendar_cell.png</image>
<image>http://daovm.net/images/calendar_cell.png</image>
- 列项: <list>items</list> ;
有序号的列项,其单项用 == 表示;无序号的用 -- 。
有序号的列项:
<list>
== item1
== item2
</list>
结果,
- item1
- item2
无序号的列项:
<list>
-- item1
-- item2
</list>
结果,
- 表单: <table>cells</table> ;
用 ^ 表示表单头;
用 | 分割表单格;
用 === 增加表单行分割。
<table>
^ Header1 ^ Header2 ^
| Cell11 | Cell12 |
===
| Cell21 | Cell22 |
| Cell31 | Cell32 |
</table>
结果,
| Header1 | Header2 |
| Cell11 | Cell12 |
| |
| Cell21 | Cell22 |
| Cell31 | Cell32 |
The row of headers is optional.
- 文本引用: <cite>text</cite> ;
text
- 代码语法增亮: <code lang>source</code> ;
目前, lang 可以是 dao , cpp ,
bnf 或 sdml 。将来也将支持其他语言。
<code dao>
stdio.println( 'hello world!' );
</code>
结果,
stdio.println( 'hello world!' );
view count 703 times
created at 2009-03-02, 10:51 GMT modified at 2009-03-02, 11:13 GMT
|
| | | 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 |
fu: ...
I forgot to say something about the plan for the whole new year in my previous reply. Well, besides w ... (Jan.19,01:40)
fu: ...
Happy new dragon year (which will start from this sunday)!
Actually, it was a busy month (I wish th ... (Jan.18,22:46)
|