git.iko.soy/typeable/pandoc
on 1.10.0.3 help sign in
typeable/pandoc/tests/rst-reader.rst
606 lines 8.2 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:
283 123-4567
285HTML Blocks
286===========
288Simple block on one line:
290.. raw:: html
292 <div>foo</div>
294Now, nested:
296.. raw:: html
298 <div>
299 <div>
300 <div>
301 foo
302 </div>
303 </div>
304 </div>
306LaTeX Block
307===========
309.. raw:: latex
311 \begin{tabular}{|l|l|}\hline
312 Animal & Number \\ \hline
313 Dog & 2 \\
314 Cat & 1 \\ \hline
315 \end{tabular}
317Inline Markup
318=============
320This is *emphasized*. This is **strong**.
322This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.
324This is\ :sub:`subscripted` and this is :sup:`superscripted`\ .
326Special Characters
327==================
329Here is some unicode:
331- I hat: Î
332- o umlaut: ö
333- section: §
334- set membership: ∈
335- copyright: ©
337AT&T has an ampersand in their name.
339This & that.
3414 < 5.
3436 > 5.
345Backslash: \\
347Backtick: \`
349Asterisk: \*
351Underscore: \_
353Left brace: \{
355Right brace: \}
357Left bracket: \[
359Right bracket: \]
361Left paren: \(
363Right paren: \)
365Greater-than: \>
367Hash: \#
369Period: \.
371Bang: \!
373Plus: \+
375Minus: \-
377Links
378=====
380Explicit: a `URL </url/>`_.
382Two anonymous links: `the first`__ and `the second`__
384__ /url1/
385__ /url2/
387Reference links: `link1`_ and `link2`_ and link1_ again.
389.. _link1: /url1/
390.. _`link2`: /url2/
392Here's a `link with an ampersand in the URL`_.
394Here's a link with an amersand in the link text: `AT&T </url/>`_.
396.. _link with an ampersand in the URL: http://example.com/?foo=1&bar=2
398Autolinks: http://example.com/?foo=1&bar=2 and nobody@nowhere.net.
400But not here::
402 http://example.com/
404Images
405======
407From "Voyage dans la Lune" by Georges Melies (1902):
409.. image:: lalune.jpg
411.. image:: lalune.jpg
412 :height: 2343
413 :alt: Voyage dans la Lune
415Here is a movie |movie| icon.
417.. |movie| image:: movie.jpg
419And an |image with a link|.
421.. |image with a link| image:: movie.jpg
422 :alt: A movie
423 :target: /url
425Comments
426========
428First paragraph
430.. comment
432..
433 Comment block, should not appear in output
434 as defined by reStructuredText
436Another paragraph
438..
439 Another comment block.
441 This one spans several
442 text elements.
444 It doesn't end until
445 indentation is restored to the
446 preceding level.
448A third paragraph
450Line blocks
451===========
453| But can a bee be said to be
454| or not to be an entire bee,
455| when half the bee is not a bee,
456| due to some ancient injury?
458| Continuation
459 line
460| and
461 another
463Simple Tables
464=============
466================== =========== ==========
467col 1 col 2 col 3
468================== =========== ==========
469r1 a b c
470r2 d e f
471================== =========== ==========
473Headless
475================== =========== ==========
476r1 a b c
477r2 d e f
478================== =========== ==========
481Grid Tables
482===========
484+------------------+-----------+------------+
485| col 1 | col 2 | col 3 |
486+==================+===========+============+
487| r1 a | b | c |
488| r1 bis | b 2 | c 2 |
489+------------------+-----------+------------+
490| r2 d | e | f |
491+------------------+-----------+------------+
493Headless
495+------------------+-----------+------------+
496| r1 a | b | c |
497| r1 bis | b 2 | c 2 |
498+------------------+-----------+------------+
499| r2 d | e | f |
500+------------------+-----------+------------+
502Spaces at ends of lines
504+------------------+-----------+------------+
505| r1 a | b | c |
506| r1 bis | b 2 | c 2 |
507+------------------+-----------+------------+
508| r2 d | e | f |
509+------------------+-----------+------------+
511Multiple blocks in a cell
513+------------------+-----------+------------+
514| r1 a | - b | c |
515| | - b 2 | c 2 |
516| r1 bis | - b 2 | c 2 |
517+------------------+-----------+------------+
519Footnotes
520=========
522[1]_
524[#]_
526[#]_
528[*]_
530.. [1] Note with one line.
532.. [#] Note with
533 continuation line.
535.. [#] Note with
537 continuation block.
539.. [*] Note with
540 continuation line
542 and a second para.
544Not in note.
546Math
547====
549Some inline math :math:`E=mc^2`\ . Now some
550display math:
552.. math:: E=mc^2
554.. math::
556 E = mc^2
558.. math::
560 E = mc^2
562 \alpha = \beta
564.. math::
565 :label: hithere
566 :nowrap:
568 E &= mc^2\\
569 F &= \pi E
571 F &= \gamma \alpha^2
573All done.
575Default-Role
576============
578Try changing the default role to a few different things.
580.. default-role:: math
582Doesn't Break Title Parsing
583---------------------------
585Inline math: `E=mc^2` or :math:`E=mc^2` or `E=mc^2`:math:.
586Other roles: :sup:`super`, `sub`:sub:.
588.. math::
589 \alpha = beta
591 E = mc^2
593.. default-role:: sup
595Some `of` these :sup:`words` are in `superscript`:sup:.
597Reset default-role to the default default.
599.. default-role::
601And now `some-invalid-string-3231231` is nonsense.
603Literal symbols
604---------------
6062*2 = 4*1