fixed coding style + minor changes
[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 \~~~ {.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.) will be ignored
124
125 -------------------------------------------------
126
127 -> # Supported markdown formatting <-
128
129 Quotes are auto-detected by preceding *>*.
130
131 Multiple *>* are interpreted as nested quotes.
132
133 \> quote
134 \>> nested quote 1
135 \> > nested quote 2
136
137 becomes
138
139 > quote
140 >> nested quote 1
141 > > nested quote 2
142
143 -------------------------------------------------
144
145 -> # Supported markdown formatting <-
146
147 Inline highlighting is supported as followed:
148
149 \- *\** colors text as red
150 \- *\_* underlines text
151
152 \_some\_ \*highlighted\* \_\*text\*\_
153
154 becomes
155
156 _some_ *highlighted* _*text*_
157
158 -------------------------------------------------
159
160 -> # Supported markdown formatting <-
161
162 Backslashes force special markdown characters
163 like *\**, *\_*, *#* and *>* to be printed as normal
164 characters.
165
166 \\\*special\\\*
167
168 becomes
169
170 \*special\*
171
172 -------------------------------------------------
173
174 -> # Supported markdown formatting <-
175
176 Leading *\** or *-* indicate lists.
177
178 list
179 \* major
180 \    - minor
181 \        - \*important\*
182 \          detail
183 \    - minor
184
185 becomes
186
187 list
188 * major
189     - minor
190         - *important*
191           detail
192     - minor
193
194 -------------------------------------------------
195
196 -> # Supported markdown formatting <-
197
198 A single *\<br\>* or *^* in a line indicates mdp
199 to stop the output on that position.
200
201 This can be used to show bullet points
202 line by line.
203
204 *\<br\>* is also not displayed in HTML converted
205 output.
206
207 Agenda
208 <br>
209 * major
210 <br>
211     * minor
212 <br>
213 * major
214   ^
215     * minor
216       ^
217         * detail
218
219 -------------------------------------------------
220
221 -> # Supported markdown formatting <-
222
223 Leading *->* indicates centering.
224
225 \-> # test <-
226 \-> ## test <-
227 \-> test
228 \-> \_\*test\*\_ <-
229
230 becomes
231
232 -> # test <-
233 -> ## test <-
234 -> test
235 -> _*test*_ <-
236
237 -------------------------------------------------
238
239 -> # Supported markdown formatting <-
240
241 URL in pandoc style are supported:
242
243 \[Google](http://www.google.com/)
244
245 becomes
246
247 [Google](http://www.google.com/)
248
249 -------------------------------------------------
250
251 -> ## More information about markdown <-
252
253 can be found in the [markdown documentation](http://daringfireball.net/projects/markdown/).
254
255 -------------------------------------------------
256
257 -> # Support for UTF-8 special characters <-
258
259 Here are some examples.
260
261 ae = ä, oe = ö, ue = ü, ss = ß
262 upsilon = Ʊ, phi = ɸ
263
264 ▛▀▀▀▀▀▀▀▀▀▜
265 ▌rectangle▐
266 ▙▄▄▄▄▄▄▄▄▄▟
267
268
269 -------------------------------------------------
270
271 -> # Suspend your presentation for hands-on examples <-
272
273 Use *Ctrl + z* to suspend the presentation.
274
275 Use *fg* to resume it.
276
277 -------------------------------------------------
278
279 -> # Convert your presentation to PDF <-
280
281 To publish your presentation later on, you may
282 want to convert it to PDF.
283
284 This can be achieved by two additional tools:
285
286 \- *markdown* to convert to HTML
287 \- *wkhtmltopdf* to convert from HTML to PDF
288
289 After installing them, you can simply type:
290
291     $ markdown sample.md | wkhtmltopdf - sample.pdf
292
293 -------------------------------------------------
294
295 -> ## Last words <-
296
297 I hope you like *mdp*. But be aware that it is
298 still in alpha status.
299
300 If you observe strange behavior, feel free to
301 open an issue on [GitHub](https://github.com/visit1985/mdp).