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