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