git.iko.soy/typeable/pandoc
on 1.9.0.3 help sign in
828 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
11..
13This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
14markdown test suite.
16--------------
18Headers
19=======
21Level 2 with an `embedded link </url>`_
22---------------------------------------
24Level 3 with *emphasis*
25~~~~~~~~~~~~~~~~~~~~~~~
27Level 4
28^^^^^^^
30Level 5
31'''''''
33Level 1
34=======
36Level 2 with *emphasis*
37-----------------------
39Level 3
40~~~~~~~
42with no blank line
44Level 2
45-------
47with no blank line
49--------------
51Paragraphs
52==========
54Here’s a regular paragraph.
56In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
57Because a hard-wrapped line in the middle of a paragraph looked like a list
58item.
60Here’s one with a bullet. \* criminey.
62There should be a hard line break
63here.
65--------------
67Block Quotes
68============
70E-mail style:
72 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:
84 1. item one
85 2. item two
87 Nested block quotes:
89 nested
91 nested
93This should not be a block quote: 2 > 1.
95And a following paragraph.
97--------------
99Code Blocks
100===========
102Code:
104::
106 ---- (should be four hyphens)
108 sub status {
109 print "working";
110 }
112 this code block is indented by one tab
114And:
116::
118 this code block is indented by two tabs
120 These should not be escaped: \$ \\ \> \[ \{
122--------------
124Lists
125=====
127Unordered
128---------
130Asterisks tight:
132- asterisk 1
133- asterisk 2
134- asterisk 3
136Asterisks loose:
138- asterisk 1
140- asterisk 2
142- asterisk 3
144Pluses tight:
146- Plus 1
147- Plus 2
148- Plus 3
150Pluses loose:
152- Plus 1
154- Plus 2
156- Plus 3
158Minuses tight:
160- Minus 1
161- Minus 2
162- Minus 3
164Minuses loose:
166- Minus 1
168- Minus 2
170- Minus 3
172Ordered
173-------
175Tight:
1771. First
1782. Second
1793. Third
181and:
1831. One
1842. Two
1853. Three
187Loose using tabs:
1891. First
1912. Second
1933. Third
195and using spaces:
1971. One
1992. Two
2013. Three
203Multiple paragraphs:
2051. Item 1, graf one.
207 Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
2092. Item 2.
2113. Item 3.
213Nested
214------
216- Tab
218 - Tab
220 - Tab
222Here’s another:
2241. First
2252. Second:
227 - Fee
228 - Fie
229 - Foe
2313. Third
233Same thing but with paragraphs:
2351. First
2372. Second:
239 - Fee
240 - Fie
241 - Foe
2433. Third
245Tabs and spaces
246---------------
248- this is a list item indented with tabs
250- this is a list item indented with spaces
252 - this is an example list item indented with tabs
254 - this is an example list item indented with spaces
256Fancy list markers
257------------------
259(2) begins with 2
260(3) and now 3
262 with a continuation
264 iv. sublist with roman numerals, starting with 4
265 v. more items
267 (A) a subsublist
268 (B) a subsublist
270Nesting:
272A. Upper Alpha
274 I. Upper Roman.
276 (6) Decimal start with 6
278 c) Lower alpha with paren
280Autonumbering:
282#. Autonumber.
283#. More.
285 #. Nested.
287Should not be a list item:
289M.A. 2007
291B. Williams
293--------------
295Definition Lists
296================
298Tight using spaces:
300apple
301 red fruit
302orange
303 orange fruit
304banana
305 yellow fruit
307Tight using tabs:
309apple
310 red fruit
311orange
312 orange fruit
313banana
314 yellow fruit
316Loose:
318apple
319 red fruit
321orange
322 orange fruit
324banana
325 yellow fruit
327Multiple blocks with italics:
329*apple*
330 red fruit
332 contains seeds, crisp, pleasant to taste
334*orange*
335 orange fruit
337 ::
339 { orange code block }
341 orange block quote
343Multiple definitions, tight:
345apple
346 red fruit
347 computer
348orange
349 orange fruit
350 bank
352Multiple definitions, loose:
354apple
355 red fruit
357 computer
359orange
360 orange fruit
362 bank
364Blank line after term, indented marker, alternate markers:
366apple
367 red fruit
369 computer
371orange
372 orange fruit
374 1. sublist
375 2. sublist
377HTML Blocks
378===========
380Simple block on one line:
382.. raw:: html
384 <div>
386foo
388.. raw:: html
390 </div>
392And nested without indentation:
394.. raw:: html
396 <div>
397 <div>
398 <div>
400foo
402.. raw:: html
404 </div>
405 </div>
406 <div>
408bar
410.. raw:: html
412 </div>
413 </div>
415Interpreted markdown in a table:
417.. raw:: html
419 <table>
420 <tr>
421 <td>
423This is *emphasized*
425.. raw:: html
427 </td>
428 <td>
430And this is **strong**
432.. raw:: html
434 </td>
435 </tr>
436 </table>
438 <script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
440Here’s a simple block:
442.. raw:: html
444 <div>
447foo
449.. raw:: html
451 </div>
453This should be a code block, though:
455::
457 <div>
458 foo
459 </div>
461As should this:
463::
465 <div>foo</div>
467Now, nested:
469.. raw:: html
471 <div>
472 <div>
473 <div>
476foo
478.. raw:: html
480 </div>
481 </div>
482 </div>
484This should just be an HTML comment:
486.. raw:: html
488 <!-- Comment -->
490Multiline:
492.. raw:: html
494 <!--
495 Blah
496 Blah
497 -->
499 <!--
500 This is another comment.
501 -->
503Code block:
505::
507 <!-- Comment -->
509Just plain comment, with trailing spaces on the line:
511.. raw:: html
513 <!-- foo -->
515Code:
517::
519 <hr />
521Hr’s:
523.. raw:: html
525 <hr>
527 <hr />
529 <hr />
531 <hr>
533 <hr />
535 <hr />
537 <hr class="foo" id="bar" />
539 <hr class="foo" id="bar" />
541 <hr class="foo" id="bar">
543--------------
545Inline Markup
546=============
548This is *emphasized*, and so *is this*.
550This is **strong**, and so **is this**.
552An *`emphasized link </url>`_*.
554***This is strong and em.***
556So is ***this*** word.
558***This is strong and em.***
560So is ***this*** word.
562This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.
564[STRIKEOUT:This is *strikeout*.]
566Superscripts: a\ :sup:`bc`\ d a\ :sup:`*hello*`\ a\ :sup:`hello there`\ .
568Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O, H\ :sub:`many of them`\ O.
570These should not be superscripts or subscripts, because of the unescaped
571spaces: a^b c^d, a~b c~d.
573--------------
575Smart quotes, ellipses, dashes
576==============================
578“Hello,” said the spider. “‘Shelob’ is my name.”
580‘A’, ‘B’, and ‘C’ are letters.
582‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
584‘He said, “I want to go.”’ Were you alive in the 70’s?
586Here is some quoted ‘``code``’ and a “`quoted
587link <http://example.com/?foo=1&bar=2>`_”.
589Some dashes: one—two — three—four — five.
591Dashes between numbers: 5–7, 255–66, 1987–1999.
593Ellipses…and…and….
595--------------
597LaTeX
598=====
600-
601- :math:`2+2=4`
602- :math:`x \in y`
603- :math:`\alpha \wedge \omega`
604- :math:`223`
605- :math:`p`\ -Tree
606- Here’s some display math:
608 .. math:: \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
610- Here’s one that has a line break in it: :math:`\alpha + \omega \times x^2`\ .
612These shouldn’t be math:
614- To get the famous equation, write ``$e = mc^2$``.
615- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is
616 emphasized.)
617- Shoes ($20) and socks ($5).
618- Escaped ``$``: $73 *this should be emphasized* 23$.
620Here’s a LaTeX table:
622.. raw:: latex
624 \begin{tabular}{|l|l|}\hline
625 Animal & Number \\ \hline
626 Dog & 2 \\
627 Cat & 1 \\ \hline
628 \end{tabular}
630--------------
632Special Characters
633==================
635Here is some unicode:
637- I hat: Î
638- o umlaut: ö
639- section: §
640- set membership: ∈
641- copyright: ©
643AT&T has an ampersand in their name.
645AT&T is another way to write it.
647This & that.
6494 < 5.
6516 > 5.
653Backslash: \\
655Backtick: \`
657Asterisk: \*
659Underscore: \_
661Left brace: {
663Right brace: }
665Left bracket: [
667Right bracket: ]
669Left paren: (
671Right paren: )
673Greater-than: >
675Hash: #
677Period: .
679Bang: !
681Plus: +
683Minus: -
685--------------
687Links
688=====
690Explicit
691--------
693Just a `URL </url/>`_.
695`URL and title </url/>`_.
697`URL and title </url/>`_.
699`URL and title </url/>`_.
701`URL and title </url/>`_
703`URL and title </url/>`_
705`with\_underscore </url/with_underscore>`_
707`Email link <mailto:nobody@nowhere.net>`_
709`Empty <>`_.
711Reference
712---------
714Foo `bar </url/>`_.
716Foo `bar </url/>`_.
718Foo `bar </url/>`_.
720With `embedded [brackets] </url/>`_.
722`b </url/>`_ by itself should be a link.
724Indented `once </url>`_.
726Indented `twice </url>`_.
728Indented `thrice </url>`_.
730This should [not][] be a link.
732::
734 [not]: /url
736Foo `bar </url/>`_.
738Foo `biz </url/>`_.
740With ampersands
741---------------
743Here’s a `link with an ampersand in the
744URL <http://example.com/?foo=1&bar=2>`_.
746Here’s a link with an amersand in the link text: `AT&T <http://att.com/>`_.
748Here’s an `inline link </script?foo=1&bar=2>`_.
750Here’s an `inline link in pointy braces </script?foo=1&bar=2>`_.
752Autolinks
753---------
755With an ampersand: http://example.com/?foo=1&bar=2
757- In a list?
758- http://example.com/
759- It should.
761An e-mail address: nobody@nowhere.net
763 Blockquoted: http://example.com/
765Auto-links should not occur here: ``<http://example.com/>``
767::
769 or here: <http://example.com/>
771--------------
773Images
774======
776From “Voyage dans la Lune” by Georges Melies (1902):
778.. figure:: lalune.jpg
779 :align: center
780 :alt: Voyage dans la Lune
782 lalune
783Here is a movie |movie| icon.
785--------------
787Footnotes
788=========
790Here is a footnote reference, [1]_ and another. [2]_ This should *not* be a
791footnote reference, because it contains a space.[^my note] Here is an inline
792note. [3]_
794 Notes can go in quotes. [4]_
7961. And in list items. [5]_
798This paragraph should not be part of the note, as it is not indented.
800.. [1]
801 Here is the footnote. It can go anywhere after the footnote reference. It
802 need not be placed at the end of the document.
804.. [2]
805 Here’s the long note. This one contains multiple blocks.
807 Subsequent blocks are indented to show that they belong to the footnote (as
808 with list items).
810 ::
812 { <code> }
814 If you want, you can indent every line, but you can also be lazy and just
815 indent the first line of each block.
817.. [3]
818 This is *easier* to type. Inline notes may contain
819 `links <http://google.com>`_ and ``]`` verbatim characters, as well as
820 [bracketed text].
822.. [4]
823 In quote.
825.. [5]
826 In list.
828.. |movie| image:: movie.jpg