color config for code blocks
[smdp.git] / sample.md
1 %title: mdp - Sample Presentation
2 %author: visit1985
3 %date: 2016-02-07
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 spaces
86 at the beginning of a line.
87
88 Tabs are automatically expanded to 4 spaces while
89 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](https://pandoc.org/MANUAL.html#fenced-code-blocks)'s fenced code block
106 extension. Use at least three ~ chars to open and
107 at least as many or more ~ for closing.
108
109 \~~~ {.numberLines}
110 \int main(int argc, char \*argv[]) {
111 \    printf("%s\\n", "Hello world!");
112 \}
113 \~~~~~~~~~~~~~~~~~~
114
115 becomes
116
117 ~~~ {.numberLines}
118 int main(int argc, char *argv[]) {
119     printf("%s\n", "Hello world!");
120 }
121 ~~~~~~~~~~~~~~~~~~
122
123 Pandoc attributes (like ".numberlines" etc.)
124 will be ignored
125
126 -------------------------------------------------
127
128 -> # Supported markdown formatting <-
129
130 You can also use [github](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) flavored markdown's
131 code block. Use at least three backticks to open
132 and at least as many or more backticks for closing.
133
134 \```
135 \int main(int argc, char \*argv[]) {
136 \    printf("%s\\n", "Hello world!");
137 \}
138 \```
139
140 becomes
141
142 ```
143 int main(int argc, char *argv[]) {
144     printf("%s\n", "Hello world!");
145 }
146 ```
147
148 Language hint will be ignored
149
150 -------------------------------------------------
151
152 -> # Supported markdown formatting <-
153
154 Quotes are auto-detected by preceding *>*.
155
156 Multiple *>* are interpreted as nested quotes.
157
158 \> quote
159 \>> nested quote 1
160 \> > nested quote 2
161
162 becomes
163
164 > quote
165 >> nested quote 1
166 > > nested quote 2
167
168 -------------------------------------------------
169
170 -> # Supported markdown formatting <-
171
172 Inline highlighting is supported as followed:
173
174 \- *\** colors text as red
175 \- *\_* underlines text
176
177 \_some\_ \*highlighted\* \_\*text\*\_
178
179 becomes
180
181 _some_ *highlighted* _*text*_
182
183 -------------------------------------------------
184
185 -> # Supported markdown formatting <-
186
187 Backslashes force special markdown characters
188 like *\**, *\_*, *#* and *>* to be printed as
189 normal characters.
190
191 \\\*special\\\*
192
193 becomes
194
195 \*special\*
196
197 -------------------------------------------------
198
199 -> # Supported markdown formatting <-
200
201 Leading *\** or *-* indicate lists.
202
203 list
204 \* major
205 \    - minor
206 \        - \*important\*
207 \          detail
208 \    - minor
209
210 becomes
211
212 list
213 * major
214     - minor
215         - *important*
216           detail
217     - minor
218
219 -------------------------------------------------
220
221 -> # Supported markdown formatting <-
222
223 A single *\<br\>* or *^* in a line indicates mdp
224 to stop the output on that position.
225
226 This can be used to show bullet points
227 line by line.
228
229 *\<br\>* is also not displayed in HTML converted
230 output.
231
232 Agenda
233 <br>
234 * major
235 <br>
236     * minor
237 <br>
238 * major
239   ^
240     * minor
241       ^
242         * detail
243
244 -------------------------------------------------
245
246 -> # Supported markdown formatting <-
247
248 Leading *->* indicates centering.
249
250 \-> # test <-
251 \-> ## test <-
252 \-> test
253 \-> \_\*test\*\_ <-
254
255 becomes
256
257 -> # test <-
258 -> ## test <-
259 -> test
260 -> _*test*_ <-
261
262 -------------------------------------------------
263
264 -> # Supported markdown formatting <-
265
266 URL in pandoc style are supported:
267
268 \[Google](http://www.google.com/)
269
270 becomes
271
272 [Google](http://www.google.com/)
273
274 -------------------------------------------------
275
276 -> ## More information about markdown <-
277
278 can be found in the [markdown documentation](http://daringfireball.net/projects/markdown/).
279
280 -------------------------------------------------
281
282 -> # Support for UTF-8 special characters <-
283
284 Here are some examples.
285
286 ae = ä, oe = ö, ue = ü, ss = ß
287 upsilon = Ʊ, phi = ɸ
288
289 ▛▀▀▀▀▀▀▀▀▀▜
290 ▌rectangle▐
291 ▙▄▄▄▄▄▄▄▄▄▟
292
293
294 -------------------------------------------------
295
296 -> # Suspend your presentation for hands-on examples <-
297
298 Use *Ctrl + z* to suspend the presentation.
299
300 Use *fg* to resume it.
301
302 -------------------------------------------------
303
304 -> # Convert your presentation to PDF <-
305
306 To publish your presentation later on, you may
307 want to convert it to PDF.
308
309 This can be achieved by two additional tools:
310
311 \- *markdown* to convert to HTML
312 \- *wkhtmltopdf* to convert from HTML to PDF
313
314 After installing them, you can simply type:
315
316     $ markdown sample.md | wkhtmltopdf - sample.pdf
317
318 -------------------------------------------------
319
320 -> ## Last words <-
321
322 I hope you like *mdp*.
323
324 If you observe strange behavior, feel free to
325 open an issue on [GitHub](https://github.com/visit1985/mdp).