diff --git a/applications/examples/static/markmin.html b/applications/examples/static/markmin.html index 7919434a..a469be15 100644 --- a/applications/examples/static/markmin.html +++ b/applications/examples/static/markmin.html @@ -25,14 +25,9 @@ print markmin2html(m) from markmin2latex import markmin2latex print markmin2latex(m) from markmin2pdf import markmin2pdf # requires pdflatex -print markmin2pdf(m) ====================
This is a blockquote with a list with tables in it:
This is a paragraph before list. You can continue paragraph on the next lines.
This is an ordered list with tables:
- Item 1
- Item 2
aa bb cc 11 22 33 - Item 4
T1 T2 t3 aaa bbb ccc ddd fff ggg 123 0 5.0
This this a new paragraph with a table. Table has header, footer, sections, odd and even rows:
| Title 1 | Title 2 | Title 3 |
| data 1 | data 2 | 2.00 |
| data 3 | data4(long) | 23.00 |
| data 5 | 33.50 | |
| New section | New data | 5.00 |
| data 1 | data2(long) | 100.45 |
| data 3 | 12.50 | |
| data 4 | data 5 | .33 |
| data 6 | data7(long) | 8.01 |
| data 8 | 514 | |
| Total: | 9 items | 698,79 |
Now lists can be multilevel:
Ordered item 1 of sublevel 2 with a paragraph (paragraph can start with point after plus or minus characters, e.g. ++. or --.)
This is another item. But with 3 paragraphs, blockquote and sublists:
This is the second paragraph in the item. You can add paragraphs to an item, using point notation, where first characters in the string are sequence of points with space between them and another string. For example, this paragraph (in sublevel 2) starts with two points:
.. This is the second paragraph...this is a blockquote in a list
You can use blockquote with headers, paragraphs, tables and lists in it:
Tables can have or have not header and footer. This table is defined without any header and footer in it:
red fox 0 blue dolphin 1000 green leaf 10000
This is yet another paragraph in the item.
and this is a paragraph in sublevel 4
This is a new item with paragraph in sublevel 3.
line 1
- line 2
- line 3Yet another item with code block:
line 1
-line 2
- line 3 This item finishes with this paragraph.Item in sublevel 3 can be continued with paragraphs.
this is another
-code block
- in the
- sublevel 3 itemThis is a continuous paragraph for item 2 in sublevel 2. You can use such structure to create difficult structured documents.
Single paragraph with '----' in it will be turned into separator:
And this is the last paragraph in the test. Be happy!
====================
We wanted a markup language with the following requirements:
(results depend on text but in average for text ~100K markmin is 30% faster than markdown, for text ~10K it is 10x faster)
The web2py book published by lulu, for example, was entirely generated with markmin2pdf from the online web2py wiki
markmin2html.py and markmin2latex.py are single files and have no web2py dependence. Their license is BSD.
| SOURCE | OUTPUT |
# title | title |
## section | section |
### subsection | subsection |
**bold** | bold |
''italic'' | italic |
~~strikeout~~ | |
``verbatim`` | verbatim |
``color with **bold**``:red | color with bold |
``many colors``:color[blue:#ffff00] | many colors |
http://google.com | http://google.com |
[[**click** me #myanchor]] | click me |
[[click me [extra info] #myanchor popup]] | click me |
The format is always [[title link]] or [[title [extra] link]]. Notice you can nest bold, italic, strikeout and code inside the link title.
You can place an anchor anywhere in the text using the syntax [[name]] where name is the name of the anchor. You can then link the anchor with link, i.e. [[link #myanchor]] or link with an extra info, i.e. [[link with an extra info [extra info] #myanchor]].
This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code
[[alt-string for the image [the image title] http://www.web2py.com/examples/static/web2py_logo.png right 200px]].
- Dog
+print markmin2pdf(m)
+
+We wanted a markup language with the following requirements:
(results depend on text but in average for text ~100K markmin is 30% faster than markdown, for text ~10K it is 10x faster)
The web2py book published by lulu, for example, was entirely generated with markmin2pdf from the online web2py wiki
markmin2html.py and markmin2latex.py are single files and have no web2py dependence. Their license is BSD.
| SOURCE | OUTPUT |
# title | title |
## section | section |
### subsection | subsection |
**bold** | bold |
''italic'' | italic |
~~strikeout~~ | |
``verbatim`` | verbatim |
``color with **bold**``:red | color with bold |
``many colors``:color[blue:#ffff00] | many colors |
http://google.com | http://google.com |
[[**click** me #myanchor]] | click me |
[[click me [extra info] #myanchor popup]] | click me |
The format is always [[title link]] or [[title [extra] link]]. Notice you can nest bold, italic, strikeout and code inside the link title.
You can place an anchor anywhere in the text using the syntax [[name]] where name is the name of the anchor. You can then link the anchor with link, i.e. [[link #myanchor]] or link with an extra info, i.e. [[link with an extra info [extra info] #myanchor]].
This paragraph has an image aligned to the right with a width of 200px. Its is placed using the code
[[alt-string for the image [the image title] http://www.web2py.com/examples/static/web2py_logo.png right 200px]].
- Dog
- Cat
- Mouseis rendered as
Two new lines between items break the list in two lists.
+ Dog
+ Cat
@@ -85,6 +80,15 @@ markmin2html(text,{'latex':lambda code: LATEX % code.replace('"','\"')})<
<html><body>example</body></html>
``:code[html]Citations are treated as internal links in html and proper citations in latex if there is a final section called "References". Items like
- [[key]] valuein the References will be translated into Latex
\bibitem{key} valueHere is an example of usage:
As shown in Ref.``mdipierro``:cite
+This is a test block with new features:
This is a blockquote with a list with tables in it:
This is a paragraph before list. You can continue paragraph on the next lines.
This is an ordered list with tables:- Item 1
- Item 2
aa bb cc 11 22 33
- Item 4
T1 T2 t3 aaa bbb ccc ddd fff ggg 123 0 5.0
This this a new paragraph with a table. Table has header, footer, sections, odd and even rows:
Title 1 Title 2 Title 3 data 1 data 2 2.00 data 3 data4(long) 23.00 data 5 33.50 New section New data 5.00 data 1 data2(long) 100.45 data 3 12.50 data 4 data 5 .33 data 6 data7(long) 8.01 data 8 514 Total: 9 items 698,79
Multilevel lists
Now lists can be multilevel:
- Ordered item 1 on level 1. You can continue item text on next strings
Ordered item 1 of sublevel 2 with a paragraph (paragraph can start with point after plus or minus characters, e.g. ++. or --.)
This is another item. But with 3 paragraphs, blockquote and sublists:
This is the second paragraph in the item. You can add paragraphs to an item, using point notation, where first characters in the string are sequence of points with space between them and another string. For example, this paragraph (in sublevel 2) starts with two points:
.. This is the second paragraph...this is a blockquote in a list
You can use blockquote with headers, paragraphs, tables and lists in it:
Tables can have or have not header and footer. This table is defined without any header and footer in it:red fox 0 blue dolphin 1000 green leaf 10000
This is yet another paragraph in the item.
- This is an item of unordered list (sublevel 3)
- This is the second item of the unordered list (sublevel 3)
- This is a single item of ordered list in sublevel 6
and this is a paragraph in sublevel 4
This is a new item with paragraph in sublevel 3.
- Start ordered list in sublevel 4 with code block:
line 1
+ line 2
+ line 3
Yet another item with code block:
line 1
+line 2
+ line 3
This item finishes with this paragraph.
Item in sublevel 3 can be continued with paragraphs.
this is another
+code block
+ in the
+ sublevel 3 item
- The last item in sublevel 3
This is a continuous paragraph for item 2 in sublevel 2. You can use such structure to create difficult structured documents.
- item 3 in sublevel 2
- item 1 in sublevel 2 (new unordered list)
- item 2 in sublevel 2
- item 3 in sublevel 2
- item 1 in sublevel 2 (new ordered list)
- item 2 in sublevel 2
- item 3 in sublevle 2
item 2 in level 1 item 3 in level 1 - new unordered list (item 1 in level 1)
- level 2 in level 1
- level 3 in level 1
- level 4 in level 1
This is the last section of the test
Single paragraph with '----' in it will be turned into separator:
And this is the last paragraph in the test. Be happy!
+
## References
- [[mdipierro]] web2py Manual, 5th Edition, lulu.com<ul/>, <ol/>, <code/>, <table/>, <blockquote/>, <h1/>, ..., <h6/> do not have <p>...</p> around them.