git.iko.soy/typeable/pandoc
on 1.10.0.4 help sign in
774 lines 10 kB history raw
1#+TITLE: Pandoc Test Suite
3#+AUTHOR: John MacFarlane; Anonymous
4#+DATE: July 17, 2006
6This is a set of tests for pandoc. Most of them are adapted from John Gruber's
7markdown test suite.
9--------------
11* Headers
13** Level 2 with an [[/url][embedded link]]
15*** Level 3 with /emphasis/
17**** Level 4
19***** Level 5
21* Level 1
23** Level 2 with /emphasis/
25*** Level 3
27with no blank line
29** Level 2
31with no blank line
33--------------
35* Paragraphs
37Here's a regular paragraph.
39In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
40Because a hard-wrapped line in the middle of a paragraph looked like a list
41item.
43Here's one with a bullet. * criminey.
45There should be a hard line break
46here.
48--------------
50* Block Quotes
52E-mail style:
54#+BEGIN_QUOTE
55 This is a block quote. It is pretty short.
56#+END_QUOTE
58#+BEGIN_QUOTE
59 Code in a block quote:
61 #+BEGIN_EXAMPLE
62 sub status {
63 print "working";
64 }
65 #+END_EXAMPLE
67 A list:
69 1. item one
70 2. item two
72 Nested block quotes:
74 #+BEGIN_QUOTE
75 nested
76 #+END_QUOTE
78 #+BEGIN_QUOTE
79 nested
80 #+END_QUOTE
81#+END_QUOTE
83This should not be a block quote: 2 > 1.
85And a following paragraph.
87--------------
89* Code Blocks
91Code:
93#+BEGIN_EXAMPLE
94 ---- (should be four hyphens)
96 sub status {
97 print "working";
98 }
100 this code block is indented by one tab
101#+END_EXAMPLE
103And:
105#+BEGIN_EXAMPLE
106 this code block is indented by two tabs
108 These should not be escaped: \$ \\ \> \[ \{
109#+END_EXAMPLE
111--------------
113* Lists
115** Unordered
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
159** Ordered
161Tight:
1631. First
1642. Second
1653. Third
167and:
1691. One
1702. Two
1713. Three
173Loose using tabs:
1751. First
1772. Second
1793. Third
181and using spaces:
1831. One
1852. Two
1873. Three
189Multiple paragraphs:
1911. Item 1, graf one.
193 Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
1952. Item 2.
1973. Item 3.
199** Nested
201- Tab
203 - Tab
205 - Tab
207Here's another:
2091. First
2102. Second:
212 - Fee
213 - Fie
214 - Foe
2163. Third
218Same thing but with paragraphs:
2201. First
2222. Second:
224 - Fee
225 - Fie
226 - Foe
2283. Third
230** Tabs and spaces
232- this is a list item indented with tabs
234- this is a list item indented with spaces
236 - this is an example list item indented with tabs
238 - this is an example list item indented with spaces
240** Fancy list markers
2422) begins with 2
2433) and now 3
245 with a continuation
247 4. sublist with roman numerals, starting with 4
248 5. more items
250 1) a subsublist
251 2) a subsublist
253Nesting:
2551. Upper Alpha
257 1. Upper Roman.
259 6) Decimal start with 6
261 3) Lower alpha with paren
263Autonumbering:
2651. Autonumber.
2662. More.
268 1. Nested.
270Should not be a list item:
272M.A. 2007
274B. Williams
276--------------
278* Definition Lists
280Tight using spaces:
282- apple :: red fruit
283- orange :: orange fruit
284- banana :: yellow fruit
286Tight using tabs:
288- apple :: red fruit
289- orange :: orange fruit
290- banana :: yellow fruit
292Loose:
294- apple :: red fruit
296- orange :: orange fruit
298- banana :: yellow fruit
300Multiple blocks with italics:
302- /apple/ :: red fruit
304 contains seeds, crisp, pleasant to taste
306- /orange/ :: orange fruit
308 #+BEGIN_EXAMPLE
309 { orange code block }
310 #+END_EXAMPLE
312 #+BEGIN_QUOTE
313 orange block quote
314 #+END_QUOTE
316Multiple definitions, tight:
318- apple :: red fruit
319 computer
320- orange :: orange fruit
321 bank
323Multiple definitions, loose:
325- apple :: red fruit
327 computer
329- orange :: orange fruit
331 bank
333Blank line after term, indented marker, alternate markers:
335- apple :: red fruit
337 computer
339- orange :: orange fruit
341 1. sublist
342 2. sublist
344* HTML Blocks
346Simple block on one line:
348#+BEGIN_HTML
349 <div>
350#+END_HTML
352foo
354#+BEGIN_HTML
355 </div>
356#+END_HTML
358And nested without indentation:
360#+BEGIN_HTML
361 <div>
362 <div>
363 <div>
364#+END_HTML
366foo
368#+BEGIN_HTML
369 </div>
370 </div>
371 <div>
372#+END_HTML
374bar
376#+BEGIN_HTML
377 </div>
378 </div>
379#+END_HTML
381Interpreted markdown in a table:
383#+BEGIN_HTML
384 <table>
385 <tr>
386 <td>
387#+END_HTML
389This is /emphasized/
391#+BEGIN_HTML
392 </td>
393 <td>
394#+END_HTML
396And this is *strong*
398#+BEGIN_HTML
399 </td>
400 </tr>
401 </table>
403 <script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
404#+END_HTML
406Here's a simple block:
408#+BEGIN_HTML
409 <div>
411#+END_HTML
413foo
415#+BEGIN_HTML
416 </div>
417#+END_HTML
419This should be a code block, though:
421#+BEGIN_EXAMPLE
422 <div>
423 foo
424 </div>
425#+END_EXAMPLE
427As should this:
429#+BEGIN_EXAMPLE
430 <div>foo</div>
431#+END_EXAMPLE
433Now, nested:
435#+BEGIN_HTML
436 <div>
437 <div>
438 <div>
440#+END_HTML
442foo
444#+BEGIN_HTML
445 </div>
446 </div>
447 </div>
448#+END_HTML
450This should just be an HTML comment:
452#+BEGIN_HTML
453 <!-- Comment -->
454#+END_HTML
456Multiline:
458#+BEGIN_HTML
459 <!--
460 Blah
461 Blah
462 -->
464 <!--
465 This is another comment.
466 -->
467#+END_HTML
469Code block:
471#+BEGIN_EXAMPLE
472 <!-- Comment -->
473#+END_EXAMPLE
475Just plain comment, with trailing spaces on the line:
477#+BEGIN_HTML
478 <!-- foo -->
479#+END_HTML
481Code:
483#+BEGIN_EXAMPLE
484 <hr />
485#+END_EXAMPLE
487Hr's:
489#+BEGIN_HTML
490 <hr>
492 <hr />
494 <hr />
496 <hr>
498 <hr />
500 <hr />
502 <hr class="foo" id="bar" />
504 <hr class="foo" id="bar" />
506 <hr class="foo" id="bar">
507#+END_HTML
509--------------
511* Inline Markup
513This is /emphasized/, and so /is this/.
515This is *strong*, and so *is this*.
517An /[[/url][emphasized link]]/.
519*/This is strong and em./*
521So is */this/* word.
523*/This is strong and em./*
525So is */this/* word.
527This is code: =>=, =$=, =\=, =\$=, =<html>=.
529+This is /strikeout/.+
531Superscripts: a^{bc}d a^{/hello/} a^{hello there}.
533Subscripts: H_{2}O, H_{23}O, H_{many of them}O.
535These should not be superscripts or subscripts, because of the unescaped
536spaces: a\^b c\^d, a~b c~d.
538--------------
540* Smart quotes, ellipses, dashes
542"Hello," said the spider. "'Shelob' is my name."
544'A', 'B', and 'C' are letters.
546'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
548'He said, "I want to go."' Were you alive in the 70's?
550Here is some quoted '=code=' and a "[[http://example.com/?foo=1&bar=2][quoted
551link]]".
553Some dashes: one---two --- three---four --- five.
555Dashes between numbers: 5--7, 255--66, 1987--1999.
557Ellipses...and...and....
559--------------
561* LaTeX
563- \cite[22-23]{smith.1899}
564- $2+2=4$
565- $x \in y$
566- $\alpha \wedge \omega$
567- $223$
568- $p$-Tree
569- Here's some display math:
570 $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
571- Here's one that has a line break in it: $\alpha + \omega \times x^2$.
573These shouldn't be math:
575- To get the famous equation, write =$e = mc^2$=.
576- $22,000 is a /lot/ of money. So is $34,000. (It worked if "lot" is
577 emphasized.)
578- Shoes ($20) and socks ($5).
579- Escaped =$=: $73 /this should be emphasized/ 23$.
581Here's a LaTeX table:
583\begin{tabular}{|l|l|}\hline
584Animal & Number \\ \hline
585Dog & 2 \\
586Cat & 1 \\ \hline
587\end{tabular}
589--------------
591* Special Characters
593Here is some unicode:
595- I hat: Î
596- o umlaut: ö
597- section: §
598- set membership: ∈
599- copyright: ©
601AT&T has an ampersand in their name.
603AT&T is another way to write it.
605This & that.
6074 < 5.
6096 > 5.
611Backslash: \
613Backtick: `
615Asterisk: *
617Underscore: \_
619Left brace: {
621Right brace: }
623Left bracket: [
625Right bracket: ]
627Left paren: (
629Right paren: )
631Greater-than: >
633Hash: #
635Period: .
637Bang: !
639Plus: +
641Minus: -
643--------------
645* Links
647** Explicit
649Just a [[/url/][URL]].
651[[/url/][URL and title]].
653[[/url/][URL and title]].
655[[/url/][URL and title]].
657[[/url/][URL and title]]
659[[/url/][URL and title]]
661[[/url/with_underscore][with\_underscore]]
663[[mailto:nobody@nowhere.net][Email link]]
665[[][Empty]].
667** Reference
669Foo [[/url/][bar]].
671Foo [[/url/][bar]].
673Foo [[/url/][bar]].
675With [[/url/][embedded [brackets]]].
677[[/url/][b]] by itself should be a link.
679Indented [[/url][once]].
681Indented [[/url][twice]].
683Indented [[/url][thrice]].
685This should [not][] be a link.
687#+BEGIN_EXAMPLE
688 [not]: /url
689#+END_EXAMPLE
691Foo [[/url/][bar]].
693Foo [[/url/][biz]].
695** With ampersands
697Here's a [[http://example.com/?foo=1&bar=2][link with an ampersand in the
698URL]].
700Here's a link with an amersand in the link text: [[http://att.com/][AT&T]].
702Here's an [[/script?foo=1&bar=2][inline link]].
704Here's an [[/script?foo=1&bar=2][inline link in pointy braces]].
706** Autolinks
708With an ampersand: [[http://example.com/?foo=1&bar=2]]
710- In a list?
711- [[http://example.com/]]
712- It should.
714An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]]
716#+BEGIN_QUOTE
717 Blockquoted: [[http://example.com/]]
718#+END_QUOTE
720Auto-links should not occur here: =<http://example.com/>=
722#+BEGIN_EXAMPLE
723 or here: <http://example.com/>
724#+END_EXAMPLE
726--------------
728* Images
730From "Voyage dans la Lune" by Georges Melies (1902):
732#+CAPTION: lalune
734[[lalune.jpg]]
735Here is a movie [[movie.jpg]] icon.
737--------------
739* Footnotes
741Here is a footnote reference, [1] and another. [2] This should /not/ be a
742footnote reference, because it contains a space.[\^my note] Here is an inline
743note. [3]
745#+BEGIN_QUOTE
746 Notes can go in quotes. [4]
747#+END_QUOTE
7491. And in list items. [5]
751This paragraph should not be part of the note, as it is not indented.
753[1] Here is the footnote. It can go anywhere after the footnote reference. It
754 need not be placed at the end of the document.
756[2] Here's the long note. This one contains multiple blocks.
758 Subsequent blocks are indented to show that they belong to the footnote
759 (as with list items).
761 #+BEGIN_EXAMPLE
762 { <code> }
763 #+END_EXAMPLE
765 If you want, you can indent every line, but you can also be lazy and just
766 indent the first line of each block.
768[3] This is /easier/ to type. Inline notes may contain
769 [[http://google.com][links]] and =]= verbatim characters, as well as
770 [bracketed text].
772[4] In quote.
774[5] In list.