git.iko.soy/typeable/pandoc
on 1.3 help sign in
889 lines 10 kB history raw
1=================
2Pandoc Test Suite
3=================
5:Author: John MacFarlane
6:Author: Anonymous
7:Date: July 17, 2006
9.. role:: math(raw)
10 :format: html latex
12This is a set of tests for pandoc. Most of them are adapted from
13John Gruber's markdown test suite.
15--------------
17Headers
18=======
20Level 2 with an `embedded link </url>`_
21---------------------------------------
23Level 3 with *emphasis*
24~~~~~~~~~~~~~~~~~~~~~~~
26Level 4
27^^^^^^^
29Level 5
30'''''''
32Level 1
33=======
35Level 2 with *emphasis*
36-----------------------
38Level 3
39~~~~~~~
41with no blank line
43Level 2
44-------
46with no blank line
48--------------
50Paragraphs
51==========
53Here's a regular paragraph.
55In Markdown 1.0.0 and earlier. Version 8. This line turns into a
56list item. Because a hard-wrapped line in the middle of a paragraph
57looked like a list item.
59Here's one with a bullet. \* criminey.
61There should be a hard line break
62here.
64--------------
66Block Quotes
67============
69E-mail style:
71 This is a block quote. It is pretty short.
74 Code in a block quote:
76 ::
78 sub status {
79 print "working";
80 }
82 A list:
85 1. item one
86 2. item two
88 Nested block quotes:
90 nested
93 nested
97This should not be a block quote: 2 > 1.
99And a following paragraph.
101--------------
103Code Blocks
104===========
106Code:
108::
110 ---- (should be four hyphens)
112 sub status {
113 print "working";
114 }
116 this code block is indented by one tab
118And:
120::
122 this code block is indented by two tabs
124 These should not be escaped: \$ \\ \> \[ \{
126--------------
128Lists
129=====
131Unordered
132---------
134Asterisks tight:
137- asterisk 1
138- asterisk 2
139- asterisk 3
141Asterisks loose:
144- asterisk 1
146- asterisk 2
148- asterisk 3
151Pluses tight:
154- Plus 1
155- Plus 2
156- Plus 3
158Pluses loose:
161- Plus 1
163- Plus 2
165- Plus 3
168Minuses tight:
171- Minus 1
172- Minus 2
173- Minus 3
175Minuses loose:
178- Minus 1
180- Minus 2
182- Minus 3
185Ordered
186-------
188Tight:
1911. First
1922. Second
1933. Third
195and:
1981. One
1992. Two
2003. Three
202Loose using tabs:
2051. First
2072. Second
2093. Third
212and using spaces:
2151. One
2172. Two
2193. Three
222Multiple paragraphs:
2251. Item 1, graf one.
227 Item 1. graf two. The quick brown fox jumped over the lazy dog's
228 back.
2302. Item 2.
2323. Item 3.
235Nested
236------
239- Tab
241 - Tab
243 - Tab
247Here's another:
2501. First
2512. Second:
253 - Fee
254 - Fie
255 - Foe
2573. Third
259Same thing but with paragraphs:
2621. First
2642. Second:
267 - Fee
268 - Fie
269 - Foe
2713. Third
274Tabs and spaces
275---------------
278- this is a list item indented with tabs
280- this is a list item indented with spaces
283 - this is an example list item indented with tabs
285 - this is an example list item indented with spaces
289Fancy list markers
290------------------
293(2) begins with 2
294(3) and now 3
296 with a continuation
299 iv. sublist with roman numerals, starting with 4
300 v. more items
302 (A) a subsublist
303 (B) a subsublist
307Nesting:
310A. Upper Alpha
312 I. Upper Roman.
314 (6) Decimal start with 6
316 c) Lower alpha with paren
321Autonumbering:
324#. Autonumber.
325#. More.
327 #. Nested.
330Should not be a list item:
332M.A. 2007
334B. Williams
336--------------
338Definition Lists
339================
341Tight using spaces:
343apple
344 red fruit
345orange
346 orange fruit
347banana
348 yellow fruit
350Tight using tabs:
352apple
353 red fruit
354orange
355 orange fruit
356banana
357 yellow fruit
359Loose:
361apple
362 red fruit
364orange
365 orange fruit
367banana
368 yellow fruit
371Multiple blocks with italics:
373*apple*
374 red fruit
376 contains seeds, crisp, pleasant to taste
378*orange*
379 orange fruit
381 ::
383 { orange code block }
385 orange block quote
389Multiple definitions, tight:
391apple
392 red fruit
393 computer
394orange
395 orange fruit
396 bank
398Multiple definitions, loose:
400apple
401 red fruit
403 computer
405orange
406 orange fruit
408 bank
411Blank line after term, indented marker, alternate markers:
413apple
414 red fruit
416 computer
418orange
419 orange fruit
422 1. sublist
423 2. sublist
426HTML Blocks
427===========
429Simple block on one line:
432.. raw:: html
434 <div>
436foo
438.. raw:: html
440 </div>
442And nested without indentation:
445.. raw:: html
447 <div>
448 <div>
449 <div>
451foo
453.. raw:: html
455 </div>
456 </div>
457 <div>
459bar
461.. raw:: html
463 </div>
464 </div>
466Interpreted markdown in a table:
469.. raw:: html
471 <table>
472 <tr>
473 <td>
475This is *emphasized*
477.. raw:: html
479 </td>
480 <td>
482And this is **strong**
484.. raw:: html
486 </td>
487 </tr>
488 </table>
490 <script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
492Here's a simple block:
495.. raw:: html
497 <div>
500foo
502.. raw:: html
504 </div>
506This should be a code block, though:
508::
510 <div>
511 foo
512 </div>
514As should this:
516::
518 <div>foo</div>
520Now, nested:
523.. raw:: html
525 <div>
526 <div>
527 <div>
530foo
532.. raw:: html
534 </div>
535 </div>
536 </div>
538This should just be an HTML comment:
541.. raw:: html
543 <!-- Comment -->
545Multiline:
548.. raw:: html
550 <!--
551 Blah
552 Blah
553 -->
555 <!--
556 This is another comment.
557 -->
559Code block:
561::
563 <!-- Comment -->
565Just plain comment, with trailing spaces on the line:
568.. raw:: html
570 <!-- foo -->
572Code:
574::
576 <hr />
578Hr's:
581.. raw:: html
583 <hr>
585 <hr />
587 <hr />
589 <hr>
591 <hr />
593 <hr />
595 <hr class="foo" id="bar" />
597 <hr class="foo" id="bar" />
599 <hr class="foo" id="bar">
601--------------
603Inline Markup
604=============
606This is *emphasized*, and so *is this*.
608This is **strong**, and so **is this**.
610An *`emphasized link </url>`_*.
612***This is strong and em.***
614So is ***this*** word.
616***This is strong and em.***
618So is ***this*** word.
620This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.
622[STRIKEOUT:This is *strikeout*.]
624Superscripts: a\ :sup:`bc`\ d a\ :sup:`*hello*`\
625a\ :sup:`hello there`\ .
627Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O,
628H\ :sub:`many of them`\ O.
630These should not be superscripts or subscripts, because of the
631unescaped spaces: a^b c^d, a~b c~d.
633--------------
635Smart quotes, ellipses, dashes
636==============================
638"Hello," said the spider. "'Shelob' is my name."
640'A', 'B', and 'C' are letters.
642'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
644'He said, "I want to go."' Were you alive in the 70's?
646Here is some quoted '``code``' and a
647"`quoted link <http://example.com/?foo=1&bar=2>`_".
649Some dashes: one--two -- three--four -- five.
651Dashes between numbers: 5-7, 255-66, 1987-1999.
653Ellipses...and...and....
655--------------
657LaTeX
658=====
661-
662- :math:`$2+2=4$`
663- :math:`$x \in y$`
664- :math:`$\alpha \wedge \omega$`
665- :math:`$223$`
666- :math:`$p$`-Tree
667- Here's some display math:
668 :math:`$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$`
669- Here's one that has a line break in it:
670 :math:`$\alpha + \omega \times x^2$`.
672These shouldn't be math:
675- To get the famous equation, write ``$e = mc^2$``.
676- $22,000 is a *lot* of money. So is $34,000. (It worked if "lot"
677 is emphasized.)
678- Shoes ($20) and socks ($5).
679- Escaped ``$``: $73 *this should be emphasized* 23$.
681Here's a LaTeX table:
685--------------
687Special Characters
688==================
690Here is some unicode:
693- I hat: Î
694- o umlaut: ö
695- section: §
696- set membership: ∈
697- copyright: ©
699AT&T has an ampersand in their name.
701AT&T is another way to write it.
703This & that.
7054 < 5.
7076 > 5.
709Backslash: \\
711Backtick: \`
713Asterisk: \*
715Underscore: \_
717Left brace: {
719Right brace: }
721Left bracket: [
723Right bracket: ]
725Left paren: (
727Right paren: )
729Greater-than: >
731Hash: #
733Period: .
735Bang: !
737Plus: +
739Minus: -
741--------------
743Links
744=====
746Explicit
747--------
749Just a `URL </url/>`_.
751`URL and title </url/>`_.
753`URL and title </url/>`_.
755`URL and title </url/>`_.
757`URL and title </url/>`_
759`URL and title </url/>`_
761`with\_underscore </url/with_underscore>`_
763`Email link <mailto:nobody@nowhere.net>`_
765`Empty <>`_.
767Reference
768---------
770Foo `bar </url/>`_.
772Foo `bar </url/>`_.
774Foo `bar </url/>`_.
776With `embedded [brackets] </url/>`_.
778`b </url/>`_ by itself should be a link.
780Indented `once </url>`_.
782Indented `twice </url>`_.
784Indented `thrice </url>`_.
786This should [not][] be a link.
788::
790 [not]: /url
792Foo `bar </url/>`_.
794Foo `biz </url/>`_.
796With ampersands
797---------------
799Here's a
800`link with an ampersand in the URL <http://example.com/?foo=1&bar=2>`_.
802Here's a link with an amersand in the link text:
803`AT&T <http://att.com/>`_.
805Here's an `inline link </script?foo=1&bar=2>`_.
807Here's an `inline link in pointy braces </script?foo=1&bar=2>`_.
809Autolinks
810---------
812With an ampersand: http://example.com/?foo=1&bar=2
815- In a list?
816- http://example.com/
817- It should.
819An e-mail address: nobody@nowhere.net
821 Blockquoted: http://example.com/
824Auto-links should not occur here: ``<http://example.com/>``
826::
828 or here: <http://example.com/>
830--------------
832Images
833======
835From "Voyage dans la Lune" by Georges Melies (1902):
837|lalune|
839Here is a movie |movie| icon.
841--------------
843Footnotes
844=========
846Here is a footnote reference, [1]_ and another. [2]_ This should
847*not* be a footnote reference, because it contains a space.[^my
848note] Here is an inline note. [3]_
850 Notes can go in quotes. [4]_
8541. And in list items. [5]_
856This paragraph should not be part of the note, as it is not
857indented.
859.. [1]
860 Here is the footnote. It can go anywhere after the footnote
861 reference. It need not be placed at the end of the document.
863.. [2]
864 Here's the long note. This one contains multiple blocks.
866 Subsequent blocks are indented to show that they belong to the
867 footnote (as with list items).
869 ::
871 { <code> }
873 If you want, you can indent every line, but you can also be lazy
874 and just indent the first line of each block.
876.. [3]
877 This is *easier* to type. Inline notes may contain
878 `links <http://google.com>`_ and ``]`` verbatim characters, as well
879 as [bracketed text].
881.. [4]
882 In quote.
884.. [5]
885 In list.
888.. |lalune| image:: lalune.jpg
889.. |movie| image:: movie.jpg