Added support for pandoc's fenced code blocks
[smdp.git] / sample.md
1 %title: mdp - Sample Presentation
2 %author: visit1985
3 %date: 2014-09-22
4
5 -> mdp <-
6 =========
7
8 -> A command-line based markdown presentation tool. <-
9
10 _Basic controls:_
11
12 next slide      *Enter*, *Space*, *Page Down*, *j*, *l*,
13                 *Down Arrow*, *Right Arrow*
14
15 previous slide  *Backspace*, *Page Up*, *h*, *k*,
16                 *Up Arrow*, *Left Arrow*
17
18 quit            *q*
19 reload          *r*
20 slide N         *1..9*
21 first slide     *Home*, *g*
22 last slide      *End*, *G*
23
24 -------------------------------------------------
25
26 -> # Supported markdown formatting <-
27
28 The input file is split into multiple slides by
29 horizontal rules (hr). A hr consisting of at
30 least 3 *\** or *-*. It can also contain spaces but
31 no other characters.
32
33 Each of these represents the start of a new slide.
34
35 \* \* \*
36 \---
37 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
38 \- - -
39
40 -------------------------------------------------
41
42 -> # Supported markdown formatting <-
43
44 First-level headers can be prefixed by single *#*
45 or underlined by *===*.
46
47 \# first-level
48
49 becomes
50
51 # first-level
52
53 -------------------------------------------------
54
55 -> # Supported markdown formatting <-
56
57 Second-level headers can be prefixed by *##* or
58 underlined by *---*.
59
60 second-level
61 \------------
62
63 becomes
64
65 second-level
66 ------------
67
68
69 -------------------------------------------------
70
71 -> # Supported markdown formatting's <-
72
73 Inline codes are surrounded with backticks.
74
75 C program starts with \`main()\`.
76
77 becomes
78
79 C program starts with `main()`.
80
81 -------------------------------------------------
82
83 -> # Supported markdown formatting <-
84
85 Code blocks are automatically detected by 4
86 spaces at the beginning of a line.
87
88 Tabs are automatically expanded to 4 spaces
89 while parsing the input.
90
91 \    int main(int argc, char \*argv[]) {
92 \        printf("%s\\n", "Hello world!");
93 \    }
94
95 becomes
96
97     int main(int argc, char *argv[]) {
98         printf("%s\n", "Hello world!");
99     }
100
101 -------------------------------------------------
102
103 -> # Supported markdown formatting <-
104
105 You can also use [pandoc](http://pandoc.org/demo/example9/pandocs-markdown.html)'s fenced code block extension.
106 Use at least three ~ chars to open and at least as many or 
107 more ~ for closing.
108
109 ~~~~~
110 ~~~
111 int main(int argc, char \*argv[]) {
112     printf("%s\\n", "Hello world!");
113 }
114 ~~~
115 ~~~~~~~
116
117 becomes
118
119 ~~~
120 int main(int argc, char \*argv[]) {
121     printf("%s\\n", "Hello world!");
122 }
123 ~~~
124
125 Pandoc attributes (like ".numberlines" etc.) will be ignored
126
127 -------------------------------------------------
128
129 -> # Supported markdown formatting <-
130
131 Quotes are auto-detected by preceding *>*.
132
133 Multiple *>* are interpreted as nested quotes.
134
135 \> quote
136 \>> nested quote 1
137 \> > nested quote 2
138
139 becomes
140
141 > quote
142 >> nested quote 1
143 > > nested quote 2
144
145 -------------------------------------------------
146
147 -> # Supported markdown formatting <-
148
149 Inline highlighting is supported as followed:
150
151 \- *\** colors text as red
152 \- *\_* underlines text
153
154 \_some\_ \*highlighted\* \_\*text\*\_
155
156 becomes
157
158 _some_ *highlighted* _*text*_
159
160 -------------------------------------------------
161
162 -> # Supported markdown formatting <-
163
164 Backslashes force special markdown characters
165 like *\**, *\_*, *#* and *>* to be printed as normal
166 characters.
167
168 \\\*special\\\*
169
170 becomes
171
172 \*special\*
173
174 -------------------------------------------------
175
176 -> # Supported markdown formatting <-
177
178 Leading *\** or *-* indicate lists.
179
180 list
181 \* major
182 \    - minor
183 \        - \*important\*
184 \          detail
185 \    - minor
186
187 becomes
188
189 list
190 * major
191     - minor
192         - *important*
193           detail
194     - minor
195
196 -------------------------------------------------
197
198 -> # Supported markdown formatting <-
199
200 A single *\<br\>* or *^* in a line indicates mdp
201 to stop the output on that position.
202
203 This can be used to show bullet points
204 line by line.
205
206 *\<br\>* is also not displayed in HTML converted
207 output.
208
209 Agenda
210 <br>
211 * major
212 <br>
213     * minor
214 <br>
215 * major
216   ^
217     * minor
218       ^
219         * detail
220
221 -------------------------------------------------
222
223 -> # Supported markdown formatting <-
224
225 Leading *->* indicates centering.
226
227 \-> # test <-
228 \-> ## test <-
229 \-> test
230 \-> \_\*test\*\_ <-
231
232 becomes
233
234 -> # test <-
235 -> ## test <-
236 -> test
237 -> _*test*_ <-
238
239 -------------------------------------------------
240
241 -> # Supported markdown formatting <-
242
243 URL in pandoc style are supported:
244
245 \[Google](http://www.google.com/)
246
247 becomes
248
249 [Google](http://www.google.com/)
250
251 -------------------------------------------------
252
253 -> ## More information about markdown <-
254
255 can be found in the [markdown documentation](http://daringfireball.net/projects/markdown/).
256
257 -------------------------------------------------
258
259 -> # Support for UTF-8 special characters <-
260
261 Here are some examples.
262
263 ae = ä, oe = ö, ue = ü, ss = ß
264 upsilon = Ʊ, phi = ɸ
265
266 ▛▀▀▀▀▀▀▀▀▀▜
267 ▌rectangle▐
268 ▙▄▄▄▄▄▄▄▄▄▟
269
270
271 -------------------------------------------------
272
273 -> # Suspend your presentation for hands-on examples <-
274
275 Use *Ctrl + z* to suspend the presentation.
276
277 Use *fg* to resume it.
278
279 -------------------------------------------------
280
281 -> # Convert your presentation to PDF <-
282
283 To publish your presentation later on, you may
284 want to convert it to PDF.
285
286 This can be achieved by two additional tools:
287
288 \- *markdown* to convert to HTML
289 \- *wkhtmltopdf* to convert from HTML to PDF
290
291 After installing them, you can simply type:
292
293     $ markdown sample.md | wkhtmltopdf - sample.pdf
294
295 -------------------------------------------------
296
297 -> ## Last words <-
298
299 I hope you like *mdp*. But be aware that it is
300 still in alpha status.
301
302 If you observe strange behavior, feel free to
303 open an issue on [GitHub](https://github.com/visit1985/mdp).