git.iko.soy/typeable/pandoc
on 1.15.0.3 help sign in
892 lines 11 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..
13.. role:: raw-latex(raw)
14 :format: latex
15..
17This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
18markdown test suite.
20--------------
22Headers
23=======
25Level 2 with an `embedded link </url>`__
26----------------------------------------
28Level 3 with *emphasis*
29~~~~~~~~~~~~~~~~~~~~~~~
31Level 4
32^^^^^^^
34Level 5
35'''''''
37Level 1
38=======
40Level 2 with *emphasis*
41-----------------------
43Level 3
44~~~~~~~
46with no blank line
48Level 2
49-------
51with no blank line
53--------------
55Paragraphs
56==========
58Here’s a regular paragraph.
60In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
61Because a hard-wrapped line in the middle of a paragraph looked like a list
62item.
64Here’s one with a bullet. \* criminey.
66| There should be a hard line break
67| here.
69--------------
71Block Quotes
72============
74E-mail style:
76 This is a block quote. It is pretty short.
78 Code in a block quote:
80 ::
82 sub status {
83 print "working";
84 }
86 A list:
88 1. item one
89 2. item two
91 Nested block quotes:
93 nested
95 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:
136- asterisk 1
137- asterisk 2
138- asterisk 3
140Asterisks loose:
142- asterisk 1
144- asterisk 2
146- asterisk 3
148Pluses tight:
150- Plus 1
151- Plus 2
152- Plus 3
154Pluses loose:
156- Plus 1
158- Plus 2
160- Plus 3
162Minuses tight:
164- Minus 1
165- Minus 2
166- Minus 3
168Minuses loose:
170- Minus 1
172- Minus 2
174- Minus 3
176Ordered
177-------
179Tight:
1811. First
1822. Second
1833. Third
185and:
1871. One
1882. Two
1893. Three
191Loose using tabs:
1931. First
1952. Second
1973. Third
199and using spaces:
2011. One
2032. Two
2053. Three
207Multiple paragraphs:
2091. Item 1, graf one.
211 Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
2132. Item 2.
2153. Item 3.
217Nested
218------
220- Tab
222 - Tab
224 - Tab
226Here’s another:
2281. First
2292. Second:
231 - Fee
232 - Fie
233 - Foe
2353. Third
237Same thing but with paragraphs:
2391. First
2412. Second:
243 - Fee
244 - Fie
245 - Foe
2473. Third
249Tabs and spaces
250---------------
252- this is a list item indented with tabs
254- this is a list item indented with spaces
256 - this is an example list item indented with tabs
258 - this is an example list item indented with spaces
260Fancy list markers
261------------------
263(2) begins with 2
264(3) and now 3
266 with a continuation
268 iv. sublist with roman numerals, starting with 4
269 v. more items
271 (A) a subsublist
272 (B) a subsublist
274Nesting:
276A. Upper Alpha
278 I. Upper Roman.
280 (6) Decimal start with 6
282 c) Lower alpha with paren
284Autonumbering:
286#. Autonumber.
287#. More.
289 #. Nested.
291Should not be a list item:
293M.A. 2007
295B. Williams
297--------------
299Definition Lists
300================
302Tight using spaces:
304apple
305 red fruit
306orange
307 orange fruit
308banana
309 yellow fruit
311Tight using tabs:
313apple
314 red fruit
315orange
316 orange fruit
317banana
318 yellow fruit
320Loose:
322apple
323 red fruit
325orange
326 orange fruit
328banana
329 yellow fruit
331Multiple blocks with italics:
333*apple*
334 red fruit
336 contains seeds, crisp, pleasant to taste
338*orange*
339 orange fruit
341 ::
343 { orange code block }
345 orange block quote
347Multiple definitions, tight:
349apple
350 red fruit
351 computer
352orange
353 orange fruit
354 bank
356Multiple definitions, loose:
358apple
359 red fruit
361 computer
363orange
364 orange fruit
366 bank
368Blank line after term, indented marker, alternate markers:
370apple
371 red fruit
373 computer
375orange
376 orange fruit
378 1. sublist
379 2. sublist
381HTML Blocks
382===========
384Simple block on one line:
386.. raw:: html
388 <div>
390foo
392.. raw:: html
394 </div>
396And nested without indentation:
398.. raw:: html
400 <div>
402.. raw:: html
404 <div>
406.. raw:: html
408 <div>
410foo
412.. raw:: html
414 </div>
416.. raw:: html
418 </div>
420.. raw:: html
422 <div>
424bar
426.. raw:: html
428 </div>
430.. raw:: html
432 </div>
434Interpreted markdown in a table:
436.. raw:: html
438 <table>
440.. raw:: html
442 <tr>
444.. raw:: html
446 <td>
448This is *emphasized*
450.. raw:: html
452 </td>
454.. raw:: html
456 <td>
458And this is **strong**
460.. raw:: html
462 </td>
464.. raw:: html
466 </tr>
468.. raw:: html
470 </table>
472.. raw:: html
474 <script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
476Here’s a simple block:
478.. raw:: html
480 <div>
482foo
484.. raw:: html
486 </div>
488This should be a code block, though:
490::
492 <div>
493 foo
494 </div>
496As should this:
498::
500 <div>foo</div>
502Now, nested:
504.. raw:: html
506 <div>
508.. raw:: html
510 <div>
512.. raw:: html
514 <div>
516foo
518.. raw:: html
520 </div>
522.. raw:: html
524 </div>
526.. raw:: html
528 </div>
530This should just be an HTML comment:
532.. raw:: html
534 <!-- Comment -->
536Multiline:
538.. raw:: html
540 <!--
541 Blah
542 Blah
543 -->
545.. raw:: html
547 <!--
548 This is another comment.
549 -->
551Code block:
553::
555 <!-- Comment -->
557Just plain comment, with trailing spaces on the line:
559.. raw:: html
561 <!-- foo -->
563Code:
565::
567 <hr />
569Hr’s:
571.. raw:: html
573 <hr>
575.. raw:: html
577 <hr />
579.. raw:: html
581 <hr />
583.. raw:: html
585 <hr>
587.. raw:: html
589 <hr />
591.. raw:: html
593 <hr />
595.. raw:: html
597 <hr class="foo" id="bar" />
599.. raw:: html
601 <hr class="foo" id="bar" />
603.. raw:: html
605 <hr class="foo" id="bar">
607--------------
609Inline Markup
610=============
612This is *emphasized*, and so *is this*.
614This is **strong**, and so **is this**.
616An *`emphasized link </url>`__*.
618***This is strong and em.***
620So is ***this*** word.
622***This is strong and em.***
624So is ***this*** word.
626This is code: ``>``, ``$``, ``\``, ``\$``, ``<html>``.
628[STRIKEOUT:This is *strikeout*.]
630Superscripts: a\ :sup:`bc`\ d a\ :sup:`*hello*` a\ :sup:`hello there`.
632Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O, H\ :sub:`many of them`\ O.
634These should not be superscripts or subscripts, because of the unescaped
635spaces: a^b c^d, a~b c~d.
637--------------
639Smart quotes, ellipses, dashes
640==============================
642“Hello,” said the spider. “‘Shelob’ is my name.”
644‘A’, ‘B’, and ‘C’ are letters.
646‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
648‘He said, “I want to go.”’ Were you alive in the 70’s?
650Here is some quoted ‘``code``’ and a “`quoted
651link <http://example.com/?foo=1&bar=2>`__”.
653Some dashes: one—two — three—four — five.
655Dashes between numbers: 5–7, 255–66, 1987–1999.
657Ellipses…and…and….
659--------------
661LaTeX
662=====
664- :raw-latex:`\cite[22-23]{smith.1899}`
665- :math:`2+2=4`
666- :math:`x \in y`
667- :math:`\alpha \wedge \omega`
668- :math:`223`
669- :math:`p`-Tree
670- Here’s some display math:
672 .. math:: \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
674- Here’s one that has a line break in it: :math:`\alpha + \omega \times x^2`.
676These shouldn’t be math:
678- To get the famous equation, write ``$e = mc^2$``.
679- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is
680 emphasized.)
681- Shoes ($20) and socks ($5).
682- Escaped ``$``: $73 *this should be emphasized* 23$.
684Here’s a LaTeX table:
686.. raw:: latex
688 \begin{tabular}{|l|l|}\hline
689 Animal & Number \\ \hline
690 Dog & 2 \\
691 Cat & 1 \\ \hline
692 \end{tabular}
694--------------
696Special Characters
697==================
699Here is some unicode:
701- I hat: Î
702- o umlaut: ö
703- section: §
704- set membership: ∈
705- copyright: ©
707AT&T has an ampersand in their name.
709AT&T is another way to write it.
711This & that.
7134 < 5.
7156 > 5.
717Backslash: \\
719Backtick: \`
721Asterisk: \*
723Underscore: \_
725Left brace: {
727Right brace: }
729Left bracket: [
731Right bracket: ]
733Left paren: (
735Right paren: )
737Greater-than: >
739Hash: #
741Period: .
743Bang: !
745Plus: +
747Minus: -
749--------------
751Links
752=====
754Explicit
755--------
757Just a `URL </url/>`__.
759`URL and title </url/>`__.
761`URL and title </url/>`__.
763`URL and title </url/>`__.
765`URL and title </url/>`__
767`URL and title </url/>`__
769`with\_underscore </url/with_underscore>`__
771`Email link <mailto:nobody@nowhere.net>`__
773`Empty <>`__.
775Reference
776---------
778Foo `bar </url/>`__.
780Foo `bar </url/>`__.
782Foo `bar </url/>`__.
784With `embedded [brackets] </url/>`__.
786`b </url/>`__ by itself should be a link.
788Indented `once </url>`__.
790Indented `twice </url>`__.
792Indented `thrice </url>`__.
794This should [not][] be a link.
796::
798 [not]: /url
800Foo `bar </url/>`__.
802Foo `biz </url/>`__.
804With ampersands
805---------------
807Here’s a `link with an ampersand in the
808URL <http://example.com/?foo=1&bar=2>`__.
810Here’s a link with an amersand in the link text: `AT&T <http://att.com/>`__.
812Here’s an `inline link </script?foo=1&bar=2>`__.
814Here’s an `inline link in pointy braces </script?foo=1&bar=2>`__.
816Autolinks
817---------
819With an ampersand: http://example.com/?foo=1&bar=2
821- In a list?
822- http://example.com/
823- It should.
825An e-mail address: nobody@nowhere.net
827 Blockquoted: http://example.com/
829Auto-links should not occur here: ``<http://example.com/>``
831::
833 or here: <http://example.com/>
835--------------
837Images
838======
840From “Voyage dans la Lune” by Georges Melies (1902):
842.. figure:: lalune.jpg
843 :alt: Voyage dans la Lune
845 lalune
847Here is a movie |movie| icon.
849--------------
851Footnotes
852=========
854Here is a footnote reference, [1]_ and another. [2]_ This should *not* be a
855footnote reference, because it contains a space.[^my note] Here is an inline
856note. [3]_
858 Notes can go in quotes. [4]_
8601. And in list items. [5]_
862This paragraph should not be part of the note, as it is not indented.
864.. [1]
865 Here is the footnote. It can go anywhere after the footnote reference. It
866 need not be placed at the end of the document.
868.. [2]
869 Here’s the long note. This one contains multiple blocks.
871 Subsequent blocks are indented to show that they belong to the footnote (as
872 with list items).
874 ::
876 { <code> }
878 If you want, you can indent every line, but you can also be lazy and just
879 indent the first line of each block.
881.. [3]
882 This is *easier* to type. Inline notes may contain
883 `links <http://google.com>`__ and ``]`` verbatim characters, as well as
884 [bracketed text].
886.. [4]
887 In quote.
889.. [5]
890 In list.
892.. |movie| image:: movie.jpg