git.iko.soy/typeable/pandoc
on 229b310 help sign in
750 lines 10 kB history raw
1.TH "Pandoc Test Suite" "" "July 17, 2006"
2.PP
3This is a set of tests for pandoc\. Most of them are adapted from
4John Gruber's markdown test suite\.
5.PP
6 * * * * *
7.SH Headers
8.SS Level 2 with an embedded link (/url)
9.SS Level 3 with \f[I]emphasis\f[]
10.SS Level 4
11.SS Level 5
12.SH Level 1
13.SS Level 2 with \f[I]emphasis\f[]
14.SS Level 3
15.PP
16with no blank line
17.SS Level 2
18.PP
19with no blank line
20.PP
21 * * * * *
22.SH Paragraphs
23.PP
24Here's a regular paragraph\.
25.PP
26In Markdown 1\.0\.0 and earlier\. Version 8\. This line turns into
27a list item\. Because a hard-wrapped line in the middle of a
28paragraph looked like a list item\.
29.PP
30Here's one with a bullet\. * criminey\.
31.PP
32There should be a hard line break
33.PD 0
34.P
35.PD
36here\.
37.PP
38 * * * * *
39.SH Block Quotes
40.PP
41E-mail style:
42.RS
43.PP
44This is a block quote\. It is pretty short\.
45.RE
46.RS
47.PP
48Code in a block quote:
49.PP
50\f[CR]
51 sub\ status\ {
52 \ \ \ \ print\ \"working\";
53 }
54\f[]
55.PP
56A list:
57.IP 1. 4
58item one
59.IP 2. 4
60item two
61.PP
62Nested block quotes:
63.RS
64.PP
65nested
66.RE
67.RS
68.PP
69nested
70.RE
71.RE
72.PP
73This should not be a block quote: 2 > 1\.
74.PP
75Box-style:
76.RS
77.PP
78Example:
79.PP
80\f[CR]
81 sub\ status\ {
82 \ \ \ \ print\ \"working\";
83 }
84\f[]
85.RE
86.RS
87.IP 1. 4
88do laundry
89.IP 2. 4
90take out the trash
91.RE
92.PP
93Here's a nested one:
94.RS
95.PP
96Joe said:
97.RS
98.PP
99Don't quote me\.
100.RE
101.RE
102.PP
103And a following paragraph\.
104.PP
105 * * * * *
106.SH Code Blocks
107.PP
108Code:
109.PP
110\f[CR]
111 ----\ (should\ be\ four\ hyphens)
113 sub\ status\ {
114 \ \ \ \ print\ \"working\";
115 }
117 this\ code\ block\ is\ indented\ by\ one\ tab
118\f[]
119.PP
120And:
121.PP
122\f[CR]
123 \ \ \ \ this\ code\ block\ is\ indented\ by\ two\ tabs
125 These\ should\ not\ be\ escaped:\ \ \\$\ \\\\\ \\>\ \\[\ \\{
126\f[]
127.PP
128 * * * * *
129.SH Lists
130.SS Unordered
131.PP
132Asterisks tight:
133.IP \[bu] 2
134asterisk 1
135.IP \[bu] 2
136asterisk 2
137.IP \[bu] 2
138asterisk 3
139.PP
140Asterisks loose:
141.IP \[bu] 2
142asterisk 1
143.IP \[bu] 2
144asterisk 2
145.IP \[bu] 2
146asterisk 3
147.PP
148Pluses tight:
149.IP \[bu] 2
150Plus 1
151.IP \[bu] 2
152Plus 2
153.IP \[bu] 2
154Plus 3
155.PP
156Pluses loose:
157.IP \[bu] 2
158Plus 1
159.IP \[bu] 2
160Plus 2
161.IP \[bu] 2
162Plus 3
163.PP
164Minuses tight:
165.IP \[bu] 2
166Minus 1
167.IP \[bu] 2
168Minus 2
169.IP \[bu] 2
170Minus 3
171.PP
172Minuses loose:
173.IP \[bu] 2
174Minus 1
175.IP \[bu] 2
176Minus 2
177.IP \[bu] 2
178Minus 3
179.SS Ordered
180.PP
181Tight:
182.IP 1. 4
183First
184.IP 2. 4
185Second
186.IP 3. 4
187Third
188.PP
189and:
190.IP 1. 4
191One
192.IP 2. 4
193Two
194.IP 3. 4
195Three
196.PP
197Loose using tabs:
198.IP 1. 4
199First
200.IP 2. 4
201Second
202.IP 3. 4
203Third
204.PP
205and using spaces:
206.IP 1. 4
207One
208.IP 2. 4
209Two
210.IP 3. 4
211Three
212.PP
213Multiple paragraphs:
214.IP 1. 4
215Item 1, graf one\.
216.RS 4
217.PP
218Item 1\. graf two\. The quick brown fox jumped over the lazy dog's
219back\.
220.RE
221.IP 2. 4
222Item 2\.
223.IP 3. 4
224Item 3\.
225.SS Nested
226.IP \[bu] 2
227Tab
228.RS 2
229.IP \[bu] 2
230Tab
231.RS 2
232.IP \[bu] 2
233Tab
234.RE
235.RE
236.PP
237Here's another:
238.IP 1. 4
239First
240.IP 2. 4
241Second:
242.RS 4
243.IP \[bu] 2
244Fee
245.IP \[bu] 2
246Fie
247.IP \[bu] 2
248Foe
249.RE
250.IP 3. 4
251Third
252.PP
253Same thing but with paragraphs:
254.IP 1. 4
255First
256.IP 2. 4
257Second:
258.RS 4
259.IP \[bu] 2
260Fee
261.IP \[bu] 2
262Fie
263.IP \[bu] 2
264Foe
265.RE
266.IP 3. 4
267Third
268.SS Tabs and spaces
269.IP \[bu] 2
270this is a list item indented with tabs
271.IP \[bu] 2
272this is a list item indented with spaces
273.RS 2
274.IP \[bu] 2
275this is an example list item indented with tabs
276.IP \[bu] 2
277this is an example list item indented with spaces
278.RE
279.PP
280 * * * * *
281.SH Definition Lists
282.PP
283Tight using spaces:
284.TP
285.B apple
286red fruit
287.RS
288.RE
289.TP
290.B orange
291orange fruit
292.RS
293.RE
294.TP
295.B banana
296yellow fruit
297.RS
298.RE
299.PP
300Tight using tabs:
301.TP
302.B apple
303red fruit
304.RS
305.RE
306.TP
307.B orange
308orange fruit
309.RS
310.RE
311.TP
312.B banana
313yellow fruit
314.RS
315.RE
316.PP
317Loose:
318.TP
319.B apple
320red fruit
321.RS
322.RE
323.TP
324.B orange
325orange fruit
326.RS
327.RE
328.TP
329.B banana
330yellow fruit
331.RS
332.RE
333.PP
334Multiple blocks with italics:
335.TP
336.B \f[I]apple\f[]
337red fruit
338.RS
339.PP
340contains seeds, crisp, pleasant to taste
341.RE
342.TP
343.B \f[I]orange\f[]
344orange fruit
345.RS
346.PP
347\f[CR]
348 {\ orange\ code\ block\ }
349\f[]
350.RS
351.PP
352orange block quote
353.RE
354.RE
355.SH HTML Blocks
356.PP
357Simple block on one line:
358<div>
359foo
360</div>
362.PP
363And nested without indentation:
364<div>
365<div>
366<div>
367foo
368</div>
369</div>
370<div>
371bar
372</div>
373</div>
375.PP
376Interpreted markdown in a table:
377<table>
378<tr>
379<td>
380This is \f[I]emphasized\f[]
381</td>
382<td>
383And this is \f[B]strong\f[]
384</td>
385</tr>
386</table>
388<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
390.PP
391Here's a simple block:
392<div>
394foo
395</div>
397.PP
398This should be a code block, though:
399.PP
400\f[CR]
401 <div>
402 \ \ \ \ foo
403 </div>
404\f[]
405.PP
406As should this:
407.PP
408\f[CR]
409 <div>foo</div>
410\f[]
411.PP
412Now, nested:
413<div>
414 <div>
415 <div>
417foo
418</div>
419 </div>
420</div>
422.PP
423This should just be an HTML comment:
424<!-- Comment -->
426.PP
427Multiline:
428<!--
429Blah
430Blah
431-->
433<!--
434 This is another comment.
435-->
437.PP
438Code block:
439.PP
440\f[CR]
441 <!--\ Comment\ -->
442\f[]
443.PP
444Just plain comment, with trailing spaces on the line:
445<!-- foo -->
447.PP
448Code:
449.PP
450\f[CR]
451 <hr\ />
452\f[]
453.PP
454Hr's:
455<hr>
457<hr />
459<hr />
461<hr>
463<hr />
465<hr />
467<hr class="foo" id="bar" />
469<hr class="foo" id="bar" />
471<hr class="foo" id="bar">
473.PP
474 * * * * *
475.SH Inline Markup
476.PP
477This is \f[I]emphasized\f[], and so \f[I]is this\f[]\.
478.PP
479This is \f[B]strong\f[], and so \f[B]is this\f[]\.
480.PP
481An \f[I]emphasized link (/url)\f[]\.
482.PP
483\f[B]\f[I]This is strong and em\.\f[]\f[]
484.PP
485So is \f[B]\f[I]this\f[]\f[] word\.
486.PP
487\f[B]\f[I]This is strong and em\.\f[]\f[]
488.PP
489So is \f[B]\f[I]this\f[]\f[] word\.
490.PP
491This is code: \f[B]>\f[], \f[B]$\f[], \f[B]\\\f[], \f[B]\\$\f[],
492\f[B]<html>\f[]\.
493.PP
494 * * * * *
495.SH Smart quotes, ellipses, dashes
496.PP
497\[lq]Hello,\[rq] said the spider\. \[lq]`Shelob' is my name\.\[rq]
498.PP
499`A', `B', and `C' are letters\.
500.PP
501`Oak,' `elm,' and `beech' are names of trees\. So is `pine\.'
502.PP
503`He said, \[lq]I want to go\.\[rq]' Were you alive in the 70's?
504.PP
505Here is some quoted `\f[B]code\f[]' and a
506\[lq]quoted link (http://example.com/?foo=1&bar=2)\[rq]\.
507.PP
508Some dashes: one\[em]two\[em]three\[em]four\[em]five\.
509.PP
510Dashes between numbers: 5\[en]7, 255\[en]66, 1987\[en]1999\.
511.PP
512Ellipses\&...and\&...and\&...\.
513.PP
514 * * * * *
515.SH LaTeX
516.IP \[bu] 2
517\\cite[22-23]{smith\.1899}
518.IP \[bu] 2
519\\doublespacing
520.IP \[bu] 2
521$2+2=4$
522.IP \[bu] 2
523$x\ \\in\ y$
524.IP \[bu] 2
525$\\alpha\ \\wedge\ \\omega$
526.IP \[bu] 2
527$223$
528.IP \[bu] 2
529$p$-Tree
530.IP \[bu] 2
531$\\frac{d}{dx}f(x)=\\lim_{h\\to\ 0}\\frac{f(x+h)-f(x)}{h}$
532.IP \[bu] 2
533Here's one that has a line break in it:
534$\\alpha\ +\ \\omega\ \\times\ x^2$\.
535.PP
536These shouldn't be math:
537.IP \[bu] 2
538To get the famous equation, write \f[B]$e\ =\ mc^2$\f[]\.
539.IP \[bu] 2
540$22,000 is a \f[I]lot\f[] of money\. So is $34,000\. (It worked if
541\[lq]lot\[rq] is emphasized\.)
542.IP \[bu] 2
543Escaped \f[B]$\f[]: $73 \f[I]this should be emphasized\f[] 23$\.
544.PP
545Here's a LaTeX table:
546.PP
547\\begin{tabular}{|l|l|}\\hline
548Animal\ &\ Number\ \\\\\ \\hline
549Dog\ \ \ \ &\ 2\ \ \ \ \ \ \\\\
550Cat\ \ \ \ &\ 1\ \ \ \ \ \ \\\\\ \\hline
551\\end{tabular}
552.PP
553 * * * * *
554.SH Special Characters
555.PP
556Here is some unicode:
557.IP \[bu] 2
558I hat: Î
559.IP \[bu] 2
560o umlaut: ö
561.IP \[bu] 2
562section: §
563.IP \[bu] 2
564set membership: ∈
565.IP \[bu] 2
566copyright: ©
567.PP
568AT&T has an ampersand in their name\.
569.PP
570AT&T is another way to write it\.
571.PP
572This & that\.
573.PP
5744 < 5\.
575.PP
5766 > 5\.
577.PP
578Backslash: \\
579.PP
580Backtick: `
581.PP
582Asterisk: *
583.PP
584Underscore: _
585.PP
586Left brace: {
587.PP
588Right brace: }
589.PP
590Left bracket: [
591.PP
592Right bracket: ]
593.PP
594Left paren: (
595.PP
596Right paren: )
597.PP
598Greater-than: >
599.PP
600Hash: #
601.PP
602Period: \.
603.PP
604Bang: !
605.PP
606Plus: +
607.PP
608Minus: -
609.PP
610 * * * * *
611.SH Links
612.SS Explicit
613.PP
614Just a URL (/url/)\.
615.PP
616URL and title (/url/)\.
617.PP
618URL and title (/url/)\.
619.PP
620URL and title (/url/)\.
621.PP
622URL and title (/url/)
623.PP
624URL and title (/url/)
625.PP
626with_underscore (/url/with_underscore)
627.PP
628Email link (mailto:nobody@nowhere.net)
629.PP
630Empty ()\.
631.SS Reference
632.PP
633Foo bar (/url/)\.
634.PP
635Foo bar (/url/)\.
636.PP
637Foo bar (/url/)\.
638.PP
639With embedded [brackets] (/url/)\.
640.PP
641b (/url/) by itself should be a link\.
642.PP
643Indented once (/url)\.
644.PP
645Indented twice (/url)\.
646.PP
647Indented thrice (/url)\.
648.PP
649This should [not][] be a link\.
650.PP
651\f[CR]
652 [not]:\ /url
653\f[]
654.PP
655Foo bar (/url/)\.
656.PP
657Foo biz (/url/)\.
658.SS With ampersands
659.PP
660Here's a
661link with an ampersand in the URL (http://example.com/?foo=1&bar=2)\.
662.PP
663Here's a link with an amersand in the link text:
664AT&T (http://att.com/)\.
665.PP
666Here's an inline link (/script?foo=1&bar=2)\.
667.PP
668Here's an inline link in pointy braces (/script?foo=1&bar=2)\.
669.SS Autolinks
670.PP
671With an ampersand: <http://example.com/?foo=1&bar=2>
672.IP \[bu] 2
673In a list?
674.IP \[bu] 2
675<http://example.com/>
676.IP \[bu] 2
677It should\.
678.PP
679An e-mail address: <nobody@nowhere.net>
680.RS
681.PP
682Blockquoted: <http://example.com/>
683.RE
684.PP
685Auto-links should not occur here: \f[B]<http://example\.com/>\f[]
686.PP
687\f[CR]
688 or\ here:\ <http://example\.com/>
689\f[]
690.PP
691 * * * * *
692.SH Images
693.PP
694From \[lq]Voyage dans la Lune\[rq] by Georges Melies (1902):
695.PP
696[IMAGE: lalune (lalune.jpg)]
697.PP
698Here is a movie [IMAGE: movie (movie.jpg)] icon\.
699.PP
700 * * * * *
701.SH Footnotes
702.PP
703Here is a footnote reference,[1] and another\.[2] This should
704\f[I]not\f[] be a footnote reference, because it contains a
705space\.[^my note] Here is an inline note\.[3]
706.RS
707.PP
708Notes can go in quotes\.[4]
709.RE
710.IP 1. 4
711And in list items\.[5]
712.PP
713This paragraph should not be part of the note, as it is not
714indented\.
715.SH NOTES
717.SS [1]
718.PP
719Here is the footnote\. It can go anywhere after the footnote
720reference\. It need not be placed at the end of the document\.
722.SS [2]
723.PP
724Here's the long note\. This one contains multiple blocks\.
725.PP
726Subsequent blocks are indented to show that they belong to the
727footnote (as with list items)\.
728.PP
729\f[CR]
730 \ \ {\ <code>\ }
731\f[]
732.PP
733If you want, you can indent every line, but you can also be lazy
734and just indent the first line of each block\.
736.SS [3]
737.PP
738This is \f[I]easier\f[] to type\. Inline notes may contain
739links (http://google.com) and \f[B]]\f[] verbatim characters, as
740well as [bracketed text]\.
742.SS [4]
743.PP
744In quote\.
746.SS [5]
747.PP
748In list\.
749.SH AUTHORS
750John MacFarlane, Anonymous