git.iko.soy/typeable/pandoc
on 1.0 help sign in
typeable/pandoc/tests/writer.texinfo
960 lines 14 kB history raw
1\input texinfo
3@macro textstrikeout{text}
4~~\text\~~
5@end macro
7@macro textsubscript{text}
8@iftex
9@textsubscript{\text\}
10@end iftex
11@ifnottex
12_@{\text\@}
13@end ifnottex
14@end macro
16@macro textsuperscript{text}
17@iftex
18@textsuperscript{\text\}
19@end iftex
20@ifnottex
21^@{\text\@}
22@end ifnottex
23@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@comma{} 2006
34@end titlepage
35@node Top
36@top Pandoc Test Suite
38This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite.
40@iftex
41@bigskip@hrule@bigskip
42@end iftex
43@ifnottex
44------------------------------------------------------------------------
45@end ifnottex
46@menu
47* Headers::
48* Level 1::
49* Paragraphs::
50* Block Quotes::
51* Code Blocks::
52* Lists::
53* Definition Lists::
54* HTML Blocks::
55* Inline Markup::
56* Smart quotes ellipses dashes::
57* LaTeX::
58* Special Characters::
59* Links::
60* Images::
61* Footnotes::
62@end menu
64@node Headers
65@chapter Headers
66@menu
67* Level 2 with an embedded link::
68@end menu
70@node Level 2 with an embedded link
71@section Level 2 with an @uref{/url,embedded link}
72@menu
73* Level 3 with emphasis::
74@end menu
76@node Level 3 with emphasis
77@subsection Level 3 with @emph{emphasis}
78@menu
79* Level 4::
80@end menu
82@node Level 4
83@subsubsection Level 4
84Level 5
86@node Level 1
87@chapter Level 1
88@menu
89* Level 2 with emphasis::
90* Level 2::
91@end menu
93@node Level 2 with emphasis
94@section Level 2 with @emph{emphasis}
95@menu
96* Level 3::
97@end menu
99@node Level 3
100@subsection Level 3
101with no blank line
104@node Level 2
105@section Level 2
106with no blank line
108@iftex
109@bigskip@hrule@bigskip
110@end iftex
111@ifnottex
112------------------------------------------------------------------------
113@end ifnottex
115@node Paragraphs
116@chapter Paragraphs
117Here's a regular paragraph.
119In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.
121Here's one with a bullet. * criminey.
123There should be a hard line break@*here.
125@iftex
126@bigskip@hrule@bigskip
127@end iftex
128@ifnottex
129------------------------------------------------------------------------
130@end ifnottex
132@node Block Quotes
133@chapter Block Quotes
134E-mail style:
136@quotation
137This is a block quote. It is pretty short.
139@end quotation
140@quotation
141Code in a block quote:
142@verbatim
143sub status {
144 print "working";
146@end verbatim
148A list:
150@enumerate
151@item
152item one
153@item
154item two
155@end enumerate
157Nested block quotes:
159@quotation
160nested
162@end quotation
163@quotation
164nested
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
181Code:
182@verbatim
183---- (should be four hyphens)
185sub status {
186 print "working";
189this code block is indented by one tab
190@end verbatim
192And:
193@verbatim
194 this code block is indented by two tabs
196These should not be escaped: \$ \\ \> \[ \{
197@end verbatim
199@iftex
200@bigskip@hrule@bigskip
201@end iftex
202@ifnottex
203------------------------------------------------------------------------
204@end ifnottex
206@node Lists
207@chapter Lists
208@menu
209* Unordered::
210* Ordered::
211* Nested::
212* Tabs and spaces::
213* Fancy list markers::
214@end menu
216@node Unordered
217@section Unordered
218Asterisks tight:
220@itemize
221@item
222asterisk 1
223@item
224asterisk 2
225@item
226asterisk 3
227@end itemize
229Asterisks loose:
231@itemize
232@item
233asterisk 1
235@item
236asterisk 2
238@item
239asterisk 3
241@end itemize
243Pluses tight:
245@itemize
246@item
247Plus 1
248@item
249Plus 2
250@item
251Plus 3
252@end itemize
254Pluses loose:
256@itemize
257@item
258Plus 1
260@item
261Plus 2
263@item
264Plus 3
266@end itemize
268Minuses tight:
270@itemize
271@item
272Minus 1
273@item
274Minus 2
275@item
276Minus 3
277@end itemize
279Minuses loose:
281@itemize
282@item
283Minus 1
285@item
286Minus 2
288@item
289Minus 3
291@end itemize
294@node Ordered
295@section Ordered
296Tight:
298@enumerate
299@item
300First
301@item
302Second
303@item
304Third
305@end enumerate
307and:
309@enumerate
310@item
311One
312@item
313Two
314@item
315Three
316@end enumerate
318Loose using tabs:
320@enumerate
321@item
322First
324@item
325Second
327@item
328Third
330@end enumerate
332and using spaces:
334@enumerate
335@item
336One
338@item
339Two
341@item
342Three
344@end enumerate
346Multiple paragraphs:
348@enumerate
349@item
350Item 1@comma{} graf one.
352Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
354@item
355Item 2.
357@item
358Item 3.
360@end enumerate
363@node Nested
364@section Nested
365@itemize
366@item
367Tab
368@itemize
369@item
370Tab
371@itemize
372@item
373Tab
374@end itemize
376@end itemize
378@end itemize
380Here's another:
382@enumerate
383@item
384First
385@item
386Second:
387@itemize
388@item
389Fee
390@item
391Fie
392@item
393Foe
394@end itemize
396@item
397Third
398@end enumerate
400Same thing but with paragraphs:
402@enumerate
403@item
404First
406@item
407Second:
409@itemize
410@item
411Fee
412@item
413Fie
414@item
415Foe
416@end itemize
418@item
419Third
421@end enumerate
424@node Tabs and spaces
425@section Tabs and spaces
426@itemize
427@item
428this is a list item indented with tabs
430@item
431this is a list item indented with spaces
433@itemize
434@item
435this is an example list item indented with tabs
437@item
438this is an example list item indented with spaces
440@end itemize
442@end itemize
445@node Fancy list markers
446@section Fancy list markers
447@enumerate 2
448@item
449begins with 2
450@item
451and now 3
453with a continuation
455@enumerate 4
456@item
457sublist with roman numerals@comma{} starting with 4
458@item
459more items
460@enumerate A
461@item
462a subsublist
463@item
464a subsublist
465@end enumerate
467@end enumerate
469@end enumerate
471Nesting:
473@enumerate A
474@item
475Upper Alpha
476@enumerate
477@item
478Upper Roman.
479@enumerate 6
480@item
481Decimal start with 6
482@enumerate c
483@item
484Lower alpha with paren
485@end enumerate
487@end enumerate
489@end enumerate
491@end enumerate
493Autonumbering:
495@enumerate
496@item
497Autonumber.
498@item
499More.
500@enumerate
501@item
502Nested.
503@end enumerate
505@end enumerate
507Should not be a list item:
509M.A.@ 2007
511B. Williams
513@iftex
514@bigskip@hrule@bigskip
515@end iftex
516@ifnottex
517------------------------------------------------------------------------
518@end ifnottex
520@node Definition Lists
521@chapter Definition Lists
522Tight using spaces:
524@table @asis
525@item apple
527red fruit
528@item orange
530orange fruit
531@item banana
533yellow fruit
534@end table
536Tight using tabs:
538@table @asis
539@item apple
541red fruit
542@item orange
544orange fruit
545@item banana
547yellow fruit
548@end table
550Loose:
552@table @asis
553@item apple
555red fruit
557@item orange
559orange fruit
561@item banana
563yellow fruit
565@end table
567Multiple blocks with italics:
569@table @asis
570@item @emph{apple}
572red fruit
574contains seeds@comma{} crisp@comma{} pleasant to taste
576@item @emph{orange}
578orange fruit
579@verbatim
580{ orange code block }
581@end verbatim
583@quotation
584orange block quote
586@end quotation
587@end table
590@node HTML Blocks
591@chapter HTML Blocks
592Simple block on one line:
594foo
595And nested without indentation:
597foo
598bar
599Interpreted markdown in a table:
601This is @emph{emphasized}
602And this is @strong{strong}
603Here's a simple block:
605foo
606This should be a code block@comma{} though:
607@verbatim
608<div>
609 foo
610</div>
611@end verbatim
613As should this:
614@verbatim
615<div>foo</div>
616@end verbatim
618Now@comma{} nested:
620foo
621This should just be an HTML comment:
623Multiline:
625Code block:
626@verbatim
627<!-- Comment -->
628@end verbatim
630Just plain comment@comma{} with trailing spaces on the line:
632Code:
633@verbatim
634<hr />
635@end verbatim
637Hr's:
639@iftex
640@bigskip@hrule@bigskip
641@end iftex
642@ifnottex
643------------------------------------------------------------------------
644@end ifnottex
646@node Inline Markup
647@chapter Inline Markup
648This is @emph{emphasized}@comma{} and so @emph{is this}.
650This is @strong{strong}@comma{} and so @strong{is this}.
652An @emph{@uref{/url,emphasized link}}.
654@strong{@emph{This is strong and em.}}
656So is @strong{@emph{this}} word.
658@strong{@emph{This is strong and em.}}
660So is @strong{@emph{this}} word.
662This is code: @code{>}@comma{} @code{$}@comma{} @code{\}@comma{} @code{\$}@comma{} @code{<html>}.
664@textstrikeout{This is @emph{strikeout}.}
666Superscripts: a@textsuperscript{bc}d a@textsuperscript{@emph{hello}} a@textsuperscript{hello@ there}.
668Subscripts: H@textsubscript{2}O@comma{} H@textsubscript{23}O@comma{} H@textsubscript{many@ of@ them}O.
670These should not be superscripts or subscripts@comma{} because of the unescaped spaces: a^b c^d@comma{} a~b c~d.
672@iftex
673@bigskip@hrule@bigskip
674@end iftex
675@ifnottex
676------------------------------------------------------------------------
677@end ifnottex
679@node Smart quotes ellipses dashes
680@chapter Smart quotes@comma{} ellipses@comma{} dashes
681``Hello@comma{}'' said the spider. ```Shelob' is my name.''
683`A'@comma{} `B'@comma{} and `C' are letters.
685`Oak@comma{}' `elm@comma{}' and `beech' are names of trees. So is `pine.'
687`He said@comma{} ``I want to go.''' Were you alive in the 70's?
689Here is some quoted `@code{code}' and a ``@uref{http://example.com/?foo=1&bar=2,quoted link}''.
691Some dashes: one---two --- three---four --- five.
693Dashes between numbers: 5--7@comma{} 255--66@comma{} 1987--1999.
695Ellipses@dots{}and@dots{}and@dots{}.
697@iftex
698@bigskip@hrule@bigskip
699@end iftex
700@ifnottex
701------------------------------------------------------------------------
702@end ifnottex
704@node LaTeX
705@chapter LaTeX
706@itemize
707@item
708@tex
709\cite[22-23]{smith.1899}
710@end tex
711@item
712@math{2+2=4}
713@item
714@math{x \in y}
715@item
716@math{\alpha \wedge \omega}
717@item
718@math{223}
719@item
720@math{p}-Tree
721@item
722Here's some display math: @math{\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}}
723@item
724Here's one that has a line break in it: @math{\alpha + \omega \times x^2}.
725@end itemize
727These shouldn't be math:
729@itemize
730@item
731To get the famous equation@comma{} write @code{$e = mc^2$}.
732@item
733$22@comma{}000 is a @emph{lot} of money. So is $34@comma{}000. (It worked if ``lot'' is emphasized.)
734@item
735Shoes ($20) and socks ($5).
736@item
737Escaped @code{$}: $73 @emph{this should be emphasized} 23$.
738@end itemize
740Here's a LaTeX table:
742@tex
743\begin{tabular}{|l|l|}\hline
744Animal & Number \\ \hline
745Dog & 2 \\
746Cat & 1 \\ \hline
747\end{tabular}
748@end tex
750@iftex
751@bigskip@hrule@bigskip
752@end iftex
753@ifnottex
754------------------------------------------------------------------------
755@end ifnottex
757@node Special Characters
758@chapter Special Characters
759Here is some unicode:
761@itemize
762@item
763I hat: Î
764@item
765o umlaut: ö
766@item
767section: §
768@item
769set membership: ∈
770@item
771copyright: ©
772@end itemize
774AT&T has an ampersand in their name.
776AT&T is another way to write it.
778This & that.
7804 < 5.
7826 > 5.
784Backslash: \
786Backtick: `
788Asterisk: *
790Underscore: _
792Left brace: @{
794Right brace: @}
796Left bracket: [
798Right bracket: ]
800Left paren: (
802Right paren: )
804Greater-than: >
806Hash: #
808Period: .
810Bang: !
812Plus: +
814Minus: -
816@iftex
817@bigskip@hrule@bigskip
818@end iftex
819@ifnottex
820------------------------------------------------------------------------
821@end ifnottex
823@node Links
824@chapter Links
825@menu
826* Explicit::
827* Reference::
828* With ampersands::
829* Autolinks::
830@end menu
832@node Explicit
833@section Explicit
834Just a @uref{/url/,URL}.
836@uref{/url/,URL and title}.
838@uref{/url/,URL and title}.
840@uref{/url/,URL and title}.
842@uref{/url/,URL and title}
844@uref{/url/,URL and title}
846@uref{/url/with_underscore,with_underscore}
848@uref{mailto:nobody@@nowhere.net,Email link}
850@uref{,Empty}.
853@node Reference
854@section Reference
855Foo @uref{/url/,bar}.
857Foo @uref{/url/,bar}.
859Foo @uref{/url/,bar}.
861With @uref{/url/,embedded [brackets]}.
863@uref{/url/,b} by itself should be a link.
865Indented @uref{/url,once}.
867Indented @uref{/url,twice}.
869Indented @uref{/url,thrice}.
871This should [not][] be a link.
872@verbatim
873[not]: /url
874@end verbatim
876Foo @uref{/url/,bar}.
878Foo @uref{/url/,biz}.
881@node With ampersands
882@section With ampersands
883Here's a @uref{http://example.com/?foo=1&bar=2,link with an ampersand in the URL}.
885Here's a link with an amersand in the link text: @uref{http://att.com/,AT&T}.
887Here's an @uref{/script?foo=1&bar=2,inline link}.
889Here's an @uref{/script?foo=1&bar=2,inline link in pointy braces}.
892@node Autolinks
893@section Autolinks
894With an ampersand: @url{http://example.com/?foo=1&bar=2}
896@itemize
897@item
898In a list?
899@item
900@url{http://example.com/}
901@item
902It should.
903@end itemize
905An e-mail address: @uref{mailto:nobody@@nowhere.net,@code{nobody@@nowhere.net}}
907@quotation
908Blockquoted: @url{http://example.com/}
910@end quotation
911Auto-links should not occur here: @code{<http://example.com/>}
912@verbatim
913or here: <http://example.com/>
914@end verbatim
916@iftex
917@bigskip@hrule@bigskip
918@end iftex
919@ifnottex
920------------------------------------------------------------------------
921@end ifnottex
923@node Images
924@chapter Images
925From ``Voyage dans la Lune'' by Georges Melies (1902):
927@image{lalune,,,lalune,jpg}
929Here is a movie @image{movie,,,movie,jpg} icon.
931@iftex
932@bigskip@hrule@bigskip
933@end iftex
934@ifnottex
935------------------------------------------------------------------------
936@end ifnottex
938@node Footnotes
939@chapter Footnotes
940Here is a footnote reference@comma{}@footnote{Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.} and another.@footnote{Here's the long note. This one contains multiple blocks.
942Subsequent blocks are indented to show that they belong to the footnote (as with list items).
943@verbatim
944 { <code> }
945@end verbatim
947If you want@comma{} you can indent every line@comma{} but you can also be lazy and just indent the first line of each block.} This should @emph{not} be a footnote reference@comma{} because it contains a space.[^my note] Here is an inline note.@footnote{This is @emph{easier} to type. Inline notes may contain @uref{http://google.com,links} and @code{]} verbatim characters@comma{} as well as [bracketed text].}
949@quotation
950Notes can go in quotes.@footnote{In quote.}
952@end quotation
953@enumerate
954@item
955And in list items.@footnote{In list.}
956@end enumerate
958This paragraph should not be part of the note@comma{} as it is not indented.
960@bye