git.iko.soy/typeable/pandoc
on master help sign in
Updated docbook writer to use new templates.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1728 788f1e2b-df1e-0410-8736-df70ead52e1b

commit7dc43d3684045d5e83c2440a75040f22de4efcf4 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateThu 31 Dec 2009, 01:16 (17 years ago) parent998fb98
4 files changed+1318−1307
src/Text/Pandoc/Writers/Docbook.hs+38−38 templates/docbook.template+13−1 tests/tables.docbook−1 tests/writer.docbook+1267−1267
src/Text/Pandoc/Writers/Docbook.hs+38−38
@@ -31,6 +31,7 @@ module Text.Pandoc.Writers.Docbook ( writeDocbook) where
3131import Text.Pandoc.Definition
3232import Text.Pandoc.XML
3333import Text.Pandoc.Shared
34+import Text.Pandoc.Templates (renderTemplate)
3435import Text.Pandoc.Readers.TeXMath
3536import Data.List ( isPrefixOf, drop, intercalate )
3637import Data.Char ( toLower )
@@ -38,47 +39,46 @@ import Text.PrettyPrint.HughesPJ hiding ( Str )
3839import Text.Pandoc.Highlighting (languages, languagesByExtension)
3940
4041-- | Convert list of authors to a docbook <author> section
41−authorToDocbook :: [Char] -> Doc
42−authorToDocbook name = inTagsIndented "author" $
43− if ',' `elem` name
44− then -- last name first
45− let (lastname, rest) = break (==',') name
46− firstname = removeLeadingSpace rest in
47− inTagsSimple "firstname" (text $ escapeStringForXML firstname) <>
48− inTagsSimple "surname" (text $ escapeStringForXML lastname)
49− else -- last name last
50− let namewords = words name
51− lengthname = length namewords
52− (firstname, lastname) = case lengthname of
53− 0 -> ("","")
54− 1 -> ("", name)
55− n -> (intercalate " " (take (n-1) namewords), last namewords)
56− in inTagsSimple "firstname" (text $ escapeStringForXML firstname) $$
57− inTagsSimple "surname" (text $ escapeStringForXML lastname)
42+authorToDocbook :: WriterOptions -> [Inline] -> Doc
43+authorToDocbook opts name' =
44+ let name = render $ inlinesToDocbook opts name'
45+ in if ',' `elem` name
46+ then -- last name first
47+ let (lastname, rest) = break (==',') name
48+ firstname = removeLeadingSpace rest in
49+ inTagsSimple "firstname" (text $ escapeStringForXML firstname) <>
50+ inTagsSimple "surname" (text $ escapeStringForXML lastname)
51+ else -- last name last
52+ let namewords = words name
53+ lengthname = length namewords
54+ (firstname, lastname) = case lengthname of
55+ 0 -> ("","")
56+ 1 -> ("", name)
57+ n -> (intercalate " " (take (n-1) namewords), last namewords)
58+ in inTagsSimple "firstname" (text $ escapeStringForXML firstname) $$
59+ inTagsSimple "surname" (text $ escapeStringForXML lastname)
5860
5961-- | Convert Pandoc document to string in Docbook format.
6062writeDocbook :: WriterOptions -> Pandoc -> String
61−writeDocbook opts (Pandoc (Meta title authors date) blocks) =
62− "" -- TODO
63−-- let head' = if writerStandalone opts
64−-- then text (writerHeader opts)
65−-- else empty
66−-- meta = if writerStandalone opts
67−-- then inTagsIndented "articleinfo" $
68−-- (inTagsSimple "title" (wrap opts title)) $$
69−-- (vcat (map authorToDocbook authors)) $$
70−-- (inTagsSimple "date" (text $ escapeStringForXML date))
71−-- else empty
72−-- elements = hierarchicalize blocks
73−-- before = writerIncludeBefore opts
74−-- after = writerIncludeAfter opts
75−-- body = (if null before then empty else text before) $$
76−-- vcat (map (elementToDocbook opts) elements) $$
77−-- (if null after then empty else text after)
78−-- body' = if writerStandalone opts
79−-- then inTagsIndented "article" (meta $$ body)
80−-- else body
81−-- in render $ head' $$ body' $$ text ""
63+writeDocbook opts (Pandoc (Meta tit auths dat) blocks) =
64+ let title = wrap opts tit
65+ authors = map (authorToDocbook opts) auths
66+ date = inlinesToDocbook opts dat
67+ elements = hierarchicalize blocks
68+ before = writerIncludeBefore opts
69+ after = writerIncludeAfter opts
70+ main = render $
71+ (if null before then empty else text before) $$
72+ vcat (map (elementToDocbook opts) elements) $$
73+ (if null after then empty else text after)
74+ context = writerVariables opts ++
75+ [ ("body", main)
76+ , ("title", render title)
77+ , ("date", render date) ] ++
78+ [ ("author", render a) | a <- authors ]
79+ in if writerStandalone opts
80+ then renderTemplate context $ writerTemplate opts
81+ else main
8282
8383-- | Convert an Element to Docbook.
8484elementToDocbook :: WriterOptions -> Element -> Doc
templates/docbook.template+13−1
@@ -1,10 +1,22 @@
11$if(legacy-header)$
2+$legacy-header$
3+$else$
24<?xml version="1.0" encoding="utf-8" ?>
35<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
46 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
57$endif$
68<article>
7−$metadata$
9+ <articleinfo>
10+ <title>$title$</title>
11+$for(author)$
12+ <author>
13+ $author$
14+ </author>
15+$endfor$
16+$if(date)$
17+ <date>$date$</date>
18+$endif$
19+ </articleinfo>
820$body$
921</article>
1022
tests/tables.docbook−1
@@ -284,4 +284,3 @@
284284 </td>
285285 </tr>
286286</informaltable>
287−
tests/writer.docbook+1267−1267
@@ -1,7 +1,6 @@
11<?xml version="1.0" encoding="utf-8" ?>
22<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
33 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4−
54<article>
65 <articleinfo>
76 <title>Pandoc Test Suite</title>
@@ -15,932 +14,932 @@
1514 </author>
1615 <date>July 17, 2006</date>
1716 </articleinfo>
18− <para>
19− This is a set of tests for pandoc. Most of them are adapted from
20− John Gruber's markdown test suite.
21− </para>
22− <section id="headers">
23− <title>Headers</title>
24− <section id="level-2-with-an-embedded-link">
25− <title>Level 2 with an
26− <ulink url="/url">embedded link</ulink></title>
27− <section id="level-3-with-emphasis">
28− <title>Level 3 with <emphasis>emphasis</emphasis></title>
29− <section id="level-4">
30− <title>Level 4</title>
31− <section id="level-5">
32− <title>Level 5</title>
33− <para>
34− </para>
35− </section>
17+<para>
18+ This is a set of tests for pandoc. Most of them are adapted from
19+ John Gruber's markdown test suite.
20+</para>
21+<section id="headers">
22+ <title>Headers</title>
23+ <section id="level-2-with-an-embedded-link">
24+ <title>Level 2 with an
25+ <ulink url="/url">embedded link</ulink></title>
26+ <section id="level-3-with-emphasis">
27+ <title>Level 3 with <emphasis>emphasis</emphasis></title>
28+ <section id="level-4">
29+ <title>Level 4</title>
30+ <section id="level-5">
31+ <title>Level 5</title>
32+ <para>
33+ </para>
3634 </section>
3735 </section>
3836 </section>
3937 </section>
40− <section id="level-1">
41− <title>Level 1</title>
42− <section id="level-2-with-emphasis">
43− <title>Level 2 with <emphasis>emphasis</emphasis></title>
44− <section id="level-3">
45− <title>Level 3</title>
46− <para>
47− with no blank line
48− </para>
49− </section>
50− </section>
51− <section id="level-2">
52− <title>Level 2</title>
38+</section>
39+<section id="level-1">
40+ <title>Level 1</title>
41+ <section id="level-2-with-emphasis">
42+ <title>Level 2 with <emphasis>emphasis</emphasis></title>
43+ <section id="level-3">
44+ <title>Level 3</title>
5345 <para>
5446 with no blank line
5547 </para>
5648 </section>
5749 </section>
58− <section id="paragraphs">
59− <title>Paragraphs</title>
50+ <section id="level-2">
51+ <title>Level 2</title>
6052 <para>
61− Here's a regular paragraph.
53+ with no blank line
6254 </para>
55+ </section>
56+</section>
57+<section id="paragraphs">
58+ <title>Paragraphs</title>
59+ <para>
60+ Here's a regular paragraph.
61+ </para>
62+ <para>
63+ In Markdown 1.0.0 and earlier. Version 8. This line turns into a
64+ list item. Because a hard-wrapped line in the middle of a paragraph
65+ looked like a list item.
66+ </para>
67+ <para>
68+ Here's one with a bullet. * criminey.
69+ </para>
70+ <para>
71+ There should be a hard line
72+ break<literallayout></literallayout>here.
73+ </para>
74+</section>
75+<section id="block-quotes">
76+ <title>Block Quotes</title>
77+ <para>
78+ E-mail style:
79+ </para>
80+ <blockquote>
6381 <para>
64− In Markdown 1.0.0 and earlier. Version 8. This line turns into a
65− list item. Because a hard-wrapped line in the middle of a paragraph
66− looked like a list item.
82+ This is a block quote. It is pretty short.
6783 </para>
84+ </blockquote>
85+ <blockquote>
6886 <para>
69− Here's one with a bullet. * criminey.
87+ Code in a block quote:
7088 </para>
89+ <screen>
90+sub status {
91+ print &quot;working&quot;;
92+}
93+</screen>
7194 <para>
72− There should be a hard line
73− break<literallayout></literallayout>here.
95+ A list:
7496 </para>
75− </section>
76− <section id="block-quotes">
77− <title>Block Quotes</title>
97+ <orderedlist numeration="arabic">
98+ <listitem>
99+ <para>
100+ item one
101+ </para>
102+ </listitem>
103+ <listitem>
104+ <para>
105+ item two
106+ </para>
107+ </listitem>
108+ </orderedlist>
78109 <para>
79− E-mail style:
110+ Nested block quotes:
80111 </para>
81112 <blockquote>
82113 <para>
83− This is a block quote. It is pretty short.
114+ nested
84115 </para>
85116 </blockquote>
86117 <blockquote>
87118 <para>
88− Code in a block quote:
119+ nested
89120 </para>
90− <screen>
121+ </blockquote>
122+ </blockquote>
123+ <para>
124+ This should not be a block quote: 2 &gt; 1.
125+ </para>
126+ <para>
127+ And a following paragraph.
128+ </para>
129+</section>
130+<section id="code-blocks">
131+ <title>Code Blocks</title>
132+ <para>
133+ Code:
134+ </para>
135+ <screen>
136+---- (should be four hyphens)
137+
91138sub status {
92139 print &quot;working&quot;;
93140}
141+
142+this code block is indented by one tab
94143</screen>
95− <para>
96− A list:
97− </para>
98− <orderedlist numeration="arabic">
99− <listitem>
100− <para>
101− item one
102− </para>
103− </listitem>
104− <listitem>
105− <para>
106− item two
107− </para>
108− </listitem>
109− </orderedlist>
110− <para>
111− Nested block quotes:
112− </para>
113− <blockquote>
144+ <para>
145+ And:
146+ </para>
147+ <screen>
148+ this code block is indented by two tabs
149+
150+These should not be escaped: \$ \\ \&gt; \[ \{
151+</screen>
152+</section>
153+<section id="lists">
154+ <title>Lists</title>
155+ <section id="unordered">
156+ <title>Unordered</title>
157+ <para>
158+ Asterisks tight:
159+ </para>
160+ <itemizedlist>
161+ <listitem>
114162 <para>
115− nested
163+ asterisk 1
116164 </para>
117− </blockquote>
118− <blockquote>
165+ </listitem>
166+ <listitem>
119167 <para>
120− nested
168+ asterisk 2
121169 </para>
122− </blockquote>
123− </blockquote>
170+ </listitem>
171+ <listitem>
172+ <para>
173+ asterisk 3
174+ </para>
175+ </listitem>
176+ </itemizedlist>
177+ <para>
178+ Asterisks loose:
179+ </para>
180+ <itemizedlist>
181+ <listitem>
182+ <para>
183+ asterisk 1
184+ </para>
185+ </listitem>
186+ <listitem>
187+ <para>
188+ asterisk 2
189+ </para>
190+ </listitem>
191+ <listitem>
192+ <para>
193+ asterisk 3
194+ </para>
195+ </listitem>
196+ </itemizedlist>
197+ <para>
198+ Pluses tight:
199+ </para>
200+ <itemizedlist>
201+ <listitem>
202+ <para>
203+ Plus 1
204+ </para>
205+ </listitem>
206+ <listitem>
207+ <para>
208+ Plus 2
209+ </para>
210+ </listitem>
211+ <listitem>
212+ <para>
213+ Plus 3
214+ </para>
215+ </listitem>
216+ </itemizedlist>
217+ <para>
218+ Pluses loose:
219+ </para>
220+ <itemizedlist>
221+ <listitem>
222+ <para>
223+ Plus 1
224+ </para>
225+ </listitem>
226+ <listitem>
227+ <para>
228+ Plus 2
229+ </para>
230+ </listitem>
231+ <listitem>
232+ <para>
233+ Plus 3
234+ </para>
235+ </listitem>
236+ </itemizedlist>
124237 <para>
125− This should not be a block quote: 2 &gt; 1.
238+ Minuses tight:
126239 </para>
240+ <itemizedlist>
241+ <listitem>
242+ <para>
243+ Minus 1
244+ </para>
245+ </listitem>
246+ <listitem>
247+ <para>
248+ Minus 2
249+ </para>
250+ </listitem>
251+ <listitem>
252+ <para>
253+ Minus 3
254+ </para>
255+ </listitem>
256+ </itemizedlist>
127257 <para>
128− And a following paragraph.
258+ Minuses loose:
129259 </para>
260+ <itemizedlist>
261+ <listitem>
262+ <para>
263+ Minus 1
264+ </para>
265+ </listitem>
266+ <listitem>
267+ <para>
268+ Minus 2
269+ </para>
270+ </listitem>
271+ <listitem>
272+ <para>
273+ Minus 3
274+ </para>
275+ </listitem>
276+ </itemizedlist>
130277 </section>
131− <section id="code-blocks">
132− <title>Code Blocks</title>
278+ <section id="ordered">
279+ <title>Ordered</title>
133280 <para>
134− Code:
281+ Tight:
135282 </para>
136− <screen>
137−---- (should be four hyphens)
138−
139−sub status {
140− print &quot;working&quot;;
141−}
142−
143−this code block is indented by one tab
144−</screen>
283+ <orderedlist numeration="arabic">
284+ <listitem>
285+ <para>
286+ First
287+ </para>
288+ </listitem>
289+ <listitem>
290+ <para>
291+ Second
292+ </para>
293+ </listitem>
294+ <listitem>
295+ <para>
296+ Third
297+ </para>
298+ </listitem>
299+ </orderedlist>
145300 <para>
146− And:
301+ and:
147302 </para>
148− <screen>
149− this code block is indented by two tabs
150−
151−These should not be escaped: \$ \\ \&gt; \[ \{
152−</screen>
303+ <orderedlist numeration="arabic">
304+ <listitem>
305+ <para>
306+ One
307+ </para>
308+ </listitem>
309+ <listitem>
310+ <para>
311+ Two
312+ </para>
313+ </listitem>
314+ <listitem>
315+ <para>
316+ Three
317+ </para>
318+ </listitem>
319+ </orderedlist>
320+ <para>
321+ Loose using tabs:
322+ </para>
323+ <orderedlist numeration="arabic">
324+ <listitem>
325+ <para>
326+ First
327+ </para>
328+ </listitem>
329+ <listitem>
330+ <para>
331+ Second
332+ </para>
333+ </listitem>
334+ <listitem>
335+ <para>
336+ Third
337+ </para>
338+ </listitem>
339+ </orderedlist>
340+ <para>
341+ and using spaces:
342+ </para>
343+ <orderedlist numeration="arabic">
344+ <listitem>
345+ <para>
346+ One
347+ </para>
348+ </listitem>
349+ <listitem>
350+ <para>
351+ Two
352+ </para>
353+ </listitem>
354+ <listitem>
355+ <para>
356+ Three
357+ </para>
358+ </listitem>
359+ </orderedlist>
360+ <para>
361+ Multiple paragraphs:
362+ </para>
363+ <orderedlist numeration="arabic">
364+ <listitem>
365+ <para>
366+ Item 1, graf one.
367+ </para>
368+ <para>
369+ Item 1. graf two. The quick brown fox jumped over the lazy dog's
370+ back.
371+ </para>
372+ </listitem>
373+ <listitem>
374+ <para>
375+ Item 2.
376+ </para>
377+ </listitem>
378+ <listitem>
379+ <para>
380+ Item 3.
381+ </para>
382+ </listitem>
383+ </orderedlist>
153384 </section>
154− <section id="lists">
155− <title>Lists</title>
156− <section id="unordered">
157− <title>Unordered</title>
158− <para>
159− Asterisks tight:
160− </para>
161− <itemizedlist>
162− <listitem>
163− <para>
164− asterisk 1
165− </para>
166− </listitem>
167− <listitem>
168− <para>
169− asterisk 2
170− </para>
171− </listitem>
172− <listitem>
173− <para>
174− asterisk 3
175− </para>
176− </listitem>
177− </itemizedlist>
178− <para>
179− Asterisks loose:
180− </para>
181− <itemizedlist>
182− <listitem>
183− <para>
184− asterisk 1
185− </para>
186− </listitem>
187− <listitem>
188− <para>
189− asterisk 2
190− </para>
191− </listitem>
192− <listitem>
193− <para>
194− asterisk 3
195− </para>
196− </listitem>
197− </itemizedlist>
198− <para>
199− Pluses tight:
200− </para>
201− <itemizedlist>
202− <listitem>
203− <para>
204− Plus 1
205− </para>
206− </listitem>
207− <listitem>
208− <para>
209− Plus 2
210− </para>
211− </listitem>
212− <listitem>
213− <para>
214− Plus 3
215− </para>
216− </listitem>
217− </itemizedlist>
218− <para>
219− Pluses loose:
220− </para>
221− <itemizedlist>
222− <listitem>
223− <para>
224− Plus 1
225− </para>
226− </listitem>
227− <listitem>
228− <para>
229− Plus 2
230− </para>
231− </listitem>
232− <listitem>
233− <para>
234− Plus 3
235− </para>
236− </listitem>
237− </itemizedlist>
238− <para>
239− Minuses tight:
240− </para>
241− <itemizedlist>
242− <listitem>
243− <para>
244− Minus 1
245− </para>
246− </listitem>
247− <listitem>
248− <para>
249− Minus 2
250− </para>
251− </listitem>
252− <listitem>
253− <para>
254− Minus 3
255− </para>
256− </listitem>
257− </itemizedlist>
258− <para>
259− Minuses loose:
260− </para>
261− <itemizedlist>
262− <listitem>
263− <para>
264− Minus 1
265− </para>
266− </listitem>
267− <listitem>
268− <para>
269− Minus 2
270− </para>
271− </listitem>
272− <listitem>
273− <para>
274− Minus 3
275− </para>
276− </listitem>
277− </itemizedlist>
278− </section>
279− <section id="ordered">
280− <title>Ordered</title>
281− <para>
282− Tight:
283− </para>
284− <orderedlist numeration="arabic">
285− <listitem>
286− <para>
287− First
288− </para>
289− </listitem>
290− <listitem>
291− <para>
292− Second
293− </para>
294− </listitem>
295− <listitem>
296− <para>
297− Third
298− </para>
299− </listitem>
300− </orderedlist>
301− <para>
302− and:
303− </para>
304− <orderedlist numeration="arabic">
305− <listitem>
306− <para>
307− One
308− </para>
309− </listitem>
310− <listitem>
311− <para>
312− Two
313− </para>
314− </listitem>
315− <listitem>
316− <para>
317− Three
318− </para>
319− </listitem>
320− </orderedlist>
321− <para>
322− Loose using tabs:
323− </para>
324− <orderedlist numeration="arabic">
325− <listitem>
326− <para>
327− First
328− </para>
329− </listitem>
330− <listitem>
331− <para>
332− Second
333− </para>
334− </listitem>
335− <listitem>
336− <para>
337− Third
338− </para>
339− </listitem>
340− </orderedlist>
341− <para>
342− and using spaces:
343− </para>
344− <orderedlist numeration="arabic">
345− <listitem>
346− <para>
347− One
348− </para>
349− </listitem>
350− <listitem>
351− <para>
352− Two
353− </para>
354− </listitem>
355− <listitem>
356− <para>
357− Three
358− </para>
359− </listitem>
360− </orderedlist>
361− <para>
362− Multiple paragraphs:
363− </para>
364− <orderedlist numeration="arabic">
365− <listitem>
366− <para>
367− Item 1, graf one.
368− </para>
369− <para>
370− Item 1. graf two. The quick brown fox jumped over the lazy dog's
371− back.
372− </para>
373− </listitem>
374− <listitem>
375− <para>
376− Item 2.
377− </para>
378− </listitem>
379− <listitem>
380− <para>
381− Item 3.
382− </para>
383− </listitem>
384− </orderedlist>
385− </section>
386− <section id="nested">
387− <title>Nested</title>
388− <itemizedlist>
389− <listitem>
390− <para>
391− Tab
392− </para>
393− <itemizedlist>
394− <listitem>
395− <para>
396− Tab
397− </para>
398− <itemizedlist>
399− <listitem>
400− <para>
401− Tab
402− </para>
403− </listitem>
404− </itemizedlist>
405− </listitem>
406− </itemizedlist>
407− </listitem>
408− </itemizedlist>
409− <para>
410− Here's another:
411− </para>
412− <orderedlist numeration="arabic">
413− <listitem>
414− <para>
415− First
416− </para>
417− </listitem>
418− <listitem>
419− <para>
420− Second:
421− </para>
422− <itemizedlist>
423− <listitem>
424− <para>
425− Fee
426− </para>
427− </listitem>
428− <listitem>
429− <para>
430− Fie
431− </para>
432− </listitem>
433− <listitem>
434− <para>
435− Foe
436− </para>
437− </listitem>
438− </itemizedlist>
439− </listitem>
440− <listitem>
441− <para>
442− Third
443− </para>
444− </listitem>
445− </orderedlist>
446− <para>
447− Same thing but with paragraphs:
448− </para>
449− <orderedlist numeration="arabic">
450− <listitem>
451− <para>
452− First
453− </para>
454− </listitem>
455− <listitem>
456− <para>
457− Second:
458− </para>
459− <itemizedlist>
460− <listitem>
461− <para>
462− Fee
463− </para>
464− </listitem>
465− <listitem>
466− <para>
467− Fie
468− </para>
469− </listitem>
470− <listitem>
471− <para>
472− Foe
473− </para>
474− </listitem>
475− </itemizedlist>
476− </listitem>
477− <listitem>
478− <para>
479− Third
480− </para>
481− </listitem>
482− </orderedlist>
483− </section>
484− <section id="tabs-and-spaces">
485− <title>Tabs and spaces</title>
486− <itemizedlist>
487− <listitem>
488− <para>
489− this is a list item indented with tabs
490− </para>
491− </listitem>
492− <listitem>
493− <para>
494− this is a list item indented with spaces
495− </para>
496− <itemizedlist>
497− <listitem>
498− <para>
499− this is an example list item indented with tabs
500− </para>
501− </listitem>
502− <listitem>
503− <para>
504− this is an example list item indented with spaces
505− </para>
506− </listitem>
507− </itemizedlist>
508− </listitem>
509− </itemizedlist>
510− </section>
511− <section id="fancy-list-markers">
512− <title>Fancy list markers</title>
513− <orderedlist numeration="arabic">
514− <listitem override="2">
515− <para>
516− begins with 2
517− </para>
518− </listitem>
519− <listitem>
520− <para>
521− and now 3
522− </para>
523− <para>
524− with a continuation
525− </para>
526− <orderedlist numeration="lowerroman">
527− <listitem override="4">
528− <para>
529− sublist with roman numerals, starting with 4
530− </para>
531− </listitem>
532− <listitem>
533− <para>
534− more items
535− </para>
536− <orderedlist numeration="upperalpha">
537− <listitem>
538− <para>
539− a subsublist
540− </para>
541− </listitem>
542− <listitem>
543− <para>
544− a subsublist
545− </para>
546− </listitem>
547− </orderedlist>
548− </listitem>
549− </orderedlist>
550− </listitem>
551− </orderedlist>
552− <para>
553− Nesting:
554− </para>
555− <orderedlist numeration="upperalpha">
556− <listitem>
557− <para>
558− Upper Alpha
559− </para>
560− <orderedlist numeration="upperroman">
561− <listitem>
562− <para>
563− Upper Roman.
564− </para>
565− <orderedlist numeration="arabic">
566− <listitem override="6">
567− <para>
568− Decimal start with 6
569− </para>
570− <orderedlist numeration="loweralpha">
571− <listitem override="3">
572− <para>
573− Lower alpha with paren
574− </para>
575− </listitem>
576− </orderedlist>
577− </listitem>
578− </orderedlist>
579− </listitem>
580− </orderedlist>
581− </listitem>
582− </orderedlist>
583− <para>
584− Autonumbering:
585− </para>
586− <orderedlist>
587− <listitem>
588− <para>
589− Autonumber.
590− </para>
591− </listitem>
592− <listitem>
593− <para>
594− More.
595− </para>
596− <orderedlist>
597− <listitem>
598− <para>
599− Nested.
600− </para>
601− </listitem>
602− </orderedlist>
603− </listitem>
604− </orderedlist>
605− <para>
606− Should not be a list item:
607− </para>
608− <para>
609− M.A.&#160;2007
610− </para>
611− <para>
612− B. Williams
613− </para>
614− </section>
615− </section>
616− <section id="definition-lists">
617− <title>Definition Lists</title>
385+ <section id="nested">
386+ <title>Nested</title>
387+ <itemizedlist>
388+ <listitem>
389+ <para>
390+ Tab
391+ </para>
392+ <itemizedlist>
393+ <listitem>
394+ <para>
395+ Tab
396+ </para>
397+ <itemizedlist>
398+ <listitem>
399+ <para>
400+ Tab
401+ </para>
402+ </listitem>
403+ </itemizedlist>
404+ </listitem>
405+ </itemizedlist>
406+ </listitem>
407+ </itemizedlist>
618408 <para>
619− Tight using spaces:
409+ Here's another:
620410 </para>
621− <variablelist>
622− <varlistentry>
623− <term>
624− apple
625− </term>
626− <listitem>
627− <para>
628− red fruit
629− </para>
630− </listitem>
631− </varlistentry>
632− <varlistentry>
633− <term>
634− orange
635− </term>
636− <listitem>
637− <para>
638− orange fruit
639− </para>
640− </listitem>
641− </varlistentry>
642− <varlistentry>
643− <term>
644− banana
645− </term>
646− <listitem>
647− <para>
648− yellow fruit
649− </para>
650− </listitem>
651− </varlistentry>
652− </variablelist>
411+ <orderedlist numeration="arabic">
412+ <listitem>
413+ <para>
414+ First
415+ </para>
416+ </listitem>
417+ <listitem>
418+ <para>
419+ Second:
420+ </para>
421+ <itemizedlist>
422+ <listitem>
423+ <para>
424+ Fee
425+ </para>
426+ </listitem>
427+ <listitem>
428+ <para>
429+ Fie
430+ </para>
431+ </listitem>
432+ <listitem>
433+ <para>
434+ Foe
435+ </para>
436+ </listitem>
437+ </itemizedlist>
438+ </listitem>
439+ <listitem>
440+ <para>
441+ Third
442+ </para>
443+ </listitem>
444+ </orderedlist>
653445 <para>
654− Tight using tabs:
446+ Same thing but with paragraphs:
655447 </para>
656− <variablelist>
657− <varlistentry>
658− <term>
659− apple
660− </term>
661− <listitem>
662− <para>
663− red fruit
664− </para>
665− </listitem>
666− </varlistentry>
667− <varlistentry>
668− <term>
669− orange
670− </term>
671− <listitem>
672− <para>
673− orange fruit
674− </para>
675− </listitem>
676− </varlistentry>
677− <varlistentry>
678− <term>
679− banana
680− </term>
681− <listitem>
682− <para>
683− yellow fruit
684− </para>
685− </listitem>
686− </varlistentry>
687− </variablelist>
448+ <orderedlist numeration="arabic">
449+ <listitem>
450+ <para>
451+ First
452+ </para>
453+ </listitem>
454+ <listitem>
455+ <para>
456+ Second:
457+ </para>
458+ <itemizedlist>
459+ <listitem>
460+ <para>
461+ Fee
462+ </para>
463+ </listitem>
464+ <listitem>
465+ <para>
466+ Fie
467+ </para>
468+ </listitem>
469+ <listitem>
470+ <para>
471+ Foe
472+ </para>
473+ </listitem>
474+ </itemizedlist>
475+ </listitem>
476+ <listitem>
477+ <para>
478+ Third
479+ </para>
480+ </listitem>
481+ </orderedlist>
482+ </section>
483+ <section id="tabs-and-spaces">
484+ <title>Tabs and spaces</title>
485+ <itemizedlist>
486+ <listitem>
487+ <para>
488+ this is a list item indented with tabs
489+ </para>
490+ </listitem>
491+ <listitem>
492+ <para>
493+ this is a list item indented with spaces
494+ </para>
495+ <itemizedlist>
496+ <listitem>
497+ <para>
498+ this is an example list item indented with tabs
499+ </para>
500+ </listitem>
501+ <listitem>
502+ <para>
503+ this is an example list item indented with spaces
504+ </para>
505+ </listitem>
506+ </itemizedlist>
507+ </listitem>
508+ </itemizedlist>
509+ </section>
510+ <section id="fancy-list-markers">
511+ <title>Fancy list markers</title>
512+ <orderedlist numeration="arabic">
513+ <listitem override="2">
514+ <para>
515+ begins with 2
516+ </para>
517+ </listitem>
518+ <listitem>
519+ <para>
520+ and now 3
521+ </para>
522+ <para>
523+ with a continuation
524+ </para>
525+ <orderedlist numeration="lowerroman">
526+ <listitem override="4">
527+ <para>
528+ sublist with roman numerals, starting with 4
529+ </para>
530+ </listitem>
531+ <listitem>
532+ <para>
533+ more items
534+ </para>
535+ <orderedlist numeration="upperalpha">
536+ <listitem>
537+ <para>
538+ a subsublist
539+ </para>
540+ </listitem>
541+ <listitem>
542+ <para>
543+ a subsublist
544+ </para>
545+ </listitem>
546+ </orderedlist>
547+ </listitem>
548+ </orderedlist>
549+ </listitem>
550+ </orderedlist>
688551 <para>
689− Loose:
552+ Nesting:
690553 </para>
691− <variablelist>
692− <varlistentry>
693− <term>
694− apple
695− </term>
696− <listitem>
697− <para>
698− red fruit
699− </para>
700− </listitem>
701− </varlistentry>
702− <varlistentry>
703− <term>
704− orange
705− </term>
706− <listitem>
707− <para>
708− orange fruit
709− </para>
710− </listitem>
711− </varlistentry>
712− <varlistentry>
713− <term>
714− banana
715− </term>
716− <listitem>
717− <para>
718− yellow fruit
719− </para>
720− </listitem>
721− </varlistentry>
722− </variablelist>
554+ <orderedlist numeration="upperalpha">
555+ <listitem>
556+ <para>
557+ Upper Alpha
558+ </para>
559+ <orderedlist numeration="upperroman">
560+ <listitem>
561+ <para>
562+ Upper Roman.
563+ </para>
564+ <orderedlist numeration="arabic">
565+ <listitem override="6">
566+ <para>
567+ Decimal start with 6
568+ </para>
569+ <orderedlist numeration="loweralpha">
570+ <listitem override="3">
571+ <para>
572+ Lower alpha with paren
573+ </para>
574+ </listitem>
575+ </orderedlist>
576+ </listitem>
577+ </orderedlist>
578+ </listitem>
579+ </orderedlist>
580+ </listitem>
581+ </orderedlist>
723582 <para>
724− Multiple blocks with italics:
583+ Autonumbering:
725584 </para>
726− <variablelist>
727− <varlistentry>
728− <term>
729− <emphasis>apple</emphasis>
730− </term>
731− <listitem>
732− <para>
733− red fruit
734− </para>
735− <para>
736− contains seeds, crisp, pleasant to taste
737− </para>
738− </listitem>
739− </varlistentry>
740− <varlistentry>
741− <term>
742− <emphasis>orange</emphasis>
743− </term>
744− <listitem>
745− <para>
746− orange fruit
747− </para>
748− <screen>
749−{ orange code block }
750−</screen>
751− <blockquote>
585+ <orderedlist>
586+ <listitem>
587+ <para>
588+ Autonumber.
589+ </para>
590+ </listitem>
591+ <listitem>
592+ <para>
593+ More.
594+ </para>
595+ <orderedlist>
596+ <listitem>
752597 <para>
753− orange block quote
598+ Nested.
754599 </para>
755− </blockquote>
756− </listitem>
757− </varlistentry>
758− </variablelist>
600+ </listitem>
601+ </orderedlist>
602+ </listitem>
603+ </orderedlist>
759604 <para>
760− Multiple definitions, tight:
605+ Should not be a list item:
761606 </para>
762− <variablelist>
763− <varlistentry>
764− <term>
765− apple
766− </term>
767− <listitem>
768− <para>
769− red fruit
770− </para>
771− <para>
772− computer
773− </para>
774− </listitem>
775− </varlistentry>
776− <varlistentry>
777− <term>
778− orange
779− </term>
780− <listitem>
781− <para>
782− orange fruit
783− </para>
784− <para>
785− bank
786− </para>
787− </listitem>
788− </varlistentry>
789− </variablelist>
790607 <para>
791− Multiple definitions, loose:
608+ M.A.&#160;2007
792609 </para>
793− <variablelist>
794− <varlistentry>
795− <term>
796− apple
797− </term>
798− <listitem>
799− <para>
800− red fruit
801− </para>
802− <para>
803− computer
804− </para>
805− </listitem>
806− </varlistentry>
807− <varlistentry>
808− <term>
809− orange
810− </term>
811− <listitem>
812− <para>
813− orange fruit
814− </para>
815− <para>
816− bank
817− </para>
818− </listitem>
819− </varlistentry>
820− </variablelist>
821610 <para>
822− Blank line after term, indented marker, alternate markers:
611+ B. Williams
823612 </para>
824− <variablelist>
825− <varlistentry>
826− <term>
827− apple
828− </term>
829− <listitem>
830− <para>
831− red fruit
832− </para>
833− <para>
834− computer
835− </para>
836− </listitem>
837− </varlistentry>
838− <varlistentry>
839− <term>
840− orange
841− </term>
842− <listitem>
613+ </section>
614+</section>
615+<section id="definition-lists">
616+ <title>Definition Lists</title>
617+ <para>
618+ Tight using spaces:
619+ </para>
620+ <variablelist>
621+ <varlistentry>
622+ <term>
623+ apple
624+ </term>
625+ <listitem>
626+ <para>
627+ red fruit
628+ </para>
629+ </listitem>
630+ </varlistentry>
631+ <varlistentry>
632+ <term>
633+ orange
634+ </term>
635+ <listitem>
636+ <para>
637+ orange fruit
638+ </para>
639+ </listitem>
640+ </varlistentry>
641+ <varlistentry>
642+ <term>
643+ banana
644+ </term>
645+ <listitem>
646+ <para>
647+ yellow fruit
648+ </para>
649+ </listitem>
650+ </varlistentry>
651+ </variablelist>
652+ <para>
653+ Tight using tabs:
654+ </para>
655+ <variablelist>
656+ <varlistentry>
657+ <term>
658+ apple
659+ </term>
660+ <listitem>
661+ <para>
662+ red fruit
663+ </para>
664+ </listitem>
665+ </varlistentry>
666+ <varlistentry>
667+ <term>
668+ orange
669+ </term>
670+ <listitem>
671+ <para>
672+ orange fruit
673+ </para>
674+ </listitem>
675+ </varlistentry>
676+ <varlistentry>
677+ <term>
678+ banana
679+ </term>
680+ <listitem>
681+ <para>
682+ yellow fruit
683+ </para>
684+ </listitem>
685+ </varlistentry>
686+ </variablelist>
687+ <para>
688+ Loose:
689+ </para>
690+ <variablelist>
691+ <varlistentry>
692+ <term>
693+ apple
694+ </term>
695+ <listitem>
696+ <para>
697+ red fruit
698+ </para>
699+ </listitem>
700+ </varlistentry>
701+ <varlistentry>
702+ <term>
703+ orange
704+ </term>
705+ <listitem>
706+ <para>
707+ orange fruit
708+ </para>
709+ </listitem>
710+ </varlistentry>
711+ <varlistentry>
712+ <term>
713+ banana
714+ </term>
715+ <listitem>
716+ <para>
717+ yellow fruit
718+ </para>
719+ </listitem>
720+ </varlistentry>
721+ </variablelist>
722+ <para>
723+ Multiple blocks with italics:
724+ </para>
725+ <variablelist>
726+ <varlistentry>
727+ <term>
728+ <emphasis>apple</emphasis>
729+ </term>
730+ <listitem>
731+ <para>
732+ red fruit
733+ </para>
734+ <para>
735+ contains seeds, crisp, pleasant to taste
736+ </para>
737+ </listitem>
738+ </varlistentry>
739+ <varlistentry>
740+ <term>
741+ <emphasis>orange</emphasis>
742+ </term>
743+ <listitem>
744+ <para>
745+ orange fruit
746+ </para>
747+ <screen>
748+{ orange code block }
749+</screen>
750+ <blockquote>
843751 <para>
844− orange fruit
752+ orange block quote
845753 </para>
846− <orderedlist numeration="arabic">
847− <listitem>
848− <para>
849− sublist
850− </para>
851− </listitem>
852− <listitem>
853− <para>
854− sublist
855− </para>
856− </listitem>
857− </orderedlist>
858− </listitem>
859− </varlistentry>
860− </variablelist>
861− </section>
862− <section id="html-blocks">
863− <title>HTML Blocks</title>
864− <para>
865− Simple block on one line:
866− </para>
867− <div>
868− foo
869− </div>
754+ </blockquote>
755+ </listitem>
756+ </varlistentry>
757+ </variablelist>
758+ <para>
759+ Multiple definitions, tight:
760+ </para>
761+ <variablelist>
762+ <varlistentry>
763+ <term>
764+ apple
765+ </term>
766+ <listitem>
767+ <para>
768+ red fruit
769+ </para>
770+ <para>
771+ computer
772+ </para>
773+ </listitem>
774+ </varlistentry>
775+ <varlistentry>
776+ <term>
777+ orange
778+ </term>
779+ <listitem>
780+ <para>
781+ orange fruit
782+ </para>
783+ <para>
784+ bank
785+ </para>
786+ </listitem>
787+ </varlistentry>
788+ </variablelist>
789+ <para>
790+ Multiple definitions, loose:
791+ </para>
792+ <variablelist>
793+ <varlistentry>
794+ <term>
795+ apple
796+ </term>
797+ <listitem>
798+ <para>
799+ red fruit
800+ </para>
801+ <para>
802+ computer
803+ </para>
804+ </listitem>
805+ </varlistentry>
806+ <varlistentry>
807+ <term>
808+ orange
809+ </term>
810+ <listitem>
811+ <para>
812+ orange fruit
813+ </para>
814+ <para>
815+ bank
816+ </para>
817+ </listitem>
818+ </varlistentry>
819+ </variablelist>
820+ <para>
821+ Blank line after term, indented marker, alternate markers:
822+ </para>
823+ <variablelist>
824+ <varlistentry>
825+ <term>
826+ apple
827+ </term>
828+ <listitem>
829+ <para>
830+ red fruit
831+ </para>
832+ <para>
833+ computer
834+ </para>
835+ </listitem>
836+ </varlistentry>
837+ <varlistentry>
838+ <term>
839+ orange
840+ </term>
841+ <listitem>
842+ <para>
843+ orange fruit
844+ </para>
845+ <orderedlist numeration="arabic">
846+ <listitem>
847+ <para>
848+ sublist
849+ </para>
850+ </listitem>
851+ <listitem>
852+ <para>
853+ sublist
854+ </para>
855+ </listitem>
856+ </orderedlist>
857+ </listitem>
858+ </varlistentry>
859+ </variablelist>
860+</section>
861+<section id="html-blocks">
862+ <title>HTML Blocks</title>
863+ <para>
864+ Simple block on one line:
865+ </para>
866+ <div>
867+ foo
868+ </div>
870869
871− <para>
872− And nested without indentation:
873− </para>
874− <div>
870+ <para>
871+ And nested without indentation:
872+ </para>
873+ <div>
875874<div>
876875<div>
877− foo
878− </div>
876+ foo
877+ </div>
879878</div>
880879<div>
881− bar
882− </div>
880+ bar
881+ </div>
883882</div>
884883
885− <para>
886− Interpreted markdown in a table:
887− </para>
888− <table>
884+ <para>
885+ Interpreted markdown in a table:
886+ </para>
887+ <table>
889888<tr>
890889<td>
891− This is <emphasis>emphasized</emphasis>
892− </td>
890+ This is <emphasis>emphasized</emphasis>
891+ </td>
893892<td>
894− And this is <emphasis role="strong">strong</emphasis>
895− </td>
893+ And this is <emphasis role="strong">strong</emphasis>
894+ </td>
896895</tr>
897896</table>
898897
899898<script type="text/javascript">document.write('This *should not* be interpreted as markdown');</script>
900899
901− <para>
902− Here's a simple block:
903− </para>
904− <div>
900+ <para>
901+ Here's a simple block:
902+ </para>
903+ <div>
905904
906− foo
907− </div>
905+ foo
906+ </div>
908907
909− <para>
910− This should be a code block, though:
911− </para>
912− <screen>
908+ <para>
909+ This should be a code block, though:
910+ </para>
911+ <screen>
913912&lt;div&gt;
914913 foo
915914&lt;/div&gt;
916915</screen>
917− <para>
918− As should this:
919− </para>
920− <screen>
916+ <para>
917+ As should this:
918+ </para>
919+ <screen>
921920&lt;div&gt;foo&lt;/div&gt;
922921</screen>
923− <para>
924− Now, nested:
925− </para>
926− <div>
922+ <para>
923+ Now, nested:
924+ </para>
925+ <div>
927926 <div>
928927 <div>
929928
930− foo
931− </div>
929+ foo
930+ </div>
932931 </div>
933932</div>
934933
935− <para>
936− This should just be an HTML comment:
937− </para>
938− <!-- Comment -->
934+ <para>
935+ This should just be an HTML comment:
936+ </para>
937+ <!-- Comment -->
939938
940− <para>
941− Multiline:
942− </para>
943− <!--
939+ <para>
940+ Multiline:
941+ </para>
942+ <!--
944943Blah
945944Blah
946945-->
@@ -949,522 +948,523 @@ Blah
949948 This is another comment.
950949-->
951950
952− <para>
953− Code block:
954− </para>
955− <screen>
951+ <para>
952+ Code block:
953+ </para>
954+ <screen>
956955&lt;!-- Comment --&gt;
957956</screen>
958− <para>
959− Just plain comment, with trailing spaces on the line:
960− </para>
961− <!-- foo -->
957+ <para>
958+ Just plain comment, with trailing spaces on the line:
959+ </para>
960+ <!-- foo -->
962961
963− <para>
964− Code:
965− </para>
966− <screen>
962+ <para>
963+ Code:
964+ </para>
965+ <screen>
967966&lt;hr /&gt;
968967</screen>
968+ <para>
969+ Hr's:
970+ </para>
971+ <hr>
972+
973+<hr />
974+
975+<hr />
976+
977+<hr>
978+
979+<hr />
980+
981+<hr />
982+
983+<hr class="foo" id="bar" />
984+
985+<hr class="foo" id="bar" />
986+
987+<hr class="foo" id="bar">
988+
989+</section>
990+<section id="inline-markup">
991+ <title>Inline Markup</title>
992+ <para>
993+ This is <emphasis>emphasized</emphasis>, and so
994+ <emphasis>is this</emphasis>.
995+ </para>
996+ <para>
997+ This is <emphasis role="strong">strong</emphasis>, and so
998+ <emphasis role="strong">is this</emphasis>.
999+ </para>
1000+ <para>
1001+ An <emphasis><ulink url="/url">emphasized link</ulink></emphasis>.
1002+ </para>
1003+ <para>
1004+ <emphasis role="strong"><emphasis>This is strong and em.</emphasis></emphasis>
1005+ </para>
1006+ <para>
1007+ So is <emphasis role="strong"><emphasis>this</emphasis></emphasis>
1008+ word.
1009+ </para>
1010+ <para>
1011+ <emphasis role="strong"><emphasis>This is strong and em.</emphasis></emphasis>
1012+ </para>
1013+ <para>
1014+ So is <emphasis role="strong"><emphasis>this</emphasis></emphasis>
1015+ word.
1016+ </para>
1017+ <para>
1018+ This is code: <literal>&gt;</literal>, <literal>$</literal>,
1019+ <literal>\</literal>, <literal>\$</literal>,
1020+ <literal>&lt;html&gt;</literal>.
1021+ </para>
1022+ <para>
1023+ <emphasis role="strikethrough">This is <emphasis>strikeout</emphasis>.</emphasis>
1024+ </para>
1025+ <para>
1026+ Superscripts: a<superscript>bc</superscript>d
1027+ a<superscript><emphasis>hello</emphasis></superscript>
1028+ a<superscript>hello&#160;there</superscript>.
1029+ </para>
1030+ <para>
1031+ Subscripts: H<subscript>2</subscript>O,
1032+ H<subscript>23</subscript>O,
1033+ H<subscript>many&#160;of&#160;them</subscript>O.
1034+ </para>
1035+ <para>
1036+ These should not be superscripts or subscripts, because of the
1037+ unescaped spaces: a^b c^d, a~b c~d.
1038+ </para>
1039+</section>
1040+<section id="smart-quotes-ellipses-dashes">
1041+ <title>Smart quotes, ellipses, dashes</title>
1042+ <para>
1043+ <quote>Hello,</quote> said the spider.
1044+ <quote><quote>Shelob</quote> is my name.</quote>
1045+ </para>
1046+ <para>
1047+ <quote>A</quote>, <quote>B</quote>, and <quote>C</quote> are
1048+ letters.
1049+ </para>
1050+ <para>
1051+ <quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote>
1052+ are names of trees. So is <quote>pine.</quote>
1053+ </para>
1054+ <para>
1055+ <quote>He said, <quote>I want to go.</quote></quote> Were you alive
1056+ in the 70's?
1057+ </para>
1058+ <para>
1059+ Here is some quoted <quote><literal>code</literal></quote> and a
1060+ <quote><ulink url="http://example.com/?foo=1&amp;bar=2">quoted link</ulink></quote>.
1061+ </para>
1062+ <para>
1063+ Some dashes: one&#8212;two &#8212; three&#8212;four &#8212; five.
1064+ </para>
1065+ <para>
1066+ Dashes between numbers: 5&#8211;7, 255&#8211;66, 1987&#8211;1999.
1067+ </para>
1068+ <para>
1069+ Ellipses&#8230;and&#8230;and&#8230;.
1070+ </para>
1071+</section>
1072+<section id="latex">
1073+ <title>LaTeX</title>
1074+ <itemizedlist>
1075+ <listitem>
1076+ <para>
1077+ </para>
1078+ </listitem>
1079+ <listitem>
1080+ <para>
1081+ 2+2=4
1082+ </para>
1083+ </listitem>
1084+ <listitem>
1085+ <para>
1086+ <emphasis>x</emphasis> ∈ <emphasis>y</emphasis>
1087+ </para>
1088+ </listitem>
1089+ <listitem>
1090+ <para>
1091+ α ∧ ω
1092+ </para>
1093+ </listitem>
1094+ <listitem>
1095+ <para>
1096+ 223
1097+ </para>
1098+ </listitem>
1099+ <listitem>
1100+ <para>
1101+ <emphasis>p</emphasis>-Tree
1102+ </para>
1103+ </listitem>
1104+ <listitem>
1105+ <para>
1106+ Here's some display math:
1107+ \frac{<emphasis>d</emphasis>}{<emphasis>dx</emphasis>}<emphasis>f</emphasis>(<emphasis>x</emphasis>)=\lim<subscript><emphasis>h</emphasis> → 0</subscript>\frac{<emphasis>f</emphasis>(<emphasis>x</emphasis>+<emphasis>h</emphasis>)-<emphasis>f</emphasis>(<emphasis>x</emphasis>)}{<emphasis>h</emphasis>}
1108+ </para>
1109+ </listitem>
1110+ <listitem>
1111+ <para>
1112+ Here's one that has a line break in it:
1113+ α+ω × <emphasis>x</emphasis><superscript>2</superscript>.
1114+ </para>
1115+ </listitem>
1116+ </itemizedlist>
1117+ <para>
1118+ These shouldn't be math:
1119+ </para>
1120+ <itemizedlist>
1121+ <listitem>
1122+ <para>
1123+ To get the famous equation, write <literal>$e = mc^2$</literal>.
1124+ </para>
1125+ </listitem>
1126+ <listitem>
1127+ <para>
1128+ $22,000 is a <emphasis>lot</emphasis> of money. So is $34,000. (It
1129+ worked if <quote>lot</quote> is emphasized.)
1130+ </para>
1131+ </listitem>
1132+ <listitem>
1133+ <para>
1134+ Shoes ($20) and socks ($5).
1135+ </para>
1136+ </listitem>
1137+ <listitem>
1138+ <para>
1139+ Escaped <literal>$</literal>: $73
1140+ <emphasis>this should be emphasized</emphasis> 23$.
1141+ </para>
1142+ </listitem>
1143+ </itemizedlist>
1144+ <para>
1145+ Here's a LaTeX table:
1146+ </para>
1147+ <para>
1148+ </para>
1149+</section>
1150+<section id="special-characters">
1151+ <title>Special Characters</title>
1152+ <para>
1153+ Here is some unicode:
1154+ </para>
1155+ <itemizedlist>
1156+ <listitem>
1157+ <para>
1158+ I hat: Î
1159+ </para>
1160+ </listitem>
1161+ <listitem>
1162+ <para>
1163+ o umlaut: ö
1164+ </para>
1165+ </listitem>
1166+ <listitem>
1167+ <para>
1168+ section: §
1169+ </para>
1170+ </listitem>
1171+ <listitem>
1172+ <para>
1173+ set membership: ∈
1174+ </para>
1175+ </listitem>
1176+ <listitem>
1177+ <para>
1178+ copyright: ©
1179+ </para>
1180+ </listitem>
1181+ </itemizedlist>
1182+ <para>
1183+ AT&amp;T has an ampersand in their name.
1184+ </para>
1185+ <para>
1186+ AT&amp;T is another way to write it.
1187+ </para>
1188+ <para>
1189+ This &amp; that.
1190+ </para>
1191+ <para>
1192+ 4 &lt; 5.
1193+ </para>
1194+ <para>
1195+ 6 &gt; 5.
1196+ </para>
1197+ <para>
1198+ Backslash: \
1199+ </para>
1200+ <para>
1201+ Backtick: `
1202+ </para>
1203+ <para>
1204+ Asterisk: *
1205+ </para>
1206+ <para>
1207+ Underscore: _
1208+ </para>
1209+ <para>
1210+ Left brace: {
1211+ </para>
1212+ <para>
1213+ Right brace: }
1214+ </para>
1215+ <para>
1216+ Left bracket: [
1217+ </para>
1218+ <para>
1219+ Right bracket: ]
1220+ </para>
1221+ <para>
1222+ Left paren: (
1223+ </para>
1224+ <para>
1225+ Right paren: )
1226+ </para>
1227+ <para>
1228+ Greater-than: &gt;
1229+ </para>
1230+ <para>
1231+ Hash: #
1232+ </para>
1233+ <para>
1234+ Period: .
1235+ </para>
1236+ <para>
1237+ Bang: !
1238+ </para>
1239+ <para>
1240+ Plus: +
1241+ </para>
1242+ <para>
1243+ Minus: -
1244+ </para>
1245+</section>
1246+<section id="links">
1247+ <title>Links</title>
1248+ <section id="explicit">
1249+ <title>Explicit</title>
9691250 <para>
970− Hr's:
1251+ Just a <ulink url="/url/">URL</ulink>.
9711252 </para>
972− <hr>
973−
974−<hr />
975−
976−<hr />
977−
978−<hr>
979−
980−<hr />
981−
982−<hr />
983−
984−<hr class="foo" id="bar" />
985−
986−<hr class="foo" id="bar" />
987−
988−<hr class="foo" id="bar">
989−
990− </section>
991− <section id="inline-markup">
992− <title>Inline Markup</title>
9931253 <para>
994− This is <emphasis>emphasized</emphasis>, and so
995− <emphasis>is this</emphasis>.
1254+ <ulink url="/url/">URL and title</ulink>.
9961255 </para>
9971256 <para>
998− This is <emphasis role="strong">strong</emphasis>, and so
999− <emphasis role="strong">is this</emphasis>.
1257+ <ulink url="/url/">URL and title</ulink>.
10001258 </para>
10011259 <para>
1002− An <emphasis><ulink url="/url">emphasized link</ulink></emphasis>.
1260+ <ulink url="/url/">URL and title</ulink>.
10031261 </para>
10041262 <para>
1005− <emphasis role="strong"><emphasis>This is strong and em.</emphasis></emphasis>
1263+ <ulink url="/url/">URL and title</ulink>
10061264 </para>
10071265 <para>
1008− So is <emphasis role="strong"><emphasis>this</emphasis></emphasis>
1009− word.
1266+ <ulink url="/url/">URL and title</ulink>
10101267 </para>
10111268 <para>
1012− <emphasis role="strong"><emphasis>This is strong and em.</emphasis></emphasis>
1269+ <ulink url="/url/with_underscore">with_underscore</ulink>
10131270 </para>
10141271 <para>
1015− So is <emphasis role="strong"><emphasis>this</emphasis></emphasis>
1016− word.
1272+ Email link (<email>nobody@nowhere.net</email>)
10171273 </para>
10181274 <para>
1019− This is code: <literal>&gt;</literal>, <literal>$</literal>,
1020− <literal>\</literal>, <literal>\$</literal>,
1021− <literal>&lt;html&gt;</literal>.
1275+ <ulink url="">Empty</ulink>.
10221276 </para>
1277+ </section>
1278+ <section id="reference">
1279+ <title>Reference</title>
10231280 <para>
1024− <emphasis role="strikethrough">This is <emphasis>strikeout</emphasis>.</emphasis>
1281+ Foo <ulink url="/url/">bar</ulink>.
10251282 </para>
10261283 <para>
1027− Superscripts: a<superscript>bc</superscript>d
1028− a<superscript><emphasis>hello</emphasis></superscript>
1029− a<superscript>hello&#160;there</superscript>.
1284+ Foo <ulink url="/url/">bar</ulink>.
10301285 </para>
10311286 <para>
1032− Subscripts: H<subscript>2</subscript>O,
1033− H<subscript>23</subscript>O,
1034− H<subscript>many&#160;of&#160;them</subscript>O.
1287+ Foo <ulink url="/url/">bar</ulink>.
10351288 </para>
10361289 <para>
1037− These should not be superscripts or subscripts, because of the
1038− unescaped spaces: a^b c^d, a~b c~d.
1290+ With <ulink url="/url/">embedded [brackets]</ulink>.
10391291 </para>
1040− </section>
1041− <section id="smart-quotes-ellipses-dashes">
1042− <title>Smart quotes, ellipses, dashes</title>
10431292 <para>
1044− <quote>Hello,</quote> said the spider.
1045− <quote><quote>Shelob</quote> is my name.</quote>
1293+ <ulink url="/url/">b</ulink> by itself should be a link.
10461294 </para>
10471295 <para>
1048− <quote>A</quote>, <quote>B</quote>, and <quote>C</quote> are
1049− letters.
1296+ Indented <ulink url="/url">once</ulink>.
10501297 </para>
10511298 <para>
1052− <quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote>
1053− are names of trees. So is <quote>pine.</quote>
1299+ Indented <ulink url="/url">twice</ulink>.
10541300 </para>
10551301 <para>
1056− <quote>He said, <quote>I want to go.</quote></quote> Were you alive
1057− in the 70's?
1302+ Indented <ulink url="/url">thrice</ulink>.
10581303 </para>
10591304 <para>
1060− Here is some quoted <quote><literal>code</literal></quote> and a
1061− <quote><ulink url="http://example.com/?foo=1&amp;bar=2">quoted link</ulink></quote>.
1305+ This should [not][] be a link.
10621306 </para>
1307+ <screen>
1308+[not]: /url
1309+</screen>
10631310 <para>
1064− Some dashes: one&#8212;two &#8212; three&#8212;four &#8212; five.
1311+ Foo <ulink url="/url/">bar</ulink>.
10651312 </para>
10661313 <para>
1067− Dashes between numbers: 5&#8211;7, 255&#8211;66, 1987&#8211;1999.
1314+ Foo <ulink url="/url/">biz</ulink>.
10681315 </para>
1316+ </section>
1317+ <section id="with-ampersands">
1318+ <title>With ampersands</title>
10691319 <para>
1070− Ellipses&#8230;and&#8230;and&#8230;.
1320+ Here's a
1321+ <ulink url="http://example.com/?foo=1&amp;bar=2">link with an ampersand in the URL</ulink>.
10711322 </para>
1072− </section>
1073− <section id="latex">
1074− <title>LaTeX</title>
1075− <itemizedlist>
1076− <listitem>
1077− <para>
1078− </para>
1079− </listitem>
1080− <listitem>
1081− <para>
1082− 2+2=4
1083− </para>
1084− </listitem>
1085− <listitem>
1086− <para>
1087− <emphasis>x</emphasis> ∈ <emphasis>y</emphasis>
1088− </para>
1089− </listitem>
1090− <listitem>
1091− <para>
1092− α ∧ ω
1093− </para>
1094− </listitem>
1095− <listitem>
1096− <para>
1097− 223
1098− </para>
1099− </listitem>
1100− <listitem>
1101− <para>
1102− <emphasis>p</emphasis>-Tree
1103− </para>
1104− </listitem>
1105− <listitem>
1106− <para>
1107− Here's some display math:
1108− \frac{<emphasis>d</emphasis>}{<emphasis>dx</emphasis>}<emphasis>f</emphasis>(<emphasis>x</emphasis>)=\lim<subscript><emphasis>h</emphasis> → 0</subscript>\frac{<emphasis>f</emphasis>(<emphasis>x</emphasis>+<emphasis>h</emphasis>)-<emphasis>f</emphasis>(<emphasis>x</emphasis>)}{<emphasis>h</emphasis>}
1109− </para>
1110− </listitem>
1111− <listitem>
1112− <para>
1113− Here's one that has a line break in it:
1114− α+ω × <emphasis>x</emphasis><superscript>2</superscript>.
1115− </para>
1116− </listitem>
1117− </itemizedlist>
11181323 <para>
1119− These shouldn't be math:
1324+ Here's a link with an amersand in the link text:
1325+ <ulink url="http://att.com/">AT&amp;T</ulink>.
11201326 </para>
1121− <itemizedlist>
1122− <listitem>
1123− <para>
1124− To get the famous equation, write <literal>$e = mc^2$</literal>.
1125− </para>
1126− </listitem>
1127− <listitem>
1128− <para>
1129− $22,000 is a <emphasis>lot</emphasis> of money. So is $34,000. (It
1130− worked if <quote>lot</quote> is emphasized.)
1131− </para>
1132− </listitem>
1133− <listitem>
1134− <para>
1135− Shoes ($20) and socks ($5).
1136− </para>
1137− </listitem>
1138− <listitem>
1139− <para>
1140− Escaped <literal>$</literal>: $73
1141− <emphasis>this should be emphasized</emphasis> 23$.
1142− </para>
1143− </listitem>
1144− </itemizedlist>
11451327 <para>
1146− Here's a LaTeX table:
1328+ Here's an <ulink url="/script?foo=1&amp;bar=2">inline link</ulink>.
11471329 </para>
11481330 <para>
1331+ Here's an
1332+ <ulink url="/script?foo=1&amp;bar=2">inline link in pointy braces</ulink>.
11491333 </para>
11501334 </section>
1151− <section id="special-characters">
1152− <title>Special Characters</title>
1335+ <section id="autolinks">
1336+ <title>Autolinks</title>
11531337 <para>
1154− Here is some unicode:
1338+ With an ampersand:
1339+ <ulink url="http://example.com/?foo=1&amp;bar=2"><literal>http://example.com/?foo=1&amp;bar=2</literal></ulink>
11551340 </para>
11561341 <itemizedlist>
11571342 <listitem>
11581343 <para>
1159− I hat: Î
1160− </para>
1161− </listitem>
1162− <listitem>
1163− <para>
1164− o umlaut: ö
1344+ In a list?
11651345 </para>
11661346 </listitem>
11671347 <listitem>
11681348 <para>
1169− section: §
1170− </para>
1171− </listitem>
1172− <listitem>
1173− <para>
1174− set membership: ∈
1349+ <ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
11751350 </para>
11761351 </listitem>
11771352 <listitem>
11781353 <para>
1179− copyright: ©
1354+ It should.
11801355 </para>
11811356 </listitem>
11821357 </itemizedlist>
11831358 <para>
1184− AT&amp;T has an ampersand in their name.
1185− </para>
1186− <para>
1187− AT&amp;T is another way to write it.
1188− </para>
1189− <para>
1190− This &amp; that.
1191− </para>
1192− <para>
1193− 4 &lt; 5.
1194− </para>
1195− <para>
1196− 6 &gt; 5.
1197− </para>
1198− <para>
1199− Backslash: \
1200− </para>
1201− <para>
1202− Backtick: `
1203− </para>
1204− <para>
1205− Asterisk: *
1206− </para>
1207− <para>
1208− Underscore: _
1209− </para>
1210− <para>
1211− Left brace: {
1212− </para>
1213− <para>
1214− Right brace: }
1215− </para>
1216− <para>
1217− Left bracket: [
1218− </para>
1219− <para>
1220− Right bracket: ]
1221− </para>
1222− <para>
1223− Left paren: (
1224− </para>
1225− <para>
1226− Right paren: )
1227− </para>
1228− <para>
1229− Greater-than: &gt;
1230− </para>
1231− <para>
1232− Hash: #
1233− </para>
1234− <para>
1235− Period: .
1236− </para>
1237− <para>
1238− Bang: !
1239− </para>
1240− <para>
1241− Plus: +
1242− </para>
1243− <para>
1244− Minus: -
1359+ An e-mail address: <email>nobody@nowhere.net</email>
12451360 </para>
1246− </section>
1247− <section id="links">
1248− <title>Links</title>
1249− <section id="explicit">
1250− <title>Explicit</title>
1251− <para>
1252− Just a <ulink url="/url/">URL</ulink>.
1253− </para>
1254− <para>
1255− <ulink url="/url/">URL and title</ulink>.
1256− </para>
1257− <para>
1258− <ulink url="/url/">URL and title</ulink>.
1259− </para>
1260− <para>
1261− <ulink url="/url/">URL and title</ulink>.
1262− </para>
1263− <para>
1264− <ulink url="/url/">URL and title</ulink>
1265− </para>
1266− <para>
1267− <ulink url="/url/">URL and title</ulink>
1268− </para>
1269− <para>
1270− <ulink url="/url/with_underscore">with_underscore</ulink>
1271− </para>
1272− <para>
1273− Email link (<email>nobody@nowhere.net</email>)
1274− </para>
1275− <para>
1276− <ulink url="">Empty</ulink>.
1277− </para>
1278− </section>
1279− <section id="reference">
1280− <title>Reference</title>
1281− <para>
1282− Foo <ulink url="/url/">bar</ulink>.
1283− </para>
1284− <para>
1285− Foo <ulink url="/url/">bar</ulink>.
1286− </para>
1287− <para>
1288− Foo <ulink url="/url/">bar</ulink>.
1289− </para>
1290− <para>
1291− With <ulink url="/url/">embedded [brackets]</ulink>.
1292− </para>
1293− <para>
1294− <ulink url="/url/">b</ulink> by itself should be a link.
1295− </para>
1296− <para>
1297− Indented <ulink url="/url">once</ulink>.
1298− </para>
1299− <para>
1300− Indented <ulink url="/url">twice</ulink>.
1301− </para>
1302− <para>
1303− Indented <ulink url="/url">thrice</ulink>.
1304− </para>
1305− <para>
1306− This should [not][] be a link.
1307− </para>
1308− <screen>
1309−[not]: /url
1310−</screen>
1311− <para>
1312− Foo <ulink url="/url/">bar</ulink>.
1313− </para>
1314− <para>
1315− Foo <ulink url="/url/">biz</ulink>.
1316− </para>
1317− </section>
1318− <section id="with-ampersands">
1319− <title>With ampersands</title>
1320− <para>
1321− Here's a
1322− <ulink url="http://example.com/?foo=1&amp;bar=2">link with an ampersand in the URL</ulink>.
1323− </para>
1324− <para>
1325− Here's a link with an amersand in the link text:
1326− <ulink url="http://att.com/">AT&amp;T</ulink>.
1327− </para>
1328− <para>
1329− Here's an <ulink url="/script?foo=1&amp;bar=2">inline link</ulink>.
1330− </para>
1331− <para>
1332− Here's an
1333− <ulink url="/script?foo=1&amp;bar=2">inline link in pointy braces</ulink>.
1334− </para>
1335− </section>
1336− <section id="autolinks">
1337− <title>Autolinks</title>
1338− <para>
1339− With an ampersand:
1340− <ulink url="http://example.com/?foo=1&amp;bar=2"><literal>http://example.com/?foo=1&amp;bar=2</literal></ulink>
1341− </para>
1342− <itemizedlist>
1343− <listitem>
1344− <para>
1345− In a list?
1346− </para>
1347− </listitem>
1348− <listitem>
1349− <para>
1350− <ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
1351− </para>
1352− </listitem>
1353− <listitem>
1354− <para>
1355− It should.
1356− </para>
1357− </listitem>
1358− </itemizedlist>
1359− <para>
1360− An e-mail address: <email>nobody@nowhere.net</email>
1361− </para>
1362− <blockquote>
1363− <para>
1364− Blockquoted:
1365− <ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
1366− </para>
1367− </blockquote>
1361+ <blockquote>
13681362 <para>
1369− Auto-links should not occur here:
1370− <literal>&lt;http://example.com/&gt;</literal>
1363+ Blockquoted:
1364+ <ulink url="http://example.com/"><literal>http://example.com/</literal></ulink>
13711365 </para>
1372− <screen>
1373−or here: &lt;http://example.com/&gt;
1374−</screen>
1375− </section>
1376− </section>
1377− <section id="images">
1378− <title>Images</title>
1379− <para>
1380− From <quote>Voyage dans la Lune</quote> by Georges Melies (1902):
1381− </para>
1382− <para>
1383− <inlinemediaobject>
1384− <imageobject>
1385− <objectinfo>
1386− <title>
1387− Voyage dans la Lune
1388− </title>
1389− </objectinfo>
1390− <imagedata fileref="lalune.jpg" />
1391− </imageobject>
1392− </inlinemediaobject>
1393− </para>
1366+ </blockquote>
13941367 <para>
1395− Here is a movie
1396− <inlinemediaobject>
1397− <imageobject>
1398− <imagedata fileref="movie.jpg" />
1399− </imageobject>
1400− </inlinemediaobject>
1401− icon.
1368+ Auto-links should not occur here:
1369+ <literal>&lt;http://example.com/&gt;</literal>
14021370 </para>
1371+ <screen>
1372+or here: &lt;http://example.com/&gt;
1373+</screen>
14031374 </section>
1404− <section id="footnotes">
1405− <title>Footnotes</title>
1406− <para>
1407− Here is a footnote
1408− reference,<footnote>
1409− <para>
1410− Here is the footnote. It can go anywhere after the footnote
1411− reference. It need not be placed at the end of the document.
1412− </para>
1413− </footnote>
1414− and
1415− another.<footnote>
1416− <para>
1417− Here's the long note. This one contains multiple blocks.
1418− </para>
1375+</section>
1376+<section id="images">
1377+ <title>Images</title>
1378+ <para>
1379+ From <quote>Voyage dans la Lune</quote> by Georges Melies (1902):
1380+ </para>
1381+ <para>
1382+ <inlinemediaobject>
1383+ <imageobject>
1384+ <objectinfo>
1385+ <title>
1386+ Voyage dans la Lune
1387+ </title>
1388+ </objectinfo>
1389+ <imagedata fileref="lalune.jpg" />
1390+ </imageobject>
1391+ </inlinemediaobject>
1392+ </para>
1393+ <para>
1394+ Here is a movie
1395+ <inlinemediaobject>
1396+ <imageobject>
1397+ <imagedata fileref="movie.jpg" />
1398+ </imageobject>
1399+ </inlinemediaobject>
1400+ icon.
1401+ </para>
1402+</section>
1403+<section id="footnotes">
1404+ <title>Footnotes</title>
1405+ <para>
1406+ Here is a footnote
1407+ reference,<footnote>
14191408 <para>
1420− Subsequent blocks are indented to show that they belong to the
1421− footnote (as with list items).
1409+ Here is the footnote. It can go anywhere after the footnote
1410+ reference. It need not be placed at the end of the document.
14221411 </para>
1423− <screen>
1412+ </footnote>
1413+ and
1414+ another.<footnote>
1415+ <para>
1416+ Here's the long note. This one contains multiple blocks.
1417+ </para>
1418+ <para>
1419+ Subsequent blocks are indented to show that they belong to the
1420+ footnote (as with list items).
1421+ </para>
1422+ <screen>
14241423 { &lt;code&gt; }
14251424</screen>
1425+ <para>
1426+ If you want, you can indent every line, but you can also be lazy
1427+ and just indent the first line of each block.
1428+ </para>
1429+ </footnote>
1430+ This should <emphasis>not</emphasis> be a footnote reference,
1431+ because it contains a space.[^my note] Here is an inline
1432+ note.<footnote>
1433+ <para>
1434+ This is <emphasis>easier</emphasis> to type. Inline notes may
1435+ contain <ulink url="http://google.com">links</ulink> and
1436+ <literal>]</literal> verbatim characters, as well as [bracketed
1437+ text].
1438+ </para>
1439+ </footnote>
1440+ </para>
1441+ <blockquote>
1442+ <para>
1443+ Notes can go in
1444+ quotes.<footnote>
1445+ <para>
1446+ In quote.
1447+ </para>
1448+ </footnote>
1449+ </para>
1450+ </blockquote>
1451+ <orderedlist numeration="arabic">
1452+ <listitem>
1453+ <para>
1454+ And in list
1455+ items.<footnote>
14261456 <para>
1427− If you want, you can indent every line, but you can also be lazy
1428− and just indent the first line of each block.
1457+ In list.
14291458 </para>
14301459 </footnote>
1431− This should <emphasis>not</emphasis> be a footnote reference,
1432− because it contains a space.[^my note] Here is an inline
1433− note.<footnote>
1434− <para>
1435− This is <emphasis>easier</emphasis> to type. Inline notes may
1436− contain <ulink url="http://google.com">links</ulink> and
1437− <literal>]</literal> verbatim characters, as well as [bracketed
1438− text].
1439− </para>
1440− </footnote>
1441− </para>
1442− <blockquote>
1443− <para>
1444− Notes can go in
1445− quotes.<footnote>
1446− <para>
1447− In quote.
1448− </para>
1449− </footnote>
14501460 </para>
1451− </blockquote>
1452− <orderedlist numeration="arabic">
1453− <listitem>
1454− <para>
1455− And in list
1456− items.<footnote>
1457− <para>
1458− In list.
1459− </para>
1460− </footnote>
1461− </para>
1462− </listitem>
1463− </orderedlist>
1464− <para>
1465− This paragraph should not be part of the note, as it is not
1466− indented.
1467− </para>
1468− </section>
1461+ </listitem>
1462+ </orderedlist>
1463+ <para>
1464+ This paragraph should not be part of the note, as it is not
1465+ indented.
1466+ </para>
1467+</section>
14691468</article>
14701469
1470+