git.iko.soy/typeable/pandoc
on 1.14.0.4 help sign in
typeable/pandoc/tests/writer.texinfo
1061 lines 15 kB history raw
1\input texinfo
2@documentencoding UTF-8
4@macro textstrikeout{text}
5~~\text\~~
6@end macro
8@macro textsubscript{text}
9@iftex
10@textsubscript{\text\}
11@end iftex
12@ifnottex
13_@{\text\@}
14@end ifnottex
15@end macro
17@macro textsuperscript{text}
18@iftex
19@textsuperscript{\text\}
20@end iftex
21@ifnottex
22^@{\text\@}
23@end ifnottex
24@end macro
26@ifnottex
27@paragraphindent 0
28@end ifnottex
29@titlepage
30@title Pandoc Test Suite
31@author John MacFarlane
32@author Anonymous
33July 17, 2006
34@end titlepage
36@node Top
37@top Pandoc Test Suite
39This is a set of tests for pandoc. Most of them are adapted from John Gruber's
40markdown test suite.
42@iftex
43@bigskip@hrule@bigskip
44@end iftex
45@ifnottex
46------------------------------------------------------------------------
47@end ifnottex
48@menu
49* Headers::
50* Level 1::
51* Paragraphs::
52* Block Quotes::
53* Code Blocks::
54* Lists::
55* Definition Lists::
56* HTML Blocks::
57* Inline Markup::
58* Smart quotes ellipses dashes::
59* LaTeX::
60* Special Characters::
61* Links::
62* Images::
63* Footnotes::
64@end menu
66@node Headers
67@chapter Headers
68@anchor{#headers}
69@menu
70* Level 2 with an embedded link::
71@end menu
73@node Level 2 with an embedded link
74@section Level 2 with an @uref{/url,embedded link}
75@anchor{#level-2-with-an-embedded-link}
76@menu
77* Level 3 with emphasis::
78@end menu
80@node Level 3 with emphasis
81@subsection Level 3 with @emph{emphasis}
82@anchor{#level-3-with-emphasis}
83@menu
84* Level 4::
85@end menu
87@node Level 4
88@subsubsection Level 4
89@anchor{#level-4}
90Level 5
92@node Level 1
93@chapter Level 1
94@anchor{#level-1}
95@menu
96* Level 2 with emphasis::
97* Level 2::
98@end menu
100@node Level 2 with emphasis
101@section Level 2 with @emph{emphasis}
102@anchor{#level-2-with-emphasis}
103@menu
104* Level 3::
105@end menu
107@node Level 3
108@subsection Level 3
109@anchor{#level-3}
110with no blank line
112@node Level 2
113@section Level 2
114@anchor{#level-2}
115with no blank line
117@iftex
118@bigskip@hrule@bigskip
119@end iftex
120@ifnottex
121------------------------------------------------------------------------
122@end ifnottex
124@node Paragraphs
125@chapter Paragraphs
126@anchor{#paragraphs}
127Here's a regular paragraph.
129In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
130Because a hard-wrapped line in the middle of a paragraph looked like a list
131item.
133Here's one with a bullet. * criminey.
135There should be a hard line break@*
136here.
138@iftex
139@bigskip@hrule@bigskip
140@end iftex
141@ifnottex
142------------------------------------------------------------------------
143@end ifnottex
145@node Block Quotes
146@chapter Block Quotes
147@anchor{#block-quotes}
148E-mail style:
150@quotation
151This is a block quote. It is pretty short.
152@end quotation
153@quotation
154Code in a block quote:
156@verbatim
157sub status {
158 print "working";
160@end verbatim
162A list:
164@enumerate
165@item
166item one
167@item
168item two
169@end enumerate
171Nested block quotes:
173@quotation
174nested
175@end quotation
176@quotation
177nested
178@end quotation
179@end quotation
180This should not be a block quote: 2 > 1.
182And a following paragraph.
184@iftex
185@bigskip@hrule@bigskip
186@end iftex
187@ifnottex
188------------------------------------------------------------------------
189@end ifnottex
191@node Code Blocks
192@chapter Code Blocks
193@anchor{#code-blocks}
194Code:
196@verbatim
197---- (should be four hyphens)
199sub status {
200 print "working";
203this code block is indented by one tab
204@end verbatim
206And:
208@verbatim
209 this code block is indented by two tabs
211These should not be escaped: \$ \\ \> \[ \{
212@end verbatim
214@iftex
215@bigskip@hrule@bigskip
216@end iftex
217@ifnottex
218------------------------------------------------------------------------
219@end ifnottex
221@node Lists
222@chapter Lists
223@anchor{#lists}
224@menu
225* Unordered::
226* Ordered::
227* Nested::
228* Tabs and spaces::
229* Fancy list markers::
230@end menu
232@node Unordered
233@section Unordered
234@anchor{#unordered}
235Asterisks tight:
237@itemize
238@item
239asterisk 1
240@item
241asterisk 2
242@item
243asterisk 3
244@end itemize
246Asterisks loose:
248@itemize
249@item
250asterisk 1
252@item
253asterisk 2
255@item
256asterisk 3
258@end itemize
260Pluses tight:
262@itemize
263@item
264Plus 1
265@item
266Plus 2
267@item
268Plus 3
269@end itemize
271Pluses loose:
273@itemize
274@item
275Plus 1
277@item
278Plus 2
280@item
281Plus 3
283@end itemize
285Minuses tight:
287@itemize
288@item
289Minus 1
290@item
291Minus 2
292@item
293Minus 3
294@end itemize
296Minuses loose:
298@itemize
299@item
300Minus 1
302@item
303Minus 2
305@item
306Minus 3
308@end itemize
310@node Ordered
311@section Ordered
312@anchor{#ordered}
313Tight:
315@enumerate
316@item
317First
318@item
319Second
320@item
321Third
322@end enumerate
324and:
326@enumerate
327@item
328One
329@item
330Two
331@item
332Three
333@end enumerate
335Loose using tabs:
337@enumerate
338@item
339First
341@item
342Second
344@item
345Third
347@end enumerate
349and using spaces:
351@enumerate
352@item
353One
355@item
356Two
358@item
359Three
361@end enumerate
363Multiple paragraphs:
365@enumerate
366@item
367Item 1, graf one.
369Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
371@item
372Item 2.
374@item
375Item 3.
377@end enumerate
379@node Nested
380@section Nested
381@anchor{#nested}
382@itemize
383@item
384Tab
385@itemize
386@item
387Tab
388@itemize
389@item
390Tab
391@end itemize
393@end itemize
395@end itemize
397Here's another:
399@enumerate
400@item
401First
402@item
403Second:
404@itemize
405@item
406Fee
407@item
408Fie
409@item
410Foe
411@end itemize
413@item
414Third
415@end enumerate
417Same thing but with paragraphs:
419@enumerate
420@item
421First
423@item
424Second:
426@itemize
427@item
428Fee
429@item
430Fie
431@item
432Foe
433@end itemize
435@item
436Third
438@end enumerate
440@node Tabs and spaces
441@section Tabs and spaces
442@anchor{#tabs-and-spaces}
443@itemize
444@item
445this is a list item indented with tabs
447@item
448this is a list item indented with spaces
450@itemize
451@item
452this is an example list item indented with tabs
454@item
455this is an example list item indented with spaces
457@end itemize
459@end itemize
461@node Fancy list markers
462@section Fancy list markers
463@anchor{#fancy-list-markers}
464@enumerate 2
465@item
466begins with 2
467@item
468and now 3
470with a continuation
472@enumerate 4
473@item
474sublist with roman numerals, starting with 4
475@item
476more items
477@enumerate A
478@item
479a subsublist
480@item
481a subsublist
482@end enumerate
484@end enumerate
486@end enumerate
488Nesting:
490@enumerate A
491@item
492Upper Alpha
493@enumerate
494@item
495Upper Roman.
496@enumerate 6
497@item
498Decimal start with 6
499@enumerate c
500@item
501Lower alpha with paren
502@end enumerate
504@end enumerate
506@end enumerate
508@end enumerate
510Autonumbering:
512@enumerate
513@item
514Autonumber.
515@item
516More.
517@enumerate
518@item
519Nested.
520@end enumerate
522@end enumerate
524Should not be a list item:
526M.A.@ 2007
528B. Williams
530@iftex
531@bigskip@hrule@bigskip
532@end iftex
533@ifnottex
534------------------------------------------------------------------------
535@end ifnottex
537@node Definition Lists
538@chapter Definition Lists
539@anchor{#definition-lists}
540Tight using spaces:
542@table @asis
543@item apple
545red fruit
546@item orange
548orange fruit
549@item banana
551yellow fruit
552@end table
554Tight using tabs:
556@table @asis
557@item apple
559red fruit
560@item orange
562orange fruit
563@item banana
565yellow fruit
566@end table
568Loose:
570@table @asis
571@item apple
573red fruit
575@item orange
577orange fruit
579@item banana
581yellow fruit
583@end table
585Multiple blocks with italics:
587@table @asis
588@item @emph{apple}
590red fruit
592contains seeds, crisp, pleasant to taste
594@item @emph{orange}
596orange fruit
598@verbatim
599{ orange code block }
600@end verbatim
602@quotation
603orange block quote
604@end quotation
605@end table
607Multiple definitions, tight:
609@table @asis
610@item apple
612red fruit
613computer
614@item orange
616orange fruit
617bank
618@end table
620Multiple definitions, loose:
622@table @asis
623@item apple
625red fruit
627computer
629@item orange
631orange fruit
633bank
635@end table
637Blank line after term, indented marker, alternate markers:
639@table @asis
640@item apple
642red fruit
644computer
646@item orange
648orange fruit
650@enumerate
651@item
652sublist
653@item
654sublist
655@end enumerate
657@end table
659@node HTML Blocks
660@chapter HTML Blocks
661@anchor{#html-blocks}
662Simple block on one line:
664foo
665And nested without indentation:
667foo
668bar
669Interpreted markdown in a table:
671This is @emph{emphasized}
672And this is @strong{strong}
673Here's a simple block:
675foo
676This should be a code block, though:
678@verbatim
679<div>
680 foo
681</div>
682@end verbatim
684As should this:
686@verbatim
687<div>foo</div>
688@end verbatim
690Now, nested:
692foo
693This should just be an HTML comment:
695Multiline:
697Code block:
699@verbatim
700<!-- Comment -->
701@end verbatim
703Just plain comment, with trailing spaces on the line:
705Code:
707@verbatim
708<hr />
709@end verbatim
711Hr's:
713@iftex
714@bigskip@hrule@bigskip
715@end iftex
716@ifnottex
717------------------------------------------------------------------------
718@end ifnottex
720@node Inline Markup
721@chapter Inline Markup
722@anchor{#inline-markup}
723This is @emph{emphasized}, and so @emph{is this}.
725This is @strong{strong}, and so @strong{is this}.
727An @emph{@uref{/url,emphasized link}}.
729@strong{@emph{This is strong and em.}}
731So is @strong{@emph{this}} word.
733@strong{@emph{This is strong and em.}}
735So is @strong{@emph{this}} word.
737This is code: @code{>}, @code{$}, @code{\}, @code{\$}, @code{<html>}.
739@textstrikeout{This is @emph{strikeout}.}
741Superscripts: a@textsuperscript{bc}d a@textsuperscript{@emph{hello}}
742a@textsuperscript{hello@ there}.
744Subscripts: H@textsubscript{2}O, H@textsubscript{23}O,
745H@textsubscript{many@ of@ them}O.
747These should not be superscripts or subscripts, because of the unescaped
748spaces: a^b c^d, a~b c~d.
750@iftex
751@bigskip@hrule@bigskip
752@end iftex
753@ifnottex
754------------------------------------------------------------------------
755@end ifnottex
757@node Smart quotes ellipses dashes
758@chapter Smart quotes, ellipses, dashes
759@anchor{#smart-quotes-ellipses-dashes}
760``Hello,'' said the spider. ```Shelob' is my name.''
762`A', `B', and `C' are letters.
764`Oak,' `elm,' and `beech' are names of trees. So is `pine.'
766`He said, ``I want to go.''' Were you alive in the 70's?
768Here is some quoted `@code{code}' and a
769``@uref{http://example.com/?foo=1&bar=2,quoted link}''.
771Some dashes: one---two --- three---four --- five.
773Dashes between numbers: 5--7, 255--66, 1987--1999.
775Ellipses@dots{}and@dots{}and@dots{}.
777@iftex
778@bigskip@hrule@bigskip
779@end iftex
780@ifnottex
781------------------------------------------------------------------------
782@end ifnottex
784@node LaTeX
785@chapter LaTeX
786@anchor{#latex}
787@itemize
788@item
789@tex
790\cite[22-23]{smith.1899}
791@end tex
792@item
793@math{2+2=4}
794@item
795@math{x \in y}
796@item
797@math{\alpha \wedge \omega}
798@item
799@math{223}
800@item
801@math{p}-Tree
802@item
803Here's some display math:
804@math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}}
805@item
806Here's one that has a line break in it: @math{\alpha + \omega \times x^2}.
807@end itemize
809These shouldn't be math:
811@itemize
812@item
813To get the famous equation, write @code{$e = mc^2$}.
814@item
815$22,000 is a @emph{lot} of money. So is $34,000. (It worked if ``lot'' is
816emphasized.)
817@item
818Shoes ($20) and socks ($5).
819@item
820Escaped @code{$}: $73 @emph{this should be emphasized} 23$.
821@end itemize
823Here's a LaTeX table:
825@tex
826\begin{tabular}{|l|l|}\hline
827Animal & Number \\ \hline
828Dog & 2 \\
829Cat & 1 \\ \hline
830\end{tabular}
831@end tex
832@iftex
833@bigskip@hrule@bigskip
834@end iftex
835@ifnottex
836------------------------------------------------------------------------
837@end ifnottex
839@node Special Characters
840@chapter Special Characters
841@anchor{#special-characters}
842Here is some unicode:
844@itemize
845@item
846I hat: Î
847@item
848o umlaut: ö
849@item
850section: §
851@item
852set membership: ∈
853@item
854copyright: ©
855@end itemize
857AT&T has an ampersand in their name.
859AT&T is another way to write it.
861This & that.
8634 < 5.
8656 > 5.
867Backslash: \
869Backtick: `
871Asterisk: *
873Underscore: _
875Left brace: @{
877Right brace: @}
879Left bracket: [
881Right bracket: ]
883Left paren: (
885Right paren: )
887Greater-than: >
889Hash: #
891Period: .
893Bang: !
895Plus: +
897Minus: -
899@iftex
900@bigskip@hrule@bigskip
901@end iftex
902@ifnottex
903------------------------------------------------------------------------
904@end ifnottex
906@node Links
907@chapter Links
908@anchor{#links}
909@menu
910* Explicit::
911* Reference::
912* With ampersands::
913* Autolinks::
914@end menu
916@node Explicit
917@section Explicit
918@anchor{#explicit}
919Just a @uref{/url/,URL}.
921@uref{/url/,URL and title}.
923@uref{/url/,URL and title}.
925@uref{/url/,URL and title}.
927@uref{/url/,URL and title}
929@uref{/url/,URL and title}
931@uref{/url/with_underscore,with_underscore}
933@uref{mailto:nobody@@nowhere.net,Email link}
935@uref{,Empty}.
937@node Reference
938@section Reference
939@anchor{#reference}
940Foo @uref{/url/,bar}.
942Foo @uref{/url/,bar}.
944Foo @uref{/url/,bar}.
946With @uref{/url/,embedded [brackets]}.
948@uref{/url/,b} by itself should be a link.
950Indented @uref{/url,once}.
952Indented @uref{/url,twice}.
954Indented @uref{/url,thrice}.
956This should [not][] be a link.
958@verbatim
959[not]: /url
960@end verbatim
962Foo @uref{/url/,bar}.
964Foo @uref{/url/,biz}.
966@node With ampersands
967@section With ampersands
968@anchor{#with-ampersands}
969Here's a @uref{http://example.com/?foo=1&bar=2,link with an ampersand in the
970URL}.
972Here's a link with an amersand in the link text: @uref{http://att.com/,AT&T}.
974Here's an @uref{/script?foo=1&bar=2,inline link}.
976Here's an @uref{/script?foo=1&bar=2,inline link in pointy braces}.
978@node Autolinks
979@section Autolinks
980@anchor{#autolinks}
981With an ampersand: @url{http://example.com/?foo=1&bar=2}
983@itemize
984@item
985In a list?
986@item
987@url{http://example.com/}
988@item
989It should.
990@end itemize
992An e-mail address: @uref{mailto:nobody@@nowhere.net,nobody@@nowhere.net}
994@quotation
995Blockquoted: @url{http://example.com/}
996@end quotation
997Auto-links should not occur here: @code{<http://example.com/>}
999@verbatim
1000or here: <http://example.com/>
1001@end verbatim
1003@iftex
1004@bigskip@hrule@bigskip
1005@end iftex
1006@ifnottex
1007------------------------------------------------------------------------
1008@end ifnottex
1010@node Images
1011@chapter Images
1012@anchor{#images}
1013From ``Voyage dans la Lune'' by Georges Melies (1902):
1015@float
1016@image{lalune,,,lalune,jpg}
1017@caption{lalune}
1018@end float
1020Here is a movie @image{movie,,,movie,jpg} icon.
1022@iftex
1023@bigskip@hrule@bigskip
1024@end iftex
1025@ifnottex
1026------------------------------------------------------------------------
1027@end ifnottex
1029@node Footnotes
1030@chapter Footnotes
1031@anchor{#footnotes}
1032Here is a footnote reference,@footnote{Here is the footnote. It can go
1033anywhere after the footnote reference. It need not be placed at the end of the
1034document.} and another.@footnote{Here's the long note. This one contains
1035multiple blocks.
1037Subsequent blocks are indented to show that they belong to the footnote (as
1038with list items).
1040@verbatim
1041 { <code> }
1042@end verbatim
1044If you want, you can indent every line, but you can also be lazy and just
1045indent the first line of each block.} This should @emph{not} be a footnote
1046reference, because it contains a space.[^my note] Here is an inline
1047note.@footnote{This is @emph{easier} to type. Inline notes may contain
1048@uref{http://google.com,links} and @code{]} verbatim characters, as well as
1049[bracketed text].}
1051@quotation
1052Notes can go in quotes.@footnote{In quote.}
1053@end quotation
1054@enumerate
1055@item
1056And in list items.@footnote{In list.}
1057@end enumerate
1059This paragraph should not be part of the note, as it is not indented.
1061@bye