X-Git-Url: https://git.danieliu.xyz/?p=smdp.git;a=blobdiff_plain;f=sample.md;h=88bcd345bb57fe9bdc89231f8a9e86b3d098fa98;hp=6b4efe7f42819bf606360304c403dd52902d7286;hb=HEAD;hpb=2f79538642992aace2e319fbf679c8548a02f6eb diff --git a/sample.md b/sample.md index 6b4efe7..88bcd34 100644 --- a/sample.md +++ b/sample.md @@ -1,24 +1,287 @@ -%title: Sample Presentation -%author: Michael Göhler -%date: 2014-09-14 +%title: mdp - Sample Presentation +%author: visit1985 +%date: 2016-02-07 -mpd -=== +-> mdp <- +========= -A command-line based presentation tool. +-> A command-line based markdown presentation tool. <- --------------------------------------------- +_Basic controls:_ -Here are some formating tests: +next slide *Enter*, *Space*, *Page Down*, *j*, *l*, + *Down Arrow*, *Right Arrow* -These are 3 stars: \*\*\* -And two backslashes: \\\\ +previous slide *Backspace*, *Page Up*, *h*, *k*, + *Up Arrow*, *Left Arrow* -This text is _underlined_ and *highlighted*. +quit *q* +reload *r* +slide N *1..9* +first slide *Home*, *g* +last slide *End*, *G* -******************************************** +------------------------------------------------- -# UTF-8 support +-> # Supported markdown formatting <- + +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. + +Each of these represents the start of a new slide. + +\* \* \* +\--- +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\- - - + +------------------------------------------------- + +-> # Supported markdown formatting <- + +First-level headers can be prefixed by single *#* +or underlined by *===*. + +\# first-level + +becomes + +# first-level + +------------------------------------------------- + +-> # Supported markdown formatting <- + +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 <- + +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 <- + +You can also use [pandoc](https://pandoc.org/MANUAL.html#fenced-code-blocks)'s fenced code block +extension. Use at least three ~ chars to open and +at least as many or more ~ for closing. + +\~~~ {.numberLines} +\int main(int argc, char \*argv[]) { +\ printf("%s\\n", "Hello world!"); +\} +\~~~~~~~~~~~~~~~~~~ + +becomes + +~~~ {.numberLines} +int main(int argc, char *argv[]) { + printf("%s\n", "Hello world!"); +} +~~~~~~~~~~~~~~~~~~ + +Pandoc attributes (like ".numberlines" etc.) +will be ignored + +------------------------------------------------- + +-> # Supported markdown formatting <- + +You can also use [github](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) flavored markdown's +code block. Use at least three backticks to open +and at least as many or more backticks for closing. + +\``` +\int main(int argc, char \*argv[]) { +\ printf("%s\\n", "Hello world!"); +\} +\``` + +becomes + +``` +int main(int argc, char *argv[]) { + printf("%s\n", "Hello world!"); +} +``` + +Language hint will be ignored + +------------------------------------------------- + +-> # Supported markdown formatting <- + +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 <- + +Inline highlighting is supported as followed: + +\- *\** colors text as red +\- *\_* underlines text + +\_some\_ \*highlighted\* \_\*text\*\_ + +becomes + +_some_ *highlighted* _*text*_ + +------------------------------------------------- + +-> # Supported markdown formatting <- + +Backslashes force special markdown characters +like *\**, *\_*, *#* and *>* to be printed as +normal characters. + +\\\*special\\\* + +becomes + +\*special\* + +------------------------------------------------- + +-> # Supported markdown formatting <- + +Leading *\** or *-* indicate lists. + +list +\* major +\ - minor +\ - \*important\* +\ detail +\ - minor + +becomes + +list +* major + - minor + - *important* + detail + - minor + +------------------------------------------------- + +-> # Supported markdown formatting <- + +A single *\* or *^* in a line indicates mdp +to stop the output on that position. + +This can be used to show bullet points +line by line. + +*\* is also not displayed in HTML converted +output. + +Agenda +
+* major +
+ * minor +
+* major + ^ + * minor + ^ + * detail + +------------------------------------------------- + +-> # Supported markdown formatting <- + +Leading *->* indicates centering. + +\-> # test <- +\-> ## test <- +\-> test +\-> \_\*test\*\_ <- + +becomes + +-> # test <- +-> ## test <- +-> test +-> _*test*_ <- + +------------------------------------------------- + +-> # Supported markdown formatting <- + +URL in pandoc style are supported: + +\[Google](http://www.google.com/) + +becomes + +[Google](http://www.google.com/) + +------------------------------------------------- + +-> ## More information about markdown <- + +can be found in the [markdown documentation](http://daringfireball.net/projects/markdown/). + +------------------------------------------------- + +-> # Support for UTF-8 special characters <- + +Here are some examples. ae = ä, oe = ö, ue = ü, ss = ß upsilon = Ʊ, phi = ɸ @@ -27,25 +290,36 @@ 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 -*** +------------------------------------------------- -The END -------- +-> ## Last words <- -My only friend, the end. +I hope you like *mdp*. +If you observe strange behavior, feel free to +open an issue on [GitHub](https://github.com/visit1985/mdp).