X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=sample.md;h=57abf3d4bfc754328a0860222b81ec7bbfc60bc4;hb=a1d883fc5b7acbf45fdc80a7806b4d4c21fdcd1f;hp=6b4efe7f42819bf606360304c403dd52902d7286;hpb=2f79538642992aace2e319fbf679c8548a02f6eb;p=smdp.git diff --git a/sample.md b/sample.md index 6b4efe7..57abf3d 100644 --- a/sample.md +++ b/sample.md @@ -1,24 +1,171 @@ -%title: Sample Presentation -%author: Michael Göhler -%date: 2014-09-14 +%title: mdp - Sample Presentation +%author: visit1985 +%date: 2014-09-22 -mpd +mdp === -A command-line based presentation tool. +A command-line based markdown presentation tool. --------------------------------------------- +------------------------------------------------- -Here are some formating tests: +# Supported markdown formatting's -These are 3 stars: \*\*\* -And two backslashes: \\\\ +The input file is split into multiple slides by +horizontal rules (hr). A hr consisting of at +least 3 *\** or *-*. It can also contain spaces but +no other characters. -This text is _underlined_ and *highlighted*. +Each of these represents the start of a new slide -******************************************** +\* \* \* +\--- +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\- - - -# UTF-8 support +------------------------------------------------- + +# Supported markdown formatting's + +First-level headers can be prefixed by single *#* +or underlined by *===*. + +\# first-level + +becomes + +# first-level + +------------------------------------------------- + +# Supported markdown formatting's + +Second-level headers can be prefixed by *##* or +underlined by *---*. + +second-level +\------------ + +becomes + +second-level +------------ + + +------------------------------------------------- + +# Supported markdown formatting's + +Inline codes are surrounded with backticks. + +C program starts with \`main()\`. + +becomes + +C program starts with `main()`. + +------------------------------------------------- + +# Supported markdown formatting's + +Code blocks are automatically detected by 4 +spaces at the beginning of a line. + +Tabs are automatically expanded to 4 spaces +while parsing the input. + +\ int main(int argc, char \*argv[]) { +\ printf("%s\\n", "Hello world!"); +\ } + +becomes + + int main(int argc, char *argv[]) { + printf("%s\n", "Hello world!"); + } + +------------------------------------------------- + +# Supported markdown formatting's + +Quotes are auto-detected by preceding *>*. + +Multiple *>* are interpreted as nested quotes. + +\> quote +\>> nested quote 1 +\> > nested quote 2 + +becomes + +> quote +>> nested quote 1 +> > nested quote 2 + +------------------------------------------------- + +# Supported markdown formatting's + +Inline highlighting is supported as followed: + +\- *\** colors text as red +\- *\_* underlines text + +\_some\_ \*highlighted\* \_\*text\*\_ + +becomes + +_some_ *highlighted* _*text*_ + +------------------------------------------------- + +# Supported markdown formatting's + +Backslashes force special markdown characters +like *\**, *\_*, *#* and *>* to be printed as normal +characters. + +\\\*special\\\* + +becomes + +\*special\* + +------------------------------------------------- + +# Supported markdown formatting's + +Leading *\** or *-* indicate lists. + +TODO list +\* major 1 +\ \- minor 1.1 +\ \- detail 1.1.1 +\ \- detail 1.1.2 +\ \- minor 1.2 + +becomes + +TODO list +* major 1 + - minor 1.1 + - detail 1.1.1 + - detail 1.1.2 + - minor 1.2 + +------------------------------------------------- + +## More information about markdown + +can be found on + +_http://daringfireball.net/projects/markdown/_ + +------------------------------------------------- + +# Support for UTF-8 special characters + +Here are some examples. ae = ä, oe = ö, ue = ü, ss = ß upsilon = Ʊ, phi = ɸ @@ -27,25 +174,41 @@ upsilon = Ʊ, phi = ɸ ▌rectangle▐ ▙▄▄▄▄▄▄▄▄▄▟ -* * * -## Code examples +------------------------------------------------- - public static void main() { - - printf("%s\n", "hello"); - } +# Suspend your presentation for hands-on examples -Now with *different* indentation. +Use *Ctrl + z* to suspend the presentation. - function expand_tab { - printf("%s\n", "hello"); - } +Use *fg* to resume it. + +------------------------------------------------- + +# Convert your presentation to PDF + +To publish your presentation later on, you may +want to convert it to PDF. + +This can be achieved by two additional tools: + +\- *markdown* to convert to HTML +\- *wkhtmltopdf* to convert from HTML to PDF + +After installing them, you can simply type: + + $ markdown sample.md | wkhtmltopdf - sample.pdf + +------------------------------------------------- + +## Last words + +I hope you like *mdp*. But be aware, that it is +still in alpha status. -*** +If you observe strange behavior, feel free to +open an issue on GitHub: -The END -------- +_https://github.com/visit1985/mdp_ -My only friend, the end.