git.iko.soy/typeable/pandoc
on rc/test4 help sign in
typeable/pandoc/test/writer.texinfo
1046 lines 14 kB history raw
1\input texinfo
2@documentencoding UTF-8
4@macro textstrikeout{text}
5~~\text\~~
6@end macro
8@ifnottex
9@paragraphindent 0
10@end ifnottex
11@titlepage
12@title Pandoc Test Suite
13@author John MacFarlane
14@author Anonymous
15July 17, 2006
16@end titlepage
18@node Top
19@top Pandoc Test Suite
21This is a set of tests for pandoc. Most of them are adapted from John Gruber's
22markdown test suite.
24@iftex
25@bigskip@hrule@bigskip
26@end iftex
27@ifnottex
28------------------------------------------------------------------------
29@end ifnottex
31@menu
32* Headers::
33* Level 1::
34* Paragraphs::
35* Block Quotes::
36* Code Blocks::
37* Lists::
38* Definition Lists::
39* HTML Blocks::
40* Inline Markup::
41* Smart quotes ellipses dashes::
42* LaTeX::
43* Special Characters::
44* Links::
45* Images::
46* Footnotes::
47@end menu
49@node Headers
50@chapter Headers
51@anchor{#headers}
53@menu
54* Level 2 with an embedded link::
55@end menu
57@node Level 2 with an embedded link
58@section Level 2 with an @uref{/url,embedded link}
59@anchor{#level-2-with-an-embedded-link}
61@menu
62* Level 3 with emphasis::
63@end menu
65@node Level 3 with emphasis
66@subsection Level 3 with @emph{emphasis}
67@anchor{#level-3-with-emphasis}
69@menu
70* Level 4::
71@end menu
73@node Level 4
74@subsubsection Level 4
75@anchor{#level-4}
76Level 5
78@node Level 1
79@chapter Level 1
80@anchor{#level-1}
82@menu
83* Level 2 with emphasis::
84* Level 2::
85@end menu
87@node Level 2 with emphasis
88@section Level 2 with @emph{emphasis}
89@anchor{#level-2-with-emphasis}
91@menu
92* Level 3::
93@end menu
95@node Level 3
96@subsection Level 3
97@anchor{#level-3}
98with no blank line
100@node Level 2
101@section Level 2
102@anchor{#level-2}
103with no blank line
105@iftex
106@bigskip@hrule@bigskip
107@end iftex
108@ifnottex
109------------------------------------------------------------------------
110@end ifnottex
112@node Paragraphs
113@chapter Paragraphs
114@anchor{#paragraphs}
115Here's a regular paragraph.
117In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
118Because a hard-wrapped line in the middle of a paragraph looked like a list
119item.
121Here's one with a bullet. * criminey.
123There should be a hard line break@*
124here.
126@iftex
127@bigskip@hrule@bigskip
128@end iftex
129@ifnottex
130------------------------------------------------------------------------
131@end ifnottex
133@node Block Quotes
134@chapter Block Quotes
135@anchor{#block-quotes}
136E-mail style:
138@quotation
139This is a block quote. It is pretty short.
140@end quotation
141@quotation
142Code in a block quote:
144@verbatim
145sub status {
146 print "working";
148@end verbatim
150A list:
152@enumerate
153@item
154item one
155@item
156item two
157@end enumerate
159Nested block quotes:
161@quotation
162nested
163@end quotation
164@quotation
165nested
166@end quotation
167@end quotation
168This should not be a block quote: 2 > 1.
170And a following paragraph.
172@iftex
173@bigskip@hrule@bigskip
174@end iftex
175@ifnottex
176------------------------------------------------------------------------
177@end ifnottex
179@node Code Blocks
180@chapter Code Blocks
181@anchor{#code-blocks}
182Code:
184@verbatim
185---- (should be four hyphens)
187sub status {
188 print "working";
191this code block is indented by one tab
192@end verbatim
194And:
196@verbatim
197 this code block is indented by two tabs
199These should not be escaped: \$ \\ \> \[ \{
200@end verbatim
202@iftex
203@bigskip@hrule@bigskip
204@end iftex
205@ifnottex
206------------------------------------------------------------------------
207@end ifnottex
209@node Lists
210@chapter Lists
211@anchor{#lists}
213@menu
214* Unordered::
215* Ordered::
216* Nested::
217* Tabs and spaces::
218* Fancy list markers::
219@end menu
221@node Unordered
222@section Unordered
223@anchor{#unordered}
224Asterisks tight:
226@itemize
227@item
228asterisk 1
229@item
230asterisk 2
231@item
232asterisk 3
233@end itemize
235Asterisks loose:
237@itemize
238@item
239asterisk 1
241@item
242asterisk 2
244@item
245asterisk 3
247@end itemize
249Pluses tight:
251@itemize
252@item
253Plus 1
254@item
255Plus 2
256@item
257Plus 3
258@end itemize
260Pluses loose:
262@itemize
263@item
264Plus 1
266@item
267Plus 2
269@item
270Plus 3
272@end itemize
274Minuses tight:
276@itemize
277@item
278Minus 1
279@item
280Minus 2
281@item
282Minus 3
283@end itemize
285Minuses loose:
287@itemize
288@item
289Minus 1
291@item
292Minus 2
294@item
295Minus 3
297@end itemize
299@node Ordered
300@section Ordered
301@anchor{#ordered}
302Tight:
304@enumerate
305@item
306First
307@item
308Second
309@item
310Third
311@end enumerate
313and:
315@enumerate
316@item
317One
318@item
319Two
320@item
321Three
322@end enumerate
324Loose using tabs:
326@enumerate
327@item
328First
330@item
331Second
333@item
334Third
336@end enumerate
338and using spaces:
340@enumerate
341@item
342One
344@item
345Two
347@item
348Three
350@end enumerate
352Multiple paragraphs:
354@enumerate
355@item
356Item 1, graf one.
358Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
360@item
361Item 2.
363@item
364Item 3.
366@end enumerate
368@node Nested
369@section Nested
370@anchor{#nested}
371@itemize
372@item
373Tab
374@itemize
375@item
376Tab
377@itemize
378@item
379Tab
380@end itemize
382@end itemize
384@end itemize
386Here's another:
388@enumerate
389@item
390First
391@item
392Second:
393@itemize
394@item
395Fee
396@item
397Fie
398@item
399Foe
400@end itemize
402@item
403Third
404@end enumerate
406Same thing but with paragraphs:
408@enumerate
409@item
410First
412@item
413Second:
415@itemize
416@item
417Fee
418@item
419Fie
420@item
421Foe
422@end itemize
424@item
425Third
427@end enumerate
429@node Tabs and spaces
430@section Tabs and spaces
431@anchor{#tabs-and-spaces}
432@itemize
433@item
434this is a list item indented with tabs
436@item
437this is a list item indented with spaces
439@itemize
440@item
441this is an example list item indented with tabs
443@item
444this is an example list item indented with spaces
446@end itemize
448@end itemize
450@node Fancy list markers
451@section Fancy list markers
452@anchor{#fancy-list-markers}
453@enumerate 2
454@item
455begins with 2
457@item
458and now 3
460with a continuation
462@enumerate 4
463@item
464sublist with roman numerals, starting with 4
465@item
466more items
467@enumerate A
468@item
469a subsublist
470@item
471a subsublist
472@end enumerate
474@end enumerate
476@end enumerate
478Nesting:
480@enumerate A
481@item
482Upper Alpha
483@enumerate
484@item
485Upper Roman.
486@enumerate 6
487@item
488Decimal start with 6
489@enumerate c
490@item
491Lower alpha with paren
492@end enumerate
494@end enumerate
496@end enumerate
498@end enumerate
500Autonumbering:
502@enumerate
503@item
504Autonumber.
505@item
506More.
507@enumerate
508@item
509Nested.
510@end enumerate
512@end enumerate
514Should not be a list item:
516M.A.@ 2007
518B. Williams
520@iftex
521@bigskip@hrule@bigskip
522@end iftex
523@ifnottex
524------------------------------------------------------------------------
525@end ifnottex
527@node Definition Lists
528@chapter Definition Lists
529@anchor{#definition-lists}
530Tight using spaces:
532@table @asis
533@item apple
535red fruit
536@item orange
538orange fruit
539@item banana
541yellow fruit
542@end table
544Tight using tabs:
546@table @asis
547@item apple
549red fruit
550@item orange
552orange fruit
553@item banana
555yellow fruit
556@end table
558Loose:
560@table @asis
561@item apple
563red fruit
565@item orange
567orange fruit
569@item banana
571yellow fruit
573@end table
575Multiple blocks with italics:
577@table @asis
578@item @emph{apple}
580red fruit
582contains seeds, crisp, pleasant to taste
584@item @emph{orange}
586orange fruit
588@verbatim
589{ orange code block }
590@end verbatim
592@quotation
593orange block quote
594@end quotation
595@end table
597Multiple definitions, tight:
599@table @asis
600@item apple
602red fruit
603computer
604@item orange
606orange fruit
607bank
608@end table
610Multiple definitions, loose:
612@table @asis
613@item apple
615red fruit
617computer
619@item orange
621orange fruit
623bank
625@end table
627Blank line after term, indented marker, alternate markers:
629@table @asis
630@item apple
632red fruit
634computer
636@item orange
638orange fruit
640@enumerate
641@item
642sublist
643@item
644sublist
645@end enumerate
647@end table
649@node HTML Blocks
650@chapter HTML Blocks
651@anchor{#html-blocks}
652Simple block on one line:
654foo
655And nested without indentation:
657foo
658bar
659Interpreted markdown in a table:
661This is @emph{emphasized}
662And this is @strong{strong}
663Here's a simple block:
665foo
666This should be a code block, though:
668@verbatim
669<div>
670 foo
671</div>
672@end verbatim
674As should this:
676@verbatim
677<div>foo</div>
678@end verbatim
680Now, nested:
682foo
683This should just be an HTML comment:
685Multiline:
687Code block:
689@verbatim
690<!-- Comment -->
691@end verbatim
693Just plain comment, with trailing spaces on the line:
695Code:
697@verbatim
698<hr />
699@end verbatim
701Hr's:
703@iftex
704@bigskip@hrule@bigskip
705@end iftex
706@ifnottex
707------------------------------------------------------------------------
708@end ifnottex
710@node Inline Markup
711@chapter Inline Markup
712@anchor{#inline-markup}
713This is @emph{emphasized}, and so @emph{is this}.
715This is @strong{strong}, and so @strong{is this}.
717An @emph{@uref{/url,emphasized link}}.
719@strong{@emph{This is strong and em.}}
721So is @strong{@emph{this}} word.
723@strong{@emph{This is strong and em.}}
725So is @strong{@emph{this}} word.
727This is code: @code{>}, @code{$}, @code{\}, @code{\$}, @code{<html>}.
729@textstrikeout{This is @emph{strikeout}.}
731Superscripts: a@sup{bc}d a@sup{@emph{hello}} a@sup{hello@ there}.
733Subscripts: H@sub{2}O, H@sub{23}O, H@sub{many@ of@ them}O.
735These should not be superscripts or subscripts, because of the unescaped
736spaces: a^b c^d, a~b c~d.
738@iftex
739@bigskip@hrule@bigskip
740@end iftex
741@ifnottex
742------------------------------------------------------------------------
743@end ifnottex
745@node Smart quotes ellipses dashes
746@chapter Smart quotes, ellipses, dashes
747@anchor{#smart-quotes-ellipses-dashes}
748``Hello,'' said the spider. ```Shelob' is my name.''
750`A', `B', and `C' are letters.
752`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
754`He said, ``I want to go.''' Were you alive in the 70's?
756Here is some quoted `@code{code}' and a
757``@uref{http://example.com/?foo=1&bar=2,quoted link}''.
759Some dashes: one---two --- three---four --- five.
761Dashes between numbers: 5--7, 255--66, 1987--1999.
763Ellipses@dots{}and@dots{}and@dots{}.
765@iftex
766@bigskip@hrule@bigskip
767@end iftex
768@ifnottex
769------------------------------------------------------------------------
770@end ifnottex
772@node LaTeX
773@chapter LaTeX
774@anchor{#latex}
775@itemize
776@item
777@tex
778\cite[22-23]{smith.1899}
779@end tex
780@item
781@math{2+2=4}
782@item
783@math{x \in y}
784@item
785@math{\alpha \wedge \omega}
786@item
787@math{223}
788@item
789@math{p}-Tree
790@item
791Here's some display math:
792@math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}}
793@item
794Here's one that has a line break in it: @math{\alpha + \omega \times x^2}.
795@end itemize
797These shouldn't be math:
799@itemize
800@item
801To get the famous equation, write @code{$e = mc^2$}.
802@item
803$22,000 is a @emph{lot} of money. So is $34,000. (It worked if ``lot'' is
804emphasized.)
805@item
806Shoes ($20) and socks ($5).
807@item
808Escaped @code{$}: $73 @emph{this should be emphasized} 23$.
809@end itemize
811Here's a LaTeX table:
813@tex
814\begin{tabular}{|l|l|}\hline
815Animal & Number \\ \hline
816Dog & 2 \\
817Cat & 1 \\ \hline
818\end{tabular}
819@end tex
820@iftex
821@bigskip@hrule@bigskip
822@end iftex
823@ifnottex
824------------------------------------------------------------------------
825@end ifnottex
827@node Special Characters
828@chapter Special Characters
829@anchor{#special-characters}
830Here is some unicode:
832@itemize
833@item
834I hat: Î
835@item
836o umlaut: ö
837@item
838section: §
839@item
840set membership: ∈
841@item
842copyright: ©
843@end itemize
845AT&T has an ampersand in their name.
847AT&T is another way to write it.
849This & that.
8514 < 5.
8536 > 5.
855Backslash: \
857Backtick: `
859Asterisk: *
861Underscore: _
863Left brace: @{
865Right brace: @}
867Left bracket: [
869Right bracket: ]
871Left paren: (
873Right paren: )
875Greater-than: >
877Hash: #
879Period: .
881Bang: !
883Plus: +
885Minus: -
887@iftex
888@bigskip@hrule@bigskip
889@end iftex
890@ifnottex
891------------------------------------------------------------------------
892@end ifnottex
894@node Links
895@chapter Links
896@anchor{#links}
898@menu
899* Explicit::
900* Reference::
901* With ampersands::
902* Autolinks::
903@end menu
905@node Explicit
906@section Explicit
907@anchor{#explicit}
908Just a @uref{/url/,URL}.
910@uref{/url/,URL and title}.
912@uref{/url/,URL and title}.
914@uref{/url/,URL and title}.
916@uref{/url/,URL and title}
918@uref{/url/,URL and title}
920@uref{/url/with_underscore,with_underscore}
922@uref{mailto:nobody@@nowhere.net,Email link}
924@uref{,Empty}.
926@node Reference
927@section Reference
928@anchor{#reference}
929Foo @uref{/url/,bar}.
931With @uref{/url/,embedded [brackets]}.
933@uref{/url/,b} by itself should be a link.
935Indented @uref{/url,once}.
937Indented @uref{/url,twice}.
939Indented @uref{/url,thrice}.
941This should [not][] be a link.
943@verbatim
944[not]: /url
945@end verbatim
947Foo @uref{/url/,bar}.
949Foo @uref{/url/,biz}.
951@node With ampersands
952@section With ampersands
953@anchor{#with-ampersands}
954Here's a @uref{http://example.com/?foo=1&bar=2,link with an ampersand in the
955URL}.
957Here's a link with an amersand in the link text: @uref{http://att.com/,AT&T}.
959Here's an @uref{/script?foo=1&bar=2,inline link}.
961Here's an @uref{/script?foo=1&bar=2,inline link in pointy braces}.
963@node Autolinks
964@section Autolinks
965@anchor{#autolinks}
966With an ampersand: @url{http://example.com/?foo=1&bar=2}
968@itemize
969@item
970In a list?
971@item
972@url{http://example.com/}
973@item
974It should.
975@end itemize
977An e-mail address: @uref{mailto:nobody@@nowhere.net,nobody@@nowhere.net}
979@quotation
980Blockquoted: @url{http://example.com/}
981@end quotation
982Auto-links should not occur here: @code{<http://example.com/>}
984@verbatim
985or here: <http://example.com/>
986@end verbatim
988@iftex
989@bigskip@hrule@bigskip
990@end iftex
991@ifnottex
992------------------------------------------------------------------------
993@end ifnottex
995@node Images
996@chapter Images
997@anchor{#images}
998From ``Voyage dans la Lune'' by Georges Melies (1902):
1000@float
1001@image{lalune,,,lalune,jpg}
1002@caption{lalune}
1003@end float
1005Here is a movie @image{movie,,,movie,jpg} icon.
1007@iftex
1008@bigskip@hrule@bigskip
1009@end iftex
1010@ifnottex
1011------------------------------------------------------------------------
1012@end ifnottex
1014@node Footnotes
1015@chapter Footnotes
1016@anchor{#footnotes}
1017Here is a footnote reference,@footnote{Here is the footnote. It can go
1018anywhere after the footnote reference. It need not be placed at the end of the
1019document.} and another.@footnote{Here's the long note. This one contains
1020multiple blocks.
1022Subsequent blocks are indented to show that they belong to the footnote (as
1023with list items).
1025@verbatim
1026 { <code> }
1027@end verbatim
1029If you want, you can indent every line, but you can also be lazy and just
1030indent the first line of each block.} This should @emph{not} be a footnote
1031reference, because it contains a space.[^my note] Here is an inline
1032note.@footnote{This is @emph{easier} to type. Inline notes may contain
1033@uref{http://google.com,links} and @code{]} verbatim characters, as well as
1034[bracketed text].}
1036@quotation
1037Notes can go in quotes.@footnote{In quote.}
1038@end quotation
1039@enumerate
1040@item
1041And in list items.@footnote{In list.}
1042@end enumerate
1044This paragraph should not be part of the note, as it is not indented.
1046@bye