1
\enableregime[utf] % use UTF-8
3
\setupcolors[state=start]
4
\setupinteraction[state=start, color=middlered] % needed for hyperlinks
6
\setuppapersize[letter][letter] % use letter paper
7
\setuplayout[width=middle, backspace=1.5in, cutspace=1.5in,
8
height=middle, header=0.75in, footer=0.75in] % page layout
9
\setuppagenumbering[location={footer,center}] % number pages
10
\setupbodyfont[11pt] % 11pt font
11
\setupwhitespace[medium] % inter-paragraph spacing
13
\setuphead[section][style=\tfc]
14
\setuphead[subsection][style=\tfb]
15
\setuphead[subsubsection][style=\bf]
17
% define title block commands
19
\def\doctitle#1{\gdef\@title{#1}}
20
\def\author#1{\gdef\@author{#1}}
21
\def\date#1{\gdef\@date{#1}}
22
\date{\currentdate} % Default to today unless specified otherwise.
24
\startalignment[center]
35
% define descr (for definition lists)
36
\definedescription[descr][
37
headstyle=bold,style=normal,align=left,location=hanging,
38
width=broad,margin=1cm]
40
% define ltxitem (for bulleted lists)
41
\defineitemgroup[ltxitem][levels=4]
42
\setupitemgroup[ltxitem][1][1]
43
\setupitemgroup[ltxitem][2][2]
44
\setupitemgroup[ltxitem][3][3]
45
\setupitemgroup[ltxitem][4][4,packed]
47
% define ltxenum (for enumerated lists)
48
\defineitemgroup[ltxenum][levels=4]
49
\setupitemgroup[ltxenum][1][n]
50
\setupitemgroup[ltxenum][2][a]
51
\setupitemgroup[ltxenum][3][r]
52
\setupitemgroup[ltxenum][4][A,packed]
54
\setupthinrules[width=15em] % width of horizontal rules
56
% for block quotations
57
\definestartstop [blockquote]
58
[before={\startnarrower\switchtobodyfont[11pt]
59
\whitespace\setupindenting[no]},
60
after={\stopnarrower\whitespace}]
62
\setupheads[sectionnumber=no, style=\bf]
63
\doctitle{Pandoc Test Suite}
64
\author{John MacFarlane \& Anonymous}
70
This is a set of tests for pandoc. Most of them are adapted from John Gruber's markdown test suite.
76
\subsection{Level 2 with an \useurl[1][/url][][embedded link]\from[1]}
78
\subsubsection{Level 3 with {\em emphasis}}
86
\subsection{Level 2 with {\em emphasis}}
88
\subsubsection{Level 3}
100
Here's a regular paragraph.
102
In 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.
104
Here's one with a bullet. * criminey.
106
There should be a hard line break\crlf
111
\section{Block Quotes}
116
This is a block quote. It is pretty short.
121
Code in a block quote:
148
This should not be a block quote: 2 \lettermore{} 1.
165
\sym{2.} take out the trash
181
And a following paragraph.
185
\section{Code Blocks}
190
---- (should be four hyphens)
196
this code block is indented by one tab
201
this code block is indented by two tabs
203
These should not be escaped: \$ \\ \> \[ \{
209
\subsection{Unordered}
301
\sym{1.} Item 1, graf one.
303
Item 1. graf two. The quick brown fox jumped over the lazy dog's back.
333
Same thing but with paragraphs:
348
\subsection{Tabs and spaces}
351
\item this is a list item indented with tabs
353
\item this is a list item indented with spaces
356
\item this is an example list item indented with tabs
358
\item this is an example list item indented with spaces
362
\subsection{Fancy list markers}
364
\startitemize[width=2em]
365
\sym{(2)} begins with 2
370
\startitemize[width=2em]
371
\sym{iv.} sublist with roman numerals, starting with 4
373
\startitemize[width=2em]
374
\sym{(A)} a subsublist
375
\sym{(B)} a subsublist
384
\sym{I.} Upper Roman.
385
\startitemize[width=2em]
386
\sym{(6)} Decimal start with 6
388
\sym{c)} Lower alpha with paren
402
Should not be a list item:
410
\section{Definition Lists}
460
Multiple blocks with italics:
462
\startdescr{{\em apple}}
465
contains seeds, crisp, pleasant to taste
469
\startdescr{{\em orange}}
473
{ orange code block }
483
\section{HTML Blocks}
485
Simple block on one line:
488
And nested without indentation:
492
Interpreted markdown in a table:
494
This is {\em emphasized}
495
And this is {\bf strong}
496
Here's a simple block:
499
This should be a code block, though:
514
This should just be an HTML comment:
523
Just plain comment, with trailing spaces on the line:
534
\section{Inline Markup}
536
This is {\em emphasized}, and so {\em is this}.
538
This is {\bf strong}, and so {\bf is this}.
540
An {\em \useurl[2][/url][][emphasized link]\from[2]}.
542
{\bf {\em This is strong and em.}}
544
So is {\bf {\em this}} word.
546
{\bf {\em This is strong and em.}}
548
So is {\bf {\em this}} word.
550
This is code: \type{>}, \type{$}, \type{\}, \type{\$}, \type{<html>}.
552
\overstrikes{This is {\em strikeout}.}
554
Superscripts: a\high{bc}d a\high{{\em hello}} a\high{hello there}.
556
Subscripts: H\low{2}O, H\low{23}O, H\low{many of them}O.
558
These should not be superscripts or subscripts, because of the unescaped spaces: a\letterhat{}b c\letterhat{}d, a\lettertilde{}b c\lettertilde{}d.
562
\section{Smart quotes, ellipses, dashes}
564
\quotation{Hello,} said the spider. \quotation{\quote{Shelob} is my name.}
566
\quote{A}, \quote{B}, and \quote{C} are letters.
568
\quote{Oak,} \quote{elm,} and \quote{beech} are names of trees. So is \quote{pine.}
570
\quote{He said, \quotation{I want to go.}} Were you alive in the 70's?
572
Here is some quoted \quote{\type{code}} and a \quotation{\useurl[3][http://example.com/?foo=1&bar=2][][quoted link]\from[3]}.
574
Some dashes: one---two---three---four---five.
576
Dashes between numbers: 5--7, 255--66, 1987--1999.
578
Ellipses\ldots{}and\ldots{}and\ldots{}.
582
\section{Special Characters}
584
Here is some unicode:
590
\item set membership: ∈
593
AT\&T has an ampersand in their name.
595
AT\&T is another way to write it.
603
Backslash: \letterbackslash{}
609
Underscore: \letterunderscore{}
611
Left brace: \letteropenbrace{}
613
Right brace: \letterclosebrace{}
623
Greater-than: \lettermore{}
639
\subsection{Explicit}
641
Just a \useurl[4][/url/][][URL]\from[4].
643
\useurl[5][/url/][][URL and title]\from[5].
645
\useurl[6][/url/][][URL and title]\from[6].
647
\useurl[7][/url/][][URL and title]\from[7].
649
\useurl[8][/url/][][URL and title]\from[8]
651
\useurl[9][/url/][][URL and title]\from[9]
653
\useurl[10][/url/with_underscore][][with\letterunderscore{}underscore]\from[10]
655
\useurl[11][mailto:nobody@nowhere.net][][Email link]\from[11]
657
\useurl[12][][][Empty]\from[12].
659
\subsection{Reference}
661
Foo \useurl[13][/url/][][bar]\from[13].
663
Foo \useurl[14][/url/][][bar]\from[14].
665
Foo \useurl[15][/url/][][bar]\from[15].
667
With \useurl[16][/url/][][embedded [brackets]]\from[16].
669
\useurl[17][/url/][][b]\from[17] by itself should be a link.
671
Indented \useurl[18][/url][][once]\from[18].
673
Indented \useurl[19][/url][][twice]\from[19].
675
Indented \useurl[20][/url][][thrice]\from[20].
677
This should [not][] be a link.
682
Foo \useurl[21][/url/][][bar]\from[21].
684
Foo \useurl[22][/url/][][biz]\from[22].
686
\subsection{With ampersands}
688
Here's a \useurl[23][http://example.com/?foo=1&bar=2][][link with an ampersand in the URL]\from[23].
690
Here's a link with an amersand in the link text: \useurl[24][http://att.com/][][AT\&T]\from[24].
692
Here's an \useurl[25][/script?foo=1&bar=2][][inline link]\from[25].
694
Here's an \useurl[26][/script?foo=1&bar=2][][inline link in pointy braces]\from[26].
696
\subsection{Autolinks}
698
With an ampersand: \useurl[27][http://example.com/?foo=1&bar=2][][http://example.com/?foo=1\&bar=2]\from[27]
702
\item \useurl[28][http://example.com/][][http://example.com/]\from[28]
705
An e-mail address: \useurl[29][mailto:nobody@nowhere.net][][nobody@nowhere.net]\from[29]
708
Blockquoted: \useurl[30][http://example.com/][][http://example.com/]\from[30]
712
Auto-links should not occur here: \type{<http://example.com/>}
715
or here: <http://example.com/>
721
From \quotation{Voyage dans la Lune} by Georges Melies (1902):
726
{Voyage dans la Lune}
727
{\externalfigure[lalune.jpg]}
729
Here is a movie \placefigure
733
{\externalfigure[movie.jpg]} icon.
739
Here is a footnote reference,\footnote{Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.
741
} and another.\footnote{Here's the long note. This one contains multiple blocks.
743
Subsequent blocks are indented to show that they belong to the footnote (as with list items).
748
If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
750
} This should {\em not} be a footnote reference, because it contains a space.[\letterhat{}my note] Here is an inline note.\footnote{This is {\em easier} to type. Inline notes may contain \useurl[31][http://google.com][][links]\from[31] and \type{]} verbatim characters, as well as [bracketed text].
755
Notes can go in quotes.\footnote{In quote.
762
\sym{1.} And in list items.\footnote{In list.
766
This paragraph should not be part of the note, as it is not indented.