git.iko.soy/typeable/pandoc
on 1.5.0.1 help sign in
typeable/pandoc/tests/rst-reader.rst
510 lines 7.0 kB history raw
1Pandoc Test Suite
2#################
3Subtitle
4^^^^^^^^
6:Author: John MacFarlane
7:Author: Anonymous
8:Date: July 17, 2006
9:Revision: 3
11Level one header
12================
14This is a set of tests for pandoc. Most of them are adapted from
15John Gruber's markdown test suite.
17Level two header
18----------------
20Level three
21+++++++++++
23Level four with *emphasis*
24~~~~~~~~~~~~~~~~~~~~~~~~~~
26Level five
27''''''''''
29Paragraphs
30==========
32Here's a regular paragraph.
34In Markdown 1.0.0 and earlier. Version
358. This line turns into a list item.
36Because a hard-wrapped line in the
37middle of a paragraph looked like a
38list item.
40Here's one with a bullet.
41* criminey.
43Horizontal rule:
45-----
47Another:
49****
51Block Quotes
52============
54Here's a block quote:
56 This is a block quote.
57 It is pretty short.
59Here's another, differently indented:
61 This is a block quote.
62 It's indented with a tab.
64 Code in a block quote::
66 sub status {
67 print "working";
68 }
70 List in a block quote:
72 1. item one
73 2. item two
75 Nested block quotes:
77 nested
79 nested
81Code Blocks
82===========
84Code:
86::
88 ---- (should be four hyphens)
90 sub status {
91 print "working";
92 }
94::
96 this code block is indented by one tab
98And::
100 this block is indented by two tabs
102 These should not be escaped: \$ \\ \> \[ \{
104And:
106.. code-block:: python
108 def my_function(x):
109 return x + 1
111Lists
112=====
114Unordered
115---------
117Asterisks tight:
119* asterisk 1
120* asterisk 2
121* asterisk 3
123Asterisks loose:
125* asterisk 1
127* asterisk 2
129* asterisk 3
131Pluses tight:
133+ Plus 1
134+ Plus 2
135+ Plus 3
137Pluses loose:
139+ Plus 1
141+ Plus 2
143+ Plus 3
145Minuses tight:
147- Minus 1
148- Minus 2
149- Minus 3
151Minuses loose:
153- Minus 1
155- Minus 2
157- Minus 3
159Ordered
160-------
162Tight:
1641. First
1652. Second
1663. Third
168and:
1701. One
1712. Two
1723. Three
174Loose using tabs:
1761. First
1782. Second
1803. Third
182and using spaces:
1841. One
1862. Two
1883. Three
190Multiple paragraphs:
1921. Item 1, graf one.
194 Item 1. graf two. The quick brown fox jumped over the lazy dog's
195 back.
1972. Item 2.
1993. Item 3.
201Nested:
203* Tab
205 * Tab
207 * Tab
209Here's another:
2111. First
2132. Second:
215 * Fee
216 * Fie
217 * Foe
2193. Third
221Fancy list markers
222------------------
224(2) begins with 2
225(3) and now 3
227 with a continuation
229 iv. sublist with roman numerals, starting with 4
230 v. more items
232 (A) a subsublist
233 (B) a subsublist
235Nesting:
237A. Upper Alpha
239 I. Upper Roman.
241 (6) Decimal start with 6
243 c) Lower alpha with paren
245Autonumbering:
247#. Autonumber.
248#. More.
250 #. Nested.
252Autonumbering with explicit start:
254(d) item 1
255(#) item 2
257Definition
258----------
260term 1
261 Definition 1.
263term 2
264 Definition 2, paragraph 1.
266 Definition 2, paragraph 2.
268term with *emphasis*
269 Definition 3.
271Field Lists
272===========
274 :address: 61 Main St.
275 :city: *Nowhere*, MA,
276 USA
277 :phone: 123-4567
279:address: 61 Main St.
280:city: *Nowhere*, MA,
281 USA
282:phone: 123-4567
284HTML Blocks
285===========
287Simple block on one line:
289.. raw:: html
291 <div>foo</div>
293Now, nested:
295.. raw:: html
297 <div>
298 <div>
299 <div>
300 foo
301 </div>
302 </div>
303 </div>
305LaTeX Block
306===========
308.. raw:: latex
310 \begin{tabular}{|l|l|}\hline
311 Animal & Number \\ \hline
312 Dog & 2 \\
313 Cat & 1 \\ \hline
314 \end{tabular}
316Inline Markup
317=============
319This is *emphasized*. This is **strong**.
321This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.
323This is\ :sub:`subscripted` and this is :sup:`superscripted`\ .
325Special Characters
326==================
328Here is some unicode:
330- I hat: Î
331- o umlaut: ö
332- section: §
333- set membership: ∈
334- copyright: ©
336AT&T has an ampersand in their name.
338This & that.
3404 < 5.
3426 > 5.
344Backslash: \\
346Backtick: \`
348Asterisk: \*
350Underscore: \_
352Left brace: \{
354Right brace: \}
356Left bracket: \[
358Right bracket: \]
360Left paren: \(
362Right paren: \)
364Greater-than: \>
366Hash: \#
368Period: \.
370Bang: \!
372Plus: \+
374Minus: \-
376Links
377=====
379Explicit: a `URL </url/>`_.
381Two anonymous links: `the first`__ and `the second`__
383__ /url1/
384__ /url2/
386Reference links: `link1`_ and `link2`_ and link1_ again.
388.. _link1: /url1/
389.. _`link2`: /url2/
391Here's a `link with an ampersand in the URL`_.
393Here's a link with an amersand in the link text: `AT&T </url/>`_.
395.. _link with an ampersand in the URL: http://example.com/?foo=1&bar=2
397Autolinks: http://example.com/?foo=1&bar=2 and nobody@nowhere.net.
399But not here::
401 http://example.com/
403Images
404======
406From "Voyage dans la Lune" by Georges Melies (1902):
408.. image:: lalune.jpg
410.. image:: lalune.jpg
411 :height: 2343
412 :alt: Voyage dans la Lune
414Here is a movie |movie| icon.
416.. |movie| image:: movie.jpg
418Comments
419========
421First paragraph
423.. comment
425..
426 Comment block, should not appear in output
427 as defined by reStructuredText
429Another paragraph
431..
432 Another comment block.
434 This one spans several
435 text elements.
437 It doesn't end until
438 indentation is restored to the
439 preceding level.
441A third paragraph
443Line blocks
444===========
446| But can a bee be said to be
447| or not to be an entire bee,
448| when half the bee is not a bee,
449| due to some ancient injury?
451| Continuation
452 line
453| and
454 another
456Simple Tables
457=============
459================== =========== ==========
460col 1 col 2 col 3
461================== =========== ==========
462r1 a b c
463r2 d e f
464================== =========== ==========
466Headless
468================== =========== ==========
469r1 a b c
470r2 d e f
471================== =========== ==========
474Grid Tables
475===========
477+------------------+-----------+------------+
478| col 1 | col 2 | col 3 |
479+==================+===========+============+
480| r1 a | b | c |
481| r1 bis | b 2 | c 2 |
482+------------------+-----------+------------+
483| r2 d | e | f |
484+------------------+-----------+------------+
486Headless
488+------------------+-----------+------------+
489| r1 a | b | c |
490| r1 bis | b 2 | c 2 |
491+------------------+-----------+------------+
492| r2 d | e | f |
493+------------------+-----------+------------+
495Spaces at ends of lines
497+------------------+-----------+------------+
498| r1 a | b | c |
499| r1 bis | b 2 | c 2 |
500+------------------+-----------+------------+
501| r2 d | e | f |
502+------------------+-----------+------------+
504Multiple blocks in a cell
506+------------------+-----------+------------+
507| r1 a | - b | c |
508| | - b 2 | c 2 |
509| r1 bis | - b 2 | c 2 |
510+------------------+-----------+------------+