|
|
Simple Document Marking Language
Simple Document Marking Language (SDML, a tentative name),
is a simple marking up language developed for writing documentation for Dao.
SDML uses simple syntax to specify the elements of a document,
which can be then converted to a Latex document (then PDF) or
a HTML document.
SDML is also the basic format used to prepare the website content
of daovm.net .
Basic elements of SDML:
- Document title: <title> example </title> ;
One can optional use the followings, which have effects (currently)
only when the document is converted to Latex document, to set the type
of document.
- <article> example </article> ;
- <report> example </report> ;
- <book> example </book> ;
- Author name: <author> somebody </author> ;
- Chapter or section name: <===>section</===> ;
There can be one or more = marks in the tag.
The nesting level is corresponding to the length of the tag.
- Font: bold, <bf>text</bf> ; italic, <it>text</it> ;
- Link: <link>text=url</link> ;
In the case that this format is used on the Dao website,
if url contains only letters, digits and underscore mark,
url is interpreted as a named web page,
otherwise it is interpreted as a HTTP URL.
<link>Dao Documentations=document</link>
<link>daovm.net=http://www.daovm.net</link>
Dao Documentations
daovm.net
- Image: <image>name</image> ;
In the case that this format is used on the Dao website,
if url contains only letters, digits and underscore mark,
url is interpreted as a named image (uploaded image),
otherwise it is interpreted as the HTTP URL of an image.
<image>Test</image>
<image>images/calendar_cell.png</image>
<image>http://daovm.net/images/calendar_cell.png</image>
- List: <list>items</list> ;
Use == (for ordered list) or -- (for un-ordered list)
to list the items.
Ordered list:
<list>
== item1
== item2
</list>
This will give:
- item1
- item2
Un-ordered list:
<list>
-- item1
-- item2
</list>
This will give:
- Table: <table>cells</table> ;
^ can be to mark the headers of a table;
| to define the cells of a table;
and === can be use to mark a row break.
<table>
^ Header1 ^ Header2 ^
| Cell11 | Cell12 |
===
| Cell21 | Cell22 |
| Cell31 | Cell32 |
</table>
This will give:
| Header1 | Header2 |
| Cell11 | Cell12 |
| |
| Cell21 | Cell22 |
| Cell31 | Cell32 |
The row of headers is optional.
- Text citing: <cite>text</cite> ;
text
- Source code highlighting: <code lang>source</code> ;
At this moment, lang can be dao , cpp ,
bnf or sdml , other languages will be supported
in the future.
<code dao>
stdio.println( 'hello world!' );
</code>
This will give:
stdio.println( 'hello world!' );
view count 523 times
created at 2009-03-02, 09:44 GMT modified at 2009-03-02, 11:14 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 |
30 |
31 |
fu: Many thanks
(Jul.04,04:29)
klabim: fixed
Hi,
great, now my test works now :- ). (Jun.30,17:51)
|