git.iko.soy/typeable/pandoc
on commonmark-github help sign in
1005 lines 15 kB history raw
1.\" **** Custom macro definitions *********************************
2.\" * Super/subscript
3.\" (https://lists.gnu.org/archive/html/groff/2012-07/msg00046.html)
4.ds { \v'-0.3m'\\s[\\n[.s]*9u/12u]
5.ds } \s0\v'0.3m'
6.ds < \v'0.3m'\s[\\n[.s]*9u/12u]
7.ds > \s0\v'-0.3m'
8.\" * Horizontal line
9.de HLINE
10.LP
11.ce
12\l'20'
13..
14.\" **** Settings *************************************************
15.\" text width
16.nr LL 5.5i
17.\" left margin
18.nr PO 1.25i
19.\" top margin
20.nr HM 1.25i
21.\" bottom margin
22.nr FM 1.25i
23.\" header/footer width
24.nr LT \n[LL]
25.\" point size
26.nr PS 10p
27.\" line height
28.nr VS 12p
29.\" font family: A, BM, H, HN, N, P, T, ZCM
30.fam T
31.\" paragraph indent
32.nr PI 2m
33.\" interparagraph space
34.nr PD 0.33v
35.\" footnote width
36.nr FL \n[LL]
37.\" footnote point size
38.nr FPS (\n[PS] - 2000)
39.\" color used for strikeout
40.defcolor strikecolor rgb 0.7 0.7 0.7
41.\" color for links (rgb)
42.ds PDFHREF.COLOUR 0.35 0.00 0.60
43.\" border for links (default none)
44.ds PDFHREF.BORDER 0 0 0
45.\" point size difference between heading levels
46.nr PSINCR 1p
47.\" heading level above which point size no longer changes
48.nr GROWPS 2
49.\" comment these out if you want a dot after section numbers:
50.als SN SN-NO-DOT
51.als SN-STYLE SN-NO-DOT
52.\" pdf outline fold level
53.nr PDFOUTLINE.FOLDLEVEL 3
54.\" start out in outline view
55.pdfview /PageMode /UseOutlines
56.\" ***************************************************************
57.\" PDF metadata
58.pdfinfo /Title "Pandoc Test Suite"
59.pdfinfo /Author "John MacFarlane; Anonymous"
60.hy
61.EQ
62delim @@
63.EN
64.TL
65Pandoc Test Suite
66.AU
67John MacFarlane
68.AU
69Anonymous
70.ND "July 17, 2006"
71.\" 1 column (use .2C for two column)
72.1C
73.LP
74This is a set of tests for pandoc.
75Most of them are adapted from John Gruber's markdown test suite.
76.HLINE
77.SH 1
78Headers
79.pdfhref O 1 "Headers"
80.pdfhref M "headers"
81.SH 2
82Level 2 with an \c
83.pdfhref W -D "/url" -A "\c" \
84 -- "embedded link"
85\&
86.pdfhref O 2 "Level 2 with an embedded link"
87.pdfhref M "level-2-with-an-embedded-link"
88.SH 3
89Level 3 with \f[I]emphasis\f[]
90.pdfhref O 3 "Level 3 with emphasis"
91.pdfhref M "level-3-with-emphasis"
92.SH 4
93Level 4
94.pdfhref O 4 "Level 4"
95.pdfhref M "level-4"
96.SH 5
97Level 5
98.pdfhref O 5 "Level 5"
99.pdfhref M "level-5"
100.SH 1
101Level 1
102.pdfhref O 1 "Level 1"
103.pdfhref M "level-1"
104.SH 2
105Level 2 with \f[I]emphasis\f[]
106.pdfhref O 2 "Level 2 with emphasis"
107.pdfhref M "level-2-with-emphasis"
108.SH 3
109Level 3
110.pdfhref O 3 "Level 3"
111.pdfhref M "level-3"
112.LP
113with no blank line
114.SH 2
115Level 2
116.pdfhref O 2 "Level 2"
117.pdfhref M "level-2"
118.LP
119with no blank line
120.HLINE
121.SH 1
122Paragraphs
123.pdfhref O 1 "Paragraphs"
124.pdfhref M "paragraphs"
125.LP
126Here's a regular paragraph.
127.PP
128In Markdown 1.0.0 and earlier.
129Version 8.
130This line turns into a list item.
131Because a hard\-wrapped line in the middle of a paragraph looked like a list
132item.
133.PP
134Here's one with a bullet.
135* criminey.
136.PP
137There should be a hard line break
138.br
139here.
140.HLINE
141.SH 1
142Block Quotes
143.pdfhref O 1 "Block Quotes"
144.pdfhref M "block-quotes"
145.LP
146E\-mail style:
147.RS
148.LP
149This is a block quote.
150It is pretty short.
151.RE
152.RS
153.LP
154Code in a block quote:
155.IP
156.nf
157\f[C]
158sub\ status\ {
159\ \ \ \ print\ \[dq]working\[dq];
161\f[]
162.fi
163.LP
164A list:
165.IP " 1." 4
166item one
167.IP " 2." 4
168item two
169.LP
170Nested block quotes:
171.RS
172.LP
173nested
174.RE
175.RS
176.LP
177nested
178.RE
179.RE
180.LP
181This should not be a block quote: 2 > 1.
182.PP
183And a following paragraph.
184.HLINE
185.SH 1
186Code Blocks
187.pdfhref O 1 "Code Blocks"
188.pdfhref M "code-blocks"
189.LP
190Code:
191.IP
192.nf
193\f[C]
194\-\-\-\-\ (should\ be\ four\ hyphens)
196sub\ status\ {
197\ \ \ \ print\ \[dq]working\[dq];
200this\ code\ block\ is\ indented\ by\ one\ tab
201\f[]
202.fi
203.LP
204And:
205.IP
206.nf
207\f[C]
208\ \ \ \ this\ code\ block\ is\ indented\ by\ two\ tabs
210These\ should\ not\ be\ escaped:\ \ \\$\ \\\\\ \\>\ \\[\ \\{
211\f[]
212.fi
213.HLINE
214.SH 1
215Lists
216.pdfhref O 1 "Lists"
217.pdfhref M "lists"
218.SH 2
219Unordered
220.pdfhref O 2 "Unordered"
221.pdfhref M "unordered"
222.LP
223Asterisks tight:
224.IP \[bu] 3
225asterisk 1
226.IP \[bu] 3
227asterisk 2
228.IP \[bu] 3
229asterisk 3
230.LP
231Asterisks loose:
232.IP \[bu] 3
233asterisk 1
234.IP \[bu] 3
235asterisk 2
236.IP \[bu] 3
237asterisk 3
238.LP
239Pluses tight:
240.IP \[bu] 3
241Plus 1
242.IP \[bu] 3
243Plus 2
244.IP \[bu] 3
245Plus 3
246.LP
247Pluses loose:
248.IP \[bu] 3
249Plus 1
250.IP \[bu] 3
251Plus 2
252.IP \[bu] 3
253Plus 3
254.LP
255Minuses tight:
256.IP \[bu] 3
257Minus 1
258.IP \[bu] 3
259Minus 2
260.IP \[bu] 3
261Minus 3
262.LP
263Minuses loose:
264.IP \[bu] 3
265Minus 1
266.IP \[bu] 3
267Minus 2
268.IP \[bu] 3
269Minus 3
270.SH 2
271Ordered
272.pdfhref O 2 "Ordered"
273.pdfhref M "ordered"
274.LP
275Tight:
276.IP " 1." 4
277First
278.IP " 2." 4
279Second
280.IP " 3." 4
281Third
282.LP
283and:
284.IP " 1." 4
285One
286.IP " 2." 4
287Two
288.IP " 3." 4
289Three
290.LP
291Loose using tabs:
292.IP " 1." 4
293First
294.IP " 2." 4
295Second
296.IP " 3." 4
297Third
298.LP
299and using spaces:
300.IP " 1." 4
301One
302.IP " 2." 4
303Two
304.IP " 3." 4
305Three
306.LP
307Multiple paragraphs:
308.IP " 1." 4
309Item 1, graf one.
310.RS 4
311.PP
312Item 1.
313graf two.
314The quick brown fox jumped over the lazy dog's back.
315.RE
316.IP " 2." 4
317Item 2.
318.IP " 3." 4
319Item 3.
320.SH 2
321Nested
322.pdfhref O 2 "Nested"
323.pdfhref M "nested"
324.IP \[bu] 3
325Tab
326.RS 3
327.IP \[bu] 3
328Tab
329.RS 3
330.IP \[bu] 3
331Tab
332.RE
333.RE
334.LP
335Here's another:
336.IP " 1." 4
337First
338.IP " 2." 4
339Second:
340.RS 4
341.IP \[bu] 3
342Fee
343.IP \[bu] 3
344Fie
345.IP \[bu] 3
346Foe
347.RE
348.IP " 3." 4
349Third
350.LP
351Same thing but with paragraphs:
352.IP " 1." 4
353First
354.IP " 2." 4
355Second:
356.RS 4
357.IP \[bu] 3
358Fee
359.IP \[bu] 3
360Fie
361.IP \[bu] 3
362Foe
363.RE
364.IP " 3." 4
365Third
366.SH 2
367Tabs and spaces
368.pdfhref O 2 "Tabs and spaces"
369.pdfhref M "tabs-and-spaces"
370.IP \[bu] 3
371this is a list item indented with tabs
372.IP \[bu] 3
373this is a list item indented with spaces
374.RS 3
375.IP \[bu] 3
376this is an example list item indented with tabs
377.IP \[bu] 3
378this is an example list item indented with spaces
379.RE
380.SH 2
381Fancy list markers
382.pdfhref O 2 "Fancy list markers"
383.pdfhref M "fancy-list-markers"
384.IP " (2)" 5
385begins with 2
386.IP " (3)" 5
387and now 3
388.RS 5
389.LP
390with a continuation
391.IP " iv." 5
392sublist with roman numerals, starting with 4
393.IP " v." 5
394more items
395.RS 5
396.IP " (A)" 5
397a subsublist
398.IP " (B)" 5
399a subsublist
400.RE
401.RE
402.LP
403Nesting:
404.IP " A." 4
405Upper Alpha
406.RS 4
407.IP " I." 4
408Upper Roman.
409.RS 4
410.IP " (6)" 5
411Decimal start with 6
412.RS 5
413.IP " c)" 4
414Lower alpha with paren
415.RE
416.RE
417.RE
418.LP
419Autonumbering:
420.IP " 1." 4
421Autonumber.
422.IP " 2." 4
423More.
424.RS 4
425.IP " 1." 4
426Nested.
427.RE
428.LP
429Should not be a list item:
430.PP
431M.A.\~2007
432.PP
433B.
434Williams
435.HLINE
436.SH 1
437Definition Lists
438.pdfhref O 1 "Definition Lists"
439.pdfhref M "definition-lists"
440.LP
441Tight using spaces:
442.IP "apple"
443red fruit
444.RS
445.RE
446.IP "orange"
447orange fruit
448.RS
449.RE
450.IP "banana"
451yellow fruit
452.RS
453.RE
454.LP
455Tight using tabs:
456.IP "apple"
457red fruit
458.RS
459.RE
460.IP "orange"
461orange fruit
462.RS
463.RE
464.IP "banana"
465yellow fruit
466.RS
467.RE
468.LP
469Loose:
470.IP "apple"
471red fruit
472.RS
473.RE
474.IP "orange"
475orange fruit
476.RS
477.RE
478.IP "banana"
479yellow fruit
480.RS
481.RE
482.LP
483Multiple blocks with italics:
484.IP "\f[I]apple\f[]"
485red fruit
486.RS
487.PP
488contains seeds, crisp, pleasant to taste
489.RE
490.IP "\f[I]orange\f[]"
491orange fruit
492.RS
493.IP
494.nf
495\f[C]
496{\ orange\ code\ block\ }
497\f[]
498.fi
499.RS
500.LP
501orange block quote
502.RE
503.RE
504.LP
505Multiple definitions, tight:
506.IP "apple"
507red fruit
508.RS
509.RE
510computer
511.RS
512.RE
513.IP "orange"
514orange fruit
515.RS
516.RE
517bank
518.RS
519.RE
520.LP
521Multiple definitions, loose:
522.IP "apple"
523red fruit
524.RS
525.RE
526computer
527.RS
528.RE
529.IP "orange"
530orange fruit
531.RS
532.RE
533bank
534.RS
535.RE
536.LP
537Blank line after term, indented marker, alternate markers:
538.IP "apple"
539red fruit
540.RS
541.RE
542computer
543.RS
544.RE
545.IP "orange"
546orange fruit
547.RS
548.IP " 1." 4
549sublist
550.IP " 2." 4
551sublist
552.RE
553.SH 1
554HTML Blocks
555.pdfhref O 1 "HTML Blocks"
556.pdfhref M "html-blocks"
557.LP
558Simple block on one line:
559foo
560.LP
561And nested without indentation:
562.LP
563foo
564bar
565.LP
566Interpreted markdown in a table:
567This is \f[I]emphasized\f[]
568And this is \f[B]strong\f[]
569.PP
570Here's a simple block:
571.LP
572foo
573.LP
574This should be a code block, though:
575.IP
576.nf
577\f[C]
578<div>
579\ \ \ \ foo
580</div>
581\f[]
582.fi
583.LP
584As should this:
585.IP
586.nf
587\f[C]
588<div>foo</div>
589\f[]
590.fi
591.LP
592Now, nested:
593foo
594.LP
595This should just be an HTML comment:
596.PP
597Multiline:
598.PP
599Code block:
600.IP
601.nf
602\f[C]
603<!\-\-\ Comment\ \-\->
604\f[]
605.fi
606.LP
607Just plain comment, with trailing spaces on the line:
608.PP
609Code:
610.IP
611.nf
612\f[C]
613<hr\ />
614\f[]
615.fi
616.LP
617Hr's:
618.HLINE
619.SH 1
620Inline Markup
621.pdfhref O 1 "Inline Markup"
622.pdfhref M "inline-markup"
623.LP
624This is \f[I]emphasized\f[], and so \f[I]is this\f[].
625.PP
626This is \f[B]strong\f[], and so \f[B]is this\f[].
627.PP
628An \f[I]\c
629.pdfhref W -D "/url" -A "\c" \
630 -- "emphasized link"
631\&\f[].
632.PP
633\f[B]\f[BI]This is strong and em.\f[B]\f[]
634.PP
635So is \f[B]\f[BI]this\f[B]\f[] word.
636.PP
637\f[B]\f[BI]This is strong and em.\f[B]\f[]
638.PP
639So is \f[B]\f[BI]this\f[B]\f[] word.
640.PP
641This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[],
642\f[C]<html>\f[].
643.PP
644\m[strikecolor]This is \f[I]strikeout\f[].\m[]
645.PP
646Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[]\*} a\*{hello\~there\*}.
647.PP
648Subscripts: H\*<2\*>O, H\*<23\*>O, H\*<many\~of\~them\*>O.
649.PP
650These should not be superscripts or subscripts, because of the unescaped
651spaces: a\[ha]b c\[ha]d, a\[ti]b c\[ti]d.
652.HLINE
653.SH 1
654Smart quotes, ellipses, dashes
655.pdfhref O 1 "Smart quotes, ellipses, dashes"
656.pdfhref M "smart-quotes-ellipses-dashes"
657.LP
658\[lq]Hello,\[rq] said the spider.
659\[lq]`Shelob' is my name.\[rq]
660.PP
661`A', `B', and `C' are letters.
662.PP
663`Oak,' `elm,' and `beech' are names of trees.
664So is `pine.'
665.PP
666`He said, \[lq]I want to go.\[rq]' Were you alive in the 70's?
667.PP
668Here is some quoted `\f[C]code\f[]' and a \[lq]\c
669.pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \
670 -- "quoted link"
671\&\[rq].
672.PP
673Some dashes: one\[em]two \[em] three\[em]four \[em] five.
674.PP
675Dashes between numbers: 5\[en]7, 255\[en]66, 1987\[en]1999.
676.PP
677Ellipses\&...and\&...and\&....
678.HLINE
679.SH 1
680LaTeX
681.pdfhref O 1 "LaTeX"
682.pdfhref M "latex"
683.IP \[bu] 3
684.IP \[bu] 3
685@2 + 2 = 4@
686.IP \[bu] 3
687@x \[u2208] y@
688.IP \[bu] 3
689@alpha \[u2227] omega@
690.IP \[bu] 3
691@223@
692.IP \[bu] 3
693@p@\-Tree
694.IP \[bu] 3
695Here's some display math:
696.EQ
697d over {d x} f ( x ) = lim sub {h -> 0} {f ( x + h ) \[u2212] f ( x )} over h
698.EN
699.IP \[bu] 3
700Here's one that has a line break in it: @alpha + omega times x sup 2@.
701.LP
702These shouldn't be math:
703.IP \[bu] 3
704To get the famous equation, write \f[C]$e\ =\ mc\[ha]2$\f[].
705.IP \[bu] 3
706$22,000 is a \f[I]lot\f[] of money.
707So is $34,000.
708(It worked if \[lq]lot\[rq] is emphasized.)
709.IP \[bu] 3
710Shoes ($20) and socks ($5).
711.IP \[bu] 3
712Escaped \f[C]$\f[]: $73 \f[I]this should be emphasized\f[] 23$.
713.LP
714Here's a LaTeX table:
715.HLINE
716.SH 1
717Special Characters
718.pdfhref O 1 "Special Characters"
719.pdfhref M "special-characters"
720.LP
721Here is some unicode:
722.IP \[bu] 3
723I hat: Î
724.IP \[bu] 3
725o umlaut: ö
726.IP \[bu] 3
727section: §
728.IP \[bu] 3
729set membership: ∈
730.IP \[bu] 3
731copyright: ©
732.LP
733AT&T has an ampersand in their name.
734.PP
735AT&T is another way to write it.
736.PP
737This & that.
738.PP
7394 < 5.
740.PP
7416 > 5.
742.PP
743Backslash: \\
744.PP
745Backtick: \`
746.PP
747Asterisk: *
748.PP
749Underscore: _
750.PP
751Left brace: {
752.PP
753Right brace: }
754.PP
755Left bracket: [
756.PP
757Right bracket: ]
758.PP
759Left paren: (
760.PP
761Right paren: )
762.PP
763Greater\-than: >
764.PP
765Hash: #
766.PP
767Period: .
768.PP
769Bang: !
770.PP
771Plus: +
772.PP
773Minus: \-
774.HLINE
775.SH 1
776Links
777.pdfhref O 1 "Links"
778.pdfhref M "links"
779.SH 2
780Explicit
781.pdfhref O 2 "Explicit"
782.pdfhref M "explicit"
783.LP
784Just a \c
785.pdfhref W -D "/url/" -A "\c" \
786 -- "URL"
787\&.
788.PP
789\c
790.pdfhref W -D "/url/" -A "\c" \
791 -- "URL and title"
792\&.
793.PP
794\c
795.pdfhref W -D "/url/" -A "\c" \
796 -- "URL and title"
797\&.
798.PP
799\c
800.pdfhref W -D "/url/" -A "\c" \
801 -- "URL and title"
802\&.
803.PP
804\c
805.pdfhref W -D "/url/" -A "\c" \
806 -- "URL and title"
807\&
808.PP
809\c
810.pdfhref W -D "/url/" -A "\c" \
811 -- "URL and title"
812\&
813.PP
814\c
815.pdfhref W -D "/url/with_underscore" -A "\c" \
816 -- "with_underscore"
817\&
818.PP
819\c
820.pdfhref W -D "mailto:nobody%40nowhere.net" -A "\c" \
821 -- "Email link"
822\&
823.PP
824\c
825.pdfhref W -D "" -A "\c" \
826 -- "Empty"
827\&.
828.SH 2
829Reference
830.pdfhref O 2 "Reference"
831.pdfhref M "reference"
832.LP
833Foo \c
834.pdfhref W -D "/url/" -A "\c" \
835 -- "bar"
836\&.
837.PP
838With \c
839.pdfhref W -D "/url/" -A "\c" \
840 -- "embedded [brackets]"
841\&.
842.PP
843\c
844.pdfhref W -D "/url/" -A "\c" \
845 -- "b"
846\& by itself should be a link.
847.PP
848Indented \c
849.pdfhref W -D "/url" -A "\c" \
850 -- "once"
851\&.
852.PP
853Indented \c
854.pdfhref W -D "/url" -A "\c" \
855 -- "twice"
856\&.
857.PP
858Indented \c
859.pdfhref W -D "/url" -A "\c" \
860 -- "thrice"
861\&.
862.PP
863This should [not][] be a link.
864.IP
865.nf
866\f[C]
867[not]:\ /url
868\f[]
869.fi
870.LP
871Foo \c
872.pdfhref W -D "/url/" -A "\c" \
873 -- "bar"
874\&.
875.PP
876Foo \c
877.pdfhref W -D "/url/" -A "\c" \
878 -- "biz"
879\&.
880.SH 2
881With ampersands
882.pdfhref O 2 "With ampersands"
883.pdfhref M "with-ampersands"
884.LP
885Here's a \c
886.pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \
887 -- "link with an ampersand in the URL"
888\&.
889.PP
890Here's a link with an amersand in the link text: \c
891.pdfhref W -D "http://att.com/" -A "\c" \
892 -- "AT&T"
893\&.
894.PP
895Here's an \c
896.pdfhref W -D "/script?foo=1&bar=2" -A "\c" \
897 -- "inline link"
898\&.
899.PP
900Here's an \c
901.pdfhref W -D "/script?foo=1&bar=2" -A "\c" \
902 -- "inline link in pointy braces"
903\&.
904.SH 2
905Autolinks
906.pdfhref O 2 "Autolinks"
907.pdfhref M "autolinks"
908.LP
909With an ampersand: \c
910.pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \
911 -- "http://example.com/?foo=1&bar=2"
912\&
913.IP \[bu] 3
914In a list?
915.IP \[bu] 3
916\c
917.pdfhref W -D "http://example.com/" -A "\c" \
918 -- "http://example.com/"
919\&
920.IP \[bu] 3
921It should.
922.LP
923An e\-mail address: \c
924.pdfhref W -D "mailto:nobody%40nowhere.net" -A "\c" \
925 -- "nobody\@nowhere.net"
926\&
927.RS
928.LP
929Blockquoted: \c
930.pdfhref W -D "http://example.com/" -A "\c" \
931 -- "http://example.com/"
932\&
933.RE
934.LP
935Auto\-links should not occur here: \f[C]<http://example.com/>\f[]
936.IP
937.nf
938\f[C]
939or\ here:\ <http://example.com/>
940\f[]
941.fi
942.HLINE
943.SH 1
944Images
945.pdfhref O 1 "Images"
946.pdfhref M "images"
947.LP
948From \[lq]Voyage dans la Lune\[rq] by Georges Melies (1902):
949.PP
950[IMAGE: lalune]
951.PP
952Here is a movie [IMAGE: movie] icon.
953.HLINE
954.SH 1
955Footnotes
956.pdfhref O 1 "Footnotes"
957.pdfhref M "footnotes"
958.LP
959Here is a footnote reference,\**
960.FS
961Here is the footnote.
962It can go anywhere after the footnote reference.
963It need not be placed at the end of the document.
964.FE
965and another.\**
966.FS
967Here's the long note.
968This one contains multiple blocks.
969.PP
970Subsequent blocks are indented to show that they belong to the footnote (as
971with list items).
972.IP
973.nf
974\f[C]
975\ \ {\ <code>\ }
976\f[]
977.fi
978.LP
979If you want, you can indent every line, but you can also be lazy and just
980indent the first line of each block.
981.FE
982This should \f[I]not\f[] be a footnote reference, because it contains a
983space.[\[ha]my note] Here is an inline note.\**
984.FS
985This is \f[I]easier\f[] to type.
986Inline notes may contain \c
987.pdfhref W -D "http://google.com" -A "\c" \
988 -- "links"
989\& and \f[C]]\f[] verbatim characters, as well as [bracketed text].
990.FE
991.RS
992.LP
993Notes can go in quotes.\**
994.FS
995In quote.
996.FE
997.RE
998.IP " 1." 4
999And in list items.\**
1000.FS
1001In list.
1002.FE
1003.LP
1004This paragraph should not be part of the note, as it is not indented.
1005.pdfsync