git.iko.soy/typeable/pandoc
on master help sign in
Introduce new format variants for JATS (#6067)

New formats: - `jats_archiving` for the "Archiving and Interchange Tag Set", - `jats_publishing` for the "Journal Publishing Tag Set", and - `jats_articleauthoring` for the "Article Authoring Tag Set." The "jats" output format is now an alias for "jats_archiving". Closes: #6014

commitf5ea5f0aad1d5000b326ce4c45c92fdfb1a4b5d3 authorAlbert Krewinkel <albert@zeitkraut.de> dateThu 13 Feb 2020, 05:36 (7 years ago) parente9cb08e
17 files changed+2474−55
MANUAL.txt+4−1 data/templates/default.jats → data/templates/article.jats_publishing+2−7 data/templates/default.jats_archiving+7 data/templates/default.jats_articleauthoring+90 data/templates/default.jats_publishing+7 pandoc.cabal+10−3 src/Text/Pandoc/Templates.hs+1 src/Text/Pandoc/Writers.hs+7−1 src/Text/Pandoc/Writers/JATS.hs+99−41 test/Tests/Old.hs+8−1 test/Tests/Writers/JATS.hs+15−1 test/tables.jats → test/tables.jats_archiving test/tables.jats_articleauthoring+226 test/tables.jats_publishing+226 test/writer.jats → test/writer.jats_archiving test/writer.jats_articleauthoring+874 test/writer.jats_publishing+898
MANUAL.txt+4−1
@@ -294,7 +294,10 @@ header when requesting a document from a URL:
294294 - `html4` ([XHTML] 1.0 Transitional)
295295 - `icml` ([InDesign ICML])
296296 - `ipynb` ([Jupyter notebook])
297− - `jats` ([JATS] XML)
297+ - `jats_archiving` ([JATS] XML, Archiving and Interchange Tag Set)
298+ - `jats_articleauthoring` ([JATS] XML, Article Authoring Tag Set)
299+ - `jats_publishing` ([JATS] XML, Journal Publishing Tag Set)
300+ - `jats` (alias for `jats_archiving`)
298301 - `jira` ([Jira] wiki markup)
299302 - `json` (JSON version of native AST)
300303 - `latex` ([LaTeX])
data/templates/default.jats → data/templates/article.jats_publishingrenamed+2−7
@@ -1,9 +1,3 @@
1−<?xml version="1.0" encoding="utf-8" ?>
2−$if(xml-stylesheet)$
3−<?xml-stylesheet type="text/xsl" href="$xml-stylesheet$"?>
4−$endif$
5−<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.2 20190208//EN"
6− "JATS-archivearticle1.dtd">
71$if(article.type)$
82<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="$article.type$">
93$else$
@@ -164,8 +158,8 @@ $if(copyright.text)$
164158<license license-type="$copyright.type$" xlink:href="$copyright.link$">
165159<license-p>$copyright.text$</license-p>
166160</license>
167−</permissions>
168161$endif$
162+</permissions>
169163$endif$
170164$if(abstract)$
171165<abstract>
@@ -198,3 +192,4 @@ $back$
198192$endif$
199193</back>
200194</article>
195+
data/templates/default.jats_archivingnew file+7
@@ -0,0 +1,7 @@
1+<?xml version="1.0" encoding="utf-8" ?>
2+$if(xml-stylesheet)$
3+<?xml-stylesheet type="text/xsl" href="$xml-stylesheet$"?>
4+$endif$
5+<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.2 20190208//EN"
6+ "JATS-archivearticle1.dtd">
7+${ article.jats_publishing() }
data/templates/default.jats_articleauthoringnew file+90
@@ -0,0 +1,90 @@
1+<?xml version="1.0" encoding="utf-8" ?>
2+$if(xml-stylesheet)$
3+<?xml-stylesheet type="text/xsl" href="$xml-stylesheet$"?>
4+$endif$
5+<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Article Authoring DTD v1.2 20190208//EN"
6+ "JATS-articleauthoring1.dtd">
7+$if(article.type)$
8+<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="$article.type$">
9+$else$
10+<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other">
11+$endif$
12+<front>
13+<article-meta>
14+$if(title)$
15+<title-group>
16+<article-title>$title$</article-title>
17+</title-group>
18+$endif$
19+$if(author)$
20+<contrib-group>
21+$for(author)$
22+<contrib contrib-type="author">
23+$if(author.orcid)$
24+<contrib-id contrib-id-type="orcid">$author.orcid$</contrib-id>
25+$endif$
26+$if(author.surname)$
27+<name>
28+<surname>$author.surname$</surname>
29+<given-names>$author.given-names$</given-names>
30+</name>
31+$else$
32+<string-name>$author$</string-name>
33+$endif$
34+$if(author.email)$
35+<email>$author.email$</email>
36+$endif$
37+$if(author.aff-id)$
38+<xref ref-type="aff" rid="aff-$contrib.aff-id$"/>
39+$endif$
40+$if(author.cor-id)$
41+<xref ref-type="corresp" rid="cor-$author.cor-id$"><sup>*</sup></xref>
42+$endif$
43+</contrib>
44+$endfor$
45+</contrib-group>
46+$endif$
47+$if(copyright)$
48+<permissions>
49+$if(copyright.statement)$
50+<copyright-statement>$copyright.statement$</copyright-statement>
51+$endif$
52+$if(copyright.year)$
53+<copyright-year>$copyright.year$</copyright-year>
54+$endif$
55+$if(copyright.holder)$
56+<copyright-holder>$copyright.holder$</copyright-holder>
57+$endif$
58+$if(copyright.text)$
59+<license license-type="$copyright.type$" xlink:href="$copyright.link$">
60+<license-p>$copyright.text$</license-p>
61+</license>
62+$endif$
63+</permissions>
64+$endif$
65+<abstract>
66+$abstract$
67+</abstract>
68+$if(tags)$
69+<kwd-group kwd-group-type="author">
70+$for(tags)$
71+<kwd>$tags$</kwd>
72+$endfor$
73+</kwd-group>
74+$endif$
75+$if(article.funding-statement)$
76+<funding-group>
77+<funding-statement>$article.funding-statement$</funding-statement>
78+</funding-group>
79+$endif$
80+</article-meta>
81+</front>
82+<body>
83+$body$
84+</body>
85+<back>
86+$if(back)$
87+$back$
88+$endif$
89+</back>
90+</article>
data/templates/default.jats_publishingnew file+7
@@ -0,0 +1,7 @@
1+<?xml version="1.0" encoding="utf-8" ?>
2+$if(xml-stylesheet)$
3+<?xml-stylesheet type="text/xsl" href="$xml-stylesheet$"?>
4+$endif$
5+<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN"
6+ "JATS-publishing1.dtd">
7+${ article.jats_publishing() }
pandoc.cabal+10−3
@@ -46,7 +46,9 @@ data-files:
4646 data/templates/default.html5
4747 data/templates/default.docbook4
4848 data/templates/default.docbook5
49− data/templates/default.jats
49+ data/templates/default.jats_archiving
50+ data/templates/default.jats_articleauthoring
51+ data/templates/default.jats_publishing
5052 data/templates/default.tei
5153 data/templates/default.opendocument
5254 data/templates/default.icml
@@ -79,6 +81,7 @@ data-files:
7981 data/templates/default.org
8082 data/templates/default.epub2
8183 data/templates/default.epub3
84+ data/templates/article.jats_publishing
8285 -- translations
8386 data/translations/*.yaml
8487 -- source files for reference.docx
@@ -254,7 +257,9 @@ extra-source-files:
254257 test/tables.context
255258 test/tables.docbook4
256259 test/tables.docbook5
257− test/tables.jats
260+ test/tables.jats_archiving
261+ test/tables.jats_articleauthoring
262+ test/tables.jats_publishing
258263 test/tables.jira
259264 test/tables.dokuwiki
260265 test/tables.zimwiki
@@ -286,7 +291,9 @@ extra-source-files:
286291 test/writer.context
287292 test/writer.docbook4
288293 test/writer.docbook5
289− test/writer.jats
294+ test/writer.jats_archiving
295+ test/writer.jats_articleauthoring
296+ test/writer.jats_publishing
290297 test/writer.jira
291298 test/writer.html4
292299 test/writer.html5
src/Text/Pandoc/Templates.hs+1
@@ -90,6 +90,7 @@ getDefaultTemplate writer = do
9090 "docbook" -> getDefaultTemplate "docbook5"
9191 "epub" -> getDefaultTemplate "epub3"
9292 "beamer" -> getDefaultTemplate "latex"
93+ "jats" -> getDefaultTemplate "jats_archiving"
9394 "markdown_strict" -> getDefaultTemplate "markdown"
9495 "multimarkdown" -> getDefaultTemplate "markdown"
9596 "markdown_github" -> getDefaultTemplate "markdown"
src/Text/Pandoc/Writers.hs+7−1
@@ -41,6 +41,9 @@ module Text.Pandoc.Writers
4141 , writeHtml5String
4242 , writeICML
4343 , writeJATS
44+ , writeJatsArchiving
45+ , writeJatsArticleAuthoring
46+ , writeJatsPublishing
4447 , writeJSON
4548 , writeJira
4649 , writeLaTeX
@@ -146,7 +149,10 @@ writers = [
146149 ,("docbook" , TextWriter writeDocbook5)
147150 ,("docbook4" , TextWriter writeDocbook4)
148151 ,("docbook5" , TextWriter writeDocbook5)
149− ,("jats" , TextWriter writeJATS)
152+ ,("jats" , TextWriter writeJatsArchiving)
153+ ,("jats_articleauthoring", TextWriter writeJatsArticleAuthoring)
154+ ,("jats_publishing" , TextWriter writeJatsPublishing)
155+ ,("jats_archiving" , TextWriter writeJatsArchiving)
150156 ,("jira" , TextWriter writeJira)
151157 ,("opml" , TextWriter writeOPML)
152158 ,("opendocument" , TextWriter writeOpenDocument)
src/Text/Pandoc/Writers/JATS.hs+99−41
@@ -4,7 +4,7 @@
44{-# LANGUAGE ViewPatterns #-}
55{- |
66 Module : Text.Pandoc.Writers.JATS
7− Copyright : Copyright (C) 2017-2019 John MacFarlane
7+ Copyright : Copyright (C) 2017-2020 John MacFarlane
88 License : GNU GPL, version 2 or above
99
1010 Maintainer : John MacFarlane <jgm@berkeley.edu>
@@ -15,7 +15,12 @@ Conversion of 'Pandoc' documents to JATS XML.
1515Reference:
1616https://jats.nlm.nih.gov/publishing/tag-library
1717-}
18−module Text.Pandoc.Writers.JATS ( writeJATS ) where
18+module Text.Pandoc.Writers.JATS
19+ ( writeJATS
20+ , writeJatsArchiving
21+ , writeJatsPublishing
22+ , writeJatsArticleAuthoring
23+ ) where
1924import Prelude
2025import Control.Monad.Reader
2126import Control.Monad.State
@@ -43,19 +48,46 @@ import Text.Pandoc.XML
4348import Text.TeXMath
4449import qualified Text.XML.Light as Xml
4550
46−data JATSVersion = JATS1_1
47− deriving (Eq, Show)
51+-- | JATS tag set variant
52+data JATSTagSet
53+ = TagSetArchiving -- ^ Archiving and Interchange Tag Set
54+ | TagSetPublishing -- ^ Journal Publishing Tag Set
55+ | TagSetArticleAuthoring -- ^ Article Authoring Tag Set
56+ deriving (Eq)
4857
49−data JATSState = JATSState
58+-- | Internal state used by the writer.
59+newtype JATSState = JATSState
5060 { jatsNotes :: [(Int, Doc Text)] }
5161
52−type JATS a = StateT JATSState (ReaderT JATSVersion a)
62+-- | JATS writer type
63+type JATS a = StateT JATSState (ReaderT JATSTagSet a)
5364
65+-- | Convert a @'Pandoc'@ document to JATS (Archiving and Interchange
66+-- Tag Set.)
67+writeJatsArchiving :: PandocMonad m => WriterOptions -> Pandoc -> m Text
68+writeJatsArchiving = writeJats TagSetArchiving
69+
70+-- | Convert a @'Pandoc'@ document to JATS (Journal Publishing Tag Set.)
71+writeJatsPublishing :: PandocMonad m => WriterOptions -> Pandoc -> m Text
72+writeJatsPublishing = writeJats TagSetPublishing
73+
74+-- | Convert a @'Pandoc'@ document to JATS (Archiving and Interchange
75+-- Tag Set.)
76+writeJatsArticleAuthoring :: PandocMonad m => WriterOptions -> Pandoc -> m Text
77+writeJatsArticleAuthoring = writeJats TagSetArticleAuthoring
78+
79+-- | Alias for @'writeJatsArchiving'@. This function exists for backwards
80+-- compatibility, but will be deprecated in the future. Use
81+-- @'writeJatsArchiving'@ instead.
5482writeJATS :: PandocMonad m => WriterOptions -> Pandoc -> m Text
55−writeJATS opts d =
83+writeJATS = writeJatsArchiving
84+
85+-- | Convert a @'Pandoc'@ document to JATS.
86+writeJats :: PandocMonad m => JATSTagSet -> WriterOptions -> Pandoc -> m Text
87+writeJats tagSet opts d =
5688 runReaderT (evalStateT (docToJATS opts d)
57− (JATSState{ jatsNotes = [] }))
58− JATS1_1
89+ (JATSState{ jatsNotes = [] }))
90+ tagSet
5991
6092-- | Convert Pandoc document to string in JATS format.
6193docToJATS :: PandocMonad m => WriterOptions -> Pandoc -> JATS m Text
@@ -80,7 +112,10 @@ docToJATS opts (Pandoc meta blocks) = do
80112 main <- fromBlocks bodyblocks
81113 notes <- reverse . map snd <$> gets jatsNotes
82114 backs <- fromBlocks backblocks
83− let fns = if null notes
115+ tagSet <- ask
116+ -- In the "Article Authoring" tag set, occurrence of fn-group elements
117+ -- is restricted to table footers. Footnotes have to be placed inline.
118+ let fns = if null notes || tagSet == TagSetArticleAuthoring
84119 then mempty
85120 else inTagsIndented "fn-group" $ vcat notes
86121 let back = backs $$ fns
@@ -116,6 +151,8 @@ docToJATS opts (Pandoc meta blocks) = do
116151blocksToJATS :: PandocMonad m => WriterOptions -> [Block] -> JATS m (Doc Text)
117152blocksToJATS = wrappedBlocksToJATS (const False)
118153
154+-- | Like @'blocksToJATS'@, but wraps top-level blocks into a @<p>@
155+-- element if the @needsWrap@ predicate evaluates to @True@.
119156wrappedBlocksToJATS :: PandocMonad m
120157 => (Block -> Bool)
121158 -> WriterOptions
@@ -275,8 +312,12 @@ blockToJATS opts (Para lst) =
275312 inTagsSimple "p" <$> inlinesToJATS opts lst
276313blockToJATS opts (LineBlock lns) =
277314 blockToJATS opts $ linesToPara lns
278−blockToJATS opts (BlockQuote blocks) =
279− inTagsIndented "disp-quote" <$> blocksToJATS opts blocks
315+blockToJATS opts (BlockQuote blocks) = do
316+ tagSet <- ask
317+ let blocksToJats' = if tagSet == TagSetArticleAuthoring
318+ then wrappedBlocksToJATS (not . isPara)
319+ else blocksToJATS
320+ inTagsIndented "disp-quote" <$> blocksToJats' opts blocks
280321blockToJATS _ (CodeBlock a str) = return $
281322 inTags False tag attr (flush (text (T.unpack $ escapeStringForXML str)))
282323 where (lang, attr) = codeAttr a
@@ -287,14 +328,20 @@ blockToJATS opts (BulletList lst) =
287328 listItemsToJATS opts Nothing lst
288329blockToJATS _ (OrderedList _ []) = return empty
289330blockToJATS opts (OrderedList (start, numstyle, delimstyle) items) = do
290− let listType = case numstyle of
291− DefaultStyle -> "order"
292− Decimal -> "order"
293− Example -> "order"
294− UpperAlpha -> "alpha-upper"
295− LowerAlpha -> "alpha-lower"
296− UpperRoman -> "roman-upper"
297− LowerRoman -> "roman-lower"
331+ tagSet <- ask
332+ let listType =
333+ -- The Article Authoring tag set doesn't allow a more specific
334+ -- @list-type@ attribute than "order".
335+ if tagSet == TagSetArticleAuthoring
336+ then "order"
337+ else case numstyle of
338+ DefaultStyle -> "order"
339+ Decimal -> "order"
340+ Example -> "order"
341+ UpperAlpha -> "alpha-upper"
342+ LowerAlpha -> "alpha-lower"
343+ UpperRoman -> "roman-upper"
344+ LowerRoman -> "roman-lower"
298345 let simpleList = start == 1 && (delimstyle == DefaultDelim ||
299346 delimstyle == Period)
300347 let markers = if simpleList
@@ -407,17 +454,22 @@ inlineToJATS opts SoftBreak
407454 | writerWrapText opts == WrapPreserve = return cr
408455 | otherwise = return space
409456inlineToJATS opts (Note contents) = do
410− notes <- gets jatsNotes
411− let notenum = case notes of
412− (n, _):_ -> n + 1
413− [] -> 1
414− thenote <- inTags True "fn" [("id","fn" <> tshow notenum)]
415− <$> wrappedBlocksToJATS (not . isPara) opts
416− (walk demoteHeaderAndRefs contents)
417− modify $ \st -> st{ jatsNotes = (notenum, thenote) : notes }
418− return $ inTags False "xref" [("ref-type", "fn"),
419− ("rid", "fn" <> tshow notenum)]
420− $ text (show notenum)
457+ tagSet <- ask
458+ -- Footnotes must occur inline when using the Article Authoring tag set.
459+ if tagSet == TagSetArticleAuthoring
460+ then inTagsIndented "fn" <$> wrappedBlocksToJATS (not . isPara) opts contents
461+ else do
462+ notes <- gets jatsNotes
463+ let notenum = case notes of
464+ (n, _):_ -> n + 1
465+ [] -> 1
466+ thenote <- inTags True "fn" [("id","fn" <> tshow notenum)]
467+ <$> wrappedBlocksToJATS (not . isPara) opts
468+ (walk demoteHeaderAndRefs contents)
469+ modify $ \st -> st{ jatsNotes = (notenum, thenote) : notes }
470+ return $ inTags False "xref" [("ref-type", "fn"),
471+ ("rid", "fn" <> tshow notenum)]
472+ $ text (show notenum)
421473inlineToJATS opts (Cite _ lst) =
422474 -- TODO revisit this after examining the jats.csl pipeline
423475 inlinesToJATS opts lst
@@ -444,16 +496,22 @@ inlineToJATS _ (Math t str) = do
444496 let tagtype = case t of
445497 DisplayMath -> "disp-formula"
446498 InlineMath -> "inline-formula"
447− let rawtex = inTagsSimple "tex-math"
448− $ text "<![CDATA[" <>
449− literal str <>
450− text "]]>"
451− return $ inTagsSimple tagtype $
452− case res of
453− Right r -> inTagsSimple "alternatives" $
454− cr <> rawtex $$
455− text (Xml.ppcElement conf $ fixNS r)
456− Left _ -> rawtex
499+
500+ let rawtex = text "<![CDATA[" <> literal str <> text "]]>"
501+ let texMath = inTagsSimple "tex-math" rawtex
502+
503+ tagSet <- ask
504+ return . inTagsSimple tagtype $
505+ case res of
506+ Right r -> let mathMl = text (Xml.ppcElement conf $ fixNS r)
507+ -- tex-math is unsupported in Article Authoring tag set
508+ in if tagSet == TagSetArticleAuthoring
509+ then mathMl
510+ else inTagsSimple "alternatives" $
511+ cr <> texMath $$ mathMl
512+ Left _ -> if tagSet /= TagSetArticleAuthoring
513+ then texMath
514+ else rawtex
457515inlineToJATS _ (Link _attr [Str t] (T.stripPrefix "mailto:" -> Just email, _))
458516 | escapeURI t == email =
459517 return $ inTagsSimple "email" $ literal (escapeStringForXML email)
test/Tests/Old.hs+8−1
@@ -94,7 +94,14 @@ tests pandocPath =
9494 [ testGroup "writer" $ writerTests' "docbook5"
9595 ]
9696 , testGroup "jats"
97− [ testGroup "writer" $ writerTests' "jats"
97+ [ testGroup "writer"
98+ [ testGroup "jats_archiving" $
99+ writerTests' "jats_archiving"
100+ , testGroup "jats_articleauthoring" $
101+ writerTests' "jats_articleauthoring"
102+ , testGroup "jats_publishing" $
103+ writerTests' "jats_publishing"
104+ ]
98105 , test' "reader" ["-r", "jats", "-w", "native", "-s"]
99106 "jats-reader.xml" "jats-reader.native"
100107 ]
test/Tests/Writers/JATS.hs+15−1
@@ -11,7 +11,14 @@ import Text.Pandoc.Arbitrary ()
1111import Text.Pandoc.Builder
1212
1313jats :: (ToPandoc a) => a -> String
14−jats = unpack . purely (writeJATS def{ writerWrapText = WrapNone }) . toPandoc
14+jats = unpack
15+ . purely (writeJATS def{ writerWrapText = WrapNone })
16+ . toPandoc
17+
18+jatsArticleAuthoring :: (ToPandoc a) => a -> String
19+jatsArticleAuthoring = unpack
20+ . purely (writeJatsArticleAuthoring def{ writerWrapText = WrapNone })
21+ . toPandoc
1522
1623{-
1724 "my test" =: X =?> Y
@@ -47,6 +54,13 @@ tests = [ testGroup "inline code"
4754 , testGroup "inlines"
4855 [ "Emphasis" =: emph "emphasized"
4956 =?> "<p><italic>emphasized</italic></p>"
57+
58+ , test jatsArticleAuthoring "footnote in articleauthoring tag set"
59+ ("test" <> note (para "footnote") =?>
60+ unlines [ "<p>test<fn>"
61+ , " <p>footnote</p>"
62+ , "</fn></p>"
63+ ])
5064 ]
5165 , "bullet list" =: bulletList [ plain $ text "first"
5266 , plain $ text "second"
test/tables.jats → test/tables.jats_archivingrenamed

The content is the same.

test/tables.jats_articleauthoringnew file+226
@@ -0,0 +1,226 @@
1+<p>Simple table with caption:</p>
2+<table-wrap>
3+ <caption>
4+ <p>Demonstration of simple table syntax.</p>
5+ </caption>
6+ <table>
7+ <col align="right" />
8+ <col align="left" />
9+ <col align="center" />
10+ <col align="left" />
11+ <thead>
12+ <tr>
13+ <th>Right</th>
14+ <th>Left</th>
15+ <th>Center</th>
16+ <th>Default</th>
17+ </tr>
18+ </thead>
19+ <tbody>
20+ <tr>
21+ <td>12</td>
22+ <td>12</td>
23+ <td>12</td>
24+ <td>12</td>
25+ </tr>
26+ <tr>
27+ <td>123</td>
28+ <td>123</td>
29+ <td>123</td>
30+ <td>123</td>
31+ </tr>
32+ <tr>
33+ <td>1</td>
34+ <td>1</td>
35+ <td>1</td>
36+ <td>1</td>
37+ </tr>
38+ </tbody>
39+ </table>
40+</table-wrap>
41+<p>Simple table without caption:</p>
42+<table>
43+ <col align="right" />
44+ <col align="left" />
45+ <col align="center" />
46+ <col align="left" />
47+ <thead>
48+ <tr>
49+ <th>Right</th>
50+ <th>Left</th>
51+ <th>Center</th>
52+ <th>Default</th>
53+ </tr>
54+ </thead>
55+ <tbody>
56+ <tr>
57+ <td>12</td>
58+ <td>12</td>
59+ <td>12</td>
60+ <td>12</td>
61+ </tr>
62+ <tr>
63+ <td>123</td>
64+ <td>123</td>
65+ <td>123</td>
66+ <td>123</td>
67+ </tr>
68+ <tr>
69+ <td>1</td>
70+ <td>1</td>
71+ <td>1</td>
72+ <td>1</td>
73+ </tr>
74+ </tbody>
75+</table>
76+<p>Simple table indented two spaces:</p>
77+<table-wrap>
78+ <caption>
79+ <p>Demonstration of simple table syntax.</p>
80+ </caption>
81+ <table>
82+ <col align="right" />
83+ <col align="left" />
84+ <col align="center" />
85+ <col align="left" />
86+ <thead>
87+ <tr>
88+ <th>Right</th>
89+ <th>Left</th>
90+ <th>Center</th>
91+ <th>Default</th>
92+ </tr>
93+ </thead>
94+ <tbody>
95+ <tr>
96+ <td>12</td>
97+ <td>12</td>
98+ <td>12</td>
99+ <td>12</td>
100+ </tr>
101+ <tr>
102+ <td>123</td>
103+ <td>123</td>
104+ <td>123</td>
105+ <td>123</td>
106+ </tr>
107+ <tr>
108+ <td>1</td>
109+ <td>1</td>
110+ <td>1</td>
111+ <td>1</td>
112+ </tr>
113+ </tbody>
114+ </table>
115+</table-wrap>
116+<p>Multiline table with caption:</p>
117+<table-wrap>
118+ <caption>
119+ <p>Here’s the caption. It may span multiple lines.</p>
120+ </caption>
121+ <table>
122+ <col width="15*" align="center" />
123+ <col width="13*" align="left" />
124+ <col width="16*" align="right" />
125+ <col width="35*" align="left" />
126+ <thead>
127+ <tr>
128+ <th>Centered Header</th>
129+ <th>Left Aligned</th>
130+ <th>Right Aligned</th>
131+ <th>Default aligned</th>
132+ </tr>
133+ </thead>
134+ <tbody>
135+ <tr>
136+ <td>First</td>
137+ <td>row</td>
138+ <td>12.0</td>
139+ <td>Example of a row that spans multiple lines.</td>
140+ </tr>
141+ <tr>
142+ <td>Second</td>
143+ <td>row</td>
144+ <td>5.0</td>
145+ <td>Here’s another one. Note the blank line between rows.</td>
146+ </tr>
147+ </tbody>
148+ </table>
149+</table-wrap>
150+<p>Multiline table without caption:</p>
151+<table>
152+ <col width="15*" align="center" />
153+ <col width="13*" align="left" />
154+ <col width="16*" align="right" />
155+ <col width="35*" align="left" />
156+ <thead>
157+ <tr>
158+ <th>Centered Header</th>
159+ <th>Left Aligned</th>
160+ <th>Right Aligned</th>
161+ <th>Default aligned</th>
162+ </tr>
163+ </thead>
164+ <tbody>
165+ <tr>
166+ <td>First</td>
167+ <td>row</td>
168+ <td>12.0</td>
169+ <td>Example of a row that spans multiple lines.</td>
170+ </tr>
171+ <tr>
172+ <td>Second</td>
173+ <td>row</td>
174+ <td>5.0</td>
175+ <td>Here’s another one. Note the blank line between rows.</td>
176+ </tr>
177+ </tbody>
178+</table>
179+<p>Table without column headers:</p>
180+<table>
181+ <col align="right" />
182+ <col align="left" />
183+ <col align="center" />
184+ <col align="right" />
185+ <tbody>
186+ <tr>
187+ <td>12</td>
188+ <td>12</td>
189+ <td>12</td>
190+ <td>12</td>
191+ </tr>
192+ <tr>
193+ <td>123</td>
194+ <td>123</td>
195+ <td>123</td>
196+ <td>123</td>
197+ </tr>
198+ <tr>
199+ <td>1</td>
200+ <td>1</td>
201+ <td>1</td>
202+ <td>1</td>
203+ </tr>
204+ </tbody>
205+</table>
206+<p>Multiline table without column headers:</p>
207+<table>
208+ <col width="15*" align="center" />
209+ <col width="13*" align="left" />
210+ <col width="16*" align="right" />
211+ <col width="35*" align="left" />
212+ <tbody>
213+ <tr>
214+ <td>First</td>
215+ <td>row</td>
216+ <td>12.0</td>
217+ <td>Example of a row that spans multiple lines.</td>
218+ </tr>
219+ <tr>
220+ <td>Second</td>
221+ <td>row</td>
222+ <td>5.0</td>
223+ <td>Here’s another one. Note the blank line between rows.</td>
224+ </tr>
225+ </tbody>
226+</table>
test/tables.jats_publishingnew file+226
@@ -0,0 +1,226 @@
1+<p>Simple table with caption:</p>
2+<table-wrap>
3+ <caption>
4+ <p>Demonstration of simple table syntax.</p>
5+ </caption>
6+ <table>
7+ <col align="right" />
8+ <col align="left" />
9+ <col align="center" />
10+ <col align="left" />
11+ <thead>
12+ <tr>
13+ <th>Right</th>
14+ <th>Left</th>
15+ <th>Center</th>
16+ <th>Default</th>
17+ </tr>
18+ </thead>
19+ <tbody>
20+ <tr>
21+ <td>12</td>
22+ <td>12</td>
23+ <td>12</td>
24+ <td>12</td>
25+ </tr>
26+ <tr>
27+ <td>123</td>
28+ <td>123</td>
29+ <td>123</td>
30+ <td>123</td>
31+ </tr>
32+ <tr>
33+ <td>1</td>
34+ <td>1</td>
35+ <td>1</td>
36+ <td>1</td>
37+ </tr>
38+ </tbody>
39+ </table>
40+</table-wrap>
41+<p>Simple table without caption:</p>
42+<table>
43+ <col align="right" />
44+ <col align="left" />
45+ <col align="center" />
46+ <col align="left" />
47+ <thead>
48+ <tr>
49+ <th>Right</th>
50+ <th>Left</th>
51+ <th>Center</th>
52+ <th>Default</th>
53+ </tr>
54+ </thead>
55+ <tbody>
56+ <tr>
57+ <td>12</td>
58+ <td>12</td>
59+ <td>12</td>
60+ <td>12</td>
61+ </tr>
62+ <tr>
63+ <td>123</td>
64+ <td>123</td>
65+ <td>123</td>
66+ <td>123</td>
67+ </tr>
68+ <tr>
69+ <td>1</td>
70+ <td>1</td>
71+ <td>1</td>
72+ <td>1</td>
73+ </tr>
74+ </tbody>
75+</table>
76+<p>Simple table indented two spaces:</p>
77+<table-wrap>
78+ <caption>
79+ <p>Demonstration of simple table syntax.</p>
80+ </caption>
81+ <table>
82+ <col align="right" />
83+ <col align="left" />
84+ <col align="center" />
85+ <col align="left" />
86+ <thead>
87+ <tr>
88+ <th>Right</th>
89+ <th>Left</th>
90+ <th>Center</th>
91+ <th>Default</th>
92+ </tr>
93+ </thead>
94+ <tbody>
95+ <tr>
96+ <td>12</td>
97+ <td>12</td>
98+ <td>12</td>
99+ <td>12</td>
100+ </tr>
101+ <tr>
102+ <td>123</td>
103+ <td>123</td>
104+ <td>123</td>
105+ <td>123</td>
106+ </tr>
107+ <tr>
108+ <td>1</td>
109+ <td>1</td>
110+ <td>1</td>
111+ <td>1</td>
112+ </tr>
113+ </tbody>
114+ </table>
115+</table-wrap>
116+<p>Multiline table with caption:</p>
117+<table-wrap>
118+ <caption>
119+ <p>Here’s the caption. It may span multiple lines.</p>
120+ </caption>
121+ <table>
122+ <col width="15*" align="center" />
123+ <col width="13*" align="left" />
124+ <col width="16*" align="right" />
125+ <col width="35*" align="left" />
126+ <thead>
127+ <tr>
128+ <th>Centered Header</th>
129+ <th>Left Aligned</th>
130+ <th>Right Aligned</th>
131+ <th>Default aligned</th>
132+ </tr>
133+ </thead>
134+ <tbody>
135+ <tr>
136+ <td>First</td>
137+ <td>row</td>
138+ <td>12.0</td>
139+ <td>Example of a row that spans multiple lines.</td>
140+ </tr>
141+ <tr>
142+ <td>Second</td>
143+ <td>row</td>
144+ <td>5.0</td>
145+ <td>Here’s another one. Note the blank line between rows.</td>
146+ </tr>
147+ </tbody>
148+ </table>
149+</table-wrap>
150+<p>Multiline table without caption:</p>
151+<table>
152+ <col width="15*" align="center" />
153+ <col width="13*" align="left" />
154+ <col width="16*" align="right" />
155+ <col width="35*" align="left" />
156+ <thead>
157+ <tr>
158+ <th>Centered Header</th>
159+ <th>Left Aligned</th>
160+ <th>Right Aligned</th>
161+ <th>Default aligned</th>
162+ </tr>
163+ </thead>
164+ <tbody>
165+ <tr>
166+ <td>First</td>
167+ <td>row</td>
168+ <td>12.0</td>
169+ <td>Example of a row that spans multiple lines.</td>
170+ </tr>
171+ <tr>
172+ <td>Second</td>
173+ <td>row</td>
174+ <td>5.0</td>
175+ <td>Here’s another one. Note the blank line between rows.</td>
176+ </tr>
177+ </tbody>
178+</table>
179+<p>Table without column headers:</p>
180+<table>
181+ <col align="right" />
182+ <col align="left" />
183+ <col align="center" />
184+ <col align="right" />
185+ <tbody>
186+ <tr>
187+ <td>12</td>
188+ <td>12</td>
189+ <td>12</td>
190+ <td>12</td>
191+ </tr>
192+ <tr>
193+ <td>123</td>
194+ <td>123</td>
195+ <td>123</td>
196+ <td>123</td>
197+ </tr>
198+ <tr>
199+ <td>1</td>
200+ <td>1</td>
201+ <td>1</td>
202+ <td>1</td>
203+ </tr>
204+ </tbody>
205+</table>
206+<p>Multiline table without column headers:</p>
207+<table>
208+ <col width="15*" align="center" />
209+ <col width="13*" align="left" />
210+ <col width="16*" align="right" />
211+ <col width="35*" align="left" />
212+ <tbody>
213+ <tr>
214+ <td>First</td>
215+ <td>row</td>
216+ <td>12.0</td>
217+ <td>Example of a row that spans multiple lines.</td>
218+ </tr>
219+ <tr>
220+ <td>Second</td>
221+ <td>row</td>
222+ <td>5.0</td>
223+ <td>Here’s another one. Note the blank line between rows.</td>
224+ </tr>
225+ </tbody>
226+</table>
test/writer.jats → test/writer.jats_archivingrenamed

The content is the same.

test/writer.jats_articleauthoringnew file+874
@@ -0,0 +1,874 @@
1+<?xml version="1.0" encoding="utf-8" ?>
2+<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Article Authoring DTD v1.2 20190208//EN"
3+ "JATS-articleauthoring1.dtd">
4+<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other">
5+<front>
6+<article-meta>
7+<title-group>
8+<article-title>Pandoc Test Suite</article-title>
9+</title-group>
10+<contrib-group>
11+<contrib contrib-type="author">
12+<string-name>John MacFarlane</string-name>
13+</contrib>
14+<contrib contrib-type="author">
15+<string-name>Anonymous</string-name>
16+</contrib>
17+</contrib-group>
18+<abstract>
19+
20+</abstract>
21+</article-meta>
22+</front>
23+<body>
24+<p>This is a set of tests for pandoc. Most of them are adapted from John
25+Gruber’s markdown test suite.</p>
26+<sec id="headers">
27+ <title>Headers</title>
28+ <sec id="level-2-with-an-embedded-link">
29+ <title>Level 2 with an
30+ <ext-link ext-link-type="uri" xlink:href="/url">embedded
31+ link</ext-link></title>
32+ <sec id="level-3-with-emphasis">
33+ <title>Level 3 with <italic>emphasis</italic></title>
34+ <sec id="level-4">
35+ <title>Level 4</title>
36+ <sec id="level-5">
37+ <title>Level 5</title>
38+ </sec>
39+ </sec>
40+ </sec>
41+ </sec>
42+</sec>
43+<sec id="level-1">
44+ <title>Level 1</title>
45+ <sec id="level-2-with-emphasis">
46+ <title>Level 2 with <italic>emphasis</italic></title>
47+ <sec id="level-3">
48+ <title>Level 3</title>
49+ <p>with no blank line</p>
50+ </sec>
51+ </sec>
52+ <sec id="level-2">
53+ <title>Level 2</title>
54+ <p>with no blank line</p>
55+ </sec>
56+</sec>
57+<sec id="paragraphs">
58+ <title>Paragraphs</title>
59+ <p>Here’s a regular paragraph.</p>
60+ <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
61+ item. Because a hard-wrapped line in the middle of a paragraph looked like a
62+ list item.</p>
63+ <p>Here’s one with a bullet. * criminey.</p>
64+ <p>There should be a hard line break
65+ here.</p>
66+</sec>
67+<sec id="block-quotes">
68+ <title>Block Quotes</title>
69+ <p>E-mail style:</p>
70+ <disp-quote>
71+ <p>This is a block quote. It is pretty short.</p>
72+ </disp-quote>
73+ <disp-quote>
74+ <p>Code in a block quote:</p>
75+ <p specific-use="wrapper">
76+ <preformat>sub status {
77+ print &quot;working&quot;;
78+}</preformat>
79+ </p>
80+ <p>A list:</p>
81+ <p specific-use="wrapper">
82+ <list list-type="order">
83+ <list-item>
84+ <p>item one</p>
85+ </list-item>
86+ <list-item>
87+ <p>item two</p>
88+ </list-item>
89+ </list>
90+ </p>
91+ <p>Nested block quotes:</p>
92+ <p specific-use="wrapper">
93+ <disp-quote>
94+ <p>nested</p>
95+ </disp-quote>
96+ </p>
97+ <p specific-use="wrapper">
98+ <disp-quote>
99+ <p>nested</p>
100+ </disp-quote>
101+ </p>
102+ </disp-quote>
103+ <p>This should not be a block quote: 2 &gt; 1.</p>
104+ <p>And a following paragraph.</p>
105+</sec>
106+<sec id="code-blocks">
107+ <title>Code Blocks</title>
108+ <p>Code:</p>
109+ <preformat>---- (should be four hyphens)
110+
111+sub status {
112+ print &quot;working&quot;;
113+}
114+
115+this code block is indented by one tab</preformat>
116+ <p>And:</p>
117+ <preformat> this code block is indented by two tabs
118+
119+These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
120+</sec>
121+<sec id="lists">
122+ <title>Lists</title>
123+ <sec id="unordered">
124+ <title>Unordered</title>
125+ <p>Asterisks tight:</p>
126+ <list list-type="bullet">
127+ <list-item>
128+ <p>asterisk 1</p>
129+ </list-item>
130+ <list-item>
131+ <p>asterisk 2</p>
132+ </list-item>
133+ <list-item>
134+ <p>asterisk 3</p>
135+ </list-item>
136+ </list>
137+ <p>Asterisks loose:</p>
138+ <list list-type="bullet">
139+ <list-item>
140+ <p>asterisk 1</p>
141+ </list-item>
142+ <list-item>
143+ <p>asterisk 2</p>
144+ </list-item>
145+ <list-item>
146+ <p>asterisk 3</p>
147+ </list-item>
148+ </list>
149+ <p>Pluses tight:</p>
150+ <list list-type="bullet">
151+ <list-item>
152+ <p>Plus 1</p>
153+ </list-item>
154+ <list-item>
155+ <p>Plus 2</p>
156+ </list-item>
157+ <list-item>
158+ <p>Plus 3</p>
159+ </list-item>
160+ </list>
161+ <p>Pluses loose:</p>
162+ <list list-type="bullet">
163+ <list-item>
164+ <p>Plus 1</p>
165+ </list-item>
166+ <list-item>
167+ <p>Plus 2</p>
168+ </list-item>
169+ <list-item>
170+ <p>Plus 3</p>
171+ </list-item>
172+ </list>
173+ <p>Minuses tight:</p>
174+ <list list-type="bullet">
175+ <list-item>
176+ <p>Minus 1</p>
177+ </list-item>
178+ <list-item>
179+ <p>Minus 2</p>
180+ </list-item>
181+ <list-item>
182+ <p>Minus 3</p>
183+ </list-item>
184+ </list>
185+ <p>Minuses loose:</p>
186+ <list list-type="bullet">
187+ <list-item>
188+ <p>Minus 1</p>
189+ </list-item>
190+ <list-item>
191+ <p>Minus 2</p>
192+ </list-item>
193+ <list-item>
194+ <p>Minus 3</p>
195+ </list-item>
196+ </list>
197+ </sec>
198+ <sec id="ordered">
199+ <title>Ordered</title>
200+ <p>Tight:</p>
201+ <list list-type="order">
202+ <list-item>
203+ <p>First</p>
204+ </list-item>
205+ <list-item>
206+ <p>Second</p>
207+ </list-item>
208+ <list-item>
209+ <p>Third</p>
210+ </list-item>
211+ </list>
212+ <p>and:</p>
213+ <list list-type="order">
214+ <list-item>
215+ <p>One</p>
216+ </list-item>
217+ <list-item>
218+ <p>Two</p>
219+ </list-item>
220+ <list-item>
221+ <p>Three</p>
222+ </list-item>
223+ </list>
224+ <p>Loose using tabs:</p>
225+ <list list-type="order">
226+ <list-item>
227+ <p>First</p>
228+ </list-item>
229+ <list-item>
230+ <p>Second</p>
231+ </list-item>
232+ <list-item>
233+ <p>Third</p>
234+ </list-item>
235+ </list>
236+ <p>and using spaces:</p>
237+ <list list-type="order">
238+ <list-item>
239+ <p>One</p>
240+ </list-item>
241+ <list-item>
242+ <p>Two</p>
243+ </list-item>
244+ <list-item>
245+ <p>Three</p>
246+ </list-item>
247+ </list>
248+ <p>Multiple paragraphs:</p>
249+ <list list-type="order">
250+ <list-item>
251+ <p>Item 1, graf one.</p>
252+ <p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s
253+ back.</p>
254+ </list-item>
255+ <list-item>
256+ <p>Item 2.</p>
257+ </list-item>
258+ <list-item>
259+ <p>Item 3.</p>
260+ </list-item>
261+ </list>
262+ </sec>
263+ <sec id="nested">
264+ <title>Nested</title>
265+ <list list-type="bullet">
266+ <list-item>
267+ <p>Tab</p>
268+ <list list-type="bullet">
269+ <list-item>
270+ <p>Tab</p>
271+ <list list-type="bullet">
272+ <list-item>
273+ <p>Tab</p>
274+ </list-item>
275+ </list>
276+ </list-item>
277+ </list>
278+ </list-item>
279+ </list>
280+ <p>Here’s another:</p>
281+ <list list-type="order">
282+ <list-item>
283+ <p>First</p>
284+ </list-item>
285+ <list-item>
286+ <p>Second:</p>
287+ <list list-type="bullet">
288+ <list-item>
289+ <p>Fee</p>
290+ </list-item>
291+ <list-item>
292+ <p>Fie</p>
293+ </list-item>
294+ <list-item>
295+ <p>Foe</p>
296+ </list-item>
297+ </list>
298+ </list-item>
299+ <list-item>
300+ <p>Third</p>
301+ </list-item>
302+ </list>
303+ <p>Same thing but with paragraphs:</p>
304+ <list list-type="order">
305+ <list-item>
306+ <p>First</p>
307+ </list-item>
308+ <list-item>
309+ <p>Second:</p>
310+ <list list-type="bullet">
311+ <list-item>
312+ <p>Fee</p>
313+ </list-item>
314+ <list-item>
315+ <p>Fie</p>
316+ </list-item>
317+ <list-item>
318+ <p>Foe</p>
319+ </list-item>
320+ </list>
321+ </list-item>
322+ <list-item>
323+ <p>Third</p>
324+ </list-item>
325+ </list>
326+ </sec>
327+ <sec id="tabs-and-spaces">
328+ <title>Tabs and spaces</title>
329+ <list list-type="bullet">
330+ <list-item>
331+ <p>this is a list item indented with tabs</p>
332+ </list-item>
333+ <list-item>
334+ <p>this is a list item indented with spaces</p>
335+ <list list-type="bullet">
336+ <list-item>
337+ <p>this is an example list item indented with tabs</p>
338+ </list-item>
339+ <list-item>
340+ <p>this is an example list item indented with spaces</p>
341+ </list-item>
342+ </list>
343+ </list-item>
344+ </list>
345+ </sec>
346+ <sec id="fancy-list-markers">
347+ <title>Fancy list markers</title>
348+ <list list-type="order">
349+ <list-item>
350+ <label>(2)</label>
351+ <p>begins with 2</p>
352+ </list-item>
353+ <list-item>
354+ <label>(3)</label>
355+ <p>and now 3</p>
356+ <p>with a continuation</p>
357+ <list list-type="order">
358+ <list-item>
359+ <label>iv.</label>
360+ <p>sublist with roman numerals, starting with 4</p>
361+ </list-item>
362+ <list-item>
363+ <label>v.</label>
364+ <p>more items</p>
365+ <list list-type="order">
366+ <list-item>
367+ <label>(A)</label>
368+ <p>a subsublist</p>
369+ </list-item>
370+ <list-item>
371+ <label>(B)</label>
372+ <p>a subsublist</p>
373+ </list-item>
374+ </list>
375+ </list-item>
376+ </list>
377+ </list-item>
378+ </list>
379+ <p>Nesting:</p>
380+ <list list-type="order">
381+ <list-item>
382+ <p>Upper Alpha</p>
383+ <list list-type="order">
384+ <list-item>
385+ <p>Upper Roman.</p>
386+ <list list-type="order">
387+ <list-item>
388+ <label>(6)</label>
389+ <p>Decimal start with 6</p>
390+ <list list-type="order">
391+ <list-item>
392+ <label>c)</label>
393+ <p>Lower alpha with paren</p>
394+ </list-item>
395+ </list>
396+ </list-item>
397+ </list>
398+ </list-item>
399+ </list>
400+ </list-item>
401+ </list>
402+ <p>Autonumbering:</p>
403+ <list list-type="order">
404+ <list-item>
405+ <p>Autonumber.</p>
406+ </list-item>
407+ <list-item>
408+ <p>More.</p>
409+ <list list-type="order">
410+ <list-item>
411+ <p>Nested.</p>
412+ </list-item>
413+ </list>
414+ </list-item>
415+ </list>
416+ <p>Should not be a list item:</p>
417+ <p>M.A. 2007</p>
418+ <p>B. Williams</p>
419+ </sec>
420+</sec>
421+<sec id="definition-lists">
422+ <title>Definition Lists</title>
423+ <p>Tight using spaces:</p>
424+ <def-list>
425+ <def-item>
426+ <term>apple</term>
427+ <def>
428+ <p>red fruit</p>
429+ </def>
430+ </def-item>
431+ <def-item>
432+ <term>orange</term>
433+ <def>
434+ <p>orange fruit</p>
435+ </def>
436+ </def-item>
437+ <def-item>
438+ <term>banana</term>
439+ <def>
440+ <p>yellow fruit</p>
441+ </def>
442+ </def-item>
443+ </def-list>
444+ <p>Tight using tabs:</p>
445+ <def-list>
446+ <def-item>
447+ <term>apple</term>
448+ <def>
449+ <p>red fruit</p>
450+ </def>
451+ </def-item>
452+ <def-item>
453+ <term>orange</term>
454+ <def>
455+ <p>orange fruit</p>
456+ </def>
457+ </def-item>
458+ <def-item>
459+ <term>banana</term>
460+ <def>
461+ <p>yellow fruit</p>
462+ </def>
463+ </def-item>
464+ </def-list>
465+ <p>Loose:</p>
466+ <def-list>
467+ <def-item>
468+ <term>apple</term>
469+ <def>
470+ <p>red fruit</p>
471+ </def>
472+ </def-item>
473+ <def-item>
474+ <term>orange</term>
475+ <def>
476+ <p>orange fruit</p>
477+ </def>
478+ </def-item>
479+ <def-item>
480+ <term>banana</term>
481+ <def>
482+ <p>yellow fruit</p>
483+ </def>
484+ </def-item>
485+ </def-list>
486+ <p>Multiple blocks with italics:</p>
487+ <def-list>
488+ <def-item>
489+ <term><italic>apple</italic></term>
490+ <def>
491+ <p>red fruit</p>
492+ <p>contains seeds, crisp, pleasant to taste</p>
493+ </def>
494+ </def-item>
495+ <def-item>
496+ <term><italic>orange</italic></term>
497+ <def>
498+ <p>orange fruit</p>
499+ <p specific-use="wrapper">
500+ <preformat>{ orange code block }</preformat>
501+ </p>
502+ <p specific-use="wrapper">
503+ <disp-quote>
504+ <p>orange block quote</p>
505+ </disp-quote>
506+ </p>
507+ </def>
508+ </def-item>
509+ </def-list>
510+ <p>Multiple definitions, tight:</p>
511+ <def-list>
512+ <def-item>
513+ <term>apple</term>
514+ <def>
515+ <p>red fruit</p>
516+ <p>computer</p>
517+ </def>
518+ </def-item>
519+ <def-item>
520+ <term>orange</term>
521+ <def>
522+ <p>orange fruit</p>
523+ <p>bank</p>
524+ </def>
525+ </def-item>
526+ </def-list>
527+ <p>Multiple definitions, loose:</p>
528+ <def-list>
529+ <def-item>
530+ <term>apple</term>
531+ <def>
532+ <p>red fruit</p>
533+ <p>computer</p>
534+ </def>
535+ </def-item>
536+ <def-item>
537+ <term>orange</term>
538+ <def>
539+ <p>orange fruit</p>
540+ <p>bank</p>
541+ </def>
542+ </def-item>
543+ </def-list>
544+ <p>Blank line after term, indented marker, alternate markers:</p>
545+ <def-list>
546+ <def-item>
547+ <term>apple</term>
548+ <def>
549+ <p>red fruit</p>
550+ <p>computer</p>
551+ </def>
552+ </def-item>
553+ <def-item>
554+ <term>orange</term>
555+ <def>
556+ <p>orange fruit</p>
557+ <p specific-use="wrapper">
558+ <list list-type="order">
559+ <list-item>
560+ <p>sublist</p>
561+ </list-item>
562+ <list-item>
563+ <p>sublist</p>
564+ </list-item>
565+ </list>
566+ </p>
567+ </def>
568+ </def-item>
569+ </def-list>
570+</sec>
571+<sec id="html-blocks">
572+ <title>HTML Blocks</title>
573+ <p>Simple block on one line:</p>
574+ <boxed-text>
575+ <p>foo</p>
576+ </boxed-text>
577+ <p>And nested without indentation:</p>
578+ <boxed-text>
579+ <boxed-text>
580+ <boxed-text>
581+ <p>foo</p>
582+ </boxed-text>
583+ </boxed-text>
584+ <boxed-text>
585+ <p>bar</p>
586+ </boxed-text>
587+ </boxed-text>
588+ <p>Interpreted markdown in a table:</p>
589+ <p>This is <italic>emphasized</italic></p>
590+ <p>And this is <bold>strong</bold></p>
591+ <p>Here’s a simple block:</p>
592+ <boxed-text>
593+ <p>foo</p>
594+ </boxed-text>
595+ <p>This should be a code block, though:</p>
596+ <preformat>&lt;div&gt;
597+ foo
598+&lt;/div&gt;</preformat>
599+ <p>As should this:</p>
600+ <preformat>&lt;div&gt;foo&lt;/div&gt;</preformat>
601+ <p>Now, nested:</p>
602+ <boxed-text>
603+ <boxed-text>
604+ <boxed-text>
605+ <p>foo</p>
606+ </boxed-text>
607+ </boxed-text>
608+ </boxed-text>
609+ <p>This should just be an HTML comment:</p>
610+ <p>Multiline:</p>
611+ <p>Code block:</p>
612+ <preformat>&lt;!-- Comment --&gt;</preformat>
613+ <p>Just plain comment, with trailing spaces on the line:</p>
614+ <p>Code:</p>
615+ <preformat>&lt;hr /&gt;</preformat>
616+ <p>Hr’s:</p>
617+</sec>
618+<sec id="inline-markup">
619+ <title>Inline Markup</title>
620+ <p>This is <italic>emphasized</italic>, and so <italic>is this</italic>.</p>
621+ <p>This is <bold>strong</bold>, and so <bold>is this</bold>.</p>
622+ <p>An <italic><ext-link ext-link-type="uri" xlink:href="/url">emphasized
623+ link</ext-link></italic>.</p>
624+ <p><bold><italic>This is strong and em.</italic></bold></p>
625+ <p>So is <bold><italic>this</italic></bold> word.</p>
626+ <p><bold><italic>This is strong and em.</italic></bold></p>
627+ <p>So is <bold><italic>this</italic></bold> word.</p>
628+ <p>This is code: <monospace>&gt;</monospace>, <monospace>$</monospace>,
629+ <monospace>\</monospace>, <monospace>\$</monospace>,
630+ <monospace>&lt;html&gt;</monospace>.</p>
631+ <p><strike>This is <italic>strikeout</italic>.</strike></p>
632+ <p>Superscripts: a<sup>bc</sup>d a<sup><italic>hello</italic></sup>
633+ a<sup>hello there</sup>.</p>
634+ <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O,
635+ H<sub>many of them</sub>O.</p>
636+ <p>These should not be superscripts or subscripts, because of the unescaped
637+ spaces: a^b c^d, a~b c~d.</p>
638+</sec>
639+<sec id="smart-quotes-ellipses-dashes">
640+ <title>Smart quotes, ellipses, dashes</title>
641+ <p>“Hello,” said the spider. “‘Shelob’ is my name.”</p>
642+ <p>‘A’, ‘B’, and ‘C’ are letters.</p>
643+ <p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’</p>
644+ <p>‘He said, “I want to go.”’ Were you alive in the 70’s?</p>
645+ <p>Here is some quoted ‘<monospace>code</monospace>’ and a
646+ “<ext-link ext-link-type="uri" xlink:href="http://example.com/?foo=1&amp;bar=2">quoted
647+ link</ext-link>”.</p>
648+ <p>Some dashes: one—two — three—four — five.</p>
649+ <p>Dashes between numbers: 5–7, 255–66, 1987–1999.</p>
650+ <p>Ellipses…and…and….</p>
651+</sec>
652+<sec id="latex">
653+ <title>LaTeX</title>
654+ <list list-type="bullet">
655+ <list-item>
656+ <p></p>
657+ </list-item>
658+ <list-item>
659+ <p><inline-formula><mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mn>2</mml:mn><mml:mo>+</mml:mo><mml:mn>2</mml:mn><mml:mo>=</mml:mo><mml:mn>4</mml:mn></mml:mrow></mml:math></inline-formula></p>
660+ </list-item>
661+ <list-item>
662+ <p><inline-formula><mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi>y</mml:mi></mml:mrow></mml:math></inline-formula></p>
663+ </list-item>
664+ <list-item>
665+ <p><inline-formula><mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>α</mml:mi><mml:mo>∧</mml:mo><mml:mi>ω</mml:mi></mml:mrow></mml:math></inline-formula></p>
666+ </list-item>
667+ <list-item>
668+ <p><inline-formula><mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mn>223</mml:mn></mml:math></inline-formula></p>
669+ </list-item>
670+ <list-item>
671+ <p><inline-formula><mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>p</mml:mi></mml:math></inline-formula>-Tree</p>
672+ </list-item>
673+ <list-item>
674+ <p>Here’s some display math:
675+ <disp-formula><mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mo>lim</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></disp-formula></p>
676+ </list-item>
677+ <list-item>
678+ <p>Here’s one that has a line break in it:
679+ <inline-formula><mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>α</mml:mi><mml:mo>+</mml:mo><mml:mi>ω</mml:mi><mml:mo>×</mml:mo><mml:msup><mml:mi>x</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>.</p>
680+ </list-item>
681+ </list>
682+ <p>These shouldn’t be math:</p>
683+ <list list-type="bullet">
684+ <list-item>
685+ <p>To get the famous equation, write
686+ <monospace>$e = mc^2$</monospace>.</p>
687+ </list-item>
688+ <list-item>
689+ <p>$22,000 is a <italic>lot</italic> of money. So is $34,000. (It worked
690+ if “lot” is emphasized.)</p>
691+ </list-item>
692+ <list-item>
693+ <p>Shoes ($20) and socks ($5).</p>
694+ </list-item>
695+ <list-item>
696+ <p>Escaped <monospace>$</monospace>: $73 <italic>this should be
697+ emphasized</italic> 23$.</p>
698+ </list-item>
699+ </list>
700+ <p>Here’s a LaTeX table:</p>
701+</sec>
702+<sec id="special-characters">
703+ <title>Special Characters</title>
704+ <p>Here is some unicode:</p>
705+ <list list-type="bullet">
706+ <list-item>
707+ <p>I hat: Î</p>
708+ </list-item>
709+ <list-item>
710+ <p>o umlaut: ö</p>
711+ </list-item>
712+ <list-item>
713+ <p>section: §</p>
714+ </list-item>
715+ <list-item>
716+ <p>set membership: ∈</p>
717+ </list-item>
718+ <list-item>
719+ <p>copyright: ©</p>
720+ </list-item>
721+ </list>
722+ <p>AT&amp;T has an ampersand in their name.</p>
723+ <p>AT&amp;T is another way to write it.</p>
724+ <p>This &amp; that.</p>
725+ <p>4 &lt; 5.</p>
726+ <p>6 &gt; 5.</p>
727+ <p>Backslash: \</p>
728+ <p>Backtick: `</p>
729+ <p>Asterisk: *</p>
730+ <p>Underscore: _</p>
731+ <p>Left brace: {</p>
732+ <p>Right brace: }</p>
733+ <p>Left bracket: [</p>
734+ <p>Right bracket: ]</p>
735+ <p>Left paren: (</p>
736+ <p>Right paren: )</p>
737+ <p>Greater-than: &gt;</p>
738+ <p>Hash: #</p>
739+ <p>Period: .</p>
740+ <p>Bang: !</p>
741+ <p>Plus: +</p>
742+ <p>Minus: -</p>
743+</sec>
744+<sec id="links">
745+ <title>Links</title>
746+ <sec id="explicit">
747+ <title>Explicit</title>
748+ <p>Just a
749+ <ext-link ext-link-type="uri" xlink:href="/url/">URL</ext-link>.</p>
750+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title">URL
751+ and title</ext-link>.</p>
752+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title preceded by two spaces">URL
753+ and title</ext-link>.</p>
754+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title preceded by a tab">URL
755+ and title</ext-link>.</p>
756+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title with &quot;quotes&quot; in it">URL
757+ and title</ext-link></p>
758+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title with single quotes">URL
759+ and title</ext-link></p>
760+ <p><ext-link ext-link-type="uri" xlink:href="/url/with_underscore">with_underscore</ext-link></p>
761+ <p><ext-link ext-link-type="uri" xlink:href="mailto:nobody@nowhere.net">Email
762+ link</ext-link></p>
763+ <p><ext-link ext-link-type="uri" xlink:href="">Empty</ext-link>.</p>
764+ </sec>
765+ <sec id="reference">
766+ <title>Reference</title>
767+ <p>Foo
768+ <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
769+ <p>With <ext-link ext-link-type="uri" xlink:href="/url/">embedded
770+ [brackets]</ext-link>.</p>
771+ <p><ext-link ext-link-type="uri" xlink:href="/url/">b</ext-link> by itself
772+ should be a link.</p>
773+ <p>Indented
774+ <ext-link ext-link-type="uri" xlink:href="/url">once</ext-link>.</p>
775+ <p>Indented
776+ <ext-link ext-link-type="uri" xlink:href="/url">twice</ext-link>.</p>
777+ <p>Indented
778+ <ext-link ext-link-type="uri" xlink:href="/url">thrice</ext-link>.</p>
779+ <p>This should [not][] be a link.</p>
780+ <preformat>[not]: /url</preformat>
781+ <p>Foo
782+ <ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="Title with &quot;quotes&quot; inside">bar</ext-link>.</p>
783+ <p>Foo
784+ <ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="Title with &quot;quote&quot; inside">biz</ext-link>.</p>
785+ </sec>
786+ <sec id="with-ampersands">
787+ <title>With ampersands</title>
788+ <p>Here’s a
789+ <ext-link ext-link-type="uri" xlink:href="http://example.com/?foo=1&amp;bar=2">link
790+ with an ampersand in the URL</ext-link>.</p>
791+ <p>Here’s a link with an amersand in the link text:
792+ <ext-link ext-link-type="uri" xlink:href="http://att.com/" xlink:title="AT&amp;T">AT&amp;T</ext-link>.</p>
793+ <p>Here’s an
794+ <ext-link ext-link-type="uri" xlink:href="/script?foo=1&amp;bar=2">inline
795+ link</ext-link>.</p>
796+ <p>Here’s an
797+ <ext-link ext-link-type="uri" xlink:href="/script?foo=1&amp;bar=2">inline
798+ link in pointy braces</ext-link>.</p>
799+ </sec>
800+ <sec id="autolinks">
801+ <title>Autolinks</title>
802+ <p>With an ampersand:
803+ <ext-link ext-link-type="uri" xlink:href="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</ext-link></p>
804+ <list list-type="bullet">
805+ <list-item>
806+ <p>In a list?</p>
807+ </list-item>
808+ <list-item>
809+ <p><ext-link ext-link-type="uri" xlink:href="http://example.com/">http://example.com/</ext-link></p>
810+ </list-item>
811+ <list-item>
812+ <p>It should.</p>
813+ </list-item>
814+ </list>
815+ <p>An e-mail address: <email>nobody@nowhere.net</email></p>
816+ <disp-quote>
817+ <p>Blockquoted:
818+ <ext-link ext-link-type="uri" xlink:href="http://example.com/">http://example.com/</ext-link></p>
819+ </disp-quote>
820+ <p>Auto-links should not occur here:
821+ <monospace>&lt;http://example.com/&gt;</monospace></p>
822+ <preformat>or here: &lt;http://example.com/&gt;</preformat>
823+ </sec>
824+</sec>
825+<sec id="images">
826+ <title>Images</title>
827+ <p>From “Voyage dans la Lune” by Georges Melies (1902):</p>
828+ <fig>
829+ <caption><p>lalune</p></caption>
830+ <graphic mimetype="image" mime-subtype="jpeg" xlink:href="lalune.jpg" xlink:title="Voyage dans la Lune" />
831+ </fig>
832+ <p>Here is a movie
833+ <inline-graphic mimetype="image" mime-subtype="jpeg" xlink:href="movie.jpg" />
834+ icon.</p>
835+</sec>
836+<sec id="footnotes">
837+ <title>Footnotes</title>
838+ <p>Here is a footnote reference,<fn>
839+ <p>Here is the footnote. It can go anywhere after the footnote reference.
840+ It need not be placed at the end of the document.</p>
841+ </fn> and another.<fn>
842+ <p>Here’s the long note. This one contains multiple blocks.</p>
843+ <p>Subsequent blocks are indented to show that they belong to the footnote
844+ (as with list items).</p>
845+ <p specific-use="wrapper">
846+ <preformat> { &lt;code&gt; }</preformat>
847+ </p>
848+ <p>If you want, you can indent every line, but you can also be lazy and
849+ just indent the first line of each block.</p>
850+ </fn> This should <italic>not</italic> be a footnote reference, because it
851+ contains a space.[^my note] Here is an inline note.<fn>
852+ <p>This is <italic>easier</italic> to type. Inline notes may contain
853+ <ext-link ext-link-type="uri" xlink:href="http://google.com">links</ext-link>
854+ and <monospace>]</monospace> verbatim characters, as well as [bracketed
855+ text].</p>
856+ </fn></p>
857+ <disp-quote>
858+ <p>Notes can go in quotes.<fn>
859+ <p>In quote.</p>
860+ </fn></p>
861+ </disp-quote>
862+ <list list-type="order">
863+ <list-item>
864+ <p>And in list items.<fn>
865+ <p>In list.</p>
866+ </fn></p>
867+ </list-item>
868+ </list>
869+ <p>This paragraph should not be part of the note, as it is not indented.</p>
870+</sec>
871+</body>
872+<back>
873+</back>
874+</article>
test/writer.jats_publishingnew file+898
@@ -0,0 +1,898 @@
1+<?xml version="1.0" encoding="utf-8" ?>
2+<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN"
3+ "JATS-publishing1.dtd">
4+<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other">
5+<front>
6+<journal-meta>
7+<journal-title-group>
8+</journal-title-group>
9+<publisher>
10+<publisher-name></publisher-name>
11+</publisher>
12+</journal-meta>
13+<article-meta>
14+<title-group>
15+<article-title>Pandoc Test Suite</article-title>
16+</title-group>
17+<contrib-group>
18+<contrib contrib-type="author">
19+<string-name>John MacFarlane</string-name>
20+</contrib>
21+<contrib contrib-type="author">
22+<string-name>Anonymous</string-name>
23+</contrib>
24+</contrib-group>
25+<pub-date pub-type="epub" iso-8601-date="2006-07-17">
26+<day>17</day>
27+<month>7</month>
28+<year>2006</year>
29+</pub-date>
30+</article-meta>
31+</front>
32+<body>
33+<p>This is a set of tests for pandoc. Most of them are adapted from John
34+Gruber’s markdown test suite.</p>
35+<sec id="headers">
36+ <title>Headers</title>
37+ <sec id="level-2-with-an-embedded-link">
38+ <title>Level 2 with an
39+ <ext-link ext-link-type="uri" xlink:href="/url">embedded
40+ link</ext-link></title>
41+ <sec id="level-3-with-emphasis">
42+ <title>Level 3 with <italic>emphasis</italic></title>
43+ <sec id="level-4">
44+ <title>Level 4</title>
45+ <sec id="level-5">
46+ <title>Level 5</title>
47+ </sec>
48+ </sec>
49+ </sec>
50+ </sec>
51+</sec>
52+<sec id="level-1">
53+ <title>Level 1</title>
54+ <sec id="level-2-with-emphasis">
55+ <title>Level 2 with <italic>emphasis</italic></title>
56+ <sec id="level-3">
57+ <title>Level 3</title>
58+ <p>with no blank line</p>
59+ </sec>
60+ </sec>
61+ <sec id="level-2">
62+ <title>Level 2</title>
63+ <p>with no blank line</p>
64+ </sec>
65+</sec>
66+<sec id="paragraphs">
67+ <title>Paragraphs</title>
68+ <p>Here’s a regular paragraph.</p>
69+ <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
70+ item. Because a hard-wrapped line in the middle of a paragraph looked like a
71+ list item.</p>
72+ <p>Here’s one with a bullet. * criminey.</p>
73+ <p>There should be a hard line break
74+ here.</p>
75+</sec>
76+<sec id="block-quotes">
77+ <title>Block Quotes</title>
78+ <p>E-mail style:</p>
79+ <disp-quote>
80+ <p>This is a block quote. It is pretty short.</p>
81+ </disp-quote>
82+ <disp-quote>
83+ <p>Code in a block quote:</p>
84+ <preformat>sub status {
85+ print &quot;working&quot;;
86+}</preformat>
87+ <p>A list:</p>
88+ <list list-type="order">
89+ <list-item>
90+ <p>item one</p>
91+ </list-item>
92+ <list-item>
93+ <p>item two</p>
94+ </list-item>
95+ </list>
96+ <p>Nested block quotes:</p>
97+ <disp-quote>
98+ <p>nested</p>
99+ </disp-quote>
100+ <disp-quote>
101+ <p>nested</p>
102+ </disp-quote>
103+ </disp-quote>
104+ <p>This should not be a block quote: 2 &gt; 1.</p>
105+ <p>And a following paragraph.</p>
106+</sec>
107+<sec id="code-blocks">
108+ <title>Code Blocks</title>
109+ <p>Code:</p>
110+ <preformat>---- (should be four hyphens)
111+
112+sub status {
113+ print &quot;working&quot;;
114+}
115+
116+this code block is indented by one tab</preformat>
117+ <p>And:</p>
118+ <preformat> this code block is indented by two tabs
119+
120+These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
121+</sec>
122+<sec id="lists">
123+ <title>Lists</title>
124+ <sec id="unordered">
125+ <title>Unordered</title>
126+ <p>Asterisks tight:</p>
127+ <list list-type="bullet">
128+ <list-item>
129+ <p>asterisk 1</p>
130+ </list-item>
131+ <list-item>
132+ <p>asterisk 2</p>
133+ </list-item>
134+ <list-item>
135+ <p>asterisk 3</p>
136+ </list-item>
137+ </list>
138+ <p>Asterisks loose:</p>
139+ <list list-type="bullet">
140+ <list-item>
141+ <p>asterisk 1</p>
142+ </list-item>
143+ <list-item>
144+ <p>asterisk 2</p>
145+ </list-item>
146+ <list-item>
147+ <p>asterisk 3</p>
148+ </list-item>
149+ </list>
150+ <p>Pluses tight:</p>
151+ <list list-type="bullet">
152+ <list-item>
153+ <p>Plus 1</p>
154+ </list-item>
155+ <list-item>
156+ <p>Plus 2</p>
157+ </list-item>
158+ <list-item>
159+ <p>Plus 3</p>
160+ </list-item>
161+ </list>
162+ <p>Pluses loose:</p>
163+ <list list-type="bullet">
164+ <list-item>
165+ <p>Plus 1</p>
166+ </list-item>
167+ <list-item>
168+ <p>Plus 2</p>
169+ </list-item>
170+ <list-item>
171+ <p>Plus 3</p>
172+ </list-item>
173+ </list>
174+ <p>Minuses tight:</p>
175+ <list list-type="bullet">
176+ <list-item>
177+ <p>Minus 1</p>
178+ </list-item>
179+ <list-item>
180+ <p>Minus 2</p>
181+ </list-item>
182+ <list-item>
183+ <p>Minus 3</p>
184+ </list-item>
185+ </list>
186+ <p>Minuses loose:</p>
187+ <list list-type="bullet">
188+ <list-item>
189+ <p>Minus 1</p>
190+ </list-item>
191+ <list-item>
192+ <p>Minus 2</p>
193+ </list-item>
194+ <list-item>
195+ <p>Minus 3</p>
196+ </list-item>
197+ </list>
198+ </sec>
199+ <sec id="ordered">
200+ <title>Ordered</title>
201+ <p>Tight:</p>
202+ <list list-type="order">
203+ <list-item>
204+ <p>First</p>
205+ </list-item>
206+ <list-item>
207+ <p>Second</p>
208+ </list-item>
209+ <list-item>
210+ <p>Third</p>
211+ </list-item>
212+ </list>
213+ <p>and:</p>
214+ <list list-type="order">
215+ <list-item>
216+ <p>One</p>
217+ </list-item>
218+ <list-item>
219+ <p>Two</p>
220+ </list-item>
221+ <list-item>
222+ <p>Three</p>
223+ </list-item>
224+ </list>
225+ <p>Loose using tabs:</p>
226+ <list list-type="order">
227+ <list-item>
228+ <p>First</p>
229+ </list-item>
230+ <list-item>
231+ <p>Second</p>
232+ </list-item>
233+ <list-item>
234+ <p>Third</p>
235+ </list-item>
236+ </list>
237+ <p>and using spaces:</p>
238+ <list list-type="order">
239+ <list-item>
240+ <p>One</p>
241+ </list-item>
242+ <list-item>
243+ <p>Two</p>
244+ </list-item>
245+ <list-item>
246+ <p>Three</p>
247+ </list-item>
248+ </list>
249+ <p>Multiple paragraphs:</p>
250+ <list list-type="order">
251+ <list-item>
252+ <p>Item 1, graf one.</p>
253+ <p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s
254+ back.</p>
255+ </list-item>
256+ <list-item>
257+ <p>Item 2.</p>
258+ </list-item>
259+ <list-item>
260+ <p>Item 3.</p>
261+ </list-item>
262+ </list>
263+ </sec>
264+ <sec id="nested">
265+ <title>Nested</title>
266+ <list list-type="bullet">
267+ <list-item>
268+ <p>Tab</p>
269+ <list list-type="bullet">
270+ <list-item>
271+ <p>Tab</p>
272+ <list list-type="bullet">
273+ <list-item>
274+ <p>Tab</p>
275+ </list-item>
276+ </list>
277+ </list-item>
278+ </list>
279+ </list-item>
280+ </list>
281+ <p>Here’s another:</p>
282+ <list list-type="order">
283+ <list-item>
284+ <p>First</p>
285+ </list-item>
286+ <list-item>
287+ <p>Second:</p>
288+ <list list-type="bullet">
289+ <list-item>
290+ <p>Fee</p>
291+ </list-item>
292+ <list-item>
293+ <p>Fie</p>
294+ </list-item>
295+ <list-item>
296+ <p>Foe</p>
297+ </list-item>
298+ </list>
299+ </list-item>
300+ <list-item>
301+ <p>Third</p>
302+ </list-item>
303+ </list>
304+ <p>Same thing but with paragraphs:</p>
305+ <list list-type="order">
306+ <list-item>
307+ <p>First</p>
308+ </list-item>
309+ <list-item>
310+ <p>Second:</p>
311+ <list list-type="bullet">
312+ <list-item>
313+ <p>Fee</p>
314+ </list-item>
315+ <list-item>
316+ <p>Fie</p>
317+ </list-item>
318+ <list-item>
319+ <p>Foe</p>
320+ </list-item>
321+ </list>
322+ </list-item>
323+ <list-item>
324+ <p>Third</p>
325+ </list-item>
326+ </list>
327+ </sec>
328+ <sec id="tabs-and-spaces">
329+ <title>Tabs and spaces</title>
330+ <list list-type="bullet">
331+ <list-item>
332+ <p>this is a list item indented with tabs</p>
333+ </list-item>
334+ <list-item>
335+ <p>this is a list item indented with spaces</p>
336+ <list list-type="bullet">
337+ <list-item>
338+ <p>this is an example list item indented with tabs</p>
339+ </list-item>
340+ <list-item>
341+ <p>this is an example list item indented with spaces</p>
342+ </list-item>
343+ </list>
344+ </list-item>
345+ </list>
346+ </sec>
347+ <sec id="fancy-list-markers">
348+ <title>Fancy list markers</title>
349+ <list list-type="order">
350+ <list-item>
351+ <label>(2)</label>
352+ <p>begins with 2</p>
353+ </list-item>
354+ <list-item>
355+ <label>(3)</label>
356+ <p>and now 3</p>
357+ <p>with a continuation</p>
358+ <list list-type="roman-lower">
359+ <list-item>
360+ <label>iv.</label>
361+ <p>sublist with roman numerals, starting with 4</p>
362+ </list-item>
363+ <list-item>
364+ <label>v.</label>
365+ <p>more items</p>
366+ <list list-type="alpha-upper">
367+ <list-item>
368+ <label>(A)</label>
369+ <p>a subsublist</p>
370+ </list-item>
371+ <list-item>
372+ <label>(B)</label>
373+ <p>a subsublist</p>
374+ </list-item>
375+ </list>
376+ </list-item>
377+ </list>
378+ </list-item>
379+ </list>
380+ <p>Nesting:</p>
381+ <list list-type="alpha-upper">
382+ <list-item>
383+ <p>Upper Alpha</p>
384+ <list list-type="roman-upper">
385+ <list-item>
386+ <p>Upper Roman.</p>
387+ <list list-type="order">
388+ <list-item>
389+ <label>(6)</label>
390+ <p>Decimal start with 6</p>
391+ <list list-type="alpha-lower">
392+ <list-item>
393+ <label>c)</label>
394+ <p>Lower alpha with paren</p>
395+ </list-item>
396+ </list>
397+ </list-item>
398+ </list>
399+ </list-item>
400+ </list>
401+ </list-item>
402+ </list>
403+ <p>Autonumbering:</p>
404+ <list list-type="order">
405+ <list-item>
406+ <p>Autonumber.</p>
407+ </list-item>
408+ <list-item>
409+ <p>More.</p>
410+ <list list-type="order">
411+ <list-item>
412+ <p>Nested.</p>
413+ </list-item>
414+ </list>
415+ </list-item>
416+ </list>
417+ <p>Should not be a list item:</p>
418+ <p>M.A. 2007</p>
419+ <p>B. Williams</p>
420+ </sec>
421+</sec>
422+<sec id="definition-lists">
423+ <title>Definition Lists</title>
424+ <p>Tight using spaces:</p>
425+ <def-list>
426+ <def-item>
427+ <term>apple</term>
428+ <def>
429+ <p>red fruit</p>
430+ </def>
431+ </def-item>
432+ <def-item>
433+ <term>orange</term>
434+ <def>
435+ <p>orange fruit</p>
436+ </def>
437+ </def-item>
438+ <def-item>
439+ <term>banana</term>
440+ <def>
441+ <p>yellow fruit</p>
442+ </def>
443+ </def-item>
444+ </def-list>
445+ <p>Tight using tabs:</p>
446+ <def-list>
447+ <def-item>
448+ <term>apple</term>
449+ <def>
450+ <p>red fruit</p>
451+ </def>
452+ </def-item>
453+ <def-item>
454+ <term>orange</term>
455+ <def>
456+ <p>orange fruit</p>
457+ </def>
458+ </def-item>
459+ <def-item>
460+ <term>banana</term>
461+ <def>
462+ <p>yellow fruit</p>
463+ </def>
464+ </def-item>
465+ </def-list>
466+ <p>Loose:</p>
467+ <def-list>
468+ <def-item>
469+ <term>apple</term>
470+ <def>
471+ <p>red fruit</p>
472+ </def>
473+ </def-item>
474+ <def-item>
475+ <term>orange</term>
476+ <def>
477+ <p>orange fruit</p>
478+ </def>
479+ </def-item>
480+ <def-item>
481+ <term>banana</term>
482+ <def>
483+ <p>yellow fruit</p>
484+ </def>
485+ </def-item>
486+ </def-list>
487+ <p>Multiple blocks with italics:</p>
488+ <def-list>
489+ <def-item>
490+ <term><italic>apple</italic></term>
491+ <def>
492+ <p>red fruit</p>
493+ <p>contains seeds, crisp, pleasant to taste</p>
494+ </def>
495+ </def-item>
496+ <def-item>
497+ <term><italic>orange</italic></term>
498+ <def>
499+ <p>orange fruit</p>
500+ <p specific-use="wrapper">
501+ <preformat>{ orange code block }</preformat>
502+ </p>
503+ <p specific-use="wrapper">
504+ <disp-quote>
505+ <p>orange block quote</p>
506+ </disp-quote>
507+ </p>
508+ </def>
509+ </def-item>
510+ </def-list>
511+ <p>Multiple definitions, tight:</p>
512+ <def-list>
513+ <def-item>
514+ <term>apple</term>
515+ <def>
516+ <p>red fruit</p>
517+ <p>computer</p>
518+ </def>
519+ </def-item>
520+ <def-item>
521+ <term>orange</term>
522+ <def>
523+ <p>orange fruit</p>
524+ <p>bank</p>
525+ </def>
526+ </def-item>
527+ </def-list>
528+ <p>Multiple definitions, loose:</p>
529+ <def-list>
530+ <def-item>
531+ <term>apple</term>
532+ <def>
533+ <p>red fruit</p>
534+ <p>computer</p>
535+ </def>
536+ </def-item>
537+ <def-item>
538+ <term>orange</term>
539+ <def>
540+ <p>orange fruit</p>
541+ <p>bank</p>
542+ </def>
543+ </def-item>
544+ </def-list>
545+ <p>Blank line after term, indented marker, alternate markers:</p>
546+ <def-list>
547+ <def-item>
548+ <term>apple</term>
549+ <def>
550+ <p>red fruit</p>
551+ <p>computer</p>
552+ </def>
553+ </def-item>
554+ <def-item>
555+ <term>orange</term>
556+ <def>
557+ <p>orange fruit</p>
558+ <p specific-use="wrapper">
559+ <list list-type="order">
560+ <list-item>
561+ <p>sublist</p>
562+ </list-item>
563+ <list-item>
564+ <p>sublist</p>
565+ </list-item>
566+ </list>
567+ </p>
568+ </def>
569+ </def-item>
570+ </def-list>
571+</sec>
572+<sec id="html-blocks">
573+ <title>HTML Blocks</title>
574+ <p>Simple block on one line:</p>
575+ <boxed-text>
576+ <p>foo</p>
577+ </boxed-text>
578+ <p>And nested without indentation:</p>
579+ <boxed-text>
580+ <boxed-text>
581+ <boxed-text>
582+ <p>foo</p>
583+ </boxed-text>
584+ </boxed-text>
585+ <boxed-text>
586+ <p>bar</p>
587+ </boxed-text>
588+ </boxed-text>
589+ <p>Interpreted markdown in a table:</p>
590+ <p>This is <italic>emphasized</italic></p>
591+ <p>And this is <bold>strong</bold></p>
592+ <p>Here’s a simple block:</p>
593+ <boxed-text>
594+ <p>foo</p>
595+ </boxed-text>
596+ <p>This should be a code block, though:</p>
597+ <preformat>&lt;div&gt;
598+ foo
599+&lt;/div&gt;</preformat>
600+ <p>As should this:</p>
601+ <preformat>&lt;div&gt;foo&lt;/div&gt;</preformat>
602+ <p>Now, nested:</p>
603+ <boxed-text>
604+ <boxed-text>
605+ <boxed-text>
606+ <p>foo</p>
607+ </boxed-text>
608+ </boxed-text>
609+ </boxed-text>
610+ <p>This should just be an HTML comment:</p>
611+ <p>Multiline:</p>
612+ <p>Code block:</p>
613+ <preformat>&lt;!-- Comment --&gt;</preformat>
614+ <p>Just plain comment, with trailing spaces on the line:</p>
615+ <p>Code:</p>
616+ <preformat>&lt;hr /&gt;</preformat>
617+ <p>Hr’s:</p>
618+</sec>
619+<sec id="inline-markup">
620+ <title>Inline Markup</title>
621+ <p>This is <italic>emphasized</italic>, and so <italic>is this</italic>.</p>
622+ <p>This is <bold>strong</bold>, and so <bold>is this</bold>.</p>
623+ <p>An <italic><ext-link ext-link-type="uri" xlink:href="/url">emphasized
624+ link</ext-link></italic>.</p>
625+ <p><bold><italic>This is strong and em.</italic></bold></p>
626+ <p>So is <bold><italic>this</italic></bold> word.</p>
627+ <p><bold><italic>This is strong and em.</italic></bold></p>
628+ <p>So is <bold><italic>this</italic></bold> word.</p>
629+ <p>This is code: <monospace>&gt;</monospace>, <monospace>$</monospace>,
630+ <monospace>\</monospace>, <monospace>\$</monospace>,
631+ <monospace>&lt;html&gt;</monospace>.</p>
632+ <p><strike>This is <italic>strikeout</italic>.</strike></p>
633+ <p>Superscripts: a<sup>bc</sup>d a<sup><italic>hello</italic></sup>
634+ a<sup>hello there</sup>.</p>
635+ <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O,
636+ H<sub>many of them</sub>O.</p>
637+ <p>These should not be superscripts or subscripts, because of the unescaped
638+ spaces: a^b c^d, a~b c~d.</p>
639+</sec>
640+<sec id="smart-quotes-ellipses-dashes">
641+ <title>Smart quotes, ellipses, dashes</title>
642+ <p>“Hello,” said the spider. “‘Shelob’ is my name.”</p>
643+ <p>‘A’, ‘B’, and ‘C’ are letters.</p>
644+ <p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’</p>
645+ <p>‘He said, “I want to go.”’ Were you alive in the 70’s?</p>
646+ <p>Here is some quoted ‘<monospace>code</monospace>’ and a
647+ “<ext-link ext-link-type="uri" xlink:href="http://example.com/?foo=1&amp;bar=2">quoted
648+ link</ext-link>”.</p>
649+ <p>Some dashes: one—two — three—four — five.</p>
650+ <p>Dashes between numbers: 5–7, 255–66, 1987–1999.</p>
651+ <p>Ellipses…and…and….</p>
652+</sec>
653+<sec id="latex">
654+ <title>LaTeX</title>
655+ <list list-type="bullet">
656+ <list-item>
657+ <p></p>
658+ </list-item>
659+ <list-item>
660+ <p><inline-formula><alternatives>
661+ <tex-math><![CDATA[2+2=4]]></tex-math>
662+ <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mn>2</mml:mn><mml:mo>+</mml:mo><mml:mn>2</mml:mn><mml:mo>=</mml:mo><mml:mn>4</mml:mn></mml:mrow></mml:math></alternatives></inline-formula></p>
663+ </list-item>
664+ <list-item>
665+ <p><inline-formula><alternatives>
666+ <tex-math><![CDATA[x \in y]]></tex-math>
667+ <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:mi>y</mml:mi></mml:mrow></mml:math></alternatives></inline-formula></p>
668+ </list-item>
669+ <list-item>
670+ <p><inline-formula><alternatives>
671+ <tex-math><![CDATA[\alpha \wedge \omega]]></tex-math>
672+ <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>α</mml:mi><mml:mo>∧</mml:mo><mml:mi>ω</mml:mi></mml:mrow></mml:math></alternatives></inline-formula></p>
673+ </list-item>
674+ <list-item>
675+ <p><inline-formula><alternatives>
676+ <tex-math><![CDATA[223]]></tex-math>
677+ <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mn>223</mml:mn></mml:math></alternatives></inline-formula></p>
678+ </list-item>
679+ <list-item>
680+ <p><inline-formula><alternatives>
681+ <tex-math><![CDATA[p]]></tex-math>
682+ <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>p</mml:mi></mml:math></alternatives></inline-formula>-Tree</p>
683+ </list-item>
684+ <list-item>
685+ <p>Here’s some display math: <disp-formula><alternatives>
686+ <tex-math><![CDATA[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}]]></tex-math>
687+ <mml:math display="block" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mfrac><mml:mi>d</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:mfrac><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mo>lim</mml:mo><mml:mrow><mml:mi>h</mml:mi><mml:mo>→</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:munder><mml:mfrac><mml:mrow><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false" form="postfix">)</mml:mo></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></alternatives></disp-formula></p>
688+ </list-item>
689+ <list-item>
690+ <p>Here’s one that has a line break in it:
691+ <inline-formula><alternatives>
692+ <tex-math><![CDATA[\alpha + \omega \times x^2]]></tex-math>
693+ <mml:math display="inline" xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>α</mml:mi><mml:mo>+</mml:mo><mml:mi>ω</mml:mi><mml:mo>×</mml:mo><mml:msup><mml:mi>x</mml:mi><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:math></alternatives></inline-formula>.</p>
694+ </list-item>
695+ </list>
696+ <p>These shouldn’t be math:</p>
697+ <list list-type="bullet">
698+ <list-item>
699+ <p>To get the famous equation, write
700+ <monospace>$e = mc^2$</monospace>.</p>
701+ </list-item>
702+ <list-item>
703+ <p>$22,000 is a <italic>lot</italic> of money. So is $34,000. (It worked
704+ if “lot” is emphasized.)</p>
705+ </list-item>
706+ <list-item>
707+ <p>Shoes ($20) and socks ($5).</p>
708+ </list-item>
709+ <list-item>
710+ <p>Escaped <monospace>$</monospace>: $73 <italic>this should be
711+ emphasized</italic> 23$.</p>
712+ </list-item>
713+ </list>
714+ <p>Here’s a LaTeX table:</p>
715+</sec>
716+<sec id="special-characters">
717+ <title>Special Characters</title>
718+ <p>Here is some unicode:</p>
719+ <list list-type="bullet">
720+ <list-item>
721+ <p>I hat: Î</p>
722+ </list-item>
723+ <list-item>
724+ <p>o umlaut: ö</p>
725+ </list-item>
726+ <list-item>
727+ <p>section: §</p>
728+ </list-item>
729+ <list-item>
730+ <p>set membership: ∈</p>
731+ </list-item>
732+ <list-item>
733+ <p>copyright: ©</p>
734+ </list-item>
735+ </list>
736+ <p>AT&amp;T has an ampersand in their name.</p>
737+ <p>AT&amp;T is another way to write it.</p>
738+ <p>This &amp; that.</p>
739+ <p>4 &lt; 5.</p>
740+ <p>6 &gt; 5.</p>
741+ <p>Backslash: \</p>
742+ <p>Backtick: `</p>
743+ <p>Asterisk: *</p>
744+ <p>Underscore: _</p>
745+ <p>Left brace: {</p>
746+ <p>Right brace: }</p>
747+ <p>Left bracket: [</p>
748+ <p>Right bracket: ]</p>
749+ <p>Left paren: (</p>
750+ <p>Right paren: )</p>
751+ <p>Greater-than: &gt;</p>
752+ <p>Hash: #</p>
753+ <p>Period: .</p>
754+ <p>Bang: !</p>
755+ <p>Plus: +</p>
756+ <p>Minus: -</p>
757+</sec>
758+<sec id="links">
759+ <title>Links</title>
760+ <sec id="explicit">
761+ <title>Explicit</title>
762+ <p>Just a
763+ <ext-link ext-link-type="uri" xlink:href="/url/">URL</ext-link>.</p>
764+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title">URL
765+ and title</ext-link>.</p>
766+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title preceded by two spaces">URL
767+ and title</ext-link>.</p>
768+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title preceded by a tab">URL
769+ and title</ext-link>.</p>
770+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title with &quot;quotes&quot; in it">URL
771+ and title</ext-link></p>
772+ <p><ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="title with single quotes">URL
773+ and title</ext-link></p>
774+ <p><ext-link ext-link-type="uri" xlink:href="/url/with_underscore">with_underscore</ext-link></p>
775+ <p><ext-link ext-link-type="uri" xlink:href="mailto:nobody@nowhere.net">Email
776+ link</ext-link></p>
777+ <p><ext-link ext-link-type="uri" xlink:href="">Empty</ext-link>.</p>
778+ </sec>
779+ <sec id="reference">
780+ <title>Reference</title>
781+ <p>Foo
782+ <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
783+ <p>With <ext-link ext-link-type="uri" xlink:href="/url/">embedded
784+ [brackets]</ext-link>.</p>
785+ <p><ext-link ext-link-type="uri" xlink:href="/url/">b</ext-link> by itself
786+ should be a link.</p>
787+ <p>Indented
788+ <ext-link ext-link-type="uri" xlink:href="/url">once</ext-link>.</p>
789+ <p>Indented
790+ <ext-link ext-link-type="uri" xlink:href="/url">twice</ext-link>.</p>
791+ <p>Indented
792+ <ext-link ext-link-type="uri" xlink:href="/url">thrice</ext-link>.</p>
793+ <p>This should [not][] be a link.</p>
794+ <preformat>[not]: /url</preformat>
795+ <p>Foo
796+ <ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="Title with &quot;quotes&quot; inside">bar</ext-link>.</p>
797+ <p>Foo
798+ <ext-link ext-link-type="uri" xlink:href="/url/" xlink:title="Title with &quot;quote&quot; inside">biz</ext-link>.</p>
799+ </sec>
800+ <sec id="with-ampersands">
801+ <title>With ampersands</title>
802+ <p>Here’s a
803+ <ext-link ext-link-type="uri" xlink:href="http://example.com/?foo=1&amp;bar=2">link
804+ with an ampersand in the URL</ext-link>.</p>
805+ <p>Here’s a link with an amersand in the link text:
806+ <ext-link ext-link-type="uri" xlink:href="http://att.com/" xlink:title="AT&amp;T">AT&amp;T</ext-link>.</p>
807+ <p>Here’s an
808+ <ext-link ext-link-type="uri" xlink:href="/script?foo=1&amp;bar=2">inline
809+ link</ext-link>.</p>
810+ <p>Here’s an
811+ <ext-link ext-link-type="uri" xlink:href="/script?foo=1&amp;bar=2">inline
812+ link in pointy braces</ext-link>.</p>
813+ </sec>
814+ <sec id="autolinks">
815+ <title>Autolinks</title>
816+ <p>With an ampersand:
817+ <ext-link ext-link-type="uri" xlink:href="http://example.com/?foo=1&amp;bar=2">http://example.com/?foo=1&amp;bar=2</ext-link></p>
818+ <list list-type="bullet">
819+ <list-item>
820+ <p>In a list?</p>
821+ </list-item>
822+ <list-item>
823+ <p><ext-link ext-link-type="uri" xlink:href="http://example.com/">http://example.com/</ext-link></p>
824+ </list-item>
825+ <list-item>
826+ <p>It should.</p>
827+ </list-item>
828+ </list>
829+ <p>An e-mail address: <email>nobody@nowhere.net</email></p>
830+ <disp-quote>
831+ <p>Blockquoted:
832+ <ext-link ext-link-type="uri" xlink:href="http://example.com/">http://example.com/</ext-link></p>
833+ </disp-quote>
834+ <p>Auto-links should not occur here:
835+ <monospace>&lt;http://example.com/&gt;</monospace></p>
836+ <preformat>or here: &lt;http://example.com/&gt;</preformat>
837+ </sec>
838+</sec>
839+<sec id="images">
840+ <title>Images</title>
841+ <p>From “Voyage dans la Lune” by Georges Melies (1902):</p>
842+ <fig>
843+ <caption><p>lalune</p></caption>
844+ <graphic mimetype="image" mime-subtype="jpeg" xlink:href="lalune.jpg" xlink:title="Voyage dans la Lune" />
845+ </fig>
846+ <p>Here is a movie
847+ <inline-graphic mimetype="image" mime-subtype="jpeg" xlink:href="movie.jpg" />
848+ icon.</p>
849+</sec>
850+<sec id="footnotes">
851+ <title>Footnotes</title>
852+ <p>Here is a footnote reference,<xref ref-type="fn" rid="fn1">1</xref> and
853+ another.<xref ref-type="fn" rid="fn2">2</xref> This should
854+ <italic>not</italic> be a footnote reference, because it contains a
855+ space.[^my note] Here is an inline
856+ note.<xref ref-type="fn" rid="fn3">3</xref></p>
857+ <disp-quote>
858+ <p>Notes can go in quotes.<xref ref-type="fn" rid="fn4">4</xref></p>
859+ </disp-quote>
860+ <list list-type="order">
861+ <list-item>
862+ <p>And in list items.<xref ref-type="fn" rid="fn5">5</xref></p>
863+ </list-item>
864+ </list>
865+ <p>This paragraph should not be part of the note, as it is not indented.</p>
866+</sec>
867+</body>
868+<back>
869+<fn-group>
870+ <fn id="fn1">
871+ <p>Here is the footnote. It can go anywhere after the footnote reference.
872+ It need not be placed at the end of the document.</p>
873+ </fn>
874+ <fn id="fn2">
875+ <p>Here’s the long note. This one contains multiple blocks.</p>
876+ <p>Subsequent blocks are indented to show that they belong to the footnote
877+ (as with list items).</p>
878+ <p specific-use="wrapper">
879+ <preformat> { &lt;code&gt; }</preformat>
880+ </p>
881+ <p>If you want, you can indent every line, but you can also be lazy and
882+ just indent the first line of each block.</p>
883+ </fn>
884+ <fn id="fn3">
885+ <p>This is <italic>easier</italic> to type. Inline notes may contain
886+ <ext-link ext-link-type="uri" xlink:href="http://google.com">links</ext-link>
887+ and <monospace>]</monospace> verbatim characters, as well as [bracketed
888+ text].</p>
889+ </fn>
890+ <fn id="fn4">
891+ <p>In quote.</p>
892+ </fn>
893+ <fn id="fn5">
894+ <p>In list.</p>
895+ </fn>
896+</fn-group>
897+</back>
898+</article>