pandoc/test/writer.fb2

768 lines
16 KiB
Text
Raw Normal View History

2012-04-19 03:03:32 +02:00
<?xml version="1.0" encoding="UTF-8"?>
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:l="http://www.w3.org/1999/xlink">
<description>
<title-info>
<genre>unrecognised</genre>
<author>
<first-name>John</first-name>
<last-name>MacFarlane</last-name>
</author>
<author>
<nickname>Anonymous</nickname>
</author>
<book-title>Pandoc Test Suite</book-title>
<date>July 17, 2006</date>
</title-info>
<document-info>
<program-used>pandoc</program-used>
</document-info>
</description>
<body>
<title>
<p>Pandoc Test Suite</p>
</title>
<section>
<p>This is a set of tests for pandoc. Most of them are adapted from
John Grubers markdown test suite.</p>
<empty-line />
</section>
<section>
<title>
<p>Headers</p>
</title>
<section>
<title>
<p>Level 2 with an <a l:href="/url">embedded link</a>
</p>
</title>
<section>
<title>
<p>Level 3 with <emphasis>emphasis</emphasis>
</p>
</title>
<section>
<title>
<p>Level 4</p>
</title>
<section>
<title>
<p>Level 5</p>
</title>
</section>
</section>
</section>
</section>
</section>
<section>
<title>
<p>Level 1</p>
</title>
<section>
<title>
<p>Level 2 with <emphasis>emphasis</emphasis>
</p>
</title>
<section>
<title>
<p>Level 3</p>
</title>
<p>with no blank line</p>
</section>
</section>
<section>
<title>
<p>Level 2</p>
</title>
<p>with no blank line</p>
<empty-line />
</section>
</section>
<section>
<title>
<p>Paragraphs</p>
</title>
<p>Heres a regular paragraph.</p>
<p>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.</p>
<p>Heres one with a bullet.
* criminey.</p>
<p>There should be a hard line break
here.</p>
<empty-line />
</section>
<section>
<title>
<p>Block Quotes</p>
</title>
<p>E-mail style:</p>
<cite>
<p>This is a block quote.
It is pretty short.</p>
</cite>
<cite>
<p>Code in a block quote:</p>
<empty-line />
<p>
<code>sub status {</code>
</p>
<p>
<code> print &quot;working&quot;;</code>
</p>
<p>
<code>}</code>
</p>
<empty-line />
<p>A list:</p>
<p>1. item one</p>
<p>2. item two</p>
<p>Nested block quotes:</p>
<cite>
<p>nested</p>
</cite>
<cite>
<p>nested</p>
</cite>
</cite>
<p>This should not be a block quote: 2
&gt; 1.</p>
<p>And a following paragraph.</p>
<empty-line />
</section>
<section>
<title>
<p>Code Blocks</p>
</title>
<p>Code:</p>
<empty-line />
<p>
<code>---- (should be four hyphens)</code>
</p>
<p>
<code>
</code>
</p>
<p>
<code>sub status {</code>
</p>
<p>
<code> print &quot;working&quot;;</code>
</p>
<p>
<code>}</code>
</p>
<p>
<code>
</code>
</p>
<p>
<code>this code block is indented by one tab</code>
</p>
<empty-line />
<p>And:</p>
<empty-line />
<p>
<code> this code block is indented by two tabs</code>
</p>
<p>
<code>
</code>
</p>
<p>
<code>These should not be escaped: \$ \\ \&gt; \[ \{</code>
</p>
<empty-line />
<empty-line />
</section>
<section>
<title>
<p>Lists</p>
</title>
<section>
<title>
<p>Unordered</p>
</title>
<p>Asterisks tight:</p>
<p>• asterisk 1</p>
<p>• asterisk 2</p>
<p>• asterisk 3</p>
<p>Asterisks loose:</p>
<p>• asterisk 1</p>
<empty-line />
<p>• asterisk 2</p>
<empty-line />
<p>• asterisk 3</p>
<empty-line />
<p>Pluses tight:</p>
<p>• Plus 1</p>
<p>• Plus 2</p>
<p>• Plus 3</p>
<p>Pluses loose:</p>
<p>• Plus 1</p>
<empty-line />
<p>• Plus 2</p>
<empty-line />
<p>• Plus 3</p>
<empty-line />
<p>Minuses tight:</p>
<p>• Minus 1</p>
<p>• Minus 2</p>
<p>• Minus 3</p>
<p>Minuses loose:</p>
<p>• Minus 1</p>
<empty-line />
<p>• Minus 2</p>
<empty-line />
<p>• Minus 3</p>
<empty-line />
</section>
<section>
<title>
<p>Ordered</p>
</title>
<p>Tight:</p>
<p>1. First</p>
<p>2. Second</p>
<p>3. Third</p>
<p>and:</p>
<p>1. One</p>
<p>2. Two</p>
<p>3. Three</p>
<p>Loose using tabs:</p>
<p>1. First</p>
<empty-line />
<p>2. Second</p>
<empty-line />
<p>3. Third</p>
<empty-line />
<p>and using spaces:</p>
<p>1. One</p>
<empty-line />
<p>2. Two</p>
<empty-line />
<p>3. Three</p>
<empty-line />
<p>Multiple paragraphs:</p>
<p>1. Item 1, graf one.</p>
<empty-line />
<p>   Item 1. graf two. The quick brown fox jumped over the lazy dogs
back.</p>
<empty-line />
<p>2. Item 2.</p>
<empty-line />
<p>3. Item 3.</p>
<empty-line />
</section>
<section>
<title>
<p>Nested</p>
</title>
<p>• Tab</p>
<p>•  Tab</p>
<p>•   Tab</p>
<p>Heres another:</p>
<p>1. First</p>
<p>2. Second:</p>
<p>2.  Fee</p>
<p>2.  Fie</p>
<p>2.  Foe</p>
<p>3. Third</p>
<p>Same thing but with paragraphs:</p>
<p>1. First</p>
<empty-line />
<p>2. Second:</p>
<empty-line />
<p>2.  Fee</p>
<p>2.  Fie</p>
<p>2.  Foe</p>
<p>3. Third</p>
<empty-line />
</section>
<section>
<title>
<p>Tabs and spaces</p>
</title>
<p>• this is a list item
indented with tabs</p>
<empty-line />
<p>• this is a list item
indented with spaces</p>
<empty-line />
<p>•  this is an example list item
indented with tabs</p>
<empty-line />
<p>•  this is an example list item
indented with spaces</p>
<empty-line />
</section>
<section>
<title>
<p>Fancy list markers</p>
</title>
<p>(2) begins with 2</p>
<p>(3) and now 3</p>
<empty-line />
<p>    with a continuation</p>
<empty-line />
<p>(3) iv. sublist with roman numerals,
starting with 4</p>
<p>(3) v. more items</p>
<p>(3) v. (A) a subsublist</p>
<p>(3) v. (B) a subsublist</p>
<p>Nesting:</p>
<p>A. Upper Alpha</p>
<p>A. I. Upper Roman.</p>
<p>A. I. (6) Decimal start with 6</p>
<p>A. I. (6) c) Lower alpha with paren</p>
<p>Autonumbering:</p>
<p>1. Autonumber.</p>
<p>2. More.</p>
<p>2. 1. Nested.</p>
<p>Should not be a list item:</p>
<p>M.A. 2007</p>
<p>B. Williams</p>
<empty-line />
</section>
</section>
<section>
<title>
<p>Definition Lists</p>
</title>
<p>Tight using spaces:</p>
<p>
<strong>apple</strong>
</p>
<p>    red fruit</p>
<p>
<strong>orange</strong>
</p>
<p>    orange fruit</p>
<p>
<strong>banana</strong>
</p>
<p>    yellow fruit</p>
<p>Tight using tabs:</p>
<p>
<strong>apple</strong>
</p>
<p>    red fruit</p>
<p>
<strong>orange</strong>
</p>
<p>    orange fruit</p>
<p>
<strong>banana</strong>
</p>
<p>    yellow fruit</p>
<p>Loose:</p>
<p>
<strong>apple</strong>
</p>
<p>    red fruit</p>
<empty-line />
<p>
<strong>orange</strong>
</p>
<p>    orange fruit</p>
<empty-line />
<p>
<strong>banana</strong>
</p>
<p>    yellow fruit</p>
<empty-line />
<p>Multiple blocks with italics:</p>
<p>
<strong>
<emphasis>apple</emphasis>
</strong>
</p>
<p>    red fruit</p>
<empty-line />
<p>    contains seeds,
crisp, pleasant to taste</p>
<empty-line />
<p>
<strong>
<emphasis>orange</emphasis>
</strong>
</p>
<p>    orange fruit</p>
<empty-line />
<empty-line />
<p>
<code>    { orange code block }</code>
</p>
<empty-line />
<cite>
<p>    orange block quote</p>
</cite>
<p>Multiple definitions, tight:</p>
<p>
<strong>apple</strong>
</p>
<p>    red fruit</p>
<p>    computer</p>
<p>
<strong>orange</strong>
</p>
<p>    orange fruit</p>
<p>    bank</p>
<p>Multiple definitions, loose:</p>
<p>
<strong>apple</strong>
</p>
<p>    red fruit</p>
<empty-line />
<p>    computer</p>
<empty-line />
<p>
<strong>orange</strong>
</p>
<p>    orange fruit</p>
<empty-line />
<p>    bank</p>
<empty-line />
<p>Blank line after term, indented marker, alternate markers:</p>
<p>
<strong>apple</strong>
</p>
<p>    red fruit</p>
<empty-line />
<p>    computer</p>
<empty-line />
<p>
<strong>orange</strong>
</p>
<p>    orange fruit</p>
<empty-line />
<p>1. sublist</p>
<p>2. sublist</p>
</section>
<section>
<title>
<p>HTML Blocks</p>
</title>
<p>Simple block on one line:</p>foo<p>And nested without indentation:</p>
<p>foo</p>bar<p>Interpreted markdown in a table:</p>This is <emphasis>emphasized</emphasis>And this is <strong>strong</strong>
<p>Heres a simple block:</p>
<p>foo</p>
<p>This should be a code block, though:</p>
<empty-line />
<p>
<code>&lt;div&gt;</code>
</p>
<p>
<code> foo</code>
</p>
<p>
<code>&lt;/div&gt;</code>
</p>
<empty-line />
<p>As should this:</p>
<empty-line />
<p>
<code>&lt;div&gt;foo&lt;/div&gt;</code>
</p>
<empty-line />
<p>Now, nested:</p>foo<p>This should just be an HTML comment:</p>
<p>Multiline:</p>
<p>Code block:</p>
<empty-line />
<p>
<code>&lt;!-- Comment --&gt;</code>
</p>
<empty-line />
<p>Just plain comment, with trailing spaces on the line:</p>
<p>Code:</p>
<empty-line />
<p>
<code>&lt;hr /&gt;</code>
</p>
<empty-line />
<p>Hrs:</p>
<empty-line />
</section>
<section>
<title>
<p>Inline Markup</p>
</title>
<p>This is <emphasis>emphasized</emphasis>, and so <emphasis>is this</emphasis>.</p>
<p>This is <strong>strong</strong>, and so <strong>is this</strong>.</p>
<p>An <emphasis>
<a l:href="/url">emphasized link</a>
</emphasis>.</p>
<p>
<strong>
<emphasis>This is strong and em.</emphasis>
</strong>
</p>
<p>So is <strong>
<emphasis>this</emphasis>
</strong> word.</p>
<p>
<strong>
<emphasis>This is strong and em.</emphasis>
</strong>
</p>
<p>So is <strong>
<emphasis>this</emphasis>
</strong> word.</p>
<p>This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html&gt;</code>.</p>
<p>
<strikethrough>This is <emphasis>strikeout</emphasis>.</strikethrough>
</p>
<p>Superscripts: a<sup>bc</sup>d a<sup>
<emphasis>hello</emphasis>
</sup> a<sup>hello there</sup>.</p>
<p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.</p>
<p>These should not be superscripts or subscripts,
because of the unescaped spaces: a^b c^d, a~b c~d.</p>
<empty-line />
</section>
<section>
<title>
<p>Smart quotes, ellipses, dashes</p>
</title>
<p>“Hello,” said the spider. “Shelob is my name.”</p>
<p>A, B, and C are letters.</p>
<p>Oak, elm, and beech are names of trees.
So is pine.</p>
<p>He said, “I want to go.”’ Were you alive in the
70s?</p>
<p>Here is some quoted <code>code</code> and a “<a l:href="http://example.com/?foo=1&amp;bar=2">quoted link</a>”.</p>
<p>Some dashes: one—two — three—four — five.</p>
<p>Dashes between numbers: 57, 25566, 19871999.</p>
<p>Ellipses…and…and….</p>
<empty-line />
</section>
<section>
<title>
<p>LaTeX</p>
</title>
<p>• </p>
<p>• <code>2+2=4</code>
</p>
<p>• <code>x \in y</code>
</p>
<p>• <code>\alpha \wedge \omega</code>
</p>
<p>• <code>223</code>
</p>
<p>• <code>p</code>-Tree</p>
<p>• Heres some display math:
<code>\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</code>
</p>
<p>• Heres one that has a line break in it: <code>\alpha + \omega \times x^2</code>.</p>
<p>These shouldnt be math:</p>
<p>• To get the famous equation, write <code>$e = mc^2$</code>.</p>
<p>• $22,000 is a <emphasis>lot</emphasis> of money. So is $34,000.
(It worked if “lot” is emphasized.)</p>
<p>• Shoes ($20) and socks ($5).</p>
<p>• Escaped <code>$</code>: $73 <emphasis>this should be emphasized</emphasis> 23$.</p>
<p>Heres a LaTeX table:</p>
<empty-line />
</section>
<section>
<title>
<p>Special Characters</p>
</title>
<p>Here is some unicode:</p>
<p>• I hat: Î</p>
<p>• o umlaut: ö</p>
<p>• section: §</p>
<p>• set membership: ∈</p>
<p>• copyright: ©</p>
<p>AT&amp;T has an ampersand in their name.</p>
<p>AT&amp;T is another way to write it.</p>
<p>This &amp; that.</p>
<p>4 &lt; 5.</p>
<p>6 &gt; 5.</p>
<p>Backslash: \</p>
<p>Backtick: `</p>
<p>Asterisk: *</p>
<p>Underscore: _</p>
<p>Left brace: {</p>
<p>Right brace: }</p>
<p>Left bracket: [</p>
<p>Right bracket: ]</p>
<p>Left paren: (</p>
<p>Right paren: )</p>
<p>Greater-than: &gt;</p>
<p>Hash: #</p>
<p>Period: .</p>
<p>Bang: !</p>
<p>Plus: +</p>
<p>Minus: -</p>
<empty-line />
</section>
<section>
<title>
<p>Links</p>
</title>
<section>
<title>
<p>Explicit</p>
</title>
<p>Just a <a l:href="/url/">URL</a>.</p>
<p>
<a l:href="/url/">URL and title</a>.</p>
<p>
<a l:href="/url/">URL and title</a>.</p>
<p>
<a l:href="/url/">URL and title</a>.</p>
<p>
<a l:href="/url/">URL and title</a>
</p>
<p>
<a l:href="/url/">URL and title</a>
</p>
<p>
<a l:href="/url/with_underscore">with_underscore</a>
</p>
<p>
<a l:href="mailto:nobody@nowhere.net">Email link</a>
</p>
<p>
<a l:href="">Empty</a>.</p>
</section>
<section>
<title>
<p>Reference</p>
</title>
<p>Foo <a l:href="/url/">bar</a>.</p>
<p>With <a l:href="/url/">embedded [brackets]</a>.</p>
<p>
<a l:href="/url/">b</a> by itself should be a link.</p>
<p>Indented <a l:href="/url">once</a>.</p>
<p>Indented <a l:href="/url">twice</a>.</p>
<p>Indented <a l:href="/url">thrice</a>.</p>
<p>This should [not][] be a link.</p>
<empty-line />
<p>
<code>[not]: /url</code>
</p>
<empty-line />
<p>Foo <a l:href="/url/">bar</a>.</p>
<p>Foo <a l:href="/url/">biz</a>.</p>
</section>
<section>
<title>
<p>With ampersands</p>
</title>
<p>Heres a <a l:href="http://example.com/?foo=1&amp;bar=2">link with an ampersand in the URL</a>.</p>
<p>Heres a link with an amersand in the link text: <a l:href="http://att.com/">AT&amp;T</a>.</p>
<p>Heres an <a l:href="/script?foo=1&amp;bar=2">inline link</a>.</p>
<p>Heres an <a l:href="/script?foo=1&amp;bar=2">inline link in pointy braces</a>.</p>
</section>
<section>
<title>
<p>Autolinks</p>
</title>
<p>With an ampersand: <a l:href="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</a>
</p>
<p>• In a list?</p>
<p>• <a l:href="http://example.com/">http://example.com/</a>
</p>
<p>• It should.</p>
<p>An e-mail address: <a l:href="mailto:nobody@nowhere.net">nobody@nowhere.net</a>
</p>
<cite>
<p>Blockquoted: <a l:href="http://example.com/">http://example.com/</a>
</p>
</cite>
<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
</p>
<empty-line />
<p>
<code>or here: &lt;http://example.com/&gt;</code>
</p>
<empty-line />
<empty-line />
</section>
</section>
<section>
<title>
<p>Images</p>
</title>
<p>From “Voyage dans la Lune” by Georges Melies (1902):</p>
<image l:href="#image1" l:type="imageType" alt="lalune" title="Voyage dans la Lune" />
<p>Here is a movie <image l:href="#image2" l:type="inlineImageType" alt="movie" /> icon.</p>
<empty-line />
</section>
<section>
<title>
<p>Footnotes</p>
</title>
<p>Here is a footnote reference,<a l:href="#n1" type="note">
<sup>[1]</sup>
</a> and another.<a l:href="#n2" type="note">
<sup>[2]</sup>
</a>
This should <emphasis>not</emphasis> be a footnote reference, because it
contains a space.[^my note] Here is an inline note.<a l:href="#n3" type="note">
<sup>[3]</sup>
</a>
</p>
<cite>
<p>Notes can go in quotes.<a l:href="#n4" type="note">
<sup>[4]</sup>
</a>
</p>
</cite>
<p>1. And in list items.<a l:href="#n5" type="note">
<sup>[5]</sup>
</a>
</p>
<p>This paragraph should not be part of the note, as it is not indented.</p>
</section>
</body>
<body name="notes">
<section id="n1">
<title>
<p>1</p>
</title>
<p>Here is the footnote. It can go anywhere after the footnote
reference. It need not be placed at the end of the document.</p>
</section>
<section id="n2">
<title>
<p>2</p>
</title>
<p>Heres the long note. This one contains multiple
blocks.</p>
<p>Subsequent blocks are indented to show that they belong to the
footnote (as with list items).</p>
<empty-line />
<p>
<code> { &lt;code&gt; }</code>
</p>
<empty-line />
<p>If you want, you can indent every line, but you can also be
lazy and just indent the first line of each block.</p>
</section>
<section id="n3">
<title>
<p>3</p>
</title>
<p>This
is <emphasis>easier</emphasis> to type. Inline notes may contain
<a l:href="http://google.com">links</a> and <code>]</code> verbatim characters,
as well as [bracketed text].</p>
</section>
<section id="n4">
<title>
<p>4</p>
</title>
<p>In quote.</p>
</section>
<section id="n5">
<title>
<p>5</p>
</title>
<p>In list.</p>
</section>
</body>
</FictionBook>