aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2021-12-29 15:00:59 +0200
committerIgor Pashev <pashev.igor@gmail.com>2021-12-29 15:00:59 +0200
commitb4361712899fd0183fea5513180cb383979616de (patch)
tree688ab7ee2ab3a8cd32b4e37b506099aec95388f7
parent726ad97faebe59e024d68d293e663c02bbe423c8 (diff)
parentd960282b105a6469c760b4308a3b81da723b7256 (diff)
downloadpandoc-b4361712899fd0183fea5513180cb383979616de.tar.gz
Merge https://github.com/jgm/pandoc
-rw-r--r--.hlint.yaml1
-rw-r--r--AUTHORS.md62
-rw-r--r--MANUAL.txt356
-rw-r--r--README.md2
-rw-r--r--RELEASE-CHECKLIST2
-rw-r--r--cabal.project15
-rw-r--r--changelog.md1059
-rw-r--r--data/bash_completion.tpl12
-rw-r--r--data/creole.lua190
-rw-r--r--data/pandoc.List.lua142
-rw-r--r--data/pandoc.lua1169
-rw-r--r--data/pptx/ppt/slideMasters/slideMaster1.xml2
-rw-r--r--data/sample.lua20
-rw-r--r--data/templates/affiliations.jats44
-rw-r--r--data/templates/article.jats_publishing17
-rw-r--r--data/templates/default.jats_articleauthoring12
-rw-r--r--data/templates/default.latex39
-rw-r--r--data/templates/default.markua21
-rw-r--r--data/templates/default.revealjs5
-rw-r--r--data/templates/default.rtf2
-rw-r--r--doc/custom-readers.md684
-rw-r--r--doc/custom-writers.md52
-rw-r--r--doc/faqs.md8
-rw-r--r--doc/filters.md18
-rw-r--r--doc/getting-started.md1
-rw-r--r--doc/jats.md36
-rw-r--r--doc/lua-filters.md743
-rw-r--r--doc/short-guide-to-pandocs-sources.md259
-rw-r--r--man/pandoc.1493
-rw-r--r--pandoc.cabal200
-rw-r--r--prelude/Prelude.hs15
-rw-r--r--shell.nix1
-rw-r--r--src/Text/Pandoc/App.hs274
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs25
-rw-r--r--src/Text/Pandoc/App/FormatHeuristics.hs2
-rw-r--r--src/Text/Pandoc/App/Opt.hs321
-rw-r--r--src/Text/Pandoc/App/OutputSettings.hs33
-rw-r--r--src/Text/Pandoc/Citeproc.hs129
-rw-r--r--src/Text/Pandoc/Citeproc/BibTeX.hs81
-rw-r--r--src/Text/Pandoc/Citeproc/CslJson.hs1
-rw-r--r--src/Text/Pandoc/Citeproc/Locator.hs78
-rw-r--r--src/Text/Pandoc/Citeproc/Util.hs14
-rw-r--r--src/Text/Pandoc/Class.hs2
-rw-r--r--src/Text/Pandoc/Class/IO.hs6
-rw-r--r--src/Text/Pandoc/Class/PandocIO.hs7
-rw-r--r--src/Text/Pandoc/Class/PandocMonad.hs7
-rw-r--r--src/Text/Pandoc/Class/PandocPure.hs4
-rw-r--r--src/Text/Pandoc/Class/Sandbox.hs50
-rw-r--r--src/Text/Pandoc/Error.hs30
-rw-r--r--src/Text/Pandoc/Extensions.hs84
-rw-r--r--src/Text/Pandoc/Filter.hs30
-rw-r--r--src/Text/Pandoc/Filter/Lua.hs11
-rw-r--r--src/Text/Pandoc/Image.hs15
-rw-r--r--src/Text/Pandoc/Logging.hs21
-rw-r--r--src/Text/Pandoc/Lua.hs2
-rw-r--r--src/Text/Pandoc/Lua/ErrorConversion.hs73
-rw-r--r--src/Text/Pandoc/Lua/Filter.hs252
-rw-r--r--src/Text/Pandoc/Lua/Global.hs52
-rw-r--r--src/Text/Pandoc/Lua/Init.hs134
-rw-r--r--src/Text/Pandoc/Lua/Marshal/CommonState.hs70
-rw-r--r--src/Text/Pandoc/Lua/Marshal/Context.hs (renamed from src/Text/Pandoc/Lua/Marshaling/Context.hs)6
-rw-r--r--src/Text/Pandoc/Lua/Marshal/PandocError.hs51
-rw-r--r--src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs133
-rw-r--r--src/Text/Pandoc/Lua/Marshal/Reference.hs107
-rw-r--r--src/Text/Pandoc/Lua/Marshal/Sources.hs46
-rw-r--r--src/Text/Pandoc/Lua/Marshaling.hs19
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/AST.hs378
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/AnyValue.hs24
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/CommonState.hs102
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/List.hs43
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/MediaBag.hs73
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/PandocError.hs65
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs79
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/SimpleTable.hs59
-rw-r--r--src/Text/Pandoc/Lua/Marshaling/Version.hs154
-rw-r--r--src/Text/Pandoc/Lua/Module/MediaBag.hs157
-rw-r--r--src/Text/Pandoc/Lua/Module/Pandoc.hs285
-rw-r--r--src/Text/Pandoc/Lua/Module/System.hs41
-rw-r--r--src/Text/Pandoc/Lua/Module/Types.hs84
-rw-r--r--src/Text/Pandoc/Lua/Module/Utils.hs293
-rw-r--r--src/Text/Pandoc/Lua/Orphans.hs116
-rw-r--r--src/Text/Pandoc/Lua/Packages.hs45
-rw-r--r--src/Text/Pandoc/Lua/PandocLua.hs62
-rw-r--r--src/Text/Pandoc/Lua/Util.hs117
-rw-r--r--src/Text/Pandoc/Lua/Walk.hs158
-rw-r--r--src/Text/Pandoc/MIME.hs2
-rw-r--r--src/Text/Pandoc/MediaBag.hs2
-rw-r--r--src/Text/Pandoc/Network/HTTP.hs18
-rw-r--r--src/Text/Pandoc/Options.hs225
-rw-r--r--src/Text/Pandoc/PDF.hs173
-rw-r--r--src/Text/Pandoc/Parsing.hs2
-rw-r--r--src/Text/Pandoc/Readers.hs3
-rw-r--r--src/Text/Pandoc/Readers/Custom.hs83
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs57
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs88
-rw-r--r--src/Text/Pandoc/Readers/Docx/Fields.hs25
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse.hs289
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse/Styles.hs25
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs16
-rw-r--r--src/Text/Pandoc/Readers/HTML/Parsing.hs17
-rw-r--r--src/Text/Pandoc/Readers/HTML/Table.hs13
-rw-r--r--src/Text/Pandoc/Readers/Ipynb.hs44
-rw-r--r--src/Text/Pandoc/Readers/JATS.hs15
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs47
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Inline.hs10
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Macro.hs117
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Math.hs14
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Parsing.hs79
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/SIunitx.hs6
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Table.hs4
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Types.hs6
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs108
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs9
-rw-r--r--src/Text/Pandoc/Readers/Metadata.hs167
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs24
-rw-r--r--src/Text/Pandoc/Readers/Org/DocumentTree.hs12
-rw-r--r--src/Text/Pandoc/Readers/Org/Inlines.hs314
-rw-r--r--src/Text/Pandoc/Readers/Org/Meta.hs4
-rw-r--r--src/Text/Pandoc/Readers/RST.hs38
-rw-r--r--src/Text/Pandoc/Readers/RTF.hs1351
-rw-r--r--src/Text/Pandoc/SelfContained.hs24
-rw-r--r--src/Text/Pandoc/Shared.hs47
-rw-r--r--src/Text/Pandoc/Translations.hs35
-rw-r--r--src/Text/Pandoc/UTF8.hs8
-rw-r--r--src/Text/Pandoc/Writers.hs2
-rw-r--r--src/Text/Pandoc/Writers/AsciiDoc.hs24
-rw-r--r--src/Text/Pandoc/Writers/Blaze.hs139
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs5
-rw-r--r--src/Text/Pandoc/Writers/Custom.hs160
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs5
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs86
-rw-r--r--src/Text/Pandoc/Writers/Docx/Table.hs18
-rw-r--r--src/Text/Pandoc/Writers/DokuWiki.hs4
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs47
-rw-r--r--src/Text/Pandoc/Writers/FB2.hs9
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs374
-rw-r--r--src/Text/Pandoc/Writers/Haddock.hs3
-rw-r--r--src/Text/Pandoc/Writers/ICML.hs6
-rw-r--r--src/Text/Pandoc/Writers/Ipynb.hs71
-rw-r--r--src/Text/Pandoc/Writers/JATS.hs5
-rw-r--r--src/Text/Pandoc/Writers/JATS/References.hs1
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs76
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Lang.hs53
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Table.hs2
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Util.hs14
-rw-r--r--src/Text/Pandoc/Writers/Man.hs7
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs122
-rw-r--r--src/Text/Pandoc/Writers/Markdown/Inline.hs278
-rw-r--r--src/Text/Pandoc/Writers/Markdown/Types.hs3
-rw-r--r--src/Text/Pandoc/Writers/MediaWiki.hs13
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs31
-rw-r--r--src/Text/Pandoc/Writers/Native.hs84
-rw-r--r--src/Text/Pandoc/Writers/OpenDocument.hs5
-rw-r--r--src/Text/Pandoc/Writers/Org.hs158
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint/Output.hs1385
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint/Presentation.hs364
-rw-r--r--src/Text/Pandoc/Writers/RST.hs41
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs10
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs50
-rw-r--r--src/Text/Pandoc/Writers/Texinfo.hs3
-rw-r--r--src/Text/Pandoc/Writers/Textile.hs4
-rw-r--r--src/Text/Pandoc/Writers/ZimWiki.hs4
-rw-r--r--test/Tests/Command.hs16
-rw-r--r--test/Tests/Helpers.hs23
-rw-r--r--test/Tests/Lua.hs101
-rw-r--r--test/Tests/Lua/Module.hs2
-rw-r--r--test/Tests/Old.hs20
-rw-r--r--test/Tests/Readers/Docx.hs16
-rw-r--r--test/Tests/Readers/FB2.hs2
-rw-r--r--test/Tests/Readers/Markdown.hs48
-rw-r--r--test/Tests/Readers/Org/Inline/Citation.hs87
-rw-r--r--test/Tests/Readers/Org/Meta.hs2
-rw-r--r--test/Tests/Readers/RST.hs9
-rw-r--r--test/Tests/Readers/RTF.hs42
-rw-r--r--test/Tests/Shared.hs16
-rw-r--r--test/Tests/Writers/AsciiDoc.hs16
-rw-r--r--test/Tests/Writers/Docx.hs3
-rw-r--r--test/Tests/Writers/HTML.hs120
-rw-r--r--test/Tests/Writers/JATS.hs48
-rw-r--r--test/Tests/Writers/Markua.hs40
-rw-r--r--test/Tests/Writers/OOXML.hs78
-rw-r--r--test/Tests/Writers/Powerpoint.hs322
-rw-r--r--test/command/1279.md2
-rw-r--r--test/command/1390.md8
-rw-r--r--test/command/1592.md46
-rw-r--r--test/command/1608.md184
-rw-r--r--test/command/168.md52
-rw-r--r--test/command/1718.md10
-rw-r--r--test/command/1773.md4
-rw-r--r--test/command/1881.md180
-rw-r--r--test/command/2103.md2
-rw-r--r--test/command/2118.md8
-rw-r--r--test/command/2549.md24
-rw-r--r--test/command/256.md34
-rw-r--r--test/command/262.md3
-rw-r--r--test/command/2649.md9
-rw-r--r--test/command/3113.md7
-rw-r--r--test/command/3123.md8
-rw-r--r--test/command/3236.md16
-rw-r--r--test/command/3257.md4
-rw-r--r--test/command/3324.md2
-rw-r--r--test/command/3348.md80
-rw-r--r--test/command/3401.md4
-rw-r--r--test/command/3407.md7
-rw-r--r--test/command/3475.md8
-rw-r--r--test/command/3510.md16
-rw-r--r--test/command/3511.md44
-rw-r--r--test/command/3516.md57
-rw-r--r--test/command/3518.md2
-rw-r--r--test/command/3523.md8
-rw-r--r--test/command/3530.md60
-rw-r--r--test/command/3533-rst-csv-tables.md299
-rw-r--r--test/command/3534.md55
-rw-r--r--test/command/3537.md12
-rw-r--r--test/command/3539.md220
-rw-r--r--test/command/3558.md7
-rw-r--r--test/command/3577.md9
-rw-r--r--test/command/3585.md25
-rw-r--r--test/command/3587.md96
-rw-r--r--test/command/3681.md48
-rw-r--r--test/command/3701.md3
-rw-r--r--test/command/3706.md114
-rw-r--r--test/command/3708.md65
-rw-r--r--test/command/3733.md8
-rw-r--r--test/command/3752.md18
-rw-r--r--test/command/3755.md34
-rw-r--r--test/command/3779.md39
-rw-r--r--test/command/3792.md2
-rw-r--r--test/command/3794.md3
-rw-r--r--test/command/3804.md5
-rw-r--r--test/command/3840.md3
-rw-r--r--test/command/3853.md8
-rw-r--r--test/command/3880.md4
-rw-r--r--test/command/3916.md12
-rw-r--r--test/command/3947.md6
-rw-r--r--test/command/3958.md6
-rw-r--r--test/command/3971.md2
-rw-r--r--test/command/3983.md18
-rw-r--r--test/command/3989.md19
-rw-r--r--test/command/4007.md12
-rw-r--r--test/command/4012.md5
-rw-r--r--test/command/4016.md2
-rw-r--r--test/command/4019.md2
-rw-r--r--test/command/4054.md15
-rw-r--r--test/command/4056.md60
-rw-r--r--test/command/4063.md45
-rw-r--r--test/command/4068.md30
-rw-r--r--test/command/4119.md75
-rw-r--r--test/command/4134.md7
-rw-r--r--test/command/4159.md5
-rw-r--r--test/command/4162.md5
-rw-r--r--test/command/4164.md2
-rw-r--r--test/command/4183.md12
-rw-r--r--test/command/4186.md8
-rw-r--r--test/command/4193.md6
-rw-r--r--test/command/4199.md5
-rw-r--r--test/command/4235.md10
-rw-r--r--test/command/4240.md21
-rw-r--r--test/command/4253.md2
-rw-r--r--test/command/4280.md2
-rw-r--r--test/command/4281.md15
-rw-r--r--test/command/4284.md88
-rw-r--r--test/command/4306.md16
-rw-r--r--test/command/4374.md15
-rw-r--r--test/command/4382.md4
-rw-r--r--test/command/4424.md2
-rw-r--r--test/command/4454.md6
-rw-r--r--test/command/4499.md4
-rw-r--r--test/command/4513.md42
-rw-r--r--test/command/4528.md2
-rw-r--r--test/command/4553.md16
-rw-r--r--test/command/4576.md2
-rw-r--r--test/command/4579.md66
-rw-r--r--test/command/4624.md13
-rw-r--r--test/command/4635.md12
-rw-r--r--test/command/4639.md2
-rw-r--r--test/command/4667.md2
-rw-r--r--test/command/4669.md20
-rw-r--r--test/command/4677.md3
-rw-r--r--test/command/4715.md19
-rw-r--r--test/command/4722.md44
-rw-r--r--test/command/4742.md39
-rw-r--r--test/command/4743.md28
-rw-r--r--test/command/4781.md28
-rw-r--r--test/command/4805-beamer-columns-alignment.md2
-rw-r--r--test/command/4811.md26
-rw-r--r--test/command/4817.md15
-rw-r--r--test/command/4819.md25
-rw-r--r--test/command/4832.md24
-rw-r--r--test/command/4833.md4
-rw-r--r--test/command/4842.md4
-rw-r--r--test/command/4845.md17
-rw-r--r--test/command/4848.md67
-rw-r--r--test/command/4860.md13
-rw-r--r--test/command/4877.md6
-rw-r--r--test/command/4919.md9
-rw-r--r--test/command/4928.md187
-rw-r--r--test/command/4933.md6
-rw-r--r--test/command/5014.md47
-rw-r--r--test/command/5050.md2
-rw-r--r--test/command/5079.md34
-rw-r--r--test/command/5080.md4
-rw-r--r--test/command/5099.md20
-rw-r--r--test/command/512.md3
-rw-r--r--test/command/5121.md3
-rw-r--r--test/command/5128.md2
-rw-r--r--test/command/5178.md23
-rw-r--r--test/command/5182.md7
-rw-r--r--test/command/5271.md33
-rw-r--r--test/command/5285.md22
-rw-r--r--test/command/5321.md14
-rw-r--r--test/command/5360.md19
-rw-r--r--test/command/5367.md2
-rw-r--r--test/command/5368.md31
-rw-r--r--test/command/5410.md2
-rw-r--r--test/command/5416.md4
-rw-r--r--test/command/5540.md8
-rw-r--r--test/command/5549.md3
-rw-r--r--test/command/5619.md29
-rw-r--r--test/command/5627.md12
-rw-r--r--test/command/5642.md3
-rw-r--r--test/command/5650.md6
-rw-r--r--test/command/5655.md10
-rw-r--r--test/command/5682.md2
-rw-r--r--test/command/5686.md26
-rw-r--r--test/command/5700.md37
-rw-r--r--test/command/5708.md45
-rw-r--r--test/command/5711.md34
-rw-r--r--test/command/5714.md11
-rw-r--r--test/command/5753.md8
-rw-r--r--test/command/5795.md7
-rw-r--r--test/command/5797.md2
-rw-r--r--test/command/5805.md2
-rw-r--r--test/command/5813.md3
-rw-r--r--test/command/5845.md15
-rw-r--r--test/command/5878.md10
-rw-r--r--test/command/5986.md5
-rw-r--r--test/command/6009.md13
-rw-r--r--test/command/6026.md30
-rw-r--r--test/command/6034.md5
-rw-r--r--test/command/6114.md8
-rw-r--r--test/command/6137.md168
-rw-r--r--test/command/6288.md4
-rw-r--r--test/command/6324.md13
-rw-r--r--test/command/6658.md2
-rw-r--r--test/command/6699.md6
-rw-r--r--test/command/6709.md4
-rw-r--r--test/command/6719.md4
-rw-r--r--test/command/6739.md3
-rw-r--r--test/command/6741.md8
-rw-r--r--test/command/6791.md45
-rw-r--r--test/command/6792.md2
-rw-r--r--test/command/6802.md5
-rw-r--r--test/command/6836.md36
-rw-r--r--test/command/6844.md6
-rw-r--r--test/command/6869.md15
-rw-r--r--test/command/6873.md30
-rw-r--r--test/command/6890.md116
-rw-r--r--test/command/6970.md12
-rw-r--r--test/command/6993.md18
-rw-r--r--test/command/7003.md29
-rw-r--r--test/command/7006.md9
-rw-r--r--test/command/7080.md11
-rw-r--r--test/command/7092.md4
-rw-r--r--test/command/7129.md66
-rw-r--r--test/command/7134.md45
-rw-r--r--test/command/7145.md62
-rw-r--r--test/command/7155.md22
-rw-r--r--test/command/7208.md2
-rw-r--r--test/command/7216.md2
-rw-r--r--test/command/7272.md2
-rw-r--r--test/command/7329.md67
-rw-r--r--test/command/7339.md8
-rw-r--r--test/command/7340.md2
-rw-r--r--test/command/7400.md3
-rw-r--r--test/command/7416.md6
-rw-r--r--test/command/7434.md14
-rw-r--r--test/command/7436.md23
-rw-r--r--test/command/7482.md47
-rw-r--r--test/command/7494.md62
-rw-r--r--test/command/7497.md37
-rw-r--r--test/command/7520.md22
-rw-r--r--test/command/7521.md11
-rw-r--r--test/command/7529.md7
-rw-r--r--test/command/7546.md6
-rw-r--r--test/command/7557.md20
-rw-r--r--test/command/7568.md16
-rw-r--r--test/command/7573.md11
-rw-r--r--test/command/7589.md72
-rw-r--r--test/command/7615.md6
-rw-r--r--test/command/7623.md12
-rw-r--r--test/command/7632.md66
-rw-r--r--test/command/7668.md36
-rw-r--r--test/command/7692.md13
-rw-r--r--test/command/7697.md27
-rw-r--r--test/command/7713.md29
-rw-r--r--test/command/7723.md8
-rw-r--r--test/command/7726.md22
-rw-r--r--test/command/7738.md6
-rw-r--r--test/command/7761.md35
-rw-r--r--test/command/853.md7
-rw-r--r--test/command/934.md36
-rw-r--r--test/command/982.md2
-rw-r--r--test/command/987.md2
-rw-r--r--test/command/adjacent_latex_blocks.md5
-rw-r--r--test/command/ascii.md14
-rw-r--r--test/command/bar-endinput.tex3
-rw-r--r--test/command/biblatex-article.md2
-rw-r--r--test/command/biblatex-gillies.md2
-rw-r--r--test/command/biblatex-shore.md2
-rw-r--r--test/command/biblatex-sigfridsson.md2
-rw-r--r--test/command/cite-in-inline-note.md22
-rw-r--r--test/command/citeproc-87.md55
-rw-r--r--test/command/citeproc-author-in-text-suffix.md30
-rw-r--r--test/command/csv.md132
-rw-r--r--test/command/docbook-bibliography.md33
-rw-r--r--test/command/dots.md7
-rw-r--r--test/command/empty_paragraphs.md30
-rw-r--r--test/command/gfm.md132
-rw-r--r--test/command/hspace.md24
-rw-r--r--test/command/html-read-figure.md30
-rw-r--r--test/command/html-trim-definition-list-terms.md14
-rw-r--r--test/command/hyphenat.md26
-rw-r--r--test/command/ifstrequal.md9
-rw-r--r--test/command/indented-fences.md6
-rw-r--r--test/command/input-with-endinput.md15
-rw-r--r--test/command/jats-figure-alt-text.md18
-rw-r--r--test/command/latex-center.md3
-rw-r--r--test/command/latex-color.md126
-rw-r--r--test/command/latex-command-comment.md4
-rw-r--r--test/command/latex-fontawesome.md4
-rw-r--r--test/command/latex-tabular-column-specs.md112
-rw-r--r--test/command/lettrine.md15
-rw-r--r--test/command/lstlisting.md23
-rw-r--r--test/command/macro-defs-in-preamble.md10
-rw-r--r--test/command/macros.md38
-rw-r--r--test/command/md-abbrevs.md5
-rw-r--r--test/command/multiple-metadata-blocks.md8
-rw-r--r--test/command/pandoc-citeproc-31.md5
-rw-r--r--test/command/pandoc-citeproc-312.md2
-rw-r--r--test/command/pandoc-citeproc-327.md4
-rw-r--r--test/command/pandoc-citeproc-338.md3
-rw-r--r--test/command/pandoc-citeproc-386.md4
-rw-r--r--test/command/refs.md242
-rw-r--r--test/command/setext-fenced-div.md3
-rw-r--r--test/command/shift-heading-level-by.md39
-rw-r--r--test/command/sloppypar.md214
-rw-r--r--test/command/table-with-cell-align.md65
-rw-r--r--test/command/table-with-column-span.md243
-rw-r--r--test/command/tabularx.md483
-rw-r--r--test/command/translations.md8
-rw-r--r--test/command/video-audio.md10
-rw-r--r--test/command/write18.md4
-rw-r--r--test/command/yaml-metadata-blocks.md78
-rw-r--r--test/command/yaml-with-chomp.md12
-rw-r--r--test/creole-reader.native1102
-rw-r--r--test/docbook-chapter.native190
-rw-r--r--test/docbook-reader.docbook21
-rw-r--r--test/docbook-reader.native3711
-rw-r--r--test/docbook-xref.native206
-rw-r--r--test/docx/0_level_headers.native6
-rw-r--r--test/docx/diagram.docxbin0 -> 22716 bytes
-rw-r--r--test/docx/diagram.native2
-rw-r--r--test/docx/empty_field.docxbin0 -> 14312 bytes
-rw-r--r--test/docx/empty_field.native7
-rw-r--r--test/docx/golden/image.docxbin26776 -> 26861 bytes
-rw-r--r--test/docx/golden/inline_images.docxbin26703 -> 26711 bytes
-rw-r--r--test/docx/golden/nested_anchors_in_header.docxbin10126 -> 10163 bytes
-rw-r--r--test/docx/image_vml.native5
-rw-r--r--test/docx/image_writer_test.native8
-rw-r--r--test/docx/nested_anchors_in_header.native8
-rw-r--r--test/docx/nested_instrText.docxbin0 -> 14112 bytes
-rw-r--r--test/docx/nested_instrText.native5
-rw-r--r--test/docx/pageref.docxbin0 -> 14431 bytes
-rw-r--r--test/docx/pageref.native4
-rw-r--r--test/docx/relative_indentation_blockquotes.docxbin0 -> 12655 bytes
-rw-r--r--test/docx/relative_indentation_blockquotes.native6
-rw-r--r--test/epub/epub2_cover.epubbin17937 -> 11794 bytes
-rw-r--r--test/epub/epub2_no_cover.epubbin9730 -> 3584 bytes
-rw-r--r--test/epub/epub2_picture.epubbin17939 -> 11742 bytes
-rw-r--r--test/epub/features.epubbin66371 -> 8970 bytes
-rw-r--r--test/epub/features.native1769
-rw-r--r--test/epub/formatting.epubbin13460 -> 14022 bytes
-rw-r--r--test/epub/formatting.native6386
-rw-r--r--test/epub/img.epubbin61768 -> 20478 bytes
-rw-r--r--test/epub/img_no_cover.epubbin50594 -> 10602 bytes
-rw-r--r--test/epub/wasteland.epubbin35496 -> 25840 bytes
-rw-r--r--test/epub/wasteland.native5489
-rw-r--r--test/fb2/reader/emphasis.native41
-rw-r--r--test/fb2/reader/epigraph.native27
-rw-r--r--test/fb2/reader/meta.native50
-rw-r--r--test/fb2/reader/notes.native32
-rw-r--r--test/fb2/reader/poem.native39
-rw-r--r--test/fb2/reader/titles.native46
-rw-r--r--test/haddock-reader.native432
-rw-r--r--test/html-reader.native4121
-rw-r--r--test/ipynb/mime.ipynb187
-rw-r--r--test/ipynb/mime.native154
-rw-r--r--test/ipynb/mime.out.ipynb169
-rw-r--r--test/ipynb/rank.ipynb60
-rw-r--r--test/ipynb/rank.out.html14
-rw-r--r--test/ipynb/simple.in.native12
-rw-r--r--test/ipynb/simple.ipynb15
-rw-r--r--test/ipynb/simple.out.native118
-rw-r--r--test/jats-reader.native3481
-rw-r--r--test/jira-reader.native1132
-rw-r--r--test/latex-reader.native2707
-rw-r--r--test/lhs-test-markdown.native132
-rw-r--r--test/lhs-test.native132
-rw-r--r--test/lua/implicit-doc-filter.lua2
-rw-r--r--test/lua/module/pandoc-types.lua25
-rw-r--r--test/lua/module/pandoc-utils.lua184
-rw-r--r--test/lua/module/pandoc.lua323
-rw-r--r--test/man-reader.native1251
-rw-r--r--test/markdown-citations.native539
-rw-r--r--test/markdown-reader-more.native1655
-rw-r--r--test/mediawiki-reader.native1849
-rw-r--r--test/opml-reader.native189
-rw-r--r--test/org-select-tags.native110
-rw-r--r--test/pipe-tables.native1253
-rw-r--r--test/pptx/background-image/input.native17
-rw-r--r--test/pptx/background-image/output.pptxbin0 -> 53318 bytes
-rw-r--r--test/pptx/background-image/templated.pptxbin0 -> 66433 bytes
-rw-r--r--test/pptx/blanks/just-speaker-notes/input.native7
-rw-r--r--test/pptx/blanks/just-speaker-notes/output.pptxbin0 -> 32227 bytes
-rw-r--r--test/pptx/blanks/just-speaker-notes/templated.pptxbin0 -> 45333 bytes
-rw-r--r--test/pptx/blanks/nbsp-in-body/input.native6
-rw-r--r--test/pptx/blanks/nbsp-in-body/output.pptx (renamed from test/pptx/code-custom.pptx)bin28184 -> 29165 bytes
-rw-r--r--test/pptx/blanks/nbsp-in-body/templated.pptx (renamed from test/pptx/slide_breaks_slide_level_1_templated.pptx)bin40858 -> 42273 bytes
-rw-r--r--test/pptx/blanks/nbsp-in-heading/input.native5
-rw-r--r--test/pptx/blanks/nbsp-in-heading/output.pptx (renamed from test/pptx/code.pptx)bin28183 -> 29165 bytes
-rw-r--r--test/pptx/blanks/nbsp-in-heading/templated.pptxbin0 -> 42273 bytes
-rw-r--r--test/pptx/code-custom/output.pptxbin0 -> 29776 bytes
-rw-r--r--test/pptx/code-custom/templated.pptx (renamed from test/pptx/slide_breaks_templated.pptx)bin41683 -> 42877 bytes
-rw-r--r--test/pptx/code/input.native (renamed from test/pptx/code.native)0
-rw-r--r--test/pptx/code/output.pptxbin0 -> 29773 bytes
-rw-r--r--test/pptx/code/templated.pptx (renamed from test/pptx/code-custom_templated.pptx)bin41337 -> 42876 bytes
-rw-r--r--test/pptx/comparison/both-columns/input.native23
-rw-r--r--test/pptx/comparison/both-columns/output.pptxbin0 -> 44530 bytes
-rw-r--r--test/pptx/comparison/both-columns/templated.pptxbin0 -> 57662 bytes
-rw-r--r--test/pptx/comparison/extra-image/input.native24
-rw-r--r--test/pptx/comparison/extra-image/output.pptxbin0 -> 44559 bytes
-rw-r--r--test/pptx/comparison/extra-image/templated.pptxbin0 -> 57688 bytes
-rw-r--r--test/pptx/comparison/extra-text/input.native23
-rw-r--r--test/pptx/comparison/extra-text/output.pptxbin0 -> 44530 bytes
-rw-r--r--test/pptx/comparison/extra-text/templated.pptxbin0 -> 57662 bytes
-rw-r--r--test/pptx/comparison/non-text-first/input.native21
-rw-r--r--test/pptx/comparison/non-text-first/output.pptxbin0 -> 44444 bytes
-rw-r--r--test/pptx/comparison/non-text-first/templated.pptxbin0 -> 57553 bytes
-rw-r--r--test/pptx/comparison/one-column/input.native21
-rw-r--r--test/pptx/comparison/one-column/output.pptxbin0 -> 27862 bytes
-rw-r--r--test/pptx/comparison/one-column/templated.pptxbin0 -> 41000 bytes
-rw-r--r--test/pptx/content-with-caption/heading-text-image/input.native3
-rw-r--r--test/pptx/content-with-caption/heading-text-image/output.pptxbin0 -> 44278 bytes
-rw-r--r--test/pptx/content-with-caption/heading-text-image/templated.pptxbin0 -> 57390 bytes
-rw-r--r--test/pptx/content-with-caption/image-text/input.native2
-rw-r--r--test/pptx/content-with-caption/image-text/output.pptxbin0 -> 44979 bytes
-rw-r--r--test/pptx/content-with-caption/image-text/templated.pptxbin0 -> 58079 bytes
-rw-r--r--test/pptx/content-with-caption/text-image/input.native2
-rw-r--r--test/pptx/content-with-caption/text-image/output.pptxbin0 -> 44218 bytes
-rw-r--r--test/pptx/content-with-caption/text-image/templated.pptxbin0 -> 57330 bytes
-rw-r--r--test/pptx/document-properties-short-desc/input.native (renamed from test/pptx/document-properties-short-desc.native)0
-rw-r--r--test/pptx/document-properties-short-desc/output.pptx (renamed from test/pptx/document-properties-short-desc.pptx)bin26967 -> 28573 bytes
-rw-r--r--test/pptx/document-properties-short-desc/templated.pptx (renamed from test/pptx/document-properties-short-desc_templated.pptx)bin40113 -> 41671 bytes
-rw-r--r--test/pptx/document-properties/input.native (renamed from test/pptx/document-properties.native)0
-rw-r--r--test/pptx/document-properties/output.pptx (renamed from test/pptx/document-properties.pptx)bin27375 -> 28976 bytes
-rw-r--r--test/pptx/document-properties/templated.pptx (renamed from test/pptx/document-properties_templated.pptx)bin40517 -> 42073 bytes
-rw-r--r--test/pptx/endnotes-toc/output.pptx (renamed from test/pptx/endnotes_toc.pptx)bin27747 -> 29363 bytes
-rw-r--r--test/pptx/endnotes-toc/templated.pptx (renamed from test/pptx/endnotes_toc_templated.pptx)bin40899 -> 42467 bytes
-rw-r--r--test/pptx/endnotes/input.native (renamed from test/pptx/endnotes.native)0
-rw-r--r--test/pptx/endnotes/output.pptx (renamed from test/pptx/endnotes.pptx)bin26928 -> 28544 bytes
-rw-r--r--test/pptx/endnotes/templated.pptx (renamed from test/pptx/endnotes_templated.pptx)bin40078 -> 41645 bytes
-rw-r--r--test/pptx/footer/basic/output.pptxbin0 -> 52727 bytes
-rw-r--r--test/pptx/footer/basic/reference.pptxbin0 -> 49063 bytes
-rw-r--r--test/pptx/footer/fixed-date/output.pptxbin0 -> 51354 bytes
-rw-r--r--test/pptx/footer/fixed-date/reference.pptxbin0 -> 47996 bytes
-rw-r--r--test/pptx/footer/higher-slide-number/output.pptxbin0 -> 52740 bytes
-rw-r--r--test/pptx/footer/higher-slide-number/reference.pptxbin0 -> 49082 bytes
-rw-r--r--test/pptx/footer/input.native66
-rw-r--r--test/pptx/footer/no-title-slide/output.pptxbin0 -> 52314 bytes
-rw-r--r--test/pptx/footer/no-title-slide/reference.pptxbin0 -> 48423 bytes
-rw-r--r--test/pptx/images/input.native (renamed from test/pptx/images.native)0
-rw-r--r--test/pptx/images/output.pptx (renamed from test/pptx/images.pptx)bin44579 -> 46195 bytes
-rw-r--r--test/pptx/images/templated.pptx (renamed from test/pptx/images_templated.pptx)bin57729 -> 59299 bytes
-rw-r--r--test/pptx/incremental-lists/with-flag/input.native139
-rw-r--r--test/pptx/incremental-lists/with-flag/output.pptxbin0 -> 77125 bytes
-rw-r--r--test/pptx/incremental-lists/with-flag/templated.pptxbin0 -> 90277 bytes
-rw-r--r--test/pptx/incremental-lists/without-flag/input.native137
-rw-r--r--test/pptx/incremental-lists/without-flag/output.pptxbin0 -> 75374 bytes
-rw-r--r--test/pptx/incremental-lists/without-flag/templated.pptxbin0 -> 88522 bytes
-rw-r--r--test/pptx/inline-formatting/input.native (renamed from test/pptx/inline_formatting.native)0
-rw-r--r--test/pptx/inline-formatting/output.pptx (renamed from test/pptx/inline_formatting.pptx)bin26121 -> 27736 bytes
-rw-r--r--test/pptx/inline-formatting/templated.pptx (renamed from test/pptx/inline_formatting_templated.pptx)bin39272 -> 40839 bytes
-rw-r--r--test/pptx/layouts/deleted.pptxbin0 -> 55694 bytes
-rw-r--r--test/pptx/layouts/input.native23
-rw-r--r--test/pptx/layouts/moved.pptxbin0 -> 66430 bytes
-rw-r--r--test/pptx/list-level/input.native20
-rw-r--r--test/pptx/list-level/output.pptx (renamed from test/pptx/lists.pptx)bin27015 -> 28632 bytes
-rw-r--r--test/pptx/list-level/templated.pptx (renamed from test/pptx/lists_templated.pptx)bin40166 -> 41735 bytes
-rw-r--r--test/pptx/lists/input.native (renamed from test/pptx/lists.native)0
-rw-r--r--test/pptx/lists/output.pptx (renamed from test/pptx/tables.pptx)bin27532 -> 28639 bytes
-rw-r--r--test/pptx/lists/templated.pptx (renamed from test/pptx/tables_templated.pptx)bin40686 -> 41742 bytes
-rw-r--r--test/pptx/pauses/without-incremental/output.pptxbin0 -> 50083 bytes
-rw-r--r--test/pptx/pauses/without-incremental/templated.pptxbin0 -> 63157 bytes
-rw-r--r--test/pptx/raw-ooxml/input.native (renamed from test/pptx/raw_ooxml.native)0
-rw-r--r--test/pptx/raw-ooxml/output.pptx (renamed from test/pptx/raw_ooxml.pptx)bin26908 -> 28524 bytes
-rw-r--r--test/pptx/raw-ooxml/templated.pptx (renamed from test/pptx/raw_ooxml_templated.pptx)bin40059 -> 41626 bytes
-rw-r--r--test/pptx/reference-deleted-layouts.pptxbin0 -> 18160 bytes
-rw-r--r--test/pptx/reference-depth.pptx (renamed from test/pptx/reference_depth.pptx)bin43743 -> 43743 bytes
-rw-r--r--test/pptx/reference-moved-layouts.pptxbin0 -> 44237 bytes
-rw-r--r--test/pptx/remove-empty-slides/input.native (renamed from test/pptx/remove_empty_slides.native)0
-rw-r--r--test/pptx/remove-empty-slides/output.pptxbin0 -> 44958 bytes
-rw-r--r--test/pptx/remove-empty-slides/templated.pptxbin0 -> 58053 bytes
-rw-r--r--test/pptx/slide-breaks-slide-level-1/output.pptx (renamed from test/pptx/slide_breaks_slide_level_1.pptx)bin27705 -> 29314 bytes
-rw-r--r--test/pptx/slide-breaks-slide-level-1/templated.pptx (renamed from test/pptx/code_templated.pptx)bin41337 -> 42422 bytes
-rw-r--r--test/pptx/slide-breaks-toc/output.pptx (renamed from test/pptx/slide_breaks_toc.pptx)bin29481 -> 31087 bytes
-rw-r--r--test/pptx/slide-breaks-toc/templated.pptx (renamed from test/pptx/slide_breaks_toc_templated.pptx)bin42634 -> 44191 bytes
-rw-r--r--test/pptx/slide-breaks/input.native (renamed from test/pptx/slide_breaks.native)0
-rw-r--r--test/pptx/slide-breaks/output.pptx (renamed from test/pptx/slide_breaks.pptx)bin28531 -> 30139 bytes
-rw-r--r--test/pptx/slide-breaks/templated.pptxbin0 -> 43244 bytes
-rw-r--r--test/pptx/slide-level-0/h1-h2-with-table/input.native14
-rw-r--r--test/pptx/slide-level-0/h1-h2-with-table/output.pptxbin0 -> 27871 bytes
-rw-r--r--test/pptx/slide-level-0/h1-h2-with-table/templated.pptxbin0 -> 40979 bytes
-rw-r--r--test/pptx/slide-level-0/h1-with-image/input.native2
-rw-r--r--test/pptx/slide-level-0/h1-with-image/output.pptx (renamed from test/pptx/remove_empty_slides.pptx)bin44025 -> 44202 bytes
-rw-r--r--test/pptx/slide-level-0/h1-with-image/templated.pptx (renamed from test/pptx/remove_empty_slides_templated.pptx)bin57172 -> 57302 bytes
-rw-r--r--test/pptx/slide-level-0/h1-with-table/input.native13
-rw-r--r--test/pptx/slide-level-0/h1-with-table/output.pptxbin0 -> 27778 bytes
-rw-r--r--test/pptx/slide-level-0/h1-with-table/templated.pptxbin0 -> 40881 bytes
-rw-r--r--test/pptx/slide-level-0/h2-with-image/input.native2
-rw-r--r--test/pptx/slide-level-0/h2-with-image/output.pptxbin0 -> 44202 bytes
-rw-r--r--test/pptx/slide-level-0/h2-with-image/templated.pptxbin0 -> 57302 bytes
-rw-r--r--test/pptx/speaker-notes-after-metadata/input.native (renamed from test/pptx/speaker_notes_after_metadata.native)0
-rw-r--r--test/pptx/speaker-notes-after-metadata/output.pptx (renamed from test/pptx/speaker_notes_after_metadata.pptx)bin31636 -> 31577 bytes
-rw-r--r--test/pptx/speaker-notes-after-metadata/templated.pptx (renamed from test/pptx/speaker_notes_after_metadata_templated.pptx)bin44775 -> 44673 bytes
-rw-r--r--test/pptx/speaker-notes-afterheader/input.native (renamed from test/pptx/speaker_notes_afterheader.native)0
-rw-r--r--test/pptx/speaker-notes-afterheader/output.pptx (renamed from test/pptx/speaker_notes_afterheader.pptx)bin30657 -> 30589 bytes
-rw-r--r--test/pptx/speaker-notes-afterheader/templated.pptx (renamed from test/pptx/speaker_notes_afterheader_templated.pptx)bin43803 -> 43693 bytes
-rw-r--r--test/pptx/speaker-notes-afterseps/input.native (renamed from test/pptx/speaker_notes_afterseps.native)0
-rw-r--r--test/pptx/speaker-notes-afterseps/output.pptx (renamed from test/pptx/speaker_notes_afterseps.pptx)bin51548 -> 51450 bytes
-rw-r--r--test/pptx/speaker-notes-afterseps/templated.pptx (renamed from test/pptx/speaker_notes_afterseps_templated.pptx)bin64695 -> 64552 bytes
-rw-r--r--test/pptx/speaker-notes/input.native (renamed from test/pptx/speaker_notes.native)0
-rw-r--r--test/pptx/speaker-notes/output.pptx (renamed from test/pptx/speaker_notes.pptx)bin35360 -> 35289 bytes
-rw-r--r--test/pptx/speaker-notes/templated.pptx (renamed from test/pptx/speaker_notes_templated.pptx)bin48507 -> 48392 bytes
-rw-r--r--test/pptx/start-numbering-at/input.native (renamed from test/pptx/start_numbering_at.native)0
-rw-r--r--test/pptx/start-numbering-at/output.pptx (renamed from test/pptx/start_numbering_at.pptx)bin26991 -> 28605 bytes
-rw-r--r--test/pptx/start-numbering-at/templated.pptx (renamed from test/pptx/start_numbering_at_templated.pptx)bin40142 -> 41707 bytes
-rw-r--r--test/pptx/tables/input.native (renamed from test/pptx/tables.native)0
-rw-r--r--test/pptx/tables/output.pptxbin0 -> 29122 bytes
-rw-r--r--test/pptx/tables/templated.pptxbin0 -> 42228 bytes
-rw-r--r--test/pptx/two-column/all-text/input.native (renamed from test/pptx/two_column.native)0
-rw-r--r--test/pptx/two-column/all-text/output.pptx (renamed from test/pptx/two_column.pptx)bin26038 -> 27649 bytes
-rw-r--r--test/pptx/two-column/all-text/templated.pptx (renamed from test/pptx/two_column_templated.pptx)bin39189 -> 40754 bytes
-rw-r--r--test/pptx/two-column/text-and-image/input.native12
-rw-r--r--test/pptx/two-column/text-and-image/output.pptxbin0 -> 45470 bytes
-rw-r--r--test/pptx/two-column/text-and-image/templated.pptxbin0 -> 58574 bytes
-rw-r--r--test/rst-reader.native2168
-rw-r--r--test/rtf/accent.native18
-rw-r--r--test/rtf/accent.rtf3
-rw-r--r--test/rtf/bookmark.native11
-rw-r--r--test/rtf/bookmark.rtf8
-rw-r--r--test/rtf/footnote.native130
-rw-r--r--test/rtf/footnote.rtf11
-rw-r--r--test/rtf/formatting.native45
-rw-r--r--test/rtf/formatting.rtf201
-rw-r--r--test/rtf/heading.native10
-rw-r--r--test/rtf/heading.rtf223
-rw-r--r--test/rtf/image.native12
-rw-r--r--test/rtf/image.rtf6
-rw-r--r--test/rtf/link.native9
-rw-r--r--test/rtf/link.rtf7
-rw-r--r--test/rtf/list_complex.native64
-rw-r--r--test/rtf/list_complex.rtf299
-rw-r--r--test/rtf/list_simple.native10
-rw-r--r--test/rtf/list_simple.rtf17
-rw-r--r--test/rtf/table_error_codes.native422
-rw-r--r--test/rtf/table_error_codes.rtf300
-rw-r--r--test/rtf/table_simple.native73
-rw-r--r--test/rtf/table_simple.rtf19
-rw-r--r--test/rtf/unicode.native3
-rw-r--r--test/rtf/unicode.rtf9
-rw-r--r--test/s5-basic.html3
-rw-r--r--test/s5-fancy.html7
-rw-r--r--test/s5-fragment.html3
-rw-r--r--test/s5-inserts.html3
-rw-r--r--test/tables-rstsubset.native1274
-rw-r--r--test/tables.haddock60
-rw-r--r--test/tables.html56
-rw-r--r--test/tables.latex24
-rw-r--r--test/tables.markdown28
-rw-r--r--test/tables.markua58
-rw-r--r--test/tables.muse48
-rw-r--r--test/tables.native1257
-rw-r--r--test/tables.opendocument4
-rw-r--r--test/tables.plain28
-rw-r--r--test/tables.rst60
-rw-r--r--test/tables/nordics.latex8
-rw-r--r--test/tables/planets.latex8
-rw-r--r--test/tables/students.latex4
-rw-r--r--test/test-pandoc.hs4
-rw-r--r--test/testsuite.native2643
-rw-r--r--test/textile-reader.native1503
-rw-r--r--test/tikiwiki-reader.native987
-rw-r--r--test/twiki-reader.native1113
-rw-r--r--test/txt2tags.native6267
-rw-r--r--test/vimwiki-reader.native2878
-rw-r--r--test/writer.asciidoc12
-rw-r--r--test/writer.asciidoctor16
-rw-r--r--test/writer.context12
-rw-r--r--test/writer.custom15
-rw-r--r--test/writer.docbook432
-rw-r--r--test/writer.docbook535
-rw-r--r--test/writer.haddock43
-rw-r--r--test/writer.html4153
-rw-r--r--test/writer.html5168
-rw-r--r--test/writer.jats_archiving28
-rw-r--r--test/writer.jats_articleauthoring20
-rw-r--r--test/writer.jats_publishing28
-rw-r--r--test/writer.latex17
-rw-r--r--test/writer.man18
-rw-r--r--test/writer.markdown45
-rw-r--r--test/writer.markua700
-rw-r--r--test/writer.mediawiki31
-rw-r--r--test/writer.ms12
-rw-r--r--test/writer.muse16
-rw-r--r--test/writer.native2575
-rw-r--r--test/writer.opendocument79
-rw-r--r--test/writer.opml2
-rw-r--r--test/writer.org55
-rw-r--r--test/writer.plain38
-rw-r--r--test/writer.rst4
-rw-r--r--test/writer.rtf68
-rw-r--r--test/writer.tei22
-rw-r--r--test/writer.texinfo26
-rw-r--r--test/writers-lang-and-dir.latex56
-rw-r--r--trypandoc/trypandoc.hs6
736 files changed, 74105 insertions, 18687 deletions
diff --git a/.hlint.yaml b/.hlint.yaml
index ad0f7ddb9..177aa2e32 100644
--- a/.hlint.yaml
+++ b/.hlint.yaml
@@ -10,6 +10,7 @@
#
- ignore: {name: "Avoid lambda"}
- ignore: {name: "Use bimap"}
+- ignore: {name: "Use void"}
- ignore: {name: "Eta reduce"}
- ignore: {name: "Evaluate"}
- ignore: {name: "Reduce duplication"} # TODO: could be more fine-grained
diff --git a/AUTHORS.md b/AUTHORS.md
index 0ed8e62a3..65410358e 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -1,10 +1,7 @@
# Contributors
-- Anabra
-- Aner Lucero
-- Arata Mizuki
-- Arfon Smith
- Aaron Wolen
+- Agustín Martín Barbero
- Albert Krewinkel
- Alex Ivkin
- Alex Toldaiev
@@ -16,23 +13,27 @@
- Alexandre Franke
- Alfred Wechselberger
- Amogh Rathore
+- Anabra
- Anders Waldenborg
- Andreas Lööw
- Andrew Dunning
- Andy Morris
+- Aner Lucero
- Anti-Distinctlyminty
- Antoine Latter
- Antonio Terceiro
- Arata Mizuki
+- Arata Mizuki
+- Arfon Smith
- Arfon Smith
- Arlo O'Keeffe
- Artyom Kazak
-- Agustín Martín Barbero
- B. Scott Michel
- Ben Firshman
- Ben Gamari
- Ben Steinberg
- Beni Cherniavsky-Paskin
+- Benjamin Bray
- Benoit Schweblin
- Bjorn Buckwalter
- Blake Eryx
@@ -53,6 +54,7 @@
- Christian Despres
- Christoffer Ackelman
- Christoffer Sawicki
+- Christophe Dervieux
- Clare Macrae
- Clint Adams
- Conal Elliott
@@ -81,17 +83,20 @@
- Emily Bourke
- Emily Eisenberg
- Eric Kow
-- Erik Rask
-- Eric Seidel
- Eric Schrijver
+- Eric Seidel
+- Erik Rask
- Ethan Riley
- Étienne Bersac
-- Felix Yan
+- Ezwal
+- Fabián Heredia Montiel
- Félix Baylac-Jacqué
+- Felix Yan
- Florian Beeres
- Florian Eitel
- Florian Klink
- Florian Kohrt
+- Francesco Mazzoli
- Francesco Occhipinti
- François Gannaz
- Frederik Elwert
@@ -111,6 +116,7 @@
- Heiko Schlittermann
- Henrik Tramberend
- Henry de Valence
+- Herwig Stuetz
- Hubert Plociniczak
- Ian Max Andolina
- Igor Khorlo
@@ -118,7 +124,6 @@
- Ilya V. Portnov
- Ivan Trubach
- Ivo Clarysse
-- Jared Lander
- J. B. Rainsberger
- J. Lewis Muir
- Jaime Marquínez Ferrándiz
@@ -130,22 +135,24 @@
- Jan Schulz
- Jan Tojnar
- Jan-Otto Kröpke
+- Jared Lander
- Jason Ronallo
- Jeff Arnold
- Jeff Runningen
- Jens Getreu
- Jens Petersen
+- Jérémy Bobbio
- Jeroen de Haas
- Jerry Sky
- Jesse Rosenthal
- Joe Hermaszewski
- Joe Hillenbrand
- John KetzerX
+- John Luke Bentley
- John MacFarlane
- John Muccigrosso
-- John Luke Bentley
-- Jonas Smedegaard
- Jonas Scholl
+- Jonas Smedegaard
- Jonathan Daugherty
- Jose Luis Duran
- José de Mattos Neto
@@ -156,7 +163,6 @@
- Juliette Fourcot
- Juliusz Gonera
- Justin Bogner
-- Jérémy Bobbio
- Karl Pettersson
- Keiichiro Shikano
- Kelsey Hightower
@@ -164,7 +170,6 @@
- Konstantin Zudov
- Kristof Bastiaensen
- Krystof Beuermann
-- Herwig Stuetz
- Lars-Dominik Braun
- Laurent P. René de Cotret
- Leif Metcalf
@@ -200,6 +205,7 @@
- Michael Snoyman
- Michael Thompson
- Mike Tzou
+- Milan Bracke
- MinRK
- Morton Fox
- Nathan Gass
@@ -212,6 +218,7 @@
- Nils Carlson
- Nixon Enraght-Moony
- Nokome Bentley
+- OCzarnecki
- Ole Martin Ruud
- Oliver Matthews
- Ophir Lifshitz
@@ -220,24 +227,29 @@
- Owen McGrath
- Pablo Rodríguez
- Pascal Wagler
-- Paul Tilley
- Paul Rivier
+- Paul Tilley
- Paulo Tanimoto
- Pete Ryland
+- Peter Fabinksi
- Peter Wang
- Philip Pesca
- Philippe Ombredanne
- Phillip Alday
- Prayag Verma
- Puneeth Chaganti
+- Quinn
- Ralf Stephan
- Raniere Silva
- Raymond Ehlers
- Recai Oktaş
+- Rowan Rodrik van der Molen
- Roland Hieber
- Roman Beránek
- RyanGlScott
+- S.P.H
- Salim B
+- Samuel Tardieu
- Sascha Wilde
- Scott Morrison
- Sebastian Talmon
@@ -250,8 +262,10 @@
- Sidarth Kapur
- Sidharth Kapur
- Simon Hengel
+- Simon Schuster
- Stefan Dresselhaus
- Sumit Sahrawat
+- TEC
- Tarik Graba
- Tatiana Porras
- Thenaesh Elango
@@ -263,21 +277,23 @@
- Tiziano Müller
- Todd Sifleet
- Tom Leese
-- Tristan de Cacqueray
- Tristan Stenner
+- Tristan de Cacqueray
- Uli Köhler
- Urs Liska
-- Václav Zeman
- Václav Haisman
+- Václav Zeman
- Vaibhav Sagar
- Vanessa McHale
- Vasily Alferov
+- Veratyr
- Viktor Kronvall
- Vincent
- Vlad Hanciuta
-- Wandmalfarbe
- Waldir Pimenta
+- Wandmalfarbe
- Wikiwide
+- William Lupton
- Winnie Hellmann
- Xavier Olive
- Yan Pashkovsky
@@ -294,24 +310,26 @@
- chinapedia
- cholonam
- csforste
-- dbecher-ito
- d-dorazio
+- dbecher-ito
- ebiim
- favonia
+- hseg
- infinity0x
- jeongminkim-islab
- kaizshang91
- lux-lth
- lwolfsonkin
- mbrackeantidot
-- nkalvi
+- mt_caret
- niszet
+- nkalvi
- nuew
- obcat
- oltolm
- oquechy
-- quasicomputational
- qerub
+- quasicomputational
- robabla
- roblabla
- rodja.trappe
@@ -320,11 +338,11 @@
- takahashim
- taotieren
- tecosaur
-- TEC
- tgkokk
- the-solipsist
-- timo-a
- thsutton
+- timo-a
- vijayphoenix
- wiefling
+- willj-dev
- wuffi
diff --git a/MANUAL.txt b/MANUAL.txt
index c9dc9e62b..008a0e657 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1,7 +1,7 @@
---
title: Pandoc User's Guide
author: John MacFarlane
-date: June 20, 2021
+date: November 20, 2021
---
# Synopsis
@@ -142,11 +142,11 @@ When using LaTeX, the following packages need to be available
contains images), [`hyperref`], [`xcolor`],
[`ulem`], [`geometry`] (with the `geometry` variable set),
[`setspace`] (with `linestretch`), and
-[`babel`] (with `lang`). The use of `xelatex` or `lualatex` as
+[`babel`] (with `lang`). If `CJKmainfont` is set, [`xeCJK`]
+is needed. The use of `xelatex` or `lualatex` as
the PDF engine requires [`fontspec`]. `lualatex` uses
-[`selnolig`]. `xelatex` uses [`polyglossia`] (with `lang`),
-[`xecjk`], and [`bidi`] (with the `dir` variable set). If the
-`mathspec` variable is set, `xelatex` will use [`mathspec`]
+[`selnolig`]. `xelatex` uses [`bidi`] (with the `dir` variable set).
+If the `mathspec` variable is set, `xelatex` will use [`mathspec`]
instead of [`unicode-math`]. The [`upquote`] and [`microtype`]
packages are used if available, and [`csquotes`] will be used
for [typography] if the `csquotes` variable or metadata field is
@@ -197,7 +197,7 @@ footnotes in tables).
[`weasyprint`]: https://weasyprint.org
[`wkhtmltopdf`]: https://wkhtmltopdf.org
[`xcolor`]: https://ctan.org/pkg/xcolor
-[`xecjk`]: https://ctan.org/pkg/xecjk
+[`xeCJK`]: https://ctan.org/pkg/xecjk
[`xurl`]: https://ctan.org/pkg/xurl
[`selnolig`]: https://ctan.org/pkg/selnolig
@@ -259,12 +259,14 @@ header when requesting a document from a URL:
- `odt` ([ODT])
- `opml` ([OPML])
- `org` ([Emacs Org mode])
+ - `rtf` ([Rich Text Format])
- `rst` ([reStructuredText])
- `t2t` ([txt2tags])
- `textile` ([Textile])
- `tikiwiki` ([TikiWiki markup])
- `twiki` ([TWiki markup])
- `vimwiki` ([Vimwiki])
+ - the path of a custom Lua reader, see [Custom readers and writers] below
:::
Extensions can be individually enabled or disabled by
@@ -314,6 +316,7 @@ header when requesting a document from a URL:
- `markdown_mmd` ([MultiMarkdown])
- `markdown_phpextra` ([PHP Markdown Extra])
- `markdown_strict` (original unextended [Markdown])
+ - `markua` ([Markua])
- `mediawiki` ([MediaWiki markup])
- `ms` ([roff ms])
- `muse` ([Muse]),
@@ -337,7 +340,7 @@ header when requesting a document from a URL:
- `tei` ([TEI Simple])
- `xwiki` ([XWiki markup])
- `zimwiki` ([ZimWiki markup])
- - the path of a custom Lua writer, see [Custom writers] below
+ - the path of a custom Lua writer, see [Custom readers and writers] below
:::
Note that `odt`, `docx`, `epub`, and `pdf` output will not be directed
@@ -500,6 +503,7 @@ header when requesting a document from a URL:
[CSL JSON]: https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html
[BibTeX]: https://ctan.org/pkg/bibtex
[BibLaTeX]: https://ctan.org/pkg/biblatex
+[Markua]: https://leanpub.com/markua/read
## Reader options {.options}
@@ -729,6 +733,16 @@ header when requesting a document from a URL:
document in standalone mode. If no *VAL* is specified, the
key will be given the value `true`.
+`--sandbox`
+
+: Run pandoc in a sandbox, limiting IO operations in readers
+ and writers to reading the files specified on the command line.
+ Note that this option does not limit IO operations by
+ filters or in the production of PDF documents. But it does
+ offer security against, for example, disclosure of files
+ through the use of `include` directives. Anyone using
+ pandoc on untrusted user input should use this option.
+
`-D` *FORMAT*, `--print-default-template=`*FORMAT*
: Print the system default template for an output *FORMAT*. (See `-t`
@@ -776,7 +790,6 @@ header when requesting a document from a URL:
preserve the wrapping from the source document (that is,
where there are nonsemantic newlines in the source, there
will be nonsemantic newlines in the output as well).
- Automatic wrapping does not currently work in HTML output.
In `ipynb` output, this option affects wrapping of the
contents of markdown cells.
@@ -961,7 +974,9 @@ header when requesting a document from a URL:
: Specify whether footnotes (and references, if `reference-links` is
set) are placed at the end of the current (top-level) block, the
current section, or the document. The default is
- `document`. Currently only affects the markdown writer.
+ `document`. Currently this option only affects the
+ `markdown`, `muse`, `html`, `epub`, `slidy`, `s5`, `slideous`,
+ `dzslides`, and `revealjs` writers.
`--markdown-headings=setext`|`atx`
@@ -1025,13 +1040,13 @@ header when requesting a document from a URL:
: Specifies that headings with the specified level create
slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headings
- above this level in the hierarchy are used to divide the
- slide show into sections; headings below this level create
- subheads within a slide. Note that content that is
- not contained under slide-level headings will not appear in
- the slide show. The default is to set the slide level based
- on the contents of the document; see [Structuring the slide
- show].
+ above this level in the hierarchy are used to divide the slide show
+ into sections; headings below this level create subheads within a slide.
+ Valid values are 0-6. If a slide level of 0 is specified, slides will
+ not be split automatically on headings, and horizontal rules must be used
+ to indicate slide boundaries. If a slide level is not specified
+ explicitly, the slide level will be set automatically based on
+ the contents of the document; see [Structuring the slide show].
`--section-divs`
@@ -1164,13 +1179,22 @@ header when requesting a document from a URL:
`.pptx` or `.potx` extension) are known to work, as are most
templates derived from these.
- The specific requirement is that the template should begin with
- the following first four layouts:
+ The specific requirement is that the template should contain layouts
+ with the following names (as seen within PowerPoint):
- 1. Title Slide
- 2. Title and Content
- 3. Section Header
- 4. Two Content
+ - Title Slide
+ - Title and Content
+ - Section Header
+ - Two Content
+ - Comparison
+ - Content with Caption
+ - Blank
+
+ For each name, the first layout found with that name will be used.
+ If no layout is found with one of the names, pandoc will output a
+ warning and use the layout with that name from the default reference
+ doc instead. (How these layouts are used is described in [PowerPoint
+ layout choice](#powerpoint-layout-choice).)
All templates included with a recent version of MS PowerPoint
will fit these criteria. (You can click on `Layout` under the
@@ -1179,8 +1203,8 @@ header when requesting a document from a URL:
You can also modify the default `reference.pptx`: first run
`pandoc -o custom-reference.pptx --print-default-data-file
reference.pptx`, and then modify `custom-reference.pptx`
- in MS PowerPoint (pandoc will use the first four layout
- slides, as mentioned above).
+ in MS PowerPoint (pandoc will use the layouts with the names
+ listed above).
`--epub-cover-image=`*FILE*
@@ -1458,6 +1482,7 @@ Nonzero exit codes have the following meanings:
Code Error
----- ------------------------------------
+ 1 PandocIOError
3 PandocFailOnWarningError
4 PandocAppError
5 PandocTemplateError
@@ -1466,6 +1491,7 @@ Nonzero exit codes have the following meanings:
22 PandocUnknownWriterError
23 PandocUnsupportedExtensionError
24 PandocCiteprocError
+ 25 PandocBibliographyError
31 PandocEpubSubdirectoryError
43 PandocPDFError
44 PandocXMLError
@@ -1478,6 +1504,7 @@ Nonzero exit codes have the following meanings:
66 PandocMakePDFError
67 PandocSyntaxMapError
83 PandocFilterError
+ 84 PandocLuaError
91 PandocMacroLoop
92 PandocUTF8DecodingError
93 PandocIpynbDecodingError
@@ -1931,7 +1958,7 @@ ${ styles.html() }
```
(If a partial is not found in the directory of the
-template and the template path is given as a relative
+template and the template path is given as a relative
path, it will also be sought in the `templates`
subdirectory of the user data directory.)
@@ -2166,7 +2193,7 @@ Currently the following pipes are predefined:
and AsciiDoc metadata; repeat as for `author`, above
`subject`
-: document subject, included in ODT, PDF, docx and pptx metadata
+: document subject, included in ODT, PDF, docx, EPUB, and pptx metadata
`description`
: document description, included in ODT, docx and pptx metadata. Some
@@ -2793,7 +2820,7 @@ on the output format, and include the following:
`toc-title`
: title of table of contents (works only with EPUB,
- HTML, opendocument, odt, docx, pptx, beamer, LaTeX)
+ HTML, revealjs, opendocument, odt, docx, pptx, beamer, LaTeX)
[pandoc-templates]: https://github.com/jgm/pandoc-templates
@@ -3067,7 +3094,7 @@ starts at 1.
This extension can be enabled/disabled for the following formats:
output formats
-: `odt`, `opendocument`
+: `odt`, `opendocument`, `docx`
#### Extension: `xrefs_name` ####
@@ -3726,8 +3753,8 @@ or two spaces.
A term may have multiple definitions, and each definition may
consist of one or more block elements (paragraph, code block,
list, etc.), each indented four spaces or one tab stop. The
-body of the definition (including the first line, aside from the
-colon or tilde) should be indented four spaces. However, as with
+body of the definition (not including the first line)
+should be indented four spaces. However, as with
other Markdown lists, you can "lazily" omit indentation except
at the beginning of a paragraph or other block element:
@@ -4029,12 +4056,12 @@ legal (though ugly) pipe table:
orange|3.09
The cells of pipe tables cannot contain block elements like paragraphs
-and lists, and cannot span multiple lines. If a pipe table contains a
-row whose Markdown content is wider than the column width (see
-`--columns`), then the table will take up the full text width and
-the cell contents will wrap, with the relative cell widths determined
-by the number of dashes in the line separating the table header from
-the table body. (For example `---|-` would make the first column 3/4
+and lists, and cannot span multiple lines. If any line of the
+markdown source is longer than the column width (see `--columns`),
+then the table will take up the full text width and the cell
+contents will wrap, with the relative cell widths determined by
+the number of dashes in the line separating the table header
+from the table body. (For example `---|-` would make the first column 3/4
and the second column 1/4 of the full text width.)
On the other hand, if no lines are wider than column width, then
cell contents will not be wrapped, and the cells will be sized
@@ -4173,6 +4200,10 @@ A document may contain multiple metadata blocks. If two
metadata blocks attempt to set the same field, the value from
the second block will be taken.
+Each metadata block is handled internally as an independent YAML document.
+This means, for example, that any YAML anchors defined in a block cannot be
+referenced in another block.
+
When pandoc is used with `-t markdown` to create a Markdown document,
a YAML metadata block will be produced only if the `-s/--standalone`
option is used. All of the metadata will appear in a single block
@@ -4395,6 +4426,18 @@ Attributes can be attached to verbatim text, just as with
`<$>`{.haskell}
+### Underline ###
+
+To underline text, use the `underline` class:
+
+ [Underline]{.underline}
+
+Or, without the `bracketed_spans` extension (but with `native_spans`):
+
+ <span class="underline">Underline</span>
+
+This will work in all output formats that support underline.
+
### Small caps ###
To write small caps, use the `smallcaps` class:
@@ -4983,13 +5026,16 @@ See the [CSL user documentation] for more information about CSL
styles and how they affect rendering.
Unless a citation key start with a letter, digit, or `_`,
-and contains only alphanumerics and internal punctuation
+and contains only alphanumerics and single internal punctuation
characters (`:.#$%&-+?<>~/`), it must be surrounded
by curly braces, which are not considered part of the key.
-In `@Foo_bar.baz.`, the key is `Foo_bar.baz`. The final
+In `@Foo_bar.baz.`, the key is `Foo_bar.baz` because the final
period is not *internal* punctuation, so it is not included in
the key. In `@{Foo_bar.baz.}`, the key is `Foo_bar.baz.`, including
-the final period. The curly braces are recommended if you use URLs as
+the final period.
+In `@Foo_bar--baz`, the key is `Foo_bar` because the repeated internal
+punctuation characters terminate the key.
+The curly braces are recommended if you use URLs as
keys: `[@{https://example.com/bib?name=foobar&date=2000}, p. 33]`.
Citation items may optionally include a prefix, a locator, and
@@ -5098,7 +5144,8 @@ or image itself, if these differ.
#### Extension: `attributes` ####
Allows attributes to be attached to any inline or block-level
-element. The syntax for the attributes is the same as that
+element when parsing `commonmark`.
+The syntax for the attributes is the same as that
used in [`header_attributes`][Extension: `header_attributes`].
- Attributes that occur immediately after an inline
@@ -5286,7 +5333,19 @@ for regular emphasis, add extra blank space around headings.
Include source position attributes when parsing `commonmark`.
For elements that accept attributes, a `data-pos` attribute
is added; other elements are placed in a surrounding
-Div or Span elemnet with a `data-pos` attribute.
+Div or Span element with a `data-pos` attribute.
+
+#### Extension: `short_subsuperscripts` ####
+
+Parse multimarkdown style subscripts and superscripts, which start with
+a '~' or '^' character, respectively, and include the alphanumeric sequence
+that follows. For example:
+
+ x^2 = 4
+
+or
+
+ Oxygen is O~2.
## Markdown variants
@@ -5622,9 +5681,16 @@ or BibLaTeX (for `--biblatex`) format.
A few other metadata fields affect bibliography formatting:
`link-citations`
-: If true, citations will be
- hyperlinked to the corresponding bibliography entries
- (for author-date and numerical styles only).
+: If true, citations will be hyperlinked to the
+ corresponding bibliography entries (for author-date and
+ numerical styles only). Defaults to false.
+
+`link-bibliography`
+: If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will
+ be rendered as hyperlinks. (If an entry contains a DOI, PMCID,
+ PMID, or URL, but none of these fields are rendered by the style,
+ then the title, or in the absence of a title the whole entry, will
+ be hyperlinked.) Defaults to true.
`lang`
: The `lang` field will affect how the style is localized,
@@ -5737,8 +5803,8 @@ By default, the *slide level* is the highest heading level in
the hierarchy that is followed immediately by content, and not another
heading, somewhere in the document. In the example above, level-1 headings
are always followed by level-2 headings, which are followed by content,
-so the slide level is 2. This default can be overridden using
-the `--slide-level` option.
+so the slide level is 2. This default can be overridden using the
+`--slide-level` option.
The document is carved up into slides according to the following
rules:
@@ -5762,19 +5828,62 @@ rules:
subsequent slide with the same title (for beamer).
* A title page is constructed automatically from the document's title
- block, if present. (In the case of beamer, this can be disabled
+ block, if present. (In the case of beamer, this can be disabled
by commenting out some lines in the default template.)
These rules are designed to support many different styles of slide show. If
you don't care about structuring your slides into sections and subsections,
-you can just use level-1 headings for all each slide. (In that case, level-1
-will be the slide level.) But you can also structure the slide show into
-sections, as in the example above.
+you can either just use level-1 headings for all slides (in that case, level 1
+will be the slide level) or you can set `--slide-level=0`.
Note: in reveal.js slide shows, if slide level is 2, a two-dimensional
layout will be produced, with level-1 headings building horizontally
-and level-2 headings building vertically. It is not recommended that
-you use deeper nesting of section levels with reveal.js.
+and level-2 headings building vertically. It is not recommended that
+you use deeper nesting of section levels with reveal.js unless you set
+`--slide-level=0` (which lets reveal.js produce a one-dimensional layout
+and only interprets horizontal rules as slide boundaries).
+
+### PowerPoint layout choice
+
+When creating slides, the pptx writer chooses from a number of pre-defined
+layouts, based on the content of the slide:
+
+Title Slide
+: This layout is used for the initial slide, which is generated and
+ filled from the metadata fields `date`, `author`, and `title`, if
+ they are present.
+
+Section Header
+: This layout is used for what pandoc calls “title slides”, i.e.
+ slides which start with a header which is above the slide level in
+ the hierarchy.
+
+Two Content
+: This layout is used for two-column slides, i.e. slides containing a
+ div with class `columns` which contains at least two divs with class
+ `column`.
+
+Comparison
+: This layout is used instead of “Two Content” for any two-column
+ slides in which at least one column contains text followed by
+ non-text (e.g. an image or a table).
+
+Content with Caption
+: This layout is used for any non-two-column slides which contain text
+ followed by non-text (e.g. an image or a table).
+
+Blank
+: This layout is used for any slides which only contain blank content,
+ e.g. a slide containing only speaker notes, or a slide containing
+ only a non-breaking space.
+
+Title and Content
+: This layout is used for all slides which do not match the criteria
+ for another layout.
+
+These layouts are chosen from the default pptx reference doc included with
+pandoc, unless an alternative reference doc is specified using
+`--reference-doc`.
## Incremental lists
@@ -5814,9 +5923,6 @@ option):
Both methods allow incremental and nonincremental lists to be mixed
in a single document.
-Note: Neither the `-i/--incremental` option nor any of the
-methods described here currently works for PowerPoint output.
-
## Inserting pauses
You can add "pauses" within a slide by including a paragraph containing
@@ -5952,44 +6058,65 @@ the [Beamer User's Guide] may also be used: `allowdisplaybreaks`,
`allowframebreaks`, `b`, `c`, `t`, `environment`, `label`, `plain`,
`shrink`, `standout`, `noframenumbering`.
-## Background in reveal.js and beamer
+## Background in reveal.js, beamer, and pptx
-Background images can be added to self-contained reveal.js slideshows and
-to beamer slideshows.
+Background images can be added to self-contained reveal.js slide shows,
+beamer slide shows, and pptx slide shows.
-For the same image on every slide, use the configuration
-option `background-image` either in the YAML metadata block
-or as a command-line variable. (There are no other options in
-beamer and the rest of this section concerns reveal.js slideshows.)
+### On all slides (beamer, reveal.js, pptx)
-For reveal.js, you can instead use the reveal.js-native option
-`parallaxBackgroundImage`. You can also set `parallaxBackgroundHorizontal`
-and `parallaxBackgroundVertical` the same way and must also set
-`parallaxBackgroundSize` to have your values take effect.
+With beamer and reveal.js, the configuration option `background-image` can be
+used either in the YAML metadata block or as a command-line variable to get the
+same image on every slide.
-To set an image for a particular reveal.js slide, add
-`{data-background-image="/path/to/image"}`
-to the first slide-level heading on the slide (which may even be empty).
+For pptx, you can use a [reference doc](#option--reference-doc) in which
+background images have been set on the [relevant
+layouts](#powerpoint-layout-choice).
+
+#### `parallaxBackgroundImage` (reveal.js)
+
+For reveal.js, there is also the reveal.js-native option
+`parallaxBackgroundImage`, which can be used instead of `background-image` to
+produce a parallax scrolling background. You must also set
+`parallaxBackgroundSize`, and can optionally set `parallaxBackgroundHorizontal`
+and `parallaxBackgroundVertical` to configure the scrolling behaviour. See the
+[reveal.js documentation](https://revealjs.com/backgrounds/#parallax-background)
+for more details about the meaning of these options.
In reveal.js's overview mode, the parallaxBackgroundImage will show up
only on the first slide.
-Other reveal.js background settings also work on individual slides, including
-`data-background-size`, `data-background-repeat`, `data-background-color`,
-`data-transition`, and `data-transition-speed`.
+### On individual slides (reveal.js, pptx)
+
+To set an image for a particular reveal.js or pptx slide, add
+`{background-image="/path/to/image"}` to the first slide-level heading on the
+slide (which may even be empty).
+
+As the [HTML writers pass unknown attributes
+through](#extension-link_attributes), other reveal.js background settings also
+work on individual slides, including `background-size`, `background-repeat`,
+`background-color`, `transition`, and `transition-speed`. (The `data-` prefix
+will automatically be added.)
+
+Note: `data-background-image` is also supported in pptx for consistency with
+reveal.js – if `background-image` isn’t found, `data-background-image` will be
+checked.
-To add a background image to the automatically generated title slide, use the
-`title-slide-attributes` variable in the YAML metadata block. It must contain
-a map of attribute names and values.
+### On the title slide (reveal.js, pptx)
-See the [reveal.js documentation](https://revealjs.com/backgrounds/) for more
-details.
+To add a background image to the automatically generated title slide for
+reveal.js, use the `title-slide-attributes` variable in the YAML metadata block.
+It must contain a map of attribute names and values. (Note that the `data-`
+prefix is required here, as it isn’t added automatically.)
-For example in reveal.js:
+For pptx, pass a [reference doc](#option--reference-doc) with the background
+image set on the “Title Slide” layout.
+
+### Example (reveal.js)
```
---
-title: My Slideshow
+title: My Slide Show
parallaxBackgroundImage: /path/to/my/background_image.png
title-slide-attributes:
data-background-image: /path/to/title_image.png
@@ -6000,7 +6127,7 @@ title-slide-attributes:
Slide 1 has background_image.png as its background.
-## {data-background-image="/path/to/special_image.jpg"}
+## {background-image="/path/to/special_image.jpg"}
Slide 2 has a special image for its background, even though the heading has no content.
```
@@ -6066,7 +6193,12 @@ The following fields are recognized:
language if nothing is specified.
`subject`
- ~ A string value or a list of such values.
+ ~ Either a string value, or an object with fields `text`, `authority`,
+ and `term`, or a list of such objects. Valid values for `authority`
+ are either a [reserved authority value] (currently `AAT`, `BIC`,
+ `BISAC`, `CLC`, `DDC`, `CLIL`, `EuroVoc`, `MEDTOP`, `LCSH`, `NDC`,
+ `Thema`, `UDC`, and `WGS`) or an absolute IRI identifying a custom
+ scheme. Valid values for `term` are defined by the scheme.
`description`
~ A string value.
@@ -6085,7 +6217,7 @@ The following fields are recognized:
`rights`
~ A string value.
-
+
`belongs-to-collection`
~ A string value. identifies the name of a collection to which
the EPUB Publication belongs.
@@ -6116,6 +6248,7 @@ The following fields are recognized:
- `scroll-axis`: `vertical`|`horizontal`|`default`
[MARC relators]: https://loc.gov/marc/relators/relaterm.html
+[reserved authority value]: https://idpf.github.io/epub-registries/authorities/
[`spine` element]: http://idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem
## The `epub:type` attribute
@@ -6155,6 +6288,7 @@ halftitlepage frontmatter
seriespage frontmatter
foreword frontmatter
preface frontmatter
+frontispiece frontmatter
appendix backmatter
colophon backmatter
bibliography backmatter
@@ -6442,19 +6576,35 @@ With these custom styles, you can use your input document as a
reference-doc while creating docx output (see below), and maintain the
same styles in your input and output files.
-# Custom writers
+# Custom readers and writers
-Pandoc can be extended with custom writers written in [Lua]. (Pandoc
-includes a Lua interpreter, so Lua need not be installed separately.)
+Pandoc can be extended with custom readers and writers written
+in [Lua]. (Pandoc includes a Lua interpreter, so Lua need not
+be installed separately.)
-To use a custom writer, simply specify the path to the Lua script
-in place of the output format. For example:
+To use a custom reader or writer, simply specify the path to the
+Lua script in place of the input or output format. For example:
pandoc -t data/sample.lua
+ pandoc -f my_custom_markup_language.lua -t latex -s
+
+A custom reader is a Lua script that defines one function,
+Reader, which takes a string as input and returns a Pandoc
+AST. See the [Lua filters documentation] for documentation
+of the functions that are available for creating pandoc
+AST elements. For parsing, the [lpeg] parsing library
+is available by default. To see a sample custom reader:
+
+ pandoc --print-default-data-file creole.lua
+
+If you want your custom reader to have access to reader options
+(e.g. the tab stop setting), you give your Reader function a
+second `options` parameter.
-Creating a custom writer requires writing a Lua function for each
-possible element in a pandoc document. To get a documented example
-which you can modify according to your needs, do
+A custom writer is a Lua script that defines a function
+that specifies how to render each element in a Pandoc AST.
+To see a documented example which you can modify according
+to your needs:
pandoc --print-default-data-file sample.lua
@@ -6466,6 +6616,7 @@ default template with the name
subdirectory of your user data directory (see [Templates]).
[Lua]: https://www.lua.org
+[lpeg]: http://www.inf.puc-rio.br/~roberto/lpeg/
# Reproducible builds
@@ -6493,21 +6644,38 @@ application, here are some things to keep in mind:
writer could in principle do anything on your file system. Please
audit filters and custom writers very carefully before using them.
-2. If your application uses pandoc as a Haskell library (rather than
+2. Several input formats (including HTML, Org, and RST) support `include`
+ directives that allow the contents of a file to be included in the
+ output. An untrusted attacker could use these to view the contents of
+ files on the file system. (Using the `--sandbox` option can
+ protect against this threat.)
+
+3. Several output formats (including RTF, FB2, HTML with
+ `--self-contained`, EPUB, Docx, and ODT) will embed encoded
+ or raw images into the output file. An untrusted attacker
+ could exploit this to view the contents of non-image files on the
+ file system. (Using the `--sandbox` option can protect
+ against this threat, but will also prevent including images in
+ these formats.)
+
+4. If your application uses pandoc as a Haskell library (rather than
shelling out to the executable), it is possible to use it in a mode
that fully isolates pandoc from your file system, by running the
pandoc operations in the `PandocPure` monad. See the document
[Using the pandoc API](https://pandoc.org/using-the-pandoc-api.html)
for more details.
-3. Pandoc's parsers can exhibit pathological performance on some
+5. Pandoc's parsers can exhibit pathological performance on some
corner cases. It is wise to put any pandoc operations under
a timeout, to avoid DOS attacks that exploit these issues.
If you are using the pandoc executable, you can add the
command line options `+RTS -M512M -RTS` (for example) to limit
- the heap size to 512MB.
+ the heap size to 512MB. Note that the `commonmark` parser
+ (including `commonmark_x` and `gfm`) is much less vulnerable
+ to pathological performance than the `markdown` parser, so
+ it is a better choice when processing untrusted input.
-4. The HTML generated by pandoc is not guaranteed to be safe.
+6. The HTML generated by pandoc is not guaranteed to be safe.
If `raw_html` is enabled for the Markdown input, users can
inject arbitrary HTML. Even if `raw_html` is disabled,
users can include dangerous content in URLs and attributes.
diff --git a/README.md b/README.md
index d72e86305..c9866b894 100644
--- a/README.md
+++ b/README.md
@@ -76,6 +76,8 @@ library. It can convert *from*
- `odt` ([ODT](https://en.wikipedia.org/wiki/OpenDocument))
- `opml` ([OPML](http://dev.opml.org/spec2.html))
- `org` ([Emacs Org mode](https://orgmode.org))
+- `rtf` ([Rich Text
+ Format](https://en.wikipedia.org/wiki/Rich_Text_Format))
- `rst`
([reStructuredText](https://docutils.sourceforge.io/docs/ref/rst/introduction.html))
- `t2t` ([txt2tags](https://txt2tags.org))
diff --git a/RELEASE-CHECKLIST b/RELEASE-CHECKLIST
index 1e42c0f3e..fcfe2d751 100644
--- a/RELEASE-CHECKLIST
+++ b/RELEASE-CHECKLIST
@@ -1,4 +1,4 @@
-[ ] use 'policeman' to check API changes and version update
+[ ] make check
[ ] make README.md and commit if needed
[ ] make man/pandoc.1 and commit if needed
[ ] Finalize changelog
diff --git a/cabal.project b/cabal.project
index e18577471..3d89d63ab 100644
--- a/cabal.project
+++ b/cabal.project
@@ -1,13 +1,20 @@
packages: pandoc.cabal
tests: True
flags: +embed_data_files
+constraints: aeson >= 2.0.1.0
source-repository-package
type: git
- location: https://github.com/jgm/doctemplates
- tag: 428c26d5303cf7a2b1051fe1ffd9aafe9ba71c81
+ location: https://github.com/jgm/texmath.git
+ tag: 46df85d747f4f233157d3476683264232a4f58be
source-repository-package
type: git
- location: https://github.com/jgm/citeproc
- tag: 4ce0501cd6f9c86eee087afcf878c256e49b9615
+ location: https://github.com/jgm/commonmark-hs
+ tag: 4d460b206e0b1872376db86cadf7a4567eeddaed
+ subdir: commonmark-pandoc
+
+source-repository-package
+ type: git
+ location: https://github.com/jgm/ipynb.git
+ tag: 00246af10885c2ad4413ace4f69a7e6c88297a08
diff --git a/changelog.md b/changelog.md
index 2f188a3b8..300dc0130 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,1064 @@
# Revision history for pandoc
+## pandoc 2.16.2 (2021-11-21)
+
+ * Add interface for custom readers written in Lua (#7669).
+ Users can now do `-f myreader.lua` and pandoc will treat the
+ script `myreader.lua` as a custom reader, which parses an input
+ string to a pandoc AST, using the pandoc module defined for
+ Lua filters. A sample custom reader can be found in `data/creole.lua`.
+ Also see documentation in `doc/custom-readers.md`.
+
+ * New module Text.Pandoc.Readers.Custom, exporting `readCustom` [API change].
+
+ * Allow `plain` to be used in raw attribute syntax.
+
+ * Accept empty `--metadata-file` (#7675).
+ This was a regression from 2.15 behavior.
+
+ * Markdown reader: Improve `inlinesInBalancedBrackets`.
+ This is just a small improvement in terms of performance, but it's simpler
+ and more direct code. Also, we avoid parsing interparagraph spaces in
+ balanced brackets, as the original did.
+
+ * BibTeX reader: Properly handle commented lines in BibTeX/BibLaTeX (#7668).
+
+ * RST reader: handle class attribute for for custom roles (#7699,
+ willj-dev). Previously the class attribute was ignored, and the name
+ of the role used as the class.
+
+ * DocBook reader:
+
+ + Add `<titleabbr>` support (Rowan Rodrik van der Molen).
+ + Support for `<indexterm>` (#7607, Rowan Rodrik van der Molen).
+
+ * LaTeX reader:
+
+ + Add rudimentary support for `\autoref` (#7693).
+ + Add 'uri' class when parsing `\url`, for consistency
+ with treatment of autolinks in other formats (#7672).
+
+ * JATS reader: Capture `alt-text` in figures (#7703, Aner Lucero).
+
+ * MediaWiki writer: use HTML spans for anchors when header has id (#7697).
+ We need to generate a span when the header's ID doesn't match
+ the one MediaWiki would generate automatically. Note that MediaWiki's
+ generation scheme is different from pandoc's (it uses uppercase letters,
+ and `_` instead of `-`, for example). This means that in going from
+ markdown to mediawiki, we'll now get spans before almost every heading,
+ unless explicit identifiers are used that correspond to the ones MediaWiki
+ auto-generates. This is uglier output but it's necessary for internal
+ links to work properly.
+
+ * Markdown writer: don't create autolinks when this loses information
+ (#7692). Previously we sometimes lost attributes when rendering links
+ as autolinks.
+
+ * Text.Pandoc.Readers.Metadata: allow multiple YAML documents when parsing
+ YAML for `yamlBsToRefs`. Some people use `---` as the end delimiter in
+ YAML bibliography files, which causes the `yaml` library to emit an
+ error unless we explicitly allow multiple YAML documents (and just
+ consider the first).
+
+ * JATS writer:
+
+ + Ensure figures are wrapped with `<p>` in list items
+ (Albert Krewinkel). This prevents the generation of invalid output.
+ + Add URL to element citation entries (Albert Krewinkel).
+ The URL of a reference, if present, is added in tag `<uri>` to
+ element-citation entries.
+
+ * HTML writer: Don't create invalid `data-` attribute for empty
+ attribute key (#7546).
+
+ * LaTeX writer:
+
+ + Babel mappings: use `ancientgreek` for `grc`.
+ + With `-t latex-smart`, don't generate `\ldots` from ellipsis (#7674).
+ Instead just use unicode ellipsis.
+
+ * JATS template: fix `equal-contrib` attribute (Albert Krewinkel).
+ The standard requires the value to be either `yes` or `no`, but is was
+ set to `true` for authors who contributed equally.
+
+ * reveal.js template: Add `disableLayout` variable (Christophe Dervieux).
+
+ * Text.Pandoc.Error: sort errors in `handleError` by exit code
+ (Albert Krewinkel).
+
+ * Text.Pandoc.Writers.Shared: Improve toLegacyTable (#7683,
+ Christian Despres).
+
+ * Lua subsystem:
+
+ + Include lpeg module (#7649, Albert Krewinkel). Compiles the `lpeg`
+ library (Parsing Expression Grammars For Lua) into
+ the program. Package maintainers may choose to rely on package
+ dependencies to make lpeg available, in which case they can compile
+ the with the constraint `lpeg +rely-on-shared-lpeg-library`.
+ `lpeg` and `re` are always made available in global variables,
+ without the need for a `require`.
+
+ + Set `lpeg` and `re` as globals; allow shared lib access via `require`.
+ The `lpeg` and `re` modules are loaded into globals of the respective
+ name, but they are not necessarily registered as loaded packages. This
+ ensures that
+
+ - the built-in library versions are preferred when setting the globals,
+ - a shared library is used if pandoc has been compiled without `lpeg`,
+ and
+ - the `require` mechanism can be used to load the shared library if
+ available, falling back to the internal version if possible and
+ necessary.
+
+ + Fix argument order in constructor `pandoc.Cite` (Albert Krewinkel).
+ This restores the old behavior; argument order had been switched
+ accidentally in pandoc 2.15.
+
+ + Add Pushable instance for `ReaderOptions` (Albert Krewinkel).
+
+ + Allow to pass custom reader options to `pandoc.read` as an
+ optional third argument (#7656, Albert Krewinkel).
+ The object can either be a table or a ReaderOptions value
+ like `PANDOC_READER_OPTIONS`. Creating new ReaderOptions objects is
+ possible through the new constructor `pandoc.ReaderOptions`.
+
+ + Display Pandoc values using their native Haskell representation
+ (Albert Krewinkel).
+
+ + Require latest hslua (2.0.1) (#7661, #7657, Albert Krewinkel).
+ This fixes issues with
+
+ - misleading error messages when a required function parameter is
+ omitted;
+ - absent properties still being listed in the output of `pairs`; and
+ - alias accessing leading to errors instead of returning `nil`, e.g.
+ with `(pandoc.Str '').identifier`.
+
+ + Add missing space in "package not found" message (#7658, Albert
+ Krewinkel).
+
+ * Update build files (#7696, Fabián Heredia Montiel).
+ Drop old windows 32-bit constraints.
+ Update cabal `tested-with` field to correspond to `ci.yml` matrix
+
+ * Remove unneeded package dependencies from benchmark target.
+
+ * Require ghc >= 8.6, base >= 4.12.
+ This allows us to get rid of the old custom prelude and
+ some crufty cpp. But the primary reason for this is that
+ conduit has bumped its base lower bound to 4.12, making it
+ impossible for us to support lower base versions.
+
+ * Require Cabal 2.4. Use wildcards to ensure that all pptx tests are
+ included (#7677).
+
+ * Update `bash_completion.tpl` (S.P.H.).
+
+ * Add `data/creole.lua` as sample custom reader.
+
+ * Add `doc/custom-readers.md` and `doc/custom-writers.md`.
+
+ * `doc/lua-filters.md`: add section on global modules, including lpeg
+ (Albert Krewinkel).
+
+ * `MANUAL.txt`: update table of exit codes and corresponding errors
+ (Albert Krewinkel).
+
+ * Use latest texmath.
+
+## pandoc 2.16.1 (2021-11-02)
+
+
+ * Docx reader: don't let first line indents trigger block quotes (#7655).
+ This fixes a regression introduced in pandoc 2.15.
+
+ * Docx writer: use `getTimestamp` for modification times in
+ reference.docx (#7654). This ensures that when `SOURCE_DATE_EPOCH` is
+ set, the modification times of files taken from the reference.docx will
+ be set deterministically, allowing for reproducible builds.
+
+ * Lua subsystem (Albert Krewinkel):
+
+ + Load module `pandoc.path` on startup (#7524). Previously the module
+ always had to be loaded via `require 'pandoc.path'`.
+ + Fix typo in SoftBreak constructor.
+ + Re-add `content` property to Strikeout elements.
+ Fixes a regression introduced in 2.15.
+ + Be more forgiving when retrieving the Image `caption` property.
+ Fixes a regression introduced in 2.15.
+ + Display Attr values using their native Haskell representation.
+ + Allow omitting the 2nd parameter in pandoc.Code constructor.
+ Fixes a regression introduced in 2.15 which required users to always
+ specify an Attr value when constructing a Code element.
+ + Allow to compare, show Citation values. Comparisons of Citation
+ values are performed in Haskell; values are equal if they represent
+ the same Haskell value. Converting a Citation value to a string
+ now yields its native Haskell string representation.
+ + Restore List behavior of MetaList (#7650). Fixes a regression
+ introduced in 2.16 which had MetaList elements lose
+ the `pandoc.List` properties.
+ + Restore `content` property on Header elements.
+ + Ensure Block elements have all expected properties.
+ + Ensure Inline elements have all expected properties.
+
+ * Allow tasty-bench 0.3.x.
+
+## pandoc 2.16 (2021-10-31)
+
+ * Switch back from HsYAML to yaml for parsing YAML metadata (#6084).
+ HsYAML is around 20 times slower in parsing large YAML bibliographies.
+ In addition, HsYAML is not being actively maintained. This sets us back
+ in our attempts to free ourselves from C dependencies (#4535). But I
+ don't see a good alternative until a faster pure Haskell parser is available.
+ Notes:
+
+ + We've removed the FromYAML instances for all types that had them, since
+ this is a HsYAML-specific typeclass [API change]. (The yaml package just
+ uses From/ToJSON instead of having a dedicated From/ToYAML class.)
+ + Unlike HsYAML (in the configuration we were using), yaml parses 'Y', 'N',
+ 'Yes', 'No', 'On', 'Off' as boolean values. Users may need to quote these
+ when they are meant to be interpreted as strings. Similarly, 'null' is
+ parsed as a YAML null value (and will be treated as an empty string by
+ pandoc rather than the string 'null'). Quoting it will force it to be
+ interpreted as a string.
+ + Some tests had to be adjusted accordingly.
+ + Pandoc now behaves in a more useful way when the YAML metadata contains
+ escaping errors: instead of just failng silently and falling back to
+ some other interpretation of the section, it raises a YAML parsing error.
+
+ * Markdown writer: Ensure that special values are quoted in YAML metadata.
+ These include "Y", "yes", "on", and "off", which are now (with yaml library)
+ considered boolean values, as well as "null".
+
+ * Change JSON encodings of some types.
+
+ + For LineEnding use lowercase constructors, e.g. `crlf`, `native`.
+ + For HTMLSlideVariant use lowercase constructors.
+ + For ReaderOptions use e.g. `default-image-extension`
+ instead of `readerDefaultImageExtension` for field names.
+ + For Extension, use e.g. `tex_math_dollars` instead of
+ `Ext_tex_math_dollars` as constructor.
+ + For Extensions, use an array of Extensions, instead of
+ an object wrapping the tag `Extensions` and an integer.
+ (The integer representation is not supposed to be part of the
+ public API.)
+ + For Opt, use field names like `tab-stop` instead of `optTabStop`.
+
+ * Docx writer:
+
+ + Add IDs to native_numbering test (Tristan Stenner).
+ + Move ": " out of the caption bookmark (Tristan Stenner).
+ This is needed so that native references to the figure are included as
+ "As seen in Figure X, it is..." instead of "As seen in [Figure: X, it is..."
+
+ * Lua (Albert Krewinkel, except as noted):
+
+ + Use hslua module abstraction where possible.
+ + Fix placement of tests for Block elements in pandoc module tests
+ + Increase strictness when getting attribute keys
+ + Re-add `t` and `tag` property to Attr values.
+ Removal of these properties from Attr values was a regression.
+ + Fix `pandoc.utils.stringify` regression. The `pandoc.utils.stringify`
+ function returned empty strings when called with a string argument.
+ + Fix a copy/paste bug in Lua marshalling code (John MacFarlane, #7639).
+ This caused links to be changed to figures when Lua filters changed
+ link properties.
+ + Re-add `content` property to Link elements (#7647).
+ This was a regression introduced in version 2.15.
+ + Generate constants in module pandoc programmatically.
+ + Marshal SimpleTable, ListAttributes, Citation, and Block values as
+ userdata objects. Properties of Block values are marshalled lazily,
+ which generally improves performance considerably. Script users may also
+ notice the following differences:
+
+ - Block element properties can no longer be accessed by numerical
+ indexing of the `.c` field. The `.c` property now serves as an alias
+ for `.content`, so some filter that used this undocumented method
+ for property access may continue to work, while others will need to
+ be updated and use proper property names.
+ - The marshalled Block elements now have a `show` method, and a
+ `__tostring` metamethod. Both return the Haskell string
+ representation of the element.
+ - Block values now have the Lua type `userdata` instead of `table`.
+
+ * Add a short guide to pandoc's sources (Albert Krewinkel).
+
+ * Fix epub files in epub reader tests, so that they are valid
+ according to epubcheck (#7586).
+
+ * Allow time 1.13.
+
+ * Require latest skylighting (0.12.1).
+
+ * Fix build on GHC 9.2 (Joseph C. Sible).
+
+ * Fix trypandoc so it builds with aeson > 2.
+
+
+## pandoc 2.15 (2021-10-23)
+
+ * Add `--sandbox` option (#5045).
+
+ + Add sandbox feature. When this option is used, readers and writers
+ only have access to input files (and other files specified directly on
+ command line). This restriction is enforced in the type system.
+ + Filters, PDF production, custom writers are unaffected. This
+ feature only insulates the actual readers and writers, not
+ the pipeline around them in Text.Pandoc.App.
+ + Note that when `--sandboxed` is specified, readers won't have
+ access to the resource path, nor will anything have access to
+ the user data directory.
+
+ * `--self-contained`: Fix bug that caused everything to be made a data
+ URI (#7635, #7367). We only need to use data URIs in certain cases, but
+ due to a bug they were being used always.
+
+ * Pandoc will now fall back to latin1 encoding for inputs that can't be
+ read as UTF-8. This is what it did previously for content fetched
+ from the web and not marked as to content type. It makes sense to do
+ the same for local files. In this case a `NotUTF8Encoded` warning
+ will be issued, indicating that pandoc is interpreting the input as latin1.
+
+ * Markdown reader:
+
+ + Don't parse links or bracketed spans as citations (#7632).
+ Previously pandoc would parse `[link to (@a)](url)` as a
+ citation; similarly `[(@a)]{#ident}`. This is undesirable. One should
+ be able to use example references in citations, and even if `@a` is
+ not defined as an example reference, `[@a](url)` should be a link
+ containing an author-in-text citation rather than a normal citation
+ followed by literal `(url)`.
+ + Fix interaction of `--strip-comments` and list parsing (#7521).
+ Use of `--strip-comments` was causing tight lists to be rendered as
+ loose (as if the comment were a blank line).
+ + Fix parsing bug for math in bracketed spans and links (#7623).
+ This affects math with unbalanced brackets (e.g. `$(0,1]$`)
+ inside links, images, bracketed spans.
+ + Fix code blocks using `--preserve-tabs` (#7573). Previously they
+ did not behave as the equivalent input with spaces would.
+
+ * DocBook reader:
+
+ + Honor linenumbering attribute (Samuel Tardieu).
+ The attribute DocBook `linenumbering="numbered"` on code blocks
+ maps to the `numberLines` class internally.
+
+ * LaTeX reader:
+
+ + Implement siunitx v3 commands (#7614).
+ We support `\unit`, `\qty`, `\qtyrange`, and `\qtylist`
+ as synonynms of `\si`, `\SI`, `\SIrange`, and `\SIlist`.
+ + Properly handle `\^` followed by group closing (#7615).
+ + Recognize that `\vadjust` sometimes takes "pre" (#7531).
+ + Ignore (and gobble parameters of) CSLReferences environment (#7531).
+ Otherwise we get the parameters as numbers in the output.
+ + Restrict `\endinput` to current file (Simun Schuster).
+
+ * RST reader: handle escaped colons in reference definitions (#7568).
+
+ * HTML reader:
+
+ + Handle empty tbody element in table (#7589).
+
+ * Ipynb reader (Kolen Cheung):
+
+ + Get cell output mime from `raw_mimetype` in addition to `format`.
+ (`format` is what the spec calls for, but `raw_mimetype` is
+ often used in practice; see jupyter/nbformat#229).
+ + Add more formats that can be handled as "raw" cells.
+ + Fix mime type for `rst`.
+ + Support `text/markdown`, which is now a supported mime type for raw
+ output (#7561).
+
+ * RTF reader:
+
+ + Support `\binN` for binary image data.
+ + If doc begins with {\rtf1 ... } only parse its contents.
+ Some documents seem to have non-RTF (e.g. XML) material after the
+ `{\rtf1 ... }` group.
+ + Ignore `\pgdsc` group. Otherwise we get style names treated as test.
+ + Better handling of `\*` and bookmarks. We now ensure that groups
+ starting with `\*` never cause text to be added to the document.
+ In addition, bookmarks now create a span between the start
+ and end of the bookmark, rather than an empty span.
+
+ * Docx reader:
+
+ + Avoid blockquote when parent style has more indent (Milan Bracke).
+ When a paragraph has an indentation different from the parent (named)
+ style, it used to be considered a blockquote. But this only makes sense
+ when the paragraph has more indentation. So this commit adds a check
+ for the indentation of the parent style.
+ + Fix handling of empty fields (Milan Bracke). Some fields only
+ have an `instrText` and no content, Pandoc didn't understand these,
+ causing other fields to be misunderstood because it seemed like
+ a field was still open when it wasn't.
+ + Implement PAGEREF fields (Milan Bracke). These fields, often used
+ in tables of contents, can be a hyperlink.
+ + Fix handling of nested fields (Milan Bracke). Fields delimited by
+ `fldChar` elements can contain other fields. Before, the nested
+ fields would be ignored, except for the end, which would be
+ considered the end of the parent field.
+ + Add placeholder for word diagram instead of just omitting it (Ezwal).
+
+ * Org reader:
+
+ + Don't parse a list as first item in a list item (#7557).
+ + Allow an initial `:PROPERTIES:` drawer to add to metadata (#7520).
+
+ * Docx writer:
+
+ + Make id used in `native_numbering` predictable (#7551).
+ If the image has the id IMAGEID, then we use the id ref_IMAGEID
+ for the figure number. This allows one to create a filter that
+ adds a figure number with figure name, e.g.
+ `<w:fldSimple w:instr=" REF ref_superfig "><w:r><w:t>Figure X</w:t>
+ </w:r></w:fldSimple>`.
+ If an image lack an id, an id of the form `ref_fig1` is used.
+ + Ensure we have unique ids for `wp:docPr` and `pic:cNvPr` elements
+ (#7527, #7503).
+ + Handle SVG images (#4058). This change has several parts:
+ - In Text.Pandoc.App, if the writer is docx, we fill the media
+ bag and attempt to convert any SVG images to PNG, adding these
+ to the media bag. The PNG backups have the same filenames as
+ the SVG images, but with an added .png extension. If the conversion
+ cannot be done (e.g. because rsvg-convert is not present),
+ a warning is omitted.
+ - In Text.Pandoc.Writers.Docx, we now use Word 2016's syntax for
+ including SVG images. If a PNG fallback is present in the media bag,
+ we include a link to that too.
+
+ * Powerpoint writer (Emily Bourke):
+
+ + Add support for more layouts (#5097). Up til now, four layouts
+ were supported: "Title Slide" (used for the automatically generated
+ metadata slide), "Section Header" (used for headings above slide
+ level), "Two Column" (used when there's a columns div), "Title and
+ Content" (used for all other slides). We now support three
+ additional layouts: "Comparison", "Content with Caption", and
+ "Blank". The manual describes the logic that determines which
+ layout is used for a slide. Layouts may be customized in the
+ reference doc.
+ + Support specifying slide background images using a `background-image`
+ attribute on the slide's heading. Only the "stretch" mode is supported,
+ and the background image is centred around the slide in the image's
+ larger axis, matching the observed default behaviour of PowerPoint.
+ + Add support for incremental lists (through same methods as in
+ other slide writers) (#5689).
+ + Copy embedded fonts from reference doc.
+ + Include all themes in output archive.
+ + Fix list level numbering (#4828, #4663). In PowerPoint,
+ the content of a top-level list is at the same level as the content
+ of a top-level paragraph: the only difference is that a list style
+ has been applied. Previously, the writer incremented the paragrap
+ h level on each list, turning what should be top-level lists into
+ second-level lists.
+ + Line up list continuation paragraphs. This commit
+ changes the `marL` and `indent` values used for plain paragraphs
+ and numbered lists, and changes the spacing defined in the
+ reference doc master for bulleted lists. For paragraphs, there is
+ now a left-indent taken from the `otherStyle` in the master.
+ For numbered lists, the number is positioned where the text would be
+ if this were a plain paragraph, and the text is indented to the next
+ level. This means that continuation paragraphs line up nicely with
+ numbered lists. Existing reference docs may need to be modified so
+ that `otherStyle` and `bodyStyle` indent levels match, for this
+ feature to work with them.
+ + Consolidate text runs when possible (jgm). This slims down the output
+ files by avoiding unnecessary text run elements.
+ + Support footers in the reference doc.
+ There is one behaviour which may not be immediately obvious: if the
+ reference doc specifies a fixed date (i.e. not automatically updating),
+ and there’s a date specified in the metadata for the document, the
+ footer date is replaced by the metadata date.
+ + Fix presentation rel numbering. Before now, the numbering of `rId`s
+ was inconsistent when making the presentation XML and when making
+ the presentation relationships XML.
+ + Don’t add relationships unnecessarily. Before now, for any layouts
+ added to the output from the default reference doc, the relationships
+ were unconditionally added to the output. However, if there was already
+ a layout in slideMaster1 at the same index then that results in
+ duplicate relationships.
+ + If slide level is 0, don't insert a slide break between a heading
+ and a following table, "columns" div, or paragraph starting
+ with an image.
+ + Fix capitalisation of `notesMasterId`.
+ + Restructure tests.
+
+ * Asciidoc writer:
+
+ + Translate numberLines attribute to `linesnum` switch (Samuel Tardieu).
+ + Improve escaping for `--` in URLs (#7529).
+
+ * LaTeX writer:
+
+ + Make babel use more idiomatic (#7604, hseg). Use babel's
+ bidi implementation. Import babel languages individually instead
+ of as package options. Move `header-includes` to after
+ `babel` setup so it can be modified.
+ + Use babel, not polyglossia, with xelatex. Previously polyglossia
+ worked better with xelatex, but that is no longer the case, so
+ we simplify the code so that babel is used with all latex
+ engines. This involves a change to the default LaTeX template.
+
+ * Markdown writer:
+
+ + Avoid bad wraps at the Doc Text level. Previously we tried to
+ do this at the Inline list level, but it makes more sense to
+ intervene on breaking spaces at the Doc Text level.
+ + Use `underline` class rather than `ul` for underline.
+ This only affects output with `bracketed_spans` enabled.
+ The markdown reader parses spans with either `.ul` or `.underline` as
+ Underline elements, but we're moving towards preferring the latter.
+
+ * RST writer:
+
+ + Properly handle anchors to ids with spaces or leading underscore
+ (#7593). In this cases we need the quoted form, e.g.
+ ```
+ .. _`foo bar`:
+
+ .. _`_foo`:
+ ```
+ Side note: rST will "normalize" these identifiers anyway,
+ ignoring the underscore.
+
+ * HTML writer:
+
+ + Render `\ref` and `\eqref` as inline math, not display (see #7589).
+ + Pass through `\ref` and `\eqref` if MathJax is used (#7587).
+ + Pass through inline math environments with KaTeX.
+ + Support `--reference-location` for HTML output (#7461,
+ Francesco Mazzoli).
+ + Set "hash" to True by default (for reveal.js) (#7574). See #6968
+ where the motivation for setting "hash" to True is explained.
+
+ * Native writer: Use pretty-show to format native output (#7580).
+ Previously we used our own homespun formatting. But this produces
+ over-long lines that aren't ideal for diffs in tests.
+ Performance is slower by about a factor of 10, but this isn't
+ really a problem because native isn't suitable as a serialization
+ format. (For serialization you should use json, because the reader
+ is so much faster than native.)
+
+ * Org writer:
+
+ + Don't indent contents of code blocks. We previously indented them
+ by two spaces, following a common convention. Since the convention
+ is fading, and the indentation is inconvenient for copy/paste, we are
+ discontinuing this practice.
+ + Update list of supported source languages in org writer (#5440).
+
+ * Ipynb writer (Kolen Cheung):
+
+ + Improve round trip identity for raw cell output.
+ See jupyter/nbformat#229. The Jupyter ecosystem, including nbconvert,
+ lab and notebook, deviated from their own spec in nbformat, where
+ they used the key `raw_mimetype` instead of `format`. Moreover,
+ the mime-type of rst used in Jupyter deviated from that suggested by
+ https://docutils.sourceforge.io/FAQ.html and is defined as
+ `text/restructuredtext` when chosen from "Raw NBConvert Format" in
+ Jupyter. The new behavior should matche the real world usage better,
+ hence improving the round-trip "identity" in raw-cell.
+ + Add more formats that can be handled as "raw" cells.
+
+ * EPUB writer:
+
+ + Add EPUB3 subject metadata (authority/term) (nuew).
+ This adds the ability to specify EPUB 3 `authority` and `term` specific
+ refinements to the `subject` tag. Specifying a plain `subject` tag in
+ metadata will function as before.
+ + Treat epub:type "frontispiece" as front matter (#7600).
+
+ * reveal.js template: Fix line numbers in source code (#7634).
+ We need `overflow: visible` for these to work, and reveal's
+ default css disables this. So we re-enable it in the default template.
+
+ * Text.Pandoc.Writers.Shared:
+
+ + Export `splitSentences` as a Doc Text transform [API change].
+ Use this in man/ms. We used to attempt automatic sentence
+ splitting in man and ms output, since sentence-ending
+ periods need to be followed by two spaces or a newline in
+ these formats. But it's difficult to do this reliably at
+ the level of `[Inline]`.
+
+ * Text.Pandoc.Translations: small revisions for compatibility
+ with aeson 2.
+
+ * Don't prepend `file://` to `--syntax-definition` on Windows (#6374).
+ This was a fix for a problem in skylighting, but this
+ problem doesn't exist now that we've moved from HXT to xml-conduit.
+
+ * Text.Pandoc.Extensions:
+
+ + Add `Ext_footnotes` to default `gfm` etxensions. Now `gfm`
+ supports footnotes.
+ + Alphabetize Extension constructors (also affects `--list-extensions`).
+
+ * Text.Pandoc.Citeproc.Util: Better implementation of `splitStrWhen`.
+ Previously the citeproc code had two less efficient
+ implementations.
+
+ * Update documentation for definition_list extension (#7594).
+ In 2015, we relaxed indentation requirements for the first
+ line of a definition (see commit d3544dc and issue #2087), but
+ the documnentation wasn't updated to reflect the change.
+
+ * Text.Pandoc.Citeproc.BibTeX: Fix expansion of special strings in series
+ e.g. `newseries` or `library` (#7591). Expansion should not happen
+ when these strings are protected in braces, or when they're
+ capitalized.
+
+ * Text.Pandoc.Logging: add `NotUTF8Encoded` constructor to `LogMessage`
+ [API change].
+
+ * Text.Pandoc.App.FormatHeuristics: remove `.tei.xml` extension for TEI
+ (#7630). This never worked, because `takeExtension`
+ only returns `.xml`. So it won't be missed if we remove it.
+
+ * Text.Pandoc.Image:
+
+ + Generalize `svgToPng` to MonadIO.
+ + `svgToPng`, change first parameter from WriterOptions to Int.
+
+ * Text.Pandoc.Class:
+
+ + Add `readStdinStrict` method to PandocMonad [API change].
+ + Generalize type of `extractMedia` [API change].
+ It was uselessly restricted to PandocIO, instead of any
+ instance of PandocMonad and MonadIO.
+
+ * Text.Pandoc.Class.PandocIO: derive MonadCatch, MonadThrow, MonadMask.
+ This allows us to use `withTempDir` [API change].
+
+ * Add module Text.Pandoc.Class.Sandbox, defining
+ `sandbox`. Exported via Text.Pandoc.Class. [API change]
+
+ * Text.Pandoc.Filter: Generalize type of `applyFilters`
+ from PandocIO to any instance of MonadIO and PandocMonad [API change].
+
+ * Text.Pandoc.PDF: generalize type of `makePDF`:
+ instead of PandocIO, it can be used in any instance of
+ PandocMonad, MonadIO, and MonadMask [API change].
+
+ * Lua subsystem and custom writers: generalize types from PandocIO
+ to any instance of PandocMonad and MonadIO [API change].
+ The type of `runLua` is now
+
+ (PandocMonad m, MonadIO m) =>
+ LuaE PandocError a -> m (Either PandocError a)
+
+ The change from `Lua` to `LuaE PandocError` is due to the switch to
+ hslua-2.0; see next item.
+
+ * Lua modules (Albert Krewinkel):
+
+ + Switch to hslua-2.0. The new HsLua version takes a somewhat different
+ approach to marshalling and unmarshalling, relying less on typeclasses
+ and more on specialized types. This allows for better performance and
+ improved error messages. Furthermore, new abstractions allow to
+ document the code and exposed functions.
+ + Marshal Version values, Inline elements, Attr elements,
+ and Pandoc elements as userdata.
+ + Remove deprecated inline constructors `DoubleQuoted`,
+ `SingleQuoted`, `DisplayMath`, and `InlineMath`.
+ + Attr values are no longer normalized when assigned to an Inline
+ element property.
+ + It's no longer possible to access parts of Inline elements via
+ numerical indexes. E.g., `pandoc.Span('test')[2]` used to give
+ `pandoc.Str 'test'`, but yields `nil` now. This was undocumented
+ behavior not intended to be used in user scripts. Use named properties
+ instead.
+ + Accessing `.c` to get a JSON-like tuple of all components no longer
+ works. This was undocumented behavior.
+ + Only known properties can be set on an element value. Trying to set a
+ different property will now raise an error.
+ + Adds a new `pandoc.AttributeList()` constructor, which creates the
+ associative attribute list that is used as the third component of
+ `Attr` values. Values of this type can often be passed to constructors
+ instead of `Attr` values.
+ + Convert IOErrors to PandocErrors in `pandoc.pipe` function (#7523).
+
+ * Text.Pandoc.PDF: Previously we had to run `runIOorExplode` inside
+ `withTempDir`. Now that PandocIO is an instance of MonadMask, this is
+ no longer necessary.
+
+ * Text.Pandoc.App:
+
+ + Reorganize to make it easier to limit IO in main loop.
+ Previously we used liftIO fairly liberally. The code has
+ been restructured to avoid this.
+ + Move output-file writing out of PandocMonad action.
+
+ * Text.Pandoc.App.OutputSettings: Generalize some types
+ so we can run this with any instance of PandocMonad and MonadIO,
+ not just PandocIO.
+
+ * Use `simpleFigure` builder in readers and `SimpleFigure`
+ pattern synonym in writers (Aner Lucero).
+
+ * Allow time 1.12.
+
+ * Use skylighting-0.12, skylighting-core-0.12.
+ This fixes highlighting issues with typescript, scala, and other
+ syntaxes that include keyword lists from different syntaxes.
+
+ * Use citeproc 0.6, commonmark 0.2.2.1, commonmark-extensions 0.2.2,
+ texmath 0.12.3.2, ipynb 0.1.0.2. (These changes also allow
+ building with aeson >= 2.)
+
+ * Require doclayout >= 0.3.1.1. This fixes recognition of "real widths"
+ of emoji characters, which is important for tabular layout.
+
+ * Cut out over 100K of fat in epub test golden files.
+
+ * Make `test/epub/wasteland.epub` valid.
+
+ * Add missing `%` on some command tests.
+ This prevented `--accept` from working properly.
+
+ * Command tests: raise error if command doesn't begin with `%`.
+
+ * OOXML tests: use pretty-printed form to display diffs.
+ Otherwise everything is on one line and the diff is uninformative.
+
+ * Fix compareXML helper in Tests.Writers.OOXML.
+ Given how it is used, we were getting "mine" and "good"
+ flipped in the test results.
+
+ * MANUAL.txt:
+
+ + Clarify `attributes` extension support (William Lupton).
+ + Document formats affected by `--reference-location`.
+ + Document error code 25
+ + Add some more info regarding `--slide-level=0` (Salim B).
+ + Add more to security section of manual.
+ + Mention support of `title-toc` (#7171, Christophe Dervieux).
+
+ * doc/lua-filters.md:
+
+ + Add missing type for Image title (Quinn).
+ + Improve order of Image fields (Quinn).
+ + Rephrase pandoc.path docs (#7548, Quinn).
+ + Do not leak working directory in TikZ filter (Jeroen de Haas).
+
+## pandoc 2.14.2 (2021-08-21)
+
+ * Allow `--slide-level=0` (#7476). When the slide level is set
+ to 0, headings won't be used at all in splitting the document
+ into slides. Horizontal rules must be used to separate slides.
+
+ * Add RTF reader (#3982). `rtf` is now supported as an input
+ format as well as an output format. New module
+ Text.Pandoc.Readers.RTF (exporting `readRTF`). [API change]
+
+ * HTML reader: treat comments as blank when parsing (#7482).
+
+ * Markdown reader:
+
+ + Fix raw LaTeX injection issue (#7497). Using a code block
+ containing `\end{verbatim}`, one could inject raw TeX into a
+ LaTeX document even when `raw_tex` is disabled. Thanks to
+ Augustin Laville for noticing the bug.
+ + Multimarkdown sub- and superscripts (#5512, OCzarnecki).
+ Added an extension `short_subsuperscripts` which modifies
+ the behavior of `subscript` and `superscript`, allowing
+ subscripts or superscripts containing only alphanumerics
+ to end with a space character (eg. `x^2 = 4` or `H~2 is
+ combustible`). This improves support for multimarkdown.
+
+ * RST reader: Fix `:literal:` includes (#7513). These should create
+ code blocks, not insert raw RST.
+
+ * LaTeX reader:
+
+ + Proper implicit grouping around environment macros.
+ + Support `\global` before `\def`, `\let`, etc. (#7494).
+ + Fix scope for LaTeX macros (#7494). They should by default
+ scope over the group in which they are defined (except `\gdef`
+ and `\xdef`, which are global). In addition, environments must
+ be treated as groups.
+ + Improve handling of plain TeX macro primitives (#7474).
+ Fixed semantics for `\let`.
+ + Implement `\edef`, `\gdef`, and `\xdef`.
+
+ * Docx reader: Improve docx reader's robustness in extracting
+ images (#7511). The docx reader made some assumptions about
+ how docx containers were laid out that were not always true, with
+ the result that some images in documents did not get
+ extracted.
+
+ * LaTeX writer: Increase table column width precision (#7466,
+ Peter Fabinski). In some cases, the rounding performed by the
+ LaTeX table writer would introduce visible overrun outside
+ the text area. This adds two more decimal places to the width
+ values.
+
+ * Powerpoint writer:
+
+ + Include image title in description (#7352, Emily Bourke). The
+ image title (i.e. `![alt text](link "title")`) was previously
+ ignored when writing to pptx. This commit includes it in
+ PowerPoint's description of the image, along with the link.
+ + Select layouts from reference doc by name (Emily Bourke). Until
+ now, users had to make sure that their reference doc contains
+ layouts in a specific order: the first four layouts in the file
+ had to have a specific structure. Now the layout selection uses
+ the layout names rather than order: users must make sure their
+ reference doc contains four layouts with specific names, and if
+ a layout with the right name isn’t found pandoc will emit
+ a warning and use the corresponding layout from the default
+ reference doc as a fallback.
+
+ * Docx writer: be sensitive to the `native_numbering` extension
+ (#7499). Figure and table numbers are now only included if
+ `native_numbering` is enabled. (By default it is disabled.)
+ This is a behavior change with respect to 2.14.1, but the
+ default behavior is now that of previous versions. The
+ change was necessary to avoid incompatibilities between
+ pandoc's native numbering and third-party cross reference
+ filters like pandoc-crossref.
+
+ * RTF writer:
+
+ + Omit `\bin` in `\pict`. According to the spec, this is not
+ needed or wanted when the data is in hexadecimal format, as
+ here.
+ + Emit `\outlinelevel`` for section headings.
+
+ * RTF template: specify font family for fixed-width font f1.
+ According to the spec, this is mandatory.
+
+ * LaTeX writer: Use ulem for underline (#7351). ulem is
+ conditionally included already when the `strikeout` variable
+ is set, so we set this when there is underlined text, and use
+ `\uline` instead of `\underline`. This fixes wrapping for
+ underlined text.
+
+ * Text.Pandoc.Citeproc:
+
+ + Revise citeproc code to fit new citeproc 0.5 API (thanks to
+ Benjamin Bray). Linkification of URLs in the bibliography
+ is now done in the citeproc library, depending on the
+ setting of an option. We set that option depending on the
+ value of the metadata field `link-bibliography` (defaulting
+ to true, for consistency with earlier behavior). If a DOI,
+ PMID, PMCID, or URL field is present but not explicitly
+ rendered, the title (or if no title, the whole entry) is
+ hyperlinked. These changes implement the recommendations
+ from the draft CSL v1.0.2 spec (Appendix VI):
+ <https://github.com/citation-style-language/documentation/blob/master/specification.rst#appendix-vi-links>
+ + Avoid odd handling of quotes. Recent citeproc changes
+ allow us to ignore Quoted elements; citeproc now uses its own
+ method for represented quoted things, and only localizes and
+ flipflops quotes it adds itself. Convert Quoted in bib
+ entries to special Spans before passing them off to
+ citeproc. This ensures that we get proper localization and
+ flipflopping if, e.g., quotes are used in titles
+ (jgm/citeproc#87).
+ + Removed quote localization from citeproc processing.
+ This is now done in citeproc itself.
+
+ * Text.Pandoc.Logging: Add PowerpointTemplateWarning log message
+ type [API change] (Emily Bourke).
+
+ * Text.Pandoc.Extension: Add `Ext_short_subsuperscripts`
+ constructor to `Extension` [API change] (OCzarnecki).
+
+ * Various sample.lua editorial fixes (#7493, #7487, William
+ Lupton).
+
+ * Bump base-compat version so we get compatibility with base 4.12.
+
+ * Use Prelude from base-compat for ghc 8.4 too.
+
+ * Add haskell-language-server to shell.nix (#7496, Emily Bourke).
+
+ * Tests.Helpers: export testGolden and use it in RTF reader.
+ This gives a diff output on failure.
+
+ * Remove obsolete and incorrect sentence in `--slide-level` docs.
+
+ * Add internal module Text.Pandoc.Network.HTTP, exporting
+ `urlEncode`.
+
+ * Text.Pandoc.Parsing: `parseFromString`: preserve at least
+ the source directory (#7464). Previously we just set the
+ source name to "chunk" when parsing from strings, to avoid
+ misleading source positions. This had the side effect that
+ `rebase_relative_paths` would break inside sections that
+ were parsed as strings. So, now we use
+ "ORIGINAL_SOURCE_PATH_chunk" instead of just "chunk".
+
+ * Text.Pandoc.MIME: use image/x-xcf instead of application/x-xcf
+ (#7454).
+
+ * Don’t compare `cdLine` in OOXML golden tests (Emily Bourke).
+ The `cdLine` field gives the line of the file some CData was
+ found on, which reflects irrelevant formatting differences.
+
+ * Provide more detailed XML diff in tests (Emily Bourke).
+
+ * OOXML tests: silence warnings. These can make the test output
+ confusing, making people think tests are failing when they're
+ passing.
+
+ * INSTALL.md: Add GitLab CI/CD example (#7448, Veratyr).
+
+ * MANUAL.txt
+
+ - Clarifications (William Lupton).
+ - Add a note on security risks of include directives.
+
+ * Document use of the 'underline' class (#7492, #7484, William
+ Lupton).
+
+ * Add a FAQ about the "Cannot allocate memory" error on M1 macs.
+
+ * Use texmath 0.12.3.1.
+
+ * Use released citeproc 0.5.
+
+ * Remove dependency on HTTP package (#7456, mt_caret).
+
+## pandoc 2.14.1 (2021-07-18)
+
+ * Text.Pandoc.ImageSize: Add Tiff constructor for ImageType (#7405)
+ [Minor API change]. This allows pandoc to get size information from
+ tiff images.
+
+ * Markdown reader: don't try to read contents in self-closing HTML tag.
+ Previously we had problems parsing raw HTML with self-closing
+ tags like `<col/>`. The problem was that pandoc would look
+ for a closing tag to close the markdown contents, but the
+ closing tag had, in effect, already been parsed by `htmlTag`.
+
+ * LaTeX reader:
+
+ + Avoid trailing hyphen in translating languages (#7447).
+ Previously `\foreignlanguage{english}` turned into `<span lang="en-">`.
+ The same issue affected Arabic.
+ + Support `\cline` in LaTeX tables (#7442).
+ + Improved parsing of raw LaTeX from Text streams (`rawLaTeXParser`,
+ used to read LaTeX in Markdown files, #7434). We now use source
+ positions from the token stream to tell us how much of the text stream
+ to consume. Getting this to work required a few other changes to
+ make token source positions accurate.
+
+ * DocBook reader:
+
+ + Handle images with imageobjectco elements (#7440).
+ + Add support for citerefentry (#7437, Jan Tojnar).
+
+ * RST reader: fix regression with code includes (#7436).
+ With the recent changes to include infrastructure,
+ included code blocks were getting an extra newline.
+
+ * HTML reader:
+
+ + Recognize data-external when reading HTML img tags (#7429,
+ Michael Hoffmann). Preserve all attributes in img tags. If attributes
+ have a `data-` prefix, it will be stripped. In particular, this
+ preserves a `data-external` attribute as an `external` attribute in
+ the pandoc AST.
+ + Add col, colgroup to 'closes' definitions
+
+ * HTML writer:
+
+ + Remove duplicated alt text in HTML output (Aner Lucero).
+ + Remove `aria-hidden` when explicit alt text is provided (Aner Lucero).
+ + Set boolean values for reveal.js variables.
+
+ * Docx writer:
+
+ + Add table numbering for captioned tables.
+ The numbers are added using fields, so that Word can
+ create a list of tables that will update automatically.
+ + Support figure numbers. These are set up in such a way that they
+ will work with Word's automatic table of figures (#7392).
+
+ * Markdown writer: put space between Plain and following fenced Div
+ (#4465).
+
+ * EPUB writer: Don't incorporate externally linked images in EPUB documents
+ (#7430, Michael Hoffmann). Just as it is possible to avoid incorporating
+ an image in EPUB by passing `data-external="1"` to a raw HTML snippet,
+ this makes the same possible for native Images, by looking for an
+ associated `external` attribute.
+
+ * Text.Pandoc.PDF:
+
+ + Fix `svgIn` path error (#7431). We were duplicating
+ the temp directory; this didn't cause problems on macOS or linux
+ because there we use absolute paths for the temp directory.
+ But on Windows it caused errors converting SVG files.
+ + `convertImage`: normalize paths (#7431). This will avoid paths
+ on Windows with mixed path separators.
+
+ * Text.Pandoc.Class: Always use / when adding directory to image destination
+ with `extractMedia`, even on Windows.
+
+ * Text.Pandoc.Citeproc:
+
+ + Allow `$` characters in bibtex keys (#7409).
+ + Set proper initial source name in parsing BibTeX (for better error
+ messages.)
+ + Revamp note citation handling (#7394). Use latest
+ citeproc, which uses a Span with a class rather than a Note for notes.
+ This helps us distinguish between user notes and citation notes. Don't
+ put citations at the beginning of a note in parentheses. Fix small bug
+ in handling of citations in notes, which led to commas at the end of
+ sentences in some cases.
+ + Cleanup and efficiency improvement in `deNote`.
+ + Improve punctuation moving with `--citeproc`. Previously, using
+ `--citeproc` could cause punctuation to move in quotes even when
+ there aer no citations. This has been changed; punctuation moving
+ is now limited to citations. In addition, we only move footnotes
+ around punctuation if the style is a note style, even if
+ `notes-after-punctuation` is `true`.
+
+ * Use citeproc 0.10. This helps improve note citations (see above)
+ and eliminates double hyperlinks in author-in-text citations.
+ Author-only citations are no longer hyperlinked. See jgm/citeproc#77.
+ It also fixes moving of punctuation inside quotes to conform to
+ the CSL spec: only comma and period are moved, not question
+ mark or exclamation point.
+
+ * Text.Pandoc.Error: fix line calculations in reporting parsec errors.
+ Also remove a spurious initial newline in the error report.
+
+ * Use doctemplates 0.4.1, which gives us better support for boolean
+ variable values. Previously `$if(foo)$` would evaluate to true
+ for variables with boolean `false` values, because it cared only
+ about the string rendering (#7402).
+
+ * Require commonmark-pandoc >= 0.2.2.1.
+ This fixes task lists with multiple paragraphs.
+
+ * Use skylighting 0.11.
+
+ * CSS in HTML template: reset overflow-wrap on code blocks
+ (Mauro Bieg, #7423).
+
+ * LaTeX template: Revert change in PR #7295: "move title, author, date up
+ to top of preamble." The change caused problem for people who used
+ LaTeX commands defined defined later in the preamble in the title
+ or author fields (#7422).
+
+ * Add `doc/faqs.md`. This is imported from the website; in the future the
+ website version will be drawn from here.
+ Added a FAQ on the use of `\AtEndPreamble` for cases when the contents of
+ `header-includes` need to refer to definitions that come later in the
+ preamble. See #7422.
+
+ * Upgrade Debian 10 AMI for build-arm.sh.
+
+ * CircleCI: change to using xcode 11.1.0 (macOS 10.14.4).
+ We previously built on 10.13, but 10.13 no longer gets
+ security updates and CirclCI is deprecating.
+
## pandoc 2.14.0.3 (2021-06-22)
* Text.Pandoc.MediaBag `insertMediaBag`: ensure we get a sane mediaPath
diff --git a/data/bash_completion.tpl b/data/bash_completion.tpl
index d065c34bb..440abc3e6 100644
--- a/data/bash_completion.tpl
+++ b/data/bash_completion.tpl
@@ -4,7 +4,7 @@
_pandoc()
{
- local cur prev opts lastc informats outformats datafiles
+ local cur prev opts lastc informats outformats highlight_styles datafiles
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
@@ -57,10 +57,18 @@ _pandoc()
COMPREPLY=( $(compgen -W "section chapter part" -- ${cur}) )
return 0
;;
- --highlight-style)
+ --highlight-style|--print-highlight-style)
COMPREPLY=( $(compgen -W "${highlight_styles}" -- ${cur}) )
return 0
;;
+ --eol)
+ COMPREPLY=( $(compgen -W "crlf lf native" -- ${cur}) )
+ return 0
+ ;;
+ --markdown-headings)
+ COMPREPLY=( $(compgen -W "setext atx" -- ${cur}) )
+ return 0
+ ;;
*)
;;
esac
diff --git a/data/creole.lua b/data/creole.lua
new file mode 100644
index 000000000..590dfc871
--- /dev/null
+++ b/data/creole.lua
@@ -0,0 +1,190 @@
+-- A sample custom reader for Creole 1.0 (common wiki markup)
+-- http://www.wikicreole.org/wiki/CheatSheet
+
+-- For better performance we put these functions in local variables:
+local P, S, R, Cf, Cc, Ct, V, Cs, Cg, Cb, B, C, Cmt =
+ lpeg.P, lpeg.S, lpeg.R, lpeg.Cf, lpeg.Cc, lpeg.Ct, lpeg.V,
+ lpeg.Cs, lpeg.Cg, lpeg.Cb, lpeg.B, lpeg.C, lpeg.Cmt
+
+local whitespacechar = S(" \t\r\n")
+local specialchar = S("/*~[]\\{}|")
+local wordchar = (1 - (whitespacechar + specialchar))
+local spacechar = S(" \t")
+local newline = P"\r"^-1 * P"\n"
+local blankline = spacechar^0 * newline
+local endline = newline * #-blankline
+local endequals = spacechar^0 * P"="^0 * spacechar^0 * newline
+local cellsep = spacechar^0 * P"|"
+
+local function trim(s)
+ return (s:gsub("^%s*(.-)%s*$", "%1"))
+end
+
+local function ListItem(lev, ch)
+ local start
+ if ch == nil then
+ start = S"*#"
+ else
+ start = P(ch)
+ end
+ local subitem = function(c)
+ if lev < 6 then
+ return ListItem(lev + 1, c)
+ else
+ return (1 - 1) -- fails
+ end
+ end
+ local parser = spacechar^0
+ * start^lev
+ * #(- start)
+ * spacechar^0
+ * Ct((V"Inline" - (newline * spacechar^0 * S"*#"))^0)
+ * newline
+ * (Ct(subitem("*")^1) / pandoc.BulletList
+ +
+ Ct(subitem("#")^1) / pandoc.OrderedList
+ +
+ Cc(nil))
+ / function (ils, sublist)
+ return { pandoc.Plain(ils), sublist }
+ end
+ return parser
+end
+
+-- Grammar
+G = P{ "Doc",
+ Doc = Ct(V"Block"^0)
+ / pandoc.Pandoc ;
+ Block = blankline^0
+ * ( V"Header"
+ + V"HorizontalRule"
+ + V"CodeBlock"
+ + V"List"
+ + V"Table"
+ + V"Para") ;
+ Para = Ct(V"Inline"^1)
+ * newline
+ / pandoc.Para ;
+ HorizontalRule = spacechar^0
+ * P"----"
+ * spacechar^0
+ * newline
+ / pandoc.HorizontalRule;
+ Header = (P("=")^1 / string.len)
+ * spacechar^1
+ * Ct((V"Inline" - endequals)^1)
+ * endequals
+ / pandoc.Header;
+ CodeBlock = P"{{{"
+ * blankline
+ * C((1 - (newline * P"}}}"))^0)
+ * newline
+ * P"}}}"
+ / pandoc.CodeBlock;
+ Placeholder = P"<<<"
+ * C(P(1) - P">>>")^0
+ * P">>>"
+ / function() return pandoc.Div({}) end;
+ List = V"BulletList"
+ + V"OrderedList" ;
+ BulletList = Ct(ListItem(1,'*')^1)
+ / pandoc.BulletList ;
+ OrderedList = Ct(ListItem(1,'#')^1)
+ / pandoc.OrderedList ;
+ Table = (V"TableHeader" + Cc{})
+ * Ct(V"TableRow"^1)
+ / function(headrow, bodyrows)
+ local numcolumns = #(bodyrows[1])
+ local aligns = {}
+ local widths = {}
+ for i = 1,numcolumns do
+ aligns[i] = pandoc.AlignDefault
+ widths[i] = 0
+ end
+ return pandoc.utils.from_simple_table(
+ pandoc.SimpleTable({}, aligns, widths, headrow, bodyrows))
+ end ;
+ TableHeader = Ct(V"HeaderCell"^1)
+ * cellsep^-1
+ * spacechar^0
+ * newline ;
+ TableRow = Ct(V"BodyCell"^1)
+ * cellsep^-1
+ * spacechar^0
+ * newline ;
+ HeaderCell = cellsep
+ * P"="
+ * spacechar^0
+ * Ct((V"Inline" - (newline + cellsep))^0)
+ / function(ils) return { pandoc.Plain(ils) } end ;
+ BodyCell = cellsep
+ * spacechar^0
+ * Ct((V"Inline" - (newline + cellsep))^0)
+ / function(ils) return { pandoc.Plain(ils) } end ;
+ Inline = V"Emph"
+ + V"Strong"
+ + V"LineBreak"
+ + V"Link"
+ + V"URL"
+ + V"Image"
+ + V"Str"
+ + V"Space"
+ + V"SoftBreak"
+ + V"Escaped"
+ + V"Placeholder"
+ + V"Code"
+ + V"Special" ;
+ Str = wordchar^1
+ / pandoc.Str;
+ Escaped = P"~"
+ * C(P(1))
+ / pandoc.Str ;
+ Special = specialchar
+ / pandoc.Str;
+ Space = spacechar^1
+ / pandoc.Space ;
+ SoftBreak = endline
+ * # -(V"HorizontalRule" + V"CodeBlock")
+ / pandoc.SoftBreak ;
+ LineBreak = P"\\\\"
+ / pandoc.LineBreak ;
+ Code = P"{{{"
+ * C((1 - P"}}}")^0)
+ * P"}}}"
+ / trim / pandoc.Code ;
+ Link = P"[["
+ * C((1 - (P"]]" + P"|"))^0)
+ * (P"|" * Ct((V"Inline" - P"]]")^1))^-1 * P"]]"
+ / function(url, desc)
+ local txt = desc or {pandoc.Str(url)}
+ return pandoc.Link(txt, url)
+ end ;
+ Image = P"{{"
+ * #-P"{"
+ * C((1 - (S"}"))^0)
+ * (P"|" * Ct((V"Inline" - P"}}")^1))^-1
+ * P"}}"
+ / function(url, desc)
+ local txt = desc or ""
+ return pandoc.Image(txt, url)
+ end ;
+ URL = P"http"
+ * P"s"^-1
+ * P":"
+ * (1 - (whitespacechar + (S",.?!:;\"'" * #whitespacechar)))^1
+ / function(url)
+ return pandoc.Link(pandoc.Str(url), url)
+ end ;
+ Emph = P"//"
+ * Ct((V"Inline" - P"//")^1)
+ * P"//"
+ / pandoc.Emph ;
+ Strong = P"**"
+ * Ct((V"Inline" -P"**")^1)
+ * P"**"
+ / pandoc.Strong ;
+}
+
+function Reader(input, reader_options)
+ return lpeg.match(G, tostring(input))
+end
diff --git a/data/pandoc.List.lua b/data/pandoc.List.lua
deleted file mode 100644
index b33c30876..000000000
--- a/data/pandoc.List.lua
+++ /dev/null
@@ -1,142 +0,0 @@
---[[
-List.lua
-
-Copyright © 2017–2020 Albert Krewinkel
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ]]
-
---- Pandoc's List type and helper methods
--- @classmod pandoc.List
--- @author Albert Krewinkel
--- @copyright © 2017–2020 Albert Krewinkel
--- @license MIT
-local List = {
- _VERSION = "1.0.0"
-}
-
---- Create a new list.
--- @param[opt] o table that should be altered into a list (default: `{}`)
--- @return the altered input table
-function List:new (o)
- o = o or {}
- setmetatable(o, self)
- self.__index = self
- return o
-end
-
---- Concatenates two lists.
--- @param list second list concatenated to the first
--- @return a new list containing all elements from list1 and list2
-function List:__concat (list)
- local res = List.clone(self)
- List.extend(res, list)
- return res
-end
-
---- Returns a (shallow) copy of the list.
-function List:clone ()
- local lst = setmetatable({}, getmetatable(self))
- List.extend(lst, self)
- return lst
-end
-
---- Adds the given list to the end of this list.
--- @param list list to appended
-function List:extend (list)
- for i = 1, #list do
- self[#self + 1] = list[i]
- end
-end
-
---- Returns a new list containing all items satisfying a given condition.
--- @param pred condition items must satisfy.
--- @return a new list containing all items for which `test` was true.
-function List:filter (pred)
- local res = setmetatable({}, getmetatable(self))
- for i = 1, #self do
- if pred(self[i], i) then
- res[#res + 1] = self[i]
- end
- end
- return res
-end
-
---- Returns the value and index of the first occurrence of the given item.
--- @param needle item to search for
--- @param[opt] init index at which the search is started (default: 1)
--- @return first item equal to the needle, or nil if no such item exists.
--- @return index of that element
-function List:find (needle, init)
- return List.find_if(self, function(x) return x == needle end, init)
-end
-
---- Returns the value and index of the first element for which the predicate
---- holds true.
--- @param pred the predicate function
--- @param[opt] init index at which the search is started (default: 1)
--- @return first item for which `test` succeeds, or nil if no such item exists.
--- @return index of that element
-function List:find_if (pred, init)
- init = (init == nil and 1) or (init < 0 and #self - init) or init
- for i = init, #self do
- if pred(self[i], i) then
- return self[i], i
- end
- end
- return nil
-end
-
---- Checks if the list has an item equal to the given needle.
--- @param needle item to search for
--- @param[opt] init index at which the search is started; defaults to 1.
--- @return true if a list item is equal to the needle, false otherwise
-function List:includes (needle, init)
- return not (List.find(self, needle, init) == nil)
-end
-
---- Insert an element into the list. Alias for `table.insert`.
--- @param list list
--- @param[opt] pos position at which the new element is to be inserted
--- @param value value to insert
-List.insert = table.insert
-
---- Returns a copy of the current list by applying the given function to
--- all elements.
--- @param fn function which is applied to all list items.
-function List:map (fn)
- local res = setmetatable({}, getmetatable(self))
- for i = 1, #self do
- res[i] = fn(self[i], i)
- end
- return res
-end
-
---- Remove element from list (alias for `table.remove`)
--- @param list list
--- @param[opt] pos position of the element to be removed (default: #list)
--- @return the removed element
-List.remove = table.remove
-
---- Sort list in-place (alias for `table.sort`)
--- @param list list
--- @param[opt] comp comparison function; default to `<` operator.
-List.sort = table.sort
-
--- Set metatable with __call metamethod. This allows the use of `List`
--- as a constructor function.
-local ListMT = {
- __call = List.new
-}
-setmetatable(List, ListMT)
-
-return List
diff --git a/data/pandoc.lua b/data/pandoc.lua
deleted file mode 100644
index 35ca20a84..000000000
--- a/data/pandoc.lua
+++ /dev/null
@@ -1,1169 +0,0 @@
---[[
-pandoc.lua
-
-Copyright © 2017–2019 Albert Krewinkel
-
-Permission to use, copy, modify, and/or distribute this software for any purpose
-with or without fee is hereby granted, provided that the above copyright notice
-and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
-OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-THIS SOFTWARE.
-]]
-
----
--- Lua functions for pandoc scripts.
---
--- @author Albert Krewinkel
--- @copyright © 2017–2019 Albert Krewinkel
--- @license MIT
-local M = {}
-
--- Re-export bundled modules
-M.List = require 'pandoc.List'
-M.mediabag = require 'pandoc.mediabag'
-M.system = require 'pandoc.system'
-M.types = require 'pandoc.types'
-M.utils = require 'pandoc.utils'
-M.text = require 'text'
-
--- Local names for modules which this module depends on.
-local List = M.List
-local utils = M.utils
-
-
-------------------------------------------------------------------------
--- Accessor objects
---
--- Create metatables which allow to access numerical indices via accessor
--- methods.
--- @section
--- @local
-
---- Create a new indexing function.
--- @param template function template
--- @param indices list of indices, starting with the most deeply nested
--- @return newly created function
--- @local
-function make_indexing_function(template, ...)
- local indices = {...}
- local loadstring = loadstring or load
- local bracketed = {}
- for i = 1, #indices do
- local idx = indices[#indices - i + 1]
- bracketed[i] = type(idx) == 'number'
- and string.format('[%d]', idx)
- or string.format('.%s', idx)
- end
- local fnstr = string.format('return ' .. template, table.concat(bracketed))
- return assert(loadstring(fnstr))()
-end
-
---- Create accessor functions using a function template.
--- @param fn_template function template in which '%s' is replacd with indices
--- @param accessors list of accessors
--- @return mapping from accessor names to accessor functions
--- @local
-local function create_accessor_functions (fn_template, accessors)
- local res = {}
- function add_accessors(acc, ...)
- if type(acc) == 'string' then
- res[acc] = make_indexing_function(fn_template, ...)
- elseif type(acc) == 'table' and #acc == 0 and next(acc) then
- -- Named substructure: the given names are accessed via the substructure,
- -- but the accessors are also added to the result table, enabling direct
- -- access from the parent element. Mainly used for `attr`.
- local name, substructure = next(acc)
- res[name] = make_indexing_function(fn_template, ...)
- for _, subname in ipairs(substructure) do
- res[subname] = make_indexing_function(fn_template, subname, ...)
- end
- else
- for i = 1, #(acc or {}) do
- add_accessors(acc[i], i, ...)
- end
- end
- end
- add_accessors(accessors)
- return res
-end
-
---- Get list of top-level fields from field descriptor table.
--- E.g.: `top_level_fields{'foo', {bar='baz'}, {'qux', 'quux'}}`
--- gives {'foo, 'bar', 'qux', 'quux'}
--- @local
-local function top_level_fields (fields)
- local result = List:new{}
- for _, v in ipairs(fields) do
- if type(v) == 'string' then
- table.insert(result, v)
- elseif type(v) == 'table' and #v == 0 and next(v) then
- table.insert(result, (next(v)))
- else
- result:extend(top_level_fields(v))
- end
- end
- return result
-end
-
---- Creates a function which behaves like next, but respects field names.
--- @local
-local function make_next_function (fields)
- local field_indices = {}
- for i, f in ipairs(fields) do
- field_indices[f] = i
- end
-
- return function (t, field)
- local raw_idx = field == nil and 0 or field_indices[field]
- local next_field = fields[raw_idx + 1]
- return next_field, t[next_field]
- end
-end
-
---- Create a new table which allows to access numerical indices via accessor
--- functions.
--- @local
-local function create_accessor_behavior (tag, accessors)
- local behavior = {tag = tag}
- behavior.getters = create_accessor_functions(
- 'function (x) return x.c%s end',
- accessors
- )
- behavior.setters = create_accessor_functions(
- 'function (x, v) x.c%s = v end',
- accessors
- )
- behavior.__eq = utils.equals
- behavior.__index = function(t, k)
- if getmetatable(t).getters[k] then
- return getmetatable(t).getters[k](t)
- elseif k == "t" then
- return getmetatable(t)["tag"]
- else
- return getmetatable(t)[k]
- end
- end
- behavior.__newindex = function(t, k, v)
- if getmetatable(t).setters[k] then
- getmetatable(t).setters[k](t, v)
- else
- rawset(t, k, v)
- end
- end
- behavior.__pairs = function (t)
- if accessors == nil then
- return next, t
- end
- local iterable_fields = type(accessors) == 'string'
- and {accessors}
- or top_level_fields(accessors)
- return make_next_function(iterable_fields), t
- end
- return behavior
-end
-
-
-------------------------------------------------------------------------
--- The base class for types
--- @type Type
--- @local
-local Type = {}
-Type.name = 'Type'
-Type.__index = Type
-Type.behavior = {
- __type = Type,
- new = function (obj)
- obj = obj or {}
- setmetatable(obj, self)
- return obj
- end
-}
-Type.behavior.__index = Type.behavior
-
---- Set a new behavior for the type, inheriting that of the parent type if none
---- is specified explicitly
--- @param behavior the behavior object for this type.
--- @local
-function Type:set_behavior (behavior)
- behavior = behavior or {}
- behavior.__index = rawget(behavior, '__index') or behavior
- behavior.__type = self
- if not getmetatable(behavior) and getmetatable(self) then
- setmetatable(behavior, getmetatable(self).behavior)
- end
- self.behavior = behavior
-end
-
---- Create a new subtype, using the given table as base.
--- @param name name of the new type
--- @param[opt] behavior behavioral object for the new type.
--- @return a new type
--- @local
-function Type:make_subtype(name, behavior)
- local newtype = setmetatable({}, self)
- newtype.name = name
- newtype.__index = newtype
- newtype:set_behavior(behavior)
- return newtype
-end
-
-
-------------------------------------------------------------------------
--- The base class for pandoc's AST elements.
--- @type AstElement
--- @local
-local AstElement = Type:make_subtype 'AstElement'
-AstElement.__call = function(t, ...)
- local success, ret = pcall(t.new, t, ...)
- if success then
- return setmetatable(ret, t.behavior)
- else
- error(string.format('Constructor for %s failed: %s\n', t.name, ret))
- end
-end
-
---- Make a new subtype which constructs a new value when called.
--- @local
-function AstElement:make_subtype(...)
- local newtype = Type.make_subtype(self, ...)
- newtype.__call = self.__call
- return newtype
-end
-
---- Create a new constructor
--- @local
--- @param tag Tag used to identify the constructor
--- @param fn Function to be called when constructing a new element
--- @param accessors names to use as accessors for numerical fields
--- @return function that constructs a new element
-function AstElement:create_constructor(tag, fn, accessors)
- local constr = self:make_subtype(tag, create_accessor_behavior(tag, accessors))
- function constr:new(...)
- return setmetatable(fn(...), self.behavior)
- end
- self.constructor = self.constructor or {}
- self.constructor[tag] = constr
- return constr
-end
-
---- Convert AstElement input into a list if necessary.
--- @local
-local function ensureList (x)
- if x.tag then
- -- Lists are not tagged, but all elements are
- return List:new{x}
- else
- return List:new(x)
- end
-end
-
---- Ensure a given object is an Inline element, or convert it into one.
--- @local
-local function ensureInlineList (x)
- if type(x) == 'string' then
- return List:new{M.Str(x)}
- else
- return ensureList(x)
- end
-end
-
---- Ensure that the given object is a definition pair, convert if necessary.
--- @local
-local function ensureDefinitionPairs (pair)
- local inlines = ensureInlineList(pair[1] or {})
- local blocks = ensureList(pair[2] or {}):map(ensureList)
- return {inlines, blocks}
-end
-
---- Split a string into it's words, using whitespace as separators.
-local function words (str)
- local ws = {}
- for w in str:gmatch("([^%s]+)") do ws[#ws + 1] = w end
- return ws
-end
-
---- Try hard to turn the arguments into an Attr object.
-local function ensureAttr(attr)
- if type(attr) == 'table' then
- if #attr > 0 then return M.Attr(table.unpack(attr)) end
-
- -- assume HTML-like key-value pairs
- local ident = attr.id or ''
- local classes = words(attr.class or '')
- local attributes = attr
- attributes.id = nil
- attributes.class = nil
- return M.Attr(ident, classes, attributes)
- elseif attr == nil then
- return M.Attr()
- elseif type(attr) == 'string' then
- -- treat argument as ID
- return M.Attr(attr)
- end
- -- print(arg, ...)
- error('Could not convert to Attr')
-end
-
-------------------------------------------------------------------------
---- Pandoc Document
--- @section document
-
---- A complete pandoc document
--- @function Pandoc
--- @tparam {Block,...} blocks document content
--- @tparam[opt] Meta meta document meta data
-M.Pandoc = AstElement:make_subtype'Pandoc'
-M.Pandoc.behavior.clone = M.types.clone.Pandoc
-function M.Pandoc:new (blocks, meta)
- return {
- blocks = ensureList(blocks),
- meta = meta or {},
- }
-end
-
--- DEPRECATED synonym:
-M.Doc = M.Pandoc
-
-------------------------------------------------------------------------
--- Meta
--- @section Meta
-
---- Create a new Meta object. It sets the metatable of the given table to
---- `Meta`.
--- @function Meta
--- @tparam meta table table containing document meta information
-M.Meta = AstElement:make_subtype'Meta'
-M.Meta.behavior.clone = M.types.clone.Meta
-function M.Meta:new (meta) return meta end
-
-
-------------------------------------------------------------------------
--- MetaValue
--- @section MetaValue
-M.MetaValue = AstElement:make_subtype('MetaValue')
-M.MetaValue.behavior.clone = M.types.clone.MetaValue
-
---- Meta blocks
--- @function MetaBlocks
--- @tparam {Block,...} blocks blocks
-M.MetaBlocks = M.MetaValue:create_constructor(
- 'MetaBlocks',
- function (content) return ensureList(content) end
-)
-
---- Meta inlines
--- @function MetaInlines
--- @tparam {Inline,...} inlines inlines
-M.MetaInlines = M.MetaValue:create_constructor(
- 'MetaInlines',
- function (content) return ensureInlineList(content) end
-)
-
---- Meta list
--- @function MetaList
--- @tparam {MetaValue,...} meta_values list of meta values
-M.MetaList = M.MetaValue:create_constructor(
- 'MetaList',
- function (content)
- if content.tag == 'MetaList' then
- return content
- end
- return ensureList(content)
- end
-)
-for k, v in pairs(List) do
- M.MetaList.behavior[k] = v
-end
-
---- Meta map
--- @function MetaMap
--- @tparam table key_value_map a string-indexed map of meta values
-M.MetaMap = M.MetaValue:create_constructor(
- "MetaMap",
- function (mm) return mm end
-)
-
---- Creates string to be used in meta data.
--- Does nothing, lua strings are meta strings.
--- @function MetaString
--- @tparam string str string value
-function M.MetaString(str)
- return str
-end
-
---- Creates boolean to be used in meta data.
--- Does nothing, lua booleans are meta booleans.
--- @function MetaBool
--- @tparam boolean bool boolean value
-function M.MetaBool(bool)
- return bool
-end
-
-------------------------------------------------------------------------
--- Blocks
--- @section Block
-
---- Block elements
-M.Block = AstElement:make_subtype'Block'
-M.Block.behavior.clone = M.types.clone.Block
-
---- Creates a block quote element
--- @function BlockQuote
--- @tparam {Block,...} content block content
--- @treturn Block block quote element
-M.BlockQuote = M.Block:create_constructor(
- "BlockQuote",
- function(content) return {c = ensureList(content)} end,
- "content"
-)
-
---- Creates a bullet (i.e. unordered) list.
--- @function BulletList
--- @tparam {{Block,...},...} content list of items
--- @treturn Block bullet list element
-M.BulletList = M.Block:create_constructor(
- "BulletList",
- function(content) return {c = ensureList(content):map(ensureList)} end,
- "content"
-)
-
---- Creates a code block element
--- @function CodeBlock
--- @tparam string text code string
--- @tparam[opt] Attr attr element attributes
--- @treturn Block code block element
-M.CodeBlock = M.Block:create_constructor(
- "CodeBlock",
- function(text, attr) return {c = {ensureAttr(attr), text}} end,
- {{attr = {"identifier", "classes", "attributes"}}, "text"}
-)
-
---- Creates a definition list, containing terms and their explanation.
--- @function DefinitionList
--- @tparam {{{Inline,...},{{Block,...}}},...} content list of items
--- @treturn Block definition list element
-M.DefinitionList = M.Block:create_constructor(
- "DefinitionList",
- function(content)
- return {c = ensureList(content):map(ensureDefinitionPairs)}
- end,
- "content"
-)
-
---- Creates a div element
--- @function Div
--- @tparam {Block,...} content block content
--- @tparam[opt] Attr attr element attributes
--- @treturn Block div element
-M.Div = M.Block:create_constructor(
- "Div",
- function(content, attr)
- return {c = {ensureAttr(attr), ensureList(content)}}
- end,
- {{attr = {"identifier", "classes", "attributes"}}, "content"}
-)
-
---- Creates a header element.
--- @function Header
--- @tparam int level header level
--- @tparam {Inline,...} content inline content
--- @tparam[opt] Attr attr element attributes
--- @treturn Block header element
-M.Header = M.Block:create_constructor(
- "Header",
- function(level, content, attr)
- return {c = {level, ensureAttr(attr), ensureInlineList(content)}}
- end,
- {"level", {attr = {"identifier", "classes", "attributes"}}, "content"}
-)
-
---- Creates a horizontal rule.
--- @function HorizontalRule
--- @treturn Block horizontal rule
-M.HorizontalRule = M.Block:create_constructor(
- "HorizontalRule",
- function() return {} end
-)
-
---- Creates a line block element.
--- @function LineBlock
--- @tparam {{Inline,...},...} content inline content
--- @treturn Block line block element
-M.LineBlock = M.Block:create_constructor(
- "LineBlock",
- function(content) return {c = ensureList(content):map(ensureInlineList)} end,
- "content"
-)
-
---- Creates a null element.
--- @function Null
--- @treturn Block null element
-M.Null = M.Block:create_constructor(
- "Null",
- function() return {} end
-)
-
---- Creates an ordered list.
--- @function OrderedList
--- @tparam {{Block,...},...} items list items
--- @param[opt] listAttributes list parameters
--- @treturn Block ordered list element
-M.OrderedList = M.Block:create_constructor(
- "OrderedList",
- function(items, listAttributes)
- listAttributes = listAttributes or M.ListAttributes()
- return {c = {listAttributes, ensureList(items):map(ensureList)}}
- end,
- {{listAttributes = {"start", "style", "delimiter"}}, "content"}
-)
-
---- Creates a para element.
--- @function Para
--- @tparam {Inline,...} content inline content
--- @treturn Block paragraph element
-M.Para = M.Block:create_constructor(
- "Para",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates a plain element.
--- @function Plain
--- @tparam {Inline,...} content inline content
--- @treturn Block plain element
-M.Plain = M.Block:create_constructor(
- "Plain",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates a raw content block of the specified format.
--- @function RawBlock
--- @tparam string format format of content
--- @tparam string text string content
--- @treturn Block raw block element
-M.RawBlock = M.Block:create_constructor(
- "RawBlock",
- function(format, text) return {c = {format, text}} end,
- {"format", "text"}
-)
-
---- Creates a table element.
--- @function Table
--- @tparam Caption caption table caption
--- @tparam {ColSpec,...} colspecs column alignments and widths
--- @tparam TableHead head table head
--- @tparam {TableBody,..} bodies table bodies
--- @treturn TableFoot foot table foot
--- @tparam[opt] Attr attr attributes
-M.Table = M.Block:create_constructor(
- "Table",
- function(caption, colspecs, head, bodies, foot, attr)
- return {
- c = {
- ensureAttr(attr),
- caption,
- List:new(colspecs),
- head,
- List:new(bodies),
- foot
- }
- }
- end,
- {"attr", "caption", "colspecs", "head", "bodies", "foot"}
-)
-
-
-------------------------------------------------------------------------
--- Inline
--- @section Inline
-
---- Inline element class
-M.Inline = AstElement:make_subtype'Inline'
-M.Inline.behavior.clone = M.types.clone.Inline
-
---- Creates a Cite inline element
--- @function Cite
--- @tparam {Inline,...} content List of inlines
--- @tparam {Citation,...} citations List of citations
--- @treturn Inline citations element
-M.Cite = M.Inline:create_constructor(
- "Cite",
- function(content, citations)
- return {c = {ensureList(citations), ensureInlineList(content)}}
- end,
- {"citations", "content"}
-)
-
---- Creates a Code inline element
--- @function Code
--- @tparam string text code string
--- @tparam[opt] Attr attr additional attributes
--- @treturn Inline code element
-M.Code = M.Inline:create_constructor(
- "Code",
- function(text, attr) return {c = {ensureAttr(attr), text}} end,
- {{attr = {"identifier", "classes", "attributes"}}, "text"}
-)
-
---- Creates an inline element representing emphasised text.
--- @function Emph
--- @tparam {Inline,..} content inline content
--- @treturn Inline emphasis element
-M.Emph = M.Inline:create_constructor(
- "Emph",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates a Image inline element
--- @function Image
--- @tparam {Inline,..} caption text used to describe the image
--- @tparam string src path to the image file
--- @tparam[opt] string title brief image description
--- @tparam[opt] Attr attr additional attributes
--- @treturn Inline image element
-M.Image = M.Inline:create_constructor(
- "Image",
- function(caption, src, title, attr)
- title = title or ""
- return {c = {ensureAttr(attr), ensureInlineList(caption), {src, title}}}
- end,
- {{attr = {"identifier", "classes", "attributes"}}, "caption", {"src", "title"}}
-)
-
---- Create a LineBreak inline element
--- @function LineBreak
--- @treturn Inline linebreak element
-M.LineBreak = M.Inline:create_constructor(
- "LineBreak",
- function() return {} end
-)
-
---- Creates a link inline element, usually a hyperlink.
--- @function Link
--- @tparam {Inline,..} content text for this link
--- @tparam string target the link target
--- @tparam[opt] string title brief link description
--- @tparam[opt] Attr attr additional attributes
--- @treturn Inline image element
-M.Link = M.Inline:create_constructor(
- "Link",
- function(content, target, title, attr)
- title = title or ""
- attr = ensureAttr(attr)
- return {c = {attr, ensureInlineList(content), {target, title}}}
- end,
- {{attr = {"identifier", "classes", "attributes"}}, "content", {"target", "title"}}
-)
-
---- Creates a Math element, either inline or displayed.
--- @function Math
--- @tparam "InlineMath"|"DisplayMath" mathtype rendering specifier
--- @tparam string text Math content
--- @treturn Inline Math element
-M.Math = M.Inline:create_constructor(
- "Math",
- function(mathtype, text)
- return {c = {mathtype, text}}
- end,
- {"mathtype", "text"}
-)
---- Creates a DisplayMath element (DEPRECATED).
--- @function DisplayMath
--- @tparam string text Math content
--- @treturn Inline Math element
-M.DisplayMath = M.Inline:create_constructor(
- "DisplayMath",
- function(text) return M.Math("DisplayMath", text) end,
- {"mathtype", "text"}
-)
---- Creates an InlineMath inline element (DEPRECATED).
--- @function InlineMath
--- @tparam string text Math content
--- @treturn Inline Math element
-M.InlineMath = M.Inline:create_constructor(
- "InlineMath",
- function(text) return M.Math("InlineMath", text) end,
- {"mathtype", "text"}
-)
-
---- Creates a Note inline element
--- @function Note
--- @tparam {Block,...} content footnote block content
-M.Note = M.Inline:create_constructor(
- "Note",
- function(content) return {c = ensureList(content)} end,
- "content"
-)
-
---- Creates a Quoted inline element given the quote type and quoted content.
--- @function Quoted
--- @tparam "DoubleQuote"|"SingleQuote" quotetype type of quotes to be used
--- @tparam {Inline,..} content inline content
--- @treturn Inline quoted element
-M.Quoted = M.Inline:create_constructor(
- "Quoted",
- function(quotetype, content)
- return {c = {quotetype, ensureInlineList(content)}}
- end,
- {"quotetype", "content"}
-)
---- Creates a single-quoted inline element (DEPRECATED).
--- @function SingleQuoted
--- @tparam {Inline,..} content inline content
--- @treturn Inline quoted element
--- @see Quoted
-M.SingleQuoted = M.Inline:create_constructor(
- "SingleQuoted",
- function(content) return M.Quoted(M.SingleQuote, content) end,
- {"quotetype", "content"}
-)
---- Creates a single-quoted inline element (DEPRECATED).
--- @function DoubleQuoted
--- @tparam {Inline,..} content inline content
--- @treturn Inline quoted element
--- @see Quoted
-M.DoubleQuoted = M.Inline:create_constructor(
- "DoubleQuoted",
- function(content) return M.Quoted("DoubleQuote", content) end,
- {"quotetype", "content"}
-)
-
---- Creates a RawInline inline element
--- @function RawInline
--- @tparam string format format of the contents
--- @tparam string text string content
--- @treturn Inline raw inline element
-M.RawInline = M.Inline:create_constructor(
- "RawInline",
- function(format, text) return {c = {format, text}} end,
- {"format", "text"}
-)
-
---- Creates text rendered in small caps
--- @function SmallCaps
--- @tparam {Inline,..} content inline content
--- @treturn Inline smallcaps element
-M.SmallCaps = M.Inline:create_constructor(
- "SmallCaps",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates a SoftBreak inline element.
--- @function SoftBreak
--- @treturn Inline softbreak element
-M.SoftBreak = M.Inline:create_constructor(
- "SoftBreak",
- function() return {} end
-)
-
---- Create a Space inline element
--- @function Space
--- @treturn Inline space element
-M.Space = M.Inline:create_constructor(
- "Space",
- function() return {} end
-)
-
---- Creates a Span inline element
--- @function Span
--- @tparam {Inline,..} content inline content
--- @tparam[opt] Attr attr additional attributes
--- @treturn Inline span element
-M.Span = M.Inline:create_constructor(
- "Span",
- function(content, attr)
- return {c = {ensureAttr(attr), ensureInlineList(content)}}
- end,
- {{attr = {"identifier", "classes", "attributes"}}, "content"}
-)
-
---- Creates a Str inline element
--- @function Str
--- @tparam string text content
--- @treturn Inline string element
-M.Str = M.Inline:create_constructor(
- "Str",
- function(text) return {c = text} end,
- "text"
-)
-
---- Creates text which is striked out.
--- @function Strikeout
--- @tparam {Inline,..} content inline content
--- @treturn Inline strikeout element
-M.Strikeout = M.Inline:create_constructor(
- "Strikeout",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates a Strong element, whose text is usually displayed in a bold font.
--- @function Strong
--- @tparam {Inline,..} content inline content
--- @treturn Inline strong element
-M.Strong = M.Inline:create_constructor(
- "Strong",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates a Subscript inline element
--- @function Subscript
--- @tparam {Inline,..} content inline content
--- @treturn Inline subscript element
-M.Subscript = M.Inline:create_constructor(
- "Subscript",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates a Superscript inline element
--- @function Superscript
--- @tparam {Inline,..} content inline content
--- @treturn Inline superscript element
-M.Superscript = M.Inline:create_constructor(
- "Superscript",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
---- Creates an Underline inline element
--- @function Underline
--- @tparam {Inline,..} content inline content
--- @treturn Inline underline element
-M.Underline = M.Inline:create_constructor(
- "Underline",
- function(content) return {c = ensureInlineList(content)} end,
- "content"
-)
-
-
-------------------------------------------------------------------------
--- Element components
--- @section components
-
---- Check if the first element of a pair matches the given value.
--- @param x key value to be checked
--- @return function returning true iff first element of its argument matches x
--- @local
-local function assoc_key_equals (x)
- return function (y) return y[1] == x end
-end
-
---- Lookup a value in an associative list
--- @function lookup
--- @local
--- @tparam {{key, value},...} alist associative list
--- @param key key for which the associated value is to be looked up
-local function lookup(alist, key)
- return (List.find_if(alist, assoc_key_equals(key)) or {})[2]
-end
-
---- Return an iterator which returns key-value pairs of an associative list.
--- @function apairs
--- @local
--- @tparam {{key, value},...} alist associative list
-local apairs = function (alist)
- local i = 1
- local cur
- function nxt ()
- cur = rawget(alist, i)
- if cur then
- i = i + 1
- return cur[1], cur[2]
- end
- return nil
- end
- return nxt, nil, nil
-end
-
---- AttributeList, a metatable to allow table-like access to attribute lists
--- represented by associative lists.
--- @local
-local AttributeList = {
- __index = function (t, k)
- if type(k) == "number" then
- return rawget(t, k)
- else
- return lookup(t, k)
- end
- end,
-
- __newindex = function (t, k, v)
- local cur, idx = List.find_if(t, assoc_key_equals(k))
- if v == nil and not cur then
- -- deleted key does not exists in list
- return
- elseif v == nil then
- table.remove(t, idx)
- elseif cur then
- cur[2] = v
- elseif type(k) == "number" then
- rawset(t, k, v)
- else
- rawset(t, #t + 1, {k, v})
- end
- end,
-
- __pairs = apairs
-}
-
---- Convert a table to an associative list. The order of key-value pairs in the
--- alist is undefined. The table should either contain no numeric keys or
--- already be an associative list.
--- @local
--- @tparam table tbl associative list or table without numeric keys.
--- @treturn table associative list
-local to_alist = function (tbl)
- if #tbl ~= 0 or next(tbl) == nil then
- -- probably already an alist
- return tbl
- end
- local alist = {}
- local i = 1
- for k, v in pairs(tbl) do
- alist[i] = {k, v}
- i = i + 1
- end
- return alist
-end
-
--- Attr
-
---- Create a new set of attributes (Attr).
--- @function Attr
--- @tparam[opt] string identifier element identifier
--- @tparam[opt] {string,...} classes element classes
--- @tparam[opt] table attributes table containing string keys and values
--- @return element attributes
-M.Attr = AstElement:make_subtype'Attr'
-function M.Attr:new (identifier, classes, attributes)
- identifier = identifier or ''
- classes = ensureList(classes or {})
- attributes = setmetatable(to_alist(attributes or {}), AttributeList)
- return setmetatable({identifier, classes, attributes}, self.behavior)
-end
-M.Attr.behavior.clone = M.types.clone.Attr
-M.Attr.behavior.tag = 'Attr'
-M.Attr.behavior._field_names = {identifier = 1, classes = 2, attributes = 3}
-M.Attr.behavior.__eq = utils.equals
-M.Attr.behavior.__index = function(t, k)
- return (k == 't' and t.tag) or
- rawget(t, getmetatable(t)._field_names[k]) or
- getmetatable(t)[k]
-end
-M.Attr.behavior.__newindex = function(t, k, v)
- if k == 'attributes' then
- rawset(t, 3, setmetatable(to_alist(v or {}), AttributeList))
- elseif getmetatable(t)._field_names[k] then
- rawset(t, getmetatable(t)._field_names[k], v)
- else
- rawset(t, k, v)
- end
-end
-M.Attr.behavior.__pairs = function(t)
- local field_names = M.Attr.behavior._field_names
- local fields = {}
- for name, i in pairs(field_names) do
- fields[i] = name
- end
- return make_next_function(fields), t, nil
-end
-
--- Monkey-patch setters for `attr` fields to be more forgiving in the input that
--- results in a valid Attr value.
-function augment_attr_setter (setters)
- if setters.attr then
- local orig = setters.attr
- setters.attr = function(k, v)
- orig(k, ensureAttr(v))
- end
- end
-end
-for _, blk in pairs(M.Block.constructor) do
- augment_attr_setter(blk.behavior.setters)
-end
-for _, inln in pairs(M.Inline.constructor) do
- augment_attr_setter(inln.behavior.setters)
-end
-
-
--- Citation
-M.Citation = AstElement:make_subtype'Citation'
-M.Citation.behavior.clone = M.types.clone.Citation
-
---- Creates a single citation.
--- @function Citation
--- @tparam string id citation identifier (like a bibtex key)
--- @tparam AuthorInText|SuppressAuthor|NormalCitation mode citation mode
--- @tparam[opt] {Inline,...} prefix citation prefix
--- @tparam[opt] {Inline,...} suffix citation suffix
--- @tparam[opt] int note_num note number
--- @tparam[opt] int hash hash number
-function M.Citation:new (id, mode, prefix, suffix, note_num, hash)
- return {
- id = id,
- mode = mode,
- prefix = ensureList(prefix or {}),
- suffix = ensureList(suffix or {}),
- note_num = note_num or 0,
- hash = hash or 0,
- }
-end
-
--- ListAttributes
-M.ListAttributes = AstElement:make_subtype 'ListAttributes'
-M.ListAttributes.behavior.clone = M.types.clone.ListAttributes
-
---- Creates a set of list attributes.
--- @function ListAttributes
--- @tparam[opt] integer start number of the first list item
--- @tparam[opt] string style style used for list numbering
--- @tparam[opt] DefaultDelim|Period|OneParen|TwoParens delimiter delimiter of list numbers
--- @treturn table list attributes table
-function M.ListAttributes:new (start, style, delimiter)
- start = start or 1
- style = style or 'DefaultStyle'
- delimiter = delimiter or 'DefaultDelim'
- return {start, style, delimiter}
-end
-M.ListAttributes.behavior._field_names = {start = 1, style = 2, delimiter = 3}
-M.ListAttributes.behavior.__eq = utils.equals
-M.ListAttributes.behavior.__index = function (t, k)
- return rawget(t, getmetatable(t)._field_names[k]) or
- getmetatable(t)[k]
-end
-M.ListAttributes.behavior.__newindex = function (t, k, v)
- if getmetatable(t)._field_names[k] then
- rawset(t, getmetatable(t)._field_names[k], v)
- else
- rawset(t, k, v)
- end
-end
-M.ListAttributes.behavior.__pairs = function(t)
- local field_names = M.ListAttributes.behavior._field_names
- local fields = {}
- for name, i in pairs(field_names) do
- fields[i] = name
- end
- return make_next_function(fields), t, nil
-end
-
---
--- Legacy and compatibility types
---
-
---- Creates a simple (old style) table element.
--- @function SimpleTable
--- @tparam {Inline,...} caption table caption
--- @tparam {AlignDefault|AlignLeft|AlignRight|AlignCenter,...} aligns alignments
--- @tparam {int,...} widths column widths
--- @tparam {Block,...} headers header row
--- @tparam {{Block,...}} rows table rows
--- @treturn Block table element
-M.SimpleTable = function(caption, aligns, widths, headers, rows)
- return {
- caption = ensureInlineList(caption),
- aligns = List:new(aligns),
- widths = List:new(widths),
- headers = List:new(headers),
- rows = List:new(rows),
- tag = "SimpleTable",
- t = "SimpleTable",
- }
-end
-
-
-------------------------------------------------------------------------
--- Constants
--- @section constants
-
---- Author name is mentioned in the text.
--- @see Citation
--- @see Cite
-M.AuthorInText = "AuthorInText"
-
---- Author name is suppressed.
--- @see Citation
--- @see Cite
-M.SuppressAuthor = "SuppressAuthor"
-
---- Default citation style is used.
--- @see Citation
--- @see Cite
-M.NormalCitation = "NormalCitation"
-
---- Table cells aligned left.
--- @see Table
-M.AlignLeft = "AlignLeft"
-
---- Table cells right-aligned.
--- @see Table
-M.AlignRight = "AlignRight"
-
---- Table cell content is centered.
--- @see Table
-M.AlignCenter = "AlignCenter"
-
---- Table cells are alignment is unaltered.
--- @see Table
-M.AlignDefault = "AlignDefault"
-
---- Default list number delimiters are used.
--- @see OrderedList
-M.DefaultDelim = "DefaultDelim"
-
---- List numbers are delimited by a period.
--- @see OrderedList
-M.Period = "Period"
-
---- List numbers are delimited by a single parenthesis.
--- @see OrderedList
-M.OneParen = "OneParen"
-
---- List numbers are delimited by a double parentheses.
--- @see OrderedList
-M.TwoParens = "TwoParens"
-
---- List are numbered in the default style
--- @see OrderedList
-M.DefaultStyle = "DefaultStyle"
-
---- List items are numbered as examples.
--- @see OrderedList
-M.Example = "Example"
-
---- List are numbered using decimal integers.
--- @see OrderedList
-M.Decimal = "Decimal"
-
---- List are numbered using lower-case roman numerals.
--- @see OrderedList
-M.LowerRoman = "LowerRoman"
-
---- List are numbered using upper-case roman numerals
--- @see OrderedList
-M.UpperRoman = "UpperRoman"
-
---- List are numbered using lower-case alphabetic characters.
--- @see OrderedList
-M.LowerAlpha = "LowerAlpha"
-
---- List are numbered using upper-case alphabetic characters.
--- @see OrderedList
-M.UpperAlpha = "UpperAlpha"
-
-------------------------------------------------------------------------
--- Functions which have moved to different modules
-M.sha1 = utils.sha1
-
-return M
diff --git a/data/pptx/ppt/slideMasters/slideMaster1.xml b/data/pptx/ppt/slideMasters/slideMaster1.xml
index 69f0af019..2e0425358 100644
--- a/data/pptx/ppt/slideMasters/slideMaster1.xml
+++ b/data/pptx/ppt/slideMasters/slideMaster1.xml
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<p:sldMaster xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id="2" name="Title Placeholder 1"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="title"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="274638"/><a:ext cx="8229600" cy="1143000"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"><a:normAutofit/></a:bodyPr><a:lstStyle/><a:p><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master title style</a:t></a:r><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="3" name="Text Placeholder 2"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="body" idx="1"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="1600200"/><a:ext cx="8229600" cy="4525963"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"><a:normAutofit/></a:bodyPr><a:lstStyle/><a:p><a:pPr lvl="0"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master text styles</a:t></a:r></a:p><a:p><a:pPr lvl="1"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Second level</a:t></a:r></a:p><a:p><a:pPr lvl="2"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Third level</a:t></a:r></a:p><a:p><a:pPr lvl="3"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Fourth level</a:t></a:r></a:p><a:p><a:pPr lvl="4"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Fifth level</a:t></a:r><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="4" name="Date Placeholder 3"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="dt" sz="half" idx="2"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="6356350"/><a:ext cx="2133600" cy="365125"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"/><a:lstStyle><a:lvl1pPr algn="l"><a:defRPr sz="1200"><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></a:defRPr></a:lvl1pPr></a:lstStyle><a:p><a:fld id="{241EB5C9-1307-BA42-ABA2-0BC069CD8E7F}" type="datetimeFigureOut"><a:rPr lang="en-US" smtClean="0"/><a:t>4/5/2019</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="5" name="Footer Placeholder 4"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="ftr" sz="quarter" idx="3"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="3124200" y="6356350"/><a:ext cx="2895600" cy="365125"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"/><a:lstStyle><a:lvl1pPr algn="ctr"><a:defRPr sz="1200"><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></a:defRPr></a:lvl1pPr></a:lstStyle><a:p><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="6" name="Slide Number Placeholder 5"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldNum" sz="quarter" idx="4"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="6553200" y="6356350"/><a:ext cx="2133600" cy="365125"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"/><a:lstStyle><a:lvl1pPr algn="r"><a:defRPr sz="1200"><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></a:defRPr></a:lvl1pPr></a:lstStyle><a:p><a:fld id="{C5EF2332-01BF-834F-8236-50238282D533}" type="slidenum"><a:rPr lang="en-US" smtClean="0"/><a:t>‹#›</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp></p:spTree><p:extLst><p:ext uri="{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}"><p14:creationId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="3676200875"/></p:ext></p:extLst></p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:sldLayoutIdLst><p:sldLayoutId id="2147483649" r:id="rId1"/><p:sldLayoutId id="2147483650" r:id="rId2"/><p:sldLayoutId id="2147483651" r:id="rId3"/><p:sldLayoutId id="2147483652" r:id="rId4"/><p:sldLayoutId id="2147483653" r:id="rId5"/><p:sldLayoutId id="2147483654" r:id="rId6"/><p:sldLayoutId id="2147483655" r:id="rId7"/><p:sldLayoutId id="2147483656" r:id="rId8"/><p:sldLayoutId id="2147483657" r:id="rId9"/><p:sldLayoutId id="2147483658" r:id="rId10"/><p:sldLayoutId id="2147483659" r:id="rId11"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle><a:lvl1pPr algn="ctr" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="0"/></a:spcBef><a:buNone/><a:defRPr sz="4400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mj-lt"/><a:ea typeface="+mj-ea"/><a:cs typeface="+mj-cs"/></a:defRPr></a:lvl1pPr></p:titleStyle><p:bodyStyle><a:lvl1pPr marL="342900" indent="-342900" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="3200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr><a:lvl2pPr marL="742950" indent="-285750" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="–"/><a:defRPr sz="2800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr><a:lvl3pPr marL="1143000" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr><a:lvl4pPr marL="1600200" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="–"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr><a:lvl5pPr marL="2057400" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="»"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr><a:lvl6pPr marL="2514600" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl6pPr><a:lvl7pPr marL="2971800" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl7pPr><a:lvl8pPr marL="3429000" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl8pPr><a:lvl9pPr marL="3886200" indent="-228600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl9pPr></p:bodyStyle><p:otherStyle><a:defPPr><a:defRPr lang="en-US"/></a:defPPr><a:lvl1pPr marL="0" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr><a:lvl2pPr marL="457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr><a:lvl3pPr marL="914400" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr><a:lvl4pPr marL="1371600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr><a:lvl5pPr marL="1828800" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr><a:lvl6pPr marL="2286000" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl6pPr><a:lvl7pPr marL="2743200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl7pPr><a:lvl8pPr marL="3200400" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl8pPr><a:lvl9pPr marL="3657600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl9pPr></p:otherStyle></p:txStyles></p:sldMaster> \ No newline at end of file
+<p:sldMaster xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"><p:cSld><p:bg><p:bgRef idx="1001"><a:schemeClr val="bg1"/></p:bgRef></p:bg><p:spTree><p:nvGrpSpPr><p:cNvPr id="1" name=""/><p:cNvGrpSpPr/><p:nvPr/></p:nvGrpSpPr><p:grpSpPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="0" cy="0"/><a:chOff x="0" y="0"/><a:chExt cx="0" cy="0"/></a:xfrm></p:grpSpPr><p:sp><p:nvSpPr><p:cNvPr id="2" name="Title Placeholder 1"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="title"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="274638"/><a:ext cx="8229600" cy="1143000"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"><a:normAutofit/></a:bodyPr><a:lstStyle/><a:p><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master title style</a:t></a:r><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="3" name="Text Placeholder 2"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="body" idx="1"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="1600200"/><a:ext cx="8229600" cy="4525963"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0"><a:normAutofit/></a:bodyPr><a:lstStyle/><a:p><a:pPr lvl="0"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Click to edit Master text styles</a:t></a:r></a:p><a:p><a:pPr lvl="1"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Second level</a:t></a:r></a:p><a:p><a:pPr lvl="2"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Third level</a:t></a:r></a:p><a:p><a:pPr lvl="3"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Fourth level</a:t></a:r></a:p><a:p><a:pPr lvl="4"/><a:r><a:rPr lang="en-US" smtClean="0"/><a:t>Fifth level</a:t></a:r><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="4" name="Date Placeholder 3"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="dt" sz="half" idx="2"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="457200" y="6356350"/><a:ext cx="2133600" cy="365125"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"/><a:lstStyle><a:lvl1pPr algn="l"><a:defRPr sz="1200"><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></a:defRPr></a:lvl1pPr></a:lstStyle><a:p><a:fld id="{241EB5C9-1307-BA42-ABA2-0BC069CD8E7F}" type="datetimeFigureOut"><a:rPr lang="en-US" smtClean="0"/><a:t>4/5/2019</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="5" name="Footer Placeholder 4"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="ftr" sz="quarter" idx="3"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="3124200" y="6356350"/><a:ext cx="2895600" cy="365125"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"/><a:lstStyle><a:lvl1pPr algn="ctr"><a:defRPr sz="1200"><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></a:defRPr></a:lvl1pPr></a:lstStyle><a:p><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp><p:sp><p:nvSpPr><p:cNvPr id="6" name="Slide Number Placeholder 5"/><p:cNvSpPr><a:spLocks noGrp="1"/></p:cNvSpPr><p:nvPr><p:ph type="sldNum" sz="quarter" idx="4"/></p:nvPr></p:nvSpPr><p:spPr><a:xfrm><a:off x="6553200" y="6356350"/><a:ext cx="2133600" cy="365125"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom></p:spPr><p:txBody><a:bodyPr vert="horz" lIns="91440" tIns="45720" rIns="91440" bIns="45720" rtlCol="0" anchor="ctr"/><a:lstStyle><a:lvl1pPr algn="r"><a:defRPr sz="1200"><a:solidFill><a:schemeClr val="tx1"><a:tint val="75000"/></a:schemeClr></a:solidFill></a:defRPr></a:lvl1pPr></a:lstStyle><a:p><a:fld id="{C5EF2332-01BF-834F-8236-50238282D533}" type="slidenum"><a:rPr lang="en-US" smtClean="0"/><a:t>‹#›</a:t></a:fld><a:endParaRPr lang="en-US"/></a:p></p:txBody></p:sp></p:spTree><p:extLst><p:ext uri="{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}"><p14:creationId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="3676200875"/></p:ext></p:extLst></p:cSld><p:clrMap bg1="lt1" tx1="dk1" bg2="lt2" tx2="dk2" accent1="accent1" accent2="accent2" accent3="accent3" accent4="accent4" accent5="accent5" accent6="accent6" hlink="hlink" folHlink="folHlink"/><p:sldLayoutIdLst><p:sldLayoutId id="2147483649" r:id="rId1"/><p:sldLayoutId id="2147483650" r:id="rId2"/><p:sldLayoutId id="2147483651" r:id="rId3"/><p:sldLayoutId id="2147483652" r:id="rId4"/><p:sldLayoutId id="2147483653" r:id="rId5"/><p:sldLayoutId id="2147483654" r:id="rId6"/><p:sldLayoutId id="2147483655" r:id="rId7"/><p:sldLayoutId id="2147483656" r:id="rId8"/><p:sldLayoutId id="2147483657" r:id="rId9"/><p:sldLayoutId id="2147483658" r:id="rId10"/><p:sldLayoutId id="2147483659" r:id="rId11"/></p:sldLayoutIdLst><p:txStyles><p:titleStyle><a:lvl1pPr algn="ctr" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="0"/></a:spcBef><a:buNone/><a:defRPr sz="4400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mj-lt"/><a:ea typeface="+mj-ea"/><a:cs typeface="+mj-cs"/></a:defRPr></a:lvl1pPr></p:titleStyle><p:bodyStyle><a:lvl1pPr marL="457200" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="3200" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr><a:lvl2pPr marL="914400" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="–"/><a:defRPr sz="2800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr><a:lvl3pPr marL="1371600" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2400" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr><a:lvl4pPr marL="1828800" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="–"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr><a:lvl5pPr marL="2286000" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="»"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr><a:lvl6pPr marL="2743200" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl6pPr><a:lvl7pPr marL="3200400" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl7pPr><a:lvl8pPr marL="3657600" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl8pPr><a:lvl9pPr marL="4114800" indent="-457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:spcBef><a:spcPct val="20000"/></a:spcBef><a:buFont typeface="Arial"/><a:buChar char="•"/><a:defRPr sz="2000" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl9pPr></p:bodyStyle><p:otherStyle><a:defPPr><a:defRPr lang="en-US"/></a:defPPr><a:lvl1pPr marL="0" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl1pPr><a:lvl2pPr marL="457200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl2pPr><a:lvl3pPr marL="914400" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl3pPr><a:lvl4pPr marL="1371600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl4pPr><a:lvl5pPr marL="1828800" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl5pPr><a:lvl6pPr marL="2286000" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl6pPr><a:lvl7pPr marL="2743200" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl7pPr><a:lvl8pPr marL="3200400" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl8pPr><a:lvl9pPr marL="3657600" algn="l" defTabSz="457200" rtl="0" eaLnBrk="1" latinLnBrk="0" hangingPunct="1"><a:defRPr sz="1800" kern="1200"><a:solidFill><a:schemeClr val="tx1"/></a:solidFill><a:latin typeface="+mn-lt"/><a:ea typeface="+mn-ea"/><a:cs typeface="+mn-cs"/></a:defRPr></a:lvl9pPr></p:otherStyle></p:txStyles></p:sldMaster>
diff --git a/data/sample.lua b/data/sample.lua
index b87848378..ea20add2e 100644
--- a/data/sample.lua
+++ b/data/sample.lua
@@ -143,7 +143,7 @@ end
function Link(s, tgt, tit, attr)
return "<a href='" .. escape(tgt,true) .. "' title='" ..
- escape(tit,true) .. "'>" .. s .. "</a>"
+ escape(tit,true) .. "'" .. attributes(attr) .. ">" .. s .. "</a>"
end
function Image(s, src, tit, attr)
@@ -284,9 +284,15 @@ local function html_align(align)
end
function CaptionedImage(src, tit, caption, attr)
- return '<div class="figure">\n<img src="' .. escape(src,true) ..
- '" title="' .. escape(tit,true) .. '"/>\n' ..
- '<p class="caption">' .. escape(caption) .. '</p>\n</div>'
+ if #caption == 0 then
+ return '<p><img src="' .. escape(src,true) .. '" id="' .. attr.id ..
+ '"/></p>'
+ else
+ local ecaption = escape(caption)
+ return '<figure>\n<img src="' .. escape(src,true) ..
+ '" id="' .. attr.id .. '" alt="' .. ecaption .. '"/>' ..
+ '<figcaption>' .. ecaption .. '</figcaption>\n</figure>'
+ end
end
-- Caption is a string, aligns is an array of strings,
@@ -299,7 +305,7 @@ function Table(caption, aligns, widths, headers, rows)
end
add("<table>")
if caption ~= "" then
- add("<caption>" .. caption .. "</caption>")
+ add("<caption>" .. escape(caption) .. "</caption>")
end
if widths and widths[1] ~= 0 then
for _, w in pairs(widths) do
@@ -313,9 +319,7 @@ function Table(caption, aligns, widths, headers, rows)
table.insert(header_row,'<th align="' .. align .. '">' .. h .. '</th>')
empty_header = empty_header and h == ""
end
- if empty_header then
- head = ""
- else
+ if not empty_header then
add('<tr class="header">')
for _,h in pairs(header_row) do
add(h)
diff --git a/data/templates/affiliations.jats b/data/templates/affiliations.jats
index 93238d22e..17c3cf164 100644
--- a/data/templates/affiliations.jats
+++ b/data/templates/affiliations.jats
@@ -1,38 +1,36 @@
$--
$-- Affiliations
$--
-$for(affiliation)$
-<aff id="aff-$affiliation.id$">
+<aff id="aff-$it.id$">
$-- wrap affiliation if it has a known institution identifier
-$if(affiliation.group)$
-<institution content-type="group">$affiliation.group$</institution>
+$if(it.group)$
+<institution content-type="group">${it.group}</institution>
$endif$
-$if(affiliation.department)$
-<institution content-type="dept">$affiliation.department$</institution>
+$if(it.department)$
+<institution content-type="dept">${it.department}</institution>
$endif$
<institution-wrap>
-$if(affiliation.organization)$
-<institution>$affiliation.organization$</institution>
+$if(it.organization)$
+<institution>${it.organization}</institution>
$else$
-<institution>$affiliation.name$</institution>
+<institution>${it.name}</institution>
$endif$
-$if(affiliation.isni)$
-<institution-id institution-id-type="ISNI">$affiliation.isni$</institution-id>
+$if(it.isni)$
+<institution-id institution-id-type="ISNI">${it.isni}</institution-id>
$endif$
-$if(affiliation.ringgold)$
-<institution-id institution-id-type="Ringgold">$affiliation.ringgold$</institution-id>
+$if(it.ringgold)$
+<institution-id institution-id-type="Ringgold">${it.ringgold}</institution-id>
$endif$
-$if(affiliation.ror)$
-<institution-id institution-id-type="ROR">$affiliation.ror$</institution-id>
+$if(it.ror)$
+<institution-id institution-id-type="ROR">${it.ror}</institution-id>
$endif$
-$for(affiliation.pid)$
-<institution-id institution-id-type="$affiliation.pid.type$">$affiliation.pid.id$</institution-id>
+$for(it.pid)$
+<institution-id institution-id-type="${it.type}">${it.id}</institution-id>
$endfor$
-</institution-wrap>$if(affiliation.street-address)$,
-$for(affiliation.street-address)$
-<addr-line>$affiliation.street-address$</addr-line>$sep$,
+</institution-wrap>$if(it.street-address)$,
+$for(it.street-address)$
+<addr-line>${it}</addr-line>$sep$,
$endfor$
-$else$$if(affiliation.city)$, <city>$affiliation.city$</city>$endif$$endif$$if(affiliation.country)$,
-<country$if(affiliation.country-code)$ country="$affiliation.country-code$"$endif$>$affiliation.country$</country>$endif$
+$else$$if(it.city)$, <city>$it.city$</city>$endif$$endif$$if(it.country)$,
+<country$if(it.country-code)$ country="$it.country-code$"$endif$>$it.country$</country>$endif$
</aff>
-$endfor$
diff --git a/data/templates/article.jats_publishing b/data/templates/article.jats_publishing
index 9bedff6af..47ab8f197 100644
--- a/data/templates/article.jats_publishing
+++ b/data/templates/article.jats_publishing
@@ -81,12 +81,15 @@ $endif$
$if(title)$
<title-group>
<article-title>$title$</article-title>
+$if(subtitle)$
+<subtitle>${subtitle}</subtitle>
+$endif$
</title-group>
$endif$
$if(author)$
<contrib-group>
$for(author)$
-<contrib contrib-type="author"$if(author.equal-contrib)$ equal-contrib="true"$endif$>
+<contrib contrib-type="author"$if(author.equal-contrib)$ equal-contrib="yes"$endif$>
$if(author.orcid)$
<contrib-id contrib-id-type="orcid">$author.orcid$</contrib-id>
$endif$
@@ -103,15 +106,25 @@ $endif$
$if(author.email)$
<email>$author.email$</email>
$endif$
+$-- if affiliations are listed separately, then create links. Otherwise
+$-- include them here.
+$if(affiliation)$
$for(author.affiliation)$
<xref ref-type="aff" rid="aff-$author.affiliation$"/>
$endfor$
+$else$
+$for(author.affiliation)$
+${ it:affiliations.jats() }
+$endfor$
+$endif$
$if(author.cor-id)$
<xref ref-type="corresp" rid="cor-$author.cor-id$"><sup>*</sup></xref>
$endif$
</contrib>
$endfor$
-${ affiliations.jats() }
+$for(affiliation)$
+${ it:affiliations.jats() }
+$endfor$
</contrib-group>
$endif$
$if(article.author-notes)$
diff --git a/data/templates/default.jats_articleauthoring b/data/templates/default.jats_articleauthoring
index 60b2ca559..01042b001 100644
--- a/data/templates/default.jats_articleauthoring
+++ b/data/templates/default.jats_articleauthoring
@@ -14,12 +14,15 @@ $endif$
$if(title)$
<title-group>
<article-title>$title$</article-title>
+$if(subtitle)$
+<subtitle>${subtitle}</subtitle>
+$endif$
</title-group>
$endif$
$if(author)$
<contrib-group>
$for(author)$
-<contrib contrib-type="author"$if(author.equal-contrib)$ equal-contrib="true"$endif$>
+<contrib contrib-type="author"$if(author.equal-contrib)$ equal-contrib="yes"$endif$>
$if(author.orcid)$
<contrib-id contrib-id-type="orcid">$author.orcid$</contrib-id>
$endif$
@@ -33,18 +36,17 @@ $elseif(author.name)$
$else$
<string-name>$author$</string-name>
$endif$
+$for(author.affiliation)$
+${ it:affiliations.jats() }
+$endfor$
$if(author.email)$
<email>$author.email$</email>
$endif$
-$for(author.affiliation)$
-<xref ref-type="aff" rid="aff-$author.affiliation$"/>
-$endfor$
$if(author.cor-id)$
<xref ref-type="corresp" rid="cor-$author.cor-id$"><sup>*</sup></xref>
$endif$
</contrib>
$endfor$
-${ affiliations.jats() }
</contrib-group>
$endif$
$if(copyright)$
diff --git a/data/templates/default.latex b/data/templates/default.latex
index d06701675..3874813c7 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -4,11 +4,6 @@
$if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
$endif$
-$if(dir)$
-$if(latex-dir-rtl)$
-\PassOptionsToPackage{RTLdocument}{bidi}
-$endif$
-$endif$
$if(CJKmainfont)$
\PassOptionsToPackage{space}{xeCJK}
$endif$
@@ -17,9 +12,6 @@ $endif$
$if(fontsize)$
$fontsize$,
$endif$
-$if(lang)$
- $babel-lang$,
-$endif$
$if(papersize)$
$papersize$paper,
$endif$
@@ -315,6 +307,7 @@ $if(links-as-notes)$
\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
$endif$
$if(strikeout)$
+$-- also used for underline
\usepackage[normalem]{ulem}
% Avoid problems with \sout in headers with hyperref
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
@@ -369,35 +362,27 @@ $if(csl-refs)$
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$
-$for(header-includes)$
-$header-includes$
-$endfor$
$if(lang)$
-\ifXeTeX
- % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
- \usepackage{polyglossia}
- \setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$}
-$for(polyglossia-otherlangs)$
- \setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$}
-$endfor$
+\ifLuaTeX
+\usepackage[bidi=basic]{babel}
\else
- \usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
+\usepackage[bidi=default]{babel}
+\fi
+\babelprovide[main,import]{$babel-lang$}
+$for(babel-otherlangs)$
+\babelprovide[import]{$babel-otherlangs$}
+$endfor$
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
-$if(babel-newcommands)$
- $babel-newcommands$
-$endif$
-\fi
$endif$
+$for(header-includes)$
+$header-includes$
+$endfor$
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
$if(dir)$
-\ifXeTeX
- % Load bidi as late as possible as it modifies e.g. graphicx
- \usepackage{bidi}
-\fi
\ifPDFTeX
\TeXXeTstate=1
\newcommand{\RL}[1]{\beginR #1\endR}
diff --git a/data/templates/default.markua b/data/templates/default.markua
new file mode 100644
index 000000000..9f6ca96de
--- /dev/null
+++ b/data/templates/default.markua
@@ -0,0 +1,21 @@
+$if(titleblock)$
+$titleblock$
+
+$endif$
+$for(header-includes)$
+$header-includes$
+
+$endfor$
+$for(include-before)$
+$include-before$
+
+$endfor$
+$if(toc)$
+$table-of-contents$
+
+$endif$
+$body$
+$for(include-after)$
+
+$include-after$
+$endfor$
diff --git a/data/templates/default.revealjs b/data/templates/default.revealjs
index 203983522..e1ca8b824 100644
--- a/data/templates/default.revealjs
+++ b/data/templates/default.revealjs
@@ -19,6 +19,9 @@ $endif$
<link rel="stylesheet" href="$revealjs-url$/dist/reset.css">
<link rel="stylesheet" href="$revealjs-url$/dist/reveal.css">
<style>
+ .reveal .sourceCode { /* see #7635 */
+ overflow: visible;
+ }
$styles.html()$
</style>
$if(theme)$
@@ -134,7 +137,7 @@ $endif$
// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
- disableLayout: false,
+ disableLayout: $disableLayout$,
// Vertical centering of slides
center: $center$,
diff --git a/data/templates/default.rtf b/data/templates/default.rtf
index a7f79376d..10f596518 100644
--- a/data/templates/default.rtf
+++ b/data/templates/default.rtf
@@ -1,4 +1,4 @@
-{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}}
+{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}}
{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
\widowctrl\hyphauto
$for(header-includes)$
diff --git a/doc/custom-readers.md b/doc/custom-readers.md
new file mode 100644
index 000000000..37b6d6a3e
--- /dev/null
+++ b/doc/custom-readers.md
@@ -0,0 +1,684 @@
+---
+author:
+- John MacFarlane
+date: 'November 18, 2021'
+title: Creating Custom Pandoc Readers in Lua
+---
+
+# Introduction
+
+If you need to parse a format not already handled by pandoc,
+you can create a custom reader using the [Lua] language.
+Pandoc has a built-in Lua interpreter, so you needn't
+install any additional software to do this.
+
+[Lua]: https://www.lua.org
+
+A custom reader is a Lua file that defines a function
+called `Reader`, which takes two arguments:
+
+- the raw input to be parsed, as a list of sources
+- optionally, a table of reader options, e.g.
+ `{ columns = 62, standalone = true }`.
+
+The `Reader` function should return a `Pandoc` AST.
+This can be created using functions in the [`pandoc` module],
+which is automatically in scope. (Indeed, all of the utility
+functions that are available for [Lua filters] are available
+in custom readers, too.)
+
+Each source item corresponds to a file or stream passed to pandoc
+containing its text and name. E.g., if a single file `input.txt`
+is passed to pandoc, then the list of sources will contain just a
+single element `s`, where `s.name == 'input.txt'` and `s.text`
+contains the file contents as a string.
+
+The sources list, as well as each of its elements, can be
+converted to a string via the Lua standard library function
+`tostring`.
+
+[Lua filters]: https://pandoc.org/lua-filters.html
+[`pandoc` module]: https://pandoc.org/lua-filters.html#module-pandoc
+
+A minimal example would be
+
+```lua
+function Reader(input)
+ return pandoc.Pandoc({ pandoc.CodeBlock(tostring(input)) })
+end
+```
+
+This just returns a document containing a big code block with all
+of the input. Or, to create a separate code block for each input
+file, one might write
+
+``` lua
+function Reader(input)
+ return pandoc.Pandoc(input:map(
+ function (s) return pandoc.CodeBlock(s.text) end))
+end
+```
+
+In a nontrivial reader, you'll want to parse the input.
+You can do this using standard Lua library functions
+(for example, the [patterns] library), or with the powerful
+and fast [lpeg] parsing library, which is automatically in scope.
+You can also use external Lua libraries (for example,
+an XML parser).
+
+A previous pandoc version passed a raw string instead of a list
+of sources to the Reader function. Reader functions that rely on
+this are obsolete, but still supported: Pandoc analyzes any
+script error, detecting when code assumed the old behavior. The
+code is rerun with raw string input in this case, thereby
+ensuring backwards compatibility.
+
+[patterns]: http://lua-users.org/wiki/PatternsTutorial
+[lpeg]: http://www.inf.puc-rio.br/~roberto/lpeg/
+
+# Example: plain text reader
+
+This is a simple example using [lpeg] to parse the input
+into space-separated strings and blankline-separated paragraphs.
+
+```lua
+-- A sample custom reader that just parses text into blankline-separated
+-- paragraphs with space-separated words.
+
+-- For better performance we put these functions in local variables:
+local P, S, R, Cf, Cc, Ct, V, Cs, Cg, Cb, B, C, Cmt =
+ lpeg.P, lpeg.S, lpeg.R, lpeg.Cf, lpeg.Cc, lpeg.Ct, lpeg.V,
+ lpeg.Cs, lpeg.Cg, lpeg.Cb, lpeg.B, lpeg.C, lpeg.Cmt
+
+local whitespacechar = S(" \t\r\n")
+local wordchar = (1 - whitespacechar)
+local spacechar = S(" \t")
+local newline = P"\r"^-1 * P"\n"
+local blanklines = newline * (spacechar^0 * newline)^1
+local endline = newline - blanklines
+
+-- Grammar
+G = P{ "Pandoc",
+ Pandoc = Ct(V"Block"^0) / pandoc.Pandoc;
+ Block = blanklines^0 * V"Para" ;
+ Para = Ct(V"Inline"^1) / pandoc.Para;
+ Inline = V"Str" + V"Space" + V"SoftBreak" ;
+ Str = wordchar^1 / pandoc.Str;
+ Space = spacechar^1 / pandoc.Space;
+ SoftBreak = endline / pandoc.SoftBreak;
+}
+
+function Reader(input)
+ return lpeg.match(G, tostring(input))
+end
+```
+
+Example of use:
+
+```
+% pandoc -f plain.lua -t native
+*Hello there*, this is plain text with no formatting
+except paragraph breaks.
+
+- Like this one.
+^D
+[ Para
+ [ Str "*Hello"
+ , Space
+ , Str "there*,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "plain"
+ , Space
+ , Str "text"
+ , Space
+ , Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "formatting"
+ , SoftBreak
+ , Str "except"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "breaks."
+ ]
+, Para
+ [ Str "-"
+ , Space
+ , Str "Like"
+ , Space
+ , Str "this"
+ , Space
+ , Str "one."
+ ]
+]
+```
+
+# Example: a RIS bibliography reader
+
+This is a parser for [RIS bibliography] files. It can be used
+to convert them to CSL JSON or YAML, BibTeX, or BibLaTeX.
+
+[RIS bibliography]: https://en.wikipedia.org/wiki/RIS_(file_format)
+
+```lua
+-- A sample custom reader for RIS bibliography format
+-- https://en.wikipedia.org/wiki/RIS_(file_format)
+-- The references are converted to inline pandoc/CSL YAML
+-- references in the metadata.
+
+local inspect = require"inspect"
+
+local types =
+ { ABST = "article",
+ ADVS = "motion-picture",
+ AGGR = "dataset",
+ ANCIENT = "book",
+ ART = "graphic",
+ BILL = "bill",
+ BLOG = "post-weblog",
+ BOOK = "book",
+ CASE = "legal_case",
+ CHAP = "chapter",
+ CHART = "graphic",
+ CLSWK = "book",
+ COMP = "program",
+ CONF = "paper-conference",
+ CPAPER = "paper-conference",
+ CTLG = "catalog",
+ DATA = "dataset",
+ DBASE = "dataset",
+ DICT = "book",
+ EBOOK = "book",
+ ECHAP = "chapter",
+ EDBOOK = "book",
+ EJOUR = "article",
+ WEB = "webpage",
+ ENCYC = "entry-encyclopedia",
+ EQUA = "figure",
+ FIGURE = "figure",
+ GEN = "entry",
+ GOVDOC = "report",
+ GRANT = "report",
+ HEAR = "report",
+ ICOMM = "personal_communication",
+ INPR = "article-journal",
+ JFULL = "article-journal",
+ JOUR = "article-journal",
+ LEGAL = "legal_case",
+ MANSCPT = "manuscript",
+ MAP = "map",
+ MGZN = "article-magazine",
+ MPCT = "motion-picture",
+ MULTI = "webpage",
+ MUSIC = "musical_score",
+ NEWS = "article-newspaper",
+ PAMP = "pamphlet",
+ PAT = "patent",
+ PCOMM = "personal_communication",
+ RPRT = "report",
+ SER = "article",
+ SLIDE = "graphic",
+ SOUND = "musical_score",
+ STAND = "report",
+ STAT = "legislation",
+ THES = "thesis",
+ UNBILL = "bill",
+ UNPB = "unpublished",
+ VIDEO = "graphic"
+ }
+
+local function clean(refpairs)
+ local ref = {}
+ for i = 1, #refpairs do
+ local k,v = table.unpack(refpairs[i])
+ if k == "TY" then
+ ref["type"] = types[v]
+ elseif k == "VL" then
+ ref.volume = v
+ elseif k == "KW" then
+ ref.keyword = v
+ elseif k == "PB" then
+ ref.publisher = v
+ elseif k == "CY" or k == "PP" then
+ ref["publisher-place"] = v
+ elseif k == "SP" then
+ if ref.page then
+ ref.page = v .. ref.page
+ else
+ ref.page = v
+ end
+ elseif k == "EP" then
+ if ref.page then
+ ref.page = ref.page .. "-" .. v
+ else
+ ref.page = "-" .. v
+ end
+ elseif k == "AU" or k == "A1" or k == "A2" or k == "A3" then
+ if ref.author then
+ table.insert(ref.author, v)
+ else
+ ref.author = {v}
+ end
+ elseif k == "TI" or k == "T1" or k == "CT" or
+ (k == "BT" and ref.type == "book") then
+ ref.title = v
+ elseif k == "ET" then
+ ref.edition = v
+ elseif k == "NV" then
+ ref["number-of-volumes"] = v
+ elseif k == "AB" then
+ ref.abstract = v
+ elseif k == "ED" then
+ if ref.editor then
+ table.insert(ref.editor, v)
+ else
+ ref.editor = {v}
+ end
+ elseif k == "JO" or k == "JF" or k == "T2" or
+ (k == "BT" and ref.type ~= "book") then
+ ref["container-title"] = v
+ elseif k == "PY" or k == "Y1" then
+ ref.issued = v
+ elseif k == "IS" then
+ ref.issue = v
+ elseif k == "SN" then
+ ref.ISSN = v
+ elseif k == "L" then
+ ref.lang = v
+ elseif k == "UR" or k == "LK" then
+ ref.URL = v
+ end
+ end
+ return ref
+end
+
+function Reader(input, reader_options)
+ local refs = {}
+ local thisref = {}
+ local ids = {}
+ for line in string.gmatch(tostring(input), "[^\n]*") do
+ key, val = string.match(line, "([A-Z][A-Z0-9]) %- (.*)")
+ if key == "ER" then
+ -- clean up fields
+ local newref = clean(thisref)
+ -- ensure we have an id and if not, create a sensible one
+ if not newref.id then
+ newref.id = ""
+ for _,x in ipairs(newref.author) do
+ newref.id = newref.id .. string.match(pandoc.utils.stringify(x), "%a+")
+ end
+ if newref.issued then
+ newref.id = newref.id .. string.match(newref.issued, "%d+")
+ end
+ if ids[newref.id] then -- add disambiguator if needed
+ newref.id = newref.id .. "-" .. #ids
+ end
+ end
+ table.insert(ids, newref.id)
+ table.insert(refs, newref)
+ thisref = {}
+ elseif key then
+ table.insert(thisref, {key, val})
+ end
+ end
+ return pandoc.Pandoc({}, pandoc.Meta { references = refs } )
+end
+```
+
+Example of use:
+
+```
+% pandoc -f ris.lua -t bibtex
+TY - JOUR
+AU - Shannon, Claude E.
+PY - 1948
+DA - July
+TI - A Mathematical Theory of Communication
+T2 - Bell System Technical Journal
+SP - 379
+EP - 423
+VL - 27
+ER -
+TY - JOUR
+T1 - On computable numbers, with an application to the Entscheidungsproblem
+A1 - Turing, Alan Mathison
+JO - Proc. of London Mathematical Society
+VL - 47
+IS - 1
+SP - 230
+EP - 265
+Y1 - 1937
+ER -
+^D
+@article{Shannon1948,
+ author = {Shannon, Claude E.},
+ title = {A {Mathematical} {Theory} of {Communication}},
+ journal = {Bell System Technical Journal},
+ volume = {27},
+ pages = {379-423},
+ year = {1948}
+}
+@article{Turing1937,
+ author = {Turing, Alan Mathison},
+ title = {On Computable Numbers, with an Application to the
+ {Entscheidungsproblem}},
+ journal = {Proc. of London Mathematical Society},
+ volume = {47},
+ number = {1},
+ pages = {230-265},
+ year = {1937}
+}
+```
+
+# Example: a wiki Creole reader
+
+This is a parser for [Creole common wiki markup].
+It uses an [lpeg] grammar. Fun fact: this custom reader is faster than
+pandoc's built-in creole reader! This shows that high-performance
+readers can be designed in this way.
+
+[Creole common wiki markup]: http://www.wikicreole.org/wiki/CheatSheet
+
+
+```lua
+-- A sample custom reader for Creole 1.0 (common wiki markup)
+-- http://www.wikicreole.org/wiki/CheatSheet
+
+-- For better performance we put these functions in local variables:
+local P, S, R, Cf, Cc, Ct, V, Cs, Cg, Cb, B, C, Cmt =
+ lpeg.P, lpeg.S, lpeg.R, lpeg.Cf, lpeg.Cc, lpeg.Ct, lpeg.V,
+ lpeg.Cs, lpeg.Cg, lpeg.Cb, lpeg.B, lpeg.C, lpeg.Cmt
+
+local whitespacechar = S(" \t\r\n")
+local specialchar = S("/*~[]\\{}|")
+local wordchar = (1 - (whitespacechar + specialchar))
+local spacechar = S(" \t")
+local newline = P"\r"^-1 * P"\n"
+local blankline = spacechar^0 * newline
+local endline = newline * #-blankline
+local endequals = spacechar^0 * P"="^0 * spacechar^0 * newline
+local cellsep = spacechar^0 * P"|"
+
+local function trim(s)
+ return (s:gsub("^%s*(.-)%s*$", "%1"))
+end
+
+local function ListItem(lev, ch)
+ local start
+ if ch == nil then
+ start = S"*#"
+ else
+ start = P(ch)
+ end
+ local subitem = function(c)
+ if lev < 6 then
+ return ListItem(lev + 1, c)
+ else
+ return (1 - 1) -- fails
+ end
+ end
+ local parser = spacechar^0
+ * start^lev
+ * #(- start)
+ * spacechar^0
+ * Ct((V"Inline" - (newline * spacechar^0 * S"*#"))^0)
+ * newline
+ * (Ct(subitem("*")^1) / pandoc.BulletList
+ +
+ Ct(subitem("#")^1) / pandoc.OrderedList
+ +
+ Cc(nil))
+ / function (ils, sublist)
+ return { pandoc.Plain(ils), sublist }
+ end
+ return parser
+end
+
+-- Grammar
+G = P{ "Doc",
+ Doc = Ct(V"Block"^0)
+ / pandoc.Pandoc ;
+ Block = blankline^0
+ * ( V"Header"
+ + V"HorizontalRule"
+ + V"CodeBlock"
+ + V"List"
+ + V"Table"
+ + V"Para") ;
+ Para = Ct(V"Inline"^1)
+ * newline
+ / pandoc.Para ;
+ HorizontalRule = spacechar^0
+ * P"----"
+ * spacechar^0
+ * newline
+ / pandoc.HorizontalRule;
+ Header = (P("=")^1 / string.len)
+ * spacechar^1
+ * Ct((V"Inline" - endequals)^1)
+ * endequals
+ / pandoc.Header;
+ CodeBlock = P"{{{"
+ * blankline
+ * C((1 - (newline * P"}}}"))^0)
+ * newline
+ * P"}}}"
+ / pandoc.CodeBlock;
+ Placeholder = P"<<<"
+ * C(P(1) - P">>>")^0
+ * P">>>"
+ / function() return pandoc.Div({}) end;
+ List = V"BulletList"
+ + V"OrderedList" ;
+ BulletList = Ct(ListItem(1,'*')^1)
+ / pandoc.BulletList ;
+ OrderedList = Ct(ListItem(1,'#')^1)
+ / pandoc.OrderedList ;
+ Table = (V"TableHeader" + Cc{})
+ * Ct(V"TableRow"^1)
+ / function(headrow, bodyrows)
+ local numcolumns = #(bodyrows[1])
+ local aligns = {}
+ local widths = {}
+ for i = 1,numcolumns do
+ aligns[i] = pandoc.AlignDefault
+ widths[i] = 0
+ end
+ return pandoc.utils.from_simple_table(
+ pandoc.SimpleTable({}, aligns, widths, headrow, bodyrows))
+ end ;
+ TableHeader = Ct(V"HeaderCell"^1)
+ * cellsep^-1
+ * spacechar^0
+ * newline ;
+ TableRow = Ct(V"BodyCell"^1)
+ * cellsep^-1
+ * spacechar^0
+ * newline ;
+ HeaderCell = cellsep
+ * P"="
+ * spacechar^0
+ * Ct((V"Inline" - (newline + cellsep))^0)
+ / function(ils) return { pandoc.Plain(ils) } end ;
+ BodyCell = cellsep
+ * spacechar^0
+ * Ct((V"Inline" - (newline + cellsep))^0)
+ / function(ils) return { pandoc.Plain(ils) } end ;
+ Inline = V"Emph"
+ + V"Strong"
+ + V"LineBreak"
+ + V"Link"
+ + V"URL"
+ + V"Image"
+ + V"Str"
+ + V"Space"
+ + V"SoftBreak"
+ + V"Escaped"
+ + V"Placeholder"
+ + V"Code"
+ + V"Special" ;
+ Str = wordchar^1
+ / pandoc.Str;
+ Escaped = P"~"
+ * C(P(1))
+ / pandoc.Str ;
+ Special = specialchar
+ / pandoc.Str;
+ Space = spacechar^1
+ / pandoc.Space ;
+ SoftBreak = endline
+ * # -(V"HorizontalRule" + V"CodeBlock")
+ / pandoc.SoftBreak ;
+ LineBreak = P"\\\\"
+ / pandoc.LineBreak ;
+ Code = P"{{{"
+ * C((1 - P"}}}")^0)
+ * P"}}}"
+ / trim / pandoc.Code ;
+ Link = P"[["
+ * C((1 - (P"]]" + P"|"))^0)
+ * (P"|" * Ct((V"Inline" - P"]]")^1))^-1 * P"]]"
+ / function(url, desc)
+ local txt = desc or {pandoc.Str(url)}
+ return pandoc.Link(txt, url)
+ end ;
+ Image = P"{{"
+ * #-P"{"
+ * C((1 - (S"}"))^0)
+ * (P"|" * Ct((V"Inline" - P"}}")^1))^-1
+ * P"}}"
+ / function(url, desc)
+ local txt = desc or ""
+ return pandoc.Image(txt, url)
+ end ;
+ URL = P"http"
+ * P"s"^-1
+ * P":"
+ * (1 - (whitespacechar + (S",.?!:;\"'" * #whitespacechar)))^1
+ / function(url)
+ return pandoc.Link(pandoc.Str(url), url)
+ end ;
+ Emph = P"//"
+ * Ct((V"Inline" - P"//")^1)
+ * P"//"
+ / pandoc.Emph ;
+ Strong = P"**"
+ * Ct((V"Inline" -P"**")^1)
+ * P"**"
+ / pandoc.Strong ;
+}
+
+function Reader(input, reader_options)
+ return lpeg.match(G, tostring(input))
+end
+```
+
+Example of use:
+
+```
+% pandoc -f creole.lua -t markdown
+== Wiki Creole
+
+You can make things **bold** or //italic// or **//both//** or //**both**//.
+
+Character formatting extends across line breaks: **bold,
+this is still bold. This line deliberately does not end in star-star.
+
+Not bold. Character formatting does not cross paragraph boundaries.
+
+You can use [[internal links]] or [[http://www.wikicreole.org|external links]],
+give the link a [[internal links|different]] name.
+^D
+## Wiki Creole
+
+You can make things **bold** or *italic* or ***both*** or ***both***.
+
+Character formatting extends across line breaks: \*\*bold, this is still
+bold. This line deliberately does not end in star-star.
+
+Not bold. Character formatting does not cross paragraph boundaries.
+
+You can use [internal links](internal links) or [external
+links](http://www.wikicreole.org), give the link a
+[different](internal links) name.
+```
+
+# Example: parsing JSON from an API
+
+This custom reader consumes the JSON output of
+<https://www.reddit.com/r/haskell.json> and produces
+a document containing the current top articles on the
+Haskell subreddit.
+
+It assumes that the `luajson` library is available. (It can be
+installed using `luarocks install luajson`---but be sure you are
+installing it for Lua 5.3, which is the version packaged with
+pandoc.)
+
+
+```lua
+-- consumes the output of https://www.reddit.com/r/haskell.json
+
+local json = require'json' -- luajson must be available
+
+local function read_inlines(raw)
+ local doc = pandoc.read(raw, "commonmark")
+ return pandoc.utils.blocks_to_inlines(doc.blocks)
+end
+
+local function read_blocks(raw)
+ local doc = pandoc.read(raw, "commonmark")
+ return doc.blocks
+end
+
+function Reader(input)
+
+ local parsed = json.decode(tostring(input))
+ local blocks = {}
+
+ for _,entry in ipairs(parsed.data.children) do
+ local d = entry.data
+ table.insert(blocks, pandoc.Header(2,
+ pandoc.Link(read_inlines(d.title), d.url)))
+ for _,block in ipairs(read_blocks(d.selftext)) do
+ table.insert(blocks, block)
+ end
+ end
+
+ return pandoc.Pandoc(blocks)
+
+end
+```
+
+Similar code can be used to consume JSON output from other APIs.
+
+Note that the content of the text fields is markdown, so we
+convert it using `pandoc.read()`.
+
+
+# Example: syntax-highlighted code files
+
+This is a reader that puts the content of each input file into a
+code block, sets the file's extension as the block's class to
+enable code highlighting, and places the filename as a header
+above each code block.
+
+``` lua
+function to_code_block (source)
+ local _, lang = pandoc.path.split_extension(source.name)
+ return pandoc.Div{
+ pandoc.Header(1, source.name == '' and '<stdin>' or source.name),
+ pandoc.CodeBlock(source.text, {class=lang}),
+ }
+end
+
+function Reader (input, opts)
+ return pandoc.Pandoc(input:map(to_code_block))
+end
+```
diff --git a/doc/custom-writers.md b/doc/custom-writers.md
new file mode 100644
index 000000000..6df603288
--- /dev/null
+++ b/doc/custom-writers.md
@@ -0,0 +1,52 @@
+---
+author:
+- John MacFarlane
+date: 'November 21, 2021'
+title: Creating Custom Pandoc Writers in Lua
+---
+
+# Introduction
+
+If you need to render a format not already handled by pandoc,
+or you want to change how pandoc renders a format,
+you can create a custom writer using the [Lua] language.
+Pandoc has a built-in Lua interpreter, so you needn't
+install any additional software to do this.
+
+[Lua]: https://www.lua.org
+
+A custom writer is a Lua file that defines functions for
+rendering each element of a pandoc AST.
+
+For example,
+
+``` lua
+function Para(s)
+ return "<paragraph>" .. s .. "</paragraph>"
+end
+```
+
+The best way to go about creating a custom writer is to modify
+the example that comes with pandoc. To get the example, you
+can do
+
+```
+pandoc --print-default-data-file sample.lua > sample.lua
+```
+
+# A custom HTML writer
+
+`sample.lua` is a full-features HTML writer, with explanatory
+comments. To use it, just use the path to the custom writer as
+the writer name:
+
+```
+pandoc -t sample.lua myfile.md
+```
+
+`sample.lua` defines all the functions needed by any custom
+writer, so you can design your own custom writer by modifying
+the functions in `sample.lua` according to your needs.
+
+``` {.lua include="sample.lua"}
+```
diff --git a/doc/faqs.md b/doc/faqs.md
index 2f3368837..317153d5f 100644
--- a/doc/faqs.md
+++ b/doc/faqs.md
@@ -124,5 +124,13 @@ topography as TeX, particularly when it comes to math, but they
may be fine for many purposes.)
+## Converting to PDF on an M1 Mac, I get a "Cannot allocate memory" error.
+
+We are not sure why this happens, but we have found that
+fully specifying the `pdflatex` path avoids the error. For
+example,
+
+ pandoc -o my.pdf --pdf-engine=/Library/TeX/texbin/pdflatex
+
:::
diff --git a/doc/filters.md b/doc/filters.md
index 004a83b7d..c921fc007 100644
--- a/doc/filters.md
+++ b/doc/filters.md
@@ -460,36 +460,36 @@ filter.
Object fields:
- `readerAbbreviations`
+ `abbreviations`
: set of known abbreviations (array of strings).
- `readerColumns`
+ `columns`
: number of columns in terminal; an integer.
- `readerDefaultImageExtension`
+ default-image-extension`
: default extension for images; a string.
- `readerExtensions`
+ `extensions`
: integer representation of the syntax extensions bit
field.
- `readerIndentedCodeClasses`
+ `indented-code-classes`
: default classes for indented code blocks; array of
strings.
- `readerStandalone`
+ `standalone`
: whether the input was a standalone document with header;
either `true` or `false`.
- `readerStripComments`
+ `strip-comments`
: HTML comments are stripped instead of parsed as raw HTML;
either `true` or `false`.
- `readerTabStop`
+ `tab-stop`
: width (i.e. equivalent number of spaces) of tab stops;
integer.
- `readerTrackChanges`
+ `track-changes`
: track changes setting for docx; one of
`"accept-changes"`, `"reject-changes"`, and
`"all-changes"`.
diff --git a/doc/getting-started.md b/doc/getting-started.md
index a8f7315fd..b73923daa 100644
--- a/doc/getting-started.md
+++ b/doc/getting-started.md
@@ -212,6 +212,7 @@ Now save your file as `test1.md` in the directory
Note: If you use plain text a lot, you'll want a better editor than
`Notepad` or `TextEdit`. You might want to look at
+[Visual Studio Code](https://code.visualstudio.com/) or
[Sublime Text](https://www.sublimetext.com/) or (if you're willing
to put in some time learning an unfamiliar interface)
[Vim](https://www.vim.org) or [Emacs](https://www.gnu.org/software/emacs).
diff --git a/doc/jats.md b/doc/jats.md
index c099e0a04..9b8351840 100644
--- a/doc/jats.md
+++ b/doc/jats.md
@@ -45,17 +45,28 @@ Metadata Values
element.
`affiliation`
- : list of affiliation identifiers; marks the organizations
- with which an author is affiliated. Each identifier in this
- list must also occur as the `id` of an affiliation listed in
- the top-level `affiliation` list.
+ : either full affiliation entries as described in field
+ `affiliation`, or a list of affiliation identifiers.
+
+ The identifiers link to the organizations with which an
+ author is affiliated. Each identifier in this list must
+ also occur as the `id` of an affiliation listed in the
+ top-level `affiliation` list.
+
+ If the top-level `affiliation` field is set, then this
+ entry assumed to be a list of identifiers, and a list of
+ full entries if that field is unset.
+
+ Full entries must be given if the articleauthoring tag
+ set it used, as affiliation links are not allowed in that
+ schema.
`equal-contrib`
: boolean attribute used to mark authors who contributed
equally to the work. The
- [`equal-contrib`][attr:equal-contrib] attribute is added
- to the author's [`<contrib>`] element if this is set to a
- truthy value.
+ [`equal-contrib`][attr:equal-contrib] attribute, set to
+ `yes`, is added to the author's [`<contrib>`] element if
+ this is set to a truthy value.
`cor-id`
: identifier linking to the contributor's correspondence
@@ -336,12 +347,21 @@ Metadata Values
: Additional notes concerning the whole article. Added to the
article's frontmatter via the [`<notes>`][elem:notes] element.
+`subtitle`
+: Subordinate part of the document title. Added to the
+ document's front matter as a
+ [`<subtitle>`][elem:article-title] element.
+
`tags`
: list of keywords. Items are used as contents of the
[`<kwd>`][elem:kwd] element; the elements are grouped in a
[`<kwd-group>`][elem:kwd-group] with the
[`kwd-group-type`][attr:kwd-group-type] value `author`.
+`title`
+: The article title. Added to the document's front matter via the
+ [`<article-title>`][elem:article-title] element.
+
Required Metadata
-----------------
@@ -378,6 +398,7 @@ Required metadata values:
[elem:abstract]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/abstract.html
[elem:article-id]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/article-id.html
[elem:article-meta]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/article-meta.html
+[elem:article-title]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/article-title.html
[elem:copyright-holder]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/copyright-holder.html
[elem:copyright-statement]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/copyright-statement.html
[elem:copyright-year]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/copyright-year.html
@@ -400,6 +421,7 @@ Required metadata values:
[elem:string-name]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/string-name.html
[elem:subj-group]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/subj-group.html
[elem:subject]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/subject.html
+[elem:subtitle]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/subtitle.html
[elem:surname]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/surname.html
[elem:xref]: https://jats.nlm.nih.gov/publishing/tag-library/1.2/element/xref.html
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index e2a65fe1e..eba4dcfe9 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -109,7 +109,8 @@ element filtering function. In other words, filter entries will
be called for each corresponding element in the document,
getting the respective element as input.
-The return of a filter function must be one of the following:
+The return value of a filter function must be one of the
+following:
- nil: this means that the object should remain unchanged.
- a pandoc object: this must be of the same type as the input
@@ -173,7 +174,26 @@ This functionality has been added in pandoc 2.9.2.
[Inlines filter example]: #remove-spaces-before-citations
-## Execution Order
+## Traversal order
+
+The traversal order of filters can be selected by setting the key
+`traverse` to either `'topdown'` or `'typewise'`; the default is
+`'typewise'`.
+
+Example:
+
+``` lua
+local filter = {
+ traverse = 'topdown',
+ -- ... filter functions ...
+}
+return {filter}
+```
+
+Support for this was added in pandoc 2.16.3; previous versions
+ignore the `traverse` setting.
+
+### Typewise traversal
Element filter functions within a filter set are called in a
fixed order, skipping any which are not present:
@@ -203,6 +223,31 @@ All functions in set (1) are thus run before those in (2),
causing the filter function for *Meta* to be run before the
filtering of *Str* elements is started.
+### Topdown traversal
+
+It is sometimes more natural to traverse the document tree
+depth-first from the root towards the leaves, and all in a single
+run.
+
+For example, a block list `[Plain [Str "a"], Para [Str
+"b"]]`{.haskell} will try the following filter functions, in
+order: `Blocks`, `Plain`, `Inlines`, `Str`, `Para`, `Inlines`,
+`Str`.
+
+Topdown traversals can be cut short by returning `false` as a
+second value from the filter function. No child-element of
+the returned element is processed in that case.
+
+For example, to exclude the contents of a footnote from being
+processed, one might write
+
+``` lua
+traverse = 'topdown'
+function Note (n)
+ return n, false
+end
+```
+
## Global variables
Pandoc passes additional data to Lua filters by setting global
@@ -245,6 +290,38 @@ variables.
variable is of type [CommonState] and
is read-only.
+`pandoc`
+: The *pandoc* module, described in the next section, is
+ available through the global `pandoc`. The other modules
+ described herein are loaded as subfields under their
+ respective name.
+
+`lpeg`
+: This variable holds the `lpeg` module, a package based on
+ Parsing Expression Grammars (PEG). It provides excellent
+ parsing utilities and is documented on the official [LPeg
+ homepage]. Pandoc uses a built-int version of the library,
+ unless it has been configured by the package maintainer to
+ rely on a system-wide installation.
+
+ Note that the result of `require 'lpeg'` is not necessarily
+ equal to this value; the `require` mechanism prefers the
+ system's lpeg library over the built-in version.
+
+`re`
+: Contains the LPeg.re module, which is built on top of LPeg
+ and offers an implementation of a [regex engine]. Pandoc
+ uses a built-in version of the library, unless it has been
+ configured by the package maintainer to rely on a system-wide
+ installation.
+
+ Note that the result of `require 're` is not necessarily
+ equal to this value; the `require` mechanism prefers the
+ system's lpeg library over the built-in version.
+
+[LPeg homepage]: http://www.inf.puc-rio.br/~roberto/lpeg/
+[regex engine]: http://www.inf.puc-rio.br/~roberto/lpeg/re.html
+
# Pandoc Module
The `pandoc` Lua module is loaded into the filter's Lua
@@ -491,8 +568,9 @@ will output:
This is the filter we use when converting `MANUAL.txt` to man
pages. It converts level-1 headers to uppercase (using
-`walk_block` to transform inline elements inside headers),
-removes footnotes, and replaces links with regular text.
+[`walk`](#type-block:walk) to transform inline elements inside
+headers), removes footnotes, and replaces links with regular
+text.
``` lua
-- we use preloaded text to get a UTF-8 aware 'upper' function
@@ -500,10 +578,11 @@ local text = require('text')
function Header(el)
if el.level == 1 then
- return pandoc.walk_block(el, {
+ return el:walk {
Str = function(el)
return pandoc.Str(text.upper(el.text))
- end })
+ end
+ }
end
end
@@ -579,7 +658,7 @@ wordcount = {
function Pandoc(el)
-- skip metadata, just count body:
- pandoc.walk_block(pandoc.Div(el.blocks), wordcount)
+ el.blocks:walk(wordcount)
print(words .. " words in body")
os.exit(0)
end
@@ -695,12 +774,12 @@ end
function RawBlock(el)
if starts_with('\\begin{tikzpicture}', el.text) then
local filetype = extension_for[FORMAT] or 'svg'
- local fname = system.get_working_directory() .. '/' ..
- pandoc.sha1(el.text) .. '.' .. filetype
+ local fbasename = pandoc.sha1(el.text) .. '.' .. filetype
+ local fname = system.get_working_directory() .. '/' .. fbasename
if not file_exists(fname) then
tikz2image(el.text, filetype, fname)
end
- return pandoc.Para({pandoc.Image({}, fname)})
+ return pandoc.Para({pandoc.Image({}, fbasename)})
else
return el
end
@@ -752,8 +831,8 @@ Usage:
Pandoc document
Values of this type can be created with the
-[`pandoc.Pandoc`](#pandoc.pandoc) constructor. Object equality is
-determined via [`pandoc.utils.equals`].
+[`pandoc.Pandoc`](#pandoc.pandoc) constructor. Pandoc values are
+equal in Lua if and only if they are equal in Haskell.
`blocks`
: document content ([List] of [Blocks])
@@ -761,83 +840,113 @@ determined via [`pandoc.utils.equals`].
`meta`
: document meta information ([Meta] object)
-## Meta {#type-meta}
-Meta information on a document; string-indexed collection of
-[MetaValues].
+### walk {#type-pandoc:walk}
-Values of this type can be created with the
-[`pandoc.Meta`](#pandoc.meta) constructor. Object equality is
-determined via [`pandoc.utils.equals`].
+`walk(self, lua_filter)`
-## MetaValue {#type-metavalue}
+Applies a Lua filter to the Pandoc element. Just as for
+full-document filters, the order in which elements are traversed
+can be controlled by setting the `traverse` field of the filter;
+see the section on [traversal order][Traversal order].
-Document meta information items.
+Parameters:
-Object equality is determined via [`pandoc.utils.equals`].
+`self`
+: the element ([Pandoc](#type-pandoc))
-### MetaBlocks {#type-metablocks}
+`lua_filter`
+: map of filter functions (table)
-A list of blocks usable as meta value ([List] of [Blocks]).
+Result:
-Fields:
+- filtered document ([Pandoc][])
-`tag`, `t`
-: the literal `MetaBlocks` (string)
+Usage:
-### MetaBool {#type-metabool}
+ -- returns `pandoc.Pandoc{pandoc.Para{pandoc.Str 'Bye'}}`
+ return pandoc.Pandoc{pandoc.Para('Hi')}:walk {
+ Str = function (_) return 'Bye' end,
+ }
-Alias for Lua boolean, i.e. the values `true` and `false`.
-### MetaInlines {#type-metainlines}
+## Meta {#type-meta}
-List of inlines used in metadata ([List] of [Inlines])
+Meta information on a document; string-indexed collection of
+[MetaValues].
Values of this type can be created with the
-[`pandoc.MetaInlines`](#pandoc.metainlines) constructor.
+[`pandoc.Meta`](#pandoc.meta) constructor. Meta values are equal
+in Lua if and only if they are equal in Haskell.
-Fields:
-
-`tag`, `t`
-: the literal `MetaInlines` (string)
+## MetaValue {#type-metavalue}
-### MetaList {#type-metalist}
+Document meta information items. This is not a separate type, but
+describes a set of types that can be used in places were a
+MetaValue is expected. The types correspond to the following
+Haskell type constructors:
+
+- boolean → MetaBool
+- string or number → MetaString
+- Inlines → MetaInlines
+- Blocks → MetaBlocks
+- List/integer indexed table → MetaList
+- string-indexed table → MetaMap
+
+The corresponding constructors
+[`pandoc.MetaBool`](#pandoc.metabool),
+[`pandoc.MetaString`](#pandoc.metastring),
+[`pandoc.MetaInlines`](#pandoc.metainlines),
+[`pandoc.MetaBlocks`](#pandoc.metablocks),
+[`pandoc.MetaList`](#pandoc.metalist), and
+[`pandoc.MetaMap`](#pandoc.metamap)
+can be used to ensure that a value is treated in the intended
+way. E.g., an empty table is normally treated as a `MetaMap`, but
+can be made into an empty `MetaList` by calling
+`pandoc.MetaList{}`. However, the same can be accomplished by
+using the generic functions like `pandoc.List`, `pandoc.Inlines`,
+or `pandoc.Blocks`.
-A list of other metadata values ([List] of [MetaValues]).
+## Block {#type-block}
-Values of this type can be created with the
-[`pandoc.MetaList`](#pandoc.metalist) constructor.
+Block values are equal in Lua if and only if they are equal in
+Haskell.
-Fields:
+### Common methods
-`tag`, `t`
-: the literal `MetaList` (string)
+#### walk {#type-block:walk}
-All methods available for [List]s can be used on this type as
-well.
+`walk(self, lua_filter)`
-### MetaMap {#type-metamap}
+Applies a Lua filter to the block element. Just as for
+full-document filters, the order in which elements are traversed
+can be controlled by setting the `traverse` field of the filter;
+see the section on [traversal order][Traversal order].
-A string-indexed map of meta-values. (table).
+Note that the filter is applied to the subtree, but not to the
+`self` block element. The rationale is that otherwise the element
+could be deleted by the filter, or replaced with multiple block
+elements, which might lead to possibly unexpected results.
-Values of this type can be created with the
-[`pandoc.MetaMap`](#pandoc.metamap) constructor.
+Parameters:
-Fields:
+`self`
+: the element ([Block](#type-block))
-`tag`, `t`
-: the literal `MetaMap` (string)
+`lua_filter`
+: map of filter functions (table)
-*Note*: The fields will be shadowed if the map contains a field
-with the same name as those listed.
+Result:
-### MetaString {#type-metastring}
+- filtered block ([Block][])
-Plain Lua string value (string).
+Usage:
-## Block {#type-block}
+ -- returns `pandoc.Para{pandoc.Str 'Bye'}`
+ return pandoc.Para('Hi'):walk {
+ Str = function (_) return 'Bye' end,
+ }
-Object equality is determined via [`pandoc.utils.equals`].
### BlockQuote {#type-blockquote}
@@ -1133,9 +1242,94 @@ left-aligned, right-aligned, and centered, respectively. The
default alignment is `AlignDefault` (often equivalent to
centered).
+## Blocks {#type-blocks}
+
+List of [Block] elements, with the same methods as a generic
+[List](#type-list). It is usually not necessary to create values
+of this type in user scripts, as pandoc can convert other types
+into Blocks wherever a value of this type is expected:
+
+- a list of [Block] (or Block-like) values is used directly;
+- a single [Inlines] value is wrapped into a [Plain] element;
+- string values are turned into an [Inlines] value by splitting
+ the string into words (see [Inlines](#type-inlines)), and
+ then wrapping the result into a Plain singleton.
+
+### Methods
+
+Lists of type `Blocks` share all methods available in generic
+lists, see the [`pandoc.List` module](#module-pandoc.list).
+
+Additionally, the following methods are available on Blocks
+values:
+
+#### walk {#type-blocks:walk}
+
+`walk(self, lua_filter)`
+
+Applies a Lua filter to the Blocks list. Just as for
+full-document filters, the order in which elements are traversed
+can be controlled by setting the `traverse` field of the filter;
+see the section on [traversal order][Traversal order].
+
+Parameters:
+
+`self`
+: the list ([Blocks](#type-blocks))
+
+`lua_filter`
+: map of filter functions (table)
+
+Result:
+
+- filtered list ([Blocks](#type-blocks))
+
+Usage:
+
+ -- returns `pandoc.Blocks{pandoc.Para('Salve!')}`
+ return pandoc.Blocks{pandoc.Plain('Salve!)}:walk {
+ Plain = function (p) return pandoc.Para(p.content) end,
+ }
+
## Inline {#type-inline}
-Object equality is determined via [`pandoc.utils.equals`].
+Inline values are equal in Lua if and only if they are equal in
+Haskell.
+
+### Common methods
+
+#### walk {#type-inline:walk}
+
+`walk(self, lua_filter)`
+
+Applies a Lua filter to the Inline element. Just as for
+full-document filters, the order in which elements are traversed
+can be controlled by setting the `traverse` field of the filter;
+see the section on [traversal order][Traversal order].
+
+Note that the filter is applied to the subtree, but not to the
+`self` inline element. The rationale is that otherwise the
+element could be deleted by the filter, or replaced with multiple
+inline elements, which might lead to possibly unexpected results.
+
+Parameters:
+
+`self`
+: the element ([Inline](#type-inline))
+
+`lua_filter`
+: map of filter functions (table)
+
+Result:
+
+- filtered inline element ([Inline][])
+
+Usage:
+
+ -- returns `pandoc.SmallCaps('SPQR)`
+ return pandoc.SmallCaps('spqr'):walk {
+ Str = function (s) return string.upper(s.text) end,
+ }
### Cite {#type-cite}
@@ -1206,9 +1400,6 @@ Values of this type can be created with the
Fields:
-`attr`
-: attributes ([Attr])
-
`caption`
: text used to describe the image ([List] of [Inlines])
@@ -1216,7 +1407,10 @@ Fields:
: path to the image file (string)
`title`
-: brief image description
+: brief image description (string)
+
+`attr`
+: attributes ([Attr])
`identifier`
: alias for `attr.identifier` (string)
@@ -1503,6 +1697,57 @@ Fields:
`tag`, `t`
: the literal `Underline` (string)
+## Inlines {#type-inlines}
+
+List of [Inline] elements, with the same methods as a generic
+[List](#type-list). It is usually not necessary to create values
+of this type in user scripts, as pandoc can convert other types
+into Blocks wherever a value of this type is expected:
+
+- lists of [Inline] (or Inline-like) values are used directly;
+- single [Inline] values are converted into a list containing
+ just that element;
+- String values are split into words, converting line breaks
+ into [SoftBreak](#type-softbreak) elements, and other
+ whitespace characters into [Spaces](#type-space).
+
+### Methods
+
+Lists of type `Inlines` share all methods available in generic
+lists, see the [`pandoc.List` module](#module-pandoc.list).
+
+Additionally, the following methods are available on *Inlines*
+values:
+
+#### walk {#type-inlines:walk}
+
+`walk(self, lua_filter)`
+
+Applies a Lua filter to the Inlines list. Just as for
+full-document filters, the order in which elements are handled
+are are Inline → Inlines → Block → Blocks. The filter is applied
+to all list items *and* to the list itself.
+
+Parameters:
+
+`self`
+: the list ([Inlines](#type-inlines))
+
+`lua_filter`
+: map of filter functions (table)
+
+Result:
+
+- filtered list ([Inlines](#type-inlines))
+
+Usage:
+
+ -- returns `pandoc.Inlines{pandoc.SmallCaps('SPQR')}`
+ return pandoc.Inlines{pandoc.Emph('spqr')}:walk {
+ Str = function (s) return string.upper(s.text) end,
+ Emph = function (e) return pandoc.SmallCaps(e.content) end,
+ }
+
## Element components
@@ -1522,7 +1767,8 @@ This also works when using the `attr` setter:
local span = pandoc.Span 'text'
span.attr = {id = 'text', class = 'a b', other_attribute = '1'}
-Object equality is determined via [`pandoc.utils.equals`].
+Attr values are equal in Lua if and only if they are equal in
+Haskell.
Fields:
@@ -1540,6 +1786,9 @@ Fields:
List of key/value pairs. Values can be accessed by using keys as
indices to the list table.
+Attributes values are equal in Lua if and only if they are equal
+in Haskell.
+
### Caption {#type-caption}
The caption of a table, with an optional short caption.
@@ -1568,12 +1817,21 @@ Fields:
: cell contents (list of [Blocks]).
`col_span`
-: number of columns occupied by the cell; the height of the cell
- (integer).
+: number of columns spanned by the cell; the width of the cell
+ in columns (integer).
`row_span`
-: number of rows occupied by the cell; the height of the cell
- (integer).
+: number of rows spanned by the cell; the height of the cell in
+ rows (integer).
+
+`identifier`
+: alias for `attr.identifier` (string)
+
+`classes`
+: alias for `attr.classes` ([List] of strings)
+
+`attributes`
+: alias for `attr.attributes` ([Attributes])
### Citation {#type-citation}
@@ -1582,7 +1840,8 @@ Single citation entry
Values of this type can be created with the
[`pandoc.Citation`](#pandoc.citation) constructor.
-Object equality is determined via [`pandoc.utils.equals`].
+Citation values are equal in Lua if and only if they are equal in
+Haskell.
Fields:
@@ -1610,7 +1869,8 @@ Fields:
Column alignment and width specification for a single table
column.
-This is a pair with the following components:
+This is a pair, i.e., a plain table, with the following
+components:
1. cell alignment ([Alignment]).
2. table column width, as a fraction of the total table width
@@ -1623,8 +1883,6 @@ List attributes
Values of this type can be created with the
[`pandoc.ListAttributes`](#pandoc.listattributes) constructor.
-Object equality is determined via [`pandoc.utils.equals`].
-
Fields:
`start`
@@ -1643,10 +1901,13 @@ Fields:
A table row.
-Tuple fields:
+Fields:
-1. row attributes
-2. row cells (list of [Cells])
+`attr`
+: element attributes ([Attr][])
+
+`cells`
+: list of table cells ([List][] of [Cell][]s)
### TableBody {#type-tablebody}
@@ -1656,35 +1917,59 @@ number of row header columns.
Fields:
`attr`
-: table body attributes ([Attr])
+: table body attributes ([Attr][])
`body`
-: table body rows (list of [Rows])
+: table body rows ([List][] of [Row][]s)
`head`
-: intermediate head (list of [Rows])
+: intermediate head ([List][] of [Row][]s)
`row_head_columns`
: number of columns taken up by the row head of each row of a
- [TableBody]. The row body takes up the remaining columns.
+ [TableBody][]. The row body takes up the remaining columns.
### TableFoot {#type-tablefoot}
The foot of a table.
-This is a pair with the following components:
+Fields:
-1. attributes
-2. foot rows ([Rows])
+`attr`
+: element attributes ([Attr][])
+
+`rows`
+: list of rows ([List][] of [Row][]s)
+
+`identifier`
+: alias for `attr.identifier` (string)
+
+`classes`
+: alias for `attr.classes` ([List][] of strings)
+
+`attributes`
+: alias for `attr.attributes` ([Attributes][])
### TableHead {#type-tablehead}
The head of a table.
-This is a pair with the following components:
+Fields:
+
+`attr`
+: element attributes ([Attr][])
+
+`rows`
+: list of rows ([List][] of [Row][]s)
+
+`identifier`
+: alias for `attr.identifier` (string)
+
+`classes`
+: alias for `attr.classes` ([List][] of strings)
-1. attributes
-2. head rows ([Rows])
+`attributes`
+: alias for `attr.attributes` ([Attributes][])
## ReaderOptions {#type-readeroptions}
@@ -1836,7 +2121,7 @@ Values of this type can be created with the
`must_be_at_least(actual, expected [, error_message])`
Raise an error message if the actual version is older than the
-expected version; does nothing if actual is equal to or newer
+expected version; does nothing if `actual` is equal to or newer
than the expected version.
Parameters:
@@ -1867,6 +2152,7 @@ Usage:
[Block]: #type-block
[Blocks]: #type-block
[Caption]: #type-caption
+[Cell]: #type-cell
[Cells]: #type-cell
[Citation]: #type-citation
[Citations]: #type-citation
@@ -1884,6 +2170,8 @@ Usage:
[LogMessage]: #type-logmessage
[Pandoc]: #type-pandoc
[Para]: #type-para
+[Plain]: #type-plain
+[Row]: #type-row
[Rows]: #type-row
[SimpleTable]: #type-simpletable
[Table]: #type-table
@@ -1891,7 +2179,6 @@ Usage:
[TableFoot]: #type-tablefoot
[TableHead]: #type-tablehead
[Version]: #type-version
-[`pandoc.utils.equals`]: #pandoc.utils.equals
# Module text
@@ -1978,71 +2265,83 @@ format, and functions to filter and modify a subtree.
[`MetaBlocks (blocks)`]{#pandoc.metablocks}
-: Meta blocks
+: Creates a value to be used as a MetaBlocks value in meta
+ data; creates a copy of the input list via `pandoc.Blocks`,
+ discarding all non-list keys.
Parameters:
`blocks`:
: blocks
- Returns: [MetaBlocks] object
+ Returns: [Blocks](#type-blocks)
[`MetaInlines (inlines)`]{#pandoc.metainlines}
-: Meta inlines
+: Creates a value to be used as a MetaInlines value in meta
+ data; creates a copy of the input list via `pandoc.Inlines`,
+ discarding all non-list keys.
Parameters:
`inlines`:
: inlines
- Returns: [MetaInlines] object
+ Returns: [Inlines](#types-inlines)
[`MetaList (meta_values)`]{#pandoc.metalist}
-: Meta list
+: Creates a value to be used as a MetaList in meta data;
+ creates a copy of the input list via `pandoc.List`,
+ discarding all non-list keys.
Parameters:
`meta_values`:
: list of meta values
- Returns: [MetaList] object
+ Returns: [List]
[`MetaMap (key_value_map)`]{#pandoc.metamap}
-: Meta map
+: Creates a value to be used as a MetaMap in meta data; creates
+ a copy of the input table, keeping only pairs with string
+ keys and discards all other keys.
Parameters:
`key_value_map`:
: a string-indexed map of meta values
- Returns: [MetaMap] object
+ Returns: table
[`MetaString (str)`]{#pandoc.metastring}
-: Creates string to be used in meta data.
+: Creates a value to be used as a MetaString in meta data; this
+ is the identity function for boolean values and exists only
+ for completeness.
Parameters:
`str`:
: string value
- Returns: [MetaString] object
+ Returns: string
[`MetaBool (bool)`]{#pandoc.metabool}
-: Creates boolean to be used in meta data.
+: Creates a value to be used as MetaBool in meta data; this is
+ the identity function for boolean values and exists only for
+ completeness.
Parameters:
`bool`:
: boolean value
- Returns: [MetaBool] object
+ Returns: boolean
-## Blocks
+## Block
[`BlockQuote (content)`]{#pandoc.blockquote}
@@ -2222,6 +2521,20 @@ format, and functions to filter and modify a subtree.
Returns: [Table](#type-table) object
+## Blocks
+
+[`Blocks (block_like_elements)`]{#pandoc.blocks}
+
+: Creates a [Blocks](#type-blocks) list.
+
+ Parameters:
+
+ `block_like_elements`:
+ : List where each element can be treated as a [Block]
+ value, or a single such value.
+
+ Returns: [Blocks] list
+
## Inline
[`Cite (content, citations)`]{#pandoc.cite}
@@ -2511,6 +2824,27 @@ format, and functions to filter and modify a subtree.
Returns: [Underline](#type-underline) object
+## Inlines
+
+[`Inlines (inline_like_elements)`]{#pandoc.inlines}
+
+: Converts its argument into an [Inlines](#type-inlines) list:
+
+ - copies a list of [Inline] elements into a fresh list; any
+ string `s` within the list is treated as `pandoc.Str(s)`;
+ - turns a single [Inline] into a singleton list;
+ - splits a string into `Str`-wrapped words, treating
+ interword spaces as `Space`s or `SoftBreak`s.
+
+ Parameters:
+
+ `inline_like_elements`:
+ : List where each element can be treated as an [Inline]
+ values, or just a single such value.
+
+ Returns: [Inlines] list
+
+
## Element components
[`Attr ([identifier[, classes[, attributes]]])`]{#pandoc.attr}
@@ -2530,6 +2864,33 @@ format, and functions to filter and modify a subtree.
Returns: [Attr](#type-attr) object
+[`Cell (blocks[, align[, rowspan[, colspan[, attr]]]])`]{#pandoc.attr}
+
+: Create a new table cell.
+
+ Parameters:
+
+ `blocks`:
+ : cell contents (list of [Blocks])
+
+ `align`:
+ : text alignment; defaults to `AlignDefault` (Alignment)
+
+ `rowspan`:
+ : number of rows occupied by the cell; defaults to `1`
+ (integer)
+
+ `colspan`:
+ : number of columns spanned by the cell; defaults to `1`
+ (integer)
+
+ `attr`:
+ : cell attributes ([Attr](#type-attr))
+
+ Returns:
+
+ - [Cell](#type-cell) object
+
[`Citation (id, mode[, prefix[, suffix[, note_num[, hash]]]])`]{#pandoc.citation}
: Creates a single citation.
@@ -2573,6 +2934,42 @@ format, and functions to filter and modify a subtree.
Returns: [ListAttributes](#type-listattributes) object
+[`Row ([cells[, attr]])`]{#pandoc.row}
+
+: Creates a table row.
+
+ Parameters:
+
+ `cells`:
+ : list of table cells in this row
+
+ `attr`:
+ : row attributes
+
+[`TableFoot ([rows[, attr]])`]{#pandoc.tablefoot}
+
+: Creates a table foot.
+
+ Parameters:
+
+ `rows`:
+ : list of table rows
+
+ `attr`:
+ : table foot attributes
+
+[`TableHead ([rows[, attr]])`]{#pandoc.tablehead}
+
+: Creates a table head.
+
+ Parameters:
+
+ `rows`:
+ : list of table rows
+
+ `attr`:
+ : table head attributes
+
## Legacy types
[`SimpleTable (caption, aligns, widths, headers, rows)`]{#pandoc.simpletable}
@@ -2732,7 +3129,33 @@ format, and functions to filter and modify a subtree.
[`sha1`]{#pandoc.sha1}
: Alias for [`pandoc.utils.sha1`](#pandoc.utils.sha1)
- (DEPRECATED).
+ (DEPRECATED, use `pandoc.utils.sha1` instead).
+
+## Other constructors
+
+[`ReaderOptions (opts)`]{#pandoc.readeroptions}
+
+: Creates a new [ReaderOptions] value.
+
+ Parameters
+
+ `opts`:
+ : Either a table with a subset of the properties of a
+ [ReaderOptions] object, or another ReaderOptions object.
+ Uses the defaults specified in the manual for all
+ properties that are not explicitly specified. Throws an
+ error if a table contains properties which are not present
+ in a ReaderOptions object. ([ReaderOptions]|table)
+
+ Returns: new [ReaderOptions] object
+
+ Usage:
+
+ -- copy of the reader options that were defined on the command line.
+ local cli_opts = pandoc.ReaderOptions(PANDOC_READER_OPTIONS)
+
+ -- default reader options, but columns set to 66.
+ local short_colums_opts = pandoc.ReaderOptions {columns = 66}
## Helper functions
@@ -2805,17 +3228,23 @@ Returns: the transformed inline element
### read {#pandoc.read}
-`read (markup[, format])`
+`read (markup[, format[, reader_options]])`
Parse the given string into a Pandoc document.
Parameters:
`markup`:
-: the markup to be parsed
+: the markup to be parsed (string)
`format`:
-: format specification, defaults to `"markdown"`.
+: format specification, defaults to `"markdown"` (string)
+
+`reader_options`:
+: options passed to the reader; may be a ReaderOptions object or
+ a table with a subset of the keys and values of a
+ ReaderOptions object; defaults to the default values
+ documented in the manual. ([ReaderOptions]|table)
Returns: pandoc document
@@ -2828,6 +3257,8 @@ Usage:
-- The inline element in that block is an `Emph`
assert(block.content[1].t == "Emph")
+[ReaderOptions]: #type-readeroptions
+
# Module pandoc.utils
This module exposes internal pandoc functions and utility
@@ -2882,12 +3313,13 @@ Test equality of AST elements. Elements in Lua are considered
equal if and only if the objects obtained by unmarshaling are
equal.
+**This function is deprecated.** Use the normal Lua `==` equality
+operator instead.
+
Parameters:
`element1`, `element2`:
-: Objects to be compared. Acceptable input types are [Pandoc],
- [Meta], [MetaValue], [Block], [Inline], [Attr],
- [ListAttributes], and [Citation].
+: Objects to be compared (any type)
Returns:
@@ -2927,9 +3359,21 @@ non-null, `Header` levels will be reorganized so
that there are no gaps, and so that the base level
is the level specified.
+Parameters:
+
+`number_sections`
+: whether section divs should get an additional `number`
+ attribute containing the section number. (boolean)
+
+`base_level`
+: shift top-level headings to this level. (integer|nil)
+
+`blocks`
+: list of blocks to process ([Blocks](#type-blocks))
+
Returns:
-- List of [Blocks](#type-block).
+- [Blocks](#type-blocks).
Usage:
@@ -2939,6 +3383,38 @@ Usage:
}
local newblocks = pandoc.utils.make_sections(true, 1, blocks)
+### references {#pandoc.references}
+
+`references (doc)`
+
+Get references defined inline in the metadata and via an external
+bibliography. Only references that are actually cited in the
+document (either with a genuine citation or with `nocite`) are
+returned. URL variables are converted to links.
+
+The structure used represent reference values corresponds to that
+used in CSL JSON; the return value can be use as `references`
+metadata, which is one of the values used by pandoc and citeproc
+when generating bibliographies.
+
+Parameters:
+
+`doc`:
+: document ([Pandoc](#type-pandoc))
+
+Returns:
+
+- list of references. (table)
+
+Usage:
+
+ -- Include all cited references in document
+ function Pandoc (doc)
+ doc.meta.references = pandoc.utils.references(doc)
+ doc.meta.bibliography = nil
+ return doc
+ end
+
### run\_json\_filter {#pandoc.utils.run_json_filter}
`run_json_filter (doc, filter[, args])`
@@ -3050,6 +3526,39 @@ Usage:
-- create normal table block again
table = pandoc.utils.from_simple_table(simple)
+### type {#pandoc.utils.type}
+
+`type (value)`
+
+Pandoc-friendly version of Lua's default `type` function,
+returning the type of a value. This function works with all types
+listed in section [Lua type reference][], except if noted
+otherwise.
+
+The function works by checking the metafield `__name`. If the
+argument has a string-valued metafield `__name`, then it returns
+that string. Otherwise it behaves just like the normal `type`
+function.
+
+Parameters:
+
+`value`
+: any Lua value
+
+Returns:
+
+- type of the given value (string)
+
+Usage:
+
+ -- Prints one of 'string', 'boolean', 'Inlines', 'Blocks',
+ -- 'table', and 'nil', corresponding to the Haskell constructors
+ -- MetaString, MetaBool, MetaInlines, MetaBlocks, MetaMap,
+ -- and an unset value, respectively.
+ function Meta (meta)
+ print('type of metavalue `author`:', pandoc.utils.type(meta.author))
+ end
+
# Module pandoc.mediabag
The `pandoc.mediabag` module allows accessing pandoc's media
@@ -3230,6 +3739,22 @@ methods and convenience functions.
Returns: a new list containing all elements from list1 and
list2
+[`pandoc.List:__eq (a, b)`]{#pandoc.list:__concat}
+
+: Compares two lists for equality. The lists are taken as equal
+ if and only if they are of the same type (i.e., have the same
+ non-nil metatable), have the same length, and if all elements
+ are equal.
+
+ Parameters:
+
+ `a`, `b`:
+ : any Lua object
+
+ Returns:
+
+ - `true` if the two lists are equal, `false` otherwise.
+
## Methods
[`pandoc.List:clone ()`]{#pandoc.list:clone}
@@ -3442,7 +3967,7 @@ filepath
Returns:
-- `true` iff `filepath` is an absolute path, `false` otherwise.
+- `true` if `filepath` is an absolute path, `false` otherwise.
(boolean)
### is_relative (filepath) {#pandoc.path.is_relative}
@@ -3456,7 +3981,7 @@ filepath
Returns:
-- `true` iff `filepath` is a relative path, `false` otherwise.
+- `true` if `filepath` is a relative path, `false` otherwise.
(boolean)
### join (filepaths) {#pandoc.path.join}
diff --git a/doc/short-guide-to-pandocs-sources.md b/doc/short-guide-to-pandocs-sources.md
new file mode 100644
index 000000000..722063e03
--- /dev/null
+++ b/doc/short-guide-to-pandocs-sources.md
@@ -0,0 +1,259 @@
+---
+title: Short guide to pandoc's sources
+subtitle: Laying a path for code wanderers
+author: Albert Krewinkel
+date: 2021-06-07
+---
+
+Pandoc, the universal document converter, can serve as a nice intro
+into functional programming with Haskell. For many contributors,
+including the author of this guide, pandoc was their first real
+exposure to this language. Despite its impressive size of more than
+60.000 lines of Haskell code (excluding the test suite), pandoc is
+still very approachable due to its modular architecture. It can
+serve as an interesting subject for learning.
+
+This guide exists to navigate the large amount of sources, to
+lay-out a path that can be followed for learning, and to explain the
+underlying concepts.
+
+A basic understanding of Haskell and of pandoc's functionality is
+assumed.
+
+# Getting the code
+
+Pandoc has a publicly accessible git repository on GitHub:
+<https://github.com/jgm/pandoc>. To get a local copy of the source:
+
+ git clone https://github.com/jgm/pandoc
+
+The source for the main pandoc program is `app/pandoc.hs`. The
+source for the pandoc library is in `src/`, the source for the tests
+is in `test/`, and the source for the benchmarks is in `benchmark/`.
+
+Core type definitions are in the separate [*pandoc-types* repo].
+Get it with
+
+ git clone https://github.com/jgm/pandoc-types
+
+The organization of library and test sources is identical to the
+main repo.
+
+[*pandoc-types* repo]: https://github.com/jgm/pandoc-types
+
+# Document representation
+
+The way documents are represented in pandoc is part of its success.
+Every document is read into one central data structure, the
+so-called *abstract syntax tree* (AST).
+
+The AST is defined in module `Text.Pandoc.Definition` in package
+[*pandoc-types*].
+
+It is not necessary to understand the AST in detail, just check-out
+the following points:
+
+ * The [`Pandoc`][def-Pandoc] type serves as the central structure.
+
+ * A document has metadata and a list of "block" elements.
+
+ * There are various types of [blocks][def-Block]; some contain raw
+ text, others contain "Inline" elements.
+
+ * [Inlines][def-Inline] are "running text", with many different
+ types. The most important contstructors are `Str` (a word),
+ `Space` (a space char), `Emph` (emphasized text), and `Strong`
+ (strongly emphasized text). It's worth checking their
+ definitions.
+
+ * Element attributes are captured as [`Attr`][def-Attr], which is a
+ triple of the element identifier, its classes, and the key-value
+ pairs.^[For plans to change this see [jgm/pandoc-types#88].]
+
+[*pandoc-types*]: https://hackage.haskell.org/package/pandoc-types
+[jgm/pandoc-types#88]: https://github.com/jgm/pandoc-types/issues/88
+[def-Pandoc]: https://hackage.haskell.org/package/pandoc-types/docs/src/Text.Pandoc.Definition.html#Pandoc
+[def-Block]: https://hackage.haskell.org/package/pandoc-types/docs/src/Text.Pandoc.Definition.html#Block
+[def-Inline]: https://hackage.haskell.org/package/pandoc-types/docs/src/Text.Pandoc.Definition.html#Inline
+[def-Attr]: https://hackage.haskell.org/package/pandoc-types/docs/src/Text.Pandoc.Definition.html#Attr
+
+# Basic architecture
+
+Take a look at pandoc's source files. The code is below the `src`
+directory, in the `Text.Pandoc` module. The basic flow is:
+
+ 1. Document is parsed into the internal representation by a
+ *reader*;
+
+ 2. the document AST is modified (optional);
+
+ 3. then the internal respresentation is converted into the target
+ format by a *writer*.
+
+The [*readers*] can be found in `Text.Pandoc.Readers`, while the
+[*writers*] are submodules of `Text.Pandoc.Writers`. The document
+modification step is powerful and used in different ways, e.g., in
+[*filters*].
+
+These parts are the "muscles" of pandoc, which do the heavy lifting.
+Everything else can be thought of as the bones and fibers to which
+these parts are attached and which make them usable.
+
+# Writers
+
+Writers are usually simpler than readers and therefore easier to
+grasp.
+
+Broadly speaking, there are three kind of writers:
+
+ 1. Text writers: these are used for lightweight markup languages
+ and generate plain text output. Examples: Markdown, Org,
+ reStructuredText.
+ 2. XML writers, which convert the AST into structured XML.
+ Examples: HTML, JATS.
+ 3. Binary writers, which are like XML writers, but combine the
+ output with other data and zip it into a single file. Examples:
+ docx, epub.
+
+ Most writers follow a common pattern and have three main functions:
+ docTo*Format*, blockTo*Format* and inlineTo*Format*. Each converts
+ the `Pandoc`, `Block`, and `Inline` elements, respectively. The
+ *XWiki* and *TEI* writers are comparatively simple and suitable
+ samples when taking a first look.
+
+ Most writers are self-contained in that most of the conversion code
+ is within a single module. However, newer writers often use a
+ different setup: those are built around modules from an external
+ package. The details of how to serialize the document are not in
+ the writer module itself, but in an external module. The writer
+ only has to convert pandoc's AST into the document representation
+ used by the module. Good examples: commonmark, jira.
+
+## DocLayout
+
+All writers build on the `doclayout` package. It can be thought of
+as a pretty printer with extra features suitable for lightweight
+markup languages. E.g., multiple blank lines are collapsed into a
+single blank line, unless multiple blank lines are specifically
+requested. This simplifies the code significantly.
+
+See the repo at https://github.com/jgm/doclayout, and the [hackage
+documentation](https://hackage.haskell.org/package/doclayout)
+
+# Readers
+
+The same distinction that applies to writers also applies to
+readers. Readers for XML formats use XML parsing libraries, while
+plain text formats are parsed with [parsec].
+
+## Builders
+
+The plain type constructors from the [`Text.Pandoc.Definition`]
+module can be difficult to use, which is why the module
+[`Text.Pandoc.Builder`] exists. It offers functions to conveniently
+build and combine AST elements.
+
+The most interesting and important types in `Builder` are
+[`Blocks`][def-Blocks] and [`Inlines`][def-Inlines]. All type
+constructors use simple lists for sequences of AST elements.
+Building lists can be awkward and often comes with bad performance
+characteristics, esp. when appending. The `Blocks` and `Inlines`
+types are better suited for these operations and are therefore used
+extensively in builder functions.
+
+The builder functions are named with the convention that the suffix
+`With` is added if the first argument is an `Attr`; there is usually
+another function without that suffix, creating an element with no
+attributes.
+
+[def-Blocks]: https://hackage.haskell.org/package/pandoc-types/docs/src/Text.Pandoc.Builder.html#Blocks
+[def-Inlines]: https://hackage.haskell.org/package/pandoc-types/docs/src/Text.Pandoc.Builder.html#Inlines
+[parsec]: https://hackage.haskell.org/package/parsec
+
+# PandocMonad
+
+Looking at the readers and writers, one will notice that they all
+operate within the `PandocMonad` type class. This class gives access
+to options, file operations, and other shared information. The
+typeclass has two main implementations: one operates in IO, so on
+the "real world", while the other provides a pure functional
+interface, suitable to "mock" an environment for testing.
+
+# Document modifications
+
+One of the big advantages of a central document structure is that it
+allows document modifications via a unified interface. This section
+describes the multiple ways in which the document can be altered.
+
+## Walkable
+
+Document traversal happens through the `Walkable` class in module
+`Text.Pandoc.Walk` ([*pandoc-types* package]).
+
+## Transformations
+
+Transformations are simple modifications controllable through
+command-line options.
+
+## Filters
+
+Filters allow to use Lua or any external language to perform
+document transformations.
+
+
+[`Text.Pandoc.Builder`]: https://hackage.haskell.org/package/pandoc-types/docs/Text-Pandoc-Builder.html
+[`Text.Pandoc.Definition`]: https://hackage.haskell.org/package/pandoc-types/docs/Text-Pandoc-Definition.html
+
+# Module overview
+
+The library is structured as follows:
+
+ - `Text.Pandoc` is a top-level module that exports what is needed
+ by most users of the library. Any patches that add new readers
+ or writers will need to make changes here, too.
+ - `Text.Pandoc.Definition` (in `pandoc-types`) defines the types
+ used for representing a pandoc document.
+ - `Text.Pandoc.Builder` (in `pandoc-types`) provides functions for
+ building pandoc documents programmatically.
+ - `Text.Pandoc.Generics` (in `pandoc-types`) provides functions allowing
+ you to promote functions that operate on parts of pandoc documents
+ to functions that operate on whole pandoc documents, walking the
+ tree automatically.
+ - `Text.Pandoc.Readers.*` are the readers, and `Text.Pandoc.Writers.*`
+ are the writers.
+ - `Text.Pandoc.Citeproc.*` contain the code for citation handling,
+ including an interface to the [citeproc] library.
+ - `Text.Pandoc.Data` is used to embed data files when the `embed_data_files`
+ cabal flag is used.
+ - `Text.Pandoc.Emoji` is a thin wrapper around [emojis].
+ - `Text.Pandoc.Highlighting` contains the interface to the
+ skylighting library, which is used for code syntax highlighting.
+ - `Text.Pandoc.ImageSize` is a utility module containing functions for
+ calculating image sizes from the contents of image files.
+ - `Text.Pandoc.MIME` contains functions for associating MIME types
+ with extensions.
+ - `Text.Pandoc.Lua.*` implement Lua filters.
+ - `Text.Pandoc.Options` defines reader and writer options.
+ - `Text.Pandoc.PDF` contains functions for producing PDFs.
+ - `Text.Pandoc.Parsing` contains parsing functions used in multiple readers.
+ the needs of pandoc.
+ - `Text.Pandoc.SelfContained` contains functions for making an HTML
+ file "self-contained," by importing remotely linked images, CSS,
+ and JavaScript and turning them into `data:` URLs.
+ - `Text.Pandoc.Shared` is a grab-bag of shared utility functions.
+ - `Text.Pandoc.Writers.Shared` contains utilities used in writers only.
+ - `Text.Pandoc.Slides` contains functions for splitting a markdown document
+ into slides, using the conventions described in the MANUAL.
+ - `Text.Pandoc.Templates` defines pandoc's templating system.
+ - `Text.Pandoc.UTF8` contains functions for converting text to and from
+ UTF8 bytestrings (strict and lazy).
+ - `Text.Pandoc.Asciify` contains functions to derive ascii versions of
+ identifiers that use accented characters.
+ - `Text.Pandoc.UUID` contains functions for generating UUIDs.
+ - `Text.Pandoc.XML` contains functions for formatting XML.
+
+
+<!--
+# Templating
+## DocTemplates
+-->
diff --git a/man/pandoc.1 b/man/pandoc.1
index c77ab93bd..cbc100841 100644
--- a/man/pandoc.1
+++ b/man/pandoc.1
@@ -1,7 +1,7 @@
'\" t
-.\" Automatically generated by Pandoc 2.14.0.1
+.\" Automatically generated by Pandoc 2.16.1
.\"
-.TH "Pandoc User\[cq]s Guide" "" "June 20, 2021" "pandoc 2.14.0.3" ""
+.TH "Pandoc User\[cq]s Guide" "" "November 20, 2021" "pandoc 2.16.2" ""
.hy
.SH NAME
pandoc - general markup converter
@@ -178,11 +178,11 @@ is used), \f[C]fancyvrb\f[R], \f[C]longtable\f[R], \f[C]booktabs\f[R],
\f[C]hyperref\f[R], \f[C]xcolor\f[R], \f[C]ulem\f[R], \f[C]geometry\f[R]
(with the \f[C]geometry\f[R] variable set), \f[C]setspace\f[R] (with
\f[C]linestretch\f[R]), and \f[C]babel\f[R] (with \f[C]lang\f[R]).
+If \f[C]CJKmainfont\f[R] is set, \f[C]xeCJK\f[R] is needed.
The use of \f[C]xelatex\f[R] or \f[C]lualatex\f[R] as the PDF engine
requires \f[C]fontspec\f[R].
\f[C]lualatex\f[R] uses \f[C]selnolig\f[R].
-\f[C]xelatex\f[R] uses \f[C]polyglossia\f[R] (with \f[C]lang\f[R]),
-\f[C]xecjk\f[R], and \f[C]bidi\f[R] (with the \f[C]dir\f[R] variable
+\f[C]xelatex\f[R] uses \f[C]bidi\f[R] (with the \f[C]dir\f[R] variable
set).
If the \f[C]mathspec\f[R] variable is set, \f[C]xelatex\f[R] will use
\f[C]mathspec\f[R] instead of \f[C]unicode-math\f[R].
@@ -291,6 +291,8 @@ if you need extensions not supported in \f[C]gfm\f[R].
.IP \[bu] 2
\f[C]org\f[R] (Emacs Org mode)
.IP \[bu] 2
+\f[C]rtf\f[R] (Rich Text Format)
+.IP \[bu] 2
\f[C]rst\f[R] (reStructuredText)
.IP \[bu] 2
\f[C]t2t\f[R] (txt2tags)
@@ -302,6 +304,8 @@ if you need extensions not supported in \f[C]gfm\f[R].
\f[C]twiki\f[R] (TWiki markup)
.IP \[bu] 2
\f[C]vimwiki\f[R] (Vimwiki)
+.IP \[bu] 2
+the path of a custom Lua reader, see Custom readers and writers below
.PP
Extensions can be individually enabled or disabled by appending
\f[C]+EXTENSION\f[R] or \f[C]-EXTENSION\f[R] to the format name.
@@ -430,7 +434,7 @@ markup)
.IP \[bu] 2
\f[C]zimwiki\f[R] (ZimWiki markup)
.IP \[bu] 2
-the path of a custom Lua writer, see Custom writers below
+the path of a custom Lua writer, see Custom readers and writers below
.PP
Note that \f[C]odt\f[R], \f[C]docx\f[R], \f[C]epub\f[R], and
\f[C]pdf\f[R] output will not be directed to \f[I]stdout\f[R] unless
@@ -552,13 +556,14 @@ Markdown documents that use level-1 headings for sections to HTML, since
pandoc uses a level-1 heading to render the document title.
.TP
\f[B]\f[CB]--base-header-level=\f[B]\f[R]\f[I]NUMBER\f[R]
-\f[I]Deprecated. Use \f[CI]--shift-heading-level-by\f[I]=X instead,
-where X = NUMBER - 1.\f[R] Specify the base level for headings (defaults
-to 1).
+\f[I]Deprecated.
+Use \f[CI]--shift-heading-level-by\f[I]=X instead, where X = NUMBER -
+1.\f[R] Specify the base level for headings (defaults to 1).
.TP
\f[B]\f[CB]--strip-empty-paragraphs\f[B]\f[R]
-\f[I]Deprecated. Use the \f[CI]+empty_paragraphs\f[I] extension
-instead.\f[R] Ignore paragraphs with no content.
+\f[I]Deprecated.
+Use the \f[CI]+empty_paragraphs\f[I] extension instead.\f[R] Ignore
+paragraphs with no content.
This option is useful for converting word processing documents where
users have used empty paragraphs to create inter-paragraph space.
.TP
@@ -763,10 +768,19 @@ rendering the document in standalone mode.
If no \f[I]VAL\f[R] is specified, the key will be given the value
\f[C]true\f[R].
.TP
+\f[B]\f[CB]--sandbox\f[B]\f[R]
+Run pandoc in a sandbox, limiting IO operations in readers and writers
+to reading the files specified on the command line.
+Note that this option does not limit IO operations by filters or in the
+production of PDF documents.
+But it does offer security against, for example, disclosure of files
+through the use of \f[C]include\f[R] directives.
+Anyone using pandoc on untrusted user input should use this option.
+.TP
\f[B]\f[CB]-D\f[B]\f[R] \f[I]FORMAT\f[R], \f[B]\f[CB]--print-default-template=\f[B]\f[R]\f[I]FORMAT\f[R]
Print the system default template for an output \f[I]FORMAT\f[R].
-(See \f[C]-t\f[R] for a list of possible \f[I]FORMAT\f[R]s.) Templates
-in the user data directory are ignored.
+(See \f[C]-t\f[R] for a list of possible \f[I]FORMAT\f[R]s.)
+Templates in the user data directory are ignored.
This option may be used with \f[C]-o\f[R]/\f[C]--output\f[R] to redirect
output to a file, but \f[C]-o\f[R]/\f[C]--output\f[R] must come before
\f[C]--print-default-template\f[R] on the command line.
@@ -794,8 +808,8 @@ The default is \f[C]native\f[R].
\f[B]\f[CB]--dpi\f[B]\f[R]=\f[I]NUMBER\f[R]
Specify the default dpi (dots per inch) value for conversion from pixels
to inch/centimeters and vice versa.
-(Technically, the correct term would be ppi: pixels per inch.) The
-default is 96dpi.
+(Technically, the correct term would be ppi: pixels per inch.)
+The default is 96dpi.
When images contain information about dpi internally, the encoded value
is used instead of the default specified by this option.
.TP
@@ -993,13 +1007,16 @@ Specify whether footnotes (and references, if \f[C]reference-links\f[R]
is set) are placed at the end of the current (top-level) block, the
current section, or the document.
The default is \f[C]document\f[R].
-Currently only affects the markdown writer.
+Currently this option only affects the \f[C]markdown\f[R],
+\f[C]muse\f[R], \f[C]html\f[R], \f[C]epub\f[R], \f[C]slidy\f[R],
+\f[C]s5\f[R], \f[C]slideous\f[R], \f[C]dzslides\f[R], and
+\f[C]revealjs\f[R] writers.
.TP
\f[B]\f[CB]--markdown-headings=setext\f[B]\f[R]|\f[B]\f[CB]atx\f[B]\f[R]
Specify whether to use ATX-style (\f[C]#\f[R]-prefixed) or Setext-style
(underlined) headings for level 1 and 2 headings in Markdown output.
-(The default is \f[C]atx\f[R].) ATX-style headings are always used for
-levels 3+.
+(The default is \f[C]atx\f[R].)
+ATX-style headings are always used for levels 3+.
This option also affects Markdown cells in \f[C]ipynb\f[R] output.
.TP
\f[B]\f[CB]--atx-headers\f[B]\f[R]
@@ -1059,10 +1076,13 @@ Specifies that headings with the specified level create slides (for
Headings above this level in the hierarchy are used to divide the slide
show into sections; headings below this level create subheads within a
slide.
-Note that content that is not contained under slide-level headings will
-not appear in the slide show.
-The default is to set the slide level based on the contents of the
-document; see Structuring the slide show.
+Valid values are 0-6.
+If a slide level of 0 is specified, slides will not be split
+automatically on headings, and horizontal rules must be used to indicate
+slide boundaries.
+If a slide level is not specified explicitly, the slide level will be
+set automatically based on the contents of the document; see Structuring
+the slide show.
.TP
\f[B]\f[CB]--section-divs\f[B]\f[R]
Wrap sections in \f[C]<section>\f[R] tags (or \f[C]<div>\f[R] tags for
@@ -1234,16 +1254,28 @@ Templates included with Microsoft PowerPoint 2013 (either with
most templates derived from these.
.RS
.PP
-The specific requirement is that the template should begin with the
-following first four layouts:
-.IP "1." 3
+The specific requirement is that the template should contain layouts
+with the following names (as seen within PowerPoint):
+.IP \[bu] 2
Title Slide
-.IP "2." 3
+.IP \[bu] 2
Title and Content
-.IP "3." 3
+.IP \[bu] 2
Section Header
-.IP "4." 3
+.IP \[bu] 2
Two Content
+.IP \[bu] 2
+Comparison
+.IP \[bu] 2
+Content with Caption
+.IP \[bu] 2
+Blank
+.PP
+For each name, the first layout found with that name will be used.
+If no layout is found with one of the names, pandoc will output a
+warning and use the layout with that name from the default reference doc
+instead.
+(How these layouts are used is described in PowerPoint layout choice.)
.PP
All templates included with a recent version of MS PowerPoint will fit
these criteria.
@@ -1253,7 +1285,7 @@ check.)
You can also modify the default \f[C]reference.pptx\f[R]: first run
\f[C]pandoc -o custom-reference.pptx --print-default-data-file reference.pptx\f[R],
and then modify \f[C]custom-reference.pptx\f[R] in MS PowerPoint (pandoc
-will use the first four layout slides, as mentioned above).
+will use the layouts with the names listed above).
.RE
.RE
.TP
@@ -1404,10 +1436,11 @@ list of citations in CSL YAML format with Markdown formatting.
The style is controlled by a CSL stylesheet specified using the
\f[C]--csl\f[R] option or the \f[C]csl\f[R] field in metadata.
(If no stylesheet is specified, the \f[C]chicago-author-date\f[R] style
-will be used by default.) The citation processing transformation may be
-applied before or after filters or Lua filters (see \f[C]--filter\f[R],
-\f[C]--lua-filter\f[R]): these transformations are applied in the order
-they appear on the command line.
+will be used by default.)
+The citation processing transformation may be applied before or after
+filters or Lua filters (see \f[C]--filter\f[R], \f[C]--lua-filter\f[R]):
+these transformations are applied in the order they appear on the
+command line.
For more information, see the section on Citations.
.TP
\f[B]\f[CB]--bibliography=\f[B]\f[R]\f[I]FILE\f[R]
@@ -1422,8 +1455,8 @@ will be sought in the resource path (see \f[C]--resource-path\f[R]).
\f[B]\f[CB]--csl=\f[B]\f[R]\f[I]FILE\f[R]
Set the \f[C]csl\f[R] field in the document\[cq]s metadata to
\f[I]FILE\f[R], overriding any value set in the metadata.
-(This is equivalent to \f[C]--metadata csl=FILE\f[R].) If \f[I]FILE\f[R]
-is a URL, it will be fetched via HTTP.
+(This is equivalent to \f[C]--metadata csl=FILE\f[R].)
+If \f[I]FILE\f[R] is a URL, it will be fetched via HTTP.
If \f[I]FILE\f[R] is not found relative to the working directory, it
will be sought in the resource path (see \f[C]--resource-path\f[R]) and
finally in the \f[C]csl\f[R] subdirectory of the pandoc user data
@@ -1433,8 +1466,8 @@ directory.
Set the \f[C]citation-abbreviations\f[R] field in the document\[cq]s
metadata to \f[I]FILE\f[R], overriding any value set in the metadata.
(This is equivalent to
-\f[C]--metadata citation-abbreviations=FILE\f[R].) If \f[I]FILE\f[R] is
-a URL, it will be fetched via HTTP.
+\f[C]--metadata citation-abbreviations=FILE\f[R].)
+If \f[I]FILE\f[R] is a URL, it will be fetched via HTTP.
If \f[I]FILE\f[R] is not found relative to the working directory, it
will be sought in the resource path (see \f[C]--resource-path\f[R]) and
finally in the \f[C]csl\f[R] subdirectory of the pandoc user data
@@ -1567,6 +1600,11 @@ Error
T}
_
T{
+1
+T}@T{
+PandocIOError
+T}
+T{
3
T}@T{
PandocFailOnWarningError
@@ -1607,6 +1645,11 @@ T}@T{
PandocCiteprocError
T}
T{
+25
+T}@T{
+PandocBibliographyError
+T}
+T{
31
T}@T{
PandocEpubSubdirectoryError
@@ -1667,6 +1710,11 @@ T}@T{
PandocFilterError
T}
T{
+84
+T}@T{
+PandocLuaError
+T}
+T{
91
T}@T{
PandocMacroLoop
@@ -2417,8 +2465,9 @@ including a title block in the document itself, you can set the
\f[C]title-meta\f[R], \f[C]author-meta\f[R], and \f[C]date-meta\f[R]
variables.
(By default these are set automatically, based on \f[C]title\f[R],
-\f[C]author\f[R], and \f[C]date\f[R].) The page title in HTML is set by
-\f[C]pagetitle\f[R], which is equal to \f[C]title\f[R] by default.
+\f[C]author\f[R], and \f[C]date\f[R].)
+The page title in HTML is set by \f[C]pagetitle\f[R], which is equal to
+\f[C]title\f[R] by default.
.RE
.TP
\f[B]\f[CB]subtitle\f[B]\f[R]
@@ -2434,7 +2483,7 @@ list of keywords to be included in HTML, PDF, ODT, pptx, docx and
AsciiDoc metadata; repeat as for \f[C]author\f[R], above
.TP
\f[B]\f[CB]subject\f[B]\f[R]
-document subject, included in ODT, PDF, docx and pptx metadata
+document subject, included in ODT, PDF, docx, EPUB, and pptx metadata
.TP
\f[B]\f[CB]description\f[B]\f[R]
document description, included in ODT, docx and pptx metadata.
@@ -2611,7 +2660,7 @@ base URL for Slideous documents (defaults to \f[C]slideous\f[R])
.TP
\f[B]\f[CB]title-slide-attributes\f[B]\f[R]
additional attributes for the title slide of reveal.js slide shows.
-See background in reveal.js and beamer for an example.
+See [background in reveal.js and beamer] for an example.
.PP
All reveal.js configuration options are available as variables.
To turn off boolean flags that default to true in reveal.js, use
@@ -3097,8 +3146,8 @@ working directory from which pandoc is run.
non-null value if \f[C]--toc/--table-of-contents\f[R] was specified
.TP
\f[B]\f[CB]toc-title\f[B]\f[R]
-title of table of contents (works only with EPUB, HTML, opendocument,
-odt, docx, pptx, beamer, LaTeX)
+title of table of contents (works only with EPUB, HTML, revealjs,
+opendocument, odt, docx, pptx, beamer, LaTeX)
.SH EXTENSIONS
.PP
The behavior of some of the readers and writers can be adjusted by
@@ -3114,8 +3163,9 @@ without footnotes or pipe tables.
The markdown reader and writer make by far the most use of extensions.
Extensions only used by them are therefore covered in the section
Pandoc\[cq]s Markdown below (See Markdown variants for
-\f[C]commonmark\f[R] and \f[C]gfm\f[R].) In the following, extensions
-that also work for other formats are covered.
+\f[C]commonmark\f[R] and \f[C]gfm\f[R].)
+In the following, extensions that also work for other formats are
+covered.
.PP
Note that markdown extensions added to the \f[C]ipynb\f[R] format affect
Markdown cells in Jupyter notebooks (as do command-line options like
@@ -3427,7 +3477,7 @@ Enumeration starts at 1.
This extension can be enabled/disabled for the following formats:
.TP
output formats
-\f[C]odt\f[R], \f[C]opendocument\f[R]
+\f[C]odt\f[R], \f[C]opendocument\f[R], \f[C]docx\f[R]
.SS Extension: \f[C]xrefs_name\f[R]
.PP
Links to headings, figures and tables inside the document are
@@ -3898,8 +3948,8 @@ LaTeX, Docx, Ms, and PowerPoint.
If highlighting is supported for your output format and language, then
the code block above will appear highlighted, with numbered lines.
(To see which languages are supported, type
-\f[C]pandoc --list-highlight-languages\f[R].) Otherwise, the code block
-above will appear as follows:
+\f[C]pandoc --list-highlight-languages\f[R].)
+Otherwise, the code block above will appear as follows:
.IP
.nf
\f[C]
@@ -4237,8 +4287,8 @@ two spaces.
A term may have multiple definitions, and each definition may consist of
one or more block elements (paragraph, code block, list, etc.), each
indented four spaces or one tab stop.
-The body of the definition (including the first line, aside from the
-colon or tilde) should be indented four spaces.
+The body of the definition (not including the first line) should be
+indented four spaces.
However, as with other Markdown lists, you can \[lq]lazily\[rq] omit
indentation except at the beginning of a paragraph or other block
element:
@@ -4331,7 +4381,8 @@ What if you want to put an indented code block after a list?
\f[R]
.fi
.PP
-Trouble! Here pandoc (like other Markdown implementations) will treat
+Trouble!
+Here pandoc (like other Markdown implementations) will treat
\f[C]{ my code block }\f[R] as the second paragraph of item two, and not
as a code block.
.PP
@@ -4611,9 +4662,10 @@ full text width and the cell contents will wrap, with the relative cell
widths determined by the number of dashes in the line separating the
table header from the table body.
(For example \f[C]---|-\f[R] would make the first column 3/4 and the
-second column 1/4 of the full text width.) On the other hand, if no
-lines are wider than column width, then cell contents will not be
-wrapped, and the cells will be sized to their contents.
+second column 1/4 of the full text width.)
+On the other hand, if no lines are wider than column width, then cell
+contents will not be wrapped, and the cells will be sized to their
+contents.
.PP
Note: pandoc also recognizes pipe tables of the following form, as can
be produced by Emacs\[cq] orgtbl-mode:
@@ -4646,8 +4698,9 @@ If the file begins with a title block
.PP
it will be parsed as bibliographic information, not regular text.
(It will be used, for example, in the title of standalone LaTeX or HTML
-output.) The block may contain just a title, a title and an author, or
-all three elements.
+output.)
+The block may contain just a title, a title and an author, or all three
+elements.
If you want to include an author but no title, or a title and a date but
no author, you need a blank line:
.IP
@@ -4770,8 +4823,8 @@ pandoc chap1.md chap2.md chap3.md metadata.yaml -s -o book.html
.fi
.PP
Just be sure that the YAML file begins with \f[C]---\f[R] and ends with
-\f[C]---\f[R] or \f[C]...\f[R].) Alternatively, you can use the
-\f[C]--metadata-file\f[R] option.
+\f[C]---\f[R] or \f[C]...\f[R].)
+Alternatively, you can use the \f[C]--metadata-file\f[R] option.
Using that approach however, you cannot reference content (like
footnotes) from the main markdown input document.
.PP
@@ -4780,15 +4833,20 @@ any existing document metadata.
Metadata can contain lists and objects (nested arbitrarily), but all
string scalars will be interpreted as Markdown.
Fields with names ending in an underscore will be ignored by pandoc.
-(They may be given a role by external processors.) Field names must not
-be interpretable as YAML numbers or boolean values (so, for example,
-\f[C]yes\f[R], \f[C]True\f[R], and \f[C]15\f[R] cannot be used as field
-names).
+(They may be given a role by external processors.)
+Field names must not be interpretable as YAML numbers or boolean values
+(so, for example, \f[C]yes\f[R], \f[C]True\f[R], and \f[C]15\f[R] cannot
+be used as field names).
.PP
A document may contain multiple metadata blocks.
If two metadata blocks attempt to set the same field, the value from the
second block will be taken.
.PP
+Each metadata block is handled internally as an independent YAML
+document.
+This means, for example, that any YAML anchors defined in a block cannot
+be referenced in another block.
+.PP
When pandoc is used with \f[C]-t markdown\f[R] to create a Markdown
document, a YAML metadata block will be produced only if the
\f[C]-s/--standalone\f[R] option is used.
@@ -5038,9 +5096,9 @@ If the superscripted or subscripted text contains spaces, these spaces
must be escaped with backslashes.
(This is to prevent accidental superscripting and subscripting through
the ordinary use of \f[C]\[ti]\f[R] and \f[C]\[ha]\f[R], and also bad
-interactions with footnotes.) Thus, if you want the letter P with `a
-cat' in subscripts, use \f[C]P\[ti]a\[rs] cat\[ti]\f[R], not
-\f[C]P\[ti]a cat\[ti]\f[R].
+interactions with footnotes.)
+Thus, if you want the letter P with `a cat' in subscripts, use
+\f[C]P\[ti]a\[rs] cat\[ti]\f[R], not \f[C]P\[ti]a cat\[ti]\f[R].
.SS Verbatim
.PP
To make a short span of text verbatim, put it inside backticks:
@@ -5084,6 +5142,26 @@ blocks:
\[ga]<$>\[ga]{.haskell}
\f[R]
.fi
+.SS Underline
+.PP
+To underline text, use the \f[C]underline\f[R] class:
+.IP
+.nf
+\f[C]
+[Underline]{.underline}
+\f[R]
+.fi
+.PP
+Or, without the \f[C]bracketed_spans\f[R] extension (but with
+\f[C]native_spans\f[R]):
+.IP
+.nf
+\f[C]
+<span class=\[dq]underline\[dq]>Underline</span>
+\f[R]
+.fi
+.PP
+This will work in all output formats that support underline.
.SS Small caps
.PP
To write small caps, use the \f[C]smallcaps\f[R] class:
@@ -5444,10 +5522,10 @@ before or after the link).
The link consists of link text in square brackets, followed by a label
in square brackets.
(There cannot be space between the two unless the
-\f[C]spaced_reference_links\f[R] extension is enabled.) The link
-definition consists of the bracketed label, followed by a colon and a
-space, followed by the URL, and optionally (after a space) a link title
-either in quotes or in parentheses.
+\f[C]spaced_reference_links\f[R] extension is enabled.)
+The link definition consists of the bracketed label, followed by a colon
+and a space, followed by the URL, and optionally (after a space) a link
+title either in quotes or in parentheses.
The label must not be parseable as a citation (assuming the
\f[C]citations\f[R] extension is enabled): citations take precedence
over link labels.
@@ -5823,14 +5901,16 @@ See the CSL user documentation for more information about CSL styles and
how they affect rendering.
.PP
Unless a citation key start with a letter, digit, or \f[C]_\f[R], and
-contains only alphanumerics and internal punctuation characters
+contains only alphanumerics and single internal punctuation characters
(\f[C]:.#$%&-+?<>\[ti]/\f[R]), it must be surrounded by curly braces,
which are not considered part of the key.
-In \f[C]\[at]Foo_bar.baz.\f[R], the key is \f[C]Foo_bar.baz\f[R].
-The final period is not \f[I]internal\f[R] punctuation, so it is not
+In \f[C]\[at]Foo_bar.baz.\f[R], the key is \f[C]Foo_bar.baz\f[R] because
+the final period is not \f[I]internal\f[R] punctuation, so it is not
included in the key.
In \f[C]\[at]{Foo_bar.baz.}\f[R], the key is \f[C]Foo_bar.baz.\f[R],
including the final period.
+In \f[C]\[at]Foo_bar--baz\f[R], the key is \f[C]Foo_bar\f[R] because the
+repeated internal punctuation characters terminate the key.
The curly braces are recommended if you use URLs as keys:
\f[C][\[at]{https://example.com/bib?name=foobar&date=2000}, p. 33]\f[R].
.PP
@@ -5964,7 +6044,8 @@ relative to the file containing the link reference definition, not the
file containing the reference link or image itself, if these differ.
.SS Extension: \f[C]attributes\f[R]
.PP
-Allows attributes to be attached to any inline or block-level element.
+Allows attributes to be attached to any inline or block-level element
+when parsing \f[C]commonmark\f[R].
The syntax for the attributes is the same as that used in
\f[C]header_attributes\f[R].
.IP \[bu] 2
@@ -6147,6 +6228,26 @@ Include source position attributes when parsing \f[C]commonmark\f[R].
For elements that accept attributes, a \f[C]data-pos\f[R] attribute is
added; other elements are placed in a surrounding Div or Span elemnet
with a \f[C]data-pos\f[R] attribute.
+.SS Extension: \f[C]short_subsuperscripts\f[R]
+.PP
+Parse multimarkdown style subscripts and superscripts, which start with
+a `\[ti]' or `\[ha]' character, respectively, and include the
+alphanumeric sequence that follows.
+For example:
+.IP
+.nf
+\f[C]
+x\[ha]2 = 4
+\f[R]
+.fi
+.PP
+or
+.IP
+.nf
+\f[C]
+Oxygen is O\[ti]2.
+\f[R]
+.fi
.SS Markdown variants
.PP
In addition to pandoc\[cq]s extended Markdown, the following Markdown
@@ -6434,8 +6535,9 @@ These files are specified using the \f[C]--csl\f[R] option or the
By default, pandoc will use the Chicago Manual of Style author-date
format.
(You can override this default by copying a CSL style of your choice to
-\f[C]default.csl\f[R] in your user data directory.) The CSL project
-provides further information on finding and editing styles.
+\f[C]default.csl\f[R] in your user data directory.)
+The CSL project provides further information on finding and editing
+styles.
.PP
The \f[C]--citation-abbreviations\f[R] option (or the
\f[C]citation-abbreviations\f[R] metadata field) may be used to specify
@@ -6482,7 +6584,8 @@ Normal citations in footnotes (such as \f[C][\[at]foo, p. 33]\f[R]) will
be rendered in parentheses.
In-text citations (such as \f[C]\[at]foo [p. 33]\f[R]) will be rendered
without parentheses.
-(A comma will be added if appropriate.) Thus:
+(A comma will be added if appropriate.)
+Thus:
.IP
.nf
\f[C]
@@ -6588,6 +6691,15 @@ A few other metadata fields affect bibliography formatting:
\f[B]\f[CB]link-citations\f[B]\f[R]
If true, citations will be hyperlinked to the corresponding bibliography
entries (for author-date and numerical styles only).
+Defaults to false.
+.TP
+\f[B]\f[CB]link-bibliography\f[B]\f[R]
+If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered
+as hyperlinks.
+(If an entry contains a DOI, PMCID, PMID, or URL, but none of these
+fields are rendered by the style, then the title, or in the absence of a
+title the whole entry, will be hyperlinked.)
+Defaults to true.
.TP
\f[B]\f[CB]lang\f[B]\f[R]
The \f[C]lang\f[R] field will affect how the style is localized, for
@@ -6690,9 +6802,9 @@ files, which are assumed to be available at the relative path
\f[C]w3.org\f[R] (for Slidy).
(These paths can be changed by setting the \f[C]slidy-url\f[R],
\f[C]slideous-url\f[R], \f[C]revealjs-url\f[R], or \f[C]s5-url\f[R]
-variables; see Variables for HTML slides, above.) For DZSlides, the
-(relatively short) JavaScript and CSS are included in the file by
-default.
+variables; see Variables for HTML slides, above.)
+For DZSlides, the (relatively short) JavaScript and CSS are included in
+the file by default.
.PP
With all HTML slide formats, the \f[C]--self-contained\f[R] option can
be used to produce a single file that contains all of the data necessary
@@ -6754,15 +6866,58 @@ lines in the default template.)
.PP
These rules are designed to support many different styles of slide show.
If you don\[cq]t care about structuring your slides into sections and
-subsections, you can just use level-1 headings for all each slide.
-(In that case, level-1 will be the slide level.) But you can also
-structure the slide show into sections, as in the example above.
+subsections, you can either just use level-1 headings for all slides (in
+that case, level 1 will be the slide level) or you can set
+\f[C]--slide-level=0\f[R].
.PP
Note: in reveal.js slide shows, if slide level is 2, a two-dimensional
layout will be produced, with level-1 headings building horizontally and
level-2 headings building vertically.
It is not recommended that you use deeper nesting of section levels with
-reveal.js.
+reveal.js unless you set \f[C]--slide-level=0\f[R] (which lets reveal.js
+produce a one-dimensional layout and only interprets horizontal rules as
+slide boundaries).
+.SS PowerPoint layout choice
+.PP
+When creating slides, the pptx writer chooses from a number of
+pre-defined layouts, based on the content of the slide:
+.TP
+Title Slide
+This layout is used for the initial slide, which is generated and filled
+from the metadata fields \f[C]date\f[R], \f[C]author\f[R], and
+\f[C]title\f[R], if they are present.
+.TP
+Section Header
+This layout is used for what pandoc calls \[lq]title slides\[rq], i.e.
+slides which start with a header which is above the slide level in the
+hierarchy.
+.TP
+Two Content
+This layout is used for two-column slides, i.e.\ slides containing a div
+with class \f[C]columns\f[R] which contains at least two divs with class
+\f[C]column\f[R].
+.TP
+Comparison
+This layout is used instead of \[lq]Two Content\[rq] for any two-column
+slides in which at least one column contains text followed by non-text
+(e.g.\ an image or a table).
+.TP
+Content with Caption
+This layout is used for any non-two-column slides which contain text
+followed by non-text (e.g.\ an image or a table).
+.TP
+Blank
+This layout is used for any slides which only contain blank content,
+e.g.\ a slide containing only speaker notes, or a slide containing only
+a non-breaking space.
+.TP
+Title and Content
+This layout is used for all slides which do not match the criteria for
+another layout.
+.PP
+These layouts are chosen from the default pptx reference doc included
+with pandoc, unless an alternative reference doc is specified using
+\f[C]--reference-doc\f[R].
.SS Incremental lists
.PP
By default, these writers produce lists that display \[lq]all at
@@ -6814,9 +6969,6 @@ incrementally without the \f[C]-i\f[R] option and all at once with the
.PP
Both methods allow incremental and nonincremental lists to be mixed in a
single document.
-.PP
-Note: Neither the \f[C]-i/--incremental\f[R] option nor any of the
-methods described here currently works for PowerPoint output.
.SS Inserting pauses
.PP
You can add \[lq]pauses\[rq] within a slide by including a paragraph
@@ -6992,48 +7144,65 @@ User\[cq]s Guide may also be used: \f[C]allowdisplaybreaks\f[R],
\f[C]allowframebreaks\f[R], \f[C]b\f[R], \f[C]c\f[R], \f[C]t\f[R],
\f[C]environment\f[R], \f[C]label\f[R], \f[C]plain\f[R],
\f[C]shrink\f[R], \f[C]standout\f[R], \f[C]noframenumbering\f[R].
-.SS Background in reveal.js and beamer
-.PP
-Background images can be added to self-contained reveal.js slideshows
-and to beamer slideshows.
-.PP
-For the same image on every slide, use the configuration option
-\f[C]background-image\f[R] either in the YAML metadata block or as a
-command-line variable.
-(There are no other options in beamer and the rest of this section
-concerns reveal.js slideshows.)
-.PP
-For reveal.js, you can instead use the reveal.js-native option
-\f[C]parallaxBackgroundImage\f[R].
-You can also set \f[C]parallaxBackgroundHorizontal\f[R] and
-\f[C]parallaxBackgroundVertical\f[R] the same way and must also set
-\f[C]parallaxBackgroundSize\f[R] to have your values take effect.
-.PP
-To set an image for a particular reveal.js slide, add
-\f[C]{data-background-image=\[dq]/path/to/image\[dq]}\f[R] to the first
-slide-level heading on the slide (which may even be empty).
+.SS Background in reveal.js, beamer, and pptx
+.PP
+Background images can be added to self-contained reveal.js slide shows,
+beamer slide shows, and pptx slide shows.
+.SS On all slides (beamer, reveal.js, pptx)
+.PP
+With beamer and reveal.js, the configuration option
+\f[C]background-image\f[R] can be used either in the YAML metadata block
+or as a command-line variable to get the same image on every slide.
+.PP
+For pptx, you can use a reference doc in which background images have
+been set on the relevant layouts.
+.SS \f[C]parallaxBackgroundImage\f[R] (reveal.js)
+.PP
+For reveal.js, there is also the reveal.js-native option
+\f[C]parallaxBackgroundImage\f[R], which can be used instead of
+\f[C]background-image\f[R] to produce a parallax scrolling background.
+You must also set \f[C]parallaxBackgroundSize\f[R], and can optionally
+set \f[C]parallaxBackgroundHorizontal\f[R] and
+\f[C]parallaxBackgroundVertical\f[R] to configure the scrolling
+behaviour.
+See the reveal.js documentation for more details about the meaning of
+these options.
.PP
In reveal.js\[cq]s overview mode, the parallaxBackgroundImage will show
up only on the first slide.
+.SS On individual slides (reveal.js, pptx)
.PP
-Other reveal.js background settings also work on individual slides,
-including \f[C]data-background-size\f[R],
-\f[C]data-background-repeat\f[R], \f[C]data-background-color\f[R],
-\f[C]data-transition\f[R], and \f[C]data-transition-speed\f[R].
+To set an image for a particular reveal.js or pptx slide, add
+\f[C]{background-image=\[dq]/path/to/image\[dq]}\f[R] to the first
+slide-level heading on the slide (which may even be empty).
.PP
-To add a background image to the automatically generated title slide,
-use the \f[C]title-slide-attributes\f[R] variable in the YAML metadata
-block.
+As the HTML writers pass unknown attributes through, other reveal.js
+background settings also work on individual slides, including
+\f[C]background-size\f[R], \f[C]background-repeat\f[R],
+\f[C]background-color\f[R], \f[C]transition\f[R], and
+\f[C]transition-speed\f[R].
+(The \f[C]data-\f[R] prefix will automatically be added.)
+.PP
+Note: \f[C]data-background-image\f[R] is also supported in pptx for
+consistency with reveal.js \[en] if \f[C]background-image\f[R] isn\[cq]t
+found, \f[C]data-background-image\f[R] will be checked.
+.SS On the title slide (reveal.js, pptx)
+.PP
+To add a background image to the automatically generated title slide for
+reveal.js, use the \f[C]title-slide-attributes\f[R] variable in the YAML
+metadata block.
It must contain a map of attribute names and values.
+(Note that the \f[C]data-\f[R] prefix is required here, as it isn\[cq]t
+added automatically.)
.PP
-See the reveal.js documentation for more details.
-.PP
-For example in reveal.js:
+For pptx, pass a reference doc with the background image set on the
+\[lq]Title Slide\[rq] layout.
+.SS Example (reveal.js)
.IP
.nf
\f[C]
---
-title: My Slideshow
+title: My Slide Show
parallaxBackgroundImage: /path/to/my/background_image.png
title-slide-attributes:
data-background-image: /path/to/title_image.png
@@ -7044,7 +7213,7 @@ title-slide-attributes:
Slide 1 has background_image.png as its background.
-## {data-background-image=\[dq]/path/to/special_image.jpg\[dq]}
+## {background-image=\[dq]/path/to/special_image.jpg\[dq]}
Slide 2 has a special image for its background, even though the heading has no content.
\f[R]
@@ -7111,15 +7280,23 @@ Same format as \f[C]creator\f[R].
.TP
\f[B]\f[CB]date\f[B]\f[R]
A string value in \f[C]YYYY-MM-DD\f[R] format.
-(Only the year is necessary.) Pandoc will attempt to convert other
-common date formats.
+(Only the year is necessary.)
+Pandoc will attempt to convert other common date formats.
.TP
\f[B]\f[CB]lang\f[B]\f[R] (or legacy: \f[B]\f[CB]language\f[B]\f[R])
A string value in BCP 47 format.
Pandoc will default to the local language if nothing is specified.
.TP
\f[B]\f[CB]subject\f[B]\f[R]
-A string value or a list of such values.
+Either a string value, or an object with fields \f[C]text\f[R],
+\f[C]authority\f[R], and \f[C]term\f[R], or a list of such objects.
+Valid values for \f[C]authority\f[R] are either a reserved authority
+value (currently \f[C]AAT\f[R], \f[C]BIC\f[R], \f[C]BISAC\f[R],
+\f[C]CLC\f[R], \f[C]DDC\f[R], \f[C]CLIL\f[R], \f[C]EuroVoc\f[R],
+\f[C]MEDTOP\f[R], \f[C]LCSH\f[R], \f[C]NDC\f[R], \f[C]Thema\f[R],
+\f[C]UDC\f[R], and \f[C]WGS\f[R]) or an absolute IRI identifying a
+custom scheme.
+Valid values for \f[C]term\f[R] are defined by the scheme.
.TP
\f[B]\f[CB]description\f[B]\f[R]
A string value.
@@ -7303,6 +7480,11 @@ T}@T{
frontmatter
T}
T{
+frontispiece
+T}@T{
+frontmatter
+T}
+T{
appendix
T}@T{
backmatter
@@ -7343,6 +7525,15 @@ For example:
</audio>
\f[R]
.fi
+.PP
+If the input format already is HTML then
+\f[C]data-external=\[dq]1\[dq]\f[R] will work as expected for
+\f[C]<img>\f[R] elements.
+Similarly, for Markdown, external images can be declared with
+\f[C]![img](url){external=1}\f[R].
+Note that this only works for images; the other media elements have no
+native representation in pandoc\[cq]s AST and requires the use of raw
+HTML.
.SH JUPYTER NOTEBOOKS
.PP
When creating a Jupyter notebook, pandoc will try to infer the notebook
@@ -7631,26 +7822,44 @@ text style.
With these custom styles, you can use your input document as a
reference-doc while creating docx output (see below), and maintain the
same styles in your input and output files.
-.SH CUSTOM WRITERS
+.SH CUSTOM READERS AND WRITERS
.PP
-Pandoc can be extended with custom writers written in Lua.
+Pandoc can be extended with custom readers and writers written in Lua.
(Pandoc includes a Lua interpreter, so Lua need not be installed
separately.)
.PP
-To use a custom writer, simply specify the path to the Lua script in
-place of the output format.
+To use a custom reader or writer, simply specify the path to the Lua
+script in place of the input or output format.
For example:
.IP
.nf
\f[C]
pandoc -t data/sample.lua
+pandoc -f my_custom_markup_language.lua -t latex -s
+\f[R]
+.fi
+.PP
+A custom reader is a Lua script that defines one function, Reader, which
+takes a string as input and returns a Pandoc AST.
+See the Lua filters documentation for documentation of the functions
+that are available for creating pandoc AST elements.
+For parsing, the lpeg parsing library is available by default.
+To see a sample custom reader:
+.IP
+.nf
+\f[C]
+pandoc --print-default-data-file creole.lua
\f[R]
.fi
.PP
-Creating a custom writer requires writing a Lua function for each
-possible element in a pandoc document.
-To get a documented example which you can modify according to your
-needs, do
+If you want your custom reader to have access to reader options
+(e.g.\ the tab stop setting), you give your Reader function a second
+\f[C]options\f[R] parameter.
+.PP
+A custom writer is a Lua script that defines a function that specifies
+how to render each element in a Pandoc AST.
+To see a documented example which you can modify according to your
+needs:
.IP
.nf
\f[C]
@@ -7690,12 +7899,27 @@ principle do anything on your file system.
Please audit filters and custom writers very carefully before using
them.
.IP "2." 3
+Several input formats (including HTML, Org, and RST) support
+\f[C]include\f[R] directives that allow the contents of a file to be
+included in the output.
+An untrusted attacker could use these to view the contents of files on
+the file system.
+(Using the \f[C]--sandbox\f[R] option can protect against this threat.)
+.IP "3." 3
+Several output formats (including RTF, FB2, HTML with
+\f[C]--self-contained\f[R], EPUB, Docx, and ODT) will embed encoded or
+raw images into the output file.
+An untrusted attacker could exploit this to view the contents of
+non-image files on the file system.
+(Using the \f[C]--sandbox\f[R] option can protect against this threat,
+but will also prevent including images in these formats.)
+.IP "4." 3
If your application uses pandoc as a Haskell library (rather than
shelling out to the executable), it is possible to use it in a mode that
fully isolates pandoc from your file system, by running the pandoc
operations in the \f[C]PandocPure\f[R] monad.
See the document Using the pandoc API for more details.
-.IP "3." 3
+.IP "5." 3
Pandoc\[cq]s parsers can exhibit pathological performance on some corner
cases.
It is wise to put any pandoc operations under a timeout, to avoid DOS
@@ -7703,7 +7927,11 @@ attacks that exploit these issues.
If you are using the pandoc executable, you can add the command line
options \f[C]+RTS -M512M -RTS\f[R] (for example) to limit the heap size
to 512MB.
-.IP "4." 3
+Note that the \f[C]commonmark\f[R] parser (including
+\f[C]commonmark_x\f[R] and \f[C]gfm\f[R]) is much less vulnerable to
+pathological performance than the \f[C]markdown\f[R] parser, so it is a
+better choice when processing untrusted input.
+.IP "6." 3
The HTML generated by pandoc is not guaranteed to be safe.
If \f[C]raw_html\f[R] is enabled for the Markdown input, users can
inject arbitrary HTML.
@@ -7716,8 +7944,9 @@ sanitizer.
Copyright 2006\[en]2021 John MacFarlane (jgm\[at]berkeley.edu).
Released under the GPL, version 2 or greater.
This software carries no warranty of any kind.
-(See COPYRIGHT for full copyright and warranty notices.) For a full list
-of contributors, see the file AUTHORS.md in the pandoc source code.
+(See COPYRIGHT for full copyright and warranty notices.)
+For a full list of contributors, see the file AUTHORS.md in the pandoc
+source code.
.PP
The Pandoc source code and all documentation may be downloaded
from <https://pandoc.org>.
diff --git a/pandoc.cabal b/pandoc.cabal
index e3cd7e54f..cd948d253 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -1,6 +1,6 @@
-cabal-version: 2.2
+cabal-version: 2.4
name: pandoc
-version: 2.14.0.3
+version: 2.16.2
build-type: Simple
license: GPL-2.0-or-later
license-file: COPYING.md
@@ -11,36 +11,39 @@ bug-reports: https://github.com/jgm/pandoc/issues
stability: alpha
homepage: https://pandoc.org
category: Text
-tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5,
- GHC == 8.8.4, GHC == 8.10.2, GHC == 9.0.1
+tested-with: GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.1
synopsis: Conversion between markup formats
description: Pandoc is a Haskell library for converting from one markup
format to another, and a command-line tool that uses
- this library. It can read several dialects of Markdown and
- (subsets of) HTML, reStructuredText, LaTeX, DocBook, JATS,
- MediaWiki markup, DokuWiki markup, TWiki markup,
- TikiWiki markup, Jira markup, Creole 1.0, Haddock markup,
- OPML, Emacs Org-Mode, Emacs Muse, txt2tags, ipynb (Jupyter
- notebooks), Vimwiki, Word Docx, ODT, EPUB, FictionBook2,
- roff man, Textile, BibTeX, BibLaTeX, CSL JSON,
- , and CSV, and it can write Markdown,
- reStructuredText, XHTML, HTML 5, LaTeX, ConTeXt, DocBook,
- JATS, OPML, TEI, OpenDocument, ODT, Word docx,
- PowerPoint pptx, RTF, MediaWiki, DokuWiki, XWiki,
- ZimWiki, Textile, Jira, roff man, roff ms, plain text,
- Emacs Org-Mode, AsciiDoc, Haddock markup,
- EPUB (v2 and v3), ipynb, FictionBook2,
- InDesign ICML, Muse, CSL JSON, LaTeX beamer slides,
- and several kinds of HTML/JavaScript slide shows
- (S5, Slidy, Slideous, DZSlides, reveal.js).
+ this library. The formats it can handle include
.
- In contrast to most existing tools for converting Markdown
- to HTML, pandoc has a modular design: it consists of a set of
- readers, which parse text in a given format and produce a
- native representation of the document, and a set of writers,
- which convert this native representation into a target
- format. Thus, adding an input or output format requires
- only adding a reader or writer.
+ - light markup formats (many variants of Markdown,
+ reStructuredText, AsciiDoc, Org-mode, Muse, Textile,
+ txt2tags)
+ - HTML formats (HTML 4 and 5)
+ - Ebook formats (EPUB v2 and v3, FB2)
+ - Documentation formats (GNU TexInfo, Haddock)
+ - Roff formats (man, ms)
+ - TeX formats (LaTeX, ConTeXt)
+ - XML formats (DocBook 4 and 5, JATS, TEI Simple, OpenDocument)
+ - Outline formats (OPML)
+ - Bibliography formats (BibTeX, BibLaTeX, CSL JSON, CSL YAML)
+ - Word processor formats (Docx, RTF, ODT)
+ - Interactive notebook formats (Jupyter notebook ipynb)
+ - Page layout formats (InDesign ICML)
+ - Wiki markup formats (MediaWiki, DokuWiki, TikiWiki, TWiki,
+ Vimwiki, XWiki, ZimWiki, Jira wiki, Creole)
+ - Slide show formats (LaTeX Beamer, PowerPoint, Slidy,
+ reveal.js, Slideous, S5, DZSlides)
+ - Data formats (CSV tables)
+ - PDF (via external programs such as pdflatex or wkhtmltopdf)
+ .
+ Pandoc can convert mathematical content in documents
+ between TeX, MathML, Word equations, roff eqn, and plain text.
+ It includes a powerful system for automatic citations
+ and bibliographies, and it can be customized extensively
+ using templates, filters, and custom readers and writers
+ written in Lua.
data-files:
-- templates
data/templates/styles.html
@@ -87,6 +90,7 @@ data-files:
data/templates/default.epub3
data/templates/article.jats_publishing
data/templates/affiliations.jats
+ data/templates/default.markua
-- translations
data/translations/*.yaml
-- source files for reference.docx
@@ -174,12 +178,10 @@ data-files:
data/abbreviations
-- sample lua custom writer
data/sample.lua
+ -- sample lua custom reader
+ data/creole.lua
-- lua init script
data/init.lua
- -- pandoc lua module
- data/pandoc.lua
- -- lua List module
- data/pandoc.List.lua
-- bash completion template
data/bash_completion.tpl
-- citeproc
@@ -242,6 +244,7 @@ extra-source-files:
test/command/sub-file-chapter-1.tex
test/command/sub-file-chapter-2.tex
test/command/bar.tex
+ test/command/bar-endinput.tex
test/command/yaml-metadata.yaml
test/command/3510-subdoc.org
test/command/3510-export.latex
@@ -293,6 +296,7 @@ extra-source-files:
test/tables.ms
test/tables.plain
test/tables.markdown
+ test/tables.markua
test/tables.mediawiki
test/tables.tei
test/tables.textile
@@ -328,6 +332,7 @@ extra-source-files:
test/writer.man
test/writer.ms
test/writer.markdown
+ test/writer.markua
test/writer.plain
test/writer.mediawiki
test/writer.textile
@@ -376,11 +381,17 @@ extra-source-files:
test/docx/*.native
test/epub/*.epub
test/epub/*.native
+ test/rtf/*.native
+ test/rtf/*.rtf
test/pptx/*.pptx
- test/pptx/*.native
+ test/pptx/**/*.pptx
+ test/pptx/**/*.native
+ test/ipynb/*.native
test/ipynb/*.in.native
test/ipynb/*.out.native
test/ipynb/*.ipynb
+ test/ipynb/*.out.ipynb
+ test/ipynb/*.out.html
test/txt2tags.t2t
test/twiki-reader.twiki
test/tikiwiki-reader.tikiwiki
@@ -403,31 +414,27 @@ flag trypandoc
common common-options
default-language: Haskell2010
- build-depends: base >= 4.9 && < 5
+ build-depends: base >= 4.12 && < 5
ghc-options: -Wall -fno-warn-unused-do-bind
-Wincomplete-record-updates
-Wnoncanonical-monad-instances
+ -Wcpp-undef
+ -Wincomplete-uni-patterns
+ -Widentities
+ -Wpartial-fields
+ -Wmissing-signatures
+ -fhide-source-paths
+ -- -Wmissing-export-lists
+
+ if impl(ghc >= 8.10)
+ ghc-options: -Wunused-packages
- if impl(ghc < 8.4)
- hs-source-dirs: prelude
- other-modules: Prelude
- build-depends: base-compat >= 0.9
- other-extensions: NoImplicitPrelude
+ if impl(ghc >= 9.0)
+ ghc-options: -Winvalid-haddock
if os(windows)
cpp-options: -D_WINDOWS
- -- Later:
- -- -Wpartial-fields (currently used in Powerpoint writer)
- -- -Wmissing-export-lists (currently some Odt modules violate this)
- -- -Wredundant-constraints (problematic if we want to support older base)
- if impl(ghc >= 8.2)
- ghc-options: -Wcpp-undef
- if impl(ghc >= 8.4)
- ghc-options: -Wincomplete-uni-patterns
- -Widentities
- -fhide-source-paths
-
common common-executable
import: common-options
build-depends: pandoc
@@ -437,12 +444,10 @@ common common-executable
library
import: common-options
build-depends: Glob >= 0.7 && < 0.11,
- HTTP >= 4000.0.5 && < 4000.4,
- HsYAML >= 0.2 && < 0.3,
JuicyPixels >= 3.1.6.1 && < 3.4,
SHA >= 1.6 && < 1.7,
- aeson >= 0.7 && < 1.6,
- aeson-pretty >= 0.8.5 && < 0.9,
+ aeson >= 0.7 && < 2.1,
+ aeson-pretty >= 0.8.9 && < 0.9,
array >= 0.5 && < 0.6,
attoparsec >= 0.12 && < 0.15,
base64-bytestring >= 0.1 && < 1.3,
@@ -451,61 +456,63 @@ library
blaze-markup >= 0.8 && < 0.9,
bytestring >= 0.9 && < 0.12,
case-insensitive >= 1.2 && < 1.3,
- citeproc >= 0.4.0.1 && < 0.4.1,
- commonmark >= 0.2.1 && < 0.3,
- commonmark-extensions >= 0.2.1.2 && < 0.3,
+ citeproc >= 0.6 && < 0.7,
+ commonmark >= 0.2.1.1 && < 0.3,
+ commonmark-extensions >= 0.2.2 && < 0.3,
commonmark-pandoc >= 0.2.1.1 && < 0.3,
connection >= 0.3.1,
containers >= 0.4.2.1 && < 0.7,
data-default >= 0.4 && < 0.8,
deepseq >= 1.3 && < 1.5,
directory >= 1.2.3 && < 1.4,
- doclayout >= 0.3.0.1 && < 0.4,
- doctemplates >= 0.9 && < 0.10,
+ doclayout >= 0.3.1.1 && < 0.4,
+ doctemplates >= 0.10 && < 0.11,
emojis >= 0.1 && < 0.2,
exceptions >= 0.8 && < 0.11,
file-embed >= 0.0 && < 0.1,
filepath >= 1.1 && < 1.5,
haddock-library >= 1.10 && < 1.11,
- hslua >= 1.1 && < 1.4,
- hslua-module-path >= 0.1.0 && < 0.2.0,
- hslua-module-system >= 0.2 && < 0.3,
- hslua-module-text >= 0.2.1 && < 0.4,
+ hslua >= 2.0.1 && < 2.1,
+ hslua-marshalling >= 2.0.1 && < 2.1,
+ hslua-module-path >= 1.0 && < 1.1,
+ hslua-module-system >= 1.0 && < 1.1,
+ hslua-module-text >= 1.0 && < 1.1,
+ hslua-module-version >= 1.0 && < 1.1,
http-client >= 0.4.30 && < 0.8,
http-client-tls >= 0.2.4 && < 0.4,
http-types >= 0.8 && < 0.13,
- ipynb >= 0.1 && < 0.2,
+ ipynb >= 0.2 && < 0.3,
jira-wiki-markup >= 1.4 && < 1.5,
+ lpeg >= 1.0.1 && < 1.1,
mtl >= 2.2 && < 2.3,
network >= 2.6,
network-uri >= 2.6 && < 2.8,
- pandoc-types >= 1.22 && < 1.23,
+ pandoc-lua-marshal >= 0.1.3 && < 0.2,
+ pandoc-types >= 1.22.1 && < 1.23,
parsec >= 3.1 && < 3.2,
+ pretty >= 1.1 && < 1.2,
+ pretty-show >= 1.10 && < 1.11,
process >= 1.2.3 && < 1.7,
random >= 1 && < 1.3,
safe >= 0.3.18 && < 0.4,
scientific >= 0.3 && < 0.4,
- skylighting >= 0.10.5.2 && < 0.10.6,
- skylighting-core >= 0.10.5.2 && < 0.10.6,
+ skylighting >= 0.12.1 && < 0.13,
+ skylighting-core >= 0.12.1 && < 0.13,
split >= 0.2 && < 0.3,
syb >= 0.1 && < 0.8,
tagsoup >= 0.14.6 && < 0.15,
temporary >= 1.1 && < 1.4,
- texmath >= 0.12.3 && < 0.12.4,
+ texmath >= 0.12.3.2 && < 0.12.4,
text >= 1.1.1.0 && < 1.3,
text-conversions >= 0.3 && < 0.4,
- time >= 1.5 && < 1.12,
- unicode-transforms >= 0.3 && < 0.4,
- unordered-containers >= 0.2 && < 0.3,
+ time >= 1.5 && < 1.14,
+ unicode-collation >= 0.1.1 && < 0.2,
+ unicode-transforms >= 0.3 && < 0.5,
xml >= 1.3.12 && < 1.4,
xml-conduit >= 1.9.1.1 && < 1.10,
- unicode-collation >= 0.1.1 && < 0.2,
+ yaml >= 0.11 && < 0.12,
zip-archive >= 0.2.3.4 && < 0.5,
zlib >= 0.5 && < 0.7
- if os(windows) && arch(i386)
- build-depends: basement >= 0.0.10,
- foundation >= 0.0.23
- -- basement 0.0.9 won't build on 32-bit windows.
if !os(windows)
build-depends: unix >= 2.4 && < 2.8
if flag(embed_data_files)
@@ -553,6 +560,8 @@ library
Text.Pandoc.Readers.DokuWiki,
Text.Pandoc.Readers.Ipynb,
Text.Pandoc.Readers.CSV,
+ Text.Pandoc.Readers.RTF,
+ Text.Pandoc.Readers.Custom,
Text.Pandoc.Writers,
Text.Pandoc.Writers.Native,
Text.Pandoc.Writers.Docbook,
@@ -619,6 +628,7 @@ library
Text.Pandoc.Class.PandocMonad,
Text.Pandoc.Class.PandocIO,
Text.Pandoc.Class.PandocPure,
+ Text.Pandoc.Class.Sandbox,
Text.Pandoc.Filter.JSON,
Text.Pandoc.Filter.Lua,
Text.Pandoc.Filter.Path,
@@ -680,36 +690,33 @@ library
Text.Pandoc.Writers.Markdown.Types,
Text.Pandoc.Writers.Markdown.Inline,
Text.Pandoc.Writers.Roff,
+ Text.Pandoc.Writers.Blaze,
Text.Pandoc.Writers.Powerpoint.Presentation,
Text.Pandoc.Writers.Powerpoint.Output,
Text.Pandoc.Lua.ErrorConversion,
Text.Pandoc.Lua.Filter,
Text.Pandoc.Lua.Global,
Text.Pandoc.Lua.Init,
- Text.Pandoc.Lua.Marshaling,
- Text.Pandoc.Lua.Marshaling.AST,
- Text.Pandoc.Lua.Marshaling.AnyValue,
- Text.Pandoc.Lua.Marshaling.CommonState,
- Text.Pandoc.Lua.Marshaling.Context,
- Text.Pandoc.Lua.Marshaling.List,
- Text.Pandoc.Lua.Marshaling.MediaBag,
- Text.Pandoc.Lua.Marshaling.PandocError,
- Text.Pandoc.Lua.Marshaling.ReaderOptions,
- Text.Pandoc.Lua.Marshaling.SimpleTable,
- Text.Pandoc.Lua.Marshaling.Version,
+ Text.Pandoc.Lua.Marshal.CommonState,
+ Text.Pandoc.Lua.Marshal.Context,
+ Text.Pandoc.Lua.Marshal.PandocError,
+ Text.Pandoc.Lua.Marshal.ReaderOptions,
+ Text.Pandoc.Lua.Marshal.Reference,
+ Text.Pandoc.Lua.Marshal.Sources,
Text.Pandoc.Lua.Module.MediaBag,
Text.Pandoc.Lua.Module.Pandoc,
Text.Pandoc.Lua.Module.System,
Text.Pandoc.Lua.Module.Types,
Text.Pandoc.Lua.Module.Utils,
+ Text.Pandoc.Lua.Orphans,
Text.Pandoc.Lua.Packages,
Text.Pandoc.Lua.PandocLua,
Text.Pandoc.Lua.Util,
- Text.Pandoc.Lua.Walk,
Text.Pandoc.XML.Light,
Text.Pandoc.XML.Light.Types,
Text.Pandoc.XML.Light.Proc,
Text.Pandoc.XML.Light.Output,
+ Text.Pandoc.Network.HTTP,
Text.Pandoc.CSS,
Text.Pandoc.CSV,
Text.Pandoc.RoffChar,
@@ -756,20 +763,20 @@ test-suite test-pandoc
bytestring >= 0.9 && < 0.12,
containers >= 0.4.2.1 && < 0.7,
directory >= 1.2.3 && < 1.4,
- doctemplates >= 0.9 && < 0.10,
+ doctemplates >= 0.10 && < 0.11,
exceptions >= 0.8 && < 0.11,
filepath >= 1.1 && < 1.5,
- hslua >= 1.1 && < 1.4,
+ hslua >= 2.0 && < 2.1,
mtl >= 2.2 && < 2.3,
- pandoc-types >= 1.22 && < 1.23,
+ pandoc-types >= 1.22.1 && < 1.23,
process >= 1.2.3 && < 1.7,
tasty >= 0.11 && < 1.5,
tasty-golden >= 2.3 && < 2.4,
tasty-hunit >= 0.9 && < 0.11,
- tasty-lua >= 0.2 && < 0.3,
+ tasty-lua >= 1.0 && < 1.1,
tasty-quickcheck >= 0.8 && < 0.11,
text >= 1.1.1.0 && < 1.3,
- time >= 1.5 && < 1.12,
+ time >= 1.5 && < 1.14,
xml >= 1.3.12 && < 1.4,
zip-archive >= 0.2.3.4 && < 0.5
other-modules: Tests.Old
@@ -798,6 +805,7 @@ test-suite test-pandoc
Tests.Readers.Org.Meta
Tests.Readers.Org.Shared
Tests.Readers.RST
+ Tests.Readers.RTF
Tests.Readers.Docx
Tests.Readers.Odt
Tests.Readers.Txt2Tags
@@ -821,6 +829,7 @@ test-suite test-pandoc
Tests.Writers.Docx
Tests.Writers.RST
Tests.Writers.TEI
+ Tests.Writers.Markua
Tests.Writers.Muse
Tests.Writers.FB2
Tests.Writers.Powerpoint
@@ -834,12 +843,9 @@ benchmark benchmark-pandoc
main-is: benchmark-pandoc.hs
hs-source-dirs: benchmark
build-depends: bytestring,
- containers,
- -- gauge >= 0.2 && < 0.3,
- tasty-bench >= 0.2 && <= 0.3,
+ tasty-bench >= 0.2 && <= 0.4,
mtl >= 2.2 && < 2.3,
text >= 1.1.1.0 && < 1.3,
- time,
deepseq
-- we increase heap size to avoid benchmarking garbage collection:
ghc-options: -rtsopts -with-rtsopts=-A8m -threaded
diff --git a/prelude/Prelude.hs b/prelude/Prelude.hs
deleted file mode 100644
index 2d81ec1ff..000000000
--- a/prelude/Prelude.hs
+++ /dev/null
@@ -1,15 +0,0 @@
-{-# LANGUAGE NoImplicitPrelude #-}
-
--- The intent is that this Prelude provide the API of
--- the base 4.11 Prelude in a way that is portable for
--- all base versions.
-
-module Prelude
-(
- module Prelude.Compat
-, Semigroup(..)
-)
-where
-
-import Prelude.Compat
-import Data.Semigroup (Semigroup(..)) -- includes (<>)
diff --git a/shell.nix b/shell.nix
index 1fa25de79..6b211f6e6 100644
--- a/shell.nix
+++ b/shell.nix
@@ -41,6 +41,7 @@ let
file-embed
filepath
haddock-library
+ haskell-language-server
hsc2hs
hslua
hslua-module-system
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 98b072ffb..9eb9c2cf3 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE TupleSections #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
@@ -25,9 +26,9 @@ module Text.Pandoc.App (
, applyFilters
) where
import qualified Control.Exception as E
-import Control.Monad ( (>=>), when )
+import Control.Monad ( (>=>), when, forM_ )
import Control.Monad.Trans ( MonadIO(..) )
-import Control.Monad.Except (throwError)
+import Control.Monad.Except (throwError, catchError)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as B8
import qualified Data.ByteString.Lazy as BL
@@ -38,17 +39,20 @@ import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TE
+import qualified Data.Text.Encoding as TSE
import qualified Data.Text.Encoding.Error as TE
import qualified Data.Text.Encoding.Error as TSE
import Network.URI (URI (..), parseURI)
import System.Directory (doesDirectoryExist)
import System.Exit (exitSuccess)
-import System.FilePath ( takeBaseName, takeExtension )
+import System.FilePath ( takeBaseName, takeExtension)
import System.IO (nativeNewline, stdout)
import qualified System.IO as IO (Newline (..))
import Text.Pandoc
import Text.Pandoc.Builder (setMeta)
-import Text.Pandoc.MIME (getCharset)
+import Text.Pandoc.MediaBag (mediaItems)
+import Text.Pandoc.MIME (getCharset, MimeType)
+import Text.Pandoc.Image (svgToPng)
import Text.Pandoc.App.FormatHeuristics (formatFromFilePaths)
import Text.Pandoc.App.Opt (Opt (..), LineEnding (..), defaultOpts,
IpynbOutput (..))
@@ -64,6 +68,7 @@ import Text.Pandoc.Shared (eastAsianLineBreakFilter, stripEmptyParagraphs,
defaultUserDataDir, tshow)
import Text.Pandoc.Writers.Shared (lookupMetaString)
import Text.Pandoc.Readers.Markdown (yamlToMeta)
+import Text.Pandoc.Readers.Custom (readCustom)
import qualified Text.Pandoc.UTF8 as UTF8
#ifndef _WINDOWS
import System.Posix.IO (stdOutput)
@@ -94,40 +99,24 @@ convertWithOpts opts = do
let sources = case optInputFiles opts of
Just xs | not (optIgnoreArgs opts) -> xs
_ -> ["-"]
-
- let runIO' :: PandocIO a -> IO a
- runIO' f = do
- (res, reports) <- runIOorExplode $ do
- setTrace (optTrace opts)
- setVerbosity verbosity
- x <- f
- rs <- getLog
- return (x, rs)
- case optLogFile opts of
- Nothing -> return ()
- Just logfile -> BL.writeFile logfile (encodeLogMessages reports)
- let isWarning msg = messageVerbosity msg == WARNING
- when (optFailIfWarnings opts && any isWarning reports) $
- E.throwIO PandocFailOnWarningError
- return res
-
- let eol = case optEol opts of
- CRLF -> IO.CRLF
- LF -> IO.LF
- Native -> nativeNewline
#ifdef _WINDOWS
let istty = True
#else
istty <- liftIO $ queryTerminal stdOutput
#endif
- runIO' $ do
+ res <- runIO $ do
+
+ setTrace (optTrace opts)
+ setVerbosity verbosity
setUserDataDir datadir
setResourcePath (optResourcePath opts)
setInputFiles (fromMaybe ["-"] (optInputFiles opts))
setOutputFile (optOutputFile opts)
+ inputs <- readSources sources
+
-- assign reader and writer based on options and filenames
readerName <- case optFrom opts of
Just f -> return f
@@ -151,21 +140,28 @@ convertWithOpts opts = do
<> "` instead of `pandoc " <> inputFile <> " -o " <> outputFile <> "`."
_ -> return ()
- (reader :: Reader PandocIO, readerExts) <- getReader readerName
-
- let convertTabs = tabFilter (if optPreserveTabs opts ||
- readerNameBase == "t2t" ||
- readerNameBase == "man"
- then 0
- else optTabStop opts)
-
-
- let readSources :: [FilePath] -> PandocIO [(FilePath, Text)]
- readSources srcs =
- mapM (\fp -> do
- t <- readSource fp
- return (if fp == "-" then "" else fp, convertTabs t)) srcs
+ let makeSandboxed pureReader =
+ let files = maybe id (:) (optReferenceDoc opts) .
+ maybe id (:) (optEpubMetadata opts) .
+ maybe id (:) (optEpubCoverImage opts) .
+ maybe id (:) (optCSL opts) .
+ maybe id (:) (optCitationAbbreviations opts) $
+ optEpubFonts opts ++
+ optBibliography opts
+ in case pureReader of
+ TextReader r -> TextReader $ \o t -> sandbox files (r o t)
+ ByteStringReader r
+ -> ByteStringReader $ \o t -> sandbox files (r o t)
+
+ (reader, readerExts) <-
+ if ".lua" `T.isSuffixOf` readerName
+ then return (TextReader (readCustom (T.unpack readerName)), mempty)
+ else if optSandbox opts
+ then case runPure (getReader readerName) of
+ Left e -> throwError e
+ Right (r, rexts) -> return (makeSandboxed r, rexts)
+ else getReader readerName
outputSettings <- optToOutputSettings opts
let format = outputFormat outputSettings
@@ -224,7 +220,7 @@ convertWithOpts opts = do
case optMetadataFiles opts of
[] -> return mempty
paths -> mconcat <$>
- mapM (\path -> do raw <- readFileLazy path
+ mapM (\path -> do raw <- readFileStrict path
yamlToMeta readerOpts (Just path) raw) paths
let transforms = (case optShiftHeadingLevelBy opts of
@@ -254,20 +250,11 @@ convertWithOpts opts = do
_ -> Format format) :))
$ []
- let sourceToDoc :: [FilePath] -> PandocIO Pandoc
- sourceToDoc sources' =
- case reader of
- TextReader r
- | readerNameBase == "json" ->
- mconcat <$> mapM (readSource >=> r readerOpts) sources'
- | optFileScope opts ->
- -- Read source and convert tabs (see #6709)
- let readSource' = fmap convertTabs . readSource
- in mconcat <$> mapM (readSource' >=> r readerOpts) sources'
- | otherwise ->
- readSources sources' >>= r readerOpts
- ByteStringReader r ->
- mconcat <$> mapM (readFile' >=> r readerOpts) sources'
+ let convertTabs = tabFilter (if optPreserveTabs opts ||
+ readerNameBase == "t2t" ||
+ readerNameBase == "man"
+ then 0
+ else optTabStop opts)
when (readerNameBase == "markdown_github" ||
@@ -293,8 +280,25 @@ convertWithOpts opts = do
maybe id (setMeta "citation-abbreviations")
(optCitationAbbreviations opts) $ mempty
- doc <- sourceToDoc sources >>=
- ( (if isJust (optExtractMedia opts)
+ doc <- (case reader of
+ TextReader r
+ | readerNameBase == "json" ->
+ mconcat <$>
+ mapM (inputToText convertTabs
+ >=> r readerOpts . (:[])) inputs
+ | optFileScope opts ->
+ mconcat <$> mapM
+ (inputToText convertTabs
+ >=> r readerOpts . (:[]))
+ inputs
+ | otherwise -> mapM (inputToText convertTabs) inputs
+ >>= r readerOpts
+ ByteStringReader r ->
+ mconcat <$> mapM (r readerOpts . inputToLazyByteString) inputs)
+ >>=
+ ( (if not (optSandbox opts) &&
+ (isJust (optExtractMedia opts)
+ || writerNameBase == "docx") -- for fallback pngs
then fillMediaBag
else return)
>=> return . adjustMetadata (metadataFromFile <>)
@@ -305,14 +309,28 @@ convertWithOpts opts = do
>=> maybe return extractMedia (optExtractMedia opts)
)
- case writer of
- ByteStringWriter f -> f writerOptions doc >>= writeFnBinary outputFile
+ when (writerNameBase == "docx" && not (optSandbox opts)) $ do
+ -- create fallback pngs for svgs
+ items <- mediaItems <$> getMediaBag
+ forM_ items $ \(fp, mt, bs) ->
+ case T.takeWhile (/=';') mt of
+ "image/svg+xml" -> do
+ res <- svgToPng (writerDpi writerOptions) bs
+ case res of
+ Right bs' -> do
+ let fp' = fp <> ".png"
+ insertMedia fp' (Just "image/png") bs'
+ Left e -> report $ CouldNotConvertImage (T.pack fp) (tshow e)
+ _ -> return ()
+
+ output <- case writer of
+ ByteStringWriter f -> BinaryOutput <$> f writerOptions doc
TextWriter f -> case outputPdfProgram outputSettings of
Just pdfProg -> do
res <- makePDF pdfProg (optPdfEngineOpts opts) f
writerOptions doc
case res of
- Right pdf -> writeFnBinary outputFile pdf
+ Right pdf -> return $ BinaryOutput pdf
Left err' -> throwError $ PandocPDFError $
TL.toStrict (TE.decodeUtf8With TE.lenientDecode err')
@@ -321,11 +339,32 @@ convertWithOpts opts = do
| standalone = t
| T.null t || T.last t /= '\n' = t <> T.singleton '\n'
| otherwise = t
- output <- ensureNl <$> f writerOptions doc
- writerFn eol outputFile =<<
- if optSelfContained opts && htmlFormat format
- then makeSelfContained output
- else return output
+ textOutput <- ensureNl <$> f writerOptions doc
+ if optSelfContained opts && htmlFormat format
+ then TextOutput <$> makeSelfContained textOutput
+ else return $ TextOutput textOutput
+ reports <- getLog
+ return (output, reports)
+
+ case res of
+ Left e -> E.throwIO e
+ Right (output, reports) -> do
+ case optLogFile opts of
+ Nothing -> return ()
+ Just logfile -> BL.writeFile logfile (encodeLogMessages reports)
+ let isWarning msg = messageVerbosity msg == WARNING
+ when (optFailIfWarnings opts && any isWarning reports) $
+ E.throwIO PandocFailOnWarningError
+ let eol = case optEol opts of
+ CRLF -> IO.CRLF
+ LF -> IO.LF
+ Native -> nativeNewline
+ case output of
+ TextOutput t -> writerFn eol outputFile t
+ BinaryOutput bs -> writeFnBinary outputFile bs
+
+data PandocOutput = TextOutput Text | BinaryOutput BL.ByteString
+ deriving (Show)
type Transform = Pandoc -> Pandoc
@@ -344,49 +383,68 @@ adjustMetadata f (Pandoc meta bs) = Pandoc (f meta) bs
applyTransforms :: Monad m => [Transform] -> Pandoc -> m Pandoc
applyTransforms transforms d = return $ foldr ($) d transforms
-readSource :: FilePath -> PandocIO Text
-readSource src = case parseURI src of
- Just u | uriScheme u `elem` ["http:","https:"] ->
- readURI src
- | uriScheme u == "file:" -> liftIO $
- readTextFile (uriPathToPath $ T.pack $ uriPath u)
- _ -> liftIO $ readTextFile src
- where readTextFile :: FilePath -> IO Text
- readTextFile fp = do
- bs <- if src == "-"
- then BS.getContents
- else BS.readFile fp
- E.catch (return $! UTF8.toText bs)
- (\e -> E.throwIO $ case e of
- TSE.DecodeError _ (Just w) ->
- case BS.elemIndex w bs of
- Just offset ->
- PandocUTF8DecodingError (T.pack fp) offset w
- _ -> PandocUTF8DecodingError (T.pack fp) 0 w
- _ -> PandocAppError (tshow e))
-
-readURI :: FilePath -> PandocIO Text
-readURI src = do
- (bs, mt) <- openURL (T.pack src)
+readSources :: (PandocMonad m, MonadIO m)
+ => [FilePath] -> m [(FilePath, (BS.ByteString, Maybe MimeType))]
+readSources srcs =
+ mapM (\fp -> do t <- readSource fp
+ return (if fp == "-" then "" else fp, t)) srcs
+
+readSource :: (PandocMonad m, MonadIO m)
+ => FilePath -> m (BS.ByteString, Maybe MimeType)
+readSource "-" = (,Nothing) <$> readStdinStrict
+readSource src =
+ case parseURI src of
+ Just u | uriScheme u `elem` ["http:","https:"] -> openURL (T.pack src)
+ | uriScheme u == "file:" ->
+ (,Nothing) <$>
+ readFileStrict (uriPathToPath $ T.pack $ uriPath u)
+ _ -> (,Nothing) <$> readFileStrict src
+
+utf8ToText :: PandocMonad m => FilePath -> BS.ByteString -> m Text
+utf8ToText fp bs =
+ case TSE.decodeUtf8' . dropBOM $ bs of
+ Left (TSE.DecodeError _ (Just w)) ->
+ case BS.elemIndex w bs of
+ Just offset -> throwError $ PandocUTF8DecodingError (T.pack fp) offset w
+ Nothing -> throwError $ PandocUTF8DecodingError (T.pack fp) 0 w
+ Left e -> throwError $ PandocAppError (tshow e)
+ Right t -> return t
+ where
+ dropBOM bs' =
+ if "\xEF\xBB\xBF" `BS.isPrefixOf` bs'
+ then BS.drop 3 bs'
+ else bs'
+
+
+inputToText :: PandocMonad m
+ => (Text -> Text)
+ -> (FilePath, (BS.ByteString, Maybe MimeType))
+ -> m (FilePath, Text)
+inputToText convTabs (fp, (bs,mt)) =
+ (fp,) . convTabs . T.filter (/='\r') <$>
case mt >>= getCharset of
- Just "UTF-8" -> return $ UTF8.toText bs
+ Just "UTF-8" -> utf8ToText fp bs
Just "ISO-8859-1" -> return $ T.pack $ B8.unpack bs
Just charset -> throwError $ PandocUnsupportedCharsetError charset
- Nothing -> liftIO $ -- try first as UTF-8, then as latin1
- E.catch (return $! UTF8.toText bs)
- (\case
- TSE.DecodeError{} ->
- return $ T.pack $ B8.unpack bs
- e -> E.throwIO e)
-
-readFile' :: MonadIO m => FilePath -> m BL.ByteString
-readFile' "-" = liftIO BL.getContents
-readFile' f = liftIO $ BL.readFile f
-
-writeFnBinary :: MonadIO m => FilePath -> BL.ByteString -> m ()
-writeFnBinary "-" = liftIO . BL.putStr
-writeFnBinary f = liftIO . BL.writeFile (UTF8.encodePath f)
-
-writerFn :: MonadIO m => IO.Newline -> FilePath -> Text -> m ()
-writerFn eol "-" = liftIO . UTF8.putStrWith eol
-writerFn eol f = liftIO . UTF8.writeFileWith eol f
+ Nothing -> catchError
+ (utf8ToText fp bs)
+ (\case
+ PandocUTF8DecodingError{} -> do
+ report $ NotUTF8Encoded
+ (if null fp
+ then "input"
+ else fp)
+ return $ T.pack $ B8.unpack bs
+ e -> throwError e)
+
+inputToLazyByteString :: (FilePath, (BS.ByteString, Maybe MimeType))
+ -> BL.ByteString
+inputToLazyByteString (_, (bs,_)) = BL.fromStrict bs
+
+writeFnBinary :: FilePath -> BL.ByteString -> IO ()
+writeFnBinary "-" = BL.putStr
+writeFnBinary f = BL.writeFile (UTF8.encodePath f)
+
+writerFn :: IO.Newline -> FilePath -> Text -> IO ()
+writerFn eol "-" = UTF8.putStrWith eol
+writerFn eol f = UTF8.writeFileWith eol f
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index a6df12715..759f8ac35 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -33,10 +33,8 @@ import Data.Bifunctor (second)
import Data.Char (toLower)
import Data.List (intercalate, sort, foldl')
#ifdef _WINDOWS
-#if MIN_VERSION_base(4,12,0)
import Data.List (isPrefixOf)
#endif
-#endif
import Data.Maybe (fromMaybe, isJust)
import Data.Text (Text)
import Safe (tailDef)
@@ -188,6 +186,11 @@ options =
(\opt -> return opt { optFileScope = True }))
"" -- "Parse input files before combining"
+ , Option "" ["sandbox"]
+ (NoArg
+ (\opt -> return opt { optSandbox = True }))
+ ""
+
, Option "s" ["standalone"]
(NoArg
(\opt -> return opt { optStandalone = True }))
@@ -332,14 +335,8 @@ options =
, Option "" ["syntax-definition"]
(ReqArg
- (\arg opt -> do
- let tr c d = map (\x -> if x == c then d else x)
- let arg' = case arg of -- see #4836
- -- HXT confuses Windows path with URI
- _:':':'\\':_ ->
- "file:///" ++ tr '\\' '/' arg
- _ -> normalizePath arg
- return opt{ optSyntaxDefinitions = arg' :
+ (\arg opt ->
+ return opt{ optSyntaxDefinitions = normalizePath arg :
optSyntaxDefinitions opt })
"FILE")
"" -- "Syntax definition (xml) file"
@@ -576,10 +573,10 @@ options =
(ReqArg
(\arg opt ->
case safeStrRead arg of
- Just t | t >= 1 && t <= 6 ->
+ Just t | t >= 0 && t <= 6 ->
return opt { optSlideLevel = Just t }
_ -> E.throwIO $ PandocOptionError
- "slide level must be a number between 1 and 6")
+ "slide level must be a number between 0 and 6")
"NUMBER")
"" -- "Force header level for slides"
@@ -1079,7 +1076,6 @@ readMetaValue s
-- beginning with \\ to \\?\UNC\. -- See #5127.
normalizePath :: FilePath -> FilePath
#ifdef _WINDOWS
-#if MIN_VERSION_base(4,12,0)
normalizePath fp =
if "\\\\" `isPrefixOf` fp && not ("\\\\?\\" `isPrefixOf` fp)
then "\\\\?\\UNC\\" ++ drop 2 fp
@@ -1087,6 +1083,3 @@ normalizePath fp =
#else
normalizePath = id
#endif
-#else
-normalizePath = id
-#endif
diff --git a/src/Text/Pandoc/App/FormatHeuristics.hs b/src/Text/Pandoc/App/FormatHeuristics.hs
index bdf8c6667..e5fe7ad81 100644
--- a/src/Text/Pandoc/App/FormatHeuristics.hs
+++ b/src/Text/Pandoc/App/FormatHeuristics.hs
@@ -54,6 +54,7 @@ formatFromFilePath x =
".lhs" -> Just "markdown+lhs"
".ltx" -> Just "latex"
".markdown" -> Just "markdown"
+ ".markua" -> Just "markua"
".mkdn" -> Just "markdown"
".mkd" -> Just "markdown"
".mdwn" -> Just "markdown"
@@ -74,7 +75,6 @@ formatFromFilePath x =
".s5" -> Just "s5"
".t2t" -> Just "t2t"
".tei" -> Just "tei"
- ".tei.xml" -> Just "tei"
".tex" -> Just "latex"
".texi" -> Just "texinfo"
".texinfo" -> Just "texinfo"
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index d54d932b7..c5fac7951 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -29,7 +29,7 @@ import Control.Monad.Except (MonadIO, liftIO, throwError, (>=>), foldM)
import Control.Monad.State.Strict (StateT, modify, gets)
import System.FilePath ( addExtension, (</>), takeExtension, takeDirectory )
import System.Directory ( canonicalizePath )
-import Data.Char (isLower, toLower)
+import Data.Char (toLower)
import Data.Maybe (fromMaybe)
import GHC.Generics hiding (Meta)
import Text.Pandoc.Filter (Filter (..))
@@ -40,11 +40,10 @@ import Text.Pandoc.Options (TopLevelDivision (TopLevelDefault),
ReferenceLocation (EndOfDocument),
ObfuscationMethod (NoObfuscation),
CiteMethod (Citeproc))
-import Text.Pandoc.Class (readFileLazy, fileExists, setVerbosity, report,
+import Text.Pandoc.Class (readFileStrict, fileExists, setVerbosity, report,
PandocMonad(lookupEnv), getUserDataDir)
import Text.Pandoc.Error (PandocError (PandocParseError, PandocSomeError))
-import Text.Pandoc.Shared (camelCaseStrToHyphenated, defaultUserDataDir,
- findM, ordNub)
+import Text.Pandoc.Shared (defaultUserDataDir, findM, ordNub)
import qualified Text.Pandoc.Parsing as P
import Text.Pandoc.Readers.Metadata (yamlMap)
import Text.Pandoc.Class.PandocPure
@@ -54,21 +53,18 @@ import Data.Default (def)
import qualified Data.Text as T
import qualified Data.Map as M
import Text.Pandoc.Definition (Meta(..), MetaValue(..))
-import Data.Aeson (defaultOptions, Options(..))
+import Data.Aeson (defaultOptions, Options(..), Result(..), fromJSON, camelTo2)
import Data.Aeson.TH (deriveJSON)
import Control.Applicative ((<|>))
-import Data.YAML
+import Data.Yaml
-- | The type of line-endings to be used when writing plain-text.
data LineEnding = LF | CRLF | Native deriving (Show, Generic)
-instance FromYAML LineEnding where
- parseYAML = withStr "LineEnding" $ \t ->
- case T.toLower t of
- "lf" -> return LF
- "crlf" -> return CRLF
- "native" -> return Native
- _ -> fail $ "Unknown line ending type " ++ show t
+-- see https://github.com/jgm/pandoc/pull/4083
+-- using generic deriving caused long compilation times
+$(deriveJSON
+ defaultOptions{ constructorTagModifier = map toLower } ''LineEnding)
-- | How to handle output blocks in ipynb.
data IpynbOutput =
@@ -77,13 +73,8 @@ data IpynbOutput =
| IpynbOutputBest
deriving (Show, Generic)
-instance FromYAML IpynbOutput where
- parseYAML = withStr "LineEnding" $ \t ->
- case t of
- "none" -> return IpynbOutputNone
- "all" -> return IpynbOutputAll
- "best" -> return IpynbOutputBest
- _ -> fail $ "Unknown ipynb output type " ++ show t
+$(deriveJSON
+ defaultOptions{ fieldLabelModifier = map toLower . drop 11 } ''IpynbOutput)
-- | Data structure for command line options.
data Opt = Opt
@@ -160,11 +151,18 @@ data Opt = Opt
, optCSL :: Maybe FilePath -- ^ CSL stylesheet
, optBibliography :: [FilePath] -- ^ Bibliography files
, optCitationAbbreviations :: Maybe FilePath -- ^ Citation abbreviations
+ , optSandbox :: Bool
} deriving (Generic, Show)
-instance FromYAML (Opt -> Opt) where
- parseYAML (Mapping _ _ m) = chain doOpt (M.toList m)
- parseYAML n = failAtNode n "Expected a mapping"
+$(deriveJSON
+ defaultOptions{ fieldLabelModifier = camelTo2 '-' . drop 3 } ''Opt)
+
+instance FromJSON (Opt -> Opt) where
+ parseJSON (Object m) =
+ case fromJSON (Object m) of
+ Error err' -> fail err'
+ Success (m' :: M.Map Text Value) -> chain doOpt (M.toList m')
+ parseJSON _ = fail "Expected a mapping"
data DefaultsState = DefaultsState
{
@@ -173,22 +171,21 @@ data DefaultsState = DefaultsState
} deriving (Show)
instance (PandocMonad m, MonadIO m)
- => FromYAML (Opt -> StateT DefaultsState m Opt) where
- parseYAML (Mapping _ _ m) = do
- let opts = M.mapKeys toText m
- dataDir <- case M.lookup "data-dir" opts of
- Nothing -> return Nothing
- Just v -> Just . unpack <$> parseYAML v
- f <- parseOptions (M.toList m)
- case M.lookup "defaults" opts of
- Just v -> do
- g <- parseDefaults v dataDir
- return $ g >=> f >=> resolveVarsInOpt
- Nothing -> return $ f >=> resolveVarsInOpt
- where
- toText (Scalar _ (SStr s)) = s
- toText _ = ""
- parseYAML n = failAtNode n "Expected a mapping"
+ => FromJSON (Opt -> StateT DefaultsState m Opt) where
+ parseJSON (Object o) =
+ case fromJSON (Object o) of
+ Error err' -> fail err'
+ Success (opts :: M.Map Text Value) -> do
+ dataDir <- case M.lookup "data-dir" opts of
+ Nothing -> return Nothing
+ Just v -> Just . unpack <$> parseJSON v
+ f <- parseOptions (M.toList opts)
+ case M.lookup "defaults" opts of
+ Just v -> do
+ g <- parseDefaults v dataDir
+ return $ g >=> f >=> resolveVarsInOpt
+ Nothing -> return $ f >=> resolveVarsInOpt
+ parseJSON _ = fail "Expected a mapping"
resolveVarsInOpt :: forall m. (PandocMonad m, MonadIO m)
=> Opt -> StateT DefaultsState m Opt
@@ -302,7 +299,7 @@ resolveVarsInOpt
parseDefaults :: (PandocMonad m, MonadIO m)
- => Node Pos
+ => Value
-> Maybe FilePath
-> Parser (Opt -> StateT DefaultsState m Opt)
parseDefaults n dataDir = parseDefsNames n >>= \ds -> return $ \o -> do
@@ -321,11 +318,11 @@ parseDefaults n dataDir = parseDefsNames n >>= \ds -> return $ \o -> do
"Error: Circular defaults file reference in " ++
"'" ++ defsParent ++ "'"
else foldM applyDefaults o defsChildren
- where parseDefsNames x = (parseYAML x >>= \xs -> return $ map unpack xs)
- <|> (parseYAML x >>= \x' -> return [unpack x'])
+ where parseDefsNames x = (parseJSON x >>= \xs -> return $ map unpack xs)
+ <|> (parseJSON x >>= \x' -> return [unpack x'])
parseOptions :: Monad m
- => [(Node Pos, Node Pos)]
+ => [(Text, Value)]
-> Parser (Opt -> StateT DefaultsState m Opt)
parseOptions ns = do
f <- chain doOpt' ns
@@ -335,267 +332,267 @@ chain :: Monad m => (a -> m (b -> b)) -> [a] -> m (b -> b)
chain f = foldM g id
where g o n = f n >>= \o' -> return $ o' . o
-doOpt' :: (Node Pos, Node Pos) -> Parser (Opt -> Opt)
-doOpt' (k',v) = do
- k <- parseStringKey k'
+doOpt' :: (Text, Value) -> Parser (Opt -> Opt)
+doOpt' (k,v) = do
case k of
"defaults" -> return id
- _ -> doOpt (k',v)
+ _ -> doOpt (k,v)
-doOpt :: (Node Pos, Node Pos) -> Parser (Opt -> Opt)
-doOpt (k',v) = do
- k <- parseStringKey k'
+doOpt :: (Text, Value) -> Parser (Opt -> Opt)
+doOpt (k,v) = do
case k of
"tab-stop" ->
- parseYAML v >>= \x -> return (\o -> o{ optTabStop = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTabStop = x })
"preserve-tabs" ->
- parseYAML v >>= \x -> return (\o -> o{ optPreserveTabs = x })
+ parseJSON v >>= \x -> return (\o -> o{ optPreserveTabs = x })
"standalone" ->
- parseYAML v >>= \x -> return (\o -> o{ optStandalone = x })
+ parseJSON v >>= \x -> return (\o -> o{ optStandalone = x })
"table-of-contents" ->
- parseYAML v >>= \x -> return (\o -> o{ optTableOfContents = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTableOfContents = x })
"toc" ->
- parseYAML v >>= \x -> return (\o -> o{ optTableOfContents = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTableOfContents = x })
"from" ->
- parseYAML v >>= \x -> return (\o -> o{ optFrom = x })
+ parseJSON v >>= \x -> return (\o -> o{ optFrom = x })
"reader" ->
- parseYAML v >>= \x -> return (\o -> o{ optFrom = x })
+ parseJSON v >>= \x -> return (\o -> o{ optFrom = x })
"to" ->
- parseYAML v >>= \x -> return (\o -> o{ optTo = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTo = x })
"writer" ->
- parseYAML v >>= \x -> return (\o -> o{ optTo = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTo = x })
"shift-heading-level-by" ->
- parseYAML v >>= \x -> return (\o -> o{ optShiftHeadingLevelBy = x })
+ parseJSON v >>= \x -> return (\o -> o{ optShiftHeadingLevelBy = x })
"template" ->
- parseYAML v >>= \x -> return (\o -> o{ optTemplate = unpack <$> x })
+ parseJSON v >>= \x -> return (\o -> o{ optTemplate = unpack <$> x })
"variables" ->
- parseYAML v >>= \x -> return (\o -> o{ optVariables =
+ parseJSON v >>= \x -> return (\o -> o{ optVariables =
x <> optVariables o })
-- Note: x comes first because <> for Context is left-biased union
-- and we want to favor later default files. See #5988.
"metadata" ->
yamlToMeta v >>= \x -> return (\o -> o{ optMetadata = optMetadata o <> x })
"metadata-files" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optMetadataFiles =
optMetadataFiles o <>
map unpack x })
"metadata-file" -> -- allow either a list or a single value
- (parseYAML v >>= \x -> return (\o -> o{ optMetadataFiles =
+ (parseJSON v >>= \x -> return (\o -> o{ optMetadataFiles =
optMetadataFiles o <>
map unpack x }))
<|>
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optMetadataFiles =
optMetadataFiles o <>[unpack x] }))
"output-file" ->
- parseYAML v >>= \x -> return (\o -> o{ optOutputFile = unpack <$> x })
+ parseJSON v >>= \x -> return (\o -> o{ optOutputFile = unpack <$> x })
"input-files" ->
- parseYAML v >>= \x -> return (\o -> o{ optInputFiles =
+ parseJSON v >>= \x -> return (\o -> o{ optInputFiles =
optInputFiles o <>
(map unpack <$> x) })
"input-file" -> -- allow either a list or a single value
- (parseYAML v >>= \x -> return (\o -> o{ optInputFiles =
+ (parseJSON v >>= \x -> return (\o -> o{ optInputFiles =
optInputFiles o <>
(map unpack <$> x) }))
<|>
- (parseYAML v >>= \x -> return (\o -> o{ optInputFiles =
+ (parseJSON v >>= \x -> return (\o -> o{ optInputFiles =
optInputFiles o <>
((\z -> [unpack z]) <$> x)
}))
"number-sections" ->
- parseYAML v >>= \x -> return (\o -> o{ optNumberSections = x })
+ parseJSON v >>= \x -> return (\o -> o{ optNumberSections = x })
"number-offset" ->
- parseYAML v >>= \x -> return (\o -> o{ optNumberOffset = x })
+ parseJSON v >>= \x -> return (\o -> o{ optNumberOffset = x })
"section-divs" ->
- parseYAML v >>= \x -> return (\o -> o{ optSectionDivs = x })
+ parseJSON v >>= \x -> return (\o -> o{ optSectionDivs = x })
"incremental" ->
- parseYAML v >>= \x -> return (\o -> o{ optIncremental = x })
+ parseJSON v >>= \x -> return (\o -> o{ optIncremental = x })
"self-contained" ->
- parseYAML v >>= \x -> return (\o -> o{ optSelfContained = x })
+ parseJSON v >>= \x -> return (\o -> o{ optSelfContained = x })
"html-q-tags" ->
- parseYAML v >>= \x -> return (\o -> o{ optHtmlQTags = x })
+ parseJSON v >>= \x -> return (\o -> o{ optHtmlQTags = x })
"highlight-style" ->
- parseYAML v >>= \x -> return (\o -> o{ optHighlightStyle = x })
+ parseJSON v >>= \x -> return (\o -> o{ optHighlightStyle = x })
"syntax-definition" ->
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optSyntaxDefinitions =
optSyntaxDefinitions o <> map unpack x }))
<|>
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optSyntaxDefinitions =
optSyntaxDefinitions o <> [unpack x] }))
"syntax-definitions" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optSyntaxDefinitions =
optSyntaxDefinitions o <> map unpack x })
"top-level-division" ->
- parseYAML v >>= \x -> return (\o -> o{ optTopLevelDivision = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTopLevelDivision = x })
"html-math-method" ->
- parseYAML v >>= \x -> return (\o -> o{ optHTMLMathMethod = x })
+ parseJSON v >>= \x -> return (\o -> o{ optHTMLMathMethod = x })
"abbreviations" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optAbbreviations = unpack <$> x })
"reference-doc" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optReferenceDoc = unpack <$> x })
"epub-subdirectory" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optEpubSubdirectory = unpack x })
"epub-metadata" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optEpubMetadata = unpack <$> x })
"epub-fonts" ->
- parseYAML v >>= \x -> return (\o -> o{ optEpubFonts = optEpubFonts o <>
+ parseJSON v >>= \x -> return (\o -> o{ optEpubFonts = optEpubFonts o <>
map unpack x })
"epub-chapter-level" ->
- parseYAML v >>= \x -> return (\o -> o{ optEpubChapterLevel = x })
+ parseJSON v >>= \x -> return (\o -> o{ optEpubChapterLevel = x })
"epub-cover-image" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optEpubCoverImage = unpack <$> x })
"toc-depth" ->
- parseYAML v >>= \x -> return (\o -> o{ optTOCDepth = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTOCDepth = x })
"dump-args" ->
- parseYAML v >>= \x -> return (\o -> o{ optDumpArgs = x })
+ parseJSON v >>= \x -> return (\o -> o{ optDumpArgs = x })
"ignore-args" ->
- parseYAML v >>= \x -> return (\o -> o{ optIgnoreArgs = x })
+ parseJSON v >>= \x -> return (\o -> o{ optIgnoreArgs = x })
"verbosity" ->
- parseYAML v >>= \x -> return (\o -> o{ optVerbosity = x })
+ parseJSON v >>= \x -> return (\o -> o{ optVerbosity = x })
"trace" ->
- parseYAML v >>= \x -> return (\o -> o{ optTrace = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTrace = x })
"log-file" ->
- parseYAML v >>= \x -> return (\o -> o{ optLogFile = unpack <$> x })
+ parseJSON v >>= \x -> return (\o -> o{ optLogFile = unpack <$> x })
"fail-if-warnings" ->
- parseYAML v >>= \x -> return (\o -> o{ optFailIfWarnings = x })
+ parseJSON v >>= \x -> return (\o -> o{ optFailIfWarnings = x })
"reference-links" ->
- parseYAML v >>= \x -> return (\o -> o{ optReferenceLinks = x })
+ parseJSON v >>= \x -> return (\o -> o{ optReferenceLinks = x })
"reference-location" ->
- parseYAML v >>= \x -> return (\o -> o{ optReferenceLocation = x })
+ parseJSON v >>= \x -> return (\o -> o{ optReferenceLocation = x })
"dpi" ->
- parseYAML v >>= \x -> return (\o -> o{ optDpi = x })
+ parseJSON v >>= \x -> return (\o -> o{ optDpi = x })
"wrap" ->
- parseYAML v >>= \x -> return (\o -> o{ optWrap = x })
+ parseJSON v >>= \x -> return (\o -> o{ optWrap = x })
"columns" ->
- parseYAML v >>= \x -> return (\o -> o{ optColumns = x })
+ parseJSON v >>= \x -> return (\o -> o{ optColumns = x })
"filters" ->
- parseYAML v >>= \x -> return (\o -> o{ optFilters = optFilters o <> x })
+ parseJSON v >>= \x -> return (\o -> o{ optFilters = optFilters o <> x })
"citeproc" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
if x
then return (\o -> o{ optFilters = CiteprocFilter : optFilters o })
else return id
"email-obfuscation" ->
- parseYAML v >>= \x -> return (\o -> o{ optEmailObfuscation = x })
+ parseJSON v >>= \x -> return (\o -> o{ optEmailObfuscation = x })
"identifier-prefix" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optIdentifierPrefix = x })
"strip-empty-paragraphs" ->
- parseYAML v >>= \x -> return (\o -> o{ optStripEmptyParagraphs = x })
+ parseJSON v >>= \x -> return (\o -> o{ optStripEmptyParagraphs = x })
"indented-code-classes" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optIndentedCodeClasses = x })
"data-dir" ->
- parseYAML v >>= \x -> return (\o -> o{ optDataDir = unpack <$> x })
+ parseJSON v >>= \x -> return (\o -> o{ optDataDir = unpack <$> x })
"cite-method" ->
- parseYAML v >>= \x -> return (\o -> o{ optCiteMethod = x })
+ parseJSON v >>= \x -> return (\o -> o{ optCiteMethod = x })
"listings" ->
- parseYAML v >>= \x -> return (\o -> o{ optListings = x })
+ parseJSON v >>= \x -> return (\o -> o{ optListings = x })
"pdf-engine" ->
- parseYAML v >>= \x -> return (\o -> o{ optPdfEngine = unpack <$> x })
+ parseJSON v >>= \x -> return (\o -> o{ optPdfEngine = unpack <$> x })
"pdf-engine-opts" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optPdfEngineOpts = map unpack x })
"pdf-engine-opt" ->
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optPdfEngineOpts = map unpack x }))
<|>
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optPdfEngineOpts = [unpack x] }))
"slide-level" ->
- parseYAML v >>= \x -> return (\o -> o{ optSlideLevel = x })
+ parseJSON v >>= \x -> return (\o -> o{ optSlideLevel = x })
"atx-headers" ->
- parseYAML v >>= \x -> return (\o -> o{ optSetextHeaders = not x })
+ parseJSON v >>= \x -> return (\o -> o{ optSetextHeaders = not x })
"markdown-headings" ->
- parseYAML v >>= \x -> return (\o ->
+ parseJSON v >>= \x -> return (\o ->
case T.toLower x of
"atx" -> o{ optSetextHeaders = False }
"setext" -> o{ optSetextHeaders = True }
_ -> o)
"ascii" ->
- parseYAML v >>= \x -> return (\o -> o{ optAscii = x })
+ parseJSON v >>= \x -> return (\o -> o{ optAscii = x })
"default-image-extension" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optDefaultImageExtension = x })
"extract-media" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optExtractMedia = unpack <$> x })
"track-changes" ->
- parseYAML v >>= \x -> return (\o -> o{ optTrackChanges = x })
+ parseJSON v >>= \x -> return (\o -> o{ optTrackChanges = x })
"file-scope" ->
- parseYAML v >>= \x -> return (\o -> o{ optFileScope = x })
+ parseJSON v >>= \x -> return (\o -> o{ optFileScope = x })
"title-prefix" ->
- parseYAML v >>= \x -> return (\o -> o{ optTitlePrefix = x,
+ parseJSON v >>= \x -> return (\o -> o{ optTitlePrefix = x,
optStandalone = True })
"css" ->
- (parseYAML v >>= \x -> return (\o -> o{ optCss = optCss o <>
+ (parseJSON v >>= \x -> return (\o -> o{ optCss = optCss o <>
map unpack x }))
<|>
- (parseYAML v >>= \x -> return (\o -> o{ optCss = optCss o <>
+ (parseJSON v >>= \x -> return (\o -> o{ optCss = optCss o <>
[unpack x] }))
"bibliography" ->
- (parseYAML v >>= \x -> return (\o ->
+ (parseJSON v >>= \x -> return (\o ->
o{ optBibliography = optBibliography o <>
map unpack x }))
<|>
- (parseYAML v >>= \x -> return (\o ->
+ (parseJSON v >>= \x -> return (\o ->
o{ optBibliography = optBibliography o <>
[unpack x] }))
"csl" ->
- parseYAML v >>= \x -> return (\o -> o{ optCSL = unpack <$> x })
+ parseJSON v >>= \x -> return (\o -> o{ optCSL = unpack <$> x })
"citation-abbreviations" ->
- parseYAML v >>= \x -> return (\o -> o{ optCitationAbbreviations =
+ parseJSON v >>= \x -> return (\o -> o{ optCitationAbbreviations =
unpack <$> x })
"ipynb-output" ->
- parseYAML v >>= \x -> return (\o -> o{ optIpynbOutput = x })
+ parseJSON v >>= \x -> return (\o -> o{ optIpynbOutput = x })
"include-before-body" ->
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optIncludeBeforeBody =
optIncludeBeforeBody o <> map unpack x }))
<|>
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optIncludeBeforeBody =
optIncludeBeforeBody o <> [unpack x] }))
"include-after-body" ->
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optIncludeAfterBody =
optIncludeAfterBody o <> map unpack x }))
<|>
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optIncludeAfterBody =
optIncludeAfterBody o <> [unpack x] }))
"include-in-header" ->
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optIncludeInHeader =
optIncludeInHeader o <> map unpack x }))
<|>
- (parseYAML v >>= \x ->
+ (parseJSON v >>= \x ->
return (\o -> o{ optIncludeInHeader =
optIncludeInHeader o <> [unpack x] }))
"resource-path" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optResourcePath = map unpack x <>
optResourcePath o })
"request-headers" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optRequestHeaders = x })
"no-check-certificate" ->
- parseYAML v >>= \x ->
+ parseJSON v >>= \x ->
return (\o -> o{ optNoCheckCertificate = x })
"eol" ->
- parseYAML v >>= \x -> return (\o -> o{ optEol = x })
+ parseJSON v >>= \x -> return (\o -> o{ optEol = x })
"strip-comments" ->
- parseYAML v >>= \x -> return (\o -> o { optStripComments = x })
- _ -> failAtNode k' $ "Unknown option " ++ show k
+ parseJSON v >>= \x -> return (\o -> o { optStripComments = x })
+ "sandbox" ->
+ parseJSON v >>= \x -> return (\o -> o { optSandbox = x })
+ _ -> fail $ "Unknown option " ++ show k
-- | Defaults for command-line options.
defaultOpts :: Opt
@@ -673,20 +670,15 @@ defaultOpts = Opt
, optCSL = Nothing
, optBibliography = []
, optCitationAbbreviations = Nothing
+ , optSandbox = False
}
-parseStringKey :: Node Pos -> Parser Text
-parseStringKey k = case k of
- Scalar _ (SStr t) -> return t
- Scalar _ _ -> failAtNode k "Non-string key"
- _ -> failAtNode k "Non-scalar key"
-
-yamlToMeta :: Node Pos -> Parser Meta
-yamlToMeta (Mapping _ _ m) =
- either (fail . show) return $ runEverything (yamlMap pMetaString m)
- where
- pMetaString = pure . MetaString <$> P.manyChar P.anyChar
- runEverything p =
+yamlToMeta :: Value -> Parser Meta
+yamlToMeta (Object o) =
+ either (fail . show) return $ runEverything (yamlMap pMetaString o)
+ where
+ pMetaString = pure . MetaString <$> P.manyChar P.anyChar
+ runEverything p =
runPure (P.readWithM p (def :: P.ParserState) ("" :: Text))
>>= fmap (Meta . flip P.runF def)
yamlToMeta _ = return mempty
@@ -699,14 +691,12 @@ applyDefaults :: (PandocMonad m, MonadIO m)
applyDefaults opt file = do
setVerbosity $ optVerbosity opt
modify $ \defsState -> defsState{ curDefaults = Just file }
- inp <- readFileLazy file
- case decode1 inp of
+ inp <- readFileStrict file
+ case decodeEither' inp of
Right f -> f opt
- Left (errpos, errmsg) -> throwError $
- PandocParseError $ T.pack $
- "Error parsing " ++ file ++ " line " ++
- show (posLine errpos) ++ " column " ++
- show (posColumn errpos) ++ ":\n" ++ errmsg
+ Left err' -> throwError $
+ PandocParseError
+ $ T.pack $ Data.Yaml.prettyPrintParseException err'
fullDefaultsPath :: (PandocMonad m, MonadIO m)
=> Maybe FilePath
@@ -734,14 +724,3 @@ cyclic :: Ord a => [[a]] -> Bool
cyclic = any hasDuplicate
where
hasDuplicate xs = length (ordNub xs) /= length xs
-
--- see https://github.com/jgm/pandoc/pull/4083
--- using generic deriving caused long compilation times
-$(deriveJSON
- defaultOptions{ fieldLabelModifier = drop 11 . map toLower } ''IpynbOutput)
-$(deriveJSON
- defaultOptions{ fieldLabelModifier = map toLower } ''LineEnding)
-$(deriveJSON
- defaultOptions{ fieldLabelModifier =
- camelCaseStrToHyphenated . dropWhile isLower
- } ''Opt)
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs
index 3864ab188..7b057713b 100644
--- a/src/Text/Pandoc/App/OutputSettings.hs
+++ b/src/Text/Pandoc/App/OutputSettings.hs
@@ -45,16 +45,16 @@ readUtf8File :: PandocMonad m => FilePath -> m T.Text
readUtf8File = fmap UTF8.toText . readFileStrict
-- | Settings specifying how document output should be produced.
-data OutputSettings = OutputSettings
+data OutputSettings m = OutputSettings
{ outputFormat :: T.Text
- , outputWriter :: Writer PandocIO
+ , outputWriter :: Writer m
, outputWriterName :: T.Text
, outputWriterOptions :: WriterOptions
, outputPdfProgram :: Maybe String
}
-- | Get output settings from command line options.
-optToOutputSettings :: Opt -> PandocIO OutputSettings
+optToOutputSettings :: (PandocMonad m, MonadIO m) => Opt -> m (OutputSettings m)
optToOutputSettings opts = do
let outputFile = fromMaybe "-" (optOutputFile opts)
@@ -90,12 +90,31 @@ optToOutputSettings opts = do
then writerName
else T.toLower $ baseWriterName writerName
- (writer :: Writer PandocIO, writerExts) <-
+ let makeSandboxed pureWriter =
+ let files = maybe id (:) (optReferenceDoc opts) .
+ maybe id (:) (optEpubMetadata opts) .
+ maybe id (:) (optEpubCoverImage opts) .
+ maybe id (:) (optCSL opts) .
+ maybe id (:) (optCitationAbbreviations opts) $
+ optEpubFonts opts ++
+ optBibliography opts
+ in case pureWriter of
+ TextWriter w -> TextWriter $ \o d -> sandbox files (w o d)
+ ByteStringWriter w
+ -> ByteStringWriter $ \o d -> sandbox files (w o d)
+
+
+ (writer, writerExts) <-
if ".lua" `T.isSuffixOf` format
then return (TextWriter
- (\o d -> writeCustom (T.unpack writerName) o d)
- :: Writer PandocIO, mempty)
- else getWriter (T.toLower writerName)
+ (\o d -> writeCustom (T.unpack writerName) o d), mempty)
+ else if optSandbox opts
+ then
+ case runPure (getWriter writerName) of
+ Left e -> throwError e
+ Right (w, wexts) ->
+ return (makeSandboxed w, wexts)
+ else getWriter (T.toLower writerName)
let standalone = optStandalone opts || not (isTextFormat format) || pdfOutput
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs
index 246f54516..2530ef46f 100644
--- a/src/Text/Pandoc/Citeproc.hs
+++ b/src/Text/Pandoc/Citeproc.hs
@@ -7,13 +7,13 @@
module Text.Pandoc.Citeproc
( processCitations,
getReferences,
- getStyle
)
where
import Citeproc
import Citeproc.Pandoc ()
-import Text.Pandoc.Citeproc.Locator (parseLocator)
+import Text.Pandoc.Citeproc.Locator (parseLocator, toLocatorMap,
+ LocatorInfo(..))
import Text.Pandoc.Citeproc.CslJson (cslJsonToReferences)
import Text.Pandoc.Citeproc.BibTeX (readBibtexString, Variant(..))
import Text.Pandoc.Citeproc.MetaValue (metaValueToReference, metaValueToText)
@@ -49,15 +49,16 @@ import qualified Data.Text as T
import System.FilePath (takeExtension)
import Safe (lastMay, initSafe)
-
processCitations :: PandocMonad m => Pandoc -> m Pandoc
processCitations (Pandoc meta bs) = do
style <- getStyle (Pandoc meta bs)
-
- mblang <- getLang meta
+ mblang <- getCiteprocLang meta
let locale = Citeproc.mergeLocales mblang style
- refs <- getReferences (Just locale) (Pandoc meta bs)
+ let addQuoteSpan (Quoted _ xs) = Span ("",["csl-quoted"],[]) xs
+ addQuoteSpan x = x
+ refs <- map (walk addQuoteSpan) <$>
+ getReferences (Just locale) (Pandoc meta bs)
let otherIdsMap = foldr (\ref m ->
case T.words . extractText <$>
@@ -73,7 +74,9 @@ processCitations (Pandoc meta bs) = do
let linkCites = maybe False truish $ lookupMeta "link-citations" meta
- let opts = defaultCiteprocOptions{ linkCitations = linkCites }
+ let linkBib = maybe True truish $ lookupMeta "link-bibliography" meta
+ let opts = defaultCiteprocOptions{ linkCitations = linkCites
+ , linkBibliography = linkBib }
let result = Citeproc.citeproc opts style mblang refs citations
mapM_ (report . CiteprocWarning) (resultWarnings result)
let sopts = styleOptions style
@@ -88,13 +91,11 @@ processCitations (Pandoc meta bs) = do
_ -> id) $ []
let bibs = mconcat $ map (\(ident, out) ->
B.divWith ("ref-" <> ident,["csl-entry"],[]) . B.para .
- walk (convertQuotes locale) .
insertSpace $ out)
(resultBibliography result)
let moveNotes = styleIsNoteStyle sopts &&
maybe True truish (lookupMeta "notes-after-punctuation" meta)
- let cits = map (walk (convertQuotes locale)) $
- resultCitations result
+ let cits = resultCitations result
let metanocites = lookupMeta "nocite" meta
let Pandoc meta'' bs' =
@@ -105,9 +106,13 @@ processCitations (Pandoc meta bs) = do
else id) .
evalState (walkM insertResolvedCitations $ Pandoc meta' bs)
$ cits
- return $ Pandoc meta''
- $ insertRefs refkvs classes meta''
- (walk fixLinks $ B.toList bibs) bs'
+ return $ walk removeQuoteSpan
+ $ Pandoc meta''
+ $ insertRefs refkvs classes meta'' (B.toList bibs) bs'
+
+removeQuoteSpan :: Inline -> Inline
+removeQuoteSpan (Span ("",["csl-quoted"],[]) xs) = Span nullAttr xs
+removeQuoteSpan x = x
-- | Retrieve the CSL style specified by the csl or citation-style
-- metadata field in a pandoc document, or the default CSL style
@@ -162,10 +167,9 @@ getStyle (Pandoc meta _) = do
-- Retrieve citeproc lang based on metadata.
-getLang :: PandocMonad m => Meta -> m (Maybe Lang)
-getLang meta = maybe (return Nothing) bcp47LangToIETF
- ((lookupMeta "lang" meta <|> lookupMeta "locale" meta) >>=
- metaValueToText)
+getCiteprocLang :: PandocMonad m => Meta -> m (Maybe Lang)
+getCiteprocLang meta = maybe (return Nothing) bcp47LangToIETF
+ ((lookupMeta "lang" meta <|> lookupMeta "locale" meta) >>= metaValueToText)
-- | Get references defined inline in the metadata and via an external
-- bibliography. Only references that are actually cited in the document
@@ -177,7 +181,7 @@ getReferences mblocale (Pandoc meta bs) = do
locale <- case mblocale of
Just l -> return l
Nothing -> do
- mblang <- getLang meta
+ mblang <- getCiteprocLang meta
case mblang of
Just lang -> return $ either mempty id $ getLocale lang
Nothing -> return mempty
@@ -205,8 +209,7 @@ getReferences mblocale (Pandoc meta bs) = do
Just fp -> getRefsFromBib locale idpred fp
Nothing -> return []
Nothing -> return []
- return $ map (linkifyVariables . legacyDateRanges)
- (externalRefs ++ inlineRefs)
+ return $ map legacyDateRanges (externalRefs ++ inlineRefs)
-- note that inlineRefs can override externalRefs
@@ -262,26 +265,9 @@ getRefs locale format idpred mbfp raw = do
rs <- yamlToRefs idpred
def{ readerExtensions = pandocExtensions }
(T.unpack <$> mbfp)
- (L.fromStrict raw)
+ raw
return $ mapMaybe metaValueToReference rs
--- localized quotes
-convertQuotes :: Locale -> Inline -> Inline
-convertQuotes locale (Quoted qt ils) =
- case (M.lookup openterm terms, M.lookup closeterm terms) of
- (Just ((_,oq):_), Just ((_,cq):_)) ->
- Span ("",[],[]) (Str oq : ils ++ [Str cq])
- _ -> Quoted qt ils
- where
- terms = localeTerms locale
- openterm = case qt of
- DoubleQuote -> "open-quote"
- SingleQuote -> "open-inner-quote"
- closeterm = case qt of
- DoubleQuote -> "close-quote"
- SingleQuote -> "close-inner-quote"
-convertQuotes _ x = x
-
-- assumes we walk in same order as query
insertResolvedCitations :: Inline -> State [Inlines] Inline
insertResolvedCitations (Cite cs ils) = do
@@ -290,7 +276,7 @@ insertResolvedCitations (Cite cs ils) = do
[] -> return (Cite cs ils)
(x:xs) -> do
put xs
- return $ Cite cs (walk fixLinks $ B.toList x)
+ return $ Cite cs (B.toList x)
insertResolvedCitations x = return x
getCitations :: Locale
@@ -318,17 +304,15 @@ fromPandocCitations :: Locale
-> [CitationItem Inlines]
fromPandocCitations locale otherIdsMap = concatMap go
where
+ locmap = toLocatorMap locale
go c =
- let (loclab, suffix) = parseLocator locale (citationSuffix c)
- (mblab, mbloc) = case loclab of
- Just (loc, lab) -> (Just loc, Just lab)
- Nothing -> (Nothing, Nothing)
+ let (mblocinfo, suffix) = parseLocator locmap (citationSuffix c)
cit = CitationItem
{ citationItemId = fromMaybe
(ItemId $ Pandoc.citationId c)
(M.lookup (Pandoc.citationId c) otherIdsMap)
- , citationItemLabel = mblab
- , citationItemLocator = mbloc
+ , citationItemLabel = locatorLabel <$> mblocinfo
+ , citationItemLocator = locatorLoc <$> mblocinfo
, citationItemType = NormalCite
, citationItemPrefix = case citationPrefix c of
[] -> Nothing
@@ -368,6 +352,7 @@ formatFromExtension fp = case dropWhile (== '.') $ takeExtension fp of
"bib" -> Just Format_biblatex
"json" -> Just Format_json
"yaml" -> Just Format_yaml
+ "yml" -> Just Format_yaml
_ -> Nothing
@@ -431,15 +416,6 @@ mvPunct moveNotes locale (Cite cs ils : Str "." : ys)
mvPunct moveNotes locale (x:xs) = x : mvPunct moveNotes locale xs
mvPunct _ _ [] = []
--- move https://doi.org etc. prefix inside link text (#6723):
-fixLinks :: [Inline] -> [Inline]
-fixLinks (Str t : Link attr [Str u1] (u2,tit) : xs)
- | u2 == t <> u1
- = Link attr [Str (t <> u1)] (u2,tit) : fixLinks xs
-fixLinks (x:xs) = x : fixLinks xs
-fixLinks [] = []
-
-
endWithPunct :: Bool -> [Inline] -> Bool
endWithPunct _ [] = False
endWithPunct onlyFinal xs@(_:_) =
@@ -535,29 +511,6 @@ legacyDateRanges ref =
_ -> DateVal d
go x = x
-linkifyVariables :: Reference Inlines -> Reference Inlines
-linkifyVariables ref =
- ref{ referenceVariables = M.mapWithKey go $ referenceVariables ref }
- where
- go "URL" x = tolink "https://" x
- go "DOI" x = tolink "https://doi.org/" (fixShortDOI x)
- go "ISBN" x = tolink "https://worldcat.org/isbn/" x
- go "PMID" x = tolink "https://www.ncbi.nlm.nih.gov/pubmed/" x
- go "PMCID" x = tolink "https://www.ncbi.nlm.nih.gov/pmc/articles/" x
- go _ x = x
- fixShortDOI x = let x' = extractText x
- in if "10/" `T.isPrefixOf` x'
- then TextVal $ T.drop 3 x'
- -- see https://shortdoi.org
- else TextVal x'
- tolink pref x = let x' = extractText x
- x'' = if "://" `T.isInfixOf` x'
- then x'
- else pref <> x'
- in if T.null x'
- then x
- else FancyVal (B.link x'' "" (B.str x'))
-
extractText :: Val Inlines -> Text
extractText (TextVal x) = x
extractText (FancyVal x) = toText x
@@ -590,7 +543,7 @@ deNote (Note bs) =
addParens [] = []
addParens (Cite (c:cs) ils : zs)
| citationMode c == AuthorInText
- = Cite (c:cs) (concatMap (noteAfterComma (needsPeriod zs)) ils) :
+ = Cite (c:cs) (addCommas (needsPeriod zs) ils) :
addParens zs
| otherwise
= Cite (c:cs) (concatMap noteInParens ils) : addParens zs
@@ -611,13 +564,19 @@ deNote (Note bs) =
removeFinalPeriod ils ++ [Str ")"]
noteInParens x = [x]
- noteAfterComma needsPer (Span ("",["csl-note"],[]) ils)
- | not (null ils)
- = Str "," : Space :
- if needsPer
- then ils
- else removeFinalPeriod ils
- noteAfterComma _ x = [x]
+ -- We want to add a comma before a CSL note citation, but not
+ -- before the author name, and not before the first citation
+ -- if it doesn't begin with an author name.
+ addCommas = addCommas' True -- boolean == "at beginning"
+
+ addCommas' _ _ [] = []
+ addCommas' atBeginning needsPer
+ (Span ("",["csl-note"],[]) ils : rest)
+ | not (null ils)
+ = (if atBeginning then id else ([Str "," , Space] ++)) $
+ (if needsPer then ils else removeFinalPeriod ils) ++
+ addCommas' False needsPer rest
+ addCommas' _ needsPer (il : rest) = il : addCommas' False needsPer rest
deNote x = x
diff --git a/src/Text/Pandoc/Citeproc/BibTeX.hs b/src/Text/Pandoc/Citeproc/BibTeX.hs
index c178de6e9..a8e5622ed 100644
--- a/src/Text/Pandoc/Citeproc/BibTeX.hs
+++ b/src/Text/Pandoc/Citeproc/BibTeX.hs
@@ -34,7 +34,7 @@ import Text.Pandoc.Class (runPure)
import qualified Text.Pandoc.Walk as Walk
import Citeproc.Types
import Citeproc.Pandoc ()
-import Text.Pandoc.Citeproc.Util (toIETF)
+import Text.Pandoc.Citeproc.Util (toIETF, splitStrWhen)
import Text.Pandoc.Citeproc.Data (biblatexStringMap)
import Data.Default
import Data.Text (Text)
@@ -48,13 +48,12 @@ import Control.Monad.RWS hiding ((<>))
import qualified Data.Sequence as Seq
import Data.Char (isAlphaNum, isDigit, isLetter,
isUpper, toLower, toUpper,
- isLower, isPunctuation)
+ isLower, isPunctuation, isSpace)
import Data.List (foldl', intercalate, intersperse)
import Safe (readMay)
import Text.Printf (printf)
import Text.DocLayout (literal, hsep, nest, hang, Doc(..),
braces, ($$), cr)
-
data Variant = Bibtex | Biblatex
deriving (Show, Eq, Ord)
@@ -527,9 +526,9 @@ itemToReference locale variant item = do
let fixSeriesTitle [Str xs] | isNumber xs =
[Str (ordinalize locale xs), Space, Str (resolveKey' lang "jourser")]
fixSeriesTitle xs = xs
- seriesTitle' <- (Just . B.fromList . fixSeriesTitle .
- B.toList . resolveKey lang <$>
- getTitle "series") <|>
+
+ seriesTitle' <- (Just . B.fromList . fixSeriesTitle . B.toList
+ <$> getTitle "series") <|>
return Nothing
shortTitle' <- (Just <$> (guard (not hasMaintitle || isChapterlike) >>
getTitle "shorttitle"))
@@ -805,30 +804,34 @@ bibEntries = do
skipMany nonEntry
many (bibItem <* skipMany nonEntry)
where nonEntry = bibSkip <|>
+ comment <|>
try (char '@' >>
(bibComment <|> bibPreamble <|> bibString))
bibSkip :: BibParser ()
-bibSkip = skipMany1 (satisfy (/='@'))
+bibSkip = skipMany1 (satisfy (\c -> c /='@' && c /='%'))
+
+comment :: BibParser ()
+comment = char '%' *> void anyLine
bibComment :: BibParser ()
bibComment = do
cistring "comment"
- spaces
+ spaces'
void inBraces <|> bibSkip <|> return ()
bibPreamble :: BibParser ()
bibPreamble = do
cistring "preamble"
- spaces
+ spaces'
void inBraces
bibString :: BibParser ()
bibString = do
cistring "string"
- spaces
+ spaces'
char '{'
- spaces
+ spaces'
(k,v) <- entField
char '}'
updateState (\(l,m) -> (l, Map.insert k v m))
@@ -842,9 +845,9 @@ inBraces = do
char '{'
res <- manyTill
( take1WhileP (\c -> c /= '{' && c /= '}' && c /= '\\')
- <|> (char '\\' >> ( (char '{' >> return "\\{")
- <|> (char '}' >> return "\\}")
- <|> return "\\"))
+ <|> (char '\\' >> (do c <- oneOf "{}"
+ return $ T.pack ['\\',c])
+ <|> return "\\")
<|> (braced <$> inBraces)
) (char '}')
return $ T.concat res
@@ -856,8 +859,9 @@ inQuotes :: BibParser Text
inQuotes = do
char '"'
T.concat <$> manyTill
- ( take1WhileP (\c -> c /= '{' && c /= '"' && c /= '\\')
+ ( take1WhileP (\c -> c /= '{' && c /= '"' && c /= '\\' && c /= '%')
<|> (char '\\' >> T.cons '\\' . T.singleton <$> anyChar)
+ <|> ("" <$ (char '%' >> anyLine))
<|> braced <$> inBraces
) (char '"')
@@ -870,32 +874,35 @@ isBibtexKeyChar :: Char -> Bool
isBibtexKeyChar c =
isAlphaNum c || c `elem` (".:;?!`'()$/*@_+=-[]*&" :: [Char])
+spaces' :: BibParser ()
+spaces' = skipMany (void (satisfy isSpace) <|> comment)
+
bibItem :: BibParser Item
bibItem = do
char '@'
pos <- getPosition
enttype <- T.toLower <$> take1WhileP isLetter
- spaces
+ spaces'
char '{'
- spaces
+ spaces'
entid <- take1WhileP isBibtexKeyChar
- spaces
+ spaces'
char ','
- spaces
- entfields <- entField `sepEndBy` (char ',' >> spaces)
- spaces
+ spaces'
+ entfields <- entField `sepEndBy` (char ',' >> spaces')
+ spaces'
char '}'
return $ Item entid pos enttype (Map.fromList entfields)
entField :: BibParser (Text, Text)
entField = do
k <- fieldName
- spaces
+ spaces'
char '='
- spaces
+ spaces'
vs <- (expandString <|> inQuotes <|> inBraces <|> rawWord) `sepBy`
- try (spaces >> char '#' >> spaces)
- spaces
+ try (spaces' >> char '#' >> spaces')
+ spaces'
return (k, T.concat vs)
resolveAlias :: Text -> Text
@@ -984,8 +991,12 @@ getTitle f = do
ils <- getField f
utc <- gets untitlecase
lang <- gets localeLang
+ let ils' =
+ if f == "series"
+ then resolveKey lang ils
+ else ils
let processTitle = if utc then unTitlecase (Just lang) else id
- return $ processTitle ils
+ return $ processTitle ils'
getShortTitle :: Bool -> Text -> Bib (Maybe Inlines)
getShortTitle requireColon f = do
@@ -1253,20 +1264,6 @@ toName opts ils = do
, nameStaticOrdering = False
}
-splitStrWhen :: (Char -> Bool) -> [Inline] -> [Inline]
-splitStrWhen _ [] = []
-splitStrWhen p (Str xs : ys) = map Str (go xs) ++ splitStrWhen p ys
- where go s =
- let (w,z) = T.break p s
- in if T.null z
- then if T.null w
- then []
- else [w]
- else if T.null w
- then (T.take 1 z : go (T.drop 1 z))
- else (w : T.take 1 z : go (T.drop 1 z))
-splitStrWhen p (x : ys) = x : splitStrWhen p ys
-
ordinalize :: Locale -> Text -> Text
ordinalize locale n =
let terms = localeTerms locale
@@ -1460,14 +1457,14 @@ bookTrans z =
_ -> [z]
resolveKey :: Lang -> Inlines -> Inlines
-resolveKey lang ils = Walk.walk go ils
+resolveKey lang (Many ils) = Many $ fmap go ils
where go (Str s) = Str $ resolveKey' lang s
go x = x
resolveKey' :: Lang -> Text -> Text
resolveKey' lang k =
case Map.lookup (langLanguage lang) biblatexStringMap >>=
- Map.lookup (T.toLower k) of
+ Map.lookup k of
Nothing -> k
Just (x, _) -> either (const k) stringify $ parseLaTeX lang x
diff --git a/src/Text/Pandoc/Citeproc/CslJson.hs b/src/Text/Pandoc/Citeproc/CslJson.hs
index 862af5188..43c1a87ec 100644
--- a/src/Text/Pandoc/Citeproc/CslJson.hs
+++ b/src/Text/Pandoc/Citeproc/CslJson.hs
@@ -28,6 +28,7 @@ fromCslJson (CslSub x) = B.subscript (fromCslJson x)
fromCslJson (CslSup x) = B.superscript (fromCslJson x)
fromCslJson (CslNoCase x) = B.spanWith ("",["nocase"],[]) (fromCslJson x)
fromCslJson (CslDiv t x) = B.spanWith ("",["csl-" <> t],[]) (fromCslJson x)
+fromCslJson (CslLink u x) = B.link u "" (fromCslJson x)
cslJsonToReferences :: ByteString -> Either String [Reference Inlines]
cslJsonToReferences raw =
diff --git a/src/Text/Pandoc/Citeproc/Locator.hs b/src/Text/Pandoc/Citeproc/Locator.hs
index f8931d7b5..0b8f79922 100644
--- a/src/Text/Pandoc/Citeproc/Locator.hs
+++ b/src/Text/Pandoc/Citeproc/Locator.hs
@@ -2,9 +2,13 @@
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
module Text.Pandoc.Citeproc.Locator
- ( parseLocator )
+ ( parseLocator
+ , toLocatorMap
+ , LocatorInfo(..)
+ , LocatorMap(..) )
where
import Citeproc.Types
+import Text.Pandoc.Citeproc.Util (splitStrWhen)
import Data.Text (Text)
import qualified Data.Text as T
import Data.List (foldl')
@@ -16,9 +20,17 @@ import Control.Monad (mzero)
import qualified Data.Map as M
import Data.Char (isSpace, isPunctuation, isDigit)
-parseLocator :: Locale -> [Inline] -> (Maybe (Text, Text), [Inline])
-parseLocator locale inp =
- case parse (pLocatorWords (toLocatorMap locale)) "suffix" $ splitInp inp of
+
+data LocatorInfo =
+ LocatorInfo{ locatorRaw :: Text
+ , locatorLabel :: Text
+ , locatorLoc :: Text
+ }
+ deriving (Show)
+
+parseLocator :: LocatorMap -> [Inline] -> (Maybe LocatorInfo, [Inline])
+parseLocator locmap inp =
+ case parse (pLocatorWords locmap) "suffix" $ splitInp inp of
Right r -> r
Left _ -> (Nothing, maybeAddComma inp)
@@ -32,18 +44,16 @@ splitInp = splitStrWhen (\c -> isSpace c || (isPunctuation c && c /= ':'))
type LocatorParser = Parsec [Inline] ()
pLocatorWords :: LocatorMap
- -> LocatorParser (Maybe (Text, Text), [Inline])
+ -> LocatorParser (Maybe LocatorInfo, [Inline])
pLocatorWords locMap = do
optional $ pMatchChar "," (== ',')
optional pSpace
- (la, lo) <- pLocatorDelimited locMap <|> pLocatorIntegrated locMap
+ info <- pLocatorDelimited locMap <|> pLocatorIntegrated locMap
s <- getInput -- rest is suffix
- -- need to trim, otherwise "p. 9" and "9" will have 'different' locators later on
- -- i.e. the first one will be " 9"
return $
- if T.null la && T.null lo
+ if T.null (locatorLabel info) && T.null (locatorLoc info)
then (Nothing, maybeAddComma s)
- else (Just (la, T.strip lo), s)
+ else (Just info, s)
maybeAddComma :: [Inline] -> [Inline]
maybeAddComma [] = []
@@ -53,28 +63,30 @@ maybeAddComma ils@(Str t : _)
, isPunctuation c = ils
maybeAddComma ils = Str "," : Space : ils
-pLocatorDelimited :: LocatorMap -> LocatorParser (Text, Text)
+pLocatorDelimited :: LocatorMap -> LocatorParser LocatorInfo
pLocatorDelimited locMap = try $ do
_ <- pMatchChar "{" (== '{')
skipMany pSpace -- gobble pre-spaces so label doesn't try to include them
- (la, _) <- pLocatorLabelDelimited locMap
+ (rawlab, la, _) <- pLocatorLabelDelimited locMap
-- we only care about balancing {} and [] (because of the outer [] scope);
-- the rest can be anything
let inner = do { t <- anyToken; return (True, stringify t) }
gs <- many (pBalancedBraces [('{','}'), ('[',']')] inner)
_ <- pMatchChar "}" (== '}')
let lo = T.concat $ map snd gs
- return (la, lo)
+ return $ LocatorInfo{ locatorLoc = lo,
+ locatorLabel = la,
+ locatorRaw = rawlab <> "{" <> lo <> "}" }
-pLocatorLabelDelimited :: LocatorMap -> LocatorParser (Text, Bool)
+pLocatorLabelDelimited :: LocatorMap -> LocatorParser (Text, Text, Bool)
pLocatorLabelDelimited locMap
- = pLocatorLabel' locMap lim <|> return ("page", True)
+ = pLocatorLabel' locMap lim <|> return ("", "page", True)
where
lim = stringify <$> anyToken
-pLocatorIntegrated :: LocatorMap -> LocatorParser (Text, Text)
+pLocatorIntegrated :: LocatorMap -> LocatorParser LocatorInfo
pLocatorIntegrated locMap = try $ do
- (la, wasImplicit) <- pLocatorLabelIntegrated locMap
+ (rawlab, la, wasImplicit) <- pLocatorLabelIntegrated locMap
-- if we got the label implicitly, we have presupposed the first one is
-- going to have a digit, so guarantee that. You _can_ have p. (a)
-- because you specified it.
@@ -84,17 +96,20 @@ pLocatorIntegrated locMap = try $ do
g <- try $ pLocatorWordIntegrated (not wasImplicit) >>= modifier
gs <- many (try $ pLocatorWordIntegrated False >>= modifier)
let lo = T.concat (g:gs)
- return (la, lo)
+ return $ LocatorInfo{ locatorLabel = la,
+ locatorLoc = lo,
+ locatorRaw = rawlab <> lo }
-pLocatorLabelIntegrated :: LocatorMap -> LocatorParser (Text, Bool)
+pLocatorLabelIntegrated :: LocatorMap -> LocatorParser (Text, Text, Bool)
pLocatorLabelIntegrated locMap
- = pLocatorLabel' locMap lim <|> (lookAhead digital >> return ("page", True))
+ = pLocatorLabel' locMap lim <|>
+ (lookAhead digital >> return ("", "page", True))
where
lim = try $ pLocatorWordIntegrated True >>= requireRomansOrDigits
digital = try $ pLocatorWordIntegrated True >>= requireDigits
pLocatorLabel' :: LocatorMap -> LocatorParser Text
- -> LocatorParser (Text, Bool)
+ -> LocatorParser (Text, Text, Bool)
pLocatorLabel' locMap lim = go ""
where
-- grow the match string until we hit the end
@@ -105,9 +120,9 @@ pLocatorLabel' locMap lim = go ""
t <- anyToken
ts <- manyTill anyToken (try $ lookAhead lim)
let s = acc <> stringify (t:ts)
- case M.lookup (T.toCaseFold $ T.strip s) locMap of
+ case M.lookup (T.toCaseFold $ T.strip s) (unLocatorMap locMap) of
-- try to find a longer one, or return this one
- Just l -> go s <|> return (l, False)
+ Just l -> go s <|> return (s, l, False)
Nothing -> go s
-- hard requirement for a locator to have some real digits in it
@@ -247,27 +262,16 @@ isLocatorSep ',' = True
isLocatorSep ';' = True
isLocatorSep _ = False
-splitStrWhen :: (Char -> Bool) -> [Inline] -> [Inline]
-splitStrWhen _ [] = []
-splitStrWhen p (Str xs : ys) = go (T.unpack xs) ++ splitStrWhen p ys
- where
- go [] = []
- go s = case break p s of
- ([],[]) -> []
- (zs,[]) -> [Str $ T.pack zs]
- ([],w:ws) -> Str (T.singleton w) : go ws
- (zs,w:ws) -> Str (T.pack zs) : Str (T.singleton w) : go ws
-splitStrWhen p (x : ys) = x : splitStrWhen p ys
-
--
-- Locator Map
--
-type LocatorMap = M.Map Text Text
+newtype LocatorMap = LocatorMap { unLocatorMap :: M.Map Text Text }
+ deriving (Show)
toLocatorMap :: Locale -> LocatorMap
toLocatorMap locale =
- foldr go mempty locatorTerms
+ LocatorMap $ foldr go mempty locatorTerms
where
go tname locmap =
case M.lookup tname (localeTerms locale) of
diff --git a/src/Text/Pandoc/Citeproc/Util.hs b/src/Text/Pandoc/Citeproc/Util.hs
index 6d8e01bc9..8bffc0f32 100644
--- a/src/Text/Pandoc/Citeproc/Util.hs
+++ b/src/Text/Pandoc/Citeproc/Util.hs
@@ -1,9 +1,21 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Text.Pandoc.Citeproc.Util
- ( toIETF )
+ ( splitStrWhen
+ , toIETF )
where
+import qualified Data.Text as T
import Data.Text (Text)
+import Text.Pandoc.Definition
+
+-- Split Str elements so that characters satisfying the
+-- predicate each have their own Str.
+splitStrWhen :: (Char -> Bool) -> [Inline] -> [Inline]
+splitStrWhen p = foldr go []
+ where
+ go (Str t) = (map Str (T.groupBy goesTogether t) ++)
+ go x = (x :)
+ goesTogether c d = not (p c || p d)
toIETF :: Text -> Text
toIETF "english" = "en-US" -- "en-EN" unavailable in CSL
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs
index 2f28ac4dd..6394df251 100644
--- a/src/Text/Pandoc/Class.hs
+++ b/src/Text/Pandoc/Class.hs
@@ -19,6 +19,7 @@ module Text.Pandoc.Class
, module Text.Pandoc.Class.PandocIO
, module Text.Pandoc.Class.PandocMonad
, module Text.Pandoc.Class.PandocPure
+ , module Text.Pandoc.Class.Sandbox
, Translations
) where
@@ -27,3 +28,4 @@ import Text.Pandoc.Class.PandocMonad
import Text.Pandoc.Class.PandocIO
import Text.Pandoc.Class.PandocPure
import Text.Pandoc.Translations (Translations)
+import Text.Pandoc.Class.Sandbox
diff --git a/src/Text/Pandoc/Class/IO.hs b/src/Text/Pandoc/Class/IO.hs
index f4cfc8682..305f07a01 100644
--- a/src/Text/Pandoc/Class/IO.hs
+++ b/src/Text/Pandoc/Class/IO.hs
@@ -30,6 +30,7 @@ module Text.Pandoc.Class.IO
, openURL
, readFileLazy
, readFileStrict
+ , readStdinStrict
, extractMedia
) where
@@ -158,6 +159,11 @@ readFileLazy s = liftIOError BL.readFile s
readFileStrict :: (PandocMonad m, MonadIO m) => FilePath -> m B.ByteString
readFileStrict s = liftIOError B.readFile s
+-- | Read the strict ByteString contents from stdin, raising
+-- an error on failure.
+readStdinStrict :: (PandocMonad m, MonadIO m) => m B.ByteString
+readStdinStrict = liftIOError (const B.getContents) "stdin"
+
-- | Return a list of paths that match a glob, relative to the working
-- directory. See 'System.FilePath.Glob' for the glob syntax.
glob :: (PandocMonad m, MonadIO m) => String -> m [FilePath]
diff --git a/src/Text/Pandoc/Class/PandocIO.hs b/src/Text/Pandoc/Class/PandocIO.hs
index 63cb94155..61ee1f1c6 100644
--- a/src/Text/Pandoc/Class/PandocIO.hs
+++ b/src/Text/Pandoc/Class/PandocIO.hs
@@ -29,6 +29,7 @@ import Text.Pandoc.Class.PandocMonad
import Text.Pandoc.Definition
import Text.Pandoc.Error
import qualified Text.Pandoc.Class.IO as IO
+import Control.Monad.Catch (MonadCatch, MonadMask, MonadThrow)
-- | Evaluate a 'PandocIO' operation.
runIO :: PandocIO a -> IO (Either PandocError a)
@@ -45,6 +46,9 @@ newtype PandocIO a = PandocIO {
, Functor
, Applicative
, Monad
+ , MonadCatch
+ , MonadMask
+ , MonadThrow
, MonadError PandocError
)
@@ -58,6 +62,7 @@ instance PandocMonad PandocIO where
openURL = IO.openURL
readFileLazy = IO.readFileLazy
readFileStrict = IO.readFileStrict
+ readStdinStrict = IO.readStdinStrict
glob = IO.glob
fileExists = IO.fileExists
@@ -70,5 +75,5 @@ instance PandocMonad PandocIO where
logOutput = IO.logOutput
-- | Extract media from the mediabag into a directory.
-extractMedia :: FilePath -> Pandoc -> PandocIO Pandoc
+extractMedia :: (PandocMonad m, MonadIO m) => FilePath -> Pandoc -> m Pandoc
extractMedia = IO.extractMedia
diff --git a/src/Text/Pandoc/Class/PandocMonad.hs b/src/Text/Pandoc/Class/PandocMonad.hs
index 439aec071..c15ce6444 100644
--- a/src/Text/Pandoc/Class/PandocMonad.hs
+++ b/src/Text/Pandoc/Class/PandocMonad.hs
@@ -117,6 +117,9 @@ class (Functor m, Applicative m, Monad m, MonadError PandocError m)
-- | Read the strict ByteString contents from a file path,
-- raising an error on failure.
readFileStrict :: FilePath -> m B.ByteString
+ -- | Read the contents of stdin as a strict ByteString, raising
+ -- an error on failure.
+ readStdinStrict :: m B.ByteString
-- | Return a list of paths that match a glob, relative to
-- the working directory. See 'System.FilePath.Glob' for
-- the glob syntax.
@@ -451,7 +454,7 @@ getDefaultReferenceDocx = do
"word/theme/theme1.xml"]
let toLazy = BL.fromChunks . (:[])
let pathToEntry path = do
- epochtime <- floor . utcTimeToPOSIXSeconds <$> getCurrentTime
+ epochtime <- floor . utcTimeToPOSIXSeconds <$> getTimestamp
contents <- toLazy <$> readDataFile ("docx/" ++ path)
return $ toEntry path epochtime contents
datadir <- getUserDataDir
@@ -674,6 +677,7 @@ instance (MonadTrans t, PandocMonad m, Functor (t m),
openURL = lift . openURL
readFileLazy = lift . readFileLazy
readFileStrict = lift . readFileStrict
+ readStdinStrict = lift readStdinStrict
glob = lift . glob
fileExists = lift . fileExists
getDataFileName = lift . getDataFileName
@@ -691,6 +695,7 @@ instance {-# OVERLAPS #-} PandocMonad m => PandocMonad (ParsecT s st m) where
openURL = lift . openURL
readFileLazy = lift . readFileLazy
readFileStrict = lift . readFileStrict
+ readStdinStrict = lift readStdinStrict
glob = lift . glob
fileExists = lift . fileExists
getDataFileName = lift . getDataFileName
diff --git a/src/Text/Pandoc/Class/PandocPure.hs b/src/Text/Pandoc/Class/PandocPure.hs
index 23c941839..290a6d97c 100644
--- a/src/Text/Pandoc/Class/PandocPure.hs
+++ b/src/Text/Pandoc/Class/PandocPure.hs
@@ -64,6 +64,7 @@ data PureState = PureState
, stReferencePptx :: Archive
, stReferenceODT :: Archive
, stFiles :: FileTree
+ , stStdin :: B.ByteString
, stUserDataFiles :: FileTree
, stCabalDataFiles :: FileTree
}
@@ -80,6 +81,7 @@ instance Default PureState where
, stReferencePptx = emptyArchive
, stReferenceODT = emptyArchive
, stFiles = mempty
+ , stStdin = mempty
, stUserDataFiles = mempty
, stCabalDataFiles = mempty
}
@@ -193,6 +195,8 @@ instance PandocMonad PandocPure where
Just bs -> return bs
Nothing -> throwError $ PandocResourceNotFound $ T.pack fp
+ readStdinStrict = getsPureState stStdin
+
glob s = do
FileTree ftmap <- getsPureState stFiles
return $ filter (match (compile s)) $ M.keys ftmap
diff --git a/src/Text/Pandoc/Class/Sandbox.hs b/src/Text/Pandoc/Class/Sandbox.hs
new file mode 100644
index 000000000..8bc0f1e77
--- /dev/null
+++ b/src/Text/Pandoc/Class/Sandbox.hs
@@ -0,0 +1,50 @@
+{- |
+Module : Text.Pandoc.Class.Sandbox
+Copyright : Copyright (C) 2021 John MacFarlane
+License : GNU GPL, version 2 or above
+
+Maintainer : John MacFarlane (<jgm@berkeley.edu>)
+Stability : alpha
+Portability : portable
+
+This module provides a way to run PandocMonad actions in a sandbox
+(pure context, with no IO allowed and access only to designated files).
+-}
+
+module Text.Pandoc.Class.Sandbox
+ ( sandbox )
+where
+
+import Control.Monad (foldM)
+import Control.Monad.Except (throwError)
+import Control.Monad.IO.Class (MonadIO (liftIO))
+import Text.Pandoc.Class.PandocMonad
+import Text.Pandoc.Class.PandocPure
+import Text.Pandoc.Class.CommonState (CommonState(..))
+import Text.Pandoc.Logging (messageVerbosity)
+
+-- | Lift a PandocPure action into any instance of PandocMonad.
+-- The main computation is done purely, but CommonState is preserved
+-- continuously, and warnings are emitted after the action completes.
+-- The parameter is a list of FilePaths which will be added to the
+-- ersatz file system and be available for reading.
+sandbox :: (PandocMonad m, MonadIO m) => [FilePath] -> PandocPure a -> m a
+sandbox files action = do
+ oldState <- getCommonState
+ tree <- liftIO $ foldM addToFileTree mempty files
+ case runPure (do putCommonState oldState
+ modifyPureState $ \ps -> ps{ stFiles = tree }
+ result <- action
+ st <- getCommonState
+ return (st, result)) of
+ Left e -> throwError e
+ Right (st, result) -> do
+ putCommonState st
+ let verbosity = stVerbosity st
+ -- emit warnings, since these are not printed in runPure
+ let newMessages = reverse $ take
+ (length (stLog st) - length (stLog oldState)) (stLog st)
+ mapM_ logOutput
+ (filter ((<= verbosity) . messageVerbosity) newMessages)
+ return result
+
diff --git a/src/Text/Pandoc/Error.hs b/src/Text/Pandoc/Error.hs
index 9dee8356b..f16ad2997 100644
--- a/src/Text/Pandoc/Error.hs
+++ b/src/Text/Pandoc/Error.hs
@@ -171,34 +171,34 @@ handleError (Left e) =
exitCode =
case e of
PandocIOError{} -> 1
+ PandocFailOnWarningError{} -> 3
+ PandocAppError{} -> 4
+ PandocTemplateError{} -> 5
+ PandocOptionError{} -> 6
+ PandocUnknownReaderError{} -> 21
+ PandocUnknownWriterError{} -> 22
+ PandocUnsupportedExtensionError{} -> 23
+ PandocCiteprocError{} -> 24
+ PandocBibliographyError{} -> 25
+ PandocEpubSubdirectoryError{} -> 31
+ PandocPDFError{} -> 43
+ PandocXMLError{} -> 44
+ PandocPDFProgramNotFoundError{} -> 47
PandocHttpError{} -> 61
PandocShouldNeverHappenError{} -> 62
PandocSomeError{} -> 63
PandocParseError{} -> 64
PandocParsecError{} -> 65
PandocMakePDFError{} -> 66
- PandocOptionError{} -> 6
PandocSyntaxMapError{} -> 67
- PandocFailOnWarningError{} -> 3
- PandocPDFProgramNotFoundError{} -> 47
- PandocPDFError{} -> 43
- PandocXMLError{} -> 44
PandocFilterError{} -> 83
PandocLuaError{} -> 84
- PandocCouldNotFindDataFileError{} -> 97
- PandocResourceNotFound{} -> 99
- PandocTemplateError{} -> 5
- PandocAppError{} -> 4
- PandocEpubSubdirectoryError{} -> 31
PandocMacroLoop{} -> 91
PandocUTF8DecodingError{} -> 92
PandocIpynbDecodingError{} -> 93
PandocUnsupportedCharsetError{} -> 94
- PandocUnknownReaderError{} -> 21
- PandocUnknownWriterError{} -> 22
- PandocUnsupportedExtensionError{} -> 23
- PandocCiteprocError{} -> 24
- PandocBibliographyError{} -> 25
+ PandocCouldNotFindDataFileError{} -> 97
+ PandocResourceNotFound{} -> 99
err :: Int -> Text -> IO a
err exitCode msg = do
diff --git a/src/Text/Pandoc/Extensions.hs b/src/Text/Pandoc/Extensions.hs
index 9c55d0a7a..33f615740 100644
--- a/src/Text/Pandoc/Extensions.hs
+++ b/src/Text/Pandoc/Extensions.hs
@@ -40,31 +40,8 @@ import Data.Typeable (Typeable)
import GHC.Generics (Generic)
import Safe (readMay)
import Text.Parsec
-import Data.Aeson.TH (deriveJSON, defaultOptions)
-
-newtype Extensions = Extensions Integer
- deriving (Show, Read, Eq, Ord, Data, Typeable, Generic)
-
-instance Semigroup Extensions where
- (Extensions a) <> (Extensions b) = Extensions (a .|. b)
-instance Monoid Extensions where
- mempty = Extensions 0
- mappend = (<>)
-
-extensionsFromList :: [Extension] -> Extensions
-extensionsFromList = foldr enableExtension emptyExtensions
-
-emptyExtensions :: Extensions
-emptyExtensions = Extensions 0
-
-extensionEnabled :: Extension -> Extensions -> Bool
-extensionEnabled x (Extensions exts) = testBit exts (fromEnum x)
-
-enableExtension :: Extension -> Extensions -> Extensions
-enableExtension x (Extensions exts) = Extensions (setBit exts (fromEnum x))
-
-disableExtension :: Extension -> Extensions -> Extensions
-disableExtension x (Extensions exts) = Extensions (clearBit exts (fromEnum x))
+import Data.Aeson.TH (deriveJSON)
+import Data.Aeson
-- | Individually selectable syntax extensions.
data Extension =
@@ -74,6 +51,7 @@ data Extension =
| Ext_angle_brackets_escapable -- ^ Make < and > escapable
| Ext_ascii_identifiers -- ^ ascii-only identifiers for headers;
-- presupposes Ext_auto_identifiers
+ | Ext_attributes -- ^ Generic attribute syntax
| Ext_auto_identifiers -- ^ Automatic identifiers for headers
| Ext_autolink_bare_uris -- ^ Make all absolute URIs into links
| Ext_backtick_code_blocks -- ^ GitHub style ``` code blocks
@@ -105,6 +83,7 @@ data Extension =
-- header identifiers; presupposes
-- Ext_auto_identifiers
| Ext_grid_tables -- ^ Grid tables (pandoc, reST)
+ | Ext_gutenberg -- ^ Use Project Gutenberg conventions for plain
| Ext_hard_line_breaks -- ^ All newlines become hard line breaks
| Ext_header_attributes -- ^ Explicit header attributes {#id .class k=v}
| Ext_ignore_line_breaks -- ^ Newlines in paragraphs are ignored
@@ -138,9 +117,11 @@ data Extension =
| Ext_raw_markdown -- ^ Parse markdown in ipynb as raw markdown
| Ext_rebase_relative_paths -- ^ Rebase relative image and link paths,
-- relative to directory of containing file
+ | Ext_short_subsuperscripts -- ^ sub-&superscripts w/o closing char (v~i)
| Ext_shortcut_reference_links -- ^ Shortcut reference links
| Ext_simple_tables -- ^ Pandoc-style simple tables
| Ext_smart -- ^ "Smart" quotes, apostrophes, ellipses, dashes
+ | Ext_sourcepos -- ^ Include source position attributes
| Ext_space_in_atx_header -- ^ Require space between # and header text
| Ext_spaced_reference_links -- ^ Allow space between two parts of ref link
| Ext_startnum -- ^ Make start number of ordered list significant
@@ -156,11 +137,42 @@ data Extension =
| Ext_xrefs_name -- ^ Use xrefs with names
| Ext_xrefs_number -- ^ Use xrefs with numbers
| Ext_yaml_metadata_block -- ^ YAML metadata block
- | Ext_gutenberg -- ^ Use Project Gutenberg conventions for plain
- | Ext_attributes -- ^ Generic attribute syntax
- | Ext_sourcepos -- ^ Include source position attributes
deriving (Show, Read, Enum, Eq, Ord, Bounded, Data, Typeable, Generic)
+$(deriveJSON defaultOptions{ constructorTagModifier = drop 4 } ''Extension)
+
+newtype Extensions = Extensions Integer
+ deriving (Show, Read, Eq, Ord, Data, Typeable, Generic)
+
+instance Semigroup Extensions where
+ (Extensions a) <> (Extensions b) = Extensions (a .|. b)
+instance Monoid Extensions where
+ mempty = Extensions 0
+ mappend = (<>)
+
+instance FromJSON Extensions where
+ parseJSON =
+ return . foldr enableExtension emptyExtensions . fromJSON
+
+instance ToJSON Extensions where
+ toJSON exts = toJSON $
+ [ext | ext <- [minBound..maxBound], extensionEnabled ext exts]
+
+extensionsFromList :: [Extension] -> Extensions
+extensionsFromList = foldr enableExtension emptyExtensions
+
+emptyExtensions :: Extensions
+emptyExtensions = Extensions 0
+
+extensionEnabled :: Extension -> Extensions -> Bool
+extensionEnabled x (Extensions exts) = testBit exts (fromEnum x)
+
+enableExtension :: Extension -> Extensions -> Extensions
+enableExtension x (Extensions exts) = Extensions (setBit exts (fromEnum x))
+
+disableExtension :: Extension -> Extensions -> Extensions
+disableExtension x (Extensions exts) = Extensions (clearBit exts (fromEnum x))
+
-- | Extensions to be used with pandoc-flavored markdown.
pandocExtensions :: Extensions
pandocExtensions = extensionsFromList
@@ -286,14 +298,9 @@ multimarkdownExtensions = extensionsFromList
, Ext_auto_identifiers
, Ext_mmd_header_identifiers
, Ext_implicit_figures
- -- Note: MMD's syntax for superscripts and subscripts
- -- is a bit more permissive than pandoc's, allowing
- -- e^2 and a~1 instead of e^2^ and a~1~, so even with
- -- these options we don't have full support for MMD
- -- superscripts and subscripts, but there's no reason
- -- not to include these:
- , Ext_superscript
+ , Ext_short_subsuperscripts
, Ext_subscript
+ , Ext_superscript
, Ext_backtick_code_blocks
, Ext_spaced_reference_links
-- So far only in dev version of mmd:
@@ -357,6 +364,7 @@ getDefaultExtensions "gfm" = extensionsFromList
, Ext_task_lists
, Ext_emoji
, Ext_yaml_metadata_block
+ , Ext_footnotes
]
getDefaultExtensions "commonmark" = extensionsFromList
[Ext_raw_html]
@@ -424,6 +432,8 @@ getDefaultExtensions "jats_archiving" = getDefaultExtensions "jats"
getDefaultExtensions "jats_publishing" = getDefaultExtensions "jats"
getDefaultExtensions "jats_articleauthoring" = getDefaultExtensions "jats"
getDefaultExtensions "opml" = pandocExtensions -- affects notes
+getDefaultExtensions "markua" = extensionsFromList
+ []
getDefaultExtensions _ = extensionsFromList
[Ext_auto_identifiers]
@@ -464,6 +474,7 @@ getAllExtensions f = universalExtensions <> getAll f
, Ext_gutenberg
, Ext_smart
, Ext_literate_haskell
+ , Ext_short_subsuperscripts
, Ext_rebase_relative_paths
]
getAll "markdown_strict" = allMarkdownExtensions
@@ -475,6 +486,7 @@ getAllExtensions f = universalExtensions <> getAll f
[ Ext_raw_markdown ]
getAll "docx" = autoIdExtensions <> extensionsFromList
[ Ext_empty_paragraphs
+ , Ext_native_numbering
, Ext_styles
]
getAll "opendocument" = extensionsFromList
@@ -619,5 +631,3 @@ parseFormatSpec = parse formatSpec ""
'+' -> (ext : extsToEnable, extsToDisable)
_ -> (extsToEnable, ext : extsToDisable)
-$(deriveJSON defaultOptions ''Extension)
-$(deriveJSON defaultOptions ''Extensions)
diff --git a/src/Text/Pandoc/Filter.hs b/src/Text/Pandoc/Filter.hs
index 1209ceeb7..84015ed92 100644
--- a/src/Text/Pandoc/Filter.hs
+++ b/src/Text/Pandoc/Filter.hs
@@ -19,10 +19,9 @@ module Text.Pandoc.Filter
) where
import System.CPUTime (getCPUTime)
-import Data.Aeson.TH (deriveJSON, defaultOptions)
+import Data.Aeson
import GHC.Generics (Generic)
-import Text.Pandoc.Class.PandocIO (PandocIO)
-import Text.Pandoc.Class.PandocMonad (report, getVerbosity)
+import Text.Pandoc.Class (report, getVerbosity, PandocMonad)
import Text.Pandoc.Definition (Pandoc)
import Text.Pandoc.Options (ReaderOptions)
import Text.Pandoc.Logging
@@ -30,7 +29,6 @@ import Text.Pandoc.Citeproc (processCitations)
import qualified Text.Pandoc.Filter.JSON as JSONFilter
import qualified Text.Pandoc.Filter.Lua as LuaFilter
import qualified Text.Pandoc.Filter.Path as Path
-import Data.YAML
import qualified Data.Text as T
import System.FilePath (takeExtension)
import Control.Applicative ((<|>))
@@ -43,9 +41,9 @@ data Filter = LuaFilter FilePath
| CiteprocFilter -- built-in citeproc
deriving (Show, Generic)
-instance FromYAML Filter where
- parseYAML node =
- (withMap "Filter" $ \m -> do
+instance FromJSON Filter where
+ parseJSON node =
+ (withObject "Filter" $ \m -> do
ty <- m .: "type"
fp <- m .:? "path"
let missingPath = fail $ "Expected 'path' for filter of type " ++ show ty
@@ -56,7 +54,7 @@ instance FromYAML Filter where
"json" -> filterWithPath JSONFilter fp
_ -> fail $ "Unknown filter type " ++ show (ty :: T.Text)) node
<|>
- (withStr "Filter" $ \t -> do
+ (withText "Filter" $ \t -> do
let fp = T.unpack t
if fp == "citeproc"
then return CiteprocFilter
@@ -65,12 +63,20 @@ instance FromYAML Filter where
".lua" -> LuaFilter fp
_ -> JSONFilter fp) node
+instance ToJSON Filter where
+ toJSON CiteprocFilter = object [ "type" .= String "citeproc" ]
+ toJSON (LuaFilter fp) = object [ "type" .= String "lua",
+ "path" .= String (T.pack fp) ]
+ toJSON (JSONFilter fp) = object [ "type" .= String "json",
+ "path" .= String (T.pack fp) ]
+
-- | Modify the given document using a filter.
-applyFilters :: ReaderOptions
+applyFilters :: (PandocMonad m, MonadIO m)
+ => ReaderOptions
-> [Filter]
-> [String]
-> Pandoc
- -> PandocIO Pandoc
+ -> m Pandoc
applyFilters ropts filters args d = do
expandedFilters <- mapM expandFilterPath filters
foldM applyFilter d expandedFilters
@@ -92,9 +98,7 @@ applyFilters ropts filters args d = do
toMilliseconds picoseconds = picoseconds `div` 1000000000
-- | Expand paths of filters, searching the data directory.
-expandFilterPath :: Filter -> PandocIO Filter
+expandFilterPath :: (PandocMonad m, MonadIO m) => Filter -> m Filter
expandFilterPath (LuaFilter fp) = LuaFilter <$> Path.expandFilterPath fp
expandFilterPath (JSONFilter fp) = JSONFilter <$> Path.expandFilterPath fp
expandFilterPath CiteprocFilter = return CiteprocFilter
-
-$(deriveJSON defaultOptions ''Filter)
diff --git a/src/Text/Pandoc/Filter/Lua.hs b/src/Text/Pandoc/Filter/Lua.hs
index c238e53d9..4e264261b 100644
--- a/src/Text/Pandoc/Filter/Lua.hs
+++ b/src/Text/Pandoc/Filter/Lua.hs
@@ -14,7 +14,8 @@ module Text.Pandoc.Filter.Lua (apply) where
import Control.Exception (throw)
import Control.Monad ((>=>))
import qualified Data.Text as T
-import Text.Pandoc.Class.PandocIO (PandocIO)
+import Text.Pandoc.Class (PandocMonad)
+import Control.Monad.Trans (MonadIO)
import Text.Pandoc.Definition (Pandoc)
import Text.Pandoc.Error (PandocError (PandocFilterError, PandocLuaError))
import Text.Pandoc.Lua (Global (..), runLua, runFilterFile, setGlobals)
@@ -23,11 +24,12 @@ import Text.Pandoc.Options (ReaderOptions)
-- | Run the Lua filter in @filterPath@ for a transformation to the
-- target format (first element in args). Pandoc uses Lua init files to
-- setup the Lua interpreter.
-apply :: ReaderOptions
+apply :: (PandocMonad m, MonadIO m)
+ => ReaderOptions
-> [String]
-> FilePath
-> Pandoc
- -> PandocIO Pandoc
+ -> m Pandoc
apply ropts args fp doc = do
let format = case args of
(x:_) -> x
@@ -39,7 +41,8 @@ apply ropts args fp doc = do
]
runFilterFile fp doc
-forceResult :: FilePath -> Either PandocError Pandoc -> PandocIO Pandoc
+forceResult :: (PandocMonad m, MonadIO m)
+ => FilePath -> Either PandocError Pandoc -> m Pandoc
forceResult fp eitherResult = case eitherResult of
Right x -> return x
Left err -> throw . PandocFilterError (T.pack fp) $ case err of
diff --git a/src/Text/Pandoc/Image.hs b/src/Text/Pandoc/Image.hs
index e0c938938..cbc26c981 100644
--- a/src/Text/Pandoc/Image.hs
+++ b/src/Text/Pandoc/Image.hs
@@ -11,24 +11,25 @@ Portability : portable
Functions for converting images.
-}
module Text.Pandoc.Image ( svgToPng ) where
-import Text.Pandoc.Options (WriterOptions(..))
import Text.Pandoc.Process (pipeProcess)
import qualified Data.ByteString.Lazy as L
import System.Exit
import Data.Text (Text)
import Text.Pandoc.Shared (tshow)
import qualified Control.Exception as E
+import Control.Monad.IO.Class (MonadIO(liftIO))
-- | Convert svg image to png. rsvg-convert
-- is used and must be available on the path.
-svgToPng :: WriterOptions
+svgToPng :: MonadIO m
+ => Int -- ^ DPI
-> L.ByteString -- ^ Input image as bytestring
- -> IO (Either Text L.ByteString)
-svgToPng opts bs = do
- let dpi = show $ writerDpi opts
- E.catch
+ -> m (Either Text L.ByteString)
+svgToPng dpi bs = do
+ let dpi' = show dpi
+ liftIO $ E.catch
(do (exit, out) <- pipeProcess Nothing "rsvg-convert"
- ["-f","png","-a","--dpi-x",dpi,"--dpi-y",dpi]
+ ["-f","png","-a","--dpi-x",dpi',"--dpi-y",dpi']
bs
return $ if exit == ExitSuccess
then Right out
diff --git a/src/Text/Pandoc/Logging.hs b/src/Text/Pandoc/Logging.hs
index 193b8b61c..2268f29f7 100644
--- a/src/Text/Pandoc/Logging.hs
+++ b/src/Text/Pandoc/Logging.hs
@@ -24,7 +24,6 @@ module Text.Pandoc.Logging (
) where
import Control.Monad (mzero)
-import Data.YAML (withStr, FromYAML(..))
import Data.Aeson
import Data.Aeson.Encode.Pretty (Config (..), defConfig, encodePretty',
keyOrder)
@@ -53,13 +52,6 @@ instance FromJSON Verbosity where
_ -> mzero
parseJSON _ = mzero
-instance FromYAML Verbosity where
- parseYAML = withStr "Verbosity" $ \case
- "ERROR" -> return ERROR
- "WARNING" -> return WARNING
- "INFO" -> return INFO
- _ -> mzero
-
data LogMessage =
SkippedContent Text SourcePos
| IgnoredElement Text
@@ -76,6 +68,7 @@ data LogMessage =
| InlineNotRendered Inline
| BlockNotRendered Block
| DocxParserWarning Text
+ | PowerpointTemplateWarning Text
| IgnoredIOError Text
| CouldNotFetchResource Text Text
| CouldNotDetermineImageSize Text Text
@@ -104,6 +97,7 @@ data LogMessage =
| ATXHeadingInLHS Int Text
| EnvironmentVariableUndefined Text
| DuplicateAttribute Text Text
+ | NotUTF8Encoded FilePath
deriving (Show, Eq, Data, Ord, Typeable, Generic)
instance ToJSON LogMessage where
@@ -174,6 +168,8 @@ instance ToJSON LogMessage where
["contents" .= toJSON bl]
DocxParserWarning s ->
["contents" .= s]
+ PowerpointTemplateWarning s ->
+ ["contents" .= s]
IgnoredIOError s ->
["contents" .= s]
CouldNotFetchResource fp s ->
@@ -241,6 +237,8 @@ instance ToJSON LogMessage where
DuplicateAttribute attr val ->
["attribute" .= attr
,"value" .= val]
+ NotUTF8Encoded src ->
+ ["source" .= src]
showPos :: SourcePos -> Text
showPos pos = Text.pack $ sn ++ "line " ++
@@ -291,6 +289,8 @@ showLogMessage msg =
"Not rendering " <> Text.pack (show bl)
DocxParserWarning s ->
"Docx parser warning: " <> s
+ PowerpointTemplateWarning s ->
+ "Powerpoint template warning: " <> s
IgnoredIOError s ->
"IO Error (ignored): " <> s
CouldNotFetchResource fp s ->
@@ -365,6 +365,9 @@ showLogMessage msg =
"Undefined environment variable " <> var <> " in defaults file."
DuplicateAttribute attr val ->
"Ignoring duplicate attribute " <> attr <> "=" <> tshow val <> "."
+ NotUTF8Encoded src ->
+ Text.pack src <>
+ " is not UTF-8 encoded: falling back to latin1."
messageVerbosity :: LogMessage -> Verbosity
messageVerbosity msg =
@@ -386,6 +389,7 @@ messageVerbosity msg =
InlineNotRendered{} -> INFO
BlockNotRendered{} -> INFO
DocxParserWarning{} -> INFO
+ PowerpointTemplateWarning{} -> WARNING
IgnoredIOError{} -> WARNING
CouldNotFetchResource{} -> WARNING
CouldNotDetermineImageSize{} -> WARNING
@@ -414,3 +418,4 @@ messageVerbosity msg =
ATXHeadingInLHS{} -> WARNING
EnvironmentVariableUndefined{}-> WARNING
DuplicateAttribute{} -> WARNING
+ NotUTF8Encoded{} -> WARNING
diff --git a/src/Text/Pandoc/Lua.hs b/src/Text/Pandoc/Lua.hs
index f0e9e076b..2aa84b7fa 100644
--- a/src/Text/Pandoc/Lua.hs
+++ b/src/Text/Pandoc/Lua.hs
@@ -20,4 +20,4 @@ module Text.Pandoc.Lua
import Text.Pandoc.Lua.Filter (runFilterFile)
import Text.Pandoc.Lua.Global (Global (..), setGlobals)
import Text.Pandoc.Lua.Init (runLua)
-import Text.Pandoc.Lua.Marshaling ()
+import Text.Pandoc.Lua.Orphans ()
diff --git a/src/Text/Pandoc/Lua/ErrorConversion.hs b/src/Text/Pandoc/Lua/ErrorConversion.hs
index 4e6880722..5cb1bf825 100644
--- a/src/Text/Pandoc/Lua/ErrorConversion.hs
+++ b/src/Text/Pandoc/Lua/ErrorConversion.hs
@@ -1,6 +1,5 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE RankNTypes #-}
-{-# LANGUAGE ScopedTypeVariables #-}
{- |
Module : Text.Pandoc.Lua.ErrorConversion
Copyright : © 2020-2021 Albert Krewinkel
@@ -13,49 +12,37 @@ Define how Lua errors are converted into @'PandocError'@ Haskell
exceptions, and /vice versa/.
-}
module Text.Pandoc.Lua.ErrorConversion
- ( errorConversion
+ ( addContextToException
) where
-import Foreign.Lua (Lua (..), NumResults)
+import HsLua (LuaError, LuaE, top)
+import HsLua.Marshalling (resultToEither, runPeek)
+import HsLua.Class.Peekable (PeekError (..))
import Text.Pandoc.Error (PandocError (PandocLuaError))
-import Text.Pandoc.Lua.Marshaling.PandocError (pushPandocError, peekPandocError)
+import Text.Pandoc.Lua.Marshal.PandocError (pushPandocError, peekPandocError)
-import qualified Control.Monad.Catch as Catch
import qualified Data.Text as T
-import qualified Foreign.Lua as Lua
-
--- | Conversions between Lua errors and Haskell exceptions, assuming
--- that all exceptions are of type @'PandocError'@.
-errorConversion :: Lua.ErrorConversion
-errorConversion = Lua.ErrorConversion
- { Lua.addContextToException = addContextToException
- , Lua.alternative = alternative
- , Lua.errorToException = errorToException
- , Lua.exceptionToError = exceptionToError
- }
-
--- | Convert a Lua error, which must be at the top of the stack, into a
--- @'PandocError'@, popping the value from the stack.
-errorToException :: forall a . Lua.State -> IO a
-errorToException l = Lua.unsafeRunWith l $ do
- err <- peekPandocError Lua.stackTop
- Lua.pop 1
- Catch.throwM err
-
--- | Try the first op -- if it doesn't succeed, run the second.
-alternative :: forall a . Lua a -> Lua a -> Lua a
-alternative x y = Catch.try x >>= \case
- Left (_ :: PandocError) -> y
- Right x' -> return x'
-
--- | Add more context to an error
-addContextToException :: forall a . String -> Lua a -> Lua a
-addContextToException ctx op = op `Catch.catch` \case
- PandocLuaError msg -> Catch.throwM $ PandocLuaError (T.pack ctx <> msg)
- e -> Catch.throwM e
-
--- | Catch a @'PandocError'@ exception and raise it as a Lua error.
-exceptionToError :: Lua NumResults -> Lua NumResults
-exceptionToError op = op `Catch.catch` \e -> do
- pushPandocError e
- Lua.error
+import qualified HsLua as Lua
+
+addContextToException :: ()
+addContextToException = undefined
+
+-- | Retrieve a @'PandocError'@ from the Lua stack.
+popPandocError :: LuaE PandocError PandocError
+popPandocError = do
+ errResult <- runPeek $ peekPandocError top
+ case resultToEither errResult of
+ Right x -> return x
+ Left err -> return $ PandocLuaError (T.pack err)
+
+-- Ensure conversions between Lua errors and 'PandocError' exceptions
+-- are possible.
+instance LuaError PandocError where
+ popException = popPandocError
+ pushException = pushPandocError
+ luaException = PandocLuaError . T.pack
+
+instance PeekError PandocError where
+ messageFromException = \case
+ PandocLuaError m -> T.unpack m
+ err -> show err
diff --git a/src/Text/Pandoc/Lua/Filter.hs b/src/Text/Pandoc/Lua/Filter.hs
index 01bf90efa..9910424d8 100644
--- a/src/Text/Pandoc/Lua/Filter.hs
+++ b/src/Text/Pandoc/Lua/Filter.hs
@@ -1,4 +1,7 @@
-{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE IncoherentInstances #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
{- |
Module : Text.Pandoc.Lua.Filter
Copyright : © 2012-2021 John MacFarlane,
@@ -9,245 +12,36 @@ Stability : alpha
Types and functions for running Lua filters.
-}
-module Text.Pandoc.Lua.Filter ( LuaFilterFunction
- , LuaFilter
- , runFilterFile
- , walkInlines
- , walkInlineLists
- , walkBlocks
- , walkBlockLists
- , module Text.Pandoc.Lua.Walk
- ) where
-import Control.Applicative ((<|>))
-import Control.Monad (mplus, (>=>))
-import Control.Monad.Catch (finally, try)
-import Data.Data (Data, DataType, dataTypeConstrs, dataTypeName, dataTypeOf,
- showConstr, toConstr, tyconUQname)
-import Data.Foldable (foldrM)
-import Data.List (foldl')
-import Data.Map (Map)
-import Data.Maybe (fromMaybe)
-import Foreign.Lua (Lua, Peekable, Pushable, StackIndex)
+module Text.Pandoc.Lua.Filter
+ ( runFilterFile
+ ) where
+import Control.Monad ((>=>), (<$!>))
+import HsLua as Lua
import Text.Pandoc.Definition
import Text.Pandoc.Error (PandocError)
-import Text.Pandoc.Lua.Marshaling ()
-import Text.Pandoc.Lua.Marshaling.List (List (..))
-import Text.Pandoc.Lua.Walk (SingletonsList (..))
-import Text.Pandoc.Walk (Walkable (walkM))
+import Text.Pandoc.Lua.ErrorConversion ()
+import Text.Pandoc.Lua.Marshal.AST
+import Text.Pandoc.Lua.Marshal.Filter
-import qualified Data.Map.Strict as Map
-import qualified Foreign.Lua as Lua
import qualified Text.Pandoc.Lua.Util as LuaUtil
-- | Transform document using the filter defined in the given file.
-runFilterFile :: FilePath -> Pandoc -> Lua Pandoc
+runFilterFile :: FilePath -> Pandoc -> LuaE PandocError Pandoc
runFilterFile filterPath doc = do
- top <- Lua.gettop
+ oldtop <- gettop
stat <- LuaUtil.dofileWithTraceback filterPath
if stat /= Lua.OK
- then Lua.throwTopMessage
+ then throwErrorAsException
else do
- newtop <- Lua.gettop
+ newtop <- gettop
-- Use the returned filters, or the implicitly defined global
-- filter if nothing was returned.
- luaFilters <- if newtop - top >= 1
- then Lua.peek Lua.stackTop
- else Lua.pushglobaltable *> fmap (:[]) Lua.popValue
+ luaFilters <- forcePeek $
+ if newtop - oldtop >= 1
+ then peekList peekFilter top
+ else (:[]) <$!> (liftLua pushglobaltable *> peekFilter top)
+ settop oldtop
runAll luaFilters doc
-runAll :: [LuaFilter] -> Pandoc -> Lua Pandoc
-runAll = foldr ((>=>) . walkMWithLuaFilter) return
-
--- | Filter function stored in the registry
-newtype LuaFilterFunction = LuaFilterFunction Lua.Reference
-
--- | Collection of filter functions (at most one function per element
--- constructor)
-newtype LuaFilter = LuaFilter (Map String LuaFilterFunction)
-
-instance Peekable LuaFilter where
- peek idx = do
- let constrs = listOfInlinesFilterName
- : listOfBlocksFilterName
- : metaFilterName
- : pandocFilterNames
- ++ blockElementNames
- ++ inlineElementNames
- let go constr acc = do
- Lua.getfield idx constr
- filterFn <- registerFilterFunction
- return $ case filterFn of
- Nothing -> acc
- Just fn -> Map.insert constr fn acc
- LuaFilter <$> foldrM go Map.empty constrs
-
--- | Register the function at the top of the stack as a filter function in the
--- registry.
-registerFilterFunction :: Lua (Maybe LuaFilterFunction)
-registerFilterFunction = do
- isFn <- Lua.isfunction Lua.stackTop
- if isFn
- then Just . LuaFilterFunction <$> Lua.ref Lua.registryindex
- else Nothing <$ Lua.pop 1
-
--- | Retrieve filter function from registry and push it to the top of the stack.
-pushFilterFunction :: LuaFilterFunction -> Lua ()
-pushFilterFunction (LuaFilterFunction fnRef) =
- Lua.getref Lua.registryindex fnRef
-
--- | Fetch either a list of elements from the stack. If there is a single
--- element instead of a list, fetch that element as a singleton list. If the top
--- of the stack is nil, return the default element that was passed to this
--- function. If none of these apply, raise an error.
-elementOrList :: Peekable a => a -> Lua [a]
-elementOrList x = do
- let topOfStack = Lua.stackTop
- elementUnchanged <- Lua.isnil topOfStack
- if elementUnchanged
- then [x] <$ Lua.pop 1
- else do
- mbres <- peekEither topOfStack
- case mbres of
- Right res -> [res] <$ Lua.pop 1
- Left _ -> Lua.peekList topOfStack `finally` Lua.pop 1
-
--- | Pop and return a value from the stack; if the value at the top of
--- the stack is @nil@, return the fallback element.
-popOption :: Peekable a => a -> Lua a
-popOption fallback = fromMaybe fallback . Lua.fromOptional <$> Lua.popValue
-
--- | Apply filter on a sequence of AST elements. Both lists and single
--- value are accepted as filter function return values.
-runOnSequence :: (Data a, Peekable a, Pushable a)
- => LuaFilter -> SingletonsList a -> Lua (SingletonsList a)
-runOnSequence (LuaFilter fnMap) (SingletonsList xs) =
- SingletonsList <$> mconcatMapM tryFilter xs
- where
- tryFilter :: (Data a, Peekable a, Pushable a) => a -> Lua [a]
- tryFilter x =
- let filterFnName = showConstr (toConstr x)
- catchAllName = tyconUQname $ dataTypeName (dataTypeOf x)
- in case Map.lookup filterFnName fnMap <|> Map.lookup catchAllName fnMap of
- Just fn -> runFilterFunction fn x *> elementOrList x
- Nothing -> return [x]
-
--- | Try filtering the given value without type error corrections on
--- the return value.
-runOnValue :: (Data a, Peekable a, Pushable a)
- => String -> LuaFilter -> a -> Lua a
-runOnValue filterFnName (LuaFilter fnMap) x =
- case Map.lookup filterFnName fnMap of
- Just fn -> runFilterFunction fn x *> popOption x
- Nothing -> return x
-
--- | Push a value to the stack via a lua filter function. The filter function is
--- called with given element as argument and is expected to return an element.
--- Alternatively, the function can return nothing or nil, in which case the
--- element is left unchanged.
-runFilterFunction :: Pushable a => LuaFilterFunction -> a -> Lua ()
-runFilterFunction lf x = do
- pushFilterFunction lf
- Lua.push x
- LuaUtil.callWithTraceback 1 1
-
-walkMWithLuaFilter :: LuaFilter -> Pandoc -> Lua Pandoc
-walkMWithLuaFilter f =
- walkInlines f
- >=> walkInlineLists f
- >=> walkBlocks f
- >=> walkBlockLists f
- >=> walkMeta f
- >=> walkPandoc f
-
-mconcatMapM :: (Monad m) => (a -> m [a]) -> [a] -> m [a]
-mconcatMapM f = fmap mconcat . mapM f
-
-hasOneOf :: LuaFilter -> [String] -> Bool
-hasOneOf (LuaFilter fnMap) = any (`Map.member` fnMap)
-
-contains :: LuaFilter -> String -> Bool
-contains (LuaFilter fnMap) = (`Map.member` fnMap)
-
-walkInlines :: Walkable (SingletonsList Inline) a => LuaFilter -> a -> Lua a
-walkInlines lf =
- let f :: SingletonsList Inline -> Lua (SingletonsList Inline)
- f = runOnSequence lf
- in if lf `hasOneOf` inlineElementNames
- then walkM f
- else return
-
-walkInlineLists :: Walkable (List Inline) a => LuaFilter -> a -> Lua a
-walkInlineLists lf =
- let f :: List Inline -> Lua (List Inline)
- f = runOnValue listOfInlinesFilterName lf
- in if lf `contains` listOfInlinesFilterName
- then walkM f
- else return
-
-walkBlocks :: Walkable (SingletonsList Block) a => LuaFilter -> a -> Lua a
-walkBlocks lf =
- let f :: SingletonsList Block -> Lua (SingletonsList Block)
- f = runOnSequence lf
- in if lf `hasOneOf` blockElementNames
- then walkM f
- else return
-
-walkBlockLists :: Walkable (List Block) a => LuaFilter -> a -> Lua a
-walkBlockLists lf =
- let f :: List Block -> Lua (List Block)
- f = runOnValue listOfBlocksFilterName lf
- in if lf `contains` listOfBlocksFilterName
- then walkM f
- else return
-
-walkMeta :: LuaFilter -> Pandoc -> Lua Pandoc
-walkMeta lf (Pandoc m bs) = do
- m' <- runOnValue "Meta" lf m
- return $ Pandoc m' bs
-
-walkPandoc :: LuaFilter -> Pandoc -> Lua Pandoc
-walkPandoc (LuaFilter fnMap) =
- case foldl' mplus Nothing (map (`Map.lookup` fnMap) pandocFilterNames) of
- Just fn -> \x -> runFilterFunction fn x *> singleElement x
- Nothing -> return
-
-constructorsFor :: DataType -> [String]
-constructorsFor x = map show (dataTypeConstrs x)
-
-inlineElementNames :: [String]
-inlineElementNames = "Inline" : constructorsFor (dataTypeOf (Str mempty))
-
-blockElementNames :: [String]
-blockElementNames = "Block" : constructorsFor (dataTypeOf (Para []))
-
-listOfInlinesFilterName :: String
-listOfInlinesFilterName = "Inlines"
-
-listOfBlocksFilterName :: String
-listOfBlocksFilterName = "Blocks"
-
-metaFilterName :: String
-metaFilterName = "Meta"
-
-pandocFilterNames :: [String]
-pandocFilterNames = ["Pandoc", "Doc"]
-
-singleElement :: Peekable a => a -> Lua a
-singleElement x = do
- elementUnchanged <- Lua.isnil (-1)
- if elementUnchanged
- then x <$ Lua.pop 1
- else do
- mbres <- peekEither (-1)
- case mbres of
- Right res -> res <$ Lua.pop 1
- Left err -> do
- Lua.pop 1
- Lua.throwMessage
- ("Error while trying to get a filter's return " <>
- "value from Lua stack.\n" <> show err)
-
--- | Try to convert the value at the given stack index to a Haskell value.
--- Returns @Left@ with an error message on failure.
-peekEither :: Peekable a => StackIndex -> Lua (Either PandocError a)
-peekEither = try . Lua.peek
+runAll :: [Filter] -> Pandoc -> LuaE PandocError Pandoc
+runAll = foldr ((>=>) . applyFully) return
diff --git a/src/Text/Pandoc/Lua/Global.hs b/src/Text/Pandoc/Lua/Global.hs
index 29b788f04..cf82890c6 100644
--- a/src/Text/Pandoc/Lua/Global.hs
+++ b/src/Text/Pandoc/Lua/Global.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Text.Pandoc.Lua
Copyright : Copyright © 2017-2021 Albert Krewinkel
@@ -14,19 +14,19 @@ module Text.Pandoc.Lua.Global
, setGlobals
) where
-import Data.Data (Data)
-import Foreign.Lua (Lua, Peekable, Pushable)
-import Foreign.Lua.Userdata ( ensureUserdataMetatable, pushAnyWithMetatable
- , metatableName)
+import HsLua as Lua
+import HsLua.Module.Version (pushVersion)
import Paths_pandoc (version)
import Text.Pandoc.Class.CommonState (CommonState)
-import Text.Pandoc.Definition (Pandoc (Pandoc), pandocTypesVersion)
-import Text.Pandoc.Lua.Marshaling ()
-import Text.Pandoc.Lua.Util (addFunction)
+import Text.Pandoc.Definition (Pandoc, pandocTypesVersion)
+import Text.Pandoc.Error (PandocError)
+import Text.Pandoc.Lua.Marshal.CommonState (pushCommonState)
+import Text.Pandoc.Lua.Marshal.Pandoc (pushPandoc)
+import Text.Pandoc.Lua.Marshal.ReaderOptions (pushReaderOptionsReadonly)
+import Text.Pandoc.Lua.Orphans ()
import Text.Pandoc.Options (ReaderOptions)
import qualified Data.Text as Text
-import qualified Foreign.Lua as Lua
-- | Permissible global Lua variables.
data Global =
@@ -40,50 +40,30 @@ data Global =
-- Cannot derive instance of Data because of CommonState
-- | Set all given globals.
-setGlobals :: [Global] -> Lua ()
+setGlobals :: [Global] -> LuaE PandocError ()
setGlobals = mapM_ setGlobal
-setGlobal :: Global -> Lua ()
+setGlobal :: Global -> LuaE PandocError ()
setGlobal global = case global of
-- This could be simplified if Global was an instance of Data.
FORMAT format -> do
Lua.push format
Lua.setglobal "FORMAT"
PANDOC_API_VERSION -> do
- Lua.push pandocTypesVersion
+ pushVersion pandocTypesVersion
Lua.setglobal "PANDOC_API_VERSION"
PANDOC_DOCUMENT doc -> do
- Lua.push (LazyPandoc doc)
+ pushPandoc doc
Lua.setglobal "PANDOC_DOCUMENT"
PANDOC_READER_OPTIONS ropts -> do
- Lua.push ropts
+ pushReaderOptionsReadonly ropts
Lua.setglobal "PANDOC_READER_OPTIONS"
PANDOC_SCRIPT_FILE filePath -> do
Lua.push filePath
Lua.setglobal "PANDOC_SCRIPT_FILE"
PANDOC_STATE commonState -> do
- Lua.push commonState
+ pushCommonState commonState
Lua.setglobal "PANDOC_STATE"
PANDOC_VERSION -> do
- Lua.push version
+ pushVersion version
Lua.setglobal "PANDOC_VERSION"
-
--- | Readonly and lazy pandoc objects.
-newtype LazyPandoc = LazyPandoc Pandoc
- deriving (Data)
-
-instance Pushable LazyPandoc where
- push lazyDoc = pushAnyWithMetatable pushPandocMetatable lazyDoc
- where
- pushPandocMetatable = ensureUserdataMetatable (metatableName lazyDoc) $
- addFunction "__index" indexLazyPandoc
-
-instance Peekable LazyPandoc where
- peek = Lua.peekAny
-
-indexLazyPandoc :: LazyPandoc -> String -> Lua Lua.NumResults
-indexLazyPandoc (LazyPandoc (Pandoc meta blks)) field = 1 <$
- case field of
- "blocks" -> Lua.push blks
- "meta" -> Lua.push meta
- _ -> Lua.pushnil
diff --git a/src/Text/Pandoc/Lua/Init.hs b/src/Text/Pandoc/Lua/Init.hs
index baa6f0295..835da1fc9 100644
--- a/src/Text/Pandoc/Lua/Init.hs
+++ b/src/Text/Pandoc/Lua/Init.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Text.Pandoc.Lua
Copyright : Copyright © 2017-2021 Albert Krewinkel
@@ -12,25 +14,24 @@ module Text.Pandoc.Lua.Init
( runLua
) where
-import Control.Monad (when)
-import Control.Monad.Catch (try)
+import Control.Monad (forM, forM_, when)
+import Control.Monad.Catch (throwM, try)
import Control.Monad.Trans (MonadIO (..))
-import Data.Data (Data, dataTypeConstrs, dataTypeOf, showConstr)
-import Foreign.Lua (Lua)
+import Data.Maybe (catMaybes)
+import HsLua as Lua hiding (status, try)
import GHC.IO.Encoding (getForeignEncoding, setForeignEncoding, utf8)
-import Text.Pandoc.Class.PandocMonad (readDataFile)
-import Text.Pandoc.Class.PandocIO (PandocIO)
-import Text.Pandoc.Error (PandocError)
+import Text.Pandoc.Class.PandocMonad (PandocMonad, readDataFile)
+import Text.Pandoc.Error (PandocError (PandocLuaError))
import Text.Pandoc.Lua.Packages (installPandocPackageSearcher)
import Text.Pandoc.Lua.PandocLua (PandocLua, liftPandocLua, runPandocLua)
-import Text.Pandoc.Lua.Util (throwTopMessageAsError')
-import qualified Foreign.Lua as Lua
-import qualified Text.Pandoc.Definition as Pandoc
+import qualified Data.Text as T
+import qualified Lua.LPeg as LPeg
import qualified Text.Pandoc.Lua.Module.Pandoc as ModulePandoc
-- | Run the lua interpreter, using pandoc's default way of environment
-- initialization.
-runLua :: Lua a -> PandocIO (Either PandocError a)
+runLua :: (PandocMonad m, MonadIO m)
+ => LuaE PandocError a -> m (Either PandocError a)
runLua luaOp = do
enc <- liftIO $ getForeignEncoding <* setForeignEncoding utf8
res <- runPandocLua . try $ do
@@ -39,12 +40,27 @@ runLua luaOp = do
liftIO $ setForeignEncoding enc
return res
+-- | Modules that are loaded at startup and assigned to fields in the
+-- pandoc module.
+loadedModules :: [(Name, Name)]
+loadedModules =
+ [ ("pandoc.List", "List")
+ , ("pandoc.mediabag", "mediabag")
+ , ("pandoc.path", "path")
+ , ("pandoc.system", "system")
+ , ("pandoc.types", "types")
+ , ("pandoc.utils", "utils")
+ , ("text", "text")
+ ]
+
-- | Initialize the lua state with all required values
initLuaState :: PandocLua ()
initLuaState = do
liftPandocLua Lua.openlibs
installPandocPackageSearcher
initPandocModule
+ installLpegSearcher
+ setGlobalModules
loadInitScript "init.lua"
where
initPandocModule :: PandocLua ()
@@ -53,12 +69,16 @@ initLuaState = do
ModulePandoc.pushModule
-- register as loaded module
liftPandocLua $ do
- Lua.pushvalue Lua.stackTop
- Lua.getfield Lua.registryindex Lua.loadedTableRegistryField
- Lua.setfield (Lua.nthFromTop 2) "pandoc"
- Lua.pop 1
- -- copy constructors into registry
- putConstructorsInRegistry
+ Lua.getfield Lua.registryindex Lua.loaded
+ Lua.pushvalue (Lua.nth 2)
+ Lua.setfield (Lua.nth 2) "pandoc"
+ Lua.pop 1 -- remove LOADED table
+ -- load modules and add them to the `pandoc` module table.
+ liftPandocLua $ forM_ loadedModules $ \(pkgname, fieldname) -> do
+ Lua.getglobal "require"
+ Lua.pushName pkgname
+ Lua.call 1 1
+ Lua.setfield (nth 2) fieldname
-- assign module to global variable
liftPandocLua $ Lua.setglobal "pandoc"
@@ -66,38 +86,54 @@ initLuaState = do
loadInitScript scriptFile = do
script <- readDataFile scriptFile
status <- liftPandocLua $ Lua.dostring script
- when (status /= Lua.OK) . liftPandocLua $
- throwTopMessageAsError'
- (("Couldn't load '" ++ scriptFile ++ "'.\n") ++)
+ when (status /= Lua.OK) . liftPandocLua $ do
+ err <- popException
+ let prefix = "Couldn't load '" <> T.pack scriptFile <> "':\n"
+ throwM . PandocLuaError . (prefix <>) $ case err of
+ PandocLuaError msg -> msg
+ _ -> T.pack $ show err
+ setGlobalModules :: PandocLua ()
+ setGlobalModules = liftPandocLua $ do
+ let globalModules =
+ [ ("lpeg", LPeg.luaopen_lpeg_ptr) -- must be loaded first
+ , ("re", LPeg.luaopen_re_ptr) -- re depends on lpeg
+ ]
+ loadedBuiltInModules <- fmap catMaybes . forM globalModules $
+ \(pkgname, luaopen) -> do
+ Lua.pushcfunction luaopen
+ usedBuiltIn <- Lua.pcall 0 1 Nothing >>= \case
+ OK -> do -- all good, loading succeeded
+ -- register as loaded module so later modules can rely on this
+ Lua.getfield Lua.registryindex Lua.loaded
+ Lua.pushvalue (Lua.nth 2)
+ Lua.setfield (Lua.nth 2) pkgname
+ Lua.pop 1 -- pop _LOADED
+ return True
+ _ -> do -- built-in library failed, load system lib
+ Lua.pop 1 -- ignore error message
+ -- Try loading via the normal package loading mechanism.
+ Lua.getglobal "require"
+ Lua.pushName pkgname
+ Lua.call 1 1 -- Throws an exception if loading failed again!
+ return False
--- | AST elements are marshaled via normal constructor functions in the
--- @pandoc@ module. However, accessing Lua globals from Haskell is
--- expensive (due to error handling). Accessing the Lua registry is much
--- cheaper, which is why the constructor functions are copied into the
--- Lua registry and called from there.
---
--- This function expects the @pandoc@ module to be at the top of the
--- stack.
-putConstructorsInRegistry :: PandocLua ()
-putConstructorsInRegistry = liftPandocLua $ do
- constrsToReg $ Pandoc.Pandoc mempty mempty
- constrsToReg $ Pandoc.Str mempty
- constrsToReg $ Pandoc.Para mempty
- constrsToReg $ Pandoc.Meta mempty
- constrsToReg $ Pandoc.MetaList mempty
- constrsToReg $ Pandoc.Citation mempty mempty mempty Pandoc.AuthorInText 0 0
- putInReg "Attr" -- used for Attr type alias
- putInReg "ListAttributes" -- used for ListAttributes type alias
- putInReg "List" -- pandoc.List
- putInReg "SimpleTable" -- helper for backward-compatible table handling
- where
- constrsToReg :: Data a => a -> Lua ()
- constrsToReg = mapM_ (putInReg . showConstr) . dataTypeConstrs . dataTypeOf
+ -- Module on top of stack. Register as global
+ Lua.setglobal pkgname
+ return $ if usedBuiltIn then Just pkgname else Nothing
+
+ -- Remove module entry from _LOADED table in registry if we used a
+ -- built-in library. This ensures that later calls to @require@ will
+ -- prefer the shared library, if any.
+ forM_ loadedBuiltInModules $ \pkgname -> do
+ Lua.getfield Lua.registryindex Lua.loaded
+ Lua.pushnil
+ Lua.setfield (Lua.nth 2) pkgname
+ Lua.pop 1 -- registry
- putInReg :: String -> Lua ()
- putInReg name = do
- Lua.push ("pandoc." ++ name) -- name in registry
- Lua.push name -- in pandoc module
- Lua.rawget (Lua.nthFromTop 3)
- Lua.rawset Lua.registryindex
+ installLpegSearcher :: PandocLua ()
+ installLpegSearcher = liftPandocLua $ do
+ Lua.getglobal' "package.searchers"
+ Lua.pushHaskellFunction $ Lua.state >>= liftIO . LPeg.lpeg_searcher
+ Lua.rawseti (Lua.nth 2) . (+1) . fromIntegral =<< Lua.rawlen (Lua.nth 2)
+ Lua.pop 1 -- remove 'package.searchers' from stack
diff --git a/src/Text/Pandoc/Lua/Marshal/CommonState.hs b/src/Text/Pandoc/Lua/Marshal/CommonState.hs
new file mode 100644
index 000000000..a8c0e28d2
--- /dev/null
+++ b/src/Text/Pandoc/Lua/Marshal/CommonState.hs
@@ -0,0 +1,70 @@
+{-# LANGUAGE OverloadedStrings #-}
+{- |
+ Module : Text.Pandoc.Lua.Marshal.CommonState
+ Copyright : © 2012-2021 John MacFarlane
+ © 2017-2021 Albert Krewinkel
+ License : GNU GPL, version 2 or above
+ Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
+ Stability : alpha
+
+Instances to marshal (push) and unmarshal (peek) the common state.
+-}
+module Text.Pandoc.Lua.Marshal.CommonState
+ ( typeCommonState
+ , peekCommonState
+ , pushCommonState
+ ) where
+
+import HsLua.Core
+import HsLua.Marshalling
+import HsLua.Packaging
+import Text.Pandoc.Class (CommonState (..))
+import Text.Pandoc.Logging (LogMessage, showLogMessage)
+import Text.Pandoc.Lua.Marshal.List (pushPandocList)
+
+-- | Lua type used for the @CommonState@ object.
+typeCommonState :: LuaError e => DocumentedType e CommonState
+typeCommonState = deftype "pandoc CommonState" []
+ [ readonly "input_files" "input files passed to pandoc"
+ (pushPandocList pushString, stInputFiles)
+
+ , readonly "output_file" "the file to which pandoc will write"
+ (maybe pushnil pushString, stOutputFile)
+
+ , readonly "log" "list of log messages"
+ (pushPandocList (pushUD typeLogMessage), stLog)
+
+ , readonly "request_headers" "headers to add for HTTP requests"
+ (pushPandocList (pushPair pushText pushText), stRequestHeaders)
+
+ , readonly "resource_path"
+ "path to search for resources like included images"
+ (pushPandocList pushString, stResourcePath)
+
+ , readonly "source_url" "absolute URL + dir of 1st source file"
+ (maybe pushnil pushText, stSourceURL)
+
+ , readonly "user_data_dir" "directory to search for data files"
+ (maybe pushnil pushString, stUserDataDir)
+
+ , readonly "trace" "controls whether tracing messages are issued"
+ (pushBool, stTrace)
+
+ , readonly "verbosity" "verbosity level"
+ (pushString . show, stVerbosity)
+ ]
+
+peekCommonState :: LuaError e => Peeker e CommonState
+peekCommonState = peekUD typeCommonState
+
+pushCommonState :: LuaError e => Pusher e CommonState
+pushCommonState = pushUD typeCommonState
+
+typeLogMessage :: LuaError e => DocumentedType e LogMessage
+typeLogMessage = deftype "pandoc LogMessage"
+ [ operation Index $ defun "__tostring"
+ ### liftPure showLogMessage
+ <#> udparam typeLogMessage "msg" "object"
+ =#> functionResult pushText "string" "stringified log message"
+ ]
+ mempty -- no members
diff --git a/src/Text/Pandoc/Lua/Marshaling/Context.hs b/src/Text/Pandoc/Lua/Marshal/Context.hs
index 606bdcfb2..17af936e1 100644
--- a/src/Text/Pandoc/Lua/Marshaling/Context.hs
+++ b/src/Text/Pandoc/Lua/Marshal/Context.hs
@@ -10,10 +10,10 @@
Marshaling instance for doctemplates Context and its components.
-}
-module Text.Pandoc.Lua.Marshaling.Context () where
+module Text.Pandoc.Lua.Marshal.Context () where
-import qualified Foreign.Lua as Lua
-import Foreign.Lua (Pushable)
+import qualified HsLua as Lua
+import HsLua (Pushable)
import Text.DocTemplates (Context(..), Val(..), TemplateTarget)
import Text.DocLayout (render)
diff --git a/src/Text/Pandoc/Lua/Marshal/PandocError.hs b/src/Text/Pandoc/Lua/Marshal/PandocError.hs
new file mode 100644
index 000000000..d1c0ad4f4
--- /dev/null
+++ b/src/Text/Pandoc/Lua/Marshal/PandocError.hs
@@ -0,0 +1,51 @@
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
+{- |
+ Module : Text.Pandoc.Lua.Marshal.PandocError
+ Copyright : © 2020-2021 Albert Krewinkel
+ License : GNU GPL, version 2 or above
+
+ Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
+ Stability : alpha
+
+Marshal of @'PandocError'@ values.
+-}
+module Text.Pandoc.Lua.Marshal.PandocError
+ ( peekPandocError
+ , pushPandocError
+ , typePandocError
+ )
+ where
+
+import HsLua.Core (LuaError)
+import HsLua.Marshalling (Peeker, Pusher, pushString, liftLua)
+import HsLua.Packaging
+import Text.Pandoc.Error (PandocError (PandocLuaError))
+
+import qualified HsLua as Lua
+import qualified Text.Pandoc.UTF8 as UTF8
+
+-- | Lua userdata type definition for PandocError.
+typePandocError :: LuaError e => DocumentedType e PandocError
+typePandocError = deftype "PandocError"
+ [ operation Tostring $ defun "__tostring"
+ ### liftPure (show @PandocError)
+ <#> udparam typePandocError "obj" "PandocError object"
+ =#> functionResult pushString "string" "string representation of error."
+ ]
+ mempty -- no members
+
+-- | Peek a @'PandocError'@ element to the Lua stack.
+pushPandocError :: LuaError e => Pusher e PandocError
+pushPandocError = pushUD typePandocError
+
+-- | Retrieve a @'PandocError'@ from the Lua stack.
+peekPandocError :: LuaError e => Peeker e PandocError
+peekPandocError idx = Lua.retrieving "PandocError" $
+ liftLua (Lua.ltype idx) >>= \case
+ Lua.TypeUserdata -> peekUD typePandocError idx
+ _ -> do
+ msg <- liftLua $ Lua.state >>= \l -> Lua.liftIO (Lua.popErrorMessage l)
+ return $ PandocLuaError (UTF8.toText msg)
diff --git a/src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs b/src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs
new file mode 100644
index 000000000..c20770dba
--- /dev/null
+++ b/src/Text/Pandoc/Lua/Marshal/ReaderOptions.hs
@@ -0,0 +1,133 @@
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+{- |
+ Module : Text.Pandoc.Lua.Marshaling.ReaderOptions
+ Copyright : © 2012-2021 John MacFarlane
+ © 2017-2021 Albert Krewinkel
+ License : GNU GPL, version 2 or above
+
+ Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
+ Stability : alpha
+
+Marshaling instance for ReaderOptions and its components.
+-}
+module Text.Pandoc.Lua.Marshal.ReaderOptions
+ ( peekReaderOptions
+ , pushReaderOptions
+ , pushReaderOptionsReadonly
+ ) where
+
+import Data.Default (def)
+import HsLua as Lua
+import Text.Pandoc.Lua.Marshal.List (pushPandocList)
+import Text.Pandoc.Options (ReaderOptions (..))
+
+--
+-- Reader Options
+--
+
+-- | Retrieve a ReaderOptions value, either from a normal ReaderOptions
+-- value, from a read-only object, or from a table with the same
+-- keys as a ReaderOptions object.
+peekReaderOptions :: LuaError e => Peeker e ReaderOptions
+peekReaderOptions = retrieving "ReaderOptions" . \idx ->
+ liftLua (ltype idx) >>= \case
+ TypeUserdata -> choice [ peekUD typeReaderOptions
+ , peekUD typeReaderOptionsReadonly
+ ]
+ idx
+ TypeTable -> peekReaderOptionsTable idx
+ _ -> failPeek =<<
+ typeMismatchMessage "ReaderOptions userdata or table" idx
+
+-- | Pushes a ReaderOptions value as userdata object.
+pushReaderOptions :: LuaError e => Pusher e ReaderOptions
+pushReaderOptions = pushUD typeReaderOptions
+
+-- | Pushes a ReaderOptions object, but makes it read-only.
+pushReaderOptionsReadonly :: LuaError e => Pusher e ReaderOptions
+pushReaderOptionsReadonly = pushUD typeReaderOptionsReadonly
+
+-- | ReaderOptions object type for read-only values.
+typeReaderOptionsReadonly :: LuaError e => DocumentedType e ReaderOptions
+typeReaderOptionsReadonly = deftype "ReaderOptions (read-only)"
+ [ operation Tostring $ lambda
+ ### liftPure show
+ <#> udparam typeReaderOptions "opts" "options to print in native format"
+ =#> functionResult pushString "string" "Haskell representation"
+ , operation Newindex $ lambda
+ ### (failLua "This ReaderOptions value is read-only.")
+ =?> "Throws an error when called, i.e., an assignment is made."
+ ]
+ readerOptionsMembers
+
+-- | 'ReaderOptions' object type.
+typeReaderOptions :: LuaError e => DocumentedType e ReaderOptions
+typeReaderOptions = deftype "ReaderOptions"
+ [ operation Tostring $ lambda
+ ### liftPure show
+ <#> udparam typeReaderOptions "opts" "options to print in native format"
+ =#> functionResult pushString "string" "Haskell representation"
+ ]
+ readerOptionsMembers
+
+-- | Member properties of 'ReaderOptions' Lua values.
+readerOptionsMembers :: LuaError e
+ => [Member e (DocumentedFunction e) ReaderOptions]
+readerOptionsMembers =
+ [ property "abbreviations" ""
+ (pushSet pushText, readerAbbreviations)
+ (peekSet peekText, \opts x -> opts{ readerAbbreviations = x })
+ , property "columns" ""
+ (pushIntegral, readerColumns)
+ (peekIntegral, \opts x -> opts{ readerColumns = x })
+ , property "default_image_extension" ""
+ (pushText, readerDefaultImageExtension)
+ (peekText, \opts x -> opts{ readerDefaultImageExtension = x })
+ , property "extensions" ""
+ (pushString . show, readerExtensions)
+ (peekRead, \opts x -> opts{ readerExtensions = x })
+ , property "indented_code_classes" ""
+ (pushPandocList pushText, readerIndentedCodeClasses)
+ (peekList peekText, \opts x -> opts{ readerIndentedCodeClasses = x })
+ , property "strip_comments" ""
+ (pushBool, readerStripComments)
+ (peekBool, \opts x -> opts{ readerStripComments = x })
+ , property "standalone" ""
+ (pushBool, readerStandalone)
+ (peekBool, \opts x -> opts{ readerStandalone = x })
+ , property "tab_stop" ""
+ (pushIntegral, readerTabStop)
+ (peekIntegral, \opts x -> opts{ readerTabStop = x })
+ , property "track_changes" ""
+ (pushString . show, readerTrackChanges)
+ (peekRead, \opts x -> opts{ readerTrackChanges = x })
+ ]
+
+-- | Retrieves a 'ReaderOptions' object from a table on the stack, using
+-- the default values for all missing fields.
+--
+-- Internally, this pushes the default reader options, sets each
+-- key/value pair of the table in the userdata value, then retrieves the
+-- object again. This will update all fields and complain about unknown
+-- keys.
+peekReaderOptionsTable :: LuaError e => Peeker e ReaderOptions
+peekReaderOptionsTable idx = retrieving "ReaderOptions (table)" $ do
+ liftLua $ do
+ absidx <- absindex idx
+ pushUD typeReaderOptions def
+ let setFields = do
+ next absidx >>= \case
+ False -> return () -- all fields were copied
+ True -> do
+ pushvalue (nth 2) *> insert (nth 2)
+ settable (nth 4) -- set in userdata object
+ setFields
+ pushnil -- first key
+ setFields
+ peekUD typeReaderOptions top
+
+instance Pushable ReaderOptions where
+ push = pushReaderOptions
diff --git a/src/Text/Pandoc/Lua/Marshal/Reference.hs b/src/Text/Pandoc/Lua/Marshal/Reference.hs
new file mode 100644
index 000000000..ee297484e
--- /dev/null
+++ b/src/Text/Pandoc/Lua/Marshal/Reference.hs
@@ -0,0 +1,107 @@
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+{- |
+ Module : Text.Pandoc.Lua.Marshaling.ReaderOptions
+ Copyright : © 2012-2021 John MacFarlane
+ © 2017-2021 Albert Krewinkel
+ License : GNU GPL, version 2 or above
+
+ Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
+ Stability : alpha
+
+Marshal citeproc 'Reference' values.
+-}
+module Text.Pandoc.Lua.Marshal.Reference
+ ( pushReference
+ ) where
+
+import Citeproc.Types
+ ( Date (..), DateParts (..), ItemId (..), Name (..), Reference (..)
+ , Val (..), Variable, fromVariable
+ )
+import Control.Monad (forM_)
+import HsLua hiding (Name, Reference, pushName, peekName)
+import Text.Pandoc.Builder (Inlines, toList)
+import Text.Pandoc.Lua.Marshal.Inline (pushInlines)
+import Text.Pandoc.Lua.Marshal.List (pushPandocList)
+
+import qualified Data.Map as Map
+import qualified HsLua
+
+-- | Pushes a ReaderOptions value as userdata object.
+pushReference :: LuaError e => Pusher e (Reference Inlines)
+pushReference reference = do
+ pushAsTable [ ("id", pushItemId . referenceId)
+ , ("type", pushText . referenceType)
+ ]
+ reference
+ forM_ (Map.toList $ referenceVariables reference) $ \(var, val) -> do
+ pushVariable var
+ pushVal val
+ rawset (nth 3)
+
+-- | Pushes an 'ItemId' as a string.
+pushItemId :: Pusher e ItemId
+pushItemId = pushText . unItemId
+
+-- | Pushes a person's 'Name' as a table.
+pushName :: LuaError e => Pusher e Name
+pushName = pushAsTable
+ [ ("family" , pushTextOrNil . nameFamily)
+ , ("given" , pushTextOrNil . nameGiven)
+ , ("dropping-particle" , pushTextOrNil . nameDroppingParticle)
+ , ("non-dropping-particle" , pushTextOrNil . nameNonDroppingParticle)
+ , ("suffix" , pushTextOrNil . nameSuffix)
+ , ("literal" , pushTextOrNil . nameLiteral)
+ , ("comma-suffix" , pushBoolOrNil . nameCommaSuffix)
+ , ("static-ordering" , pushBoolOrNil . nameStaticOrdering)
+ ]
+ where
+ pushTextOrNil = \case
+ Nothing -> pushnil
+ Just xs -> pushText xs
+
+-- | Pushes a boolean, but uses @nil@ instead of @false@; table fields
+-- are not set unless the value is true.
+pushBoolOrNil :: Pusher e Bool
+pushBoolOrNil = \case
+ False -> pushnil
+ True -> pushBool True
+
+-- | Pushes a 'Variable' as string.
+pushVariable :: Pusher e Variable
+pushVariable = pushText . fromVariable
+
+-- | Pushes a 'Val', i.e., a variable value.
+pushVal :: LuaError e => Pusher e (Val Inlines)
+pushVal = \case
+ TextVal t -> pushText t
+ FancyVal inlns -> pushInlines $ toList inlns
+ NumVal i -> pushIntegral i
+ NamesVal names -> pushPandocList pushName names
+ DateVal date -> pushDate date
+
+-- | Pushes a 'Date' as table.
+pushDate :: LuaError e => Pusher e Date
+pushDate = pushAsTable
+ [ ("date-parts", pushPandocList pushDateParts . dateParts)
+ , ("circa", pushBoolOrNil . dateCirca)
+ , ("season", maybe pushnil pushIntegral . dateSeason)
+ , ("literal", maybe pushnil pushText . dateLiteral)
+ ]
+ where
+ -- date parts are lists of Int values
+ pushDateParts (DateParts dp) = pushPandocList pushIntegral dp
+
+-- | Helper funtion to push an object as a table.
+pushAsTable :: LuaError e
+ => [(HsLua.Name, a -> LuaE e ())]
+ -> a -> LuaE e ()
+pushAsTable props obj = do
+ createtable 0 (length props)
+ forM_ props $ \(name, pushValue) -> do
+ HsLua.pushName name
+ pushValue obj
+ rawset (nth 3)
diff --git a/src/Text/Pandoc/Lua/Marshal/Sources.hs b/src/Text/Pandoc/Lua/Marshal/Sources.hs
new file mode 100644
index 000000000..7b5262ab5
--- /dev/null
+++ b/src/Text/Pandoc/Lua/Marshal/Sources.hs
@@ -0,0 +1,46 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+{- |
+Module : Text.Pandoc.Lua.Marshaling.Sources
+Copyright : © 2021 Albert Krewinkel
+License : GNU GPL, version 2 or above
+Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
+
+Marshal 'Sources'.
+-}
+module Text.Pandoc.Lua.Marshal.Sources
+ ( pushSources
+ ) where
+
+import Data.Text (Text)
+import HsLua as Lua
+import Text.Pandoc.Lua.Marshal.List (newListMetatable)
+import Text.Pandoc.Sources (Sources (..))
+import Text.Parsec (SourcePos, sourceName)
+
+-- | Pushes the 'Sources' as a list of lazy Lua objects.
+pushSources :: LuaError e => Pusher e Sources
+pushSources (Sources srcs) = do
+ pushList (pushUD typeSource) srcs
+ newListMetatable "pandoc Sources" $ do
+ pushName "__tostring"
+ pushHaskellFunction $ do
+ sources <- forcePeek $ peekList (peekUD typeSource) (nthBottom 1)
+ pushText . mconcat $ map snd sources
+ return 1
+ rawset (nth 3)
+ setmetatable (nth 2)
+
+-- | Source object type.
+typeSource :: LuaError e => DocumentedType e (SourcePos, Text)
+typeSource = deftype "pandoc input source"
+ [ operation Tostring $ lambda
+ ### liftPure snd
+ <#> udparam typeSource "srcs" "Source to print in native format"
+ =#> functionResult pushText "string" "Haskell representation"
+ ]
+ [ readonly "name" "source name"
+ (pushString, sourceName . fst)
+ , readonly "text" "source text"
+ (pushText, snd)
+ ]
diff --git a/src/Text/Pandoc/Lua/Marshaling.hs b/src/Text/Pandoc/Lua/Marshaling.hs
deleted file mode 100644
index f517c7c27..000000000
--- a/src/Text/Pandoc/Lua/Marshaling.hs
+++ /dev/null
@@ -1,19 +0,0 @@
-{- |
- Module : Text.Pandoc.Lua.Marshaling
- Copyright : © 2012-2021 John MacFarlane
- © 2017-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
-
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Lua marshaling (pushing) and unmarshaling (peeking) instances.
--}
-module Text.Pandoc.Lua.Marshaling () where
-
-import Text.Pandoc.Lua.Marshaling.AST ()
-import Text.Pandoc.Lua.Marshaling.CommonState ()
-import Text.Pandoc.Lua.Marshaling.Context ()
-import Text.Pandoc.Lua.Marshaling.PandocError()
-import Text.Pandoc.Lua.Marshaling.ReaderOptions ()
-import Text.Pandoc.Lua.Marshaling.Version ()
diff --git a/src/Text/Pandoc/Lua/Marshaling/AST.hs b/src/Text/Pandoc/Lua/Marshaling/AST.hs
deleted file mode 100644
index 8e12d232c..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/AST.hs
+++ /dev/null
@@ -1,378 +0,0 @@
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-{-# LANGUAGE BangPatterns #-}
-{-# LANGUAGE LambdaCase #-}
-{- |
- Module : Text.Pandoc.Lua.Marshaling.AST
- Copyright : © 2012-2021 John MacFarlane
- © 2017-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
-
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Marshaling/unmarshaling instances for document AST elements.
--}
-module Text.Pandoc.Lua.Marshaling.AST
- ( LuaAttr (..)
- , LuaListAttributes (..)
- ) where
-
-import Control.Applicative ((<|>))
-import Control.Monad ((<$!>))
-import Foreign.Lua (Lua, Peekable, Pushable, StackIndex)
-import Text.Pandoc.Definition
-import Text.Pandoc.Error (PandocError)
-import Text.Pandoc.Lua.Util (defineHowTo, pushViaConstructor)
-import Text.Pandoc.Lua.Marshaling.CommonState ()
-
-import qualified Control.Monad.Catch as Catch
-import qualified Foreign.Lua as Lua
-import qualified Text.Pandoc.Lua.Util as LuaUtil
-
-instance Pushable Pandoc where
- push (Pandoc meta blocks) =
- pushViaConstructor "Pandoc" blocks meta
-
-instance Peekable Pandoc where
- peek idx = defineHowTo "get Pandoc value" $! Pandoc
- <$!> LuaUtil.rawField idx "meta"
- <*> LuaUtil.rawField idx "blocks"
-
-instance Pushable Meta where
- push (Meta mmap) =
- pushViaConstructor "Meta" mmap
-instance Peekable Meta where
- peek idx = defineHowTo "get Meta value" $!
- Meta <$!> Lua.peek idx
-
-instance Pushable MetaValue where
- push = pushMetaValue
-instance Peekable MetaValue where
- peek = peekMetaValue
-
-instance Pushable Block where
- push = pushBlock
-
-instance Peekable Block where
- peek = peekBlock
-
--- Inline
-instance Pushable Inline where
- push = pushInline
-
-instance Peekable Inline where
- peek = peekInline
-
--- Citation
-instance Pushable Citation where
- push (Citation cid prefix suffix mode noteNum hash) =
- pushViaConstructor "Citation" cid mode prefix suffix noteNum hash
-
-instance Peekable Citation where
- peek idx = Citation
- <$!> LuaUtil.rawField idx "id"
- <*> LuaUtil.rawField idx "prefix"
- <*> LuaUtil.rawField idx "suffix"
- <*> LuaUtil.rawField idx "mode"
- <*> LuaUtil.rawField idx "note_num"
- <*> LuaUtil.rawField idx "hash"
-
-instance Pushable Alignment where
- push = Lua.push . show
-instance Peekable Alignment where
- peek = Lua.peekRead
-
-instance Pushable CitationMode where
- push = Lua.push . show
-instance Peekable CitationMode where
- peek = Lua.peekRead
-
-instance Pushable Format where
- push (Format f) = Lua.push f
-instance Peekable Format where
- peek idx = Format <$!> Lua.peek idx
-
-instance Pushable ListNumberDelim where
- push = Lua.push . show
-instance Peekable ListNumberDelim where
- peek = Lua.peekRead
-
-instance Pushable ListNumberStyle where
- push = Lua.push . show
-instance Peekable ListNumberStyle where
- peek = Lua.peekRead
-
-instance Pushable MathType where
- push = Lua.push . show
-instance Peekable MathType where
- peek = Lua.peekRead
-
-instance Pushable QuoteType where
- push = Lua.push . show
-instance Peekable QuoteType where
- peek = Lua.peekRead
-
--- | Push an meta value element to the top of the lua stack.
-pushMetaValue :: MetaValue -> Lua ()
-pushMetaValue = \case
- MetaBlocks blcks -> pushViaConstructor "MetaBlocks" blcks
- MetaBool bool -> Lua.push bool
- MetaInlines inlns -> pushViaConstructor "MetaInlines" inlns
- MetaList metalist -> pushViaConstructor "MetaList" metalist
- MetaMap metamap -> pushViaConstructor "MetaMap" metamap
- MetaString str -> Lua.push str
-
--- | Interpret the value at the given stack index as meta value.
-peekMetaValue :: StackIndex -> Lua MetaValue
-peekMetaValue idx = defineHowTo "get MetaValue" $ do
- -- Get the contents of an AST element.
- let elementContent :: Peekable a => Lua a
- elementContent = Lua.peek idx
- luatype <- Lua.ltype idx
- case luatype of
- Lua.TypeBoolean -> MetaBool <$!> Lua.peek idx
- Lua.TypeString -> MetaString <$!> Lua.peek idx
- Lua.TypeTable -> do
- tag <- try $ LuaUtil.getTag idx
- case tag of
- Right "MetaBlocks" -> MetaBlocks <$!> elementContent
- Right "MetaBool" -> MetaBool <$!> elementContent
- Right "MetaMap" -> MetaMap <$!> elementContent
- Right "MetaInlines" -> MetaInlines <$!> elementContent
- Right "MetaList" -> MetaList <$!> elementContent
- Right "MetaString" -> MetaString <$!> elementContent
- Right t -> Lua.throwMessage ("Unknown meta tag: " <> t)
- Left _ -> do
- -- no meta value tag given, try to guess.
- len <- Lua.rawlen idx
- if len <= 0
- then MetaMap <$!> Lua.peek idx
- else (MetaInlines <$!> Lua.peek idx)
- <|> (MetaBlocks <$!> Lua.peek idx)
- <|> (MetaList <$!> Lua.peek idx)
- _ -> Lua.throwMessage "could not get meta value"
-
--- | Push a block element to the top of the Lua stack.
-pushBlock :: Block -> Lua ()
-pushBlock = \case
- BlockQuote blcks -> pushViaConstructor "BlockQuote" blcks
- BulletList items -> pushViaConstructor "BulletList" items
- CodeBlock attr code -> pushViaConstructor "CodeBlock" code (LuaAttr attr)
- DefinitionList items -> pushViaConstructor "DefinitionList" items
- Div attr blcks -> pushViaConstructor "Div" blcks (LuaAttr attr)
- Header lvl attr inlns -> pushViaConstructor "Header" lvl inlns (LuaAttr attr)
- HorizontalRule -> pushViaConstructor "HorizontalRule"
- LineBlock blcks -> pushViaConstructor "LineBlock" blcks
- OrderedList lstAttr list -> pushViaConstructor "OrderedList" list
- (LuaListAttributes lstAttr)
- Null -> pushViaConstructor "Null"
- Para blcks -> pushViaConstructor "Para" blcks
- Plain blcks -> pushViaConstructor "Plain" blcks
- RawBlock f cs -> pushViaConstructor "RawBlock" f cs
- Table attr blkCapt specs thead tbody tfoot ->
- pushViaConstructor "Table" blkCapt specs thead tbody tfoot attr
-
--- | Return the value at the given index as block if possible.
-peekBlock :: StackIndex -> Lua Block
-peekBlock idx = defineHowTo "get Block value" $! do
- tag <- LuaUtil.getTag idx
- case tag of
- "BlockQuote" -> BlockQuote <$!> elementContent
- "BulletList" -> BulletList <$!> elementContent
- "CodeBlock" -> withAttr CodeBlock <$!> elementContent
- "DefinitionList" -> DefinitionList <$!> elementContent
- "Div" -> withAttr Div <$!> elementContent
- "Header" -> (\(lvl, LuaAttr attr, lst) -> Header lvl attr lst)
- <$!> elementContent
- "HorizontalRule" -> return HorizontalRule
- "LineBlock" -> LineBlock <$!> elementContent
- "OrderedList" -> (\(LuaListAttributes lstAttr, lst) ->
- OrderedList lstAttr lst)
- <$!> elementContent
- "Null" -> return Null
- "Para" -> Para <$!> elementContent
- "Plain" -> Plain <$!> elementContent
- "RawBlock" -> uncurry RawBlock <$!> elementContent
- "Table" -> (\(attr, capt, colSpecs, thead, tbodies, tfoot) ->
- Table (fromLuaAttr attr)
- capt
- colSpecs
- thead
- tbodies
- tfoot)
- <$!> elementContent
- _ -> Lua.throwMessage ("Unknown block type: " <> tag)
- where
- -- Get the contents of an AST element.
- elementContent :: Peekable a => Lua a
- elementContent = LuaUtil.rawField idx "c"
-
-instance Pushable Caption where
- push = pushCaption
-
-instance Peekable Caption where
- peek = peekCaption
-
--- | Push Caption element
-pushCaption :: Caption -> Lua ()
-pushCaption (Caption shortCaption longCaption) = do
- Lua.newtable
- LuaUtil.addField "short" (Lua.Optional shortCaption)
- LuaUtil.addField "long" longCaption
-
--- | Peek Caption element
-peekCaption :: StackIndex -> Lua Caption
-peekCaption idx = Caption
- <$!> (Lua.fromOptional <$!> LuaUtil.rawField idx "short")
- <*> LuaUtil.rawField idx "long"
-
-instance Peekable ColWidth where
- peek idx = do
- width <- Lua.fromOptional <$!> Lua.peek idx
- return $! maybe ColWidthDefault ColWidth width
-
-instance Pushable ColWidth where
- push = \case
- (ColWidth w) -> Lua.push w
- ColWidthDefault -> Lua.pushnil
-
-instance Pushable Row where
- push (Row attr cells) = Lua.push (attr, cells)
-
-instance Peekable Row where
- peek = fmap (uncurry Row) . Lua.peek
-
-instance Pushable TableBody where
- push (TableBody attr (RowHeadColumns rowHeadColumns) head' body) = do
- Lua.newtable
- LuaUtil.addField "attr" attr
- LuaUtil.addField "row_head_columns" rowHeadColumns
- LuaUtil.addField "head" head'
- LuaUtil.addField "body" body
-
-instance Peekable TableBody where
- peek idx = TableBody
- <$!> LuaUtil.rawField idx "attr"
- <*> (RowHeadColumns <$!> LuaUtil.rawField idx "row_head_columns")
- <*> LuaUtil.rawField idx "head"
- <*> LuaUtil.rawField idx "body"
-
-instance Pushable TableHead where
- push (TableHead attr rows) = Lua.push (attr, rows)
-
-instance Peekable TableHead where
- peek = fmap (uncurry TableHead) . Lua.peek
-
-instance Pushable TableFoot where
- push (TableFoot attr cells) = Lua.push (attr, cells)
-
-instance Peekable TableFoot where
- peek = fmap (uncurry TableFoot) . Lua.peek
-
-instance Pushable Cell where
- push = pushCell
-
-instance Peekable Cell where
- peek = peekCell
-
-pushCell :: Cell -> Lua ()
-pushCell (Cell attr align (RowSpan rowSpan) (ColSpan colSpan) contents) = do
- Lua.newtable
- LuaUtil.addField "attr" attr
- LuaUtil.addField "alignment" align
- LuaUtil.addField "row_span" rowSpan
- LuaUtil.addField "col_span" colSpan
- LuaUtil.addField "contents" contents
-
-peekCell :: StackIndex -> Lua Cell
-peekCell idx = Cell
- <$!> (fromLuaAttr <$!> LuaUtil.rawField idx "attr")
- <*> LuaUtil.rawField idx "alignment"
- <*> (RowSpan <$!> LuaUtil.rawField idx "row_span")
- <*> (ColSpan <$!> LuaUtil.rawField idx "col_span")
- <*> LuaUtil.rawField idx "contents"
-
--- | Push an inline element to the top of the lua stack.
-pushInline :: Inline -> Lua ()
-pushInline = \case
- Cite citations lst -> pushViaConstructor "Cite" lst citations
- Code attr lst -> pushViaConstructor "Code" lst (LuaAttr attr)
- Emph inlns -> pushViaConstructor "Emph" inlns
- Underline inlns -> pushViaConstructor "Underline" inlns
- Image attr alt (src,tit) -> pushViaConstructor "Image" alt src tit (LuaAttr attr)
- LineBreak -> pushViaConstructor "LineBreak"
- Link attr lst (src,tit) -> pushViaConstructor "Link" lst src tit (LuaAttr attr)
- Note blcks -> pushViaConstructor "Note" blcks
- Math mty str -> pushViaConstructor "Math" mty str
- Quoted qt inlns -> pushViaConstructor "Quoted" qt inlns
- RawInline f cs -> pushViaConstructor "RawInline" f cs
- SmallCaps inlns -> pushViaConstructor "SmallCaps" inlns
- SoftBreak -> pushViaConstructor "SoftBreak"
- Space -> pushViaConstructor "Space"
- Span attr inlns -> pushViaConstructor "Span" inlns (LuaAttr attr)
- Str str -> pushViaConstructor "Str" str
- Strikeout inlns -> pushViaConstructor "Strikeout" inlns
- Strong inlns -> pushViaConstructor "Strong" inlns
- Subscript inlns -> pushViaConstructor "Subscript" inlns
- Superscript inlns -> pushViaConstructor "Superscript" inlns
-
--- | Return the value at the given index as inline if possible.
-peekInline :: StackIndex -> Lua Inline
-peekInline idx = defineHowTo "get Inline value" $ do
- tag <- LuaUtil.getTag idx
- case tag of
- "Cite" -> uncurry Cite <$!> elementContent
- "Code" -> withAttr Code <$!> elementContent
- "Emph" -> Emph <$!> elementContent
- "Underline" -> Underline <$!> elementContent
- "Image" -> (\(LuaAttr !attr, !lst, !tgt) -> Image attr lst tgt)
- <$!> elementContent
- "Link" -> (\(LuaAttr !attr, !lst, !tgt) -> Link attr lst tgt)
- <$!> elementContent
- "LineBreak" -> return LineBreak
- "Note" -> Note <$!> elementContent
- "Math" -> uncurry Math <$!> elementContent
- "Quoted" -> uncurry Quoted <$!> elementContent
- "RawInline" -> uncurry RawInline <$!> elementContent
- "SmallCaps" -> SmallCaps <$!> elementContent
- "SoftBreak" -> return SoftBreak
- "Space" -> return Space
- "Span" -> withAttr Span <$!> elementContent
- -- strict to Lua string is copied before gc
- "Str" -> Str <$!> elementContent
- "Strikeout" -> Strikeout <$!> elementContent
- "Strong" -> Strong <$!> elementContent
- "Subscript" -> Subscript <$!> elementContent
- "Superscript"-> Superscript <$!> elementContent
- _ -> Lua.throwMessage ("Unknown inline type: " <> tag)
- where
- -- Get the contents of an AST element.
- elementContent :: Peekable a => Lua a
- elementContent = LuaUtil.rawField idx "c"
-
-try :: Lua a -> Lua (Either PandocError a)
-try = Catch.try
-
-withAttr :: (Attr -> a -> b) -> (LuaAttr, a) -> b
-withAttr f (attributes, x) = f (fromLuaAttr attributes) x
-
--- | Wrapper for Attr
-newtype LuaAttr = LuaAttr { fromLuaAttr :: Attr }
-
-instance Pushable LuaAttr where
- push (LuaAttr (id', classes, kv)) =
- pushViaConstructor "Attr" id' classes kv
-
-instance Peekable LuaAttr where
- peek idx = defineHowTo "get Attr value" $! (LuaAttr <$!> Lua.peek idx)
-
--- | Wrapper for ListAttributes
-newtype LuaListAttributes = LuaListAttributes ListAttributes
-
-instance Pushable LuaListAttributes where
- push (LuaListAttributes (start, style, delimiter)) =
- pushViaConstructor "ListAttributes" start style delimiter
-
-instance Peekable LuaListAttributes where
- peek = defineHowTo "get ListAttributes value" .
- fmap LuaListAttributes . Lua.peek
diff --git a/src/Text/Pandoc/Lua/Marshaling/AnyValue.hs b/src/Text/Pandoc/Lua/Marshaling/AnyValue.hs
deleted file mode 100644
index 82e26b963..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/AnyValue.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-{- |
- Module : Text.Pandoc.Lua.Marshaling.AnyValue
- Copyright : © 2017-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
-
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Helper type to work with raw Lua stack indices instead of unmarshaled
-values.
-
-TODO: Most of this module should be abstracted, factored out, and go
-into HsLua.
--}
-module Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..)) where
-
-import Foreign.Lua (Peekable (peek), StackIndex)
-
--- | Dummy type to allow values of arbitrary Lua type. This just wraps
--- stack indices, using it requires extra care.
-newtype AnyValue = AnyValue StackIndex
-
-instance Peekable AnyValue where
- peek = return . AnyValue
diff --git a/src/Text/Pandoc/Lua/Marshaling/CommonState.hs b/src/Text/Pandoc/Lua/Marshaling/CommonState.hs
deleted file mode 100644
index 147197c5d..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/CommonState.hs
+++ /dev/null
@@ -1,102 +0,0 @@
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE OverloadedStrings #-}
-{- |
- Module : Text.Pandoc.Lua.Marshaling.CommonState
- Copyright : © 2012-2021 John MacFarlane
- © 2017-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Instances to marshal (push) and unmarshal (peek) the common state.
--}
-module Text.Pandoc.Lua.Marshaling.CommonState () where
-
-import Foreign.Lua (Lua, Peekable, Pushable)
-import Foreign.Lua.Types.Peekable (reportValueOnFailure)
-import Foreign.Lua.Userdata (ensureUserdataMetatable, pushAnyWithMetatable,
- toAnyWithName)
-import Text.Pandoc.Class (CommonState (..))
-import Text.Pandoc.Logging (LogMessage, showLogMessage)
-import Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..))
-
-import qualified Data.Map as Map
-import qualified Data.Text as Text
-import qualified Foreign.Lua as Lua
-import qualified Text.Pandoc.Lua.Util as LuaUtil
-
--- | Name used by Lua for the @CommonState@ type.
-commonStateTypeName :: String
-commonStateTypeName = "Pandoc CommonState"
-
-instance Peekable CommonState where
- peek idx = reportValueOnFailure commonStateTypeName
- (`toAnyWithName` commonStateTypeName) idx
-
-instance Pushable CommonState where
- push st = pushAnyWithMetatable pushCommonStateMetatable st
- where
- pushCommonStateMetatable = ensureUserdataMetatable commonStateTypeName $ do
- LuaUtil.addFunction "__index" indexCommonState
- LuaUtil.addFunction "__pairs" pairsCommonState
-
-indexCommonState :: CommonState -> AnyValue -> Lua Lua.NumResults
-indexCommonState st (AnyValue idx) = Lua.ltype idx >>= \case
- Lua.TypeString -> 1 <$ (Lua.peek idx >>= pushField)
- _ -> 1 <$ Lua.pushnil
- where
- pushField :: Text.Text -> Lua ()
- pushField name = case lookup name commonStateFields of
- Just pushValue -> pushValue st
- Nothing -> Lua.pushnil
-
-pairsCommonState :: CommonState -> Lua Lua.NumResults
-pairsCommonState st = do
- Lua.pushHaskellFunction nextFn
- Lua.pushnil
- Lua.pushnil
- return 3
- where
- nextFn :: AnyValue -> AnyValue -> Lua Lua.NumResults
- nextFn _ (AnyValue idx) =
- Lua.ltype idx >>= \case
- Lua.TypeNil -> case commonStateFields of
- [] -> 2 <$ (Lua.pushnil *> Lua.pushnil)
- (key, pushValue):_ -> 2 <$ (Lua.push key *> pushValue st)
- Lua.TypeString -> do
- key <- Lua.peek idx
- case tail $ dropWhile ((/= key) . fst) commonStateFields of
- [] -> 2 <$ (Lua.pushnil *> Lua.pushnil)
- (nextKey, pushValue):_ -> 2 <$ (Lua.push nextKey *> pushValue st)
- _ -> 2 <$ (Lua.pushnil *> Lua.pushnil)
-
-commonStateFields :: [(Text.Text, CommonState -> Lua ())]
-commonStateFields =
- [ ("input_files", Lua.push . stInputFiles)
- , ("output_file", Lua.push . Lua.Optional . stOutputFile)
- , ("log", Lua.push . stLog)
- , ("request_headers", Lua.push . Map.fromList . stRequestHeaders)
- , ("resource_path", Lua.push . stResourcePath)
- , ("source_url", Lua.push . Lua.Optional . stSourceURL)
- , ("user_data_dir", Lua.push . Lua.Optional . stUserDataDir)
- , ("trace", Lua.push . stTrace)
- , ("verbosity", Lua.push . show . stVerbosity)
- ]
-
--- | Name used by Lua for the @CommonState@ type.
-logMessageTypeName :: String
-logMessageTypeName = "Pandoc LogMessage"
-
-instance Peekable LogMessage where
- peek idx = reportValueOnFailure logMessageTypeName
- (`toAnyWithName` logMessageTypeName) idx
-
-instance Pushable LogMessage where
- push msg = pushAnyWithMetatable pushLogMessageMetatable msg
- where
- pushLogMessageMetatable = ensureUserdataMetatable logMessageTypeName $
- LuaUtil.addFunction "__tostring" tostringLogMessage
-
-tostringLogMessage :: LogMessage -> Lua Text.Text
-tostringLogMessage = return . showLogMessage
diff --git a/src/Text/Pandoc/Lua/Marshaling/List.hs b/src/Text/Pandoc/Lua/Marshaling/List.hs
deleted file mode 100644
index 0446302a1..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/List.hs
+++ /dev/null
@@ -1,43 +0,0 @@
-{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
-{-# LANGUAGE UndecidableInstances #-}
-{- |
-Module : Text.Pandoc.Lua.Marshaling.List
-Copyright : © 2012-2021 John MacFarlane
- © 2017-2021 Albert Krewinkel
-License : GNU GPL, version 2 or above
-Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
-Stability : alpha
-
-Marshaling/unmarshaling instances for @pandoc.List@s.
--}
-module Text.Pandoc.Lua.Marshaling.List
- ( List (..)
- ) where
-
-import Data.Data (Data)
-import Foreign.Lua (Peekable, Pushable)
-import Text.Pandoc.Walk (Walkable (..))
-import Text.Pandoc.Lua.Util (defineHowTo, pushViaConstructor)
-
-import qualified Foreign.Lua as Lua
-
--- | List wrapper which is marshalled as @pandoc.List@.
-newtype List a = List { fromList :: [a] }
- deriving (Data, Eq, Show)
-
-instance Pushable a => Pushable (List a) where
- push (List xs) =
- pushViaConstructor "List" xs
-
-instance Peekable a => Peekable (List a) where
- peek idx = defineHowTo "get List" $ do
- xs <- Lua.peek idx
- return $ List xs
-
--- List is just a wrapper, so we can reuse the walk instance for
--- unwrapped Hasekll lists.
-instance Walkable [a] b => Walkable (List a) b where
- walkM f = walkM (fmap fromList . f . List)
- query f = query (f . List)
diff --git a/src/Text/Pandoc/Lua/Marshaling/MediaBag.hs b/src/Text/Pandoc/Lua/Marshaling/MediaBag.hs
deleted file mode 100644
index 70bd010a0..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/MediaBag.hs
+++ /dev/null
@@ -1,73 +0,0 @@
-{- |
- Module : Text.Pandoc.Lua.Marshaling.MediaBag
- Copyright : © 2012-2021 John MacFarlane
- © 2017-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Instances to marshal (push) and unmarshal (peek) media data.
--}
-module Text.Pandoc.Lua.Marshaling.MediaBag (pushIterator) where
-
-import Foreign.Ptr (Ptr)
-import Foreign.StablePtr (StablePtr, deRefStablePtr, newStablePtr)
-import Foreign.Lua (Lua, NumResults, Peekable, Pushable, StackIndex)
-import Foreign.Lua.Types.Peekable (reportValueOnFailure)
-import Foreign.Lua.Userdata (ensureUserdataMetatable, pushAnyWithMetatable,
- toAnyWithName)
-import Text.Pandoc.MediaBag (MediaBag, mediaItems)
-import Text.Pandoc.MIME (MimeType)
-import Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..))
-
-import qualified Data.ByteString.Lazy as BL
-import qualified Foreign.Lua as Lua
-import qualified Foreign.Storable as Storable
-
--- | A list of 'MediaBag' items.
-newtype MediaItems = MediaItems [(String, MimeType, BL.ByteString)]
-
-instance Pushable MediaItems where
- push = pushMediaItems
-
-instance Peekable MediaItems where
- peek = peekMediaItems
-
--- | Push an iterator triple to be used with Lua's @for@ loop construct.
--- Each iterator invocation returns a triple containing the item's
--- filename, MIME type, and content.
-pushIterator :: MediaBag -> Lua NumResults
-pushIterator mb = do
- Lua.pushHaskellFunction nextItem
- Lua.push (MediaItems $ mediaItems mb)
- Lua.pushnil
- return 3
-
--- | Lua type name for @'MediaItems'@.
-mediaItemsTypeName :: String
-mediaItemsTypeName = "pandoc MediaItems"
-
--- | Push a @MediaItems@ element to the stack.
-pushMediaItems :: MediaItems -> Lua ()
-pushMediaItems xs = pushAnyWithMetatable pushMT xs
- where
- pushMT = ensureUserdataMetatable mediaItemsTypeName (return ())
-
--- | Retrieve a @MediaItems@ element from the stack.
-peekMediaItems :: StackIndex -> Lua MediaItems
-peekMediaItems = reportValueOnFailure mediaItemsTypeName
- (`toAnyWithName` mediaItemsTypeName)
-
--- | Retrieve a list of items from an iterator state, return the first
--- item (if present), and advance the state.
-nextItem :: Ptr (StablePtr MediaItems) -> AnyValue -> Lua NumResults
-nextItem ptr _ = do
- (MediaItems items) <- Lua.liftIO $ deRefStablePtr =<< Storable.peek ptr
- case items of
- [] -> 2 <$ (Lua.pushnil *> Lua.pushnil)
- (key, mt, content):xs -> do
- Lua.liftIO $ Storable.poke ptr =<< newStablePtr (MediaItems xs)
- Lua.push key
- Lua.push mt
- Lua.push content
- return 3
diff --git a/src/Text/Pandoc/Lua/Marshaling/PandocError.hs b/src/Text/Pandoc/Lua/Marshaling/PandocError.hs
deleted file mode 100644
index f698704e0..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/PandocError.hs
+++ /dev/null
@@ -1,65 +0,0 @@
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-{- |
- Module : Text.Pandoc.Lua.Marshaling.PandocError
- Copyright : © 2020-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
-
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Marshaling of @'PandocError'@ values.
--}
-module Text.Pandoc.Lua.Marshaling.PandocError
- ( peekPandocError
- , pushPandocError
- )
- where
-
-import Foreign.Lua (Lua, Peekable, Pushable, StackIndex)
-import Text.Pandoc.Error (PandocError (PandocLuaError))
-
-import qualified Foreign.Lua as Lua
-import qualified Foreign.Lua.Userdata as Lua
-import qualified Text.Pandoc.Lua.Util as LuaUtil
-import qualified Text.Pandoc.UTF8 as UTF8
-
--- | Userdata name used by Lua for the @PandocError@ type.
-pandocErrorName :: String
-pandocErrorName = "pandoc error"
-
--- | Peek a @'PandocError'@ element to the Lua stack.
-pushPandocError :: PandocError -> Lua ()
-pushPandocError = Lua.pushAnyWithMetatable pushPandocErrorMT
- where
- pushPandocErrorMT = Lua.ensureUserdataMetatable pandocErrorName $
- LuaUtil.addFunction "__tostring" __tostring
-
--- | Retrieve a @'PandocError'@ from the Lua stack.
-peekPandocError :: StackIndex -> Lua PandocError
-peekPandocError idx = Lua.ltype idx >>= \case
- Lua.TypeUserdata -> do
- errMb <- Lua.toAnyWithName idx pandocErrorName
- return $ case errMb of
- Just err -> err
- Nothing -> PandocLuaError "could not retrieve original error"
- _ -> do
- Lua.pushvalue idx
- msg <- Lua.state >>= \l -> Lua.liftIO (Lua.errorMessage l)
- return $ PandocLuaError (UTF8.toText msg)
-
--- | Convert to string.
-__tostring :: PandocError -> Lua String
-__tostring = return . show
-
---
--- Instances
---
-
-instance Pushable PandocError where
- push = pushPandocError
-
-instance Peekable PandocError where
- peek = peekPandocError
diff --git a/src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs b/src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs
deleted file mode 100644
index dd7bf2e61..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/ReaderOptions.hs
+++ /dev/null
@@ -1,79 +0,0 @@
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-{- |
- Module : Text.Pandoc.Lua.Marshaling.ReaderOptions
- Copyright : © 2012-2021 John MacFarlane
- © 2017-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
-
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Marshaling instance for ReaderOptions and its components.
--}
-module Text.Pandoc.Lua.Marshaling.ReaderOptions () where
-
-import Data.Data (showConstr, toConstr)
-import Foreign.Lua (Lua, Pushable)
-import Text.Pandoc.Extensions (Extensions)
-import Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..))
-import Text.Pandoc.Lua.Marshaling.CommonState ()
-import Text.Pandoc.Options (ReaderOptions (..), TrackChanges)
-
-import qualified Data.Set as Set
-import qualified Data.Text as Text
-import qualified Foreign.Lua as Lua
-import qualified Text.Pandoc.Lua.Util as LuaUtil
-
---
--- Reader Options
---
-instance Pushable Extensions where
- push exts = Lua.push (show exts)
-
-instance Pushable TrackChanges where
- push = Lua.push . showConstr . toConstr
-
-instance Pushable ReaderOptions where
- push ro = do
- let ReaderOptions
- (extensions :: Extensions)
- (standalone :: Bool)
- (columns :: Int)
- (tabStop :: Int)
- (indentedCodeClasses :: [Text.Text])
- (abbreviations :: Set.Set Text.Text)
- (defaultImageExtension :: Text.Text)
- (trackChanges :: TrackChanges)
- (stripComments :: Bool)
- = ro
- Lua.newtable
- LuaUtil.addField "extensions" extensions
- LuaUtil.addField "standalone" standalone
- LuaUtil.addField "columns" columns
- LuaUtil.addField "tab_stop" tabStop
- LuaUtil.addField "indented_code_classes" indentedCodeClasses
- LuaUtil.addField "abbreviations" abbreviations
- LuaUtil.addField "default_image_extension" defaultImageExtension
- LuaUtil.addField "track_changes" trackChanges
- LuaUtil.addField "strip_comments" stripComments
-
- -- add metatable
- let indexReaderOptions :: AnyValue -> AnyValue -> Lua Lua.NumResults
- indexReaderOptions _tbl (AnyValue key) = do
- Lua.ltype key >>= \case
- Lua.TypeString -> Lua.peek key >>= \case
- ("defaultImageExtension" :: Text.Text)
- -> Lua.push defaultImageExtension
- "indentedCodeClasses" -> Lua.push indentedCodeClasses
- "stripComments" -> Lua.push stripComments
- "tabStop" -> Lua.push tabStop
- "trackChanges" -> Lua.push trackChanges
- _ -> Lua.pushnil
- _ -> Lua.pushnil
- return 1
- Lua.newtable
- LuaUtil.addFunction "__index" indexReaderOptions
- Lua.setmetatable (Lua.nthFromTop 2)
diff --git a/src/Text/Pandoc/Lua/Marshaling/SimpleTable.hs b/src/Text/Pandoc/Lua/Marshaling/SimpleTable.hs
deleted file mode 100644
index 6d43039fa..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/SimpleTable.hs
+++ /dev/null
@@ -1,59 +0,0 @@
-{- |
- Module : Text.Pandoc.Lua.Marshaling.SimpleTable
- Copyright : © 2020-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
-
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Definition and marshaling of the 'SimpleTable' data type used as a
-convenience type when dealing with tables.
--}
-module Text.Pandoc.Lua.Marshaling.SimpleTable
- ( SimpleTable (..)
- , peekSimpleTable
- , pushSimpleTable
- )
- where
-
-import Foreign.Lua (Lua, Peekable, Pushable, StackIndex)
-import Text.Pandoc.Definition
-import Text.Pandoc.Lua.Util (defineHowTo, pushViaConstructor, rawField)
-import Text.Pandoc.Lua.Marshaling.AST ()
-
-import qualified Foreign.Lua as Lua
-
--- | A simple (legacy-style) table.
-data SimpleTable = SimpleTable
- { simpleTableCaption :: [Inline]
- , simpleTableAlignments :: [Alignment]
- , simpleTableColumnWidths :: [Double]
- , simpleTableHeader :: [[Block]]
- , simpleTableBody :: [[[Block]]]
- }
-
-instance Pushable SimpleTable where
- push = pushSimpleTable
-
-instance Peekable SimpleTable where
- peek = peekSimpleTable
-
--- | Push a simple table to the stack by calling the
--- @pandoc.SimpleTable@ constructor.
-pushSimpleTable :: SimpleTable -> Lua ()
-pushSimpleTable tbl = pushViaConstructor "SimpleTable"
- (simpleTableCaption tbl)
- (simpleTableAlignments tbl)
- (simpleTableColumnWidths tbl)
- (simpleTableHeader tbl)
- (simpleTableBody tbl)
-
--- | Retrieve a simple table from the stack.
-peekSimpleTable :: StackIndex -> Lua SimpleTable
-peekSimpleTable idx = defineHowTo "get SimpleTable" $
- SimpleTable
- <$> rawField idx "caption"
- <*> rawField idx "aligns"
- <*> rawField idx "widths"
- <*> rawField idx "headers"
- <*> rawField idx "rows"
diff --git a/src/Text/Pandoc/Lua/Marshaling/Version.hs b/src/Text/Pandoc/Lua/Marshaling/Version.hs
deleted file mode 100644
index 4f4ffac51..000000000
--- a/src/Text/Pandoc/Lua/Marshaling/Version.hs
+++ /dev/null
@@ -1,154 +0,0 @@
-{-# OPTIONS_GHC -fno-warn-orphans #-}
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ScopedTypeVariables #-}
-{- |
- Module : Text.Pandoc.Lua.Marshaling.Version
- Copyright : © 2019-2021 Albert Krewinkel
- License : GNU GPL, version 2 or above
-
- Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-
-Marshaling of @'Version'@s. The marshaled elements can be compared using
-default comparison operators (like @>@ and @<=@).
--}
-module Text.Pandoc.Lua.Marshaling.Version
- ( peekVersion
- , pushVersion
- )
- where
-
-import Data.Text (Text)
-import Data.Maybe (fromMaybe)
-import Data.Version (Version (..), makeVersion, parseVersion, showVersion)
-import Foreign.Lua (Lua, Optional (..), NumResults,
- Peekable, Pushable, StackIndex)
-import Foreign.Lua.Types.Peekable (reportValueOnFailure)
-import Foreign.Lua.Userdata (ensureUserdataMetatable, pushAnyWithMetatable,
- toAnyWithName)
-import Safe (atMay, lastMay)
-import Text.Pandoc.Lua.Marshaling.AnyValue (AnyValue (..))
-import Text.ParserCombinators.ReadP (readP_to_S)
-
-import qualified Foreign.Lua as Lua
-import qualified Text.Pandoc.Lua.Util as LuaUtil
-
--- | Push a @'Version'@ element to the Lua stack.
-pushVersion :: Version -> Lua ()
-pushVersion version = pushAnyWithMetatable pushVersionMT version
- where
- pushVersionMT = ensureUserdataMetatable versionTypeName $ do
- LuaUtil.addFunction "__eq" __eq
- LuaUtil.addFunction "__le" __le
- LuaUtil.addFunction "__lt" __lt
- LuaUtil.addFunction "__len" __len
- LuaUtil.addFunction "__index" __index
- LuaUtil.addFunction "__pairs" __pairs
- LuaUtil.addFunction "__tostring" __tostring
-
-instance Pushable Version where
- push = pushVersion
-
-peekVersion :: StackIndex -> Lua Version
-peekVersion idx = Lua.ltype idx >>= \case
- Lua.TypeString -> do
- versionStr <- Lua.peek idx
- let parses = readP_to_S parseVersion versionStr
- case lastMay parses of
- Just (v, "") -> return v
- _ -> Lua.throwMessage $ "could not parse as Version: " ++ versionStr
-
- Lua.TypeUserdata ->
- reportValueOnFailure versionTypeName
- (`toAnyWithName` versionTypeName)
- idx
- Lua.TypeNumber -> do
- n <- Lua.peek idx
- return (makeVersion [n])
-
- Lua.TypeTable ->
- makeVersion <$> Lua.peek idx
-
- _ ->
- Lua.throwMessage "could not peek Version"
-
-instance Peekable Version where
- peek = peekVersion
-
--- | Name used by Lua for the @CommonState@ type.
-versionTypeName :: String
-versionTypeName = "HsLua Version"
-
-__eq :: Version -> Version -> Lua Bool
-__eq v1 v2 = return (v1 == v2)
-
-__le :: Version -> Version -> Lua Bool
-__le v1 v2 = return (v1 <= v2)
-
-__lt :: Version -> Version -> Lua Bool
-__lt v1 v2 = return (v1 < v2)
-
--- | Get number of version components.
-__len :: Version -> Lua Int
-__len = return . length . versionBranch
-
--- | Access fields.
-__index :: Version -> AnyValue -> Lua NumResults
-__index v (AnyValue k) = do
- ty <- Lua.ltype k
- case ty of
- Lua.TypeNumber -> do
- n <- Lua.peek k
- let versionPart = atMay (versionBranch v) (n - 1)
- Lua.push (Lua.Optional versionPart)
- return 1
- Lua.TypeString -> do
- (str :: Text) <- Lua.peek k
- if str == "must_be_at_least"
- then 1 <$ Lua.pushHaskellFunction must_be_at_least
- else 1 <$ Lua.pushnil
- _ -> 1 <$ Lua.pushnil
-
--- | Create iterator.
-__pairs :: Version -> Lua NumResults
-__pairs v = do
- Lua.pushHaskellFunction nextFn
- Lua.pushnil
- Lua.pushnil
- return 3
- where
- nextFn :: AnyValue -> Optional Int -> Lua Lua.NumResults
- nextFn _ (Optional key) =
- case key of
- Nothing -> case versionBranch v of
- [] -> 2 <$ (Lua.pushnil *> Lua.pushnil)
- n:_ -> 2 <$ (Lua.push (1 :: Int) *> Lua.push n)
- Just n -> case atMay (versionBranch v) n of
- Nothing -> 2 <$ (Lua.pushnil *> Lua.pushnil)
- Just b -> 2 <$ (Lua.push (n + 1) *> Lua.push b)
-
--- | Convert to string.
-__tostring :: Version -> Lua String
-__tostring v = return (showVersion v)
-
--- | Default error message when a version is too old. This message is
--- formatted in Lua with the expected and actual versions as arguments.
-versionTooOldMessage :: String
-versionTooOldMessage = "expected version %s or newer, got %s"
-
--- | Throw an error if this version is older than the given version.
--- FIXME: This function currently requires the string library to be
--- loaded.
-must_be_at_least :: Version -> Version -> Optional String -> Lua NumResults
-must_be_at_least actual expected optMsg = do
- let msg = fromMaybe versionTooOldMessage (fromOptional optMsg)
- if expected <= actual
- then return 0
- else do
- Lua.getglobal' "string.format"
- Lua.push msg
- Lua.push (showVersion expected)
- Lua.push (showVersion actual)
- Lua.call 3 1
- Lua.error
diff --git a/src/Text/Pandoc/Lua/Module/MediaBag.hs b/src/Text/Pandoc/Lua/Module/MediaBag.hs
index 3eed50fca..fb055101e 100644
--- a/src/Text/Pandoc/Lua/Module/MediaBag.hs
+++ b/src/Text/Pandoc/Lua/Module/MediaBag.hs
@@ -1,103 +1,126 @@
+{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Text.Pandoc.Lua.Module.MediaBag
Copyright : Copyright © 2017-2021 Albert Krewinkel
License : GNU GPL, version 2 or above
-
Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
- Stability : alpha
-The lua module @pandoc.mediabag@.
+The Lua module @pandoc.mediabag@.
-}
module Text.Pandoc.Lua.Module.MediaBag
- ( pushModule
+ ( documentedModule
) where
import Prelude hiding (lookup)
-import Control.Monad (zipWithM_)
-import Foreign.Lua (Lua, NumResults, Optional)
+import Data.Maybe (fromMaybe)
+import HsLua ( LuaE, DocumentedFunction, Module (..)
+ , (<#>), (###), (=#>), (=?>), defun, functionResult
+ , optionalParameter , parameter)
import Text.Pandoc.Class.CommonState (CommonState (..))
import Text.Pandoc.Class.PandocMonad (fetchItem, getMediaBag, modifyCommonState,
setMediaBag)
-import Text.Pandoc.Lua.Marshaling ()
-import Text.Pandoc.Lua.Marshaling.MediaBag (pushIterator)
-import Text.Pandoc.Lua.PandocLua (PandocLua (..), liftPandocLua, addFunction)
+import Text.Pandoc.Error (PandocError)
+import Text.Pandoc.Lua.Marshal.List (pushPandocList)
+import Text.Pandoc.Lua.Orphans ()
+import Text.Pandoc.Lua.PandocLua (unPandocLua)
import Text.Pandoc.MIME (MimeType)
import qualified Data.ByteString.Lazy as BL
-import qualified Data.Text as T
-import qualified Foreign.Lua as Lua
+import qualified HsLua as Lua
import qualified Text.Pandoc.MediaBag as MB
--
-- MediaBag submodule
--
-pushModule :: PandocLua NumResults
-pushModule = do
- liftPandocLua Lua.newtable
- addFunction "delete" delete
- addFunction "empty" empty
- addFunction "insert" insert
- addFunction "items" items
- addFunction "lookup" lookup
- addFunction "list" list
- addFunction "fetch" fetch
- return 1
+documentedModule :: Module PandocError
+documentedModule = Module
+ { moduleName = "pandoc.mediabag"
+ , moduleDescription = "mediabag access"
+ , moduleFields = []
+ , moduleFunctions =
+ [ delete
+ , empty
+ , fetch
+ , insert
+ , items
+ , list
+ , lookup
+ ]
+ , moduleOperations = []
+ }
-- | Delete a single item from the media bag.
-delete :: FilePath -> PandocLua NumResults
-delete fp = 0 <$ modifyCommonState
- (\st -> st { stMediaBag = MB.deleteMedia fp (stMediaBag st) })
+delete :: DocumentedFunction PandocError
+delete = defun "delete"
+ ### (\fp -> unPandocLua $ modifyCommonState
+ (\st -> st { stMediaBag = MB.deleteMedia fp (stMediaBag st) }))
+ <#> parameter Lua.peekString "string" "filepath" "filename of item to delete"
+ =#> []
+
-- | Delete all items from the media bag.
-empty :: PandocLua NumResults
-empty = 0 <$ modifyCommonState (\st -> st { stMediaBag = mempty })
+empty :: DocumentedFunction PandocError
+empty = defun "empty"
+ ### unPandocLua (modifyCommonState (\st -> st { stMediaBag = mempty }))
+ =#> []
-- | Insert a new item into the media bag.
-insert :: FilePath
- -> Optional MimeType
- -> BL.ByteString
- -> PandocLua NumResults
-insert fp optionalMime contents = do
- mb <- getMediaBag
- setMediaBag $ MB.insertMedia fp (Lua.fromOptional optionalMime) contents mb
- return (Lua.NumResults 0)
+insert :: DocumentedFunction PandocError
+insert = defun "insert"
+ ### (\fp mmime contents -> unPandocLua $ do
+ mb <- getMediaBag
+ setMediaBag $ MB.insertMedia fp mmime contents mb
+ return (Lua.NumResults 0))
+ <#> parameter Lua.peekString "string" "filepath" "item file path"
+ <#> optionalParameter Lua.peekText "string" "mimetype" "the item's MIME type"
+ <#> parameter Lua.peekLazyByteString "string" "contents" "binary contents"
+ =?> "Nothing"
-- | Returns iterator values to be used with a Lua @for@ loop.
-items :: PandocLua NumResults
-items = getMediaBag >>= liftPandocLua . pushIterator
+items :: DocumentedFunction PandocError
+items = defun "items"
+ ### (do
+ mb <-unPandocLua getMediaBag
+ let pushItem (fp, mimetype, contents) = do
+ Lua.pushString fp
+ Lua.pushText mimetype
+ Lua.pushByteString $ BL.toStrict contents
+ return (Lua.NumResults 3)
+ Lua.pushIterator pushItem (MB.mediaItems mb))
+ =?> "Iterator triple"
-lookup :: FilePath
- -> PandocLua NumResults
-lookup fp = do
- res <- MB.lookupMedia fp <$> getMediaBag
- liftPandocLua $ case res of
- Nothing -> 1 <$ Lua.pushnil
- Just item -> do
- Lua.push $ MB.mediaMimeType item
- Lua.push $ MB.mediaContents item
- return 2
+-- | Function to lookup a value in the mediabag.
+lookup :: DocumentedFunction PandocError
+lookup = defun "lookup"
+ ### (\fp -> unPandocLua (MB.lookupMedia fp <$> getMediaBag) >>= \case
+ Nothing -> 1 <$ Lua.pushnil
+ Just item -> 2 <$ do
+ Lua.pushText $ MB.mediaMimeType item
+ Lua.pushLazyByteString $ MB.mediaContents item)
+ <#> parameter Lua.peekString "string" "filepath" "path of item to lookup"
+ =?> "MIME type and contents"
-list :: PandocLua NumResults
-list = do
- dirContents <- MB.mediaDirectory <$> getMediaBag
- liftPandocLua $ do
- Lua.newtable
- zipWithM_ addEntry [1..] dirContents
- return 1
+-- | Function listing all mediabag items.
+list :: DocumentedFunction PandocError
+list = defun "list"
+ ### (unPandocLua (MB.mediaDirectory <$> getMediaBag))
+ =#> functionResult (pushPandocList pushEntry) "table" "list of entry triples"
where
- addEntry :: Lua.Integer -> (FilePath, MimeType, Int) -> Lua ()
- addEntry idx (fp, mimeType, contentLength) = do
+ pushEntry :: (FilePath, MimeType, Int) -> LuaE PandocError ()
+ pushEntry (fp, mimeType, contentLength) = do
Lua.newtable
- Lua.push ("path" :: T.Text) *> Lua.push fp *> Lua.rawset (-3)
- Lua.push ("type" :: T.Text) *> Lua.push mimeType *> Lua.rawset (-3)
- Lua.push ("length" :: T.Text) *> Lua.push contentLength *> Lua.rawset (-3)
- Lua.rawseti (-2) idx
+ Lua.pushName "path" *> Lua.pushString fp *> Lua.rawset (-3)
+ Lua.pushName "type" *> Lua.pushText mimeType *> Lua.rawset (-3)
+ Lua.pushName "length" *> Lua.pushIntegral contentLength *> Lua.rawset (-3)
-fetch :: T.Text
- -> PandocLua NumResults
-fetch src = do
- (bs, mimeType) <- fetchItem src
- liftPandocLua . Lua.push $ maybe "" T.unpack mimeType
- liftPandocLua $ Lua.push bs
- return 2 -- returns 2 values: contents, mimetype
+-- | Lua function to retrieve a new item.
+fetch :: DocumentedFunction PandocError
+fetch = defun "fetch"
+ ### (\src -> do
+ (bs, mimeType) <- unPandocLua $ fetchItem src
+ Lua.pushText $ fromMaybe "" mimeType
+ Lua.pushByteString bs
+ return 2)
+ <#> parameter Lua.peekText "string" "src" "URI to fetch"
+ =?> "Returns two string values: the fetched contents and the mimetype."
diff --git a/src/Text/Pandoc/Lua/Module/Pandoc.hs b/src/Text/Pandoc/Lua/Module/Pandoc.hs
index 5c14b3a30..20c2f5af5 100644
--- a/src/Text/Pandoc/Lua/Module/Pandoc.hs
+++ b/src/Text/Pandoc/Lua/Module/Pandoc.hs
@@ -1,5 +1,8 @@
+{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
{- |
Module : Text.Pandoc.Lua.Module.Pandoc
Copyright : Copyright © 2017-2021 Albert Krewinkel
@@ -12,32 +15,37 @@ Pandoc module for lua.
-}
module Text.Pandoc.Lua.Module.Pandoc
( pushModule
+ , documentedModule
) where
import Prelude hiding (read)
-import Control.Monad (when)
+import Control.Monad (forM_, when)
+import Control.Monad.Catch (catch, throwM)
import Control.Monad.Except (throwError)
+import Data.Data (Data, dataTypeConstrs, dataTypeOf, showConstr)
import Data.Default (Default (..))
import Data.Maybe (fromMaybe)
-import Foreign.Lua (Lua, NumResults, Optional, Peekable, Pushable)
+import Data.Proxy (Proxy (Proxy))
+import HsLua hiding (pushModule)
+import HsLua.Class.Peekable (PeekError)
import System.Exit (ExitCode (..))
import Text.Pandoc.Class.PandocIO (runIO)
-import Text.Pandoc.Definition (Block, Inline)
-import Text.Pandoc.Lua.Filter (LuaFilter, SingletonsList (..), walkInlines,
- walkInlineLists, walkBlocks, walkBlockLists)
-import Text.Pandoc.Lua.Marshaling ()
-import Text.Pandoc.Lua.Marshaling.List (List (..))
-import Text.Pandoc.Lua.PandocLua (PandocLua, addFunction, liftPandocLua,
- loadDefaultModule)
-import Text.Pandoc.Walk (Walkable)
+import Text.Pandoc.Definition
+import Text.Pandoc.Lua.Orphans ()
+import Text.Pandoc.Lua.Marshal.AST
+import Text.Pandoc.Lua.Marshal.Filter (peekFilter)
+import Text.Pandoc.Lua.Marshal.ReaderOptions ( peekReaderOptions
+ , pushReaderOptions)
+import Text.Pandoc.Lua.Module.Utils (sha1)
+import Text.Pandoc.Lua.PandocLua (PandocLua, liftPandocLua)
import Text.Pandoc.Options (ReaderOptions (readerExtensions))
import Text.Pandoc.Process (pipeProcess)
import Text.Pandoc.Readers (Reader (..), getReader)
+import qualified HsLua as Lua
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as BSL
import qualified Data.Text as T
-import qualified Foreign.Lua as Lua
import qualified Text.Pandoc.Lua.Util as LuaUtil
import Text.Pandoc.Error
@@ -45,55 +53,164 @@ import Text.Pandoc.Error
-- module to be loadable.
pushModule :: PandocLua NumResults
pushModule = do
- loadDefaultModule "pandoc"
- addFunction "read" read
- addFunction "pipe" pipe
- addFunction "walk_block" walk_block
- addFunction "walk_inline" walk_inline
+ liftPandocLua $ Lua.pushModule documentedModule
return 1
-walkElement :: (Walkable (SingletonsList Inline) a,
- Walkable (SingletonsList Block) a,
- Walkable (List Inline) a,
- Walkable (List Block) a)
- => a -> LuaFilter -> PandocLua a
-walkElement x f = liftPandocLua $
- walkInlines f x >>= walkInlineLists f >>= walkBlocks f >>= walkBlockLists f
-
-walk_inline :: Inline -> LuaFilter -> PandocLua Inline
-walk_inline = walkElement
-
-walk_block :: Block -> LuaFilter -> PandocLua Block
-walk_block = walkElement
-
-read :: T.Text -> Optional T.Text -> PandocLua NumResults
-read content formatSpecOrNil = liftPandocLua $ do
- let formatSpec = fromMaybe "markdown" (Lua.fromOptional formatSpecOrNil)
- res <- Lua.liftIO . runIO $
- getReader formatSpec >>= \(rdr,es) ->
- case rdr of
- TextReader r ->
- r def{ readerExtensions = es } content
- _ -> throwError $ PandocSomeError
- "Only textual formats are supported"
- case res of
- Right pd -> (1 :: NumResults) <$ Lua.push pd -- success, push Pandoc
- Left (PandocUnknownReaderError f) -> Lua.raiseError $
- "Unknown reader: " <> f
- Left (PandocUnsupportedExtensionError e f) -> Lua.raiseError $
- "Extension " <> e <> " not supported for " <> f
- Left e -> Lua.raiseError $ show e
-
--- | Pipes input through a command.
-pipe :: String -- ^ path to executable
- -> [String] -- ^ list of arguments
- -> BL.ByteString -- ^ input passed to process via stdin
- -> PandocLua NumResults
-pipe command args input = liftPandocLua $ do
- (ec, output) <- Lua.liftIO $ pipeProcess Nothing command args input
- case ec of
- ExitSuccess -> 1 <$ Lua.push output
- ExitFailure n -> Lua.raiseError (PipeError (T.pack command) n output)
+documentedModule :: Module PandocError
+documentedModule = Module
+ { moduleName = "pandoc"
+ , moduleDescription = T.unlines
+ [ "Lua functions for pandoc scripts; includes constructors for"
+ , "document elements, functions to parse text in a given"
+ , "format, and functions to filter and modify a subtree."
+ ]
+ , moduleFields = stringConstants ++ [inlineField, blockField]
+ , moduleOperations = []
+ , moduleFunctions = mconcat
+ [ functions
+ , otherConstructors
+ , blockConstructors
+ , inlineConstructors
+ , metaValueConstructors
+ ]
+ }
+
+-- | Inline table field
+inlineField :: Field PandocError
+inlineField = Field
+ { fieldName = "Inline"
+ , fieldDescription = "Inline constructors, nested under 'constructors'."
+ -- the nesting happens for historical reasons and should probably be
+ -- changed.
+ , fieldPushValue = pushWithConstructorsSubtable inlineConstructors
+ }
+
+-- | @Block@ module field
+blockField :: Field PandocError
+blockField = Field
+ { fieldName = "Block"
+ , fieldDescription = "Inline constructors, nested under 'constructors'."
+ -- the nesting happens for historical reasons and should probably be
+ -- changed.
+ , fieldPushValue = pushWithConstructorsSubtable blockConstructors
+ }
+
+pushWithConstructorsSubtable :: [DocumentedFunction PandocError]
+ -> LuaE PandocError ()
+pushWithConstructorsSubtable constructors = do
+ newtable -- Field table
+ newtable -- constructor table
+ pushName "constructor" *> pushvalue (nth 2) *> rawset (nth 4)
+ forM_ constructors $ \fn -> do
+ pushName (functionName fn)
+ pushDocumentedFunction fn
+ rawset (nth 3)
+ pop 1 -- pop constructor table
+
+otherConstructors :: LuaError e => [DocumentedFunction e]
+otherConstructors =
+ [ mkPandoc
+ , mkMeta
+ , mkAttr
+ , mkAttributeList
+ , mkBlocks
+ , mkCitation
+ , mkCell
+ , mkRow
+ , mkTableHead
+ , mkTableFoot
+ , mkInlines
+ , mkListAttributes
+ , mkSimpleTable
+
+ , defun "ReaderOptions"
+ ### liftPure id
+ <#> parameter peekReaderOptions "ReaderOptions|table" "opts" "reader options"
+ =#> functionResult pushReaderOptions "ReaderOptions" "new object"
+ #? "Creates a new ReaderOptions value."
+ ]
+
+stringConstants :: [Field e]
+stringConstants =
+ let constrs :: forall a. Data a => Proxy a -> [String]
+ constrs _ = map showConstr . dataTypeConstrs . dataTypeOf @a $ undefined
+ nullaryConstructors = mconcat
+ [ constrs (Proxy @ListNumberStyle)
+ , constrs (Proxy @ListNumberDelim)
+ , constrs (Proxy @QuoteType)
+ , constrs (Proxy @MathType)
+ , constrs (Proxy @Alignment)
+ , constrs (Proxy @CitationMode)
+ ]
+ toField s = Field
+ { fieldName = T.pack s
+ , fieldDescription = T.pack s
+ , fieldPushValue = pushString s
+ }
+ in map toField nullaryConstructors
+
+functions :: [DocumentedFunction PandocError]
+functions =
+ [ defun "pipe"
+ ### (\command args input -> do
+ (ec, output) <- Lua.liftIO $ pipeProcess Nothing command args input
+ `catch` (throwM . PandocIOError "pipe")
+ case ec of
+ ExitSuccess -> 1 <$ Lua.pushLazyByteString output
+ ExitFailure n -> do
+ pushPipeError (PipeError (T.pack command) n output)
+ Lua.error)
+ <#> parameter peekString "string" "command" "path to executable"
+ <#> parameter (peekList peekString) "{string,...}" "args"
+ "list of arguments"
+ <#> parameter peekLazyByteString "string" "input"
+ "input passed to process via stdin"
+ =?> "output string, or error triple"
+
+ , defun "read"
+ ### (\content mformatspec mreaderOptions -> do
+ let formatSpec = fromMaybe "markdown" mformatspec
+ readerOptions = fromMaybe def mreaderOptions
+ res <- Lua.liftIO . runIO $ getReader formatSpec >>= \case
+ (TextReader r, es) -> r readerOptions{ readerExtensions = es }
+ content
+ _ -> throwError $ PandocSomeError
+ "Only textual formats are supported"
+ case res of
+ Right pd -> return pd -- success, got a Pandoc document
+ Left (PandocUnknownReaderError f) ->
+ Lua.failLua . T.unpack $ "Unknown reader: " <> f
+ Left (PandocUnsupportedExtensionError e f) ->
+ Lua.failLua . T.unpack $
+ "Extension " <> e <> " not supported for " <> f
+ Left e ->
+ throwM e)
+ <#> parameter peekText "string" "content" "text to parse"
+ <#> optionalParameter peekText "string" "formatspec" "format and extensions"
+ <#> optionalParameter peekReaderOptions "ReaderOptions" "reader_options"
+ "reader options"
+ =#> functionResult pushPandoc "Pandoc" "result document"
+
+ , sha1
+
+ , defun "walk_block"
+ ### walkElement
+ <#> parameter peekBlockFuzzy "Block" "block" "element to traverse"
+ <#> parameter peekFilter "Filter" "lua_filter" "filter functions"
+ =#> functionResult pushBlock "Block" "modified Block"
+
+ , defun "walk_inline"
+ ### walkElement
+ <#> parameter peekInlineFuzzy "Inline" "inline" "element to traverse"
+ <#> parameter peekFilter "Filter" "lua_filter" "filter functions"
+ =#> functionResult pushInline "Inline" "modified Inline"
+ ]
+ where
+ walkElement x f =
+ walkInlineSplicing f x
+ >>= walkInlinesStraight f
+ >>= walkBlockSplicing f
+ >>= walkBlocksStraight f
data PipeError = PipeError
{ pipeErrorCommand :: T.Text
@@ -101,29 +218,34 @@ data PipeError = PipeError
, pipeErrorOutput :: BL.ByteString
}
-instance Peekable PipeError where
- peek idx =
- PipeError
- <$> (Lua.getfield idx "command" *> Lua.peek (-1) <* Lua.pop 1)
- <*> (Lua.getfield idx "error_code" *> Lua.peek (-1) <* Lua.pop 1)
- <*> (Lua.getfield idx "output" *> Lua.peek (-1) <* Lua.pop 1)
-
-instance Pushable PipeError where
- push pipeErr = do
- Lua.newtable
- LuaUtil.addField "command" (pipeErrorCommand pipeErr)
- LuaUtil.addField "error_code" (pipeErrorCode pipeErr)
- LuaUtil.addField "output" (pipeErrorOutput pipeErr)
- pushPipeErrorMetaTable
- Lua.setmetatable (-2)
- where
- pushPipeErrorMetaTable :: Lua ()
- pushPipeErrorMetaTable = do
- v <- Lua.newmetatable "pandoc pipe error"
- when v $ LuaUtil.addFunction "__tostring" pipeErrorMessage
-
- pipeErrorMessage :: PipeError -> Lua BL.ByteString
- pipeErrorMessage (PipeError cmd errorCode output) = return $ mconcat
+peekPipeError :: PeekError e => StackIndex -> LuaE e PipeError
+peekPipeError idx =
+ PipeError
+ <$> (Lua.getfield idx "command" *> Lua.peek (-1) <* Lua.pop 1)
+ <*> (Lua.getfield idx "error_code" *> Lua.peek (-1) <* Lua.pop 1)
+ <*> (Lua.getfield idx "output" *> Lua.peek (-1) <* Lua.pop 1)
+
+pushPipeError :: PeekError e => Pusher e PipeError
+pushPipeError pipeErr = do
+ Lua.newtable
+ LuaUtil.addField "command" (pipeErrorCommand pipeErr)
+ LuaUtil.addField "error_code" (pipeErrorCode pipeErr)
+ LuaUtil.addField "output" (pipeErrorOutput pipeErr)
+ pushPipeErrorMetaTable
+ Lua.setmetatable (-2)
+ where
+ pushPipeErrorMetaTable :: PeekError e => LuaE e ()
+ pushPipeErrorMetaTable = do
+ v <- Lua.newmetatable "pandoc pipe error"
+ when v $ do
+ pushName "__tostring"
+ pushHaskellFunction pipeErrorMessage
+ rawset (nth 3)
+
+ pipeErrorMessage :: PeekError e => LuaE e NumResults
+ pipeErrorMessage = do
+ (PipeError cmd errorCode output) <- peekPipeError (nthBottom 1)
+ pushByteString . BSL.toStrict . BSL.concat $
[ BSL.pack "Error running "
, BSL.pack $ T.unpack cmd
, BSL.pack " (error code "
@@ -131,3 +253,4 @@ instance Pushable PipeError where
, BSL.pack "): "
, if output == mempty then BSL.pack "<no output>" else output
]
+ return (NumResults 1)
diff --git a/src/Text/Pandoc/Lua/Module/System.hs b/src/Text/Pandoc/Lua/Module/System.hs
index bd35babaf..e329a0125 100644
--- a/src/Text/Pandoc/Lua/Module/System.hs
+++ b/src/Text/Pandoc/Lua/Module/System.hs
@@ -1,3 +1,5 @@
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
{- |
Module : Text.Pandoc.Lua.Module.System
Copyright : © 2019-2021 Albert Krewinkel
@@ -9,25 +11,28 @@
Pandoc's system Lua module.
-}
module Text.Pandoc.Lua.Module.System
- ( pushModule
+ ( documentedModule
) where
-import Foreign.Lua (Lua, NumResults)
-import Foreign.Lua.Module.System (arch, env, getwd, os,
- with_env, with_tmpdir, with_wd)
-import Text.Pandoc.Lua.Util (addFunction, addField)
-
-import qualified Foreign.Lua as Lua
+import HsLua
+import HsLua.Module.System
+ (arch, env, getwd, os, with_env, with_tmpdir, with_wd)
-- | Push the pandoc.system module on the Lua stack.
-pushModule :: Lua NumResults
-pushModule = do
- Lua.newtable
- addField "arch" arch
- addField "os" os
- addFunction "environment" env
- addFunction "get_working_directory" getwd
- addFunction "with_environment" with_env
- addFunction "with_temporary_directory" with_tmpdir
- addFunction "with_working_directory" with_wd
- return 1
+documentedModule :: LuaError e => Module e
+documentedModule = Module
+ { moduleName = "pandoc.system"
+ , moduleDescription = "system functions"
+ , moduleFields =
+ [ arch
+ , os
+ ]
+ , moduleFunctions =
+ [ setName "environment" env
+ , setName "get_working_directory" getwd
+ , setName "with_environment" with_env
+ , setName "with_temporary_directory" with_tmpdir
+ , setName "with_working_directory" with_wd
+ ]
+ , moduleOperations = []
+ }
diff --git a/src/Text/Pandoc/Lua/Module/Types.hs b/src/Text/Pandoc/Lua/Module/Types.hs
index bb4f02c3c..f16737f63 100644
--- a/src/Text/Pandoc/Lua/Module/Types.hs
+++ b/src/Text/Pandoc/Lua/Module/Types.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Text.Pandoc.Lua.Module.Types
Copyright : © 2019-2021 Albert Krewinkel
@@ -9,60 +10,33 @@
Pandoc data type constructors.
-}
module Text.Pandoc.Lua.Module.Types
- ( pushModule
+ ( documentedModule
) where
-import Data.Version (Version)
-import Foreign.Lua (Lua, NumResults)
-import Text.Pandoc.Definition
-import Text.Pandoc.Lua.Marshaling.AST (LuaAttr, LuaListAttributes)
-import Text.Pandoc.Lua.Marshaling.Version ()
-import Text.Pandoc.Lua.Util (addFunction)
-
-import qualified Foreign.Lua as Lua
-
--- | Push the pandoc.system module on the Lua stack.
-pushModule :: Lua NumResults
-pushModule = do
- Lua.newtable
- addFunction "Version" (return :: Version -> Lua Version)
- pushCloneTable
- Lua.setfield (Lua.nthFromTop 2) "clone"
- return 1
-
-pushCloneTable :: Lua NumResults
-pushCloneTable = do
- Lua.newtable
- addFunction "Attr" cloneAttr
- addFunction "Block" cloneBlock
- addFunction "Citation" cloneCitation
- addFunction "Inline" cloneInline
- addFunction "Meta" cloneMeta
- addFunction "MetaValue" cloneMetaValue
- addFunction "ListAttributes" cloneListAttributes
- addFunction "Pandoc" clonePandoc
- return 1
-
-cloneAttr :: LuaAttr -> Lua LuaAttr
-cloneAttr = return
-
-cloneBlock :: Block -> Lua Block
-cloneBlock = return
-
-cloneCitation :: Citation -> Lua Citation
-cloneCitation = return
-
-cloneInline :: Inline -> Lua Inline
-cloneInline = return
-
-cloneListAttributes :: LuaListAttributes -> Lua LuaListAttributes
-cloneListAttributes = return
-
-cloneMeta :: Meta -> Lua Meta
-cloneMeta = return
-
-cloneMetaValue :: MetaValue -> Lua MetaValue
-cloneMetaValue = return
-
-clonePandoc :: Pandoc -> Lua Pandoc
-clonePandoc = return
+import HsLua ( Module (..), (###), (<#>), (=#>)
+ , defun, functionResult, parameter)
+import HsLua.Module.Version (peekVersionFuzzy, pushVersion)
+import Text.Pandoc.Error (PandocError)
+import Text.Pandoc.Lua.ErrorConversion ()
+
+-- | Push the pandoc.types module on the Lua stack.
+documentedModule :: Module PandocError
+documentedModule = Module
+ { moduleName = "pandoc.types"
+ , moduleDescription =
+ "Constructors for types that are not part of the pandoc AST."
+ , moduleFields = []
+ , moduleFunctions =
+ [ defun "Version"
+ ### return
+ <#> parameter peekVersionFuzzy "string|integer|{integer,...}|Version"
+ "version_specifier"
+ (mconcat [ "either a version string like `'2.7.3'`, "
+ , "a single integer like `2`, "
+ , "list of integers like `{2,7,3}`, "
+ , "or a Version object"
+ ])
+ =#> functionResult pushVersion "Version" "A new Version object."
+ ]
+ , moduleOperations = []
+ }
diff --git a/src/Text/Pandoc/Lua/Module/Utils.hs b/src/Text/Pandoc/Lua/Module/Utils.hs
index 3ec3afc26..02307cf7a 100644
--- a/src/Text/Pandoc/Lua/Module/Utils.hs
+++ b/src/Text/Pandoc/Lua/Module/Utils.hs
@@ -1,5 +1,7 @@
-{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
{- |
Module : Text.Pandoc.Lua.Module.Utils
Copyright : Copyright © 2017-2021 Albert Krewinkel
@@ -11,143 +13,194 @@
Utility module for Lua, exposing internal helper functions.
-}
module Text.Pandoc.Lua.Module.Utils
- ( pushModule
+ ( documentedModule
+ , sha1
) where
import Control.Applicative ((<|>))
-import Control.Monad.Catch (try)
+import Control.Monad ((<$!>))
import Data.Data (showConstr, toConstr)
import Data.Default (def)
+import Data.Maybe (fromMaybe)
import Data.Version (Version)
-import Foreign.Lua (Peekable, Lua, NumResults (..))
+import HsLua as Lua
+import HsLua.Module.Version (peekVersionFuzzy, pushVersion)
+import Text.Pandoc.Citeproc (getReferences)
import Text.Pandoc.Definition
import Text.Pandoc.Error (PandocError)
-import Text.Pandoc.Lua.Marshaling ()
-import Text.Pandoc.Lua.Marshaling.SimpleTable
- ( SimpleTable (..)
- , pushSimpleTable
- )
-import Text.Pandoc.Lua.PandocLua (PandocLua, addFunction, liftPandocLua)
+import Text.Pandoc.Lua.Marshal.AST
+import Text.Pandoc.Lua.Marshal.Reference
+import Text.Pandoc.Lua.PandocLua (PandocLua (unPandocLua))
import qualified Data.Digest.Pure.SHA as SHA
import qualified Data.ByteString.Lazy as BSL
+import qualified Data.Map as Map
import qualified Data.Text as T
-import qualified Foreign.Lua as Lua
import qualified Text.Pandoc.Builder as B
import qualified Text.Pandoc.Filter.JSON as JSONFilter
import qualified Text.Pandoc.Shared as Shared
+import qualified Text.Pandoc.UTF8 as UTF8
import qualified Text.Pandoc.Writers.Shared as Shared
-- | Push the "pandoc.utils" module to the Lua stack.
-pushModule :: PandocLua NumResults
-pushModule = do
- liftPandocLua Lua.newtable
- addFunction "blocks_to_inlines" blocksToInlines
- addFunction "equals" equals
- addFunction "from_simple_table" from_simple_table
- addFunction "make_sections" makeSections
- addFunction "normalize_date" normalizeDate
- addFunction "run_json_filter" runJSONFilter
- addFunction "sha1" sha1
- addFunction "stringify" stringify
- addFunction "to_roman_numeral" toRomanNumeral
- addFunction "to_simple_table" to_simple_table
- addFunction "Version" (return :: Version -> Lua Version)
- return 1
-
--- | Squashes a list of blocks into inlines.
-blocksToInlines :: [Block] -> Lua.Optional [Inline] -> PandocLua [Inline]
-blocksToInlines blks optSep = liftPandocLua $ do
- let sep = maybe Shared.defaultBlocksSeparator B.fromList
- $ Lua.fromOptional optSep
- return $ B.toList (Shared.blocksToInlinesWithSep sep blks)
-
--- | Convert list of Pandoc blocks into sections using Divs.
-makeSections :: Bool -> Lua.Optional Int -> [Block] -> Lua [Block]
-makeSections number baselevel =
- return . Shared.makeSections number (Lua.fromOptional baselevel)
-
--- | Parse a date and convert (if possible) to "YYYY-MM-DD" format. We
--- limit years to the range 1601-9999 (ISO 8601 accepts greater than
--- or equal to 1583, but MS Word only accepts dates starting 1601).
--- Returns nil instead of a string if the conversion failed.
-normalizeDate :: T.Text -> Lua (Lua.Optional T.Text)
-normalizeDate = return . Lua.Optional . Shared.normalizeDate
-
--- | Run a JSON filter on the given document.
-runJSONFilter :: Pandoc
- -> FilePath
- -> Lua.Optional [String]
- -> PandocLua Pandoc
-runJSONFilter doc filterFile optArgs = do
- args <- case Lua.fromOptional optArgs of
- Just x -> return x
- Nothing -> liftPandocLua $ do
- Lua.getglobal "FORMAT"
- (:[]) <$> Lua.popValue
- JSONFilter.apply def args filterFile doc
-
--- | Calculate the hash of the given contents.
-sha1 :: BSL.ByteString
- -> Lua T.Text
-sha1 = return . T.pack . SHA.showDigest . SHA.sha1
+documentedModule :: Module PandocError
+documentedModule = Module
+ { moduleName = "pandoc.utils"
+ , moduleDescription = "pandoc utility functions"
+ , moduleFields = []
+ , moduleOperations = []
+ , moduleFunctions =
+ [ defun "blocks_to_inlines"
+ ### (\blks mSep -> do
+ let sep = maybe Shared.defaultBlocksSeparator B.fromList mSep
+ return $ B.toList (Shared.blocksToInlinesWithSep sep blks))
+ <#> parameter (peekList peekBlock) "list of blocks"
+ "blocks" ""
+ <#> optionalParameter (peekList peekInline) "list of inlines"
+ "inline" ""
+ =#> functionResult pushInlines "list of inlines" ""
+
+ , defun "equals"
+ ### equal
+ <#> parameter pure "AST element" "elem1" ""
+ <#> parameter pure "AST element" "elem2" ""
+ =#> functionResult pushBool "boolean" "true iff elem1 == elem2"
+
+ , defun "make_sections"
+ ### liftPure3 Shared.makeSections
+ <#> parameter peekBool "boolean" "numbering" "add header numbers"
+ <#> parameter (\i -> (Nothing <$ peekNil i) <|> (Just <$!> peekIntegral i))
+ "integer or nil" "baselevel" ""
+ <#> parameter (peekList peekBlock) "list of blocks"
+ "blocks" "document blocks to process"
+ =#> functionResult pushBlocks "list of Blocks"
+ "processes blocks"
+
+ , defun "normalize_date"
+ ### liftPure Shared.normalizeDate
+ <#> parameter peekText "string" "date" "the date string"
+ =#> functionResult (maybe pushnil pushText) "string or nil"
+ "normalized date, or nil if normalization failed."
+ #? T.unwords
+ [ "Parse a date and convert (if possible) to \"YYYY-MM-DD\" format. We"
+ , "limit years to the range 1601-9999 (ISO 8601 accepts greater than"
+ , "or equal to 1583, but MS Word only accepts dates starting 1601)."
+ , "Returns nil instead of a string if the conversion failed."
+ ]
+
+ , sha1
+
+ , defun "Version"
+ ### liftPure (id @Version)
+ <#> parameter peekVersionFuzzy
+ "version string, list of integers, or integer"
+ "v" "version description"
+ =#> functionResult pushVersion "Version" "new Version object"
+ #? "Creates a Version object."
+
+ , defun "references"
+ ### (unPandocLua . getReferences Nothing)
+ <#> parameter peekPandoc "Pandoc" "doc" "document"
+ =#> functionResult (pushPandocList pushReference) "table"
+ "lift of references"
+ #? mconcat
+ [ "Get references defined inline in the metadata and via an external "
+ , "bibliography. Only references that are actually cited in the "
+ , "document (either with a genuine citation or with `nocite`) are "
+ , "returned. URL variables are converted to links."
+ ]
+
+ , defun "run_json_filter"
+ ### (\doc filterPath margs -> do
+ args <- case margs of
+ Just xs -> return xs
+ Nothing -> do
+ Lua.getglobal "FORMAT"
+ (forcePeek ((:[]) <$!> peekString top) <* pop 1)
+ JSONFilter.apply def args filterPath doc
+ )
+ <#> parameter peekPandoc "Pandoc" "doc" "input document"
+ <#> parameter peekString "filepath" "filter_path" "path to filter"
+ <#> optionalParameter (peekList peekString) "list of strings"
+ "args" "arguments to pass to the filter"
+ =#> functionResult pushPandoc "Pandoc" "filtered document"
+
+ , defun "stringify"
+ ### stringify
+ <#> parameter pure "AST element" "elem" "some pandoc AST element"
+ =#> functionResult pushText "string" "stringified element"
+
+ , defun "from_simple_table"
+ ### from_simple_table
+ <#> parameter peekSimpleTable "SimpleTable" "simple_tbl" ""
+ =?> "Simple table"
+
+ , defun "to_roman_numeral"
+ ### liftPure Shared.toRomanNumeral
+ <#> parameter (peekIntegral @Int) "integer" "n" "number smaller than 4000"
+ =#> functionResult pushText "string" "roman numeral"
+ #? "Converts a number < 4000 to uppercase roman numeral."
+
+ , defun "to_simple_table"
+ ### to_simple_table
+ <#> parameter peekTable "Block" "tbl" "a table"
+ =#> functionResult pushSimpleTable "SimpleTable" "SimpleTable object"
+ #? "Converts a table into an old/simple table."
+
+ , defun "type"
+ ### (\idx -> getmetafield idx "__name" >>= \case
+ TypeString -> fromMaybe mempty <$> tostring top
+ _ -> ltype idx >>= typename)
+ <#> parameter pure "any" "object" ""
+ =#> functionResult pushByteString "string" "type of the given value"
+ #? ("Pandoc-friendly version of Lua's default `type` function, " <>
+ "returning the type of a value. If the argument has a " <>
+ "string-valued metafield `__name`, then it gives that string. " <>
+ "Otherwise it behaves just like the normal `type` function.")
+ ]
+ }
+
+-- | Documented Lua function to compute the hash of a string.
+sha1 :: DocumentedFunction e
+sha1 = defun "sha1"
+ ### liftPure (SHA.showDigest . SHA.sha1)
+ <#> parameter (fmap BSL.fromStrict . peekByteString) "string" "input" ""
+ =#> functionResult pushString "string" "hexadecimal hash value"
+ #? "Compute the hash of the given string value."
+
-- | Convert pandoc structure to a string with formatting removed.
-- Footnotes are skipped (since we don't want their contents in link
-- labels).
-stringify :: AstElement -> PandocLua T.Text
-stringify el = return $ case el of
- PandocElement pd -> Shared.stringify pd
- InlineElement i -> Shared.stringify i
- BlockElement b -> Shared.stringify b
- MetaElement m -> Shared.stringify m
- CitationElement c -> Shared.stringify c
- MetaValueElement m -> stringifyMetaValue m
- _ -> mempty
-
-stringifyMetaValue :: MetaValue -> T.Text
-stringifyMetaValue mv = case mv of
- MetaBool b -> T.toLower $ T.pack (show b)
- MetaString s -> s
- _ -> Shared.stringify mv
-
-equals :: AstElement -> AstElement -> PandocLua Bool
-equals e1 e2 = return (e1 == e2)
-
-data AstElement
- = PandocElement Pandoc
- | MetaElement Meta
- | BlockElement Block
- | InlineElement Inline
- | MetaValueElement MetaValue
- | AttrElement Attr
- | ListAttributesElement ListAttributes
- | CitationElement Citation
- deriving (Eq, Show)
-
-instance Peekable AstElement where
- peek idx = do
- res <- try $ (PandocElement <$> Lua.peek idx)
- <|> (InlineElement <$> Lua.peek idx)
- <|> (BlockElement <$> Lua.peek idx)
- <|> (AttrElement <$> Lua.peek idx)
- <|> (ListAttributesElement <$> Lua.peek idx)
- <|> (MetaElement <$> Lua.peek idx)
- <|> (MetaValueElement <$> Lua.peek idx)
- case res of
- Right x -> return x
- Left (_ :: PandocError) -> Lua.throwMessage
- "Expected an AST element, but could not parse value as such."
+stringify :: LuaError e => StackIndex -> LuaE e T.Text
+stringify idx = forcePeek . retrieving "stringifyable element" $
+ choice
+ [ (fmap Shared.stringify . peekPandoc)
+ , (fmap Shared.stringify . peekInline)
+ , (fmap Shared.stringify . peekBlock)
+ , (fmap Shared.stringify . peekCitation)
+ , (fmap stringifyMetaValue . peekMetaValue)
+ , (fmap (const "") . peekAttr)
+ , (fmap (const "") . peekListAttributes)
+ ] idx
+ where
+ stringifyMetaValue :: MetaValue -> T.Text
+ stringifyMetaValue mv = case mv of
+ MetaBool b -> T.toLower $ T.pack (show b)
+ MetaString s -> s
+ MetaList xs -> mconcat $ map stringifyMetaValue xs
+ MetaMap m -> mconcat $ map (stringifyMetaValue . snd) (Map.toList m)
+ _ -> Shared.stringify mv
-- | Converts an old/simple table into a normal table block element.
-from_simple_table :: SimpleTable -> Lua NumResults
+from_simple_table :: SimpleTable -> LuaE PandocError NumResults
from_simple_table (SimpleTable capt aligns widths head' body) = do
Lua.push $ Table
nullAttr
- (Caption Nothing [Plain capt])
+ (Caption Nothing [Plain capt | not (null capt)])
(zipWith (\a w -> (a, toColWidth w)) aligns widths)
(TableHead nullAttr [blockListToRow head' | not (null head') ])
- [TableBody nullAttr 0 [] $ map blockListToRow body]
+ [TableBody nullAttr 0 [] $ map blockListToRow body | not (null body)]
(TableFoot nullAttr [])
return (NumResults 1)
where
@@ -159,17 +212,19 @@ from_simple_table (SimpleTable capt aligns widths head' body) = do
toColWidth w = ColWidth w
-- | Converts a table into an old/simple table.
-to_simple_table :: Block -> Lua NumResults
+to_simple_table :: Block -> LuaE PandocError SimpleTable
to_simple_table = \case
Table _attr caption specs thead tbodies tfoot -> do
let (capt, aligns, widths, headers, rows) =
Shared.toLegacyTable caption specs thead tbodies tfoot
- pushSimpleTable $ SimpleTable capt aligns widths headers rows
- return (NumResults 1)
- blk ->
- Lua.throwMessage $
- "Expected Table, got " <> showConstr (toConstr blk) <> "."
-
--- | Convert a number < 4000 to uppercase roman numeral.
-toRomanNumeral :: Lua.Integer -> PandocLua T.Text
-toRomanNumeral = return . Shared.toRomanNumeral . fromIntegral
+ return $ SimpleTable capt aligns widths headers rows
+ blk -> Lua.failLua $ mconcat
+ [ "Expected Table, got ", showConstr (toConstr blk), "." ]
+
+peekTable :: LuaError e => Peeker e Block
+peekTable idx = peekBlock idx >>= \case
+ t@(Table {}) -> return t
+ b -> Lua.failPeek $ mconcat
+ [ "Expected Table, got "
+ , UTF8.fromString $ showConstr (toConstr b)
+ , "." ]
diff --git a/src/Text/Pandoc/Lua/Orphans.hs b/src/Text/Pandoc/Lua/Orphans.hs
new file mode 100644
index 000000000..d5b8f2c5d
--- /dev/null
+++ b/src/Text/Pandoc/Lua/Orphans.hs
@@ -0,0 +1,116 @@
+{-# OPTIONS_GHC -fno-warn-orphans #-}
+{-# LANGUAGE FlexibleInstances #-}
+{- |
+ Module : Text.Pandoc.Lua.Orphans
+ Copyright : © 2012-2021 John MacFarlane
+ © 2017-2021 Albert Krewinkel
+ License : GNU GPL, version 2 or above
+
+ Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
+ Stability : alpha
+
+Orphan instances for Lua's Pushable and Peekable type classes.
+-}
+module Text.Pandoc.Lua.Orphans () where
+
+import Data.Version (Version)
+import HsLua
+import HsLua.Module.Version (peekVersionFuzzy)
+import Text.Pandoc.Definition
+import Text.Pandoc.Lua.Marshal.AST
+import Text.Pandoc.Lua.Marshal.CommonState ()
+import Text.Pandoc.Lua.Marshal.Context ()
+import Text.Pandoc.Lua.Marshal.PandocError()
+import Text.Pandoc.Lua.Marshal.ReaderOptions ()
+import Text.Pandoc.Lua.Marshal.Sources (pushSources)
+import Text.Pandoc.Lua.ErrorConversion ()
+import Text.Pandoc.Sources (Sources)
+
+instance Pushable Pandoc where
+ push = pushPandoc
+
+instance Pushable Meta where
+ push = pushMeta
+
+instance Pushable MetaValue where
+ push = pushMetaValue
+
+instance Pushable Block where
+ push = pushBlock
+
+instance {-# OVERLAPPING #-} Pushable [Block] where
+ push = pushBlocks
+
+instance Pushable Alignment where
+ push = pushString . show
+
+instance Pushable CitationMode where
+ push = pushCitationMode
+
+instance Pushable Format where
+ push = pushFormat
+
+instance Pushable ListNumberDelim where
+ push = pushString . show
+
+instance Pushable ListNumberStyle where
+ push = pushString . show
+
+instance Pushable MathType where
+ push = pushMathType
+
+instance Pushable QuoteType where
+ push = pushQuoteType
+
+instance Pushable Cell where
+ push = pushCell
+
+instance Peekable Cell where
+ peek = forcePeek . peekCell
+
+instance Pushable Inline where
+ push = pushInline
+
+instance {-# OVERLAPPING #-} Pushable [Inline] where
+ push = pushInlines
+
+instance Pushable Citation where
+ push = pushCitation
+
+instance Pushable Row where
+ push = pushRow
+
+instance Pushable TableBody where
+ push = pushTableBody
+
+instance Pushable TableFoot where
+ push = pushTableFoot
+
+instance Pushable TableHead where
+ push = pushTableHead
+
+-- These instances exist only for testing. It's a hack to avoid making
+-- the marshalling modules public.
+instance Peekable Inline where
+ peek = forcePeek . peekInline
+
+instance Peekable Block where
+ peek = forcePeek . peekBlock
+
+instance Peekable Meta where
+ peek = forcePeek . peekMeta
+
+instance Peekable Pandoc where
+ peek = forcePeek . peekPandoc
+
+instance Peekable Row where
+ peek = forcePeek . peekRow
+
+instance Peekable Version where
+ peek = forcePeek . peekVersionFuzzy
+
+instance {-# OVERLAPPING #-} Peekable Attr where
+ peek = forcePeek . peekAttr
+
+instance Pushable Sources where
+ push = pushSources
diff --git a/src/Text/Pandoc/Lua/Packages.hs b/src/Text/Pandoc/Lua/Packages.hs
index 2f1c139db..c36c3c670 100644
--- a/src/Text/Pandoc/Lua/Packages.hs
+++ b/src/Text/Pandoc/Lua/Packages.hs
@@ -1,3 +1,6 @@
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TypeApplications #-}
{- |
Module : Text.Pandoc.Lua.Packages
Copyright : Copyright © 2017-2021 Albert Krewinkel
@@ -13,12 +16,13 @@ module Text.Pandoc.Lua.Packages
) where
import Control.Monad (forM_)
-import Foreign.Lua (NumResults)
-import Text.Pandoc.Lua.PandocLua (PandocLua, liftPandocLua, loadDefaultModule)
+import Text.Pandoc.Error (PandocError)
+import Text.Pandoc.Lua.Marshal.List (pushListModule)
+import Text.Pandoc.Lua.PandocLua (PandocLua, liftPandocLua)
-import qualified Foreign.Lua as Lua
-import qualified Foreign.Lua.Module.Path as Path
-import qualified Foreign.Lua.Module.Text as Text
+import qualified HsLua as Lua
+import qualified HsLua.Module.Path as Path
+import qualified HsLua.Module.Text as Text
import qualified Text.Pandoc.Lua.Module.Pandoc as Pandoc
import qualified Text.Pandoc.Lua.Module.MediaBag as MediaBag
import qualified Text.Pandoc.Lua.Module.System as System
@@ -30,8 +34,8 @@ installPandocPackageSearcher :: PandocLua ()
installPandocPackageSearcher = liftPandocLua $ do
Lua.getglobal' "package.searchers"
shiftArray
- Lua.pushHaskellFunction pandocPackageSearcher
- Lua.rawseti (Lua.nthFromTop 2) 1
+ Lua.pushHaskellFunction $ Lua.toHaskellFunction pandocPackageSearcher
+ Lua.rawseti (Lua.nth 2) 1
Lua.pop 1 -- remove 'package.searchers' from stack
where
shiftArray = forM_ [4, 3, 2, 1] $ \i -> do
@@ -39,22 +43,27 @@ installPandocPackageSearcher = liftPandocLua $ do
Lua.rawseti (-2) (i + 1)
-- | Load a pandoc module.
-pandocPackageSearcher :: String -> PandocLua NumResults
+pandocPackageSearcher :: String -> PandocLua Lua.NumResults
pandocPackageSearcher pkgName =
case pkgName of
- "pandoc" -> pushWrappedHsFun Pandoc.pushModule
- "pandoc.mediabag" -> pushWrappedHsFun MediaBag.pushModule
- "pandoc.path" -> pushWrappedHsFun Path.pushModule
- "pandoc.system" -> pushWrappedHsFun System.pushModule
- "pandoc.types" -> pushWrappedHsFun Types.pushModule
- "pandoc.utils" -> pushWrappedHsFun Utils.pushModule
- "text" -> pushWrappedHsFun Text.pushModule
- "pandoc.List" -> pushWrappedHsFun (loadDefaultModule pkgName)
+ "pandoc" -> pushModuleLoader Pandoc.documentedModule
+ "pandoc.mediabag" -> pushModuleLoader MediaBag.documentedModule
+ "pandoc.path" -> pushModuleLoader Path.documentedModule
+ "pandoc.system" -> pushModuleLoader System.documentedModule
+ "pandoc.types" -> pushModuleLoader Types.documentedModule
+ "pandoc.utils" -> pushModuleLoader Utils.documentedModule
+ "text" -> pushModuleLoader Text.documentedModule
+ "pandoc.List" -> pushWrappedHsFun . Lua.toHaskellFunction @PandocError $
+ (Lua.NumResults 1 <$ pushListModule @PandocError)
_ -> reportPandocSearcherFailure
where
+ pushModuleLoader mdl = liftPandocLua $ do
+ Lua.pushHaskellFunction $
+ Lua.NumResults 1 <$ Lua.pushModule @PandocError mdl
+ return (Lua.NumResults 1)
pushWrappedHsFun f = liftPandocLua $ do
Lua.pushHaskellFunction f
return 1
reportPandocSearcherFailure = liftPandocLua $ do
- Lua.push ("\n\t" <> pkgName <> "is not one of pandoc's default packages")
- return (1 :: NumResults)
+ Lua.push ("\n\t" <> pkgName <> " is not one of pandoc's default packages")
+ return (Lua.NumResults 1)
diff --git a/src/Text/Pandoc/Lua/PandocLua.hs b/src/Text/Pandoc/Lua/PandocLua.hs
index 750e019b6..71fdf8d5c 100644
--- a/src/Text/Pandoc/Lua/PandocLua.hs
+++ b/src/Text/Pandoc/Lua/PandocLua.hs
@@ -22,27 +22,22 @@ module Text.Pandoc.Lua.PandocLua
( PandocLua (..)
, runPandocLua
, liftPandocLua
- , addFunction
- , loadDefaultModule
) where
import Control.Monad.Catch (MonadCatch, MonadMask, MonadThrow)
import Control.Monad.Except (MonadError (catchError, throwError))
-import Control.Monad.IO.Class (MonadIO (liftIO))
-import Foreign.Lua (Lua (..), NumResults, Pushable, ToHaskellFunction)
-import Text.Pandoc.Class.PandocIO (PandocIO)
-import Text.Pandoc.Class.PandocMonad (PandocMonad (..), readDefaultDataFile)
-import Text.Pandoc.Error (PandocError (PandocLuaError))
+import Control.Monad.IO.Class (MonadIO)
+import HsLua as Lua
+import Text.Pandoc.Class.PandocMonad (PandocMonad (..))
+import Text.Pandoc.Error (PandocError)
import Text.Pandoc.Lua.Global (Global (..), setGlobals)
-import Text.Pandoc.Lua.ErrorConversion (errorConversion)
+import Text.Pandoc.Lua.Marshal.CommonState (peekCommonState)
import qualified Control.Monad.Catch as Catch
-import qualified Data.Text as T
-import qualified Foreign.Lua as Lua
import qualified Text.Pandoc.Class.IO as IO
-- | Type providing access to both, pandoc and Lua operations.
-newtype PandocLua a = PandocLua { unPandocLua :: Lua a }
+newtype PandocLua a = PandocLua { unPandocLua :: LuaE PandocError a }
deriving
( Applicative
, Functor
@@ -54,16 +49,16 @@ newtype PandocLua a = PandocLua { unPandocLua :: Lua a }
)
-- | Lift a @'Lua'@ operation into the @'PandocLua'@ type.
-liftPandocLua :: Lua a -> PandocLua a
+liftPandocLua :: LuaE PandocError a -> PandocLua a
liftPandocLua = PandocLua
-- | Evaluate a @'PandocLua'@ computation, running all contained Lua
-- operations..
-runPandocLua :: PandocLua a -> PandocIO a
+runPandocLua :: (PandocMonad m, MonadIO m) => PandocLua a -> m a
runPandocLua pLua = do
origState <- getCommonState
globals <- defaultGlobals
- (result, newState) <- liftIO . Lua.run' errorConversion . unPandocLua $ do
+ (result, newState) <- liftIO . Lua.run . unPandocLua $ do
putCommonState origState
liftPandocLua $ setGlobals globals
r <- pLua
@@ -72,38 +67,14 @@ runPandocLua pLua = do
putCommonState newState
return result
-instance {-# OVERLAPPING #-} ToHaskellFunction (PandocLua NumResults) where
- toHsFun _narg = unPandocLua
-
-instance Pushable a => ToHaskellFunction (PandocLua a) where
- toHsFun _narg x = 1 <$ (unPandocLua x >>= Lua.push)
-
--- | Add a function to the table at the top of the stack, using the given name.
-addFunction :: ToHaskellFunction a => String -> a -> PandocLua ()
-addFunction name fn = liftPandocLua $ do
- Lua.push name
- Lua.pushHaskellFunction fn
- Lua.rawset (-3)
-
--- | Load a pure Lua module included with pandoc. Leaves the result on
--- the stack and returns @NumResults 1@.
---
--- The script is loaded from the default data directory. We do not load
--- from data directories supplied via command line, as this could cause
--- scripts to be executed even though they had not been passed explicitly.
-loadDefaultModule :: String -> PandocLua NumResults
-loadDefaultModule name = do
- script <- readDefaultDataFile (name <> ".lua")
- status <- liftPandocLua $ Lua.dostring script
- if status == Lua.OK
- then return (1 :: NumResults)
- else do
- msg <- liftPandocLua Lua.popValue
- let err = "Error while loading `" <> name <> "`.\n" <> msg
- throwError $ PandocLuaError (T.pack err)
+instance {-# OVERLAPPING #-} Exposable PandocError (PandocLua NumResults) where
+ partialApply _narg = unPandocLua
+
+instance Pushable a => Exposable PandocError (PandocLua a) where
+ partialApply _narg x = 1 <$ (unPandocLua x >>= Lua.push)
-- | Global variables which should always be set.
-defaultGlobals :: PandocIO [Global]
+defaultGlobals :: PandocMonad m => m [Global]
defaultGlobals = do
commonState <- getCommonState
return
@@ -127,6 +98,7 @@ instance PandocMonad PandocLua where
readFileLazy = IO.readFileLazy
readFileStrict = IO.readFileStrict
+ readStdinStrict = IO.readStdinStrict
glob = IO.glob
fileExists = IO.fileExists
@@ -135,7 +107,7 @@ instance PandocMonad PandocLua where
getCommonState = PandocLua $ do
Lua.getglobal "PANDOC_STATE"
- Lua.peek Lua.stackTop
+ forcePeek $ peekCommonState Lua.top
putCommonState = PandocLua . setGlobals . (:[]) . PANDOC_STATE
logOutput = IO.logOutput
diff --git a/src/Text/Pandoc/Lua/Util.hs b/src/Text/Pandoc/Lua/Util.hs
index 70a8a6d47..9c6f42b2b 100644
--- a/src/Text/Pandoc/Lua/Util.hs
+++ b/src/Text/Pandoc/Lua/Util.hs
@@ -1,6 +1,4 @@
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE OverloadedStrings #-}
{- |
Module : Text.Pandoc.Lua.Util
Copyright : © 2012-2021 John MacFarlane,
@@ -13,115 +11,34 @@
Lua utility functions.
-}
module Text.Pandoc.Lua.Util
- ( getTag
- , rawField
- , addField
- , addFunction
- , addValue
- , pushViaConstructor
- , defineHowTo
- , throwTopMessageAsError'
+ ( addField
, callWithTraceback
+ , pcallWithTraceback
, dofileWithTraceback
) where
-import Control.Monad (unless, when)
-import Data.Text (Text)
-import Foreign.Lua ( Lua, NumArgs, NumResults, Peekable, Pushable, StackIndex
- , Status, ToHaskellFunction )
-import qualified Foreign.Lua as Lua
-import qualified Text.Pandoc.UTF8 as UTF8
-
--- | Get value behind key from table at given index.
-rawField :: Peekable a => StackIndex -> String -> Lua a
-rawField idx key = do
- absidx <- Lua.absindex idx
- Lua.push key
- Lua.rawget absidx
- Lua.popValue
+import Control.Monad (when)
+import HsLua
+import qualified HsLua as Lua
-- | Add a value to the table at the top of the stack at a string-index.
-addField :: Pushable a => String -> a -> Lua ()
-addField = addValue
-
--- | Add a key-value pair to the table at the top of the stack.
-addValue :: (Pushable a, Pushable b) => a -> b -> Lua ()
-addValue key value = do
+addField :: (LuaError e, Pushable a) => String -> a -> LuaE e ()
+addField key value = do
Lua.push key
Lua.push value
- Lua.rawset (Lua.nthFromTop 3)
-
--- | Add a function to the table at the top of the stack, using the given name.
-addFunction :: ToHaskellFunction a => String -> a -> Lua ()
-addFunction name fn = do
- Lua.push name
- Lua.pushHaskellFunction fn
- Lua.rawset (-3)
-
--- | Helper class for pushing a single value to the stack via a lua function.
--- See @pushViaCall@.
-class PushViaCall a where
- pushViaCall' :: String -> Lua () -> NumArgs -> a
-
-instance PushViaCall (Lua ()) where
- pushViaCall' fn pushArgs num = do
- Lua.push fn
- Lua.rawget Lua.registryindex
- pushArgs
- Lua.call num 1
-
-instance (Pushable a, PushViaCall b) => PushViaCall (a -> b) where
- pushViaCall' fn pushArgs num x =
- pushViaCall' fn (pushArgs *> Lua.push x) (num + 1)
-
--- | Push an value to the stack via a lua function. The lua function is called
--- with all arguments that are passed to this function and is expected to return
--- a single value.
-pushViaCall :: PushViaCall a => String -> a
-pushViaCall fn = pushViaCall' fn (return ()) 0
-
--- | Call a pandoc element constructor within Lua, passing all given arguments.
-pushViaConstructor :: PushViaCall a => String -> a
-pushViaConstructor pandocFn = pushViaCall ("pandoc." ++ pandocFn)
-
--- | Get the tag of a value. This is an optimized and specialized version of
--- @Lua.getfield idx "tag"@. It only checks for the field on the table at index
--- @idx@ and on its metatable, also ignoring any @__index@ value on the
--- metatable.
-getTag :: StackIndex -> Lua String
-getTag idx = do
- -- push metatable or just the table
- Lua.getmetatable idx >>= \hasMT -> unless hasMT (Lua.pushvalue idx)
- Lua.push ("tag" :: Text)
- Lua.rawget (Lua.nthFromTop 2)
- Lua.tostring Lua.stackTop <* Lua.pop 2 >>= \case
- Nothing -> Lua.throwMessage "untagged value"
- Just x -> return (UTF8.toString x)
-
--- | Modify the message at the top of the stack before throwing it as an
--- Exception.
-throwTopMessageAsError' :: (String -> String) -> Lua a
-throwTopMessageAsError' modifier = do
- msg <- Lua.tostring' Lua.stackTop
- Lua.pop 2 -- remove error and error string pushed by tostring'
- Lua.throwMessage (modifier (UTF8.toString msg))
-
--- | Mark the context of a Lua computation for better error reporting.
-defineHowTo :: String -> Lua a -> Lua a
-defineHowTo ctx op = Lua.errorConversion >>= \ec ->
- Lua.addContextToException ec ("Could not " <> ctx <> ": ") op
+ Lua.rawset (Lua.nth 3)
-- | Like @'Lua.pcall'@, but uses a predefined error handler which adds a
-- traceback on error.
-pcallWithTraceback :: NumArgs -> NumResults -> Lua Status
+pcallWithTraceback :: LuaError e => NumArgs -> NumResults -> LuaE e Status
pcallWithTraceback nargs nresults = do
- let traceback' :: Lua NumResults
+ let traceback' :: LuaError e => LuaE e NumResults
traceback' = do
l <- Lua.state
- msg <- Lua.tostring' (Lua.nthFromBottom 1)
- Lua.traceback l (Just (UTF8.toString msg)) 2
+ msg <- Lua.tostring' (Lua.nthBottom 1)
+ Lua.traceback l (Just msg) 2
return 1
- tracebackIdx <- Lua.absindex (Lua.nthFromTop (Lua.fromNumArgs nargs + 1))
+ tracebackIdx <- Lua.absindex (Lua.nth (Lua.fromNumArgs nargs + 1))
Lua.pushHaskellFunction traceback'
Lua.insert tracebackIdx
result <- Lua.pcall nargs nresults (Just tracebackIdx)
@@ -129,15 +46,15 @@ pcallWithTraceback nargs nresults = do
return result
-- | Like @'Lua.call'@, but adds a traceback to the error message (if any).
-callWithTraceback :: NumArgs -> NumResults -> Lua ()
+callWithTraceback :: LuaError e => NumArgs -> NumResults -> LuaE e ()
callWithTraceback nargs nresults = do
result <- pcallWithTraceback nargs nresults
when (result /= Lua.OK)
- Lua.throwTopMessage
+ Lua.throwErrorAsException
-- | Run the given string as a Lua program, while also adding a traceback to the
-- error message if an error occurs.
-dofileWithTraceback :: FilePath -> Lua Status
+dofileWithTraceback :: LuaError e => FilePath -> LuaE e Status
dofileWithTraceback fp = do
loadRes <- Lua.loadfile fp
case loadRes of
diff --git a/src/Text/Pandoc/Lua/Walk.hs b/src/Text/Pandoc/Lua/Walk.hs
deleted file mode 100644
index d6d973496..000000000
--- a/src/Text/Pandoc/Lua/Walk.hs
+++ /dev/null
@@ -1,158 +0,0 @@
-{-# LANGUAGE DeriveTraversable #-}
-{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
-{- |
-Module : Text.Pandoc.Lua.Walk
-Copyright : © 2012-2021 John MacFarlane,
- © 2017-2021 Albert Krewinkel
-License : GNU GPL, version 2 or above
-Maintainer : Albert Krewinkel <tarleb+pandoc@moltkeplatz.de>
-Stability : alpha
-
-Walking documents in a filter-suitable way.
--}
-module Text.Pandoc.Lua.Walk
- ( SingletonsList (..)
- )
-where
-
-import Control.Monad ((<=<))
-import Text.Pandoc.Definition
-import Text.Pandoc.Walk
-
--- | Helper type which allows to traverse trees in order, while splicing in
--- trees.
---
--- The only interesting use of this type is via it's '@Walkable@' instance. That
--- instance makes it possible to walk a Pandoc document (or a subset thereof),
--- while applying a function on each element of an AST element /list/, and have
--- the resulting list spliced back in place of the original element. This is the
--- traversal/splicing method used for Lua filters.
-newtype SingletonsList a = SingletonsList { singletonsList :: [a] }
- deriving (Functor, Foldable, Traversable)
-
---
--- SingletonsList Inline
---
-instance {-# OVERLAPPING #-} Walkable (SingletonsList Inline) [Inline] where
- walkM = walkSingletonsListM
- query = querySingletonsList
-
-instance Walkable (SingletonsList Inline) Pandoc where
- walkM = walkPandocM
- query = queryPandoc
-
-instance Walkable (SingletonsList Inline) Citation where
- walkM = walkCitationM
- query = queryCitation
-
-instance Walkable (SingletonsList Inline) Inline where
- walkM = walkInlineM
- query = queryInline
-
-instance Walkable (SingletonsList Inline) Block where
- walkM = walkBlockM
- query = queryBlock
-
-instance Walkable (SingletonsList Inline) Row where
- walkM = walkRowM
- query = queryRow
-
-instance Walkable (SingletonsList Inline) TableHead where
- walkM = walkTableHeadM
- query = queryTableHead
-
-instance Walkable (SingletonsList Inline) TableBody where
- walkM = walkTableBodyM
- query = queryTableBody
-
-instance Walkable (SingletonsList Inline) TableFoot where
- walkM = walkTableFootM
- query = queryTableFoot
-
-instance Walkable (SingletonsList Inline) Caption where
- walkM = walkCaptionM
- query = queryCaption
-
-instance Walkable (SingletonsList Inline) Cell where
- walkM = walkCellM
- query = queryCell
-
-instance Walkable (SingletonsList Inline) MetaValue where
- walkM = walkMetaValueM
- query = queryMetaValue
-
-instance Walkable (SingletonsList Inline) Meta where
- walkM f (Meta metamap) = Meta <$> walkM f metamap
- query f (Meta metamap) = query f metamap
-
---
--- SingletonsList Block
---
-instance {-# OVERLAPPING #-} Walkable (SingletonsList Block) [Block] where
- walkM = walkSingletonsListM
- query = querySingletonsList
-
-instance Walkable (SingletonsList Block) Pandoc where
- walkM = walkPandocM
- query = queryPandoc
-
-instance Walkable (SingletonsList Block) Citation where
- walkM = walkCitationM
- query = queryCitation
-
-instance Walkable (SingletonsList Block) Inline where
- walkM = walkInlineM
- query = queryInline
-
-instance Walkable (SingletonsList Block) Block where
- walkM = walkBlockM
- query = queryBlock
-
-instance Walkable (SingletonsList Block) Row where
- walkM = walkRowM
- query = queryRow
-
-instance Walkable (SingletonsList Block) TableHead where
- walkM = walkTableHeadM
- query = queryTableHead
-
-instance Walkable (SingletonsList Block) TableBody where
- walkM = walkTableBodyM
- query = queryTableBody
-
-instance Walkable (SingletonsList Block) TableFoot where
- walkM = walkTableFootM
- query = queryTableFoot
-
-instance Walkable (SingletonsList Block) Caption where
- walkM = walkCaptionM
- query = queryCaption
-
-instance Walkable (SingletonsList Block) Cell where
- walkM = walkCellM
- query = queryCell
-
-instance Walkable (SingletonsList Block) MetaValue where
- walkM = walkMetaValueM
- query = queryMetaValue
-
-instance Walkable (SingletonsList Block) Meta where
- walkM f (Meta metamap) = Meta <$> walkM f metamap
- query f (Meta metamap) = query f metamap
-
-
-walkSingletonsListM :: (Monad m, Walkable (SingletonsList a) a)
- => (SingletonsList a -> m (SingletonsList a))
- -> [a] -> m [a]
-walkSingletonsListM f =
- let f' = fmap singletonsList . f . SingletonsList . (:[]) <=< walkM f
- in fmap mconcat . mapM f'
-
-querySingletonsList :: (Monoid c, Walkable (SingletonsList a) a)
- => (SingletonsList a -> c)
- -> [a] -> c
-querySingletonsList f =
- let f' x = f (SingletonsList [x]) `mappend` query f x
- in mconcat . map f'
diff --git a/src/Text/Pandoc/MIME.hs b/src/Text/Pandoc/MIME.hs
index 77c7069e9..dff8f7822 100644
--- a/src/Text/Pandoc/MIME.hs
+++ b/src/Text/Pandoc/MIME.hs
@@ -528,7 +528,7 @@ mimeTypesList =
,("wvx","video/x-ms-wvx")
,("wz","application/x-wingz")
,("xbm","image/x-xbitmap")
- ,("xcf","application/x-xcf")
+ ,("xcf","image/x-xcf")
,("xht","application/xhtml+xml")
,("xhtml","application/xhtml+xml")
,("xlb","application/vnd.ms-excel")
diff --git a/src/Text/Pandoc/MediaBag.hs b/src/Text/Pandoc/MediaBag.hs
index 098e484ee..eb4f3110c 100644
--- a/src/Text/Pandoc/MediaBag.hs
+++ b/src/Text/Pandoc/MediaBag.hs
@@ -80,7 +80,7 @@ insertMedia fp mbMime contents (MediaBag mediamap) =
uri = parseURI fp
newpath = if isRelative fp
&& isNothing uri
- && ".." `notElem` splitPath fp
+ && ".." `notElem` splitDirectories fp
then T.unpack fp'
else showDigest (sha1 contents) <> "." <> ext
fallback = case takeExtension fp of
diff --git a/src/Text/Pandoc/Network/HTTP.hs b/src/Text/Pandoc/Network/HTTP.hs
new file mode 100644
index 000000000..89f7f5544
--- /dev/null
+++ b/src/Text/Pandoc/Network/HTTP.hs
@@ -0,0 +1,18 @@
+{- |
+ Module : Text.Pandoc.Writers.Markdown.Inline
+ Copyright : Copyright (C) 2006-2021 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane <jgm@berkeley.edu>
+ Stability : alpha
+ Portability : portable
+-}
+module Text.Pandoc.Network.HTTP (
+ urlEncode
+ ) where
+import qualified Network.HTTP.Types as HTTP
+import qualified Text.Pandoc.UTF8 as UTF8
+import qualified Data.Text as T
+
+urlEncode :: T.Text -> T.Text
+urlEncode = UTF8.toText . HTTP.urlEncode True . UTF8.fromText
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs
index 85d9aa103..6a3028b14 100644
--- a/src/Text/Pandoc/Options.hs
+++ b/src/Text/Pandoc/Options.hs
@@ -34,10 +34,10 @@ module Text.Pandoc.Options ( module Text.Pandoc.Extensions
, defaultKaTeXURL
) where
import Control.Applicative ((<|>))
-import Data.Char (toLower)
import Data.Maybe (fromMaybe)
import Data.Data (Data)
import Data.Default
+import Data.Char (toLower)
import Data.Text (Text)
import qualified Data.Set as Set
import Data.Typeable (Typeable)
@@ -46,10 +46,9 @@ import Skylighting (SyntaxMap, defaultSyntaxMap)
import Text.DocTemplates (Context(..), Template)
import Text.Pandoc.Extensions
import Text.Pandoc.Highlighting (Style, pygments)
-import Text.Pandoc.Shared (camelCaseStrToHyphenated)
-import Data.Aeson.TH (deriveJSON, defaultOptions, Options(..),
- SumEncoding(..))
-import Data.YAML
+import Text.Pandoc.UTF8 (toStringLazy)
+import Data.Aeson.TH (deriveJSON)
+import Data.Aeson
class HasSyntaxExtensions a where
getExtensions :: a -> Extensions
@@ -106,9 +105,9 @@ data HTMLMathMethod = PlainMath
| KaTeX Text -- url of KaTeX files
deriving (Show, Read, Eq, Data, Typeable, Generic)
-instance FromYAML HTMLMathMethod where
- parseYAML node =
- (withMap "HTMLMathMethod" $ \m -> do
+instance FromJSON HTMLMathMethod where
+ parseJSON node =
+ (withObject "HTMLMathMethod" $ \m -> do
method <- m .: "method"
mburl <- m .:? "url"
case method :: Text of
@@ -121,28 +120,48 @@ instance FromYAML HTMLMathMethod where
"katex" -> return $ KaTeX $
fromMaybe defaultKaTeXURL mburl
_ -> fail $ "Unknown HTML math method " ++ show method) node
- <|> (withStr "HTMLMathMethod" $ \method ->
- case method of
- "plain" -> return PlainMath
- "webtex" -> return $ WebTeX ""
- "gladtex" -> return GladTeX
- "mathml" -> return MathML
- "mathjax" -> return $ MathJax defaultMathJaxURL
- "katex" -> return $ KaTeX defaultKaTeXURL
- _ -> fail $ "Unknown HTML math method " ++ show method) node
+ <|> (case node of
+ String "plain" -> return PlainMath
+ String "webtex" -> return $ WebTeX ""
+ String "gladtex" -> return GladTeX
+ String "mathml" -> return MathML
+ String "mathjax" -> return $ MathJax defaultMathJaxURL
+ String "katex" -> return $ KaTeX defaultKaTeXURL
+ _ -> fail $ "Unknown HTML math method " <>
+ toStringLazy (encode node))
+
+instance ToJSON HTMLMathMethod where
+ toJSON PlainMath = String "plain"
+ toJSON (WebTeX "") = String "webtex"
+ toJSON (WebTeX url) = object ["method" .= String "webtex",
+ "url" .= String url]
+ toJSON GladTeX = String "gladtex"
+ toJSON MathML = String "mathml"
+ toJSON (MathJax "") = String "mathjax"
+ toJSON (MathJax url) = object ["method" .= String "mathjax",
+ "url" .= String url]
+ toJSON (KaTeX "") = String "katex"
+ toJSON (KaTeX url) = object ["method" .= String "katex",
+ "url" .= String url]
data CiteMethod = Citeproc -- use citeproc to render them
| Natbib -- output natbib cite commands
| Biblatex -- output biblatex cite commands
deriving (Show, Read, Eq, Data, Typeable, Generic)
-instance FromYAML CiteMethod where
- parseYAML = withStr "Citeproc" $ \t ->
- case t of
- "citeproc" -> return Citeproc
- "natbib" -> return Natbib
- "biblatex" -> return Biblatex
- _ -> fail $ "Unknown citation method " ++ show t
+instance FromJSON CiteMethod where
+ parseJSON v =
+ case v of
+ String "citeproc" -> return Citeproc
+ String "natbib" -> return Natbib
+ String "biblatex" -> return Biblatex
+ _ -> fail $ "Unknown citation method: " <>
+ toStringLazy (encode v)
+
+instance ToJSON CiteMethod where
+ toJSON Citeproc = String "citeproc"
+ toJSON Natbib = String "natbib"
+ toJSON Biblatex = String "biblatex"
-- | Methods for obfuscating email addresses in HTML.
data ObfuscationMethod = NoObfuscation
@@ -150,13 +169,18 @@ data ObfuscationMethod = NoObfuscation
| JavascriptObfuscation
deriving (Show, Read, Eq, Data, Typeable, Generic)
-instance FromYAML ObfuscationMethod where
- parseYAML = withStr "Citeproc" $ \t ->
- case t of
- "none" -> return NoObfuscation
- "references" -> return ReferenceObfuscation
- "javascript" -> return JavascriptObfuscation
- _ -> fail $ "Unknown obfuscation method " ++ show t
+instance FromJSON ObfuscationMethod where
+ parseJSON v =
+ case v of
+ String "none" -> return NoObfuscation
+ String "references" -> return ReferenceObfuscation
+ String "javascript" -> return JavascriptObfuscation
+ _ -> fail $ "Unknown obfuscation method " ++ toStringLazy (encode v)
+
+instance ToJSON ObfuscationMethod where
+ toJSON NoObfuscation = String "none"
+ toJSON ReferenceObfuscation = String "references"
+ toJSON JavascriptObfuscation = String "javascript"
-- | Varieties of HTML slide shows.
data HTMLSlideVariant = S5Slides
@@ -173,13 +197,22 @@ data TrackChanges = AcceptChanges
| AllChanges
deriving (Show, Read, Eq, Data, Typeable, Generic)
-instance FromYAML TrackChanges where
- parseYAML = withStr "TrackChanges" $ \t ->
- case t of
- "accept" -> return AcceptChanges
- "reject" -> return RejectChanges
- "all" -> return AllChanges
- _ -> fail $ "Unknown track changes method " ++ show t
+-- update in doc/filters.md if this changes:
+instance FromJSON TrackChanges where
+ parseJSON v =
+ case v of
+ String "accept" -> return AcceptChanges
+ String "reject" -> return RejectChanges
+ String "all" -> return AllChanges
+ String "accept-changes" -> return AcceptChanges
+ String "reject-changes" -> return RejectChanges
+ String "all-changes" -> return AllChanges
+ _ -> fail $ "Unknown track changes method " <> toStringLazy (encode v)
+
+instance ToJSON TrackChanges where
+ toJSON AcceptChanges = String "accept-changes"
+ toJSON RejectChanges = String "reject-changes"
+ toJSON AllChanges = String "all-changes"
-- | Options for wrapping text in the output.
data WrapOption = WrapAuto -- ^ Automatically wrap to width
@@ -187,14 +220,21 @@ data WrapOption = WrapAuto -- ^ Automatically wrap to width
| WrapPreserve -- ^ Preserve wrapping of input source
deriving (Show, Read, Eq, Data, Typeable, Generic)
-instance FromYAML WrapOption where
- parseYAML = withStr "WrapOption" $ \t ->
- case t of
- "auto" -> return WrapAuto
- "none" -> return WrapNone
- "preserve" -> return WrapPreserve
- _ -> fail $ "Unknown wrap method " ++ show t
-
+instance FromJSON WrapOption where
+ parseJSON v =
+ case v of
+ String "auto" -> return WrapAuto
+ String "wrap-auto" -> return WrapAuto
+ String "none" -> return WrapNone
+ String "wrap-none" -> return WrapNone
+ String "preserve" -> return WrapPreserve
+ String "wrap-preserve" -> return WrapPreserve
+ _ -> fail $ "Unknown wrap method " <> toStringLazy (encode v)
+
+instance ToJSON WrapOption where
+ toJSON WrapAuto = "wrap-auto"
+ toJSON WrapNone = "wrap-none"
+ toJSON WrapPreserve = "wrap-preserve"
-- | Options defining the type of top-level headers.
data TopLevelDivision = TopLevelPart -- ^ Top-level headers become parts
@@ -204,15 +244,24 @@ data TopLevelDivision = TopLevelPart -- ^ Top-level headers become parts
-- heuristics
deriving (Show, Read, Eq, Data, Typeable, Generic)
-instance FromYAML TopLevelDivision where
- parseYAML = withStr "TopLevelDivision" $ \t ->
- case t of
- "part" -> return TopLevelPart
- "chapter" -> return TopLevelChapter
- "section" -> return TopLevelSection
- "default" -> return TopLevelDefault
- _ -> fail $ "Unknown top level division " ++ show t
-
+instance FromJSON TopLevelDivision where
+ parseJSON v =
+ case v of
+ String "part" -> return TopLevelPart
+ String "top-level-part" -> return TopLevelPart
+ String "chapter" -> return TopLevelChapter
+ String "top-level-chapter" -> return TopLevelChapter
+ String "section" -> return TopLevelSection
+ String "top-level-section" -> return TopLevelSection
+ String "default" -> return TopLevelDefault
+ String "top-level-default" -> return TopLevelDefault
+ _ -> fail $ "Unknown top level division " <> toStringLazy (encode v)
+
+instance ToJSON TopLevelDivision where
+ toJSON TopLevelPart = "top-level-part"
+ toJSON TopLevelChapter = "top-level-chapter"
+ toJSON TopLevelSection = "top-level-section"
+ toJSON TopLevelDefault = "top-level-default"
-- | Locations for footnotes and references in markdown output
data ReferenceLocation = EndOfBlock -- ^ End of block
@@ -220,14 +269,21 @@ data ReferenceLocation = EndOfBlock -- ^ End of block
| EndOfDocument -- ^ at end of document
deriving (Show, Read, Eq, Data, Typeable, Generic)
-instance FromYAML ReferenceLocation where
- parseYAML = withStr "ReferenceLocation" $ \t ->
- case t of
- "block" -> return EndOfBlock
- "section" -> return EndOfSection
- "document" -> return EndOfDocument
- _ -> fail $ "Unknown reference location " ++ show t
-
+instance FromJSON ReferenceLocation where
+ parseJSON v =
+ case v of
+ String "block" -> return EndOfBlock
+ String "end-of-block" -> return EndOfBlock
+ String "section" -> return EndOfSection
+ String "end-of-section" -> return EndOfSection
+ String "document" -> return EndOfDocument
+ String "end-of-document" -> return EndOfDocument
+ _ -> fail $ "Unknown reference location " <> toStringLazy (encode v)
+
+instance ToJSON ReferenceLocation where
+ toJSON EndOfBlock = "end-of-block"
+ toJSON EndOfSection = "end-of-section"
+ toJSON EndOfDocument = "end-of-document"
-- | Options for writers
data WriterOptions = WriterOptions
@@ -316,42 +372,9 @@ defaultKaTeXURL :: Text
defaultKaTeXURL = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/"
-- Update documentation in doc/filters.md if this is changed.
-$(deriveJSON defaultOptions{ constructorTagModifier =
- camelCaseStrToHyphenated
- } ''TrackChanges)
-
-$(deriveJSON defaultOptions{ constructorTagModifier =
- camelCaseStrToHyphenated
- } ''WrapOption)
-
-$(deriveJSON defaultOptions{ constructorTagModifier =
- camelCaseStrToHyphenated . drop 8
- } ''TopLevelDivision)
+$(deriveJSON defaultOptions{ fieldLabelModifier =
+ camelTo2 '-' . drop 6 }
+ ''ReaderOptions)
-$(deriveJSON defaultOptions{ constructorTagModifier =
- camelCaseStrToHyphenated
- } ''ReferenceLocation)
-
--- Update documentation in doc/filters.md if this is changed.
-$(deriveJSON defaultOptions ''ReaderOptions)
-
-$(deriveJSON defaultOptions{
- constructorTagModifier = map toLower,
- sumEncoding = TaggedObject{
- tagFieldName = "method",
- contentsFieldName = "url" }
- } ''HTMLMathMethod)
-
-$(deriveJSON defaultOptions{ constructorTagModifier =
- camelCaseStrToHyphenated
- } ''CiteMethod)
-
-$(deriveJSON defaultOptions{ constructorTagModifier =
- \case
- "NoObfuscation" -> "none"
- "ReferenceObfuscation" -> "references"
- "JavascriptObfuscation" -> "javascript"
- _ -> "none"
- } ''ObfuscationMethod)
-
-$(deriveJSON defaultOptions ''HTMLSlideVariant)
+$(deriveJSON defaultOptions{ constructorTagModifier = map toLower }
+ ''HTMLSlideVariant)
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs
index c4e30af34..9ff4bfb09 100644
--- a/src/Text/Pandoc/PDF.hs
+++ b/src/Text/Pandoc/PDF.hs
@@ -2,6 +2,7 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleContexts #-}
{- |
Module : Text.Pandoc.PDF
Copyright : Copyright (C) 2012-2021 John MacFarlane
@@ -50,13 +51,13 @@ import Text.Pandoc.Shared (inDirectory, stringify, tshow)
import qualified Text.Pandoc.UTF8 as UTF8
import Text.Pandoc.Walk (walkM)
import Text.Pandoc.Writers.Shared (getField, metaToContext)
+import Control.Monad.Catch (MonadMask)
#ifdef _WINDOWS
import Data.List (intercalate)
#endif
import Data.List (isPrefixOf, find)
-import Text.Pandoc.Class.PandocIO (PandocIO, extractMedia, runIOorExplode)
-import Text.Pandoc.Class.PandocMonad (fillMediaBag, getCommonState, getVerbosity,
- putCommonState, report, setVerbosity)
+import Text.Pandoc.Class (fillMediaBag, getVerbosity,
+ report, extractMedia, PandocMonad)
import Text.Pandoc.Logging
#ifdef _WINDOWS
@@ -67,14 +68,15 @@ changePathSeparators =
intercalate "/" . map (filter (/='\\')) . splitDirectories
#endif
-makePDF :: String -- ^ pdf creator (pdflatex, lualatex, xelatex,
+makePDF :: (PandocMonad m, MonadIO m, MonadMask m)
+ => String -- ^ pdf creator (pdflatex, lualatex, xelatex,
-- wkhtmltopdf, weasyprint, prince, context, pdfroff,
-- or path to executable)
-> [String] -- ^ arguments to pass to pdf creator
- -> (WriterOptions -> Pandoc -> PandocIO Text) -- ^ writer
+ -> (WriterOptions -> Pandoc -> m Text) -- ^ writer
-> WriterOptions -- ^ options
-> Pandoc -- ^ document
- -> PandocIO (Either ByteString ByteString)
+ -> m (Either ByteString ByteString)
makePDF program pdfargs writer opts doc =
case takeBaseName program of
"wkhtmltopdf" -> makeWithWkhtmltopdf program pdfargs writer opts doc
@@ -86,57 +88,52 @@ makePDF program pdfargs writer opts doc =
source <- writer opts doc
let args = ["-ms", "-mpdfmark", "-mspdf",
"-e", "-t", "-k", "-KUTF-8", "-i"] ++ pdfargs
- verbosity <- getVerbosity
- liftIO $ generic2pdf verbosity program args source
+ generic2pdf program args source
baseProg -> do
- commonState <- getCommonState
- verbosity <- getVerbosity
- -- latex has trouble with tildes in paths, which
- -- you find in Windows temp dir paths with longer
- -- user names (see #777)
- let withTempDir templ action = do
- tmp <- getTemporaryDirectory
- uname <- E.catch
- (do (ec, sout, _) <- readProcessWithExitCode "uname" ["-o"] ""
- if ec == ExitSuccess
- then return $ Just $ filter (not . isSpace) sout
- else return Nothing)
- (\(_ :: E.SomeException) -> return Nothing)
- if '~' `elem` tmp || uname == Just "Cygwin" -- see #5451
- then withTempDirectory "." templ action
- else withSystemTempDirectory templ action
- (newCommonState, res) <- liftIO $ withTempDir "tex2pdf." $ \tmpdir' -> do
+ withTempDir "tex2pdf." $ \tmpdir' -> do
#ifdef _WINDOWS
-- note: we want / even on Windows, for TexLive
let tmpdir = changePathSeparators tmpdir'
#else
let tmpdir = tmpdir'
#endif
- runIOorExplode $ do
- putCommonState commonState
- doc' <- handleImages opts tmpdir doc
- source <- writer opts{ writerExtensions = -- disable use of quote
- -- ligatures to avoid bad ligatures like ?`
- disableExtension Ext_smart
- (writerExtensions opts) } doc'
- res <- case baseProg of
- "context" -> context2pdf verbosity program pdfargs tmpdir source
- "tectonic" -> tectonic2pdf verbosity program pdfargs tmpdir source
- prog | prog `elem` ["pdflatex", "lualatex", "xelatex", "latexmk"]
- -> tex2pdf verbosity program pdfargs tmpdir source
- _ -> return $ Left $ UTF8.fromStringLazy
- $ "Unknown program " ++ program
- cs <- getCommonState
- return (cs, res)
- putCommonState newCommonState
- return res
+ doc' <- handleImages opts tmpdir doc
+ source <- writer opts{ writerExtensions = -- disable use of quote
+ -- ligatures to avoid bad ligatures like ?`
+ disableExtension Ext_smart
+ (writerExtensions opts) } doc'
+ case baseProg of
+ "context" -> context2pdf program pdfargs tmpdir source
+ "tectonic" -> tectonic2pdf program pdfargs tmpdir source
+ prog | prog `elem` ["pdflatex", "lualatex", "xelatex", "latexmk"]
+ -> tex2pdf program pdfargs tmpdir source
+ _ -> return $ Left $ UTF8.fromStringLazy
+ $ "Unknown program " ++ program
+
+-- latex has trouble with tildes in paths, which
+-- you find in Windows temp dir paths with longer
+-- user names (see #777)
+withTempDir :: (PandocMonad m, MonadMask m, MonadIO m)
+ => FilePath -> (FilePath -> m a) -> m a
+withTempDir templ action = do
+ tmp <- liftIO getTemporaryDirectory
+ uname <- liftIO $ E.catch
+ (do (ec, sout, _) <- readProcessWithExitCode "uname" ["-o"] ""
+ if ec == ExitSuccess
+ then return $ Just $ filter (not . isSpace) sout
+ else return Nothing)
+ (\(_ :: E.SomeException) -> return Nothing)
+ if '~' `elem` tmp || uname == Just "Cygwin" -- see #5451
+ then withTempDirectory "." templ action
+ else withSystemTempDirectory templ action
-makeWithWkhtmltopdf :: String -- ^ wkhtmltopdf or path
+makeWithWkhtmltopdf :: (PandocMonad m, MonadIO m)
+ => String -- ^ wkhtmltopdf or path
-> [String] -- ^ arguments
- -> (WriterOptions -> Pandoc -> PandocIO Text) -- ^ writer
+ -> (WriterOptions -> Pandoc -> m Text) -- ^ writer
-> WriterOptions -- ^ options
-> Pandoc -- ^ document
- -> PandocIO (Either ByteString ByteString)
+ -> m (Either ByteString ByteString)
makeWithWkhtmltopdf program pdfargs writer opts doc@(Pandoc meta _) = do
let mathArgs = case writerHTMLMathMethod opts of
-- with MathJax, wait til all math is rendered:
@@ -167,16 +164,18 @@ makeWithWkhtmltopdf program pdfargs writer opts doc@(Pandoc meta _) = do
verbosity <- getVerbosity
liftIO $ html2pdf verbosity program args source
-handleImages :: WriterOptions
+handleImages :: (PandocMonad m, MonadIO m)
+ => WriterOptions
-> FilePath -- ^ temp dir to store images
-> Pandoc -- ^ document
- -> PandocIO Pandoc
+ -> m Pandoc
handleImages opts tmpdir doc =
fillMediaBag doc >>=
extractMedia tmpdir >>=
walkM (convertImages opts tmpdir)
-convertImages :: WriterOptions -> FilePath -> Inline -> PandocIO Inline
+convertImages :: (PandocMonad m, MonadIO m)
+ => WriterOptions -> FilePath -> Inline -> m Inline
convertImages opts tmpdir (Image attr ils (src, tit)) = do
img <- liftIO $ convertImage opts tmpdir $ T.unpack src
newPath <-
@@ -221,33 +220,32 @@ convertImage opts tmpdir fname = do
mime = getMimeType fname
doNothing = return (Right fname)
-tectonic2pdf :: Verbosity -- ^ Verbosity level
- -> String -- ^ tex program
+tectonic2pdf :: (PandocMonad m, MonadIO m)
+ => String -- ^ tex program
-> [String] -- ^ Arguments to the latex-engine
-> FilePath -- ^ temp directory for output
-> Text -- ^ tex source
- -> PandocIO (Either ByteString ByteString)
-tectonic2pdf verbosity program args tmpDir source = do
- (exit, log', mbPdf) <- runTectonic verbosity program args tmpDir source
+ -> m (Either ByteString ByteString)
+tectonic2pdf program args tmpDir source = do
+ (exit, log', mbPdf) <- runTectonic program args tmpDir source
case (exit, mbPdf) of
(ExitFailure _, _) -> return $ Left $ extractMsg log'
(ExitSuccess, Nothing) -> return $ Left ""
(ExitSuccess, Just pdf) -> do
- missingCharacterWarnings verbosity log'
+ missingCharacterWarnings log'
return $ Right pdf
-tex2pdf :: Verbosity -- ^ Verbosity level
- -> String -- ^ tex program
+tex2pdf :: (PandocMonad m, MonadIO m)
+ => String -- ^ tex program
-> [String] -- ^ Arguments to the latex-engine
-> FilePath -- ^ temp directory for output
-> Text -- ^ tex source
- -> PandocIO (Either ByteString ByteString)
-tex2pdf verbosity program args tmpDir source = do
+ -> m (Either ByteString ByteString)
+tex2pdf program args tmpDir source = do
let numruns | takeBaseName program == "latexmk" = 1
| "\\tableofcontents" `T.isInfixOf` source = 3 -- to get page numbers
| otherwise = 2 -- 1 run won't give you PDF bookmarks
- (exit, log', mbPdf) <- runTeXProgram verbosity program args numruns
- tmpDir source
+ (exit, log', mbPdf) <- runTeXProgram program args numruns tmpDir source
case (exit, mbPdf) of
(ExitFailure _, _) -> do
let logmsg = extractMsg log'
@@ -260,11 +258,11 @@ tex2pdf verbosity program args tmpDir source = do
return $ Left $ logmsg <> extramsg
(ExitSuccess, Nothing) -> return $ Left ""
(ExitSuccess, Just pdf) -> do
- missingCharacterWarnings verbosity log'
+ missingCharacterWarnings log'
return $ Right pdf
-missingCharacterWarnings :: Verbosity -> ByteString -> PandocIO ()
-missingCharacterWarnings verbosity log' = do
+missingCharacterWarnings :: PandocMonad m => ByteString -> m ()
+missingCharacterWarnings log' = do
let ls = BC.lines log'
let isMissingCharacterWarning = BC.isPrefixOf "Missing character: "
let toCodePoint c
@@ -275,7 +273,6 @@ missingCharacterWarnings verbosity log' = do
| l <- ls
, isMissingCharacterWarning l
]
- setVerbosity verbosity
mapM_ (report . MissingCharacter) warnings
-- parsing output
@@ -299,9 +296,10 @@ extractConTeXtMsg log' = do
-- running tex programs
-runTectonic :: Verbosity -> String -> [String] -> FilePath
- -> Text -> PandocIO (ExitCode, ByteString, Maybe ByteString)
-runTectonic verbosity program args' tmpDir' source = do
+runTectonic :: (PandocMonad m, MonadIO m)
+ => String -> [String] -> FilePath
+ -> Text -> m (ExitCode, ByteString, Maybe ByteString)
+runTectonic program args' tmpDir' source = do
let getOutDir acc (a:b:xs) = if a `elem` ["-o", "--outdir"]
then (reverse acc ++ xs, Just b)
else getOutDir (b:a:acc) xs
@@ -313,6 +311,7 @@ runTectonic verbosity program args' tmpDir' source = do
let sourceBL = BL.fromStrict $ UTF8.fromText source
let programArgs = ["--outdir", tmpDir] ++ args ++ ["-"]
env <- liftIO getEnvironment
+ verbosity <- getVerbosity
when (verbosity >= INFO) $ liftIO $
showVerboseInfo (Just tmpDir) program programArgs env
(utf8ToText sourceBL)
@@ -329,7 +328,9 @@ runTectonic verbosity program args' tmpDir' source = do
-- read a pdf that has been written to a temporary directory, and optionally read
-- logs
-getResultingPDF :: Maybe String -> String -> PandocIO (Maybe ByteString, Maybe ByteString)
+getResultingPDF :: (PandocMonad m, MonadIO m)
+ => Maybe String -> String
+ -> m (Maybe ByteString, Maybe ByteString)
getResultingPDF logFile pdfFile = do
pdfExists <- liftIO $ doesFileExist pdfFile
pdf <- if pdfExists
@@ -353,9 +354,10 @@ getResultingPDF logFile pdfFile = do
-- Run a TeX program on an input bytestring and return (exit code,
-- contents of stdout, contents of produced PDF if any). Rerun
-- a fixed number of times to resolve references.
-runTeXProgram :: Verbosity -> String -> [String] -> Int -> FilePath
- -> Text -> PandocIO (ExitCode, ByteString, Maybe ByteString)
-runTeXProgram verbosity program args numRuns tmpDir' source = do
+runTeXProgram :: (PandocMonad m, MonadIO m)
+ => String -> [String] -> Int -> FilePath
+ -> Text -> m (ExitCode, ByteString, Maybe ByteString)
+runTeXProgram program args numRuns tmpDir' source = do
let isOutdirArg x = "-outdir=" `isPrefixOf` x ||
"-output-directory=" `isPrefixOf` x
let tmpDir =
@@ -378,6 +380,7 @@ runTeXProgram verbosity program args numRuns tmpDir' source = do
("TEXMFOUTPUT", tmpDir) :
[(k,v) | (k,v) <- env'
, k /= "TEXINPUTS" && k /= "TEXMFOUTPUT"]
+ verbosity <- getVerbosity
when (verbosity >= INFO) $ liftIO $
UTF8.readFile file >>=
showVerboseInfo (Just tmpDir) program programArgs env''
@@ -398,16 +401,17 @@ runTeXProgram verbosity program args numRuns tmpDir' source = do
return (exit, fromMaybe out log', pdf)
runTeX 1
-generic2pdf :: Verbosity
- -> String
+generic2pdf :: (PandocMonad m, MonadIO m)
+ => String
-> [String]
-> Text
- -> IO (Either ByteString ByteString)
-generic2pdf verbosity program args source = do
- env' <- getEnvironment
+ -> m (Either ByteString ByteString)
+generic2pdf program args source = do
+ env' <- liftIO getEnvironment
+ verbosity <- getVerbosity
when (verbosity >= INFO) $
- showVerboseInfo Nothing program args env' source
- (exit, out) <- E.catch
+ liftIO $ showVerboseInfo Nothing program args env' source
+ (exit, out) <- liftIO $ E.catch
(pipeProcess (Just env') program args
(BL.fromStrict $ UTF8.fromText source))
(handlePDFProgramNotFound program)
@@ -454,19 +458,20 @@ html2pdf verbosity program args source =
(ExitSuccess, Nothing) -> Left ""
(ExitSuccess, Just pdf) -> Right pdf
-context2pdf :: Verbosity -- ^ Verbosity level
- -> String -- ^ "context" or path to it
+context2pdf :: (PandocMonad m, MonadIO m)
+ => String -- ^ "context" or path to it
-> [String] -- ^ extra arguments
-> FilePath -- ^ temp directory for output
-> Text -- ^ ConTeXt source
- -> PandocIO (Either ByteString ByteString)
-context2pdf verbosity program pdfargs tmpDir source =
+ -> m (Either ByteString ByteString)
+context2pdf program pdfargs tmpDir source = do
+ verbosity <- getVerbosity
liftIO $ inDirectory tmpDir $ do
let file = "input.tex"
BS.writeFile file $ UTF8.fromText source
let programArgs = "--batchmode" : pdfargs ++ [file]
env' <- getEnvironment
- when (verbosity >= INFO) $
+ when (verbosity >= INFO) $ liftIO $
UTF8.readFile file >>=
showVerboseInfo (Just tmpDir) program programArgs env'
(exit, out) <- E.catch
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index 09445622d..cfda4bad2 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -599,9 +599,9 @@ parseFromString :: Monad m
-> ParserT Sources st m r
parseFromString parser str = do
oldPos <- getPosition
- setPosition $ initialPos "chunk"
oldInput <- getInput
setInput $ toSources str
+ setPosition $ initialPos $ sourceName oldPos <> "_chunk"
result <- parser
spaces
setInput oldInput
diff --git a/src/Text/Pandoc/Readers.hs b/src/Text/Pandoc/Readers.hs
index 5106f8058..dd3aecdc5 100644
--- a/src/Text/Pandoc/Readers.hs
+++ b/src/Text/Pandoc/Readers.hs
@@ -55,6 +55,7 @@ module Text.Pandoc.Readers
, readCslJson
, readBibTeX
, readBibLaTeX
+ , readRTF
-- * Miscellaneous
, getReader
, getDefaultExtensions
@@ -102,6 +103,7 @@ import Text.Pandoc.Readers.Man
import Text.Pandoc.Readers.CSV
import Text.Pandoc.Readers.CslJson
import Text.Pandoc.Readers.BibTeX
+import Text.Pandoc.Readers.RTF
import qualified Text.Pandoc.UTF8 as UTF8
import Text.Pandoc.Sources (ToSources(..), sourcesToText)
@@ -149,6 +151,7 @@ readers = [("native" , TextReader readNative)
,("csljson" , TextReader readCslJson)
,("bibtex" , TextReader readBibTeX)
,("biblatex" , TextReader readBibLaTeX)
+ ,("rtf" , TextReader readRTF)
]
-- | Retrieve reader, extensions based on formatSpec (format+extensions).
diff --git a/src/Text/Pandoc/Readers/Custom.hs b/src/Text/Pandoc/Readers/Custom.hs
new file mode 100644
index 000000000..9252a9e45
--- /dev/null
+++ b/src/Text/Pandoc/Readers/Custom.hs
@@ -0,0 +1,83 @@
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE OverloadedStrings #-}
+{- |
+ Module : Text.Pandoc.Readers.Custom
+ Copyright : Copyright (C) 2021 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane <jgm@berkeley.edu>
+ Stability : alpha
+ Portability : portable
+
+Supports custom parsers written in Lua which produce a Pandoc AST.
+-}
+module Text.Pandoc.Readers.Custom ( readCustom ) where
+import Control.Exception
+import Control.Monad (when)
+import HsLua as Lua hiding (Operation (Div), render)
+import Control.Monad.IO.Class (MonadIO)
+import Text.Pandoc.Definition
+import Text.Pandoc.Class (PandocMonad, report)
+import Text.Pandoc.Logging
+import Text.Pandoc.Lua (Global (..), runLua, setGlobals)
+import Text.Pandoc.Lua.PandocLua
+import Text.Pandoc.Lua.Marshal.Pandoc (peekPandoc)
+import Text.Pandoc.Lua.Util (dofileWithTraceback, callWithTraceback,
+ pcallWithTraceback)
+import Text.Pandoc.Options
+import Text.Pandoc.Sources (ToSources(..), sourcesToText)
+import qualified Data.Text as T
+
+-- | Convert custom markup to Pandoc.
+readCustom :: (PandocMonad m, MonadIO m, ToSources s)
+ => FilePath -> ReaderOptions -> s -> m Pandoc
+readCustom luaFile opts srcs = do
+ let globals = [ PANDOC_SCRIPT_FILE luaFile ]
+ res <- runLua $ do
+ setGlobals globals
+ stat <- dofileWithTraceback luaFile
+ -- check for error in lua script (later we'll change the return type
+ -- to handle this more gracefully):
+ when (stat /= Lua.OK)
+ Lua.throwErrorAsException
+ parseCustom
+ case res of
+ Left msg -> throw msg
+ Right doc -> return doc
+ where
+ parseCustom = do
+ let input = toSources srcs
+ getglobal "Reader"
+ push input
+ push opts
+ pcallWithTraceback 2 1 >>= \case
+ OK -> forcePeek $ peekPandoc top
+ ErrRun -> do
+ -- Caught a runtime error. Check if parsing might work if we
+ -- pass a string instead of a Sources list, then retry.
+ runPeek (peekText top) >>= \case
+ Failure {} ->
+ -- not a string error object. Bail!
+ throwErrorAsException
+ Success errmsg -> do
+ if "string expected, got pandoc Sources" `T.isInfixOf` errmsg
+ then do
+ pop 1
+ _ <- unPandocLua $ do
+ report $ Deprecated "old Reader function signature" $
+ T.unlines
+ [ "Reader functions should accept a sources list; "
+ , "functions expecting `string` input are deprecated. "
+ , "Use `tostring` to convert the first argument to a "
+ , "string."
+ ]
+ getglobal "Reader"
+ push $ sourcesToText input -- push sources as string
+ push opts
+ callWithTraceback 2 1
+ forcePeek $ peekPandoc top
+ else
+ -- nothing we can do here
+ throwErrorAsException
+ _ -> -- not a runtime error, we won't be able to recover from that
+ throwErrorAsException
diff --git a/src/Text/Pandoc/Readers/DocBook.hs b/src/Text/Pandoc/Readers/DocBook.hs
index c49b82ccf..be90eb23e 100644
--- a/src/Text/Pandoc/Readers/DocBook.hs
+++ b/src/Text/Pandoc/Readers/DocBook.hs
@@ -19,7 +19,7 @@ import Data.Foldable (asum)
import Data.Generics
import Data.List (intersperse,elemIndex)
import Data.List.NonEmpty (nonEmpty)
-import Data.Maybe (fromMaybe,mapMaybe)
+import Data.Maybe (catMaybes,fromMaybe,mapMaybe,maybeToList)
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
@@ -316,7 +316,7 @@ List of all DocBook tags, with [x] indicating implemented,
[ ] postcode - A postal code in an address
[x] preface - Introductory matter preceding the first chapter of a book
[ ] prefaceinfo - Meta-information for a Preface
-[ ] primary - The primary word or phrase under which an index term should be
+[x] primary - The primary word or phrase under which an index term should be
sorted
[ ] primaryie - A primary term in an index entry, not in the text
[ ] printhistory - The printing history of a document
@@ -385,7 +385,7 @@ List of all DocBook tags, with [x] indicating implemented,
[o] screeninfo - Information about how a screen shot was produced
[ ] screenshot - A representation of what the user sees or might see on a
computer screen
-[ ] secondary - A secondary word or phrase in an index term
+[x] secondary - A secondary word or phrase in an index term
[ ] secondaryie - A secondary term in an index entry, rather than in the text
[x] sect1 - A top-level section of document
[x] sect1info - Meta-information for a Sect1
@@ -461,7 +461,7 @@ List of all DocBook tags, with [x] indicating implemented,
[x] td - A table entry in an HTML table
[x] term - The word or phrase being defined or described in a variable list
[ ] termdef - An inline term definition
-[ ] tertiary - A tertiary word or phrase in an index term
+[x] tertiary - A tertiary word or phrase in an index term
[ ] tertiaryie - A tertiary term in an index entry, rather than in the text
[ ] textdata - Pointer to external text data
[ ] textobject - A wrapper for a text description of an object and its
@@ -829,7 +829,7 @@ parseBlock (Elem e) =
"section" -> gets dbSectionLevel >>= sect . (+1)
"simplesect" ->
gets dbSectionLevel >>=
- sectWith (attrValue "id" e,["unnumbered"],[]) . (+1)
+ sectWith(attrValue "id" e) ["unnumbered"] [] . (+1)
"refsect1" -> sect 1
"refsect2" -> sect 2
"refsect3" -> sect 3
@@ -907,6 +907,7 @@ parseBlock (Elem e) =
let classes' = case attrValue "language" e of
"" -> []
x -> [x]
+ ++ ["numberLines" | attrValue "linenumbering" e == "numbered"]
return $ codeBlockWith (attrValue "id" e, classes', [])
$ trimNl $ strContentRecursive e
parseBlockquote = do
@@ -993,8 +994,8 @@ parseBlock (Elem e) =
(TableHead nullAttr $ toHeaderRow headrows)
[TableBody nullAttr 0 [] $ map toRow bodyrows]
(TableFoot nullAttr [])
- sect n = sectWith (attrValue "id" e,[],[]) n
- sectWith attr n = do
+ sect n = sectWith(attrValue "id" e) [] [] n
+ sectWith elId classes attrs n = do
isbook <- gets dbBook
let n' = if isbook || n == 0 then n + 1 else n
headerText <- case filterChild (named "title") e `mplus`
@@ -1005,7 +1006,14 @@ parseBlock (Elem e) =
modify $ \st -> st{ dbSectionLevel = n }
b <- getBlocks e
modify $ \st -> st{ dbSectionLevel = n - 1 }
- return $ headerWith attr n' headerText <> b
+ return $ headerWith (elId, classes, maybeToList titleabbrevElAsAttr++attrs) n' headerText <> b
+ titleabbrevElAsAttr = do
+ txt <- case filterChild (named "titleabbrev") e `mplus`
+ (filterChild (named "info") e >>=
+ filterChild (named "titleabbrev")) of
+ Just t -> Just ("titleabbrev", strContentRecursive t)
+ Nothing -> Nothing
+ return txt
lineItems = mapM getInlines $ filterChildren (named "line") e
-- | Admonitions are parsed into a div. Following other Docbook tools that output HTML,
-- we parse the optional title as a div with the @title@ class, and give the
@@ -1079,6 +1087,17 @@ elementToStr :: Content -> Content
elementToStr (Elem e') = Text $ CData CDataText (strContentRecursive e') Nothing
elementToStr x = x
+childElTextAsAttr :: Text -> Element -> Maybe (Text, Text)
+childElTextAsAttr n e = case findChild q e of
+ Nothing -> Nothing
+ Just childEl -> Just (n, strContentRecursive childEl)
+ where q = QName n (Just "http://docbook.org/ns/docbook") Nothing
+
+attrValueAsOptionalAttr :: Text -> Element -> Maybe (Text, Text)
+attrValueAsOptionalAttr n e = case attrValue n e of
+ "" -> Nothing
+ _ -> Just (n, attrValue n e)
+
parseInline :: PandocMonad m => Content -> DB m Inlines
parseInline (Text (CData _ s _)) = return $ text s
parseInline (CRef ref) =
@@ -1093,6 +1112,28 @@ parseInline (Elem e) =
if ident /= "" || classes /= []
then innerInlines (spanWith (ident,classes,[]))
else innerInlines id
+ "indexterm" -> do
+ let ident = attrValue "id" e
+ let classes = T.words $ attrValue "role" e
+ let attrs =
+ -- In DocBook, <primary>, <secondary>, <tertiary>, <see>, and <seealso>
+ -- have mixed content models. However, because we're representing these
+ -- elements in Pandoc's AST as attributes of a phrase, we flatten all
+ -- the descendant content of these elements.
+ [ childElTextAsAttr "primary" e
+ , childElTextAsAttr "secondary" e
+ , childElTextAsAttr "tertiary" e
+ , childElTextAsAttr "see" e
+ , childElTextAsAttr "seealso" e
+ , attrValueAsOptionalAttr "significance" e
+ , attrValueAsOptionalAttr "startref" e
+ , attrValueAsOptionalAttr "scope" e
+ , attrValueAsOptionalAttr "class" e
+ -- We don't do anything with the "pagenum" attribute, because these only
+ -- occur within literal <index> sections, which is not supported by Pandoc,
+ -- because Pandoc has no concept of pages.
+ ]
+ return $ spanWith (ident, ("indexterm" : classes), (catMaybes attrs)) mempty
"equation" -> equation e displayMath
"informalequation" -> equation e displayMath
"inlineequation" -> equation e math
diff --git a/src/Text/Pandoc/Readers/Docx.hs b/src/Text/Pandoc/Readers/Docx.hs
index c06adf7e3..5c8f20c18 100644
--- a/src/Text/Pandoc/Readers/Docx.hs
+++ b/src/Text/Pandoc/Readers/Docx.hs
@@ -246,8 +246,8 @@ runToText _ = ""
parPartToText :: ParPart -> T.Text
parPartToText (PlainRun run) = runToText run
-parPartToText (InternalHyperLink _ runs) = T.concat $ map runToText runs
-parPartToText (ExternalHyperLink _ runs) = T.concat $ map runToText runs
+parPartToText (InternalHyperLink _ children) = T.concat $ map parPartToText children
+parPartToText (ExternalHyperLink _ children) = T.concat $ map parPartToText children
parPartToText _ = ""
blacklistedCharStyles :: [CharStyleName]
@@ -322,6 +322,7 @@ runToInlines (InlineDrawing fp title alt bs ext) = do
(lift . lift) $ P.insertMedia fp Nothing bs
return $ imageWith (extentToAttr ext) (T.pack fp) title $ text alt
runToInlines InlineChart = return $ spanWith ("", ["chart"], []) $ text "[CHART]"
+runToInlines InlineDiagram = return $ spanWith ("", ["diagram"], []) $ text "[DIAGRAM]"
extentToAttr :: Extent -> Attr
extentToAttr (Just (w, h)) =
@@ -434,18 +435,21 @@ parPartToInlines' (Drawing fp title alt bs ext) = do
return $ imageWith (extentToAttr ext) (T.pack fp) title $ text alt
parPartToInlines' Chart =
return $ spanWith ("", ["chart"], []) $ text "[CHART]"
-parPartToInlines' (InternalHyperLink anchor runs) = do
- ils <- smushInlines <$> mapM runToInlines runs
+parPartToInlines' Diagram =
+ return $ spanWith ("", ["diagram"], []) $ text "[DIAGRAM]"
+parPartToInlines' (InternalHyperLink anchor children) = do
+ ils <- smushInlines <$> mapM parPartToInlines' children
return $ link ("#" <> anchor) "" ils
-parPartToInlines' (ExternalHyperLink target runs) = do
- ils <- smushInlines <$> mapM runToInlines runs
+parPartToInlines' (ExternalHyperLink target children) = do
+ ils <- smushInlines <$> mapM parPartToInlines' children
return $ link target "" ils
parPartToInlines' (PlainOMath exps) =
return $ math $ writeTeX exps
-parPartToInlines' (Field info runs) =
+parPartToInlines' (Field info children) =
case info of
- HyperlinkField url -> parPartToInlines' $ ExternalHyperLink url runs
- UnknownField -> smushInlines <$> mapM runToInlines runs
+ HyperlinkField url -> parPartToInlines' $ ExternalHyperLink url children
+ PagerefField fieldAnchor True -> parPartToInlines' $ InternalHyperLink fieldAnchor children
+ _ -> smushInlines <$> mapM parPartToInlines' children
parPartToInlines' NullParPart = return mempty
isAnchorSpan :: Inline -> Bool
@@ -532,34 +536,36 @@ trimSps (Many ils) = Many $ Seq.dropWhileL isSp $Seq.dropWhileR isSp ils
extraAttr :: (Eq (StyleName a), HasStyleName a) => a -> Attr
extraAttr s = ("", [], [("custom-style", fromStyleName $ getStyleName s)])
-parStyleToTransform :: PandocMonad m => ParagraphStyle -> DocxContext m (Blocks -> Blocks)
-parStyleToTransform pPr = case pStyle pPr of
- c@(getStyleName -> styleName):cs
- | styleName `elem` divsToKeep -> do
- let pPr' = pPr { pStyle = cs }
- transform <- parStyleToTransform pPr'
- return $ divWith ("", [normalizeToClassName styleName], []) . transform
- | styleName `elem` listParagraphStyles -> do
- let pPr' = pPr { pStyle = cs, indentation = Nothing}
- transform <- parStyleToTransform pPr'
- return $ divWith ("", [normalizeToClassName styleName], []) . transform
- | otherwise -> do
- let pPr' = pPr { pStyle = cs }
- transform <- parStyleToTransform pPr'
- styles <- asks (isEnabled Ext_styles . docxOptions)
- return $
- (if styles then divWith (extraAttr c) else id)
- . (if isBlockQuote c then blockQuote else id)
- . transform
- []
- | Just left <- indentation pPr >>= leftParIndent -> do
- let pPr' = pPr { indentation = Nothing }
- hang = fromMaybe 0 $ indentation pPr >>= hangingParIndent
- transform <- parStyleToTransform pPr'
- return $ if (left - hang) > 0
- then blockQuote . transform
- else transform
- | otherwise -> return id
+paragraphStyleToTransform :: PandocMonad m => ParagraphStyle -> DocxContext m (Blocks -> Blocks)
+paragraphStyleToTransform pPr =
+ let stylenames = map getStyleName (pStyle pPr)
+ transform = if (`elem` listParagraphStyles) `any` stylenames || relativeIndent pPr <= 0
+ then id
+ else blockQuote
+ in do
+ extStylesEnabled <- asks (isEnabled Ext_styles . docxOptions)
+ return $ foldr (\parStyle transform' ->
+ (parStyleToTransform extStylesEnabled parStyle) . transform'
+ ) transform (pStyle pPr)
+
+parStyleToTransform :: Bool -> ParStyle -> Blocks -> Blocks
+parStyleToTransform extStylesEnabled parStyle@(getStyleName -> styleName)
+ | (styleName `elem` divsToKeep) || (styleName `elem` listParagraphStyles) =
+ divWith ("", [normalizeToClassName styleName], [])
+ | otherwise =
+ (if extStylesEnabled then divWith (extraAttr parStyle) else id)
+ . (if isBlockQuote parStyle then blockQuote else id)
+
+-- The relative indent is the indentation minus the indentation of the parent style.
+-- This tells us whether this paragraph in particular was indented more and thus
+-- should be considered a block quote.
+relativeIndent :: ParagraphStyle -> Integer
+relativeIndent pPr =
+ let pStyleLeft = fromMaybe 0 $ pStyleIndentation pPr >>= leftParIndent
+ pStyleHang = fromMaybe 0 $ pStyleIndentation pPr >>= hangingParIndent
+ left = fromMaybe pStyleLeft $ indentation pPr >>= leftParIndent
+ hang = fromMaybe pStyleHang $ indentation pPr >>= hangingParIndent
+ in (left - hang) - (pStyleLeft - pStyleHang)
normalizeToClassName :: (FromStyleName a) => a -> T.Text
normalizeToClassName = T.map go . fromStyleName
@@ -578,7 +584,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
local (\s -> s{ docxInBidi = True })
(bodyPartToBlocks (Paragraph pPr' parparts))
| isCodeDiv pPr = do
- transform <- parStyleToTransform pPr
+ transform <- paragraphStyleToTransform pPr
return $
transform $
codeBlock $
@@ -605,7 +611,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
else prevParaIls <> space) <> ils'
handleInsertion = do
modify $ \s -> s {docxPrevPara = mempty}
- transform <- parStyleToTransform pPr'
+ transform <- paragraphStyleToTransform pPr'
return $ transform $ paraOrPlain ils''
opts <- asks docxOptions
case (pChange pPr', readerTrackChanges opts) of
@@ -620,7 +626,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
, AllChanges) -> do
let attr = ("", ["paragraph-insertion"], addAuthorAndDate cAuthor cDate)
insertMark = spanWith attr mempty
- transform <- parStyleToTransform pPr'
+ transform <- paragraphStyleToTransform pPr'
return $ transform $
paraOrPlain $ ils'' <> insertMark
(Just (TrackedChange Deletion _), AcceptChanges) -> do
@@ -632,7 +638,7 @@ bodyPartToBlocks (Paragraph pPr parparts)
, AllChanges) -> do
let attr = ("", ["paragraph-deletion"], addAuthorAndDate cAuthor cDate)
insertMark = spanWith attr mempty
- transform <- parStyleToTransform pPr'
+ transform <- paragraphStyleToTransform pPr'
return $ transform $
paraOrPlain $ ils'' <> insertMark
_ -> handleInsertion
diff --git a/src/Text/Pandoc/Readers/Docx/Fields.hs b/src/Text/Pandoc/Readers/Docx/Fields.hs
index 442bc3466..5f090b6be 100644
--- a/src/Text/Pandoc/Readers/Docx/Fields.hs
+++ b/src/Text/Pandoc/Readers/Docx/Fields.hs
@@ -21,8 +21,11 @@ import Text.Parsec
import Text.Parsec.Text (Parser)
type URL = T.Text
+type Anchor = T.Text
data FieldInfo = HyperlinkField URL
+ -- The boolean indicates whether the field is a hyperlink.
+ | PagerefField Anchor Bool
| UnknownField
deriving (Show)
@@ -33,6 +36,8 @@ fieldInfo :: Parser FieldInfo
fieldInfo =
try (HyperlinkField <$> hyperlink)
<|>
+ try ((uncurry PagerefField) <$> pageref)
+ <|>
return UnknownField
escapedQuote :: Parser T.Text
@@ -72,3 +77,23 @@ hyperlink = do
("\\l", s) : _ -> farg <> "#" <> s
_ -> farg
return url
+
+-- See §17.16.5.45
+pagerefSwitch :: Parser (T.Text, T.Text)
+pagerefSwitch = do
+ sw <- string "\\h"
+ spaces
+ farg <- fieldArgument
+ return (T.pack sw, farg)
+
+pageref :: Parser (Anchor, Bool)
+pageref = do
+ many space
+ string "PAGEREF"
+ spaces
+ farg <- fieldArgument
+ switches <- spaces *> many pagerefSwitch
+ let isLink = case switches of
+ ("\\h", _) : _ -> True
+ _ -> False
+ return (farg, isLink)
diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs
index dbb16a821..87a3aebef 100644
--- a/src/Text/Pandoc/Readers/Docx/Parse.hs
+++ b/src/Text/Pandoc/Readers/Docx/Parse.hs
@@ -50,6 +50,7 @@ module Text.Pandoc.Readers.Docx.Parse ( Docx(..)
, archiveToDocxWithWarnings
, getStyleNames
, pHeading
+ , pStyleIndentation
, constructBogusParStyleData
, leftBiasedMergeRunStyle
, rowsToRowspans
@@ -92,14 +93,13 @@ data ReaderEnv = ReaderEnv { envNotes :: Notes
deriving Show
data ReaderState = ReaderState { stateWarnings :: [T.Text]
- , stateFldCharState :: FldCharState
+ , stateFldCharState :: [FldCharState]
}
deriving Show
data FldCharState = FldCharOpen
| FldCharFieldInfo FieldInfo
- | FldCharContent FieldInfo [Run]
- | FldCharClosed
+ | FldCharContent FieldInfo [ParPart]
deriving (Show)
data DocxError = DocxError
@@ -194,11 +194,6 @@ data Notes = Notes NameSpaces
data Comments = Comments NameSpaces (M.Map T.Text Element)
deriving Show
-data ParIndentation = ParIndentation { leftParIndent :: Maybe Integer
- , rightParIndent :: Maybe Integer
- , hangingParIndent :: Maybe Integer}
- deriving Show
-
data ChangeType = Insertion | Deletion
deriving Show
@@ -318,12 +313,13 @@ data ParPart = PlainRun Run
| CommentStart CommentId Author (Maybe CommentDate) [BodyPart]
| CommentEnd CommentId
| BookMark BookMarkId Anchor
- | InternalHyperLink Anchor [Run]
- | ExternalHyperLink URL [Run]
+ | InternalHyperLink Anchor [ParPart]
+ | ExternalHyperLink URL [ParPart]
| Drawing FilePath T.Text T.Text B.ByteString Extent -- title, alt
| Chart -- placeholder for now
+ | Diagram -- placeholder for now
| PlainOMath [Exp]
- | Field FieldInfo [Run]
+ | Field FieldInfo [ParPart]
| NullParPart -- when we need to return nothing, but
-- not because of an error.
deriving Show
@@ -333,6 +329,7 @@ data Run = Run RunStyle [RunElem]
| Endnote [BodyPart]
| InlineDrawing FilePath T.Text T.Text B.ByteString Extent -- title, alt
| InlineChart -- placeholder
+ | InlineDiagram -- placeholder
deriving Show
data RunElem = TextRun T.Text | LnBrk | Tab | SoftHyphen | NoBreakHyphen
@@ -375,7 +372,7 @@ archiveToDocxWithWarnings archive = do
, envDocXmlPath = docXmlPath
}
rState = ReaderState { stateWarnings = []
- , stateFldCharState = FldCharClosed
+ , stateFldCharState = []
}
(eitherDoc, st) = runD (archiveToDocument archive) rEnv rState
case eitherDoc of
@@ -437,6 +434,7 @@ getStyleNames = fmap getStyleName
constructBogusParStyleData :: ParaStyleName -> ParStyle
constructBogusParStyleData stName = ParStyle
{ headingLev = Nothing
+ , indent = Nothing
, numInfo = Nothing
, psParentStyle = Nothing
, pStyleName = stName
@@ -507,9 +505,7 @@ archiveToRelationships archive docXmlPath =
filePathIsMedia :: FilePath -> Bool
filePathIsMedia fp =
- let (dir, _) = splitFileName fp
- in
- (dir == "word/media/")
+ "media" `elem` splitDirectories (takeDirectory fp)
lookupLevel :: T.Text -> T.Text -> Numbering -> Maybe Level
lookupLevel numId ilvl (Numbering _ numbs absNumbs) = do
@@ -673,20 +669,6 @@ elemToCell ns element | isElem ns "w" "tc" element =
return $ Cell (fromMaybe 1 gridSpan) vMerge cellContents
elemToCell _ _ = throwError WrongElem
-elemToParIndentation :: NameSpaces -> Element -> Maybe ParIndentation
-elemToParIndentation ns element | isElem ns "w" "ind" element =
- Just ParIndentation {
- leftParIndent =
- findAttrByName ns "w" "left" element >>=
- stringToInteger
- , rightParIndent =
- findAttrByName ns "w" "right" element >>=
- stringToInteger
- , hangingParIndent =
- findAttrByName ns "w" "hanging" element >>=
- stringToInteger }
-elemToParIndentation _ _ = Nothing
-
testBitMask :: Text -> Int -> Bool
testBitMask bitMaskS n =
case (reads ("0x" ++ T.unpack bitMaskS) :: [(Int, String)]) of
@@ -699,6 +681,9 @@ pHeading = getParStyleField headingLev . pStyle
pNumInfo :: ParagraphStyle -> Maybe (T.Text, T.Text)
pNumInfo = getParStyleField numInfo . pStyle
+pStyleIndentation :: ParagraphStyle -> Maybe ParIndentation
+pStyleIndentation style = (getParStyleField indent . pStyle) style
+
elemToBodyPart :: NameSpaces -> Element -> D BodyPart
elemToBodyPart ns element
| isElem ns "w" "p" element
@@ -715,28 +700,31 @@ elemToBodyPart ns element
elemToBodyPart ns element
| isElem ns "w" "p" element = do
parstyle <- elemToParagraphStyle ns element <$> asks envParStyles
- parparts <- mapD (elemToParPart ns) (elChildren element)
+ parparts' <- mapD (elemToParPart ns) (elChildren element)
+ fldCharState <- gets stateFldCharState
+ modify $ \st -> st {stateFldCharState = emptyFldCharContents fldCharState}
-- Word uses list enumeration for numbered headings, so we only
-- want to infer a list from the styles if it is NOT a heading.
- case pHeading parstyle of
- Nothing | Just (numId, lvl) <- pNumInfo parstyle -> do
- levelInfo <- lookupLevel numId lvl <$> asks envNumbering
- return $ ListItem parstyle numId lvl levelInfo parparts
- _ -> let
- hasCaptionStyle = elem "Caption" (pStyleId <$> pStyle parstyle)
-
- hasSimpleTableField = fromMaybe False $ do
- fldSimple <- findChildByName ns "w" "fldSimple" element
- instr <- findAttrByName ns "w" "instr" fldSimple
- pure ("Table" `elem` T.words instr)
-
- hasComplexTableField = fromMaybe False $ do
- instrText <- findElementByName ns "w" "instrText" element
- pure ("Table" `elem` T.words (strContent instrText))
-
- in if hasCaptionStyle && (hasSimpleTableField || hasComplexTableField)
- then return $ TblCaption parstyle parparts
- else return $ Paragraph parstyle parparts
+ let parparts = parparts' ++ (openFldCharsToParParts fldCharState) in
+ case pHeading parstyle of
+ Nothing | Just (numId, lvl) <- pNumInfo parstyle -> do
+ levelInfo <- lookupLevel numId lvl <$> asks envNumbering
+ return $ ListItem parstyle numId lvl levelInfo parparts
+ _ -> let
+ hasCaptionStyle = elem "Caption" (pStyleId <$> pStyle parstyle)
+
+ hasSimpleTableField = fromMaybe False $ do
+ fldSimple <- findChildByName ns "w" "fldSimple" element
+ instr <- findAttrByName ns "w" "instr" fldSimple
+ pure ("Table" `elem` T.words instr)
+
+ hasComplexTableField = fromMaybe False $ do
+ instrText <- findElementByName ns "w" "instrText" element
+ pure ("Table" `elem` T.words (strContent instrText))
+
+ in if hasCaptionStyle && (hasSimpleTableField || hasComplexTableField)
+ then return $ TblCaption parstyle parparts
+ else return $ Paragraph parstyle parparts
elemToBodyPart ns element
| isElem ns "w" "tbl" element = do
@@ -768,14 +756,30 @@ lookupRelationship docLocation relid rels =
where
pairs = map (\(Relationship loc relid' target) -> ((loc, relid'), target)) rels
+openFldCharsToParParts :: [FldCharState] -> [ParPart]
+openFldCharsToParParts [] = []
+openFldCharsToParParts (FldCharContent info children : ancestors) = case openFldCharsToParParts ancestors of
+ Field parentInfo siblings : _ -> [Field parentInfo $ siblings ++ [Field info $ reverse children]]
+ _ -> [Field info $ reverse children]
+openFldCharsToParParts (_ : ancestors) = openFldCharsToParParts ancestors
+
+emptyFldCharContents :: [FldCharState] -> [FldCharState]
+emptyFldCharContents = map
+ (\x -> case x of
+ FldCharContent info _ -> FldCharContent info []
+ _ -> x)
+
expandDrawingId :: T.Text -> D (FilePath, B.ByteString)
expandDrawingId s = do
location <- asks envLocation
target <- asks (fmap T.unpack . lookupRelationship location s . envRelationships)
case target of
Just filepath -> do
- bytes <- asks (lookup ("word/" ++ filepath) . envMedia)
- case bytes of
+ media <- asks envMedia
+ let filepath' = case filepath of
+ ('/':rest) -> rest
+ _ -> "word/" ++ filepath
+ case lookup filepath' media of
Just bs -> return (filepath, bs)
Nothing -> throwError DocxError
Nothing -> throwError DocxError
@@ -789,44 +793,6 @@ getTitleAndAlt ns element =
in (title, alt)
elemToParPart :: NameSpaces -> Element -> D ParPart
-elemToParPart ns element
- | isElem ns "w" "r" element
- , Just drawingElem <- findChildByName ns "w" "drawing" element
- , pic_ns <- "http://schemas.openxmlformats.org/drawingml/2006/picture"
- , Just picElem <- findElement (QName "pic" (Just pic_ns) (Just "pic")) drawingElem
- = let (title, alt) = getTitleAndAlt ns drawingElem
- a_ns = "http://schemas.openxmlformats.org/drawingml/2006/main"
- drawing = findElement (QName "blip" (Just a_ns) (Just "a")) picElem
- >>= findAttrByName ns "r" "embed"
- in
- case drawing of
- Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ Drawing fp title alt bs $ elemToExtent drawingElem)
- Nothing -> throwError WrongElem
--- The two cases below are an attempt to deal with images in deprecated vml format.
--- Todo: check out title and attr for deprecated format.
-elemToParPart ns element
- | isElem ns "w" "r" element
- , Just _ <- findChildByName ns "w" "pict" element =
- let drawing = findElement (elemName ns "v" "imagedata") element
- >>= findAttrByName ns "r" "id"
- in
- case drawing of
- Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ Drawing fp "" "" bs Nothing)
- Nothing -> throwError WrongElem
-elemToParPart ns element
- | isElem ns "w" "r" element
- , Just objectElem <- findChildByName ns "w" "object" element
- , Just shapeElem <- findChildByName ns "v" "shape" objectElem
- , Just imagedataElem <- findChildByName ns "v" "imagedata" shapeElem
- , Just drawingId <- findAttrByName ns "r" "id" imagedataElem
- = expandDrawingId drawingId >>= (\(fp, bs) -> return $ Drawing fp "" "" bs Nothing)
--- Chart
-elemToParPart ns element
- | isElem ns "w" "r" element
- , Just drawingElem <- findChildByName ns "w" "drawing" element
- , c_ns <- "http://schemas.openxmlformats.org/drawingml/2006/chart"
- , Just _ <- findElement (QName "chart" (Just c_ns) (Just "c")) drawingElem
- = return Chart
{-
The next one is a bit complicated. fldChar fields work by first
having a <w:fldChar fldCharType="begin"> in a run, then a run with
@@ -858,8 +824,13 @@ example (omissions and my comments in brackets):
So we do this in a number of steps. If we encounter the fldchar begin
tag, we start open a fldchar state variable (see state above). We add
the instrtext to it as FieldInfo. Then we close that and start adding
-the runs when we get to separate. Then when we get to end, we produce
-the Field type with appropriate FieldInfo and Runs.
+the children when we get to separate. Then when we get to end, we produce
+the Field type with appropriate FieldInfo and ParParts.
+
+Since there can be nested fields, the fldchar state needs to be a stack,
+so we can have multiple fldchars open at the same time. When a fldchar is
+closed, we either add the resulting field to its parent or we return it if
+there is no parent.
-}
elemToParPart ns element
| isElem ns "w" "r" element
@@ -867,78 +838,142 @@ elemToParPart ns element
, Just fldCharType <- findAttrByName ns "w" "fldCharType" fldChar = do
fldCharState <- gets stateFldCharState
case fldCharState of
- FldCharClosed | fldCharType == "begin" -> do
- modify $ \st -> st {stateFldCharState = FldCharOpen}
+ _ | fldCharType == "begin" -> do
+ modify $ \st -> st {stateFldCharState = FldCharOpen : fldCharState}
+ return NullParPart
+ FldCharFieldInfo info : ancestors | fldCharType == "separate" -> do
+ modify $ \st -> st {stateFldCharState = FldCharContent info [] : ancestors}
return NullParPart
- FldCharFieldInfo info | fldCharType == "separate" -> do
- modify $ \st -> st {stateFldCharState = FldCharContent info []}
+ -- Some fields have no content, since Pandoc doesn't understand any of those fields, we can just close it.
+ FldCharFieldInfo _ : ancestors | fldCharType == "end" -> do
+ modify $ \st -> st {stateFldCharState = ancestors}
return NullParPart
- FldCharContent info runs | fldCharType == "end" -> do
- modify $ \st -> st {stateFldCharState = FldCharClosed}
- return $ Field info $ reverse runs
+ [FldCharContent info children] | fldCharType == "end" -> do
+ modify $ \st -> st {stateFldCharState = []}
+ return $ Field info $ reverse children
+ FldCharContent info children : FldCharContent parentInfo siblings : ancestors | fldCharType == "end" ->
+ let parent = FldCharContent parentInfo $ (Field info (reverse children)) : siblings in do
+ modify $ \st -> st {stateFldCharState = parent : ancestors}
+ return NullParPart
_ -> throwError WrongElem
elemToParPart ns element
| isElem ns "w" "r" element
, Just instrText <- findChildByName ns "w" "instrText" element = do
fldCharState <- gets stateFldCharState
case fldCharState of
- FldCharOpen -> do
+ FldCharOpen : ancestors -> do
info <- eitherToD $ parseFieldInfo $ strContent instrText
- modify $ \st -> st{stateFldCharState = FldCharFieldInfo info}
+ modify $ \st -> st {stateFldCharState = FldCharFieldInfo info : ancestors}
return NullParPart
_ -> return NullParPart
-elemToParPart ns element
+{-
+There is an open fldchar, so we calculate the element and add it to the
+children. For this we need to first change the fldchar state to an empty
+stack to avoid descendants of children simply being added to the state instead
+of to their direct parent element. This would happen in the case of a
+w:hyperlink element for example.
+-}
+elemToParPart ns element = do
+ fldCharState <- gets stateFldCharState
+ case fldCharState of
+ FldCharContent info children : ancestors -> do
+ modify $ \st -> st {stateFldCharState = []}
+ parPart <- elemToParPart' ns element `catchError` \_ -> return NullParPart
+ modify $ \st -> st{stateFldCharState = FldCharContent info (parPart : children) : ancestors}
+ return NullParPart
+ _ -> elemToParPart' ns element
+
+elemToParPart' :: NameSpaces -> Element -> D ParPart
+elemToParPart' ns element
+ | isElem ns "w" "r" element
+ , Just drawingElem <- findChildByName ns "w" "drawing" element
+ , pic_ns <- "http://schemas.openxmlformats.org/drawingml/2006/picture"
+ , Just picElem <- findElement (QName "pic" (Just pic_ns) (Just "pic")) drawingElem
+ = let (title, alt) = getTitleAndAlt ns drawingElem
+ a_ns = "http://schemas.openxmlformats.org/drawingml/2006/main"
+ drawing = findElement (QName "blip" (Just a_ns) (Just "a")) picElem
+ >>= findAttrByName ns "r" "embed"
+ in
+ case drawing of
+ Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ Drawing fp title alt bs $ elemToExtent drawingElem)
+ Nothing -> throwError WrongElem
+-- The two cases below are an attempt to deal with images in deprecated vml format.
+-- Todo: check out title and attr for deprecated format.
+elemToParPart' ns element
+ | isElem ns "w" "r" element
+ , Just _ <- findChildByName ns "w" "pict" element =
+ let drawing = findElement (elemName ns "v" "imagedata") element
+ >>= findAttrByName ns "r" "id"
+ in
+ case drawing of
+ Just s -> expandDrawingId s >>= (\(fp, bs) -> return $ Drawing fp "" "" bs Nothing)
+ Nothing -> throwError WrongElem
+elemToParPart' ns element
+ | isElem ns "w" "r" element
+ , Just objectElem <- findChildByName ns "w" "object" element
+ , Just shapeElem <- findChildByName ns "v" "shape" objectElem
+ , Just imagedataElem <- findChildByName ns "v" "imagedata" shapeElem
+ , Just drawingId <- findAttrByName ns "r" "id" imagedataElem
+ = expandDrawingId drawingId >>= (\(fp, bs) -> return $ Drawing fp "" "" bs Nothing)
+-- Diagram
+elemToParPart' ns element
+ | isElem ns "w" "r" element
+ , Just drawingElem <- findChildByName ns "w" "drawing" element
+ , d_ns <- "http://schemas.openxmlformats.org/drawingml/2006/diagram"
+ , Just _ <- findElement (QName "relIds" (Just d_ns) (Just "dgm")) drawingElem
+ = return Diagram
+-- Chart
+elemToParPart' ns element
+ | isElem ns "w" "r" element
+ , Just drawingElem <- findChildByName ns "w" "drawing" element
+ , c_ns <- "http://schemas.openxmlformats.org/drawingml/2006/chart"
+ , Just _ <- findElement (QName "chart" (Just c_ns) (Just "c")) drawingElem
+ = return Chart
+elemToParPart' ns element
| isElem ns "w" "r" element = do
run <- elemToRun ns element
- -- we check to see if we have an open FldChar in state that we're
- -- recording.
- fldCharState <- gets stateFldCharState
- case fldCharState of
- FldCharContent info runs -> do
- modify $ \st -> st{stateFldCharState = FldCharContent info (run : runs)}
- return NullParPart
- _ -> return $ PlainRun run
-elemToParPart ns element
+ return $ PlainRun run
+elemToParPart' ns element
| Just change <- getTrackedChange ns element = do
runs <- mapD (elemToRun ns) (elChildren element)
return $ ChangedRuns change runs
-elemToParPart ns element
+elemToParPart' ns element
| isElem ns "w" "bookmarkStart" element
, Just bmId <- findAttrByName ns "w" "id" element
, Just bmName <- findAttrByName ns "w" "name" element =
return $ BookMark bmId bmName
-elemToParPart ns element
+elemToParPart' ns element
| isElem ns "w" "hyperlink" element
, Just relId <- findAttrByName ns "r" "id" element = do
location <- asks envLocation
- runs <- mapD (elemToRun ns) (elChildren element)
+ children <- mapD (elemToParPart ns) (elChildren element)
rels <- asks envRelationships
case lookupRelationship location relId rels of
Just target ->
case findAttrByName ns "w" "anchor" element of
- Just anchor -> return $ ExternalHyperLink (target <> "#" <> anchor) runs
- Nothing -> return $ ExternalHyperLink target runs
- Nothing -> return $ ExternalHyperLink "" runs
-elemToParPart ns element
+ Just anchor -> return $ ExternalHyperLink (target <> "#" <> anchor) children
+ Nothing -> return $ ExternalHyperLink target children
+ Nothing -> return $ ExternalHyperLink "" children
+elemToParPart' ns element
| isElem ns "w" "hyperlink" element
, Just anchor <- findAttrByName ns "w" "anchor" element = do
- runs <- mapD (elemToRun ns) (elChildren element)
- return $ InternalHyperLink anchor runs
-elemToParPart ns element
+ children <- mapD (elemToParPart ns) (elChildren element)
+ return $ InternalHyperLink anchor children
+elemToParPart' ns element
| isElem ns "w" "commentRangeStart" element
, Just cmtId <- findAttrByName ns "w" "id" element = do
(Comments _ commentMap) <- asks envComments
case M.lookup cmtId commentMap of
Just cmtElem -> elemToCommentStart ns cmtElem
Nothing -> throwError WrongElem
-elemToParPart ns element
+elemToParPart' ns element
| isElem ns "w" "commentRangeEnd" element
, Just cmtId <- findAttrByName ns "w" "id" element =
return $ CommentEnd cmtId
-elemToParPart ns element
+elemToParPart' ns element
| isElem ns "m" "oMath" element =
fmap PlainOMath (eitherToD $ readOMML $ showElement element)
-elemToParPart _ _ = throwError WrongElem
+elemToParPart' _ _ = throwError WrongElem
elemToCommentStart :: NameSpaces -> Element -> D ParPart
elemToCommentStart ns element
@@ -987,6 +1022,11 @@ childElemToRun ns element
, Just _ <- findElement (QName "chart" (Just c_ns) (Just "c")) element
= return InlineChart
childElemToRun ns element
+ | isElem ns "w" "drawing" element
+ , c_ns <- "http://schemas.openxmlformats.org/drawingml/2006/diagram"
+ , Just _ <- findElement (QName "relIds" (Just c_ns) (Just "dgm")) element
+ = return InlineDiagram
+childElemToRun ns element
| isElem ns "w" "footnoteReference" element
, Just fnId <- findAttrByName ns "w" "id" element = do
notes <- asks envNotes
@@ -1071,8 +1111,7 @@ elemToParagraphStyle ns element sty
in ParagraphStyle
{pStyle = mapMaybe (`M.lookup` sty) style
, indentation =
- findChildByName ns "w" "ind" pPr >>=
- elemToParIndentation ns
+ getIndentation ns element
, dropCap =
case
findChildByName ns "w" "framePr" pPr >>=
diff --git a/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs b/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs
index 0d7271d6a..df942579a 100644
--- a/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs
+++ b/src/Text/Pandoc/Readers/Docx/Parse/Styles.hs
@@ -21,6 +21,7 @@ module Text.Pandoc.Readers.Docx.Parse.Styles (
, CharStyle
, ParaStyleId(..)
, ParStyle(..)
+ , ParIndentation(..)
, RunStyle(..)
, HasStyleName
, StyleName
@@ -37,6 +38,7 @@ module Text.Pandoc.Readers.Docx.Parse.Styles (
, fromStyleName
, fromStyleId
, stringToInteger
+ , getIndentation
, getNumInfo
, elemToRunStyle
, defaultRunStyle
@@ -115,7 +117,13 @@ data RunStyle = RunStyle { isBold :: Maybe Bool
}
deriving Show
+data ParIndentation = ParIndentation { leftParIndent :: Maybe Integer
+ , rightParIndent :: Maybe Integer
+ , hangingParIndent :: Maybe Integer}
+ deriving Show
+
data ParStyle = ParStyle { headingLev :: Maybe (ParaStyleName, Int)
+ , indent :: Maybe ParIndentation
, numInfo :: Maybe (T.Text, T.Text)
, psParentStyle :: Maybe ParStyle
, pStyleName :: ParaStyleName
@@ -290,6 +298,22 @@ getHeaderLevel ns element
, n > 0 = Just (styleName, fromInteger n)
getHeaderLevel _ _ = Nothing
+getIndentation :: NameSpaces -> Element -> Maybe ParIndentation
+getIndentation ns el = do
+ indElement <- findChildByName ns "w" "pPr" el >>=
+ findChildByName ns "w" "ind"
+ return $ ParIndentation
+ {
+ leftParIndent = findAttrByName ns "w" "left" indElement <|>
+ findAttrByName ns "w" "start" indElement >>=
+ stringToInteger
+ , rightParIndent = findAttrByName ns "w" "right" indElement <|>
+ findAttrByName ns "w" "end" indElement >>=
+ stringToInteger
+ , hangingParIndent = findAttrByName ns "w" "hanging" indElement >>=
+ stringToInteger
+ }
+
getElementStyleName :: Coercible T.Text a => NameSpaces -> Element -> Maybe a
getElementStyleName ns el = coerce <$>
((findChildByName ns "w" "name" el >>= findAttrByName ns "w" "val")
@@ -314,6 +338,7 @@ elemToParStyleData ns element parentStyle
= Just $ ParStyle
{
headingLev = getHeaderLevel ns element
+ , indent = getIndentation ns element
, numInfo = getNumInfo ns element
, psParentStyle = parentStyle
, pStyleName = styleName
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index fdf4f28e0..8aa2646b2 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -551,7 +551,7 @@ pFigure = try $ do
let caption = fromMaybe mempty mbcap
case B.toList <$> mbimg of
Just [Image attr _ (url, tit)] ->
- return $ B.para $ B.imageWith attr url ("fig:" <> tit) caption
+ return $ B.simpleFigureWith attr caption url tit
_ -> mzero
pCodeBlock :: PandocMonad m => TagParser m Blocks
@@ -643,7 +643,7 @@ pQ = do
case lookup "cite" attrs of
Just url -> do
let uid = fromMaybe mempty $
- lookup "name" attrs <> lookup "id" attrs
+ lookup "name" attrs <|> lookup "id" attrs
let cls = maybe [] T.words $ lookup "class" attrs
url' <- canonicalizeUrl url
makeQuote $ B.spanWith (uid, cls, [("cite", escapeURI url')])
@@ -705,20 +705,18 @@ pLineBreak = do
pLink :: PandocMonad m => TagParser m Inlines
pLink = try $ do
- tag <- pSatisfy $ tagOpenLit "a" (const True)
+ tag@(TagOpen _ attr') <- pSatisfy $ tagOpenLit "a" (const True)
let title = fromAttrib "title" tag
- -- take id from id attribute if present, otherwise name
- let uid = fromMaybe (fromAttrib "name" tag) $
- maybeFromAttrib "id" tag
- let cls = T.words $ fromAttrib "class" tag
+ let attr = toAttr $ filter (\(k,_) -> k /= "title" && k /= "href") attr'
lab <- mconcat <$> manyTill inline (pCloses "a")
-- check for href; if href, then a link, otherwise a span
case maybeFromAttrib "href" tag of
Nothing ->
- return $ extractSpaces (B.spanWith (uid, cls, [])) lab
+ return $ extractSpaces (B.spanWith attr) lab
Just url' -> do
url <- canonicalizeUrl url'
- return $ extractSpaces (B.linkWith (uid, cls, []) (escapeURI url) title) lab
+ return $ extractSpaces
+ (B.linkWith attr (escapeURI url) title) lab
pImage :: PandocMonad m => TagParser m Inlines
pImage = do
diff --git a/src/Text/Pandoc/Readers/HTML/Parsing.hs b/src/Text/Pandoc/Readers/HTML/Parsing.hs
index bd8d7c96c..a8cdf1de2 100644
--- a/src/Text/Pandoc/Readers/HTML/Parsing.hs
+++ b/src/Text/Pandoc/Readers/HTML/Parsing.hs
@@ -30,11 +30,11 @@ module Text.Pandoc.Readers.HTML.Parsing
)
where
-import Control.Monad (guard, void, mzero)
+import Control.Monad (void, mzero, mplus)
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Text.HTML.TagSoup
- ( Attribute, Tag (..), isTagText, isTagPosition, isTagOpen, isTagClose, (~==) )
+ ( Attribute, Tag (..), isTagPosition, isTagOpen, isTagClose, (~==) )
import Text.Pandoc.Class.PandocMonad (PandocMonad (..))
import Text.Pandoc.Definition (Attr)
import Text.Pandoc.Parsing
@@ -118,9 +118,11 @@ pCloses tagtype = try $ do
_ -> mzero
pBlank :: PandocMonad m => TagParser m ()
-pBlank = try $ do
- (TagText str) <- pSatisfy isTagText
- guard $ T.all isSpace str
+pBlank = void $ pSatisfy isBlank
+ where
+ isBlank (TagText t) = T.all isSpace t
+ isBlank (TagComment _) = True
+ isBlank _ = False
pLocation :: PandocMonad m => TagParser m ()
pLocation = do
@@ -218,9 +220,10 @@ maybeFromAttrib _ _ = Nothing
mkAttr :: [(Text, Text)] -> Attr
mkAttr attr = (attribsId, attribsClasses, attribsKV)
- where attribsId = fromMaybe "" $ lookup "id" attr
+ where attribsId = fromMaybe "" $ lookup "id" attr `mplus` lookup "name" attr
attribsClasses = T.words (fromMaybe "" $ lookup "class" attr) <> epubTypes
- attribsKV = filter (\(k,_) -> k /= "class" && k /= "id") attr
+ attribsKV = filter (\(k,_) -> k /= "class" && k /= "id" && k /= "name")
+ attr
epubTypes = T.words $ fromMaybe "" $ lookup "epub:type" attr
toAttr :: [(Text, Text)] -> Attr
diff --git a/src/Text/Pandoc/Readers/HTML/Table.hs b/src/Text/Pandoc/Readers/HTML/Table.hs
index 6e62e12f5..b23a2abc8 100644
--- a/src/Text/Pandoc/Readers/HTML/Table.hs
+++ b/src/Text/Pandoc/Readers/HTML/Table.hs
@@ -16,7 +16,7 @@ HTML table parser.
module Text.Pandoc.Readers.HTML.Table (pTable) where
import Control.Applicative ((<|>))
-import Data.Maybe (fromMaybe)
+import Data.Maybe (fromMaybe, isJust)
import Data.Either (lefts, rights)
import Data.List.NonEmpty (nonEmpty)
import Data.Text (Text)
@@ -27,12 +27,13 @@ import Text.Pandoc.Definition
import Text.Pandoc.Class.PandocMonad (PandocMonad (..))
import Text.Pandoc.Parsing
( eof, lookAhead, many, many1, manyTill, option, optional
- , optionMaybe, skipMany, try)
+ , optionMaybe, skipMany, try )
import Text.Pandoc.Readers.HTML.Parsing
import Text.Pandoc.Readers.HTML.Types (TagParser)
import Text.Pandoc.Shared (onlySimpleTableCells, safeRead)
import qualified Data.Text as T
import qualified Text.Pandoc.Builder as B
+import Control.Monad (guard)
-- | Parses a @<col>@ element, returning the column's width.
-- An Either value is used: Left i means a "relative length" with
@@ -183,11 +184,13 @@ pTableBody :: PandocMonad m
-> TagParser m TableBody
pTableBody block = try $ do
skipMany pBlank
- attribs <- option [] $ getAttribs <$> pSatisfy (matchTagOpen "tbody" [])
- <* skipMany pBlank
+ mbattribs <- option Nothing $ Just . getAttribs <$>
+ pSatisfy (matchTagOpen "tbody" []) <* skipMany pBlank
bodyheads <- many (pHeaderRow block)
- (rowheads, rows) <- unzip <$> many1 (pRow block <* skipMany pBlank)
+ (rowheads, rows) <- unzip <$> many (pRow block <* skipMany pBlank)
optional $ pSatisfy (matchTagClose "tbody")
+ guard $ isJust mbattribs || not (null bodyheads && null rows)
+ let attribs = fromMaybe [] mbattribs
return $ TableBody (toAttr attribs) (foldr max 0 rowheads) bodyheads rows
where
getAttribs (TagOpen _ attribs) = attribs
diff --git a/src/Text/Pandoc/Readers/Ipynb.hs b/src/Text/Pandoc/Readers/Ipynb.hs
index cd1093109..8e742a888 100644
--- a/src/Text/Pandoc/Readers/Ipynb.hs
+++ b/src/Text/Pandoc/Readers/Ipynb.hs
@@ -19,6 +19,7 @@ import Data.Char (isDigit)
import Data.Maybe (fromMaybe)
import Data.Digest.Pure.SHA (sha1, showDigest)
import Text.Pandoc.Options
+import Control.Applicative ((<|>))
import qualified Data.Scientific as Scientific
import qualified Text.Pandoc.Builder as B
import Text.Pandoc.Logging
@@ -76,7 +77,10 @@ cellToBlocks opts lang c = do
let Source ts = cellSource c
let source = mconcat ts
let kvs = jsonMetaToPairs (cellMetadata c)
- let attachments = maybe mempty M.toList $ cellAttachments c
+ let attachments = case cellAttachments c of
+ Nothing -> mempty
+ Just (MimeAttachments m) -> M.toList m
+ let ident = fromMaybe mempty $ cellId c
mapM_ addAttachment attachments
case cellType c of
Ipynb.Markdown -> do
@@ -85,29 +89,34 @@ cellToBlocks opts lang c = do
else do
Pandoc _ bs <- walk fixImage <$> readMarkdown opts source
return bs
- return $ B.divWith ("",["cell","markdown"],kvs)
+ return $ B.divWith (ident,["cell","markdown"],kvs)
$ B.fromList bs
Ipynb.Heading lev -> do
Pandoc _ bs <- readMarkdown opts
(T.replicate lev "#" <> " " <> source)
- return $ B.divWith ("",["cell","markdown"],kvs)
+ return $ B.divWith (ident,["cell","markdown"],kvs)
$ B.fromList bs
Ipynb.Raw -> do
-- we use ipynb to indicate no format given (a wildcard in nbformat)
- let format = fromMaybe "ipynb" $ lookup "format" kvs
+ let format = fromMaybe "ipynb" $ lookup "raw_mimetype" kvs <|> lookup "format" kvs
let format' =
case format of
- "text/html" -> "html"
- "text/latex" -> "latex"
- "application/pdf" -> "latex"
- "text/markdown" -> "markdown"
- "text/x-rsrt" -> "rst"
- _ -> format
- return $ B.divWith ("",["cell","raw"],kvs) $ B.rawBlock format' source
+ "text/html" -> "html"
+ "slides" -> "html"
+ "text/latex" -> "latex"
+ "application/pdf" -> "latex"
+ "pdf" -> "latex"
+ "text/markdown" -> "markdown"
+ "text/x-rst" -> "rst"
+ "text/restructuredtext" -> "rst"
+ "text/asciidoc" -> "asciidoc"
+ _ -> format
+ return $ B.divWith (ident,["cell","raw"],kvs)
+ $ B.rawBlock format' source
Ipynb.Code{ codeOutputs = outputs, codeExecutionCount = ec } -> do
outputBlocks <- mconcat <$> mapM outputToBlock outputs
let kvs' = maybe kvs (\x -> ("execution_count", tshow x):kvs) ec
- return $ B.divWith ("",["cell","code"],kvs') $
+ return $ B.divWith (ident,["cell","code"],kvs') $
B.codeBlockWith ("",[lang],[]) source
<> outputBlocks
@@ -156,7 +165,7 @@ outputToBlock Err{ errName = ename,
-- the output format.
handleData :: PandocMonad m
=> JSONMeta -> MimeBundle -> m B.Blocks
-handleData metadata (MimeBundle mb) =
+handleData (JSONMeta metadata) (MimeBundle mb) =
mconcat <$> mapM dataBlock (M.toList mb)
where
@@ -192,6 +201,9 @@ handleData metadata (MimeBundle mb) =
dataBlock ("text/latex", TextualData t)
= return $ B.rawBlock "latex" t
+ dataBlock ("text/markdown", TextualData t)
+ = return $ B.rawBlock "markdown" t
+
dataBlock ("text/plain", TextualData t) =
return $ B.codeBlock t
@@ -201,7 +213,7 @@ handleData metadata (MimeBundle mb) =
dataBlock _ = return mempty
jsonMetaToMeta :: JSONMeta -> M.Map Text MetaValue
-jsonMetaToMeta = M.map valueToMetaValue
+jsonMetaToMeta (JSONMeta m) = M.map valueToMetaValue m
where
valueToMetaValue :: Value -> MetaValue
valueToMetaValue x@Object{} =
@@ -220,11 +232,11 @@ jsonMetaToMeta = M.map valueToMetaValue
valueToMetaValue Aeson.Null = MetaString ""
jsonMetaToPairs :: JSONMeta -> [(Text, Text)]
-jsonMetaToPairs = M.toList . M.map
+jsonMetaToPairs (JSONMeta m) = M.toList . M.map
(\case
String t
| not (T.all isDigit t)
, t /= "true"
, t /= "false"
-> t
- x -> T.pack $ UTF8.toStringLazy $ Aeson.encode x)
+ x -> T.pack $ UTF8.toStringLazy $ Aeson.encode x) $ m
diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs
index 9cdbf1611..37e0d13bc 100644
--- a/src/Text/Pandoc/Readers/JATS.hs
+++ b/src/Text/Pandoc/Readers/JATS.hs
@@ -35,6 +35,7 @@ import Text.Pandoc.XML.Light
import qualified Data.Set as S (fromList, member)
import Data.Set ((\\))
import Text.Pandoc.Sources (ToSources(..), sourcesToText)
+import qualified Data.Foldable as DF
type JATS m = StateT JATSState m
@@ -226,9 +227,19 @@ parseBlock (Elem e) =
mapM getInlines
(filterChildren (const True) t)
Nothing -> return mempty
- img <- getGraphic (Just (capt, attrValue "id" e)) g
- return $ para img
+
+ let figAttributes = DF.toList $
+ ("alt", ) . strContent <$>
+ filterChild (named "alt-text") e
+
+ return $ simpleFigureWith
+ (attrValue "id" e, [], figAttributes)
+ capt
+ (attrValue "href" g)
+ (attrValue "title" g)
+
_ -> divWith (attrValue "id" e, ["fig"], []) <$> getBlocks e
+
parseTable = do
let isCaption x = named "title" x || named "caption" x
capt <- case filterChild isCaption e of
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 27c018e73..20a2db76b 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -390,8 +390,8 @@ inlineCommands = M.unions
unescapeURL .
removeDoubleQuotes $ untokenize src)
-- hyperref
- , ("url", (\url -> link url "" (str url)) . unescapeURL . untokenize <$>
- bracedUrl)
+ , ("url", (\url -> linkWith ("",["uri"],[]) url "" (str url))
+ . unescapeURL . untokenize <$> bracedUrl)
, ("nolinkurl", code . unescapeURL . untokenize <$> bracedUrl)
, ("href", do url <- bracedUrl
sp
@@ -893,7 +893,7 @@ blockCommands = M.fromList
addMeta "bibliography" . splitBibs . untokenize))
, ("addbibresource", mempty <$ (skipopts *> braced >>=
addMeta "bibliography" . splitBibs . untokenize))
- , ("endinput", mempty <$ skipMany anyTok)
+ , ("endinput", mempty <$ skipSameFileToks)
-- includes
, ("lstinputlisting", inputListing)
, ("inputminted", inputMinted)
@@ -924,6 +924,10 @@ blockCommands = M.fromList
, ("epigraph", epigraph)
]
+skipSameFileToks :: PandocMonad m => LP m ()
+skipSameFileToks = do
+ pos <- getPosition
+ skipMany $ infile (sourceName pos)
environments :: PandocMonad m => M.Map Text (LP m Blocks)
environments = M.union (tableEnvironments blocks inline) $
@@ -970,6 +974,7 @@ environments = M.union (tableEnvironments blocks inline) $
, ("toggletrue", braced >>= setToggle True)
, ("togglefalse", braced >>= setToggle False)
, ("iftoggle", try $ ifToggle >> block)
+ , ("CSLReferences", braced >> braced >> env "CSLReferences" blocks)
]
filecontents :: PandocMonad m => LP m Blocks
@@ -1109,24 +1114,28 @@ figure = try $ do
addImageCaption :: PandocMonad m => Blocks -> LP m Blocks
addImageCaption = walkM go
- where go (Image attr@(_, cls, kvs) alt (src,tit))
+ where go p@(Para [Image attr@(_, cls, kvs) _ (src, tit)])
| not ("fig:" `T.isPrefixOf` tit) = do
st <- getState
- let (alt', tit') = case sCaption st of
- Just ils -> (toList ils, "fig:" <> tit)
- Nothing -> (alt, tit)
- attr' = case sLastLabel st of
- Just lab -> (lab, cls, kvs)
- Nothing -> attr
- case attr' of
- ("", _, _) -> return ()
- (ident, _, _) -> do
- num <- getNextNumber sLastFigureNum
- setState
- st{ sLastFigureNum = num
- , sLabels = M.insert ident
- [Str (renderDottedNum num)] (sLabels st) }
- return $ Image attr' alt' (src, tit')
+ case sCaption st of
+ Nothing -> return p
+ Just figureCaption -> do
+ let mblabel = sLastLabel st
+ let attr' = case mblabel of
+ Just lab -> (lab, cls, kvs)
+ Nothing -> attr
+ case attr' of
+ ("", _, _) -> return ()
+ (ident, _, _) -> do
+ num <- getNextNumber sLastFigureNum
+ setState
+ st{ sLastFigureNum = num
+ , sLabels = M.insert ident
+ [Str (renderDottedNum num)] (sLabels st) }
+
+ return $ SimpleFigure attr'
+ (maybe id removeLabel mblabel (B.toList figureCaption))
+ (src, tit)
go x = return x
coloredBlock :: PandocMonad m => Text -> LP m Blocks
diff --git a/src/Text/Pandoc/Readers/LaTeX/Inline.hs b/src/Text/Pandoc/Readers/LaTeX/Inline.hs
index 7b8bca4af..5938096fd 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Inline.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Inline.hs
@@ -35,7 +35,7 @@ import Text.Pandoc.Readers.LaTeX.Parsing
import Text.Pandoc.Extensions (extensionEnabled, Extension(..))
import Text.Pandoc.Parsing (getOption, updateState, getState, notFollowedBy,
manyTill, getInput, setInput, incSourceColumn,
- option, many1, try)
+ option, many1)
import Data.Char (isDigit)
import Text.Pandoc.Highlighting (fromListingsLanguage,)
import Data.Maybe (maybeToList, fromMaybe)
@@ -56,8 +56,7 @@ dolabel = do
let refstr = untokenize v
updateState $ \st ->
st{ sLastLabel = Just refstr }
- return $ spanWith (refstr,[],[("label", refstr)])
- $ inBrackets $ str $ untokenize v
+ return $ spanWith (refstr,[],[("label", refstr)]) mempty
doref :: PandocMonad m => Text -> LP m Inlines
doref cls = do
@@ -160,8 +159,8 @@ romanNumeralArg = spaces *> (parser <|> inBraces)
accentWith :: PandocMonad m
=> LP m Inlines -> Char -> Maybe Char -> LP m Inlines
-accentWith tok combiningAccent fallBack = try $ do
- ils <- tok
+accentWith tok combiningAccent fallBack = do
+ ils <- option mempty tok
case toList ils of
(Str (T.uncons -> Just (x, xs)) : ys) -> return $ fromList $
-- try to normalize to the combined character:
@@ -339,6 +338,7 @@ refCommands = M.fromList
, ("cref", rawInlineOr "cref" $ doref "ref") -- from cleveref.sty
, ("vref", rawInlineOr "vref" $ doref "ref+page") -- from varioref.sty
, ("eqref", rawInlineOr "eqref" $ doref "eqref") -- from amsmath.sty
+ , ("autoref", rawInlineOr "autoref" $ doref "autoref") -- from hyperref.sty
]
acronymCommands :: PandocMonad m => M.Map Text (LP m Inlines)
diff --git a/src/Text/Pandoc/Readers/LaTeX/Macro.hs b/src/Text/Pandoc/Readers/LaTeX/Macro.hs
index 5495a8e74..d40277eb5 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Macro.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Macro.hs
@@ -15,6 +15,8 @@ import Control.Applicative ((<|>), optional)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text as T
+import qualified Data.List.NonEmpty as NonEmpty
+import Data.List.NonEmpty (NonEmpty(..))
macroDef :: (PandocMonad m, Monoid a) => (Text -> a) -> LP m a
macroDef constructor = do
@@ -23,51 +25,91 @@ macroDef constructor = do
guardDisabled Ext_latex_macros)
<|> return mempty
where commandDef = do
- nameMacroPairs <- newcommand <|> letmacro <|> defmacro <|> newif
+ nameMacroPairs <- newcommand <|>
+ checkGlobal (letmacro <|> edefmacro <|> defmacro <|> newif)
guardDisabled Ext_latex_macros <|>
- mapM_ (\(name, macro') ->
- updateState (\s -> s{ sMacros = M.insert name macro'
- (sMacros s) })) nameMacroPairs
+ mapM_ insertMacro nameMacroPairs
environmentDef = do
mbenv <- newenvironment
case mbenv of
Nothing -> return ()
Just (name, macro1, macro2) ->
guardDisabled Ext_latex_macros <|>
- do updateState $ \s -> s{ sMacros =
- M.insert name macro1 (sMacros s) }
- updateState $ \s -> s{ sMacros =
- M.insert ("end" <> name) macro2 (sMacros s) }
+ do insertMacro (name, macro1)
+ insertMacro ("end" <> name, macro2)
-- @\newenvironment{envname}[n-args][default]{begin}{end}@
-- is equivalent to
-- @\newcommand{\envname}[n-args][default]{begin}@
-- @\newcommand{\endenvname}@
+insertMacro :: PandocMonad m => (Text, Macro) -> LP m ()
+insertMacro (name, macro'@(Macro GlobalScope _ _ _ _)) =
+ updateState $ \s ->
+ s{ sMacros = NonEmpty.map (M.insert name macro') (sMacros s) }
+insertMacro (name, macro'@(Macro GroupScope _ _ _ _)) =
+ updateState $ \s ->
+ s{ sMacros = M.insert name macro' (NonEmpty.head (sMacros s)) :|
+ NonEmpty.tail (sMacros s) }
+
+lookupMacro :: PandocMonad m => Text -> LP m Macro
+lookupMacro name = do
+ macros :| _ <- sMacros <$> getState
+ case M.lookup name macros of
+ Just m -> return m
+ Nothing -> fail "Macro not found"
+
letmacro :: PandocMonad m => LP m [(Text, Macro)]
letmacro = do
controlSeq "let"
- (name, contents) <- withVerbatimMode $ do
+ withVerbatimMode $ do
Tok _ (CtrlSeq name) _ <- anyControlSeq
optional $ symbol '='
spaces
-- we first parse in verbatim mode, and then expand macros,
-- because we don't want \let\foo\bar to turn into
-- \let\foo hello if we have previously \def\bar{hello}
+ target <- anyControlSeq <|> singleChar
+ case target of
+ (Tok _ (CtrlSeq name') _) ->
+ (do m <- lookupMacro name'
+ pure [(name, m)])
+ <|> pure [(name,
+ Macro GroupScope ExpandWhenDefined [] Nothing [target])]
+ _ -> pure [(name, Macro GroupScope ExpandWhenDefined [] Nothing [target])]
+
+checkGlobal :: PandocMonad m => LP m [(Text, Macro)] -> LP m [(Text, Macro)]
+checkGlobal p =
+ (controlSeq "global" *>
+ (map (\(n, Macro _ expand arg optarg contents) ->
+ (n, Macro GlobalScope expand arg optarg contents)) <$> p))
+ <|> p
+
+edefmacro :: PandocMonad m => LP m [(Text, Macro)]
+edefmacro = do
+ scope <- (GroupScope <$ controlSeq "edef")
+ <|> (GlobalScope <$ controlSeq "xdef")
+ (name, contents) <- withVerbatimMode $ do
+ Tok _ (CtrlSeq name) _ <- anyControlSeq
+ -- we first parse in verbatim mode, and then expand macros,
+ -- because we don't want \let\foo\bar to turn into
+ -- \let\foo hello if we have previously \def\bar{hello}
contents <- bracedOrToken
return (name, contents)
- contents' <- doMacros' 0 contents
- return [(name, Macro ExpandWhenDefined [] Nothing contents')]
+ -- expand macros
+ contents' <- parseFromToks (many anyTok) contents
+ return [(name, Macro scope ExpandWhenDefined [] Nothing contents')]
defmacro :: PandocMonad m => LP m [(Text, Macro)]
defmacro = do
-- we use withVerbatimMode, because macros are to be expanded
-- at point of use, not point of definition
- controlSeq "def"
+ scope <- (GroupScope <$ controlSeq "def")
+ <|> (GlobalScope <$ controlSeq "gdef")
withVerbatimMode $ do
Tok _ (CtrlSeq name) _ <- anyControlSeq
argspecs <- many (argspecArg <|> argspecPattern)
contents <- bracedOrToken
- return [(name, Macro ExpandWhenUsed argspecs Nothing contents)]
+ return [(name, Macro scope ExpandWhenUsed argspecs Nothing contents)]
-- \newif\iffoo' defines:
-- \iffoo to be \iffalse
@@ -82,16 +124,16 @@ newif = do
-- \def\footrue{\def\iffoo\iftrue}
-- \def\foofalse{\def\iffoo\iffalse}
let base = T.drop 2 name
- return [ (name, Macro ExpandWhenUsed [] Nothing
+ return [ (name, Macro GroupScope ExpandWhenUsed [] Nothing
[Tok pos (CtrlSeq "iffalse") "\\iffalse"])
, (base <> "true",
- Macro ExpandWhenUsed [] Nothing
+ Macro GroupScope ExpandWhenUsed [] Nothing
[ Tok pos (CtrlSeq "def") "\\def"
, Tok pos (CtrlSeq name) ("\\" <> name)
, Tok pos (CtrlSeq "iftrue") "\\iftrue"
])
, (base <> "false",
- Macro ExpandWhenUsed [] Nothing
+ Macro GroupScope ExpandWhenUsed [] Nothing
[ Tok pos (CtrlSeq "def") "\\def"
, Tok pos (CtrlSeq name) ("\\" <> name)
, Tok pos (CtrlSeq "iffalse") "\\iffalse"
@@ -138,14 +180,13 @@ newcommand = do
: (contents' ++
[ Tok pos Symbol "}", Tok pos Symbol "}" ])
_ -> contents'
- macros <- sMacros <$> getState
- case M.lookup name macros of
- Just macro
- | mtype == "newcommand" -> do
- report $ MacroAlreadyDefined txt pos
- return [(name, macro)]
- | mtype == "providecommand" -> return [(name, macro)]
- _ -> return [(name, Macro ExpandWhenUsed argspecs optarg contents)]
+ let macro = Macro GroupScope ExpandWhenUsed argspecs optarg contents
+ (do lookupMacro name
+ case mtype of
+ "providecommand" -> return []
+ "renewcommand" -> return [(name, macro)]
+ _ -> [] <$ report (MacroAlreadyDefined txt pos))
+ <|> pure [(name, macro)]
newenvironment :: PandocMonad m => LP m (Maybe (Text, Macro, Macro))
newenvironment = do
@@ -164,17 +205,23 @@ newenvironment = do
let argspecs = map (\i -> ArgNum i) [1..numargs]
startcontents <- spaces >> bracedOrToken
endcontents <- spaces >> bracedOrToken
- macros <- sMacros <$> getState
- case M.lookup name macros of
- Just _
- | mtype == "newenvironment" -> do
- report $ MacroAlreadyDefined name pos
- return Nothing
- | mtype == "provideenvironment" ->
- return Nothing
- _ -> return $ Just (name,
- Macro ExpandWhenUsed argspecs optarg startcontents,
- Macro ExpandWhenUsed [] Nothing endcontents)
+ -- we need the environment to be in a group so macros defined
+ -- inside behave correctly:
+ let bg = Tok pos (CtrlSeq "bgroup") "\\bgroup "
+ let eg = Tok pos (CtrlSeq "egroup") "\\egroup "
+ let result = (name,
+ Macro GroupScope ExpandWhenUsed argspecs optarg
+ (bg:startcontents),
+ Macro GroupScope ExpandWhenUsed [] Nothing
+ (endcontents ++ [eg]))
+ (do lookupMacro name
+ case mtype of
+ "provideenvironment" -> return Nothing
+ "renewenvironment" -> return (Just result)
+ _ -> do
+ report $ MacroAlreadyDefined name pos
+ return Nothing)
+ <|> return (Just result)
bracketedNum :: PandocMonad m => LP m Int
bracketedNum = do
diff --git a/src/Text/Pandoc/Readers/LaTeX/Math.hs b/src/Text/Pandoc/Readers/LaTeX/Math.hs
index 5b49a0376..01edce7ed 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Math.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Math.hs
@@ -142,14 +142,15 @@ newtheorem inline = do
theoremEnvironment :: PandocMonad m
=> LP m Blocks -> LP m Inlines -> Text -> LP m Blocks
theoremEnvironment blocks opt name = do
+ resetCaption
tmap <- sTheoremMap <$> getState
case M.lookup name tmap of
Nothing -> mzero
Just tspec -> do
optTitle <- option mempty $ (\x -> space <> "(" <> x <> ")") <$> opt
- mblabel <- option Nothing $ Just . untokenize <$>
- try (spaces >> controlSeq "label" >> spaces >> braced)
bs <- env name blocks
+ mblabel <- sLastLabel <$> getState
+
number <-
if theoremNumber tspec
then do
@@ -169,9 +170,7 @@ theoremEnvironment blocks opt name = do
Just ident ->
updateState $ \s ->
s{ sLabels = M.insert ident
- (B.toList $
- theoremName tspec <> "\160" <>
- str (renderDottedNum num)) (sLabels s) }
+ (B.toList $ str (renderDottedNum num)) (sLabels s) }
Nothing -> return ()
return $ space <> B.text (renderDottedNum num)
else return mempty
@@ -181,13 +180,14 @@ theoremEnvironment blocks opt name = do
RemarkStyle -> B.emph
let title = titleEmph (theoremName tspec <> number)
<> optTitle <> "." <> space
- return $ divWith (fromMaybe "" mblabel, [name], []) $ addTitle title
+ return $ divWith (fromMaybe "" mblabel, [name], [])
+ $ addTitle title
+ $ maybe id removeLabel mblabel
$ case theoremStyle tspec of
PlainStyle -> walk italicize bs
_ -> bs
-
proof :: PandocMonad m => LP m Blocks -> LP m Inlines -> LP m Blocks
proof blocks opt = do
title <- option (B.text "Proof") opt
diff --git a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
index 9dac4d6ef..9eb4a0cbc 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Parsing.hs
@@ -45,6 +45,7 @@ module Text.Pandoc.Readers.LaTeX.Parsing
, isNewlineTok
, isWordTok
, isArgTok
+ , infile
, spaces
, spaces1
, tokTypeIn
@@ -89,6 +90,7 @@ module Text.Pandoc.Readers.LaTeX.Parsing
, resetCaption
, env
, addMeta
+ , removeLabel
) where
import Control.Applicative (many, (<|>))
@@ -102,6 +104,9 @@ import qualified Data.IntMap as IntMap
import qualified Data.Map as M
import qualified Data.Set as Set
import Data.Text (Text)
+import Data.Maybe (fromMaybe)
+import Data.List.NonEmpty (NonEmpty(..))
+import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Text as T
import Text.Pandoc.Builder
import Text.Pandoc.Class.PandocMonad (PandocMonad, report)
@@ -115,6 +120,7 @@ import Text.Pandoc.Readers.LaTeX.Types (ExpansionPoint (..), Macro (..),
ArgSpec (..), Tok (..), TokType (..))
import Text.Pandoc.Shared
import Text.Parsec.Pos
+import Text.Pandoc.Walk
newtype DottedNum = DottedNum [Int]
deriving (Show, Eq)
@@ -146,7 +152,7 @@ data TheoremSpec =
data LaTeXState = LaTeXState{ sOptions :: ReaderOptions
, sMeta :: Meta
, sQuoteContext :: QuoteContext
- , sMacros :: M.Map Text Macro
+ , sMacros :: NonEmpty (M.Map Text Macro)
, sContainers :: [Text]
, sLogMessages :: [LogMessage]
, sIdentifiers :: Set.Set Text
@@ -173,7 +179,7 @@ defaultLaTeXState :: LaTeXState
defaultLaTeXState = LaTeXState{ sOptions = def
, sMeta = nullMeta
, sQuoteContext = NoQuote
- , sMacros = M.empty
+ , sMacros = M.empty :| []
, sContainers = []
, sLogMessages = []
, sIdentifiers = Set.empty
@@ -220,8 +226,9 @@ instance HasIncludeFiles LaTeXState where
dropLatestIncludeFile s = s { sContainers = drop 1 $ sContainers s }
instance HasMacros LaTeXState where
- extractMacros st = sMacros st
- updateMacros f st = st{ sMacros = f (sMacros st) }
+ extractMacros st = NonEmpty.head $ sMacros st
+ updateMacros f st = st{ sMacros = f (NonEmpty.head (sMacros st))
+ :| NonEmpty.tail (sMacros st) }
instance HasReaderOptions LaTeXState where
extractReaderOptions = sOptions
@@ -254,7 +261,7 @@ rawLaTeXParser :: (PandocMonad m, HasMacros s, HasReaderOptions s, Show a)
rawLaTeXParser toks retokenize parser valParser = do
pstate <- getState
let lstate = def{ sOptions = extractReaderOptions pstate }
- let lstate' = lstate { sMacros = extractMacros pstate }
+ let lstate' = lstate { sMacros = extractMacros pstate :| [] }
let setStartPos = case toks of
Tok pos _ _ : _ -> setPosition pos
_ -> return ()
@@ -267,14 +274,14 @@ rawLaTeXParser toks retokenize parser valParser = do
Right (endpos, toks') -> do
res <- lift $ runParserT (do when retokenize $ do
-- retokenize, applying macros
- ts <- many (satisfyTok (const True))
+ ts <- many anyTok
setInput ts
rawparser)
lstate' "chunk" toks'
case res of
Left _ -> mzero
Right ((val, raw), st) -> do
- updateState (updateMacros (sMacros st <>))
+ updateState (updateMacros ((NonEmpty.head (sMacros st)) <>))
let skipTilPos stopPos = do
anyChar
pos <- getPosition
@@ -296,10 +303,10 @@ rawLaTeXParser toks retokenize parser valParser = do
applyMacros :: (PandocMonad m, HasMacros s, HasReaderOptions s)
=> Text -> ParserT Sources s m Text
applyMacros s = (guardDisabled Ext_latex_macros >> return s) <|>
- do let retokenize = untokenize <$> many (satisfyTok (const True))
+ do let retokenize = untokenize <$> many anyTok
pstate <- getState
let lstate = def{ sOptions = extractReaderOptions pstate
- , sMacros = extractMacros pstate }
+ , sMacros = extractMacros pstate :| [] }
res <- runParserT retokenize lstate "math" (tokenize "math" s)
case res of
Left e -> Prelude.fail (show e)
@@ -552,10 +559,10 @@ doMacros' n inp =
handleMacros n' spos name ts = do
when (n' > 20) -- detect macro expansion loops
$ throwError $ PandocMacroLoop name
- macros <- sMacros <$> getState
+ (macros :| _ ) <- sMacros <$> getState
case M.lookup name macros of
Nothing -> trySpecialMacro name ts
- Just (Macro expansionPoint argspecs optarg newtoks) -> do
+ Just (Macro _scope expansionPoint argspecs optarg newtoks) -> do
let getargs' = do
args <-
(case expansionPoint of
@@ -642,6 +649,9 @@ isArgTok :: Tok -> Bool
isArgTok (Tok _ (Arg _) _) = True
isArgTok _ = False
+infile :: PandocMonad m => SourceName -> LP m Tok
+infile reference = satisfyTok (\(Tok source _ _) -> (sourceName source) == reference)
+
spaces :: PandocMonad m => LP m ()
spaces = skipMany (satisfyTok (tokTypeIn [Comment, Spaces, Newline]))
@@ -745,10 +755,22 @@ primEscape = do
bgroup :: PandocMonad m => LP m Tok
bgroup = try $ do
optional sp
- symbol '{' <|> controlSeq "bgroup" <|> controlSeq "begingroup"
+ t <- symbol '{' <|> controlSeq "bgroup" <|> controlSeq "begingroup"
+ -- Add a copy of the macro table to the top of the macro stack,
+ -- private for this group. We inherit all the macros defined in
+ -- the parent group.
+ updateState $ \s -> s{ sMacros = NonEmpty.cons (NonEmpty.head (sMacros s))
+ (sMacros s) }
+ return t
+
egroup :: PandocMonad m => LP m Tok
-egroup = symbol '}' <|> controlSeq "egroup" <|> controlSeq "endgroup"
+egroup = do
+ t <- symbol '}' <|> controlSeq "egroup" <|> controlSeq "endgroup"
+ -- remove the group's macro table from the stack
+ updateState $ \s -> s{ sMacros = fromMaybe (sMacros s) $
+ NonEmpty.nonEmpty (NonEmpty.tail (sMacros s)) }
+ return t
grouped :: (PandocMonad m, Monoid a) => LP m a -> LP m a
grouped parser = try $ do
@@ -921,6 +943,9 @@ getRawCommand name txt = do
void $ count 4 braced
"def" ->
void $ manyTill anyTok braced
+ "vadjust" ->
+ void (manyTill anyTok braced) <|>
+ void (satisfyTok isPreTok) -- see #7531
_ | isFontSizeCommand name -> return ()
| otherwise -> do
skipopts
@@ -928,6 +953,10 @@ getRawCommand name txt = do
void $ many braced
return $ txt <> untokenize rawargs
+isPreTok :: Tok -> Bool
+isPreTok (Tok _ Word "pre") = True
+isPreTok _ = False
+
isDigitTok :: Tok -> Bool
isDigitTok (Tok _ Word t) = T.all isDigit t
isDigitTok _ = False
@@ -1017,7 +1046,16 @@ resetCaption = updateState $ \st -> st{ sCaption = Nothing
, sLastLabel = Nothing }
env :: PandocMonad m => Text -> LP m a -> LP m a
-env name p = p <* end_ name
+env name p = do
+ -- environments are groups as far as macros are concerned,
+ -- so we need a local copy of the macro table (see above, bgroup, egroup):
+ updateState $ \s -> s{ sMacros = NonEmpty.cons (NonEmpty.head (sMacros s))
+ (sMacros s) }
+ result <- p
+ updateState $ \s -> s{ sMacros = fromMaybe (sMacros s) $
+ NonEmpty.nonEmpty (NonEmpty.tail (sMacros s)) }
+ end_ name
+ return result
tokWith :: PandocMonad m => LP m Inlines -> LP m Inlines
tokWith inlineParser = try $ spaces >>
@@ -1031,3 +1069,16 @@ tokWith inlineParser = try $ spaces >>
addMeta :: PandocMonad m => ToMetaValue a => Text -> a -> LP m ()
addMeta field val = updateState $ \st ->
st{ sMeta = addMetaField field val $ sMeta st }
+
+-- remove label spans to avoid duplicated identifier
+removeLabel :: Walkable [Inline] a => Text -> a -> a
+removeLabel lbl = walk go
+ where
+ go (Span (_,_,kvs) _ : rest)
+ | Just lbl' <- lookup "label" kvs
+ , lbl' == lbl = go (dropWhile isSpaceOrSoftBreak rest)
+ go (x:xs) = x : go xs
+ go [] = []
+ isSpaceOrSoftBreak Space = True
+ isSpaceOrSoftBreak SoftBreak = True
+ isSpaceOrSoftBreak _ = False
diff --git a/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs b/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs
index b8bf0ce7f..e4738a763 100644
--- a/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/SIunitx.hs
@@ -23,11 +23,15 @@ siunitxCommands :: PandocMonad m
=> LP m Inlines -> M.Map Text (LP m Inlines)
siunitxCommands tok = M.fromList
[ ("si", dosi tok)
+ , ("unit", dosi tok) -- v3 version of si
, ("SI", doSI tok)
+ , ("qty", doSI tok) -- v3 version of SI
, ("SIrange", doSIrange True tok)
+ , ("qtyrange", doSIrange True tok) -- v3 version of SIrange
+ , ("SIlist", doSIlist tok)
+ , ("qtylist", doSIlist tok) -- v3 version of SIlist
, ("numrange", doSIrange False tok)
, ("numlist", doSInumlist)
- , ("SIlist", doSIlist tok)
, ("num", doSInum)
, ("ang", doSIang)
]
diff --git a/src/Text/Pandoc/Readers/LaTeX/Table.hs b/src/Text/Pandoc/Readers/LaTeX/Table.hs
index f56728fe1..7d5c4f265 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Table.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Table.hs
@@ -368,7 +368,9 @@ addTableCaption = walkM go
((_,classes,kvs), Just ident) ->
(ident,classes,kvs)
_ -> attr
- return $ addAttrDiv attr' $ Table nullAttr capt spec th tb tf
+ return $ addAttrDiv attr'
+ $ maybe id removeLabel mblabel
+ $ Table nullAttr capt spec th tb tf
go x = return x
-- TODO: For now we add a Div to contain table attributes, since
diff --git a/src/Text/Pandoc/Readers/LaTeX/Types.hs b/src/Text/Pandoc/Readers/LaTeX/Types.hs
index c20b72bc5..a4eae56db 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Types.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Types.hs
@@ -15,6 +15,7 @@ module Text.Pandoc.Readers.LaTeX.Types ( Tok(..)
, Macro(..)
, ArgSpec(..)
, ExpansionPoint(..)
+ , MacroScope(..)
, SourcePos
)
where
@@ -43,7 +44,10 @@ tokToText (Tok _ _ t) = t
data ExpansionPoint = ExpandWhenDefined | ExpandWhenUsed
deriving (Eq, Ord, Show)
-data Macro = Macro ExpansionPoint [ArgSpec] (Maybe [Tok]) [Tok]
+data MacroScope = GlobalScope | GroupScope
+ deriving (Eq, Ord, Show)
+
+data Macro = Macro MacroScope ExpansionPoint [ArgSpec] (Maybe [Tok]) [Tok]
deriving Show
data ArgSpec = ArgNum Int | Pattern [Tok]
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 2dc7ddf52..b5017a433 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1,4 +1,5 @@
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ViewPatterns #-}
@@ -21,14 +22,14 @@ module Text.Pandoc.Readers.Markdown (
import Control.Monad
import Control.Monad.Except (throwError)
import Data.Char (isAlphaNum, isPunctuation, isSpace)
+import Text.DocLayout (realLength)
import Data.List (transpose, elemIndex, sortOn, foldl')
-import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as T
-import qualified Data.ByteString.Lazy as BL
+import qualified Data.ByteString as BS
import System.FilePath (addExtension, takeExtension, takeDirectory)
import qualified System.FilePath.Windows as Windows
import qualified System.FilePath.Posix as Posix
@@ -39,6 +40,7 @@ import Text.Pandoc.Class.PandocMonad (PandocMonad (..), report)
import Text.Pandoc.Definition as Pandoc
import Text.Pandoc.Emoji (emojiToInline)
import Text.Pandoc.Error
+import Safe.Foldable (maximumBounded)
import Text.Pandoc.Logging
import Text.Pandoc.Options
import Text.Pandoc.Walk (walk)
@@ -72,14 +74,12 @@ readMarkdown opts s = do
yamlToMeta :: PandocMonad m
=> ReaderOptions
-> Maybe FilePath
- -> BL.ByteString
+ -> BS.ByteString
-> m Meta
yamlToMeta opts mbfp bstr = do
let parser = do
oldPos <- getPosition
- case mbfp of
- Nothing -> return ()
- Just fp -> setPosition $ initialPos fp
+ setPosition $ initialPos (fromMaybe "" mbfp)
meta <- yamlBsToMeta (fmap B.toMetaValue <$> parseBlocks) bstr
setPosition oldPos
return $ runF meta defaultParserState
@@ -95,7 +95,7 @@ yamlToRefs :: PandocMonad m
=> (Text -> Bool)
-> ReaderOptions
-> Maybe FilePath
- -> BL.ByteString
+ -> BS.ByteString
-> m [MetaValue]
yamlToRefs idpred opts mbfp bstr = do
let parser = do
@@ -198,6 +198,7 @@ inlinesInBalancedBrackets =
go openBrackets =
(() <$ (escapedChar <|>
code <|>
+ math <|>
rawHtmlInline <|>
rawLaTeXInline') >> go openBrackets)
<|>
@@ -326,6 +327,7 @@ referenceKey :: PandocMonad m => MarkdownParser m (F Blocks)
referenceKey = try $ do
pos <- getPosition
skipNonindentSpaces
+ notFollowedBy (void cite)
(_,raw) <- reference
char ':'
skipSpaces >> optional newline >> skipSpaces >> notFollowedBy (char '[')
@@ -829,7 +831,7 @@ listLineCommon :: PandocMonad m => MarkdownParser m Text
listLineCommon = T.concat <$> manyTill
( many1Char (satisfy $ \c -> c `notElem` ['\n', '<', '`'])
<|> fmap snd (withRaw code)
- <|> fmap snd (htmlTag isCommentTag)
+ <|> fmap (renderTags . (:[]) . fst) (htmlTag isCommentTag)
<|> countChar 1 anyChar
) newline
@@ -1013,19 +1015,18 @@ normalDefinitionList = do
para :: PandocMonad m => MarkdownParser m (F Blocks)
para = try $ do
exts <- getOption readerExtensions
- let implicitFigures x
- | extensionEnabled Ext_implicit_figures exts = do
- x' <- x
- case B.toList x' of
- [Image attr alt (src,tit)]
- | not (null alt) ->
- -- the fig: at beginning of title indicates a figure
- return $ B.singleton
- $ Image attr alt (src, "fig:" <> tit)
- _ -> return x'
- | otherwise = x
- result <- implicitFigures . trimInlinesF <$> inlines1
- option (B.plain <$> result)
+
+ result <- trimInlinesF <$> inlines1
+ let figureOr constr inlns =
+ case B.toList inlns of
+ [Image attr figCaption (src, tit)]
+ | extensionEnabled Ext_implicit_figures exts
+ , not (null figCaption) -> do
+ B.simpleFigureWith attr (B.fromList figCaption) src tit
+
+ _ -> constr inlns
+
+ option (figureOr B.plain <$> result)
$ try $ do
newline
(mempty <$ blanklines)
@@ -1047,7 +1048,7 @@ para = try $ do
if divLevel > 0
then lookAhead divFenceEnd
else mzero
- return $ B.para <$> result
+ return $ figureOr B.para <$> result
plain :: PandocMonad m => MarkdownParser m (F Blocks)
plain = fmap B.plain . trimInlinesF <$> inlines1
@@ -1124,7 +1125,12 @@ rawHtmlBlocks = do
let selfClosing = "/>" `T.isSuffixOf` raw
-- we don't want '<td> text' to be a code block:
skipMany spaceChar
- indentlevel <- (blankline >> length <$> many (char ' ')) <|> return 0
+ tabStop <- getOption readerTabStop
+ indentlevel <- option 0 $
+ do blankline
+ sum <$> many ( (1 <$ char ' ')
+ <|>
+ (tabStop <$ char '\t') )
-- try to find closing tag
-- we set stateInHtmlBlock so that closing tags that can be either block or
-- inline will not be parsed as inline tags
@@ -1355,26 +1361,30 @@ pipeTable = try $ do
nonindentSpaces
lookAhead nonspaceChar
(heads,(aligns, seplengths)) <- (,) <$> pipeTableRow <*> pipeBreak
- let heads' = take (length aligns) <$> heads
+ let cellContents = parseFromString' pipeTableCell . trim
+ let numcols = length aligns
+ let heads' = take numcols heads
lines' <- many pipeTableRow
- let lines'' = map (take (length aligns) <$>) lines'
- let maxlength = maximum $
- fmap (\x -> T.length . stringify $ runF x def) (heads' :| lines'')
- numColumns <- getOption readerColumns
- let widths = if maxlength > numColumns
+ let lines'' = map (take numcols) lines'
+ let lineWidths = map (sum . map realLength) (heads' : lines'')
+ columns <- getOption readerColumns
+ -- add numcols + 1 for the pipes themselves
+ let widths = if maximumBounded (sum seplengths : lineWidths) + (numcols + 1) > columns
then map (\len ->
fromIntegral len / fromIntegral (sum seplengths))
seplengths
else replicate (length aligns) 0.0
- return (aligns, widths, toHeaderRow <$> heads', map toRow <$> sequence lines'')
+ (headCells :: F [Blocks]) <- sequence <$> mapM cellContents heads'
+ (rows :: F [[Blocks]]) <- sequence <$> mapM (fmap sequence . mapM cellContents) lines''
+ return (aligns, widths, toHeaderRow <$> headCells, map toRow <$> rows)
sepPipe :: PandocMonad m => MarkdownParser m ()
sepPipe = try $ do
char '|' <|> char '+'
notFollowedBy blankline
--- parse a row, also returning probable alignments for org-table cells
-pipeTableRow :: PandocMonad m => MarkdownParser m (F [Blocks])
+-- parse a row, returning raw cell contents
+pipeTableRow :: PandocMonad m => MarkdownParser m [Text]
pipeTableRow = try $ do
scanForPipe
skipMany spaceChar
@@ -1382,13 +1392,11 @@ pipeTableRow = try $ do
-- split into cells
let chunk = void (code <|> math <|> rawHtmlInline <|> escapedChar <|> rawLaTeXInline')
<|> void (noneOf "|\n\r")
- let cellContents = withRaw (many chunk) >>=
- parseFromString' pipeTableCell . trim . snd
- cells <- cellContents `sepEndBy1` char '|'
+ cells <- (snd <$> withRaw (many chunk)) `sepEndBy1` char '|'
-- surrounding pipes needed for a one-column table:
guard $ not (length cells == 1 && not openPipe)
blankline
- return $ sequence cells
+ return cells
pipeTableCell :: PandocMonad m => MarkdownParser m (F Blocks)
pipeTableCell =
@@ -1692,21 +1700,29 @@ strikeout = fmap B.strikeout <$>
superscript :: PandocMonad m => MarkdownParser m (F Inlines)
superscript = do
- guardEnabled Ext_superscript
fmap B.superscript <$> try (do
char '^'
- mconcat <$> many1Till (do notFollowedBy spaceChar
- notFollowedBy newline
- inline) (char '^'))
+ mconcat <$> (try regularSuperscript <|> try mmdShortSuperscript))
+ where regularSuperscript = many1Till (do guardEnabled Ext_superscript
+ notFollowedBy spaceChar
+ notFollowedBy newline
+ inline) (char '^')
+ mmdShortSuperscript = do guardEnabled Ext_short_subsuperscripts
+ result <- T.pack <$> many1 alphaNum
+ return $ return $ return $ B.str result
subscript :: PandocMonad m => MarkdownParser m (F Inlines)
subscript = do
- guardEnabled Ext_subscript
fmap B.subscript <$> try (do
char '~'
- mconcat <$> many1Till (do notFollowedBy spaceChar
- notFollowedBy newline
- inline) (char '~'))
+ mconcat <$> (try regularSubscript <|> mmdShortSubscript))
+ where regularSubscript = many1Till (do guardEnabled Ext_subscript
+ notFollowedBy spaceChar
+ notFollowedBy newline
+ inline) (char '~')
+ mmdShortSubscript = do guardEnabled Ext_short_subsuperscripts
+ result <- T.pack <$> many1 alphaNum
+ return $ return $ return $ B.str result
whitespace :: PandocMonad m => MarkdownParser m (F Inlines)
whitespace = spaceChar >> return <$> (lb <|> regsp) <?> "whitespace"
@@ -1768,7 +1784,6 @@ endline = try $ do
reference :: PandocMonad m => MarkdownParser m (F Inlines, Text)
reference = do
guardDisabled Ext_footnotes <|> notFollowedBy' (string "[^")
- guardDisabled Ext_citations <|> notFollowedBy' (string "[@")
withRaw $ trimInlinesF <$> inlinesInBalancedBrackets
parenthesizedChars :: PandocMonad m => MarkdownParser m Text
@@ -2187,6 +2202,7 @@ normalCite = try $ do
citations <- citeList
spnl
char ']'
+ notFollowedBy (oneOf "{([") -- not a link or a bracketed span
return citations
suffix :: PandocMonad m => MarkdownParser m (F Inlines)
@@ -2200,7 +2216,7 @@ suffix = try $ do
prefix :: PandocMonad m => MarkdownParser m (F Inlines)
prefix = trimInlinesF . mconcat <$>
- manyTill inline (char ']'
+ manyTill (notFollowedBy (char ';') >> inline) (char ']'
<|> lookAhead
(try $ do optional (try (char ';' >> spnl))
citeKey True
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index 825e4a2eb..9348a8053 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -201,7 +201,12 @@ para = do
contents <- trimInlines . mconcat <$> many1 inline
if F.all (==Space) contents
then return mempty
- else return $ B.para contents
+ else case B.toList contents of
+ -- For the MediaWiki format all images are considered figures
+ [Image attr figureCaption (src, title)] ->
+ return $ B.simpleFigureWith
+ attr (B.fromList figureCaption) src title
+ _ -> return $ B.para contents
table :: PandocMonad m => MWParser m Blocks
table = do
@@ -631,7 +636,7 @@ image = try $ do
let attr = ("", [], kvs)
caption <- (B.str fname <$ sym "]]")
<|> try (char '|' *> (mconcat <$> manyTill inline (sym "]]")))
- return $ B.imageWith attr fname ("fig:" <> stringify caption) caption
+ return $ B.imageWith attr fname (stringify caption) caption
imageOption :: PandocMonad m => MWParser m Text
imageOption = try $ char '|' *> opt
diff --git a/src/Text/Pandoc/Readers/Metadata.hs b/src/Text/Pandoc/Readers/Metadata.hs
index cbc523b25..7991dca5c 100644
--- a/src/Text/Pandoc/Readers/Metadata.hs
+++ b/src/Text/Pandoc/Readers/Metadata.hs
@@ -17,102 +17,62 @@ module Text.Pandoc.Readers.Metadata (
yamlMetaBlock,
yamlMap ) where
-import Control.Monad
+
import Control.Monad.Except (throwError)
-import qualified Data.ByteString.Lazy as BL
+import qualified Data.ByteString as B
import qualified Data.Map as M
-import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
-import qualified Data.YAML as YAML
-import qualified Data.YAML.Event as YE
+import qualified Data.Yaml as Yaml
+import Data.Aeson (Value(..), Object, Result(..), fromJSON, (.:?), withObject)
+import Data.Aeson.Types (parse)
+import Text.Pandoc.Shared (tshow)
import Text.Pandoc.Class.PandocMonad (PandocMonad (..))
-import Text.Pandoc.Definition
+import Text.Pandoc.Definition hiding (Null)
import Text.Pandoc.Error
-import Text.Pandoc.Parsing hiding (tableWith)
-import Text.Pandoc.Shared
-import qualified Data.Text.Lazy as TL
+import Text.Pandoc.Parsing hiding (tableWith, parse)
+
+
import qualified Text.Pandoc.UTF8 as UTF8
yamlBsToMeta :: (PandocMonad m, HasLastStrPosition st)
=> ParserT Sources st m (Future st MetaValue)
- -> BL.ByteString
+ -> B.ByteString
-> ParserT Sources st m (Future st Meta)
yamlBsToMeta pMetaValue bstr = do
- case YAML.decodeNode' YAML.failsafeSchemaResolver False False bstr of
- Right (YAML.Doc (YAML.Mapping _ _ o):_)
- -> fmap Meta <$> yamlMap pMetaValue o
+ case Yaml.decodeAllEither' bstr of
+ Right (Object o:_) -> fmap Meta <$> yamlMap pMetaValue o
Right [] -> return . return $ mempty
- Right [YAML.Doc (YAML.Scalar _ YAML.SNull)]
- -> return . return $ mempty
- -- the following is what we get from a comment:
- Right [YAML.Doc (YAML.Scalar _ (YAML.SUnknown _ ""))]
- -> return . return $ mempty
+ Right [Null] -> return . return $ mempty
Right _ -> Prelude.fail "expected YAML object"
- Left (yamlpos, err')
- -> do pos <- getPosition
- setPosition $ incSourceLine
- (setSourceColumn pos (YE.posColumn yamlpos))
- (YE.posLine yamlpos - 1)
- Prelude.fail err'
-
-fakePos :: YAML.Pos
-fakePos = YAML.Pos (-1) (-1) 1 0
-
-lookupYAML :: Text
- -> YAML.Node YE.Pos
- -> Maybe (YAML.Node YE.Pos)
-lookupYAML t (YAML.Mapping _ _ m) =
- M.lookup (YAML.Scalar fakePos (YAML.SUnknown YE.untagged t)) m
- `mplus`
- M.lookup (YAML.Scalar fakePos (YAML.SStr t)) m
-lookupYAML _ _ = Nothing
+ Left err' -> do
+ throwError $ PandocParseError
+ $ T.pack $ Yaml.prettyPrintParseException err'
-- Returns filtered list of references.
yamlBsToRefs :: (PandocMonad m, HasLastStrPosition st)
=> ParserT Sources st m (Future st MetaValue)
-> (Text -> Bool) -- ^ Filter for id
- -> BL.ByteString
+ -> B.ByteString
-> ParserT Sources st m (Future st [MetaValue])
yamlBsToRefs pMetaValue idpred bstr =
- case YAML.decodeNode' YAML.failsafeSchemaResolver False False bstr of
- Right (YAML.Doc o@YAML.Mapping{}:_)
- -> case lookupYAML "references" o of
- Just (YAML.Sequence _ _ ns) -> do
- let g n = case lookupYAML "id" n of
- Just n' ->
- case nodeToKey n' of
- Nothing -> False
- Just t -> idpred t ||
- case lookupYAML "other-ids" n of
- Just (YAML.Sequence _ _ ns') ->
- let ts' = mapMaybe nodeToKey ns'
- in any idpred ts'
- _ -> False
- Nothing -> False
- sequence <$>
- mapM (yamlToMetaValue pMetaValue) (filter g ns)
- Just _ ->
- Prelude.fail "expecting sequence in 'references' field"
- Nothing ->
- Prelude.fail "expecting 'references' field"
-
- Right [] -> return . return $ mempty
- Right [YAML.Doc (YAML.Scalar _ YAML.SNull)]
- -> return . return $ mempty
- Right _ -> Prelude.fail "expecting YAML object"
- Left (yamlpos, err')
- -> do pos <- getPosition
- setPosition $ incSourceLine
- (setSourceColumn pos (YE.posColumn yamlpos))
- (YE.posLine yamlpos - 1)
- Prelude.fail err'
-
-
-nodeToKey :: YAML.Node YE.Pos -> Maybe Text
-nodeToKey (YAML.Scalar _ (YAML.SStr t)) = Just t
-nodeToKey (YAML.Scalar _ (YAML.SUnknown _ t)) = Just t
-nodeToKey _ = Nothing
+ case Yaml.decodeAllEither' bstr of
+ Right (Object m : _) -> do
+ let isSelected (String t) = idpred t
+ isSelected _ = False
+ let hasSelectedId (Object o) =
+ case parse (withObject "ref" (.:? "id")) (Object o) of
+ Success (Just id') -> isSelected id'
+ _ -> False
+ hasSelectedId _ = False
+ case parse (withObject "metadata" (.:? "references")) (Object m) of
+ Success (Just refs) -> sequence <$>
+ mapM (yamlToMetaValue pMetaValue) (filter hasSelectedId refs)
+ _ -> return $ return []
+ Right _ -> return . return $ []
+ Left err' -> do
+ throwError $ PandocParseError
+ $ T.pack $ Yaml.prettyPrintParseException err'
normalizeMetaValue :: (PandocMonad m, HasLastStrPosition st)
=> ParserT Sources st m (Future st MetaValue)
@@ -133,47 +93,36 @@ normalizeMetaValue pMetaValue x =
isSpaceChar '\t' = True
isSpaceChar _ = False
-checkBoolean :: Text -> Maybe Bool
-checkBoolean t
- | t == T.pack "true" || t == T.pack "True" || t == T.pack "TRUE" = Just True
- | t == T.pack "false" || t == T.pack "False" || t == T.pack "FALSE" = Just False
- | otherwise = Nothing
-
yamlToMetaValue :: (PandocMonad m, HasLastStrPosition st)
=> ParserT Sources st m (Future st MetaValue)
- -> YAML.Node YE.Pos
+ -> Value
-> ParserT Sources st m (Future st MetaValue)
-yamlToMetaValue pMetaValue (YAML.Scalar _ x) =
- case x of
- YAML.SStr t -> normalizeMetaValue pMetaValue t
- YAML.SBool b -> return $ return $ MetaBool b
- YAML.SFloat d -> return $ return $ MetaString $ tshow d
- YAML.SInt i -> return $ return $ MetaString $ tshow i
- YAML.SUnknown _ t ->
- case checkBoolean t of
- Just b -> return $ return $ MetaBool b
- Nothing -> normalizeMetaValue pMetaValue t
- YAML.SNull -> return $ return $ MetaString ""
-
-yamlToMetaValue pMetaValue (YAML.Sequence _ _ xs) =
- fmap MetaList . sequence
- <$> mapM (yamlToMetaValue pMetaValue) xs
-yamlToMetaValue pMetaValue (YAML.Mapping _ _ o) =
- fmap MetaMap <$> yamlMap pMetaValue o
-yamlToMetaValue _ _ = return $ return $ MetaString ""
+yamlToMetaValue pMetaValue v =
+ case v of
+ String t -> normalizeMetaValue pMetaValue t
+ Bool b -> return $ return $ MetaBool b
+ Number d -> normalizeMetaValue pMetaValue $
+ case fromJSON v of
+ Success (x :: Int) -> tshow x
+ _ -> tshow d
+ Null -> return $ return $ MetaString ""
+ Array{} -> do
+ case fromJSON v of
+ Error err' -> throwError $ PandocParseError $ T.pack err'
+ Success xs -> fmap MetaList . sequence <$>
+ mapM (yamlToMetaValue pMetaValue) xs
+ Object o -> fmap MetaMap <$> yamlMap pMetaValue o
yamlMap :: (PandocMonad m, HasLastStrPosition st)
=> ParserT Sources st m (Future st MetaValue)
- -> M.Map (YAML.Node YE.Pos) (YAML.Node YE.Pos)
+ -> Object
-> ParserT Sources st m (Future st (M.Map Text MetaValue))
yamlMap pMetaValue o = do
- kvs <- forM (M.toList o) $ \(key, v) -> do
- k <- maybe (throwError $ PandocParseError
- "Non-string key in YAML mapping")
- return $ nodeToKey key
- return (k, v)
- let kvs' = filter (not . ignorable . fst) kvs
- fmap M.fromList . sequence <$> mapM toMeta kvs'
+ case fromJSON (Object o) of
+ Error err' -> throwError $ PandocParseError $ T.pack err'
+ Success (m' :: M.Map Text Value) -> do
+ let kvs = filter (not . ignorable . fst) $ M.toList m'
+ fmap M.fromList . sequence <$> mapM toMeta kvs
where
ignorable t = "_" `T.isSuffixOf` t
toMeta (k, v) = do
@@ -194,7 +143,7 @@ yamlMetaBlock parser = try $ do
-- by including --- and ..., we allow yaml blocks with just comments:
let rawYaml = T.unlines ("---" : (rawYamlLines ++ ["..."]))
optional blanklines
- yamlBsToMeta parser $ UTF8.fromTextLazy $ TL.fromStrict rawYaml
+ yamlBsToMeta parser $ UTF8.fromText rawYaml
stopLine :: Monad m => ParserT Sources st m ()
stopLine = try $ (string "---" <|> string "...") >> blankline >> return ()
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index f18d2f9a7..9a689b0e8 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -474,15 +474,16 @@ figure = try $ do
figCaption = fromMaybe mempty $ blockAttrCaption figAttrs
figKeyVals = blockAttrKeyValues figAttrs
attr = (figLabel, mempty, figKeyVals)
- figTitle = (if isFigure then withFigPrefix else id) figName
- in
- B.para . B.imageWith attr imgSrc figTitle <$> figCaption
-
- withFigPrefix :: Text -> Text
- withFigPrefix cs =
- if "fig:" `T.isPrefixOf` cs
- then cs
- else "fig:" <> cs
+ in if isFigure
+ then (\c ->
+ B.simpleFigureWith
+ attr c imgSrc (unstackFig figName)) <$> figCaption
+ else B.para . B.imageWith attr imgSrc figName <$> figCaption
+ unstackFig :: Text -> Text
+ unstackFig figName =
+ if "fig:" `T.isPrefixOf` figName
+ then T.drop 4 figName
+ else figName
-- | Succeeds if looking at the end of the current paragraph
endOfParagraph :: Monad m => OrgParser m ()
@@ -889,7 +890,10 @@ listItem parseIndentedMarker = try . withContext ListItemState $ do
firstLine <- anyLineNewline
blank <- option "" ("\n" <$ blankline)
rest <- T.concat <$> many (listContinuation markerLength)
- contents <- parseFromString blocks $ firstLine <> blank <> rest
+ contents <- parseFromString (do initial <- paraOrPlain <|> pure mempty
+ subsequent <- blocks
+ return $ initial <> subsequent)
+ (firstLine <> blank <> rest)
return (maybe id (prependInlines . checkboxToInlines) box <$> contents)
-- | Prepend inlines to blocks, adding them to the first paragraph or
diff --git a/src/Text/Pandoc/Readers/Org/DocumentTree.hs b/src/Text/Pandoc/Readers/Org/DocumentTree.hs
index 2dcbecb1d..1c4f253cc 100644
--- a/src/Text/Pandoc/Readers/Org/DocumentTree.hs
+++ b/src/Text/Pandoc/Readers/Org/DocumentTree.hs
@@ -41,6 +41,7 @@ documentTree :: PandocMonad m
-> OrgParser m (F Inlines)
-> OrgParser m (F Headline)
documentTree blocks inline = do
+ properties <- option mempty propertiesDrawer
initialBlocks <- blocks
headlines <- sequence <$> manyTill (headline blocks inline 1) eof
title <- fmap docTitle . orgStateMeta <$> getState
@@ -54,7 +55,7 @@ documentTree blocks inline = do
, headlineText = B.fromList title'
, headlineTags = mempty
, headlinePlanning = emptyPlanning
- , headlineProperties = mempty
+ , headlineProperties = properties
, headlineContents = initialBlocks'
, headlineChildren = headlines'
}
@@ -163,8 +164,15 @@ unprunedHeadlineToBlocks hdln st =
in if not usingSelectedTags ||
any (`Set.member` orgStateSelectTags st) (headlineTags rootNode')
then do headlineBlocks <- headlineToBlocks rootNode'
+ -- add metadata from root node :PROPERTIES:
+ updateState $ \s ->
+ s{ orgStateMeta = foldr
+ (\(PropertyKey k, PropertyValue v) m ->
+ B.setMeta k v <$> m)
+ (orgStateMeta s)
+ (headlineProperties rootNode') }
-- ignore first headline, it's the document's title
- return . drop 1 . B.toList $ headlineBlocks
+ return $ drop 1 $ B.toList headlineBlocks
else do headlineBlocks <- mconcat <$> mapM headlineToBlocks
(headlineChildren rootNode')
return . B.toList $ headlineBlocks
diff --git a/src/Text/Pandoc/Readers/Org/Inlines.hs b/src/Text/Pandoc/Readers/Org/Inlines.hs
index 6862dd71e..617f98a10 100644
--- a/src/Text/Pandoc/Readers/Org/Inlines.hs
+++ b/src/Text/Pandoc/Readers/Org/Inlines.hs
@@ -31,11 +31,10 @@ import Text.Pandoc.Readers.LaTeX (inlineCommand, rawLaTeXInline)
import Text.TeXMath (DisplayType (..), readTeX, writePandoc)
import Text.Pandoc.Sources (ToSources(..))
import qualified Text.TeXMath.Readers.MathML.EntityMap as MathMLEntityMap
-
-import Control.Monad (guard, mplus, mzero, unless, void, when)
+import Safe (lastMay)
+import Control.Monad (guard, mplus, mzero, unless, when, void)
import Control.Monad.Trans (lift)
import Data.Char (isAlphaNum, isSpace)
-import Data.List (intersperse)
import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text as T
@@ -148,31 +147,177 @@ endline = try $ do
-- Citations
--
--- The state of citations is a bit confusing due to the lack of an official
--- syntax and multiple syntaxes coexisting. The pandocOrgCite syntax was the
--- first to be implemented here and is almost identical to Markdown's citation
--- syntax. The org-ref package is in wide use to handle citations, but the
--- syntax is a bit limiting and not quite as simple to write. The
--- semi-official Org-mode citation syntax is based on John MacFarlane's Pandoc
--- sytax and Org-oriented enhancements contributed by Richard Lawrence and
--- others. It's dubbed Berkeley syntax due the place of activity of its main
--- contributors. All this should be consolidated once an official Org-mode
--- citation syntax has emerged.
+-- We first try to parse official org-cite citations, then fall
+-- back to org-ref citations (which are still in wide use).
+
+-- | A citation in org-cite style
+orgCite :: PandocMonad m => OrgParser m (F [Citation])
+orgCite = try $ do
+ string "[cite"
+ (sty, _variants) <- citeStyle
+ char ':'
+ spnl
+ globalPref <- option mempty (try (citePrefix <* char ';'))
+ items <- citeItems
+ globalSuff <- option mempty (try (char ';' *> citeSuffix))
+ spnl
+ char ']'
+ return $ adjustCiteStyle sty .
+ addPrefixToFirstItem globalPref .
+ addSuffixToLastItem globalSuff $ items
+
+adjustCiteStyle :: CiteStyle -> (F [Citation]) -> (F [Citation])
+adjustCiteStyle sty cs = do
+ cs' <- cs
+ case cs' of
+ [] -> return []
+ (d:ds) -- TODO needs refinement
+ -> case sty of
+ TextStyle -> return $ d{ citationMode = AuthorInText
+ , citationSuffix = dropWhile (== Space)
+ (citationSuffix d)} : ds
+ NoAuthorStyle -> return $ d{ citationMode = SuppressAuthor } : ds
+ _ -> return (d:ds)
+
+addPrefixToFirstItem :: (F Inlines) -> (F [Citation]) -> (F [Citation])
+addPrefixToFirstItem aff cs = do
+ cs' <- cs
+ aff' <- aff
+ case cs' of
+ [] -> return []
+ (d:ds) -> return (d{ citationPrefix =
+ B.toList aff' <> citationPrefix d }:ds)
+
+addSuffixToLastItem :: (F Inlines) -> (F [Citation]) -> (F [Citation])
+addSuffixToLastItem aff cs = do
+ cs' <- cs
+ aff' <- aff
+ case lastMay cs' of
+ Nothing -> return cs'
+ Just d ->
+ return (init cs' ++ [d{ citationSuffix =
+ citationSuffix d <> B.toList aff' }])
+
+citeItems :: PandocMonad m => OrgParser m (F [Citation])
+citeItems = sequence <$> citeItem `sepBy1` (char ';')
+
+citeItem :: PandocMonad m => OrgParser m (F Citation)
+citeItem = do
+ pref <- citePrefix
+ itemKey <- orgCiteKey
+ suff <- citeSuffix
+ return $ do
+ pre' <- pref
+ suf' <- suff
+ return Citation
+ { citationId = itemKey
+ , citationPrefix = B.toList pre'
+ , citationSuffix = B.toList suf'
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+
+orgCiteKey :: PandocMonad m => OrgParser m Text
+orgCiteKey = do
+ char '@'
+ T.pack <$> many1 (satisfy orgCiteKeyChar)
+
+orgCiteKeyChar :: Char -> Bool
+orgCiteKeyChar c =
+ isAlphaNum c || c `elem` ['.',':','?','!','`','\'','/','*','@','+','|',
+ '(',')','{','}','<','>','&','_','^','$','#',
+ '%','~','-']
+
+rawAffix :: PandocMonad m => Bool -> OrgParser m Text
+rawAffix isPrefix = snd <$> withRaw
+ (many
+ (affixChar
+ <|>
+ try (void (char '[' >> rawAffix isPrefix >> char ']'))))
+ where
+ affixChar = void $ satisfy $ \c ->
+ not (c == '^' || c == ';' || c == '[' || c == ']') &&
+ (not isPrefix || c /= '@')
+
+citePrefix :: PandocMonad m => OrgParser m (F Inlines)
+citePrefix =
+ rawAffix True >>= parseFromString (trimInlinesF . mconcat <$> many inline)
+
+citeSuffix :: PandocMonad m => OrgParser m (F Inlines)
+citeSuffix =
+ rawAffix False >>= parseFromString parseSuffix
+ where
+ parseSuffix = do
+ hasSpace <- option False
+ (True <$ try (spaceChar >> skipSpaces >> lookAhead nonspaceChar))
+ ils <- trimInlinesF . mconcat <$> many inline
+ return $ if hasSpace
+ then (B.space <>) <$> ils
+ else ils
+
+citeStyle :: PandocMonad m => OrgParser m (CiteStyle, [CiteVariant])
+citeStyle = option (DefStyle, []) $ do
+ sty <- option DefStyle $ try $ char '/' *> orgCiteStyle
+ variants <- option [] $ try $ char '/' *> orgCiteVariants
+ return (sty, variants)
+
+orgCiteStyle :: PandocMonad m => OrgParser m CiteStyle
+orgCiteStyle = choice $ map try
+ [ NoAuthorStyle <$ string "noauthor"
+ , NoAuthorStyle <$ string "na"
+ , LocatorsStyle <$ string "locators"
+ , LocatorsStyle <$ char 'l'
+ , NociteStyle <$ string "nocite"
+ , NociteStyle <$ char 'n'
+ , TextStyle <$ string "text"
+ , TextStyle <$ char 't'
+ ]
+
+orgCiteVariants :: PandocMonad m => OrgParser m [CiteVariant]
+orgCiteVariants =
+ (fullnameVariant `sepBy1` (char '-')) <|> (many1 onecharVariant)
+ where
+ fullnameVariant = choice $ map try
+ [ Bare <$ string "bare"
+ , Caps <$ string "caps"
+ , Full <$ string "full"
+ ]
+ onecharVariant = choice
+ [ Bare <$ char 'b'
+ , Caps <$ char 'c'
+ , Full <$ char 'f'
+ ]
+
+data CiteStyle =
+ NoAuthorStyle
+ | LocatorsStyle
+ | NociteStyle
+ | TextStyle
+ | DefStyle
+ deriving Show
+
+data CiteVariant =
+ Caps
+ | Bare
+ | Full
+ deriving Show
+
+
+spnl :: PandocMonad m => OrgParser m ()
+spnl =
+ skipSpaces *> optional (newline *> notFollowedBy blankline *> skipSpaces)
cite :: PandocMonad m => OrgParser m (F Inlines)
-cite = try $ berkeleyCite <|> do
+cite = do
guardEnabled Ext_citations
- (cs, raw) <- withRaw $ choice
- [ pandocOrgCite
+ (cs, raw) <- withRaw $ try $ choice
+ [ orgCite
, orgRefCite
- , berkeleyTextualCite
]
return $ flip B.cite (B.text raw) <$> cs
--- | A citation in Pandoc Org-mode style (@[prefix \@citekey suffix]@).
-pandocOrgCite :: PandocMonad m => OrgParser m (F [Citation])
-pandocOrgCite = try $
- char '[' *> skipSpaces *> citeList <* skipSpaces <* char ']'
+-- org-ref
orgRefCite :: PandocMonad m => OrgParser m (F [Citation])
orgRefCite = try $ choice
@@ -201,100 +346,6 @@ normalOrgRefCite = try $ do
, citationHash = 0
}
--- | Read an Berkeley-style Org-mode citation. Berkeley citation style was
--- develop and adjusted to Org-mode style by John MacFarlane and Richard
--- Lawrence, respectively, both philosophers at UC Berkeley.
-berkeleyCite :: PandocMonad m => OrgParser m (F Inlines)
-berkeleyCite = try $ do
- bcl <- berkeleyCitationList
- return $ do
- parens <- berkeleyCiteParens <$> bcl
- prefix <- berkeleyCiteCommonPrefix <$> bcl
- suffix <- berkeleyCiteCommonSuffix <$> bcl
- citationList <- berkeleyCiteCitations <$> bcl
- return $
- if parens
- then toCite
- . maybe id (alterFirst . prependPrefix) prefix
- . maybe id (alterLast . appendSuffix) suffix
- $ citationList
- else maybe mempty (<> " ") prefix
- <> toListOfCites (map toInTextMode citationList)
- <> maybe mempty (", " <>) suffix
- where
- toCite :: [Citation] -> Inlines
- toCite cs = B.cite cs mempty
-
- toListOfCites :: [Citation] -> Inlines
- toListOfCites = mconcat . intersperse ", " . map (\c -> B.cite [c] mempty)
-
- toInTextMode :: Citation -> Citation
- toInTextMode c = c { citationMode = AuthorInText }
-
- alterFirst, alterLast :: (a -> a) -> [a] -> [a]
- alterFirst _ [] = []
- alterFirst f (c:cs) = f c : cs
- alterLast f = reverse . alterFirst f . reverse
-
- prependPrefix, appendSuffix :: Inlines -> Citation -> Citation
- prependPrefix pre c = c { citationPrefix = B.toList pre <> citationPrefix c }
- appendSuffix suf c = c { citationSuffix = citationSuffix c <> B.toList suf }
-
-data BerkeleyCitationList = BerkeleyCitationList
- { berkeleyCiteParens :: Bool
- , berkeleyCiteCommonPrefix :: Maybe Inlines
- , berkeleyCiteCommonSuffix :: Maybe Inlines
- , berkeleyCiteCitations :: [Citation]
- }
-berkeleyCitationList :: PandocMonad m => OrgParser m (F BerkeleyCitationList)
-berkeleyCitationList = try $ do
- char '['
- parens <- choice [ False <$ berkeleyBareTag, True <$ berkeleyParensTag ]
- char ':'
- skipSpaces
- commonPrefix <- optionMaybe (try $ citationListPart <* char ';')
- citations <- citeList
- commonSuffix <- optionMaybe (try citationListPart)
- char ']'
- return (BerkeleyCitationList parens
- <$> sequence commonPrefix
- <*> sequence commonSuffix
- <*> citations)
- where
- citationListPart :: PandocMonad m => OrgParser m (F Inlines)
- citationListPart = fmap (trimInlinesF . mconcat) . try . many1 $ do
- notFollowedBy' $ citeKey False
- notFollowedBy (oneOf ";]")
- inline
-
-berkeleyBareTag :: PandocMonad m => OrgParser m ()
-berkeleyBareTag = try $ void berkeleyBareTag'
-
-berkeleyParensTag :: PandocMonad m => OrgParser m ()
-berkeleyParensTag = try . void $ enclosedByPair1 '(' ')' berkeleyBareTag'
-
-berkeleyBareTag' :: PandocMonad m => OrgParser m ()
-berkeleyBareTag' = try $ void (string "cite")
-
-berkeleyTextualCite :: PandocMonad m => OrgParser m (F [Citation])
-berkeleyTextualCite = try $ do
- (suppressAuthor, key) <- citeKey False
- returnF . return $ Citation
- { citationId = key
- , citationPrefix = mempty
- , citationSuffix = mempty
- , citationMode = if suppressAuthor then SuppressAuthor else AuthorInText
- , citationNoteNum = 0
- , citationHash = 0
- }
-
--- The following is what a Berkeley-style bracketed textual citation parser
--- would look like. However, as these citations are a subset of Pandoc's Org
--- citation style, this isn't used.
--- berkeleyBracketedTextualCite :: PandocMonad m => OrgParser m (F [Citation])
--- berkeleyBracketedTextualCite = try . (fmap head) $
--- enclosedByPair1 '[' ']' berkeleyTextualCite
-
-- | Read a link-like org-ref style citation. The citation includes pre and
-- post text. However, multiple citations are not possible due to limitations
-- in the syntax.
@@ -345,39 +396,6 @@ orgRefCiteMode =
, ("citeyear", SuppressAuthor)
]
-citeList :: PandocMonad m => OrgParser m (F [Citation])
-citeList = sequence <$> sepEndBy1 citation (try $ char ';' *> skipSpaces)
-
-citation :: PandocMonad m => OrgParser m (F Citation)
-citation = try $ do
- pref <- prefix
- (suppress_author, key) <- citeKey False
- suff <- suffix
- return $ do
- x <- pref
- y <- suff
- return Citation
- { citationId = key
- , citationPrefix = B.toList x
- , citationSuffix = B.toList y
- , citationMode = if suppress_author
- then SuppressAuthor
- else NormalCitation
- , citationNoteNum = 0
- , citationHash = 0
- }
- where
- prefix = trimInlinesF . mconcat <$>
- manyTill inline (char ']' <|> (']' <$ lookAhead (citeKey False)))
- suffix = try $ do
- hasSpace <- option False (notFollowedBy nonspaceChar >> return True)
- skipSpaces
- rest <- trimInlinesF . mconcat <$>
- many (notFollowedBy (oneOf ";]") *> inline)
- return $ if hasSpace
- then (B.space <>) <$> rest
- else rest
-
footnote :: PandocMonad m => OrgParser m (F Inlines)
footnote = try $ do
note <- inlineNote <|> referencedNote
diff --git a/src/Text/Pandoc/Readers/Org/Meta.hs b/src/Text/Pandoc/Readers/Org/Meta.hs
index a1b21046a..ccb6744e7 100644
--- a/src/Text/Pandoc/Readers/Org/Meta.hs
+++ b/src/Text/Pandoc/Readers/Org/Meta.hs
@@ -27,13 +27,13 @@ import qualified Text.Pandoc.Builder as B
import Text.Pandoc.Class.PandocMonad (PandocMonad)
import Text.Pandoc.Definition
import Text.Pandoc.Shared (blocksToInlines, safeRead)
+import Text.Pandoc.Network.HTTP (urlEncode)
import Control.Monad (mzero, void)
import Data.List (intercalate, intersperse)
import Data.Map (Map)
import Data.Maybe (fromMaybe)
import Data.Text (Text)
-import Network.HTTP (urlEncode)
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Text as T
@@ -188,7 +188,7 @@ parseFormat = try $ replacePlain <|> replaceUrl <|> justAppend
-- inefficient
replacePlain = try $ (\x -> T.concat . flip intersperse x)
<$> sequence [tillSpecifier 's', rest]
- replaceUrl = try $ (\x -> T.concat . flip intersperse x . T.pack . urlEncode . T.unpack)
+ replaceUrl = try $ (\x -> T.concat . flip intersperse x . urlEncode)
<$> sequence [tillSpecifier 'h', rest]
justAppend = try $ (<>) <$> rest
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index 3990f0cb5..88471eb0a 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -466,14 +466,11 @@ includeDirective top fields body = do
let classes = maybe [] T.words (lookup "class" fields)
let ident = maybe "" trimr $ lookup "name" fields
let parser =
- case lookup "code" fields of
+ case lookup "code" fields `mplus` lookup "literal" fields of
Just lang ->
(codeblock ident classes fields (trimr lang) False
. sourcesToText) <$> getInput
- Nothing ->
- case lookup "literal" fields of
- Just _ -> B.rawBlock "rst" . sourcesToText <$> getInput
- Nothing -> parseBlocks
+ Nothing -> parseBlocks
let isLiteral = isJust (lookup "code" fields `mplus` lookup "literal" fields)
let selectLines =
(case trim <$> lookup "end-before" fields of
@@ -728,8 +725,8 @@ directive' = do
"figure" -> do
(caption, legend) <- parseFromString' extractCaption body'
let src = escapeURI $ trim top
- return $ B.para (B.imageWith (imgAttr "figclass") src "fig:"
- caption) <> legend
+ return $ B.simpleFigureWith
+ (imgAttr "figclass") caption src "" <> legend
"image" -> do
let src = escapeURI $ trim top
let alt = B.str $ maybe "image" trim $ lookup "alt" fields
@@ -922,14 +919,22 @@ addNewRole roleText fields = do
(baseRole, baseFmt, baseAttr) =
getBaseRole (parentRole, Nothing, nullAttr) customRoles
fmt = if parentRole == "raw" then lookup "format" fields else baseFmt
- annotate :: [Text] -> [Text]
- annotate = maybe id (:) $
- if baseRole == "code"
- then lookup "language" fields
- else Nothing
- attr = let (ident, classes, keyValues) = baseAttr
- -- nub in case role name & language class are the same
- in (ident, nub . (role :) . annotate $ classes, keyValues)
+
+ updateClasses :: [Text] -> [Text]
+ updateClasses oldClasses = let
+
+ codeLanguageClass = if baseRole == "code"
+ then maybeToList (lookup "language" fields)
+ else []
+
+ -- if no ":class:" field is given, the default is the role name
+ classFieldClasses = maybe [role] T.words (lookup "class" fields)
+
+ -- nub in case role name & language class are the same
+ in nub (classFieldClasses ++ codeLanguageClass ++ oldClasses)
+
+ attr = let (ident, baseClasses, keyValues) = baseAttr
+ in (ident, updateClasses baseClasses, keyValues)
-- warn about syntax we ignore
forM_ fields $ \(key, _) -> case key of
@@ -1158,10 +1163,11 @@ referenceNames = do
let rn = try $ do
string ".. _"
ref <- quotedReferenceName
- <|> manyChar ( noneOf ":\n"
+ <|> manyChar ( noneOf "\\:\n"
<|> try (char '\n' <*
string " " <*
notFollowedBy blankline)
+ <|> try (char '\\' *> char ':')
<|> try (char ':' <* lookAhead alphaNum)
)
char ':'
diff --git a/src/Text/Pandoc/Readers/RTF.hs b/src/Text/Pandoc/Readers/RTF.hs
new file mode 100644
index 000000000..3938681f4
--- /dev/null
+++ b/src/Text/Pandoc/Readers/RTF.hs
@@ -0,0 +1,1351 @@
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE OverloadedStrings #-}
+{- |
+ Module : Text.Pandoc.Readers.RTF
+ Copyright : Copyright (C) 2021 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane (<jgm@berkeley.edu>)
+ Stability : alpha
+ Portability : portable
+
+Conversion of RTF documents 'Pandoc' document.
+We target version 1.5 of the RTF spec.
+-}
+module Text.Pandoc.Readers.RTF (readRTF) where
+
+import qualified Data.IntMap as IntMap
+import qualified Data.Sequence as Seq
+import Control.Monad
+import Control.Monad.Except (throwError)
+import Data.List (find, foldl')
+import Data.Word (Word8, Word16)
+import Data.Default
+import Data.Text (Text)
+import qualified Data.Text as T
+import qualified Data.Text.Read as TR
+import Text.Pandoc.Builder (Blocks, Inlines)
+import qualified Text.Pandoc.Builder as B
+import Text.Pandoc.Class.PandocMonad (PandocMonad (..), insertMedia)
+import Text.Pandoc.Definition
+import Text.Pandoc.Options
+import Text.Pandoc.Parsing
+import Text.Pandoc.Shared (safeRead, tshow)
+import Data.Char (isAlphaNum, chr, isAscii, isLetter, isSpace, ord)
+import qualified Data.ByteString.Lazy as BL
+import Data.Digest.Pure.SHA (sha1, showDigest)
+import Data.Maybe (mapMaybe, fromMaybe)
+import Safe (lastMay, initSafe, headDef)
+-- import Debug.Trace
+
+-- TODO:
+-- [ ] more complex table features
+--
+
+-- | Read RTF from an input string and return a Pandoc document.
+readRTF :: (PandocMonad m, ToSources a)
+ => ReaderOptions
+ -> a
+ -> m Pandoc
+readRTF opts s = do
+ let sources = toSources s
+ parsed <- readWithM parseRTF def{ sOptions = opts } sources
+ case parsed of
+ Left e -> throwError e
+ Right d -> return d
+
+data CharSet = ANSI | Mac | Pc | Pca
+ deriving (Show, Eq)
+
+-- first index is the list (or override) id, second is the list level
+type ListTable = IntMap.IntMap ListLevelTable
+type ListLevelTable = IntMap.IntMap ListType
+
+data RTFState = RTFState { sOptions :: ReaderOptions
+ , sCharSet :: CharSet
+ , sGroupStack :: [Properties]
+ , sListStack :: [List]
+ , sCurrentCell :: Blocks
+ , sTableRows :: [TableRow] -- reverse order
+ , sTextContent :: [(Properties, Text)]
+ , sMetadata :: [(Text, Inlines)]
+ , sFontTable :: FontTable
+ , sStylesheet :: Stylesheet
+ , sListTable :: ListTable
+ , sListOverrideTable :: ListTable
+ , sEatChars :: Int
+ } deriving (Show)
+
+instance Default RTFState where
+ def = RTFState { sOptions = def
+ , sCharSet = ANSI
+ , sGroupStack = []
+ , sListStack = []
+ , sCurrentCell = mempty
+ , sTableRows = []
+ , sTextContent = []
+ , sMetadata = []
+ , sFontTable = mempty
+ , sStylesheet = mempty
+ , sListTable = mempty
+ , sListOverrideTable = mempty
+ , sEatChars = 0
+ }
+
+type FontTable = IntMap.IntMap FontFamily
+
+data FontFamily =
+ Roman | Swiss | Modern | Script | Decor | Tech | Bidi
+ deriving (Show, Eq)
+
+data StyleType = ParagraphStyle | SectionStyle | CharStyle | TableStyle
+ deriving (Show, Eq)
+
+data Style =
+ Style { styleNum :: Int
+ , styleType :: StyleType
+ , styleBasedOn :: Maybe Int
+ , styleName :: Text
+ , styleFormatting :: [Tok]
+ } deriving (Show, Eq)
+
+type Stylesheet = IntMap.IntMap Style
+
+data PictType =
+ Emfblip | Pngblip | Jpegblip
+ deriving (Show, Eq)
+
+data Pict =
+ Pict { picType :: Maybe PictType
+ , picWidth :: Maybe Int
+ , picHeight :: Maybe Int
+ , picWidthGoal :: Maybe Int
+ , picHeightGoal :: Maybe Int
+ , picBinary :: Bool
+ , picData :: Text
+ , picName :: Text
+ , picBytes :: BL.ByteString
+ } deriving (Show, Eq)
+
+instance Default Pict where
+ def = Pict { picType = Nothing
+ , picWidth = Nothing
+ , picHeight = Nothing
+ , picWidthGoal = Nothing
+ , picHeightGoal = Nothing
+ , picBinary = False
+ , picData = mempty
+ , picName = mempty
+ , picBytes = mempty }
+
+data Properties =
+ Properties
+ { gBold :: Bool
+ , gItalic :: Bool
+ , gCaps :: Bool
+ , gDeleted :: Bool
+ , gSub :: Bool
+ , gSuper :: Bool
+ , gSmallCaps :: Bool
+ , gUnderline :: Bool
+ , gHyperlink :: Maybe Text
+ , gAnchor :: Maybe Text
+ , gImage :: Maybe Pict
+ , gFontFamily :: Maybe FontFamily
+ , gHidden :: Bool
+ , gUC :: Int -- number of ansi chars to skip after unicode char
+ , gFootnote :: Maybe Blocks
+ , gOutlineLevel :: Maybe ListLevel
+ , gListOverride :: Maybe Override
+ , gListLevel :: Maybe Int
+ , gInTable :: Bool
+ } deriving (Show, Eq)
+
+instance Default Properties where
+ def = Properties { gBold = False
+ , gItalic = False
+ , gCaps = False
+ , gDeleted = False
+ , gSub = False
+ , gSuper = False
+ , gSmallCaps = False
+ , gUnderline = False
+ , gHyperlink = Nothing
+ , gAnchor = Nothing
+ , gImage = Nothing
+ , gFontFamily = Nothing
+ , gHidden = False
+ , gUC = 1
+ , gFootnote = Nothing
+ , gOutlineLevel = Nothing
+ , gListOverride = Nothing
+ , gListLevel = Nothing
+ , gInTable = False
+ }
+
+type RTFParser m = ParserT Sources RTFState m
+
+data ListType = Bullet | Ordered ListAttributes
+ deriving (Show, Eq)
+
+type Override = Int
+
+type ListLevel = Int
+
+data List =
+ List Override ListLevel ListType [Blocks] -- items in reverse order
+ deriving (Show, Eq)
+
+newtype TableRow = TableRow [Blocks] -- cells in reverse order
+ deriving (Show, Eq)
+
+parseRTF :: PandocMonad m => RTFParser m Pandoc
+parseRTF = do
+ skipMany nl
+ toks <- many tok
+ -- return $! traceShowId toks
+ bs <- (case toks of
+ -- if we start with {\rtf1...}, parse that and ignore
+ -- what follows (which in certain cases can be non-RTF content)
+ rtftok@(Tok _ (Grouped (Tok _ (ControlWord "rtf" (Just 1)) : _))) : _
+ -> foldM processTok mempty [rtftok]
+ _ -> foldM processTok mempty toks)
+ >>= emitBlocks
+ unclosed <- closeContainers
+ let doc = B.doc $ bs <> unclosed
+ kvs <- sMetadata <$> getState
+ pure $ foldr (uncurry B.setMeta) doc kvs
+
+data Tok = Tok SourcePos TokContents
+ deriving (Show, Eq)
+
+data TokContents =
+ ControlWord Text (Maybe Int)
+ | ControlSymbol Char
+ | UnformattedText Text
+ | BinData BL.ByteString
+ | HexVal Word8
+ | Grouped [Tok]
+ deriving (Show, Eq)
+
+tok :: PandocMonad m => RTFParser m Tok
+tok = do
+ pos <- getPosition
+ Tok pos <$> ((controlThing <|> unformattedText <|> grouped) <* skipMany nl)
+ where
+ controlThing = do
+ char '\\' *>
+ ( binData
+ <|> (ControlWord <$> letterSequence <*> (parameter <* optional delimChar))
+ <|> (HexVal <$> hexVal)
+ <|> (ControlSymbol <$> anyChar) )
+ binData = try $ do
+ string "bin" <* notFollowedBy letter
+ n <- fromMaybe 0 <$> parameter
+ spaces
+ -- NOTE: We assume here that if the document contains binary
+ -- data, it will not be valid UTF-8 and hence it will have been
+ -- read as latin1, so we can recover the data in the following
+ -- way. This is probably not completely reliable, but I don't
+ -- know if we can do better without making this reader take
+ -- a ByteString input.
+ dat <- BL.pack . map (fromIntegral . ord) <$> count n anyChar
+ return $ BinData dat
+ parameter = do
+ hyph <- string "-" <|> pure ""
+ rest <- many digit
+ let pstr = T.pack $ hyph <> rest
+ return $ safeRead pstr
+ hexVal = do
+ char '\''
+ x <- hexDigit
+ y <- hexDigit
+ return $ hexToWord (T.pack [x,y])
+ letterSequence = T.pack <$> many1 (satisfy (\c -> isAscii c && isLetter c))
+ unformattedText =
+ UnformattedText . T.pack . mconcat <$>
+ many1 ( many1 (satisfy (not . isSpecial))
+ <|> ("" <$ nl))
+ grouped = Grouped <$> (char '{' *> skipMany nl *> manyTill tok (char '}'))
+
+nl :: PandocMonad m => RTFParser m ()
+nl = void (char '\n' <|> char '\r')
+
+isSpecial :: Char -> Bool
+isSpecial '{' = True
+isSpecial '}' = True
+isSpecial '\\' = True
+isSpecial '\n' = True
+isSpecial _ = False
+
+delimChar :: PandocMonad m => RTFParser m Char
+delimChar = satisfy (\c -> not (isAlphaNum c || isSpecial c))
+
+modifyGroup :: PandocMonad m
+ => (Properties -> Properties)
+ -> RTFParser m ()
+modifyGroup f =
+ updateState $ \st ->
+ st{ sGroupStack =
+ case sGroupStack st of
+ [] -> []
+ (x:xs) -> f x : xs }
+
+addFormatting :: (Properties, Text) -> Inlines
+addFormatting (_, "\n") = B.linebreak
+addFormatting (props, _) | gHidden props = mempty
+addFormatting (props, _) | Just bs <- gFootnote props = B.note bs
+addFormatting (props, txt) =
+ (if gBold props then B.strong else id) .
+ (if gItalic props then B.emph else id) .
+ (if gDeleted props then B.strikeout else id) .
+ (if gSub props then B.subscript else id) .
+ (if gSuper props then B.superscript else id) .
+ (if gSmallCaps props then B.smallcaps else id) .
+ (if gUnderline props then B.underline else id) .
+ (case gHyperlink props of
+ Nothing -> id
+ Just linkdest -> B.link linkdest mempty) .
+ (case gAnchor props of
+ Nothing -> id
+ Just ident -> B.spanWith (ident,[],[])) .
+ (case gFontFamily props of
+ Just Modern -> B.code
+ _ -> case gImage props of
+ Just pict ->
+ let attr = ("",[],
+ (case picWidthGoal pict of
+ Nothing -> []
+ Just w -> [("width", tshow (fromIntegral w / 1440
+ :: Double)
+ <> "in")]) ++
+ (case picHeightGoal pict of
+ Nothing -> []
+ Just h -> [("height", tshow (fromIntegral h / 1440
+ :: Double)
+ <> "in")]))
+ in B.imageWith attr (picName pict) "" . B.text
+ Nothing -> B.text) .
+ (if gCaps props then T.toUpper else id)
+ $ txt
+
+addText :: PandocMonad m => Text -> RTFParser m ()
+addText t = do
+ gs <- sGroupStack <$> getState
+ let props = case gs of
+ (x:_) -> x
+ _ -> def
+ updateState (\s -> s{ sTextContent = (props, t) : sTextContent s })
+
+inGroup :: PandocMonad m => RTFParser m a -> RTFParser m a
+inGroup p = do
+ updateState $ \st ->
+ st{ sGroupStack =
+ case sGroupStack st of
+ [] -> [def]
+ (x:xs) -> (x:x:xs) } -- inherit current group's properties
+ result <- p
+ updateState $ \st ->
+ st{ sGroupStack =
+ case sGroupStack st of
+ [] -> [] -- should not happen
+ (_:xs) -> xs }
+ return result
+
+getStyleFormatting :: PandocMonad m => Int -> RTFParser m [Tok]
+getStyleFormatting stynum = do
+ stylesheet <- sStylesheet <$> getState
+ case IntMap.lookup stynum stylesheet of
+ Nothing -> return []
+ Just sty ->
+ case styleBasedOn sty of
+ Just i -> (<> styleFormatting sty) <$> getStyleFormatting i
+ Nothing -> return $ styleFormatting sty
+
+isMetadataField :: Text -> Bool
+isMetadataField "title" = True
+isMetadataField "subject" = True
+isMetadataField "author" = True
+isMetadataField "manager" = True
+isMetadataField "company" = True
+isMetadataField "operator" = True
+isMetadataField "category" = True
+isMetadataField "keywords" = True
+isMetadataField "comment" = True
+isMetadataField "doccomm" = True
+isMetadataField "hlinkbase" = True
+isMetadataField "generator" = True
+isMetadataField _ = False
+
+isHeaderFooter :: Text -> Bool
+isHeaderFooter "header" = True
+isHeaderFooter "headerl" = True
+isHeaderFooter "headerr" = True
+isHeaderFooter "headerf" = True
+isHeaderFooter "footer" = True
+isHeaderFooter "footerl" = True
+isHeaderFooter "footerr" = True
+isHeaderFooter "footerf" = True
+isHeaderFooter _ = False
+
+boolParam :: Maybe Int -> Bool
+boolParam (Just 0) = False
+boolParam _ = True
+
+isUnderline :: Text -> Bool
+isUnderline "ul" = True
+isUnderline "uld" = True
+isUnderline "uldash" = True
+isUnderline "uldashd" = True
+isUnderline "uldashdd" = True
+isUnderline "uldb" = True
+isUnderline "ulth" = True
+isUnderline "ulthd" = True
+isUnderline "ulthdash" = True
+isUnderline "ulw" = True
+isUnderline "ulwave" = True
+isUnderline _ = False
+
+processTok :: PandocMonad m => Blocks -> Tok -> RTFParser m Blocks
+processTok bs (Tok pos tok') = do
+ setPosition pos
+ case tok' of
+ HexVal{} -> return ()
+ UnformattedText{} -> return ()
+ _ -> updateState $ \s -> s{ sEatChars = 0 }
+ case tok' of
+ Grouped (Tok _ (ControlSymbol '*') : toks) ->
+ bs <$ (do oldTextContent <- sTextContent <$> getState
+ processTok mempty (Tok pos (Grouped toks))
+ updateState $ \st -> st{ sTextContent = oldTextContent })
+ Grouped (Tok _ (ControlWord "fonttbl" _) : toks) -> inGroup $ do
+ updateState $ \s -> s{ sFontTable = processFontTable toks }
+ pure bs
+ Grouped (Tok _ (ControlWord "field" _) : toks) ->
+ inGroup $ handleField bs toks
+ Grouped (Tok _ (ControlWord "pict" _) : toks) ->
+ bs <$ inGroup (handlePict toks)
+ Grouped (Tok _ (ControlWord "stylesheet" _) : toks) ->
+ bs <$ inGroup (handleStylesheet toks)
+ Grouped (Tok _ (ControlWord "listtext" _) : _) -> do
+ -- eject any previous list items...sometimes TextEdit
+ -- doesn't put in a \par
+ emitBlocks bs
+ Grouped (Tok _ (ControlWord "pgdsc" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "colortbl" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "listtable" _) : toks) ->
+ bs <$ inGroup (handleListTable toks)
+ Grouped (Tok _ (ControlWord "listoverridetable" _) : toks) ->
+ bs <$ inGroup (handleListOverrideTable toks)
+ Grouped (Tok _ (ControlWord "wgrffmtfilter" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "themedata" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "colorschememapping" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "datastore" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "latentstyles" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "pntxta" _) : _) -> pure bs -- TODO
+ Grouped (Tok _ (ControlWord "pntxtb" _) : _) -> pure bs -- TODO
+ Grouped (Tok _ (ControlWord "xmlnstbl" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "filetbl" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "expandedcolortbl" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "listtables" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "revtbl" _) : _) -> pure bs
+ Grouped (Tok _ (ControlWord "bkmkstart" _)
+ : Tok _ (UnformattedText t) : _) -> do
+ -- TODO ideally we'd put the span around bkmkstart/end, but this
+ -- is good for now:
+ modifyGroup (\g -> g{ gAnchor = Just $ T.strip t })
+ pure bs
+ Grouped (Tok _ (ControlWord "bkmkend" _) : _) -> do
+ modifyGroup (\g -> g{ gAnchor = Nothing })
+ pure bs
+ Grouped (Tok _ (ControlWord f _) : _) | isHeaderFooter f -> pure bs
+ Grouped (Tok _ (ControlWord "footnote" _) : toks) -> do
+ noteBs <- inGroup $ processDestinationToks toks
+ modifyGroup (\g -> g{ gFootnote = Just noteBs })
+ addText "*"
+ modifyGroup (\g -> g{ gFootnote = Nothing })
+ return bs
+ Grouped (Tok _ (ControlWord "info" _) : toks) ->
+ bs <$ inGroup (processDestinationToks toks)
+ Grouped (Tok _ (ControlWord f _) : toks) | isMetadataField f -> inGroup $ do
+ foldM_ processTok mempty toks
+ annotatedToks <- reverse . sTextContent <$> getState
+ updateState $ \s -> s{ sTextContent = [] }
+ let ils = B.trimInlines . mconcat $ map addFormatting annotatedToks
+ updateState $ \s -> s{ sMetadata = (f, ils) : sMetadata s }
+ pure bs
+ Grouped toks -> inGroup (foldM processTok bs toks)
+ UnformattedText t -> bs <$ do
+ -- return $! traceShowId $! (pos, t)
+ eatChars <- sEatChars <$> getState
+ case eatChars of
+ 0 -> addText t
+ n | n < T.length t -> do
+ updateState $ \s -> s{ sEatChars = 0 }
+ addText (T.drop n t)
+ | otherwise -> do
+ updateState $ \s -> s{ sEatChars = n - T.length t }
+ HexVal n -> bs <$ do
+ eatChars <- sEatChars <$> getState
+ if eatChars == 0
+ then do
+ charset <- sCharSet <$> getState
+ case charset of
+ ANSI -> addText (T.singleton $ ansiToChar n)
+ Mac -> addText (T.singleton $ macToChar n)
+ Pc -> addText (T.singleton $ pcToChar n)
+ Pca -> addText (T.singleton $ pcaToChar n)
+ else updateState $ \s -> s{ sEatChars = eatChars - 1 }
+ ControlWord "ansi" _ -> bs <$
+ updateState (\s -> s{ sCharSet = ANSI })
+ ControlWord "mac" _ -> bs <$
+ updateState (\s -> s{ sCharSet = Mac })
+ ControlWord "pc" _ -> bs <$
+ updateState (\s -> s{ sCharSet = Pc })
+ ControlWord "pca" _ -> bs <$
+ updateState (\s -> s{ sCharSet = Pca })
+ ControlWord "outlinelevel" mbp -> bs <$
+ modifyGroup (\g -> g{ gOutlineLevel = mbp })
+ ControlWord "ls" mbp -> bs <$
+ modifyGroup (\g -> g{ gListOverride = mbp })
+ ControlWord "ilvl" mbp -> bs <$
+ modifyGroup (\g -> g{ gListLevel = mbp })
+ ControlSymbol '\\' -> bs <$ addText "\\"
+ ControlSymbol '{' -> bs <$ addText "{"
+ ControlSymbol '}' -> bs <$ addText "}"
+ ControlSymbol '~' -> bs <$ addText "\x00a0"
+ ControlSymbol '-' -> bs <$ addText "\x00ad"
+ ControlSymbol '_' -> bs <$ addText "\x2011"
+ ControlWord "trowd" _ -> bs <$ do -- add new row
+ updateState $ \s -> s{ sTableRows = TableRow [] : sTableRows s
+ , sCurrentCell = mempty }
+ ControlWord "cell" _ -> bs <$ do
+ new <- emitBlocks mempty
+ curCell <- (<> new) . sCurrentCell <$> getState
+ updateState $ \s -> s{ sTableRows =
+ case sTableRows s of
+ TableRow cs : rs ->
+ TableRow (curCell : cs) : rs
+ [] -> [TableRow [curCell]] -- shouldn't happen
+ , sCurrentCell = mempty }
+ ControlWord "intbl" _ -> bs <$ modifyGroup (\g -> g{ gInTable = True })
+ ControlWord "plain" _ -> bs <$ modifyGroup (const def)
+ ControlWord "lquote" _ -> bs <$ addText "\x2018"
+ ControlWord "rquote" _ -> bs <$ addText "\x2019"
+ ControlWord "ldblquote" _ -> bs <$ addText "\x201C"
+ ControlWord "rdblquote" _ -> bs <$ addText "\x201D"
+ ControlWord "emdash" _ -> bs <$ addText "\x2014"
+ ControlWord "emspace" _ -> bs <$ addText "\x2003"
+ ControlWord "enspace" _ -> bs <$ addText "\x2002"
+ ControlWord "endash" _ -> bs <$ addText "\x2013"
+ ControlWord "bullet" _ -> bs <$ addText "\x2022"
+ ControlWord "tab" _ -> bs <$ addText "\t"
+ ControlWord "line" _ -> bs <$ addText "\n"
+ ControlSymbol '\n' -> bs <$ addText "\n"
+ ControlSymbol '\r' -> bs <$ addText "\n"
+ ControlWord "uc" (Just i) -> bs <$ modifyGroup (\g -> g{ gUC = i })
+ ControlWord "cs" (Just n) -> do
+ getStyleFormatting n >>= foldM processTok bs
+ ControlWord "s" (Just n) -> do
+ getStyleFormatting n >>= foldM processTok bs
+ ControlWord "ds" (Just n) -> do
+ getStyleFormatting n >>= foldM processTok bs
+ ControlWord "f" (Just i) -> bs <$ do
+ fontTable <- sFontTable <$> getState
+ modifyGroup (\g -> g{ gFontFamily = IntMap.lookup i fontTable })
+ ControlWord "u" (Just i) -> bs <$ do
+ st <- getState
+ let curgroup = case sGroupStack st of
+ [] -> def
+ (x:_) -> x
+ updateState $ \s -> s{ sEatChars = gUC curgroup }
+ -- "RTF control words generally accept signed 16-bit numbers as
+ -- arguments. For this reason, Unicode values greater than 32767
+ -- must be expressed as negative numbers."
+ let codepoint :: Word16
+ codepoint = fromIntegral i
+ addText (T.singleton (chr $ fromIntegral codepoint))
+ ControlWord "caps" mbp -> bs <$
+ modifyGroup (\g -> g{ gCaps = boolParam mbp })
+ ControlWord "deleted" mbp -> bs <$
+ modifyGroup (\g -> g{ gDeleted = boolParam mbp })
+ ControlWord "b" mbp -> bs <$
+ modifyGroup (\g -> g{ gBold = boolParam mbp })
+ ControlWord "i" mbp -> bs <$
+ modifyGroup (\g -> g{ gItalic = boolParam mbp })
+ ControlWord "sub" mbp -> bs <$
+ modifyGroup (\g -> g{ gSub = boolParam mbp })
+ ControlWord "super" mbp -> bs <$
+ modifyGroup (\g -> g{ gSuper = boolParam mbp })
+ ControlWord "up" mbp -> bs <$
+ modifyGroup (\g -> g{ gSuper = boolParam mbp })
+ ControlWord "strike" mbp -> bs <$
+ modifyGroup (\g -> g{ gDeleted = boolParam mbp })
+ ControlWord "strikedl" mbp -> bs <$
+ modifyGroup (\g -> g{ gDeleted = boolParam mbp })
+ ControlWord "striked" mbp -> bs <$
+ modifyGroup (\g -> g{ gDeleted = boolParam mbp })
+ ControlWord "scaps" mbp -> bs <$
+ modifyGroup (\g -> g{ gSmallCaps = boolParam mbp })
+ ControlWord "v" mbp -> bs <$
+ modifyGroup (\g -> g{ gHidden = boolParam mbp })
+ ControlWord x mbp | isUnderline x -> bs <$
+ modifyGroup (\g -> g{ gUnderline = boolParam mbp })
+ ControlWord "ulnone" _ -> bs <$
+ modifyGroup (\g -> g{ gUnderline = False })
+ ControlWord "pard" _ -> bs <$ do
+ modifyGroup (const def)
+ getStyleFormatting 0 >>= foldM processTok bs
+ ControlWord "par" _ -> emitBlocks bs
+ _ -> pure bs
+
+processDestinationToks :: PandocMonad m => [Tok] -> RTFParser m Blocks
+processDestinationToks toks = do
+ textContent <- sTextContent <$> getState
+ liststack <- sListStack <$> getState
+ updateState $ \s -> s{ sTextContent = mempty
+ , sListStack = [] }
+ result <- inGroup $
+ foldM processTok mempty toks >>= emitBlocks
+ unclosed <- closeContainers
+ updateState $ \s -> s{ sTextContent = textContent
+ , sListStack = liststack }
+ return $ result <> unclosed
+
+-- close lists >= level
+closeLists :: PandocMonad m => Int -> RTFParser m Blocks
+closeLists lvl = do
+ lists <- sListStack <$> getState
+ case lists of
+ (List _ lvl' lt items : rest) | lvl' >= lvl -> do
+ let newlist = (case lt of
+ Bullet -> B.bulletList
+ Ordered listAttr -> B.orderedListWith listAttr)
+ (reverse items)
+ updateState $ \s -> s{ sListStack = rest }
+ case rest of
+ [] -> do
+ updateState $ \s -> s{ sListStack = rest }
+ pure newlist
+ (List lo lvl'' lt' [] : rest') -> do -- should not happen
+ updateState $ \s -> s{ sListStack =
+ List lo lvl'' lt' [newlist] : rest' }
+ closeLists lvl
+ (List lo lvl'' lt' (i:is) : rest') -> do
+ updateState $ \s -> s{ sListStack =
+ List lo lvl'' lt' (i <> newlist : is) : rest' }
+ closeLists lvl
+ _ -> pure mempty
+
+closeTable :: PandocMonad m => RTFParser m Blocks
+closeTable = do
+ rawrows <- sTableRows <$> getState
+ if null rawrows
+ then return mempty
+ else do
+ let getCells (TableRow cs) = reverse cs
+ let rows = map getCells . reverse $ rawrows
+ updateState $ \s -> s{ sCurrentCell = mempty
+ , sTableRows = [] }
+ return $ B.simpleTable [] rows
+
+closeContainers :: PandocMonad m => RTFParser m Blocks
+closeContainers = do
+ tbl <- closeTable
+ lists <- closeLists 0
+ return $ tbl <> lists
+
+trimFinalLineBreak :: Inlines -> Inlines
+trimFinalLineBreak ils =
+ case Seq.viewr (B.unMany ils) of
+ rest Seq.:> LineBreak -> B.Many rest
+ _ -> ils
+
+emitBlocks :: PandocMonad m => Blocks -> RTFParser m Blocks
+emitBlocks bs = do
+ annotatedToks <- reverse . sTextContent <$> getState
+ updateState $ \s -> s{ sTextContent = [] }
+ let justCode = def{ gFontFamily = Just Modern }
+ let prop = case annotatedToks of
+ [] -> def
+ ((p,_):_) -> p
+ tbl <- if gInTable prop || null annotatedToks
+ then pure mempty
+ else closeTable
+ new <-
+ case annotatedToks of
+ [] -> pure mempty
+ _ | Just lst <- gListOverride prop
+ -> do
+ let level = fromMaybe 0 $ gListLevel prop
+ listOverrideTable <- sListOverrideTable <$> getState
+ let listType = fromMaybe Bullet $
+ IntMap.lookup lst listOverrideTable >>= IntMap.lookup level
+ lists <- sListStack <$> getState
+ -- get para contents of list item
+ let newbs = B.para . B.trimInlines . trimFinalLineBreak . mconcat $
+ map addFormatting annotatedToks
+ case lists of
+ (List lo parentlevel _lt items : cs)
+ | lo == lst
+ , parentlevel == level
+ -- add another item to existing list
+ -> do updateState $ \s ->
+ s{ sListStack =
+ List lo level listType (newbs:items) : cs }
+ pure mempty
+ | lo /= lst || level < parentlevel
+ -- close parent list and add new list
+ -> do new <- closeLists level -- close open lists > level
+ updateState $ \s ->
+ s{ sListStack = List lst level listType [newbs] :
+ sListStack s }
+ pure new
+ _ -> do -- add new list (level > parentlevel)
+ updateState $ \s ->
+ s{ sListStack = List lst level listType [newbs] :
+ sListStack s }
+ pure mempty
+ | Just lvl <- gOutlineLevel prop
+ -> do
+ lists <- closeLists 0
+ pure $ lists <>
+ B.header (lvl + 1)
+ (B.trimInlines . mconcat $ map addFormatting
+ $ removeCommonFormatting
+ annotatedToks)
+ | all ((== justCode) . fst) annotatedToks
+ -> do
+ lists <- closeLists 0
+ pure $ lists <>
+ B.codeBlock (mconcat $ map snd annotatedToks)
+ | all (T.all isSpace . snd) annotatedToks
+ -> closeLists 0
+ | otherwise -> do
+ lists <- closeLists 0
+ pure $ lists <>
+ B.para (B.trimInlines . trimFinalLineBreak . mconcat
+ $ map addFormatting annotatedToks)
+ if gInTable prop
+ then do
+ updateState $ \s -> s{ sCurrentCell = sCurrentCell s <> new }
+ pure bs
+ else do
+ pure $ bs <> tbl <> new
+
+-- Headers often have a style applied. We usually want to remove
+-- this, because headers will have their own styling in the target
+-- format.
+removeCommonFormatting :: [(Properties, Text)] -> [(Properties, Text)]
+removeCommonFormatting =
+ (\ts ->
+ if all (gBold . fst) ts
+ then map (\(p,t) -> (p{ gBold = False }, t)) ts
+ else ts) .
+ (\ts ->
+ if all (gItalic . fst) ts
+ then map (\(p,t) -> (p{ gItalic = False }, t)) ts
+ else ts)
+
+
+-- {\field{\*\fldinst{HYPERLINK "http://pandoc.org"}}{\fldrslt foo}}
+handleField :: PandocMonad m => Blocks -> [Tok] -> RTFParser m Blocks
+handleField bs
+ (Tok _
+ (Grouped
+ (Tok _ (ControlSymbol '*')
+ :Tok _ (ControlWord "fldinst" Nothing)
+ :Tok _ (Grouped (Tok _ (UnformattedText insttext):rest))
+ :_))
+ :linktoks)
+ | Just linkdest <- getHyperlink insttext
+ = do let linkdest' = case rest of
+ (Tok _ (ControlSymbol '\\')
+ : Tok _ (UnformattedText t)
+ : _) | Just bkmrk <- T.stripPrefix "l" t
+ -> "#" <> unquote bkmrk
+ _ -> linkdest
+ modifyGroup $ \g -> g{ gHyperlink = Just linkdest' }
+ result <- foldM processTok bs linktoks
+ modifyGroup $ \g -> g{ gHyperlink = Nothing }
+ return result
+handleField bs _ = pure bs
+
+unquote :: Text -> Text
+unquote = T.dropWhile (=='"') . T.dropWhileEnd (=='"') . T.strip
+
+handleListTable :: PandocMonad m => [Tok] -> RTFParser m ()
+handleListTable toks = do
+ mapM_ handleList toks
+
+handleList :: PandocMonad m => Tok -> RTFParser m ()
+handleList (Tok _ (Grouped (Tok _ (ControlWord "list" _) : toks))) = do
+ let listid = headDef 0 [n | Tok _ (ControlWord "listid" (Just n)) <- toks]
+ let levels = [ts | Tok _ (Grouped (Tok _ (ControlWord "listlevel" _) : ts))
+ <- toks]
+ tbl <- foldM handleListLevel mempty (zip [0..] levels)
+ updateState $ \s -> s{ sListTable = IntMap.insert listid tbl $ sListTable s }
+handleList _ = return ()
+
+handleListLevel :: PandocMonad m
+ => ListLevelTable
+ -> (Int, [Tok])
+ -> RTFParser m ListLevelTable
+handleListLevel levelTable (lvl, toks) = do
+ let start = headDef 1
+ [n | Tok _ (ControlWord "levelstartat" (Just n)) <- toks]
+ let mbNumberStyle =
+ case [n | Tok _ (ControlWord "levelnfc" (Just n)) <- toks] of
+ [] -> Nothing
+ (0:_) -> Just Decimal
+ (1:_) -> Just UpperRoman
+ (2:_) -> Just LowerRoman
+ (3:_) -> Just UpperAlpha
+ (4:_) -> Just LowerAlpha
+ (23:_) -> Nothing
+ (255:_) -> Nothing
+ _ -> Just DefaultStyle
+ let listType = case mbNumberStyle of
+ Nothing -> Bullet
+ Just numStyle -> Ordered (start,numStyle,Period)
+ return $ IntMap.insert lvl listType levelTable
+
+handleListOverrideTable :: PandocMonad m => [Tok] -> RTFParser m ()
+handleListOverrideTable toks = mapM_ handleListOverride toks
+
+handleListOverride :: PandocMonad m => Tok -> RTFParser m ()
+handleListOverride
+ (Tok _ (Grouped (Tok _ (ControlWord "listoverride" _) : toks))) = do
+ let listid = headDef 0 [n | Tok _ (ControlWord "listid" (Just n)) <- toks]
+ let lsn = headDef 0 [n | Tok _ (ControlWord "ls" (Just n)) <- toks]
+ -- TODO override stuff, esp. start num -- for now we just handle indirection
+ listTable <- sListTable <$> getState
+ case IntMap.lookup listid listTable of
+ Nothing -> return ()
+ Just tbl -> updateState $ \s ->
+ s{ sListOverrideTable = IntMap.insert lsn tbl $
+ sListOverrideTable s }
+handleListOverride _ = return ()
+
+handleStylesheet :: PandocMonad m => [Tok] -> RTFParser m ()
+handleStylesheet toks = do
+ let styles = mapMaybe parseStyle toks
+ updateState $ \s -> s{ sStylesheet = IntMap.fromList
+ $ zip (map styleNum styles) styles }
+
+parseStyle :: Tok -> Maybe Style
+parseStyle (Tok _ (Grouped toks)) = do
+ let (styType, styNum, rest) =
+ case toks of
+ Tok _ (ControlWord "s" (Just n)) : ts -> (ParagraphStyle, n, ts)
+ Tok _ (ControlWord "ds" (Just n)) : ts -> (SectionStyle, n, ts)
+ Tok _ (ControlWord "cs" (Just n)) : ts -> (CharStyle, n, ts)
+ Tok _ (ControlWord "ts" (Just n)) : ts -> (TableStyle, n, ts)
+ _ -> (ParagraphStyle, 0, toks)
+ let styName = case lastMay rest of
+ Just (Tok _ (UnformattedText t)) -> T.dropWhileEnd (==';') t
+ _ -> mempty
+ let isBasedOn (Tok _ (ControlWord "sbasedon" (Just _))) = True
+ isBasedOn _ = False
+ let styBasedOn = case find isBasedOn toks of
+ Just (Tok _ (ControlWord "sbasedon" (Just i))) -> Just i
+ _ -> Nothing
+ let isStyleControl (Tok _ (ControlWord x _)) =
+ x `elem` ["cs", "s", "ds", "additive", "sbasedon", "snext",
+ "sautoupd", "shidden", "keycode", "alt", "shift",
+ "ctrl", "fn"]
+ isStyleControl _ = False
+ let styFormatting = filter (not . isStyleControl) (initSafe rest)
+ return $ Style{ styleNum = styNum
+ , styleType = styType
+ , styleBasedOn = styBasedOn
+ , styleName = styName
+ , styleFormatting = styFormatting
+ }
+parseStyle _ = Nothing
+
+hexToWord :: Text -> Word8
+hexToWord t = case TR.hexadecimal t of
+ Left _ -> 0
+ Right (x,_) -> x
+
+
+handlePict :: PandocMonad m => [Tok] -> RTFParser m ()
+handlePict toks = do
+ let pict = foldl' getPictData def toks
+ let altText = "image"
+ let bytes =
+ if picBinary pict
+ then picBytes pict
+ else BL.pack $ map hexToWord $ T.chunksOf 2 $ picData pict
+ let (mimetype, ext) =
+ case picType pict of
+ Just Emfblip -> (Just "image/x-emf", ".emf")
+ Just Pngblip -> (Just "image/png", ".png")
+ Just Jpegblip -> (Just "image/jpeg", ".jpg")
+ Nothing -> (Nothing, "")
+ case mimetype of
+ Just mt -> do
+ let pictname = showDigest (sha1 bytes) <> ext
+ insertMedia pictname (Just mt) bytes
+ modifyGroup $ \g -> g{ gImage = Just pict{ picName = T.pack pictname,
+ picBytes = bytes } }
+ addText altText
+ modifyGroup $ \g -> g{ gImage = Nothing }
+ _ -> return ()
+ where
+ getPictData :: Pict -> Tok -> Pict
+ getPictData pict (Tok _ tok') =
+ case tok' of
+ ControlWord "emfblip" _-> pict{ picType = Just Emfblip }
+ ControlWord "pngblip" _-> pict{ picType = Just Pngblip }
+ ControlWord "jpegblip" _-> pict{ picType = Just Jpegblip }
+ ControlWord "picw" (Just w) -> pict{ picWidth = Just w }
+ ControlWord "pich" (Just h) -> pict{ picHeight = Just h }
+ ControlWord "picwgoal" (Just w) -> pict{ picWidthGoal = Just w }
+ ControlWord "pichgoal" (Just h) -> pict{ picHeightGoal = Just h }
+ BinData d | not (BL.null d)
+ -> pict{ picBinary = True, picBytes = picBytes pict <> d }
+ UnformattedText t -> pict{ picData = t }
+ _ -> pict
+
+
+getHyperlink :: Text -> Maybe Text
+getHyperlink t =
+ case T.stripPrefix "HYPERLINK" (T.strip t) of
+ Nothing -> Nothing
+ Just rest -> Just $ unquote rest
+
+processFontTable :: [Tok] -> FontTable
+processFontTable = snd . foldl' go (0, mempty)
+ where
+ go (fontnum, tbl) (Tok _ tok') =
+ case tok' of
+ (ControlWord "f" (Just i)) -> (i, tbl)
+ (ControlWord "fnil" _) -> (fontnum, tbl)
+ (ControlWord "froman" _) -> (fontnum, IntMap.insert fontnum Roman tbl)
+ (ControlWord "fswiss" _) -> (fontnum, IntMap.insert fontnum Swiss tbl)
+ (ControlWord "fmodern" _) -> (fontnum, IntMap.insert fontnum Modern tbl)
+ (ControlWord "fscript" _) -> (fontnum, IntMap.insert fontnum Script tbl)
+ (ControlWord "fdecor" _) -> (fontnum, IntMap.insert fontnum Decor tbl)
+ (ControlWord "ftech" _) -> (fontnum, IntMap.insert fontnum Tech tbl)
+ (ControlWord "fbidi" _) -> (fontnum, IntMap.insert fontnum Bidi tbl)
+ (Grouped ts) -> foldl' go (fontnum, tbl) ts
+ _ -> (fontnum, tbl)
+
+
+ansiToChar :: Word8 -> Char
+ansiToChar i = chr $
+ case i of
+ 128 -> 8364
+ 130 -> 8218
+ 131 -> 402
+ 132 -> 8222
+ 133 -> 8230
+ 134 -> 8224
+ 135 -> 8225
+ 136 -> 710
+ 137 -> 8240
+ 138 -> 352
+ 139 -> 8249
+ 140 -> 338
+ 142 -> 381
+ 145 -> 8216
+ 146 -> 8217
+ 147 -> 8220
+ 148 -> 8221
+ 149 -> 8226
+ 150 -> 8211
+ 151 -> 8212
+ 152 -> 732
+ 153 -> 8482
+ 154 -> 353
+ 155 -> 8250
+ 156 -> 339
+ 158 -> 382
+ 159 -> 376
+ 173 -> 0xAD
+ _ -> fromIntegral i
+
+macToChar :: Word8 -> Char
+macToChar i = chr $
+ case i of
+ 0x80 -> 0xC4
+ 0x81 -> 0xC5
+ 0x82 -> 0xC7
+ 0x83 -> 0xC9
+ 0x84 -> 0xD1
+ 0x85 -> 0xD6
+ 0x86 -> 0xDC
+ 0x87 -> 0xE1
+ 0x88 -> 0xE0
+ 0x89 -> 0xE2
+ 0x8A -> 0xE4
+ 0x8B -> 0xE3
+ 0x8C -> 0xE5
+ 0x8D -> 0xE7
+ 0x8E -> 0xE9
+ 0x8F -> 0xE8
+ 0x90 -> 0xEA
+ 0x91 -> 0xEB
+ 0x92 -> 0xED
+ 0x93 -> 0xEC
+ 0x94 -> 0xEE
+ 0x95 -> 0xEF
+ 0x96 -> 0xF1
+ 0x97 -> 0xF3
+ 0x98 -> 0xF2
+ 0x99 -> 0xF4
+ 0x9A -> 0xF6
+ 0x9B -> 0xF5
+ 0x9C -> 0xFA
+ 0x9D -> 0xF9
+ 0x9E -> 0xFB
+ 0x9F -> 0xFC
+ 0xA0 -> 0xDD
+ 0xA1 -> 0xB0
+ 0xA2 -> 0xA2
+ 0xA3 -> 0xA3
+ 0xA4 -> 0xA7
+ 0xA5 -> 0xD7
+ 0xA6 -> 0xB6
+ 0xA7 -> 0xDF
+ 0xA8 -> 0xAE
+ 0xA9 -> 0xA9
+ 0xAA -> 0xB2
+ 0xAB -> 0xB4
+ 0xAC -> 0xA8
+ 0xAD -> 0xB3
+ 0xAE -> 0xC6
+ 0xAF -> 0xD8
+ 0xB0 -> 0xB9
+ 0xB1 -> 0xB1
+ 0xB2 -> 0xBC
+ 0xB3 -> 0xBD
+ 0xB4 -> 0xA5
+ 0xB5 -> 0xB5
+ 0xBA -> 0xBE
+ 0xBB -> 0xAA
+ 0xBC -> 0xBA
+ 0xBE -> 0xE6
+ 0xBF -> 0xF8
+ 0xC0 -> 0xBF
+ 0xC1 -> 0xA1
+ 0xC2 -> 0xAC
+ 0xC3 -> 0x0141
+ 0xC4 -> 0x0192
+ 0xC5 -> 0x02CB
+ 0xC7 -> 0xAB
+ 0xC8 -> 0xBB
+ 0xC9 -> 0xA6
+ 0xCA -> 0xA0
+ 0xCB -> 0xC0
+ 0xCC -> 0xC3
+ 0xCD -> 0xD5
+ 0xCE -> 0x0152
+ 0xCF -> 0x0153
+ 0xD0 -> 0xAD
+ 0xD4 -> 0x0142
+ 0xD6 -> 0xF7
+ 0xD8 -> 0xFF
+ 0xD9 -> 0x0178
+ 0xDB -> 0xA4
+ 0xDC -> 0xD0
+ 0xDD -> 0xF0
+ 0xDE -> 0xDE
+ 0xDF -> 0xFE
+ 0xE0 -> 0xFD
+ 0xE1 -> 0xB7
+ 0xE5 -> 0xC2
+ 0xE6 -> 0xCA
+ 0xE7 -> 0xC1
+ 0xE8 -> 0xCB
+ 0xE9 -> 0xC8
+ 0xEA -> 0xCD
+ 0xEB -> 0xCE
+ 0xEC -> 0xCF
+ 0xED -> 0xCC
+ 0xEE -> 0xD3
+ 0xEF -> 0xD4
+ 0xF1 -> 0xD2
+ 0xF2 -> 0xDA
+ 0xF3 -> 0xDB
+ 0xF4 -> 0xD9
+ 0xF5 -> 0x0131
+ 0xF6 -> 0x02C6
+ 0xF7 -> 0x02DC
+ 0xF8 -> 0xAF
+ 0xF9 -> 0x02D8
+ 0xFA -> 0x02D9
+ 0xFB -> 0x02DA
+ 0xFC -> 0xB8
+ 0xFD -> 0x02DD
+ 0xFE -> 0x02DB
+ 0xFF -> 0x02C7
+ _ -> fromIntegral i
+
+pcToChar :: Word8 -> Char
+pcToChar i = chr $
+ case i of
+ 0x80 -> 0xc7
+ 0x81 -> 0xfc
+ 0x82 -> 0xe9
+ 0x83 -> 0xe2
+ 0x84 -> 0xe4
+ 0x85 -> 0xe0
+ 0x86 -> 0xe5
+ 0x87 -> 0xe7
+ 0x88 -> 0xea
+ 0x89 -> 0xeb
+ 0x8a -> 0xe8
+ 0x8b -> 0xef
+ 0x8c -> 0xee
+ 0x8d -> 0xec
+ 0x8e -> 0xc4
+ 0x8f -> 0xc5
+ 0x90 -> 0xc9
+ 0x91 -> 0xe6
+ 0x92 -> 0xc6
+ 0x93 -> 0xf4
+ 0x94 -> 0xf6
+ 0x95 -> 0xf2
+ 0x96 -> 0xfb
+ 0x97 -> 0xf9
+ 0x98 -> 0xff
+ 0x99 -> 0xd6
+ 0x9a -> 0xdc
+ 0x9b -> 0xa2
+ 0x9c -> 0xa3
+ 0x9d -> 0xa5
+ 0x9e -> 0x20a7
+ 0x9f -> 0x0192
+ 0xa0 -> 0xe1
+ 0xa1 -> 0xed
+ 0xa2 -> 0xf3
+ 0xa3 -> 0xfa
+ 0xa4 -> 0xf1
+ 0xa5 -> 0xd1
+ 0xa6 -> 0xaa
+ 0xa7 -> 0xba
+ 0xa8 -> 0xbf
+ 0xa9 -> 0x2310
+ 0xaa -> 0xac
+ 0xab -> 0xbd
+ 0xac -> 0xbc
+ 0xad -> 0xa1
+ 0xae -> 0xab
+ 0xaf -> 0xbb
+ 0xb0 -> 0x2591
+ 0xb1 -> 0x2592
+ 0xb2 -> 0x2593
+ 0xb3 -> 0x2502
+ 0xb4 -> 0x2524
+ 0xb5 -> 0x2561
+ 0xb6 -> 0x2562
+ 0xb7 -> 0x2556
+ 0xb8 -> 0x2555
+ 0xb9 -> 0x2563
+ 0xba -> 0x2551
+ 0xbb -> 0x2557
+ 0xbc -> 0x255d
+ 0xbd -> 0x255c
+ 0xbe -> 0x255b
+ 0xbf -> 0x2510
+ 0xc0 -> 0x2514
+ 0xc1 -> 0x2534
+ 0xc2 -> 0x252c
+ 0xc3 -> 0x251c
+ 0xc4 -> 0x2500
+ 0xc5 -> 0x253c
+ 0xc6 -> 0x255e
+ 0xc7 -> 0x255f
+ 0xc8 -> 0x255a
+ 0xc9 -> 0x2554
+ 0xca -> 0x2569
+ 0xcb -> 0x2566
+ 0xcc -> 0x2560
+ 0xcd -> 0x2550
+ 0xce -> 0x256c
+ 0xcf -> 0x2567
+ 0xd0 -> 0x2568
+ 0xd1 -> 0x2564
+ 0xd2 -> 0x2565
+ 0xd3 -> 0x2559
+ 0xd4 -> 0x2558
+ 0xd5 -> 0x2552
+ 0xd6 -> 0x2553
+ 0xd7 -> 0x256b
+ 0xd8 -> 0x256a
+ 0xd9 -> 0x2518
+ 0xda -> 0x250c
+ 0xdb -> 0x2588
+ 0xdc -> 0x2584
+ 0xdd -> 0x258c
+ 0xde -> 0x2590
+ 0xdf -> 0x2580
+ 0xe0 -> 0x03b1
+ 0xe1 -> 0xdf
+ 0xe2 -> 0x0393
+ 0xe3 -> 0x03c0
+ 0xe4 -> 0x03a3
+ 0xe5 -> 0x03c3
+ 0xe6 -> 0xb5
+ 0xe7 -> 0x03c4
+ 0xe8 -> 0x03a6
+ 0xe9 -> 0x0398
+ 0xea -> 0x03a9
+ 0xeb -> 0x03b4
+ 0xec -> 0x221e
+ 0xed -> 0x03c6
+ 0xee -> 0x03b5
+ 0xef -> 0x2229
+ 0xf0 -> 0x2261
+ 0xf1 -> 0xb1
+ 0xf2 -> 0x2265
+ 0xf3 -> 0x2264
+ 0xf4 -> 0x2320
+ 0xf5 -> 0x2321
+ 0xf6 -> 0xf7
+ 0xf7 -> 0x2248
+ 0xf8 -> 0xb0
+ 0xf9 -> 0x2219
+ 0xfa -> 0xb7
+ 0xfb -> 0x221a
+ 0xfc -> 0x207f
+ 0xfd -> 0xb2
+ 0xfe -> 0x25a0
+ 0xff -> 0xa0
+ _ -> fromIntegral i
+
+pcaToChar :: Word8 -> Char
+pcaToChar i = chr $
+ case i of
+ 0x80 -> 0x00c7
+ 0x81 -> 0x00fc
+ 0x82 -> 0x00e9
+ 0x83 -> 0x00e2
+ 0x84 -> 0x00e4
+ 0x85 -> 0x00e0
+ 0x86 -> 0x00e5
+ 0x87 -> 0x00e7
+ 0x88 -> 0x00ea
+ 0x89 -> 0x00eb
+ 0x8a -> 0x00e8
+ 0x8b -> 0x00ef
+ 0x8c -> 0x00ee
+ 0x8d -> 0x00ec
+ 0x8e -> 0x00c4
+ 0x8f -> 0x00c5
+ 0x90 -> 0x00c9
+ 0x91 -> 0x00e6
+ 0x92 -> 0x00c6
+ 0x93 -> 0x00f4
+ 0x94 -> 0x00f6
+ 0x95 -> 0x00f2
+ 0x96 -> 0x00fb
+ 0x97 -> 0x00f9
+ 0x98 -> 0x00ff
+ 0x99 -> 0x00d6
+ 0x9a -> 0x00dc
+ 0x9b -> 0x00f8
+ 0x9c -> 0x00a3
+ 0x9d -> 0x00d8
+ 0x9e -> 0x00d7
+ 0x9f -> 0x0192
+ 0xa0 -> 0x00e1
+ 0xa1 -> 0x00ed
+ 0xa2 -> 0x00f3
+ 0xa3 -> 0x00fa
+ 0xa4 -> 0x00f1
+ 0xa5 -> 0x00d1
+ 0xa6 -> 0x00aa
+ 0xa7 -> 0x00ba
+ 0xa8 -> 0x00bf
+ 0xa9 -> 0x00ae
+ 0xaa -> 0x00ac
+ 0xab -> 0x00bd
+ 0xac -> 0x00bc
+ 0xad -> 0x00a1
+ 0xae -> 0x00ab
+ 0xaf -> 0x00bb
+ 0xb0 -> 0x2591
+ 0xb1 -> 0x2592
+ 0xb2 -> 0x2593
+ 0xb3 -> 0x2502
+ 0xb4 -> 0x2524
+ 0xb5 -> 0x00c1
+ 0xb6 -> 0x00c2
+ 0xb7 -> 0x00c0
+ 0xb8 -> 0x00a9
+ 0xb9 -> 0x2563
+ 0xba -> 0x2551
+ 0xbb -> 0x2557
+ 0xbc -> 0x255d
+ 0xbd -> 0x00a2
+ 0xbe -> 0x00a5
+ 0xbf -> 0x2510
+ 0xc0 -> 0x2514
+ 0xc1 -> 0x2534
+ 0xc2 -> 0x252c
+ 0xc3 -> 0x251c
+ 0xc4 -> 0x2500
+ 0xc5 -> 0x253c
+ 0xc6 -> 0x00e3
+ 0xc7 -> 0x00c3
+ 0xc8 -> 0x255a
+ 0xc9 -> 0x2554
+ 0xca -> 0x2569
+ 0xcb -> 0x2566
+ 0xcc -> 0x2560
+ 0xcd -> 0x2550
+ 0xce -> 0x256c
+ 0xcf -> 0x00a4
+ 0xd0 -> 0x00f0
+ 0xd1 -> 0x00d0
+ 0xd2 -> 0x00ca
+ 0xd3 -> 0x00cb
+ 0xd4 -> 0x00c8
+ 0xd5 -> 0x0131
+ 0xd6 -> 0x00cd
+ 0xd7 -> 0x00ce
+ 0xd8 -> 0x00cf
+ 0xd9 -> 0x2518
+ 0xda -> 0x250c
+ 0xdb -> 0x2588
+ 0xdc -> 0x2584
+ 0xdd -> 0x00a6
+ 0xde -> 0x00cc
+ 0xdf -> 0x2580
+ 0xe0 -> 0x00d3
+ 0xe1 -> 0x00df
+ 0xe2 -> 0x00d4
+ 0xe3 -> 0x00d2
+ 0xe4 -> 0x00f5
+ 0xe5 -> 0x00d5
+ 0xe6 -> 0x00b5
+ 0xe7 -> 0x00fe
+ 0xe8 -> 0x00de
+ 0xe9 -> 0x00da
+ 0xea -> 0x00db
+ 0xeb -> 0x00d9
+ 0xec -> 0x00fd
+ 0xed -> 0x00dd
+ 0xee -> 0x00af
+ 0xef -> 0x00b4
+ 0xf0 -> 0x00ad
+ 0xf1 -> 0x00b1
+ 0xf2 -> 0x2017
+ 0xf3 -> 0x00be
+ 0xf4 -> 0x00b6
+ 0xf5 -> 0x00a7
+ 0xf6 -> 0x00f7
+ 0xf7 -> 0x00b8
+ 0xf8 -> 0x00b0
+ 0xf9 -> 0x00a8
+ 0xfa -> 0x00b7
+ 0xfb -> 0x00b9
+ 0xfc -> 0x00b3
+ 0xfd -> 0x00b2
+ 0xfe -> 0x25a0
+ 0xff -> 0x00a0
+ _ -> fromIntegral i
diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs
index 3bbab4bbe..bd73c37dc 100644
--- a/src/Text/Pandoc/SelfContained.hs
+++ b/src/Text/Pandoc/SelfContained.hs
@@ -60,18 +60,6 @@ convertTags :: PandocMonad m => [Tag T.Text] -> m [Tag T.Text]
convertTags [] = return []
convertTags (t@TagOpen{}:ts)
| fromAttrib "data-external" t == "1" = (t:) <$> convertTags ts
-convertTags (t@(TagOpen tagname as):ts)
- | any (isSourceAttribute tagname) as
- = do
- as' <- mapM processAttribute as
- rest <- convertTags ts
- return $ TagOpen tagname as' : rest
- where processAttribute (x,y) =
- if isSourceAttribute tagname (x,y)
- then do
- enc <- getDataURI (fromAttrib "type" t) y
- return (x, enc)
- else return (x,y)
convertTags (t@(TagOpen "script" as):TagClose "script":ts) =
case fromAttrib "src" t of
"" -> (t:) <$> convertTags ts
@@ -125,6 +113,18 @@ convertTags (t@(TagOpen "link" as):ts) =
return $ TagOpen "link"
(("href",makeDataURI (mime, bs)) :
[(x,y) | (x,y) <- as, x /= "href"]) : rest
+convertTags (t@(TagOpen tagname as):ts)
+ | any (isSourceAttribute tagname) as
+ = do
+ as' <- mapM processAttribute as
+ rest <- convertTags ts
+ return $ TagOpen tagname as' : rest
+ where processAttribute (x,y) =
+ if isSourceAttribute tagname (x,y)
+ then do
+ enc <- getDataURI (fromAttrib "type" t) y
+ return (x, enc)
+ else return (x,y)
convertTags (t:ts) = (t:) <$> convertTags ts
cssURLs :: PandocMonad m
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 920edca7b..50abe6937 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -25,6 +25,7 @@ module Text.Pandoc.Shared (
ordNub,
findM,
-- * Text processing
+ inquotes,
tshow,
elemText,
notElemText,
@@ -68,7 +69,6 @@ module Text.Pandoc.Shared (
makeMeta,
eastAsianLineBreakFilter,
htmlSpanLikeElements,
- splitSentences,
filterIpynbOutput,
-- * TagSoup HTML handling
renderTags',
@@ -187,6 +187,10 @@ findM p = foldr go (pure Nothing)
-- Text processing
--
+-- | Wrap double quotes around a Text
+inquotes :: T.Text -> T.Text
+inquotes txt = T.cons '\"' (T.snoc txt '\"')
+
tshow :: Show a => a -> T.Text
tshow = T.pack . show
@@ -709,33 +713,6 @@ eastAsianLineBreakFilter = bottomUp go
htmlSpanLikeElements :: Set.Set T.Text
htmlSpanLikeElements = Set.fromList ["kbd", "mark", "dfn"]
--- | Returns the first sentence in a list of inlines, and the rest.
-breakSentence :: [Inline] -> ([Inline], [Inline])
-breakSentence [] = ([],[])
-breakSentence xs =
- let isSentenceEndInline (Str ys)
- | Just (_, c) <- T.unsnoc ys = c == '.' || c == '?'
- isSentenceEndInline LineBreak = True
- isSentenceEndInline _ = False
- (as, bs) = break isSentenceEndInline xs
- in case bs of
- [] -> (as, [])
- [c] -> (as ++ [c], [])
- (c:Space:cs) -> (as ++ [c], cs)
- (c:SoftBreak:cs) -> (as ++ [c], cs)
- (Str ".":Str s@(T.uncons -> Just (')',_)):cs)
- -> (as ++ [Str ".", Str s], cs)
- (x@(Str (T.stripPrefix ".)" -> Just _)):cs) -> (as ++ [x], cs)
- (LineBreak:x@(Str (T.uncons -> Just ('.',_))):cs) -> (as ++[LineBreak], x:cs)
- (c:cs) -> (as ++ [c] ++ ds, es)
- where (ds, es) = breakSentence cs
-
--- | Split a list of inlines into sentences.
-splitSentences :: [Inline] -> [[Inline]]
-splitSentences xs =
- let (sent, rest) = breakSentence xs
- in if null rest then [sent] else sent : splitSentences rest
-
-- | Process ipynb output cells. If mode is Nothing,
-- remove all output. If mode is Just format, select
-- best output for the format. If format is not ipynb,
@@ -755,17 +732,17 @@ filterIpynbOutput mode = walk go
where
rank (RawBlock (Format "html") _)
| fmt == Format "html" = 1 :: Int
- | fmt == Format "markdown" = 2
- | otherwise = 3
+ | fmt == Format "markdown" = 3
+ | otherwise = 4
rank (RawBlock (Format "latex") _)
| fmt == Format "latex" = 1
- | fmt == Format "markdown" = 2
- | otherwise = 3
+ | fmt == Format "markdown" = 3
+ | otherwise = 4
rank (RawBlock f _)
| fmt == f = 1
- | otherwise = 3
- rank (Para [Image{}]) = 1
- rank _ = 2
+ | otherwise = 4
+ rank (Para [Image{}]) = 2
+ rank _ = 3
removeANSI (CodeBlock attr code) =
CodeBlock attr (removeANSIEscapes code)
removeANSI x = x
diff --git a/src/Text/Pandoc/Translations.hs b/src/Text/Pandoc/Translations.hs
index 0c7d7ab23..b0476a0ab 100644
--- a/src/Text/Pandoc/Translations.hs
+++ b/src/Text/Pandoc/Translations.hs
@@ -31,13 +31,13 @@ module Text.Pandoc.Translations (
where
import Data.Aeson.Types (Value(..), FromJSON(..))
import qualified Data.Aeson.Types as Aeson
-import qualified Data.HashMap.Strict as HM
import qualified Data.Map as M
import qualified Data.Text as T
-import qualified Data.YAML as YAML
+import qualified Data.Yaml as Yaml
import GHC.Generics (Generic)
import Text.Pandoc.Shared (safeRead)
import qualified Text.Pandoc.UTF8 as UTF8
+import Data.Yaml (prettyPrintParseException)
data Term =
Abstract
@@ -74,17 +74,9 @@ instance FromJSON Term where
show t
parseJSON invalid = Aeson.typeMismatch "Term" invalid
-instance YAML.FromYAML Term where
- parseYAML (YAML.Scalar _ (YAML.SStr t)) =
- case safeRead t of
- Just t' -> pure t'
- Nothing -> Prelude.fail $ "Invalid Term name " ++
- show t
- parseYAML invalid = YAML.typeMismatch "Term" invalid
-
instance FromJSON Translations where
- parseJSON (Object hm) = do
- xs <- mapM addItem (HM.toList hm)
+ parseJSON o@(Object{}) = do
+ xs <- parseJSON o >>= mapM addItem . M.toList
return $ Translations (M.fromList xs)
where addItem (k,v) =
case safeRead k of
@@ -95,27 +87,12 @@ instance FromJSON Translations where
inv -> Aeson.typeMismatch "String" inv
parseJSON invalid = Aeson.typeMismatch "Translations" invalid
-instance YAML.FromYAML Translations where
- parseYAML = YAML.withMap "Translations" $
- \tr -> Translations .M.fromList <$> mapM addItem (M.toList tr)
- where addItem (n@(YAML.Scalar _ (YAML.SStr k)), v) =
- case safeRead k of
- Nothing -> YAML.typeMismatch "Term" n
- Just t ->
- case v of
- (YAML.Scalar _ (YAML.SStr s)) ->
- return (t, T.strip s)
- n' -> YAML.typeMismatch "String" n'
- addItem (n, _) = YAML.typeMismatch "String" n
-
lookupTerm :: Term -> Translations -> Maybe T.Text
lookupTerm t (Translations tm) = M.lookup t tm
readTranslations :: T.Text -> Either T.Text Translations
readTranslations s =
- case YAML.decodeStrict $ UTF8.fromText s of
- Left (pos,err') -> Left $ T.pack $ err' ++
- " (line " ++ show (YAML.posLine pos) ++ " column " ++
- show (YAML.posColumn pos) ++ ")"
+ case Yaml.decodeAllEither' $ UTF8.fromText s of
+ Left err' -> Left $ T.pack $ prettyPrintParseException err'
Right (t:_) -> Right t
Right [] -> Left "empty YAML document"
diff --git a/src/Text/Pandoc/UTF8.hs b/src/Text/Pandoc/UTF8.hs
index 4d5921faf..e154f0535 100644
--- a/src/Text/Pandoc/UTF8.hs
+++ b/src/Text/Pandoc/UTF8.hs
@@ -96,7 +96,7 @@ hGetContents :: Handle -> IO Text
hGetContents = fmap toText . B.hGetContents
-- | Convert UTF8-encoded ByteString to Text, also
--- removing '\r' characters.
+-- removing '\\r' characters.
toText :: B.ByteString -> Text
toText = T.decodeUtf8 . filterCRs . dropBOM
where dropBOM bs =
@@ -106,12 +106,12 @@ toText = T.decodeUtf8 . filterCRs . dropBOM
filterCRs = B.filter (/='\r')
-- | Convert UTF8-encoded ByteString to String, also
--- removing '\r' characters.
+-- removing '\\r' characters.
toString :: B.ByteString -> String
toString = T.unpack . toText
-- | Convert UTF8-encoded ByteString to Text, also
--- removing '\r' characters.
+-- removing '\\r' characters.
toTextLazy :: BL.ByteString -> TL.Text
toTextLazy = TL.decodeUtf8 . filterCRs . dropBOM
where dropBOM bs =
@@ -121,7 +121,7 @@ toTextLazy = TL.decodeUtf8 . filterCRs . dropBOM
filterCRs = BL.filter (/='\r')
-- | Convert UTF8-encoded ByteString to String, also
--- removing '\r' characters.
+-- removing '\\r' characters.
toStringLazy :: BL.ByteString -> String
toStringLazy = TL.unpack . toTextLazy
diff --git a/src/Text/Pandoc/Writers.hs b/src/Text/Pandoc/Writers.hs
index c348477c2..960b9074c 100644
--- a/src/Text/Pandoc/Writers.hs
+++ b/src/Text/Pandoc/Writers.hs
@@ -51,6 +51,7 @@ module Text.Pandoc.Writers
, writeLaTeX
, writeMan
, writeMarkdown
+ , writeMarkua
, writeMediaWiki
, writeMs
, writeMuse
@@ -190,6 +191,7 @@ writers = [
,("csljson" , TextWriter writeCslJson)
,("bibtex" , TextWriter writeBibTeX)
,("biblatex" , TextWriter writeBibLaTeX)
+ ,("markua" , TextWriter writeMarkua)
]
-- | Retrieve writer, extensions based on formatSpec (format+extensions).
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs
index ab7e5f1a9..24438370a 100644
--- a/src/Text/Pandoc/Writers/AsciiDoc.hs
+++ b/src/Text/Pandoc/Writers/AsciiDoc.hs
@@ -21,7 +21,7 @@ AsciiDoc: <http://www.methods.co.nz/asciidoc/>
module Text.Pandoc.Writers.AsciiDoc (writeAsciiDoc, writeAsciiDoctor) where
import Control.Monad.State.Strict
import Data.Char (isPunctuation, isSpace)
-import Data.List (intercalate, intersperse)
+import Data.List (delete, intercalate, intersperse)
import Data.List.NonEmpty (NonEmpty(..))
import Data.Maybe (fromMaybe, isJust)
import qualified Data.Set as Set
@@ -149,9 +149,8 @@ blockToAsciiDoc opts (Div (id',"section":_,_)
blockToAsciiDoc opts (Plain inlines) = do
contents <- inlineListToAsciiDoc opts inlines
return $ contents <> blankline
-blockToAsciiDoc opts (Para [Image attr alternate (src,tgt)])
+blockToAsciiDoc opts (SimpleFigure attr alternate (src, tit))
-- image::images/logo.png[Company logo, title="blah"]
- | Just tit <- T.stripPrefix "fig:" tgt
= (\args -> "image::" <> args <> blankline) <$>
imageArguments opts attr alternate src tit
blockToAsciiDoc opts (Para inlines) = do
@@ -193,7 +192,10 @@ blockToAsciiDoc _ (CodeBlock (_,classes,_) str) = return $ flush (
then "...." $$ literal str $$ "...."
else attrs $$ "----" $$ literal str $$ "----")
<> blankline
- where attrs = "[" <> literal (T.intercalate "," ("source" : classes)) <> "]"
+ where attrs = "[" <> literal (T.intercalate "," classes') <> "]"
+ classes' = if "numberLines" `elem` classes
+ then "source%linesnum" : delete "numberLines" classes
+ else "source" : classes
blockToAsciiDoc opts (BlockQuote blocks) = do
contents <- blockListToAsciiDoc opts blocks
let isBlock (BlockQuote _) = True
@@ -546,6 +548,7 @@ inlineToAsciiDoc opts (Link _ txt (src, _tit)) = do
-- or my@email.com[email john]
linktext <- inlineListToAsciiDoc opts txt
let isRelative = T.all (/= ':') src
+ let needsPassthrough = "--" `T.isInfixOf` src
let prefix = if isRelative
then text "link:"
else empty
@@ -553,9 +556,16 @@ inlineToAsciiDoc opts (Link _ txt (src, _tit)) = do
let useAuto = case txt of
[Str s] | escapeURI s == srcSuffix -> True
_ -> False
- return $ if useAuto
- then literal srcSuffix
- else prefix <> literal src <> "[" <> linktext <> "]"
+ return $
+ if needsPassthrough
+ then
+ if useAuto
+ then "link:++" <> literal srcSuffix <> "++[]"
+ else "link:++" <> literal src <> "++[" <> linktext <> "]"
+ else
+ if useAuto
+ then literal srcSuffix
+ else prefix <> literal src <> "[" <> linktext <> "]"
inlineToAsciiDoc opts (Image attr alternate (src, tit)) =
("image:" <>) <$> imageArguments opts attr alternate src tit
inlineToAsciiDoc opts (Note [Para inlines]) =
diff --git a/src/Text/Pandoc/Writers/Blaze.hs b/src/Text/Pandoc/Writers/Blaze.hs
new file mode 100644
index 000000000..0e3bd0f98
--- /dev/null
+++ b/src/Text/Pandoc/Writers/Blaze.hs
@@ -0,0 +1,139 @@
+{-# LANGUAGE OverloadedStrings #-}
+{- |
+ Module : Text.Pandoc.Writers.Shared
+ Copyright : Copyright (C) 2021 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : John MacFarlane <jgm@berkeley.edu>
+ Stability : alpha
+ Portability : portable
+
+Render blaze-html Html to DocLayout document (so it can be wrapped).
+-}
+module Text.Pandoc.Writers.Blaze ( layoutMarkup )
+where
+import Text.Blaze
+import qualified Data.ByteString as S
+import Data.List (isInfixOf)
+import Data.Text.Encoding (decodeUtf8)
+import qualified Data.Text as T
+import Data.Text (Text)
+import Text.DocLayout hiding (Text, Empty)
+import Text.Blaze.Internal (ChoiceString(..), getText, MarkupM(..))
+
+layoutMarkup :: Markup -> Doc T.Text
+layoutMarkup = go True mempty
+ where
+ go :: Bool -> Doc T.Text -> MarkupM b -> Doc T.Text
+ go wrap attrs (Parent _ open close content) =
+ let open' = getText open
+ in literal open'
+ <> attrs
+ <> char '>'
+ <> (if allowsWrap open'
+ then go wrap mempty content
+ else flush $ go False mempty content)
+ <> literal (getText close)
+ go wrap attrs (CustomParent tag content) =
+ char '<'
+ <> fromChoiceString wrap tag
+ <> attrs
+ <> char '>'
+ <> go wrap mempty content
+ <> literal "</"
+ <> fromChoiceString wrap tag
+ <> char '>'
+ go _wrap attrs (Leaf _ begin end _) =
+ literal (getText begin)
+ <> attrs
+ <> literal (getText end)
+ go wrap attrs (CustomLeaf tag close _) =
+ char '<'
+ <> fromChoiceString wrap tag
+ <> attrs
+ <> (if close then literal " />" else char '>')
+ go wrap attrs (AddAttribute rawkey _ value h) =
+ go wrap
+ (space' wrap
+ <> literal (getText rawkey)
+ <> char '='
+ <> doubleQuotes (fromChoiceString wrap value)
+ <> attrs) h
+ go wrap attrs (AddCustomAttribute key value h) =
+ go wrap
+ (space' wrap
+ <> fromChoiceString wrap key
+ <> char '='
+ <> doubleQuotes (fromChoiceString wrap value)
+ <> attrs) h
+ go wrap _ (Content content _) = fromChoiceString wrap content
+ go wrap _ (Comment comment _) =
+ literal "<!--"
+ <> space' wrap
+ <> fromChoiceString wrap comment
+ <> space' wrap
+ <> "-->"
+ go wrap attrs (Append h1 h2) = go wrap attrs h1 <> go wrap attrs h2
+ go _ _ (Empty _) = mempty
+ space' wrap = if wrap then space else char ' '
+
+allowsWrap :: T.Text -> Bool
+allowsWrap t =
+ not (t == "<pre" || t == "<style" || t == "<script" || t == "<textarea")
+
+fromChoiceString :: Bool -- ^ Allow wrapping
+ -> ChoiceString -- ^ String to render
+ -> Doc Text -- ^ Resulting builder
+fromChoiceString wrap (Static s) = withWrap wrap $ getText s
+fromChoiceString wrap (String s) = withWrap wrap $
+ escapeMarkupEntities $ T.pack s
+fromChoiceString wrap (Text s) = withWrap wrap $ escapeMarkupEntities s
+fromChoiceString wrap (ByteString s) = withWrap wrap $ decodeUtf8 s
+fromChoiceString _wrap (PreEscaped x) = -- don't wrap!
+ case x of
+ String s -> literal $ T.pack s
+ Text s -> literal s
+ s -> fromChoiceString False s
+fromChoiceString wrap (External x) = case x of
+ -- Check that the sequence "</" is *not* in the external data.
+ String s -> if "</" `isInfixOf` s then mempty else withWrap wrap (T.pack s)
+ Text s -> if "</" `T.isInfixOf` s then mempty else withWrap wrap s
+ ByteString s -> if "</" `S.isInfixOf` s then mempty else withWrap wrap (decodeUtf8 s)
+ s -> fromChoiceString wrap s
+fromChoiceString wrap (AppendChoiceString x y) =
+ fromChoiceString wrap x <> fromChoiceString wrap y
+fromChoiceString _ EmptyChoiceString = mempty
+
+withWrap :: Bool -> Text -> Doc Text
+withWrap wrap
+ | wrap = mconcat . toChunks
+ | otherwise = literal
+
+toChunks :: Text -> [Doc Text]
+toChunks = map toDoc . T.groupBy sameStatus
+ where
+ toDoc t =
+ if T.any (== ' ') t
+ then space
+ else if T.any (== '\n') t
+ then cr
+ else literal t
+ sameStatus c d =
+ (c == ' ' && d == ' ') ||
+ (c == '\n' && d == '\n') ||
+ (c /= ' ' && d /= ' ' && c /= '\n' && d /= '\n')
+
+
+-- | Escape predefined XML entities in a text value
+--
+escapeMarkupEntities :: Text -- ^ Text to escape
+ -> Text -- ^ Resulting Doc
+escapeMarkupEntities = T.concatMap escape
+ where
+ escape :: Char -> Text
+ escape '<' = "&lt;"
+ escape '>' = "&gt;"
+ escape '&' = "&amp;"
+ escape '"' = "&quot;"
+ escape '\'' = "&#39;"
+ escape x = T.singleton x
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 3cafcefba..13970cbc3 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -162,10 +162,7 @@ blockToConTeXt (Div attr@(_,"section":_,_)
innerContents <- blockListToConTeXt xs
return $ header' $$ innerContents $$ footer'
blockToConTeXt (Plain lst) = inlineListToConTeXt lst
--- title beginning with fig: indicates that the image is a figure
-blockToConTeXt (Para [Image attr txt (src,tgt)])
- | Just _ <- T.stripPrefix "fig:" tgt
- = do
+blockToConTeXt (SimpleFigure attr txt (src, _)) = do
capt <- inlineListToConTeXt txt
img <- inlineToConTeXt (Image attr txt (src, ""))
let (ident, _, _) = attr
diff --git a/src/Text/Pandoc/Writers/Custom.hs b/src/Text/Pandoc/Writers/Custom.hs
index 58c4bb5be..da212ab4e 100644
--- a/src/Text/Pandoc/Writers/Custom.hs
+++ b/src/Text/Pandoc/Writers/Custom.hs
@@ -1,5 +1,8 @@
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
{- |
Module : Text.Pandoc.Writers.Custom
Copyright : Copyright (C) 2012-2021 John MacFarlane
@@ -10,7 +13,7 @@
Portability : portable
Conversion of 'Pandoc' documents to custom markup using
-a lua writer.
+a Lua writer.
-}
module Text.Pandoc.Writers.Custom ( writeCustom ) where
import Control.Arrow ((***))
@@ -20,49 +23,51 @@ import Data.List (intersperse)
import qualified Data.Map as M
import qualified Data.Text as T
import Data.Text (Text, pack)
-import Foreign.Lua (Lua, Pushable)
+import HsLua as Lua hiding (Operation (Div), render)
+import HsLua.Class.Peekable (PeekError)
import Text.DocLayout (render, literal)
-import Text.Pandoc.Class.PandocIO (PandocIO)
+import Control.Monad.IO.Class (MonadIO)
import Text.Pandoc.Definition
import Text.Pandoc.Lua (Global (..), runLua, setGlobals)
import Text.Pandoc.Lua.Util (addField, dofileWithTraceback)
import Text.Pandoc.Options
+import Text.Pandoc.Class (PandocMonad)
import Text.Pandoc.Templates (renderTemplate)
import Text.Pandoc.Writers.Shared
-import qualified Foreign.Lua as Lua
-
attrToMap :: Attr -> M.Map T.Text T.Text
attrToMap (id',classes,keyvals) = M.fromList
$ ("id", id')
: ("class", T.unwords classes)
: keyvals
-newtype Stringify a = Stringify a
+newtype Stringify e a = Stringify a
-instance Pushable (Stringify Format) where
+instance Pushable (Stringify e Format) where
push (Stringify (Format f)) = Lua.push (T.toLower f)
-instance Pushable (Stringify [Inline]) where
- push (Stringify ils) = Lua.push =<< inlineListToCustom ils
+instance PeekError e => Pushable (Stringify e [Inline]) where
+ push (Stringify ils) = Lua.push =<<
+ changeErrorType ((inlineListToCustom @e) ils)
-instance Pushable (Stringify [Block]) where
- push (Stringify blks) = Lua.push =<< blockListToCustom blks
+instance PeekError e => Pushable (Stringify e [Block]) where
+ push (Stringify blks) = Lua.push =<<
+ changeErrorType ((blockListToCustom @e) blks)
-instance Pushable (Stringify MetaValue) where
- push (Stringify (MetaMap m)) = Lua.push (fmap Stringify m)
- push (Stringify (MetaList xs)) = Lua.push (map Stringify xs)
+instance PeekError e => Pushable (Stringify e MetaValue) where
+ push (Stringify (MetaMap m)) = Lua.push (fmap (Stringify @e) m)
+ push (Stringify (MetaList xs)) = Lua.push (map (Stringify @e) xs)
push (Stringify (MetaBool x)) = Lua.push x
push (Stringify (MetaString s)) = Lua.push s
- push (Stringify (MetaInlines ils)) = Lua.push (Stringify ils)
- push (Stringify (MetaBlocks bs)) = Lua.push (Stringify bs)
+ push (Stringify (MetaInlines ils)) = Lua.push (Stringify @e ils)
+ push (Stringify (MetaBlocks bs)) = Lua.push (Stringify @e bs)
-instance Pushable (Stringify Citation) where
+instance PeekError e => Pushable (Stringify e Citation) where
push (Stringify cit) = do
Lua.createtable 6 0
addField "citationId" $ citationId cit
- addField "citationPrefix" . Stringify $ citationPrefix cit
- addField "citationSuffix" . Stringify $ citationSuffix cit
+ addField "citationPrefix" . Stringify @e $ citationPrefix cit
+ addField "citationSuffix" . Stringify @e $ citationSuffix cit
addField "citationMode" $ show (citationMode cit)
addField "citationNoteNum" $ citationNoteNum cit
addField "citationHash" $ citationHash cit
@@ -76,10 +81,11 @@ instance (Pushable a, Pushable b) => Pushable (KeyValue a b) where
Lua.newtable
Lua.push k
Lua.push v
- Lua.rawset (Lua.nthFromTop 3)
+ Lua.rawset (Lua.nth 3)
-- | Convert Pandoc to custom markup.
-writeCustom :: FilePath -> WriterOptions -> Pandoc -> PandocIO Text
+writeCustom :: (PandocMonad m, MonadIO m)
+ => FilePath -> WriterOptions -> Pandoc -> m Text
writeCustom luaFile opts doc@(Pandoc meta _) = do
let globals = [ PANDOC_DOCUMENT doc
, PANDOC_SCRIPT_FILE luaFile
@@ -90,7 +96,7 @@ writeCustom luaFile opts doc@(Pandoc meta _) = do
-- check for error in lua script (later we'll change the return type
-- to handle this more gracefully):
when (stat /= Lua.OK)
- Lua.throwTopMessage
+ Lua.throwErrorAsException
rendered <- docToCustom opts doc
context <- metaToContext opts
(fmap (literal . pack) . blockListToCustom)
@@ -105,126 +111,132 @@ writeCustom luaFile opts doc@(Pandoc meta _) = do
Just tpl -> render Nothing $
renderTemplate tpl $ setField "body" body context
-docToCustom :: WriterOptions -> Pandoc -> Lua String
+docToCustom :: forall e. PeekError e
+ => WriterOptions -> Pandoc -> LuaE e String
docToCustom opts (Pandoc (Meta metamap) blocks) = do
body <- blockListToCustom blocks
- Lua.callFunc "Doc" body (fmap Stringify metamap) (writerVariables opts)
+ invoke @e "Doc" body (fmap (Stringify @e) metamap) (writerVariables opts)
-- | Convert Pandoc block element to Custom.
-blockToCustom :: Block -- ^ Block element
- -> Lua String
+blockToCustom :: forall e. PeekError e
+ => Block -- ^ Block element
+ -> LuaE e String
blockToCustom Null = return ""
-blockToCustom (Plain inlines) = Lua.callFunc "Plain" (Stringify inlines)
+blockToCustom (Plain inlines) = invoke @e "Plain" (Stringify @e inlines)
blockToCustom (Para [Image attr txt (src,tit)]) =
- Lua.callFunc "CaptionedImage" src tit (Stringify txt) (attrToMap attr)
+ invoke @e "CaptionedImage" src tit (Stringify @e txt) (attrToMap attr)
-blockToCustom (Para inlines) = Lua.callFunc "Para" (Stringify inlines)
+blockToCustom (Para inlines) = invoke @e "Para" (Stringify @e inlines)
blockToCustom (LineBlock linesList) =
- Lua.callFunc "LineBlock" (map Stringify linesList)
+ invoke @e "LineBlock" (map (Stringify @e) linesList)
blockToCustom (RawBlock format str) =
- Lua.callFunc "RawBlock" (Stringify format) str
+ invoke @e "RawBlock" (Stringify @e format) str
-blockToCustom HorizontalRule = Lua.callFunc "HorizontalRule"
+blockToCustom HorizontalRule = invoke @e "HorizontalRule"
blockToCustom (Header level attr inlines) =
- Lua.callFunc "Header" level (Stringify inlines) (attrToMap attr)
+ invoke @e "Header" level (Stringify @e inlines) (attrToMap attr)
blockToCustom (CodeBlock attr str) =
- Lua.callFunc "CodeBlock" str (attrToMap attr)
+ invoke @e "CodeBlock" str (attrToMap attr)
blockToCustom (BlockQuote blocks) =
- Lua.callFunc "BlockQuote" (Stringify blocks)
+ invoke @e "BlockQuote" (Stringify @e blocks)
blockToCustom (Table _ blkCapt specs thead tbody tfoot) =
let (capt, aligns, widths, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot
aligns' = map show aligns
- capt' = Stringify capt
- headers' = map Stringify headers
- rows' = map (map Stringify) rows
- in Lua.callFunc "Table" capt' aligns' widths headers' rows'
+ capt' = Stringify @e capt
+ headers' = map (Stringify @e) headers
+ rows' = map (map (Stringify @e)) rows
+ in invoke @e "Table" capt' aligns' widths headers' rows'
blockToCustom (BulletList items) =
- Lua.callFunc "BulletList" (map Stringify items)
+ invoke @e "BulletList" (map (Stringify @e) items)
blockToCustom (OrderedList (num,sty,delim) items) =
- Lua.callFunc "OrderedList" (map Stringify items) num (show sty) (show delim)
+ invoke @e "OrderedList" (map (Stringify @e) items) num (show sty) (show delim)
blockToCustom (DefinitionList items) =
- Lua.callFunc "DefinitionList"
- (map (KeyValue . (Stringify *** map Stringify)) items)
+ invoke @e "DefinitionList"
+ (map (KeyValue . (Stringify @e *** map (Stringify @e))) items)
blockToCustom (Div attr items) =
- Lua.callFunc "Div" (Stringify items) (attrToMap attr)
+ invoke @e "Div" (Stringify @e items) (attrToMap attr)
-- | Convert list of Pandoc block elements to Custom.
-blockListToCustom :: [Block] -- ^ List of block elements
- -> Lua String
+blockListToCustom :: forall e. PeekError e
+ => [Block] -- ^ List of block elements
+ -> LuaE e String
blockListToCustom xs = do
- blocksep <- Lua.callFunc "Blocksep"
+ blocksep <- invoke @e "Blocksep"
bs <- mapM blockToCustom xs
return $ mconcat $ intersperse blocksep bs
-- | Convert list of Pandoc inline elements to Custom.
-inlineListToCustom :: [Inline] -> Lua String
+inlineListToCustom :: forall e. PeekError e => [Inline] -> LuaE e String
inlineListToCustom lst = do
- xs <- mapM inlineToCustom lst
+ xs <- mapM (inlineToCustom @e) lst
return $ mconcat xs
-- | Convert Pandoc inline element to Custom.
-inlineToCustom :: Inline -> Lua String
+inlineToCustom :: forall e. PeekError e => Inline -> LuaE e String
-inlineToCustom (Str str) = Lua.callFunc "Str" str
+inlineToCustom (Str str) = invoke @e "Str" str
-inlineToCustom Space = Lua.callFunc "Space"
+inlineToCustom Space = invoke @e "Space"
-inlineToCustom SoftBreak = Lua.callFunc "SoftBreak"
+inlineToCustom SoftBreak = invoke @e "SoftBreak"
-inlineToCustom (Emph lst) = Lua.callFunc "Emph" (Stringify lst)
+inlineToCustom (Emph lst) = invoke @e "Emph" (Stringify @e lst)
-inlineToCustom (Underline lst) = Lua.callFunc "Underline" (Stringify lst)
+inlineToCustom (Underline lst) = invoke @e "Underline" (Stringify @e lst)
-inlineToCustom (Strong lst) = Lua.callFunc "Strong" (Stringify lst)
+inlineToCustom (Strong lst) = invoke @e "Strong" (Stringify @e lst)
-inlineToCustom (Strikeout lst) = Lua.callFunc "Strikeout" (Stringify lst)
+inlineToCustom (Strikeout lst) = invoke @e "Strikeout" (Stringify @e lst)
-inlineToCustom (Superscript lst) = Lua.callFunc "Superscript" (Stringify lst)
+inlineToCustom (Superscript lst) = invoke @e "Superscript" (Stringify @e lst)
-inlineToCustom (Subscript lst) = Lua.callFunc "Subscript" (Stringify lst)
+inlineToCustom (Subscript lst) = invoke @e "Subscript" (Stringify @e lst)
-inlineToCustom (SmallCaps lst) = Lua.callFunc "SmallCaps" (Stringify lst)
+inlineToCustom (SmallCaps lst) = invoke @e "SmallCaps" (Stringify @e lst)
-inlineToCustom (Quoted SingleQuote lst) = Lua.callFunc "SingleQuoted" (Stringify lst)
+inlineToCustom (Quoted SingleQuote lst) =
+ invoke @e "SingleQuoted" (Stringify @e lst)
-inlineToCustom (Quoted DoubleQuote lst) = Lua.callFunc "DoubleQuoted" (Stringify lst)
+inlineToCustom (Quoted DoubleQuote lst) =
+ invoke @e "DoubleQuoted" (Stringify @e lst)
-inlineToCustom (Cite cs lst) = Lua.callFunc "Cite" (Stringify lst) (map Stringify cs)
+inlineToCustom (Cite cs lst) =
+ invoke @e "Cite" (Stringify @e lst) (map (Stringify @e) cs)
inlineToCustom (Code attr str) =
- Lua.callFunc "Code" str (attrToMap attr)
+ invoke @e "Code" str (attrToMap attr)
inlineToCustom (Math DisplayMath str) =
- Lua.callFunc "DisplayMath" str
+ invoke @e "DisplayMath" str
inlineToCustom (Math InlineMath str) =
- Lua.callFunc "InlineMath" str
+ invoke @e "InlineMath" str
inlineToCustom (RawInline format str) =
- Lua.callFunc "RawInline" (Stringify format) str
+ invoke @e "RawInline" (Stringify @e format) str
-inlineToCustom LineBreak = Lua.callFunc "LineBreak"
+inlineToCustom LineBreak = invoke @e "LineBreak"
inlineToCustom (Link attr txt (src,tit)) =
- Lua.callFunc "Link" (Stringify txt) src tit (attrToMap attr)
+ invoke @e "Link" (Stringify @e txt) src tit (attrToMap attr)
inlineToCustom (Image attr alt (src,tit)) =
- Lua.callFunc "Image" (Stringify alt) src tit (attrToMap attr)
+ invoke @e "Image" (Stringify @e alt) src tit (attrToMap attr)
-inlineToCustom (Note contents) = Lua.callFunc "Note" (Stringify contents)
+inlineToCustom (Note contents) = invoke @e "Note" (Stringify @e contents)
inlineToCustom (Span attr items) =
- Lua.callFunc "Span" (Stringify items) (attrToMap attr)
+ invoke @e "Span" (Stringify @e items) (attrToMap attr)
diff --git a/src/Text/Pandoc/Writers/Docbook.hs b/src/Text/Pandoc/Writers/Docbook.hs
index 33a6f5f0c..c9e49517f 100644
--- a/src/Text/Pandoc/Writers/Docbook.hs
+++ b/src/Text/Pandoc/Writers/Docbook.hs
@@ -1,6 +1,5 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
-{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.Docbook
Copyright : Copyright (C) 2006-2021 John MacFarlane
@@ -188,7 +187,7 @@ blockToDocbook opts (Div (id',"section":_,_) (Header lvl (_,_,attrs) ils : xs))
-- standalone documents will include them in the template.
then [("xmlns", "http://docbook.org/ns/docbook"),("xmlns:xlink", "http://www.w3.org/1999/xlink")]
else []
-
+
-- Populate miscAttr with Header.Attr.attributes, filtering out non-valid DocBook section attributes, id, and xml:id
miscAttr = filter (isSectionAttr version) attrs
attribs = nsAttr <> idAttr <> miscAttr
@@ -233,7 +232,7 @@ blockToDocbook _ h@Header{} = do
return empty
blockToDocbook opts (Plain lst) = inlinesToDocbook opts lst
-- title beginning with fig: indicates that the image is a figure
-blockToDocbook opts (Para [Image attr txt (src,T.stripPrefix "fig:" -> Just _)]) = do
+blockToDocbook opts (SimpleFigure attr txt (src, _)) = do
alt <- inlinesToDocbook opts txt
let capt = if null txt
then empty
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index a3c4b6be1..ce7133f33 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -36,7 +36,9 @@ import Data.Time.Clock.POSIX
import Data.Digest.Pure.SHA (sha1, showDigest)
import Skylighting
import Text.Collate.Lang (renderLang)
-import Text.Pandoc.Class.PandocMonad (PandocMonad, report, toLang, translateTerm)
+import Text.Pandoc.Class (PandocMonad, report, toLang, translateTerm,
+ getMediaBag)
+import Text.Pandoc.MediaBag (lookupMedia, MediaItem(..))
import qualified Text.Pandoc.Translations as Term
import qualified Text.Pandoc.Class.PandocMonad as P
import Data.Time
@@ -175,6 +177,7 @@ writeDocx opts doc = do
let initialSt = defaultWriterState {
stStyleMaps = styleMaps
, stTocTitle = tocTitle
+ , stCurId = 20
}
let isRTLmeta = case lookupMeta "dir" meta of
@@ -783,8 +786,6 @@ rStyleM styleName = do
return $ mknode "w:rStyle" [("w:val", fromStyleId sty')] ()
getUniqueId :: (PandocMonad m) => WS m Text
--- the + 20 is to ensure that there are no clashes with the rIds
--- already in word/document.xml.rel
getUniqueId = do
n <- gets stCurId
modify $ \st -> st{stCurId = n + 1}
@@ -853,11 +854,13 @@ blockToOpenXML' opts (Plain lst) = do
then withParaProp prop block
else block
-- title beginning with fig: indicates that the image is a figure
-blockToOpenXML' opts (Para [Image attr alt (src,T.stripPrefix "fig:" -> Just tit)]) = do
+blockToOpenXML' opts (SimpleFigure attr@(imgident, _, _) alt (src, tit)) = do
setFirstPara
fignum <- gets stNextFigureNum
unless (null alt) $ modify $ \st -> st{ stNextFigureNum = fignum + 1 }
- let figid = "fig" <> tshow fignum
+ let refid = if T.null imgident
+ then "ref_fig" <> tshow fignum
+ else "ref_" <> imgident
figname <- translateTerm Term.Figure
prop <- pStyleM $
if null alt
@@ -869,14 +872,16 @@ blockToOpenXML' opts (Para [Image attr alt (src,T.stripPrefix "fig:" -> Just tit
then return []
else withParaPropM (pStyleM "Image Caption")
$ blockToOpenXML opts
- (Para $ Span (figid,[],[])
- [Str (figname <> "\160"),
- RawInline (Format "openxml")
- ("<w:fldSimple w:instr=\"SEQ Figure"
- <> " \\* ARABIC \"><w:r><w:t>"
- <> tshow fignum
- <> "</w:t></w:r></w:fldSimple>"),
- Str ":", Space] : alt)
+ $ Para
+ $ if isEnabled Ext_native_numbering opts
+ then Span (refid,[],[])
+ [Str (figname <> "\160"),
+ RawInline (Format "openxml")
+ ("<w:fldSimple w:instr=\"SEQ Figure"
+ <> " \\* ARABIC \"><w:r><w:t>"
+ <> tshow fignum
+ <> "</w:t></w:r></w:fldSimple>")] : Str ": " : alt
+ else alt
return $
Elem (mknode "w:p" [] (map Elem paraProps ++ contents))
: captionNode
@@ -922,7 +927,8 @@ blockToOpenXML' _ HorizontalRule = do
("o:hralign","center"),
("o:hrstd","t"),("o:hr","t")] () ]
blockToOpenXML' opts (Table attr caption colspecs thead tbodies tfoot) =
- tableToOpenXML (blocksToOpenXML opts)
+ tableToOpenXML opts
+ (blocksToOpenXML opts)
(Grid.toTable attr caption colspecs thead tbodies tfoot)
blockToOpenXML' opts el
| BulletList lst <- el = addOpenXMLList BulletMarker lst
@@ -1230,7 +1236,42 @@ inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do
imgs <- gets stImages
let
stImage = M.lookup (T.unpack src) imgs
- generateImgElt (ident, _, _, img) =
+ generateImgElt (ident, _fp, mt, img) = do
+ docprid <- getUniqueId
+ nvpicprid <- getUniqueId
+ (blipAttrs, blipContents) <-
+ case T.takeWhile (/=';') <$> mt of
+ Just "image/svg+xml" -> do
+ -- get fallback png
+ mediabag <- getMediaBag
+ mbFallback <-
+ case lookupMedia (T.unpack (src <> ".png")) mediabag of
+ Just item -> do
+ id' <- T.unpack . ("rId" <>) <$> getUniqueId
+ let fp' = "media/" <> id' <> ".png"
+ let imgdata = (id',
+ fp',
+ Just (mediaMimeType item),
+ BL.toStrict $ mediaContents item)
+ modify $ \st -> st { stImages =
+ M.insert fp' imgdata $ stImages st }
+ return $ Just id'
+ Nothing -> return Nothing
+ let extLst = mknode "a:extLst" []
+ [ mknode "a:ext"
+ [("uri","{28A0092B-C50C-407E-A947-70E740481C1C}")]
+ [ mknode "a14:useLocalDpi"
+ [("xmlns:a14","http://schemas.microsoft.com/office/drawing/2010/main"),
+ ("val","0")] () ]
+ , mknode "a:ext"
+ [("uri","{96DAC541-7B7A-43D3-8B79-37D633B846F1}")]
+ [ mknode "asvg:svgBlip"
+ [("xmlns:asvg", "http://schemas.microsoft.com/office/drawing/2016/SVG/main"),
+ ("r:embed",T.pack ident)] () ]
+ ]
+ return (maybe [] (\id'' -> [("r:embed", T.pack id'')]) mbFallback,
+ [extLst])
+ _ -> return ([("r:embed", T.pack ident)], [])
let
(xpt,ypt) = desiredSizeInPoints opts attr
(either (const def) id (imageSize opts img))
@@ -1242,10 +1283,12 @@ inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do
,("noChangeAspect","1")] ()
nvPicPr = mknode "pic:nvPicPr" []
[ mknode "pic:cNvPr"
- [("descr",src),("id","0"),("name","Picture")] ()
+ [("descr",src)
+ ,("id", nvpicprid)
+ ,("name","Picture")] ()
, cNvPicPr ]
blipFill = mknode "pic:blipFill" []
- [ mknode "a:blip" [("r:embed",T.pack ident)] ()
+ [ mknode "a:blip" blipAttrs blipContents
, mknode "a:stretch" [] $
mknode "a:fillRect" [] ()
]
@@ -1279,16 +1322,15 @@ inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do
, mknode "wp:docPr"
[ ("descr", stringify alt)
, ("title", title)
- , ("id","1")
+ , ("id", docprid)
, ("name","Picture")
] ()
, graphic
]
- in
- imgElt
+ return [Elem imgElt]
wrapBookmark imgident =<< case stImage of
- Just imgData -> return [Elem $ generateImgElt imgData]
+ Just imgData -> generateImgElt imgData
Nothing -> ( do --try
(img, mt) <- P.fetchItem src
ident <- ("rId" <>) <$> getUniqueId
@@ -1317,7 +1359,7 @@ inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do
else do
-- insert mime type to use in constructing [Content_Types].xml
modify $ \st -> st { stImages = M.insert (T.unpack src) imgData $ stImages st }
- return [Elem $ generateImgElt imgData]
+ generateImgElt imgData
)
`catchError` ( \e -> do
report $ CouldNotFetchResource src $ T.pack (show e)
diff --git a/src/Text/Pandoc/Writers/Docx/Table.hs b/src/Text/Pandoc/Writers/Docx/Table.hs
index 7a84c5278..4dc4ad6a2 100644
--- a/src/Text/Pandoc/Writers/Docx/Table.hs
+++ b/src/Text/Pandoc/Writers/Docx/Table.hs
@@ -20,6 +20,8 @@ import Text.Pandoc.Definition
import Text.Pandoc.Class.PandocMonad (PandocMonad, translateTerm)
import Text.Pandoc.Writers.Docx.Types
import Text.Pandoc.Shared
+import Text.Pandoc.Options (WriterOptions, isEnabled)
+import Text.Pandoc.Extensions (Extension(Ext_native_numbering))
import Text.Printf (printf)
import Text.Pandoc.Writers.GridTable hiding (Table)
import Text.Pandoc.Writers.OOXML
@@ -29,10 +31,11 @@ import qualified Text.Pandoc.Translations as Term
import qualified Text.Pandoc.Writers.GridTable as Grid
tableToOpenXML :: PandocMonad m
- => ([Block] -> WS m [Content])
+ => WriterOptions
+ -> ([Block] -> WS m [Content])
-> Grid.Table
-> WS m [Content]
-tableToOpenXML blocksToOpenXML gridTable = do
+tableToOpenXML opts blocksToOpenXML gridTable = do
setFirstPara
let (Grid.Table (ident,_,_) caption colspecs _rowheads thead tbodies tfoot) =
gridTable
@@ -50,7 +53,9 @@ tableToOpenXML blocksToOpenXML gridTable = do
then return []
else withParaPropM (pStyleM "Table Caption")
$ blocksToOpenXML
- $ addLabel tableid tablename tablenum captionBlocks
+ $ if isEnabled Ext_native_numbering opts
+ then addLabel tableid tablename tablenum captionBlocks
+ else captionBlocks
-- We set "in table" after processing the caption, because we don't
-- want the "Table Caption" style to be overwritten with "Compact".
modify $ \s -> s { stInTable = True }
@@ -93,8 +98,8 @@ tableToOpenXML blocksToOpenXML gridTable = do
addLabel :: Text -> Text -> Int -> [Block] -> [Block]
addLabel tableid tablename tablenum bs =
case bs of
- (Para ils : rest) -> Para (label : Space : ils) : rest
- (Plain ils : rest) -> Plain (label : Space : ils) : rest
+ (Para ils : rest) -> Para (label : Str ": " : ils) : rest
+ (Plain ils : rest) -> Plain (label : Str ": " : ils) : rest
_ -> Para [label] : bs
where
label = Span (tableid,[],[])
@@ -103,8 +108,7 @@ addLabel tableid tablename tablenum bs =
("<w:fldSimple w:instr=\"SEQ Table"
<> " \\* ARABIC \"><w:r><w:t>"
<> tshow tablenum
- <> "</w:t></w:r></w:fldSimple>"),
- Str ":"]
+ <> "</w:t></w:r></w:fldSimple>")]
-- | Parts of a table
data RowType = HeadRow | BodyRow | FootRow
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs
index 602c70ebe..c77f20ec1 100644
--- a/src/Text/Pandoc/Writers/DokuWiki.hs
+++ b/src/Text/Pandoc/Writers/DokuWiki.hs
@@ -109,9 +109,7 @@ blockToDokuWiki opts (Plain inlines) =
-- title beginning with fig: indicates that the image is a figure
-- dokuwiki doesn't support captions - so combine together alt and caption into alt
-blockToDokuWiki opts (Para [Image attr txt (src,tgt)])
- | Just tit <- T.stripPrefix "fig:" tgt
- = do
+blockToDokuWiki opts (SimpleFigure attr txt (src, tit)) = do
capt <- if null txt
then return ""
else (" " <>) `fmap` inlineListToDokuWiki opts txt
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index 508fb6a98..d1417ff48 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -32,7 +32,6 @@ import qualified Data.Set as Set
import qualified Data.Text as T
import Data.Text (Text)
import qualified Data.Text.Lazy as TL
-import Network.HTTP (urlEncode)
import System.FilePath (takeExtension, takeFileName, makeRelative)
import Text.HTML.TagSoup (Tag (TagOpen), fromAttrib, parseTags)
import Text.Pandoc.Builder (fromList, setMeta)
@@ -45,6 +44,7 @@ import Text.Pandoc.Error
import Text.Pandoc.ImageSize
import Text.Pandoc.Logging
import Text.Pandoc.MIME (MimeType, extensionFromMimeType, getMimeType)
+import Text.Pandoc.Network.HTTP (urlEncode)
import Text.Pandoc.Options (EPUBVersion (..), HTMLMathMethod (..),
ObfuscationMethod (NoObfuscation), WrapOption (..),
WriterOptions (..))
@@ -79,7 +79,7 @@ data EPUBMetadata = EPUBMetadata{
, epubLanguage :: Text
, epubCreator :: [Creator]
, epubContributor :: [Creator]
- , epubSubject :: [Text]
+ , epubSubject :: [Subject]
, epubDescription :: Maybe Text
, epubType :: Maybe Text
, epubFormat :: Maybe Text
@@ -121,6 +121,12 @@ data Title = Title{
data ProgressionDirection = LTR | RTL deriving Show
+data Subject = Subject{
+ subjectText :: Text
+ , subjectAuthority :: Maybe Text
+ , subjectTerm :: Maybe Text
+ } deriving Show
+
dcName :: Text -> QName
dcName n = QName n Nothing (Just "dc")
@@ -232,7 +238,11 @@ addMetadataFromXML e@(Element (QName name _ (Just "dc")) attrs _ _) md
, creatorRole = getAttr "role"
, creatorFileAs = getAttr "file-as"
} : epubContributor md }
- | name == "subject" = md{ epubSubject = strContent e : epubSubject md }
+ | name == "subject" = md{ epubSubject =
+ Subject { subjectText = strContent e
+ , subjectAuthority = getAttr "authority"
+ , subjectTerm = getAttr "term"
+ } : epubSubject md }
| name == "description" = md { epubDescription = Just $ strContent e }
| name == "type" = md { epubType = Just $ strContent e }
| name == "format" = md { epubFormat = Just $ strContent e }
@@ -313,12 +323,13 @@ getDate s meta = getList s meta handleMetaValue
handleMetaValue mv = Date { dateText = fromMaybe "" $ normalizeDate' $ metaValueToString mv
, dateEvent = Nothing }
-simpleList :: T.Text -> Meta -> [Text]
-simpleList s meta =
- case lookupMeta s meta of
- Just (MetaList xs) -> map metaValueToString xs
- Just x -> [metaValueToString x]
- Nothing -> []
+getSubject :: T.Text -> Meta -> [Subject]
+getSubject s meta = getList s meta handleMetaValue
+ where handleMetaValue (MetaMap m) =
+ Subject{ subjectText = maybe "" metaValueToString $ M.lookup "text" m
+ , subjectAuthority = metaValueToString <$> M.lookup "authority" m
+ , subjectTerm = metaValueToString <$> M.lookup "term" m }
+ handleMetaValue mv = Subject (metaValueToString mv) Nothing Nothing
metadataFromMeta :: WriterOptions -> Meta -> EPUBMetadata
metadataFromMeta opts meta = EPUBMetadata{
@@ -352,7 +363,7 @@ metadataFromMeta opts meta = EPUBMetadata{
lookupMeta "language" meta `mplus` lookupMeta "lang" meta
creators = getCreator "creator" meta
contributors = getCreator "contributor" meta
- subjects = simpleList "subject" meta
+ subjects = getSubject "subject" meta
description = metaValueToString <$> lookupMeta "description" meta
epubtype = metaValueToString <$> lookupMeta "type" meta
format = metaValueToString <$> lookupMeta "format" meta
@@ -659,7 +670,7 @@ pandocToEPUB version opts doc = do
"contributors", "other-credits",
"errata", "revision-history",
"titlepage", "halftitlepage", "seriespage",
- "foreword", "preface",
+ "foreword", "preface", "frontispiece",
"seriespage", "titlepage"]
backMatterTypes = ["appendix", "colophon", "bibliography",
"index"]
@@ -974,7 +985,7 @@ metadataElement version md currentTime =
epubCreator md
contributorNodes = withIds "epub-contributor"
(toCreatorNode "contributor") $ epubContributor md
- subjectNodes = map (dcTag "subject") $ epubSubject md
+ subjectNodes = withIds "subject" toSubjectNode $ epubSubject md
descriptionNodes = maybe [] (dcTag' "description") $ epubDescription md
typeNodes = maybe [] (dcTag' "type") $ epubType md
formatNodes = maybe [] (dcTag' "format") $ epubFormat md
@@ -1046,6 +1057,16 @@ metadataElement version md currentTime =
(("id",id') :
maybe [] (\x -> [("opf:event",x)]) (dateEvent date)) $
dateText date]
+ toSubjectNode id' subject
+ | version == EPUB2 = [dcNode "subject" !
+ [("id",id')] $ subjectText subject]
+ | otherwise = (dcNode "subject" ! [("id",id')] $ subjectText subject)
+ : maybe [] (\x -> (unode "meta" !
+ [("refines", "#" <> id'),("property","authority")] $ x) :
+ maybe [] (\y -> [unode "meta" !
+ [("refines", "#" <> id'),("property","term")] $ y])
+ (subjectTerm subject))
+ (subjectAuthority subject)
schemeToOnix :: Text -> Text
schemeToOnix "ISBN-10" = "02"
schemeToOnix "GTIN-13" = "03"
@@ -1137,7 +1158,7 @@ transformInline _opts (Image attr@(_,_,kvs) lab (src,tit))
return $ Image attr lab ("../" <> newsrc, tit)
transformInline opts x@(Math t m)
| WebTeX url <- writerHTMLMathMethod opts = do
- newsrc <- modifyMediaRef (T.unpack url <> urlEncode (T.unpack m))
+ newsrc <- modifyMediaRef (T.unpack (url <> urlEncode m))
let mathclass = if t == DisplayMath then "display" else "inline"
return $ Span ("",["math",mathclass],[])
[Image nullAttr [x] ("../" <> newsrc, "")]
diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs
index 3b5d04427..ce3fe25a9 100644
--- a/src/Text/Pandoc/Writers/FB2.hs
+++ b/src/Text/Pandoc/Writers/FB2.hs
@@ -29,7 +29,7 @@ import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Encoding as TE
-import Network.HTTP (urlEncode)
+import Text.Pandoc.Network.HTTP (urlEncode)
import Text.Pandoc.XML.Light as X
import Text.Pandoc.Class.PandocMonad (PandocMonad, report)
@@ -299,9 +299,8 @@ blockToXml :: PandocMonad m => Block -> FBM m [Content]
blockToXml (Plain ss) = cMapM toXml ss -- FIXME: can lead to malformed FB2
blockToXml (Para [Math DisplayMath formula]) = insertMath NormalImage formula
-- title beginning with fig: indicates that the image is a figure
-blockToXml (Para [Image atr alt (src,tgt)])
- | Just tit <- T.stripPrefix "fig:" tgt
- = insertImage NormalImage (Image atr alt (src,tit))
+blockToXml (SimpleFigure atr alt (src, tit)) =
+ insertImage NormalImage (Image atr alt (src,tit))
blockToXml (Para ss) = list . el "p" <$> cMapM toXml ss
blockToXml (CodeBlock _ s) = return . spaceBeforeAfter .
map (el "p" . el "code") . T.lines $ s
@@ -451,7 +450,7 @@ insertMath immode formula = do
case htmlMath of
WebTeX url -> do
let alt = [Code nullAttr formula]
- let imgurl = url <> T.pack (urlEncode $ T.unpack formula)
+ let imgurl = url <> urlEncode formula
let img = Image nullAttr alt (imgurl, "")
insertImage immode img
_ -> return [el "code" formula]
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 6f91d1965..8c5548196 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -28,7 +28,6 @@ module Text.Pandoc.Writers.HTML (
writeRevealJs,
tagWithAttributes
) where
-import Control.Monad.Identity (runIdentity)
import Control.Monad.State.Strict
import Data.Char (ord)
import Data.List (intercalate, intersperse, partition, delete, (\\), foldl')
@@ -38,10 +37,9 @@ import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
-import Network.HTTP (urlEncode)
import Network.URI (URI (..), parseURIReference)
import Numeric (showHex)
-import Text.DocLayout (render, literal)
+import Text.DocLayout (render, literal, Doc)
import Text.Blaze.Internal (MarkupM (Empty), customLeaf, customParent)
import Text.DocTemplates (FromContext (lookupContext), Context (..))
import Text.Blaze.Html hiding (contents)
@@ -52,11 +50,12 @@ import Text.Pandoc.ImageSize
import Text.Pandoc.Options
import Text.Pandoc.Shared
import Text.Pandoc.Slides
-import Text.Pandoc.Templates (Template, compileTemplate, renderTemplate)
+import Text.Pandoc.Templates (renderTemplate)
import Text.Pandoc.Walk
import Text.Pandoc.Writers.Math
import Text.Pandoc.Writers.Shared
import qualified Text.Pandoc.Writers.AnnotatedTable as Ann
+import Text.Pandoc.Network.HTTP (urlEncode)
import Text.Pandoc.XML (escapeStringForXML, fromEntities, toEntities,
html5Attributes, html4Attributes, rdfaAttributes)
import qualified Text.Blaze.XHtml5 as H5
@@ -71,13 +70,16 @@ import Text.Pandoc.Class.PandocPure (runPure)
import Text.Pandoc.Error
import Text.Pandoc.Logging
import Text.Pandoc.MIME (mediaCategory)
+import Text.Pandoc.Writers.Blaze (layoutMarkup)
import Text.TeXMath
import Text.XML.Light (elChildren, unode, unqual)
import qualified Text.XML.Light as XML
import Text.XML.Light.Output
+import Data.String (fromString)
data WriterState = WriterState
{ stNotes :: [Html] -- ^ List of notes
+ , stEmittedNotes :: Int -- ^ How many notes we've already pushed out to the HTML
, stMath :: Bool -- ^ Math is used in document
, stQuotes :: Bool -- ^ <q> tag is used
, stHighlighting :: Bool -- ^ Syntax highlighting is used
@@ -89,10 +91,11 @@ data WriterState = WriterState
, stCodeBlockNum :: Int -- ^ Number of code block
, stCsl :: Bool -- ^ Has CSL references
, stCslEntrySpacing :: Maybe Int -- ^ CSL entry spacing
+ , stBlockLevel :: Int -- ^ Current block depth, excluding section divs
}
defaultWriterState :: WriterState
-defaultWriterState = WriterState {stNotes= [], stMath = False, stQuotes = False,
+defaultWriterState = WriterState {stNotes= [], stEmittedNotes = 0, stMath = False, stQuotes = False,
stHighlighting = False,
stHtml5 = False,
stEPUBVersion = Nothing,
@@ -101,7 +104,8 @@ defaultWriterState = WriterState {stNotes= [], stMath = False, stQuotes = False,
stInSection = False,
stCodeBlockNum = 0,
stCsl = False,
- stCslEntrySpacing = Nothing}
+ stCslEntrySpacing = Nothing,
+ stBlockLevel = 0}
-- Helpers to render HTML with the appropriate function.
@@ -128,10 +132,8 @@ needsVariationSelector '↔' = True
needsVariationSelector _ = False
-- | Hard linebreak.
-nl :: WriterOptions -> Html
-nl opts = if writerWrapText opts == WrapNone
- then mempty
- else preEscapedString "\n"
+nl :: Html
+nl = preEscapedString "\n"
-- | Convert Pandoc document to Html 5 string.
writeHtml5String :: PandocMonad m => WriterOptions -> Pandoc -> m Text
@@ -157,7 +159,8 @@ writeHtmlStringForEPUB :: PandocMonad m
-> m Text
writeHtmlStringForEPUB version o = writeHtmlString'
defaultWriterState{ stHtml5 = version == EPUB3,
- stEPUBVersion = Just version } o
+ stEPUBVersion = Just version }
+ o{ writerWrapText = WrapNone }
-- | Convert Pandoc document to Reveal JS HTML slide show.
writeRevealJs :: PandocMonad m
@@ -204,20 +207,23 @@ writeHtmlString' :: PandocMonad m
=> WriterState -> WriterOptions -> Pandoc -> m Text
writeHtmlString' st opts d = do
(body, context) <- evalStateT (pandocToHtml opts d) st
- let defaultTemplate = fmap (const tocTemplate) (getField "table-of-contents" context :: Maybe Text)
- let template = msum [ writerTemplate opts
- , defaultTemplate ]
+ let colwidth = case writerWrapText opts of
+ WrapAuto -> Just (writerColumns opts)
+ _ -> Nothing
(if writerPreferAscii opts
then toEntities
else id) <$>
- case template of
- Nothing -> return $ renderHtml' body
+ case writerTemplate opts of
+ Nothing -> return $
+ case colwidth of
+ Nothing -> renderHtml' body -- optimization, skip layout
+ Just cols -> render (Just cols) $ layoutMarkup body
Just tpl -> do
-- warn if empty lang
when (isNothing (getField "lang" context :: Maybe Text)) $
report NoLangSpecified
-- check for empty pagetitle
- context' <-
+ (context' :: Context Text) <-
case getField "pagetitle" context of
Just (s :: Text) | not (T.null s) -> return context
_ -> do
@@ -228,9 +234,9 @@ writeHtmlString' st opts d = do
Just [] -> "Untitled"
Just (x:_) -> takeBaseName $ T.unpack x
report $ NoTitleElement fallback
- return $ resetField "pagetitle" fallback context
- return $ render Nothing $ renderTemplate tpl
- (defField "body" (renderHtml' body) context')
+ return $ resetField "pagetitle" (literal fallback) context
+ return $ render colwidth $ renderTemplate tpl
+ (defField "body" (layoutMarkup body) context')
writeHtml' :: PandocMonad m => WriterState -> WriterOptions -> Pandoc -> m Html
writeHtml' st opts d =
@@ -243,13 +249,6 @@ writeHtml' st opts d =
(body, _) <- evalStateT (pandocToHtml opts d) st
return body
-wantTOC :: Meta -> Maybe Bool
-wantTOC = fmap (== MetaBool True) . lookupMeta "tableOfContents"
-
-tocTemplate :: Template Text
-tocTemplate = either error id . runIdentity . compileTemplate "" $
- "<div class=\"toc\"><h1></h1>$table-of-contents$</div>$body$"
-
-- result is (title, authors, date, toc, body, new variables)
pandocToHtml :: PandocMonad m
=> WriterOptions
@@ -259,13 +258,13 @@ pandocToHtml opts (Pandoc meta blocks) = do
let slideLevel = fromMaybe (getSlideLevel blocks) $ writerSlideLevel opts
modify $ \st -> st{ stSlideLevel = slideLevel }
metadata <- metaToContext opts
- (fmap (literal . renderHtml') . blockListToHtml opts)
- (fmap (literal . renderHtml') . inlineListToHtml opts)
+ (fmap layoutMarkup . blockListToHtml opts)
+ (fmap layoutMarkup . inlineListToHtml opts)
meta
let stringifyHTML = escapeStringForXML . stringify
- let authsMeta = map stringifyHTML $ docAuthors meta
+ let authsMeta = map (literal . stringifyHTML) $ docAuthors meta
let dateMeta = stringifyHTML $ docDate meta
- let descriptionMeta = escapeStringForXML $
+ let descriptionMeta = literal $ escapeStringForXML $
lookupMetaString "description" meta
slideVariant <- gets stSlideVariant
let sects = adjustNumbers opts $
@@ -273,15 +272,22 @@ pandocToHtml opts (Pandoc meta blocks) = do
if slideVariant == NoSlides
then blocks
else prepSlides slideLevel blocks
- let withTOC = fromMaybe (writerTableOfContents opts) (wantTOC meta)
- toc <- if withTOC && slideVariant /= S5Slides
- then fmap renderHtml' <$> tableOfContents opts sects
+ toc <- if writerTableOfContents opts && slideVariant /= S5Slides
+ then fmap layoutMarkup <$> tableOfContents opts sects
else return Nothing
blocks' <- blockListToHtml opts sects
+ notes <- do
+ -- make the st private just to be safe, since we modify it right afterwards
+ st <- get
+ if null (stNotes st)
+ then return mempty
+ else do
+ notes <- footnoteSection EndOfDocument (stEmittedNotes st + 1) (reverse (stNotes st))
+ modify (\st' -> st'{ stNotes = mempty, stEmittedNotes = stEmittedNotes st' + length (stNotes st') })
+ return notes
st <- get
- notes <- footnoteSection opts (reverse (stNotes st))
let thebody = blocks' >> notes
- let math = case writerHTMLMathMethod opts of
+ let math = layoutMarkup $ case writerHTMLMathMethod opts of
MathJax url
| slideVariant /= RevealJsSlides ->
-- mathjax is handled via a special plugin in revealjs
@@ -295,10 +301,10 @@ pandocToHtml opts (Pandoc meta blocks) = do
KaTeX url -> do
H.script !
A.src (toValue $ url <> "katex.min.js") $ mempty
- nl opts
+ nl
let katexFlushLeft =
case lookupContext "classoption" metadata of
- Just clsops | "fleqn" `elem` (clsops :: [Text]) -> "true"
+ Just clsops | "fleqn" `elem` (clsops :: [Doc Text]) -> "true"
_ -> "false"
H.script $ text $ T.unlines [
"document.addEventListener(\"DOMContentLoaded\", function () {"
@@ -315,7 +321,7 @@ pandocToHtml opts (Pandoc meta blocks) = do
, " });"
, "}}});"
]
- nl opts
+ nl
H.link ! A.rel "stylesheet" !
A.href (toValue $ url <> "katex.min.css")
@@ -324,15 +330,16 @@ pandocToHtml opts (Pandoc meta blocks) = do
Just s | not (stHtml5 st) ->
H.script ! A.type_ "text/javascript"
$ preEscapedString
- ("/*<![CDATA[*/\n" ++ T.unpack s ++
+ ("/*<![CDATA[*/\n" <> T.unpack s <>
"/*]]>*/\n")
| otherwise -> mempty
Nothing -> mempty
let mCss :: Maybe [Text] = lookupContext "css" metadata
- let context = (if stHighlighting st
+ let context :: Context Text
+ context = (if stHighlighting st
then case writerHighlightStyle opts of
Just sty -> defField "highlighting-css"
- (T.pack $ styleToCss sty)
+ (literal $ T.pack $ styleToCss sty)
Nothing -> id
else id) .
(if stCsl st
@@ -342,15 +349,15 @@ pandocToHtml opts (Pandoc meta blocks) = do
Just 0 -> id
Just n ->
defField "csl-entry-spacing"
- (tshow n <> "em"))
+ (literal $ tshow n <> "em"))
else id) .
(if stMath st
- then defField "math" (renderHtml' math)
+ then defField "math" math
else id) .
(case writerHTMLMathMethod opts of
MathJax u -> defField "mathjax" True .
defField "mathjaxurl"
- (T.takeWhile (/='?') u)
+ (literal $ T.takeWhile (/='?') u)
_ -> defField "mathjax" False) .
(case writerHTMLMathMethod opts of
PlainMath -> defField "displaymath-css" True
@@ -361,13 +368,14 @@ pandocToHtml opts (Pandoc meta blocks) = do
-- template can't distinguish False/undefined
defField "controls" True .
defField "controlsTutorial" True .
- defField "controlsLayout" ("bottom-right" :: Text) .
- defField "controlsBackArrows" ("faded" :: Text) .
+ defField "controlsLayout"
+ ("bottom-right" :: Doc Text) .
+ defField "controlsBackArrows" ("faded" :: Doc Text) .
defField "progress" True .
defField "slideNumber" False .
- defField "showSlideNumber" ("all" :: Text) .
+ defField "showSlideNumber" ("all" :: Doc Text) .
defField "hashOneBasedIndex" False .
- defField "hash" False .
+ defField "hash" True .
defField "respondToHashChanges" True .
defField "history" False .
defField "keyboard" True .
@@ -377,7 +385,7 @@ pandocToHtml opts (Pandoc meta blocks) = do
defField "touch" True .
defField "loop" False .
defField "rtl" False .
- defField "navigationMode" ("default" :: Text) .
+ defField "navigationMode" ("default" :: Doc Text) .
defField "shuffle" False .
defField "fragments" True .
defField "fragmentInURL" True .
@@ -385,22 +393,22 @@ pandocToHtml opts (Pandoc meta blocks) = do
defField "help" True .
defField "pause" True .
defField "showNotes" False .
- defField "autoPlayMedia" ("null" :: Text) .
- defField "preloadIframes" ("null" :: Text) .
- defField "autoSlide" ("0" :: Text) .
+ defField "autoPlayMedia" ("null" :: Doc Text) .
+ defField "preloadIframes" ("null" :: Doc Text) .
+ defField "autoSlide" ("0" :: Doc Text) .
defField "autoSlideStoppable" True .
- defField "autoSlideMethod" ("null" :: Text) .
- defField "defaultTiming" ("null" :: Text) .
+ defField "autoSlideMethod" ("null" :: Doc Text) .
+ defField "defaultTiming" ("null" :: Doc Text) .
defField "mouseWheel" False .
- defField "display" ("block" :: Text) .
+ defField "display" ("block" :: Doc Text) .
defField "hideInactiveCursor" True .
- defField "hideCursorTime" ("5000" :: Text) .
+ defField "hideCursorTime" ("5000" :: Doc Text) .
defField "previewLinks" False .
- defField "transition" ("slide" :: Text) .
- defField "transitionSpeed" ("default" :: Text) .
- defField "backgroundTransition" ("fade" :: Text) .
- defField "viewDistance" ("3" :: Text) .
- defField "mobileViewDistance" ("2" :: Text)
+ defField "transition" ("slide" :: Doc Text) .
+ defField "transitionSpeed" ("default" :: Doc Text) .
+ defField "backgroundTransition" ("fade" :: Doc Text) .
+ defField "viewDistance" ("3" :: Doc Text) .
+ defField "mobileViewDistance" ("2" :: Doc Text)
else id) .
defField "document-css" (isNothing mCss && slideVariant == NoSlides) .
defField "quotes" (stQuotes st) .
@@ -410,18 +418,18 @@ pandocToHtml opts (Pandoc meta blocks) = do
maybe id (defField "toc") toc .
maybe id (defField "table-of-contents") toc .
defField "author-meta" authsMeta .
- maybe id (defField "date-meta")
+ maybe id (defField "date-meta" . literal)
(normalizeDate dateMeta) .
defField "description-meta" descriptionMeta .
defField "pagetitle"
- (stringifyHTML . docTitle $ meta) .
- defField "idprefix" (writerIdentifierPrefix opts) .
+ (literal . stringifyHTML . docTitle $ meta) .
+ defField "idprefix" (literal $ writerIdentifierPrefix opts) .
-- these should maybe be set in pandoc.hs
defField "slidy-url"
- ("https://www.w3.org/Talks/Tools/Slidy2" :: Text) .
- defField "slideous-url" ("slideous" :: Text) .
- defField "revealjs-url" ("https://unpkg.com/reveal.js@^4/" :: Text) $
- defField "s5-url" ("s5/default" :: Text) .
+ ("https://www.w3.org/Talks/Tools/Slidy2" :: Doc Text) .
+ defField "slideous-url" ("slideous" :: Doc Text) .
+ defField "revealjs-url" ("https://unpkg.com/reveal.js@^4/" :: Doc Text) $
+ defField "s5-url" ("s5/default" :: Doc Text) .
defField "html5" (stHtml5 st) $
metadata
return (thebody, context)
@@ -449,15 +457,15 @@ toList listop opts items = do
unordList :: PandocMonad m
=> WriterOptions -> [Html] -> StateT WriterState m Html
-unordList opts = toList H.ul opts . toListItems opts
+unordList opts = toList H.ul opts . toListItems
ordList :: PandocMonad m
=> WriterOptions -> [Html] -> StateT WriterState m Html
-ordList opts = toList H.ol opts . toListItems opts
+ordList opts = toList H.ol opts . toListItems
defList :: PandocMonad m
=> WriterOptions -> [Html] -> StateT WriterState m Html
-defList opts items = toList H.dl opts (items ++ [nl opts])
+defList opts items = toList H.dl opts (items ++ [nl])
isTaskListItem :: [Block] -> Bool
isTaskListItem (Plain (Str "☐":Space:_):_) = True
@@ -479,7 +487,7 @@ listItemToHtml opts bls
let checkbox = if checked
then checkbox' ! A.checked ""
else checkbox'
- checkbox' = H.input ! A.type_ "checkbox" ! A.disabled "" >> nl opts
+ checkbox' = H.input ! A.type_ "checkbox" ! A.disabled "" >> nl
isContents <- inlineListToHtml opts is
bsContents <- blockListToHtml opts bs
return $ constr (checkbox >> isContents) >> bsContents
@@ -502,28 +510,45 @@ tableOfContents opts sects = do
-- | Convert list of Note blocks to a footnote <div>.
-- Assumes notes are sorted.
-footnoteSection :: PandocMonad m
- => WriterOptions -> [Html] -> StateT WriterState m Html
-footnoteSection opts notes = do
+footnoteSection ::
+ PandocMonad m => ReferenceLocation -> Int -> [Html] -> StateT WriterState m Html
+footnoteSection refLocation startCounter notes = do
html5 <- gets stHtml5
slideVariant <- gets stSlideVariant
- let hrtag = if html5 then H5.hr else H.hr
+ let hrtag = if refLocation /= EndOfBlock
+ then (if html5 then H5.hr else H.hr) <> nl
+ else mempty
+ let additionalClassName = case refLocation of
+ EndOfBlock -> "footnotes-end-of-block"
+ EndOfDocument -> "footnotes-end-of-document"
+ EndOfSection -> "footnotes-end-of-section"
+ let className = "footnotes " <> additionalClassName
epubVersion <- gets stEPUBVersion
let container x
| html5
, epubVersion == Just EPUB3
- = H5.section ! A.class_ "footnotes"
+ = H5.section ! A.class_ className
! customAttribute "epub:type" "footnotes" $ x
- | html5 = H5.section ! A.class_ "footnotes"
+ | html5 = H5.section ! A.class_ className
! customAttribute "role" "doc-endnotes"
$ x
| slideVariant /= NoSlides = H.div ! A.class_ "footnotes slide" $ x
- | otherwise = H.div ! A.class_ "footnotes" $ x
+ | otherwise = H.div ! A.class_ className $ x
return $
if null notes
then mempty
- else nl opts >> container (nl opts >> hrtag >> nl opts >>
- H.ol (mconcat notes >> nl opts) >> nl opts)
+ else do
+ nl
+ container $ do
+ nl
+ hrtag
+ -- Keep the previous output exactly the same if we don't
+ -- have multiple notes sections
+ if startCounter == 1
+ then H.ol $ mconcat notes >> nl
+ else H.ol ! A.start (fromString (show startCounter)) $
+ mconcat notes >> nl
+ nl
-- | Parse a mailto link; return Just (name, domain) or Nothing.
parseMailto :: Text -> Maybe (Text, Text)
@@ -618,6 +643,7 @@ toAttrs kvs = do
return (keys, attrs)
else return (Set.insert k keys, addAttr html5 mbEpubVersion k v attrs)
addAttr html5 mbEpubVersion x y
+ | T.null x = id -- see #7546
| html5
= if x `Set.member` (html5Attributes <> rdfaAttributes)
|| T.any (== ':') x -- e.g. epub: namespace
@@ -689,12 +715,11 @@ figure opts attr@(_, _, attrList) txt (s,tit) = do
img <- inlineToHtml opts (Image attr alt (s,tit))
capt <- if null txt
then return mempty
- else tocapt `fmap` inlineListToHtml opts txt
+ else (nl <>) . tocapt <$> inlineListToHtml opts txt
+ let inner = mconcat [nl, img, capt, nl]
return $ if html5
- then H5.figure $ mconcat
- [nl opts, img, capt, nl opts]
- else H.div ! A.class_ "figure" $ mconcat
- [nl opts, img, nl opts, capt, nl opts]
+ then H5.figure inner
+ else H.div ! A.class_ "figure" $ inner
adjustNumbers :: WriterOptions -> [Block] -> [Block]
@@ -714,11 +739,10 @@ adjustNumbers opts doc =
fixnum x = x
showSecNum = T.intercalate "." . map tshow
--- | Convert Pandoc block element to HTML.
-blockToHtml :: PandocMonad m => WriterOptions -> Block -> StateT WriterState m Html
-blockToHtml _ Null = return mempty
-blockToHtml opts (Plain lst) = inlineListToHtml opts lst
-blockToHtml opts (Para [Image attr@(_,classes,_) txt (src,tit)])
+blockToHtmlInner :: PandocMonad m => WriterOptions -> Block -> StateT WriterState m Html
+blockToHtmlInner _ Null = return mempty
+blockToHtmlInner opts (Plain lst) = inlineListToHtml opts lst
+blockToHtmlInner opts (Para [Image attr@(_,classes,_) txt (src,tit)])
| "stretch" `elem` classes = do
slideVariant <- gets stSlideVariant
case slideVariant of
@@ -728,20 +752,20 @@ blockToHtml opts (Para [Image attr@(_,classes,_) txt (src,tit)])
inlineToHtml opts (Image attr txt (src, tit))
_ -> figure opts attr txt (src, tit)
-- title beginning with fig: indicates that the image is a figure
-blockToHtml opts (Para [Image attr txt (s,T.stripPrefix "fig:" -> Just tit)]) =
- figure opts attr txt (s,tit)
-blockToHtml opts (Para lst) = do
+blockToHtmlInner opts (SimpleFigure attr caption (src, title)) =
+ figure opts attr caption (src, title)
+blockToHtmlInner opts (Para lst) = do
contents <- inlineListToHtml opts lst
case contents of
Empty _ | not (isEnabled Ext_empty_paragraphs opts) -> return mempty
_ -> return $ H.p contents
-blockToHtml opts (LineBlock lns) =
+blockToHtmlInner opts (LineBlock lns) =
if writerWrapText opts == WrapNone
then blockToHtml opts $ linesToPara lns
else do
htmlLines <- inlineListToHtml opts $ intercalate [LineBreak] lns
return $ H.div ! A.class_ "line-block" $ htmlLines
-blockToHtml opts (Div (ident, "section":dclasses, dkvs)
+blockToHtmlInner opts (Div (ident, "section":dclasses, dkvs)
(Header level
hattr@(hident,hclasses,hkvs) ils : xs)) = do
slideVariant <- gets stSlideVariant
@@ -796,33 +820,33 @@ blockToHtml opts (Div (ident, "section":dclasses, dkvs)
if titleSlide
then do
t <- addAttrs opts attr $
- secttag $ nl opts <> header' <> nl opts <> titleContents <> nl opts
+ secttag $ nl <> header' <> nl <> titleContents <> nl
-- ensure 2D nesting for revealjs, but only for one level;
-- revealjs doesn't like more than one level of nesting
return $
if slideVariant == RevealJsSlides && not inSection &&
not (null innerSecs)
- then H5.section (nl opts <> t <> nl opts <> innerContents)
- else t <> nl opts <> if null innerSecs
+ then H5.section (nl <> t <> nl <> innerContents)
+ else t <> nl <> if null innerSecs
then mempty
- else innerContents <> nl opts
+ else innerContents <> nl
else if writerSectionDivs opts || slide ||
(hident /= ident && not (T.null hident || T.null ident)) ||
(hclasses /= dclasses) || (hkvs /= dkvs)
then addAttrs opts attr
$ secttag
- $ nl opts <> header' <> nl opts <>
+ $ nl <> header' <> nl <>
if null innerSecs
then mempty
- else innerContents <> nl opts
+ else innerContents <> nl
else do
let attr' = (ident, classes' \\ hclasses, dkvs \\ hkvs)
t <- addAttrs opts attr' header'
return $ t <>
if null innerSecs
then mempty
- else nl opts <> innerContents
-blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
+ else nl <> innerContents
+blockToHtmlInner opts (Div attr@(ident, classes, kvs') bs) = do
html5 <- gets stHtml5
slideVariant <- gets stSlideVariant
let isCslBibBody = ident == "refs" || "csl-bib-body" `elem` classes
@@ -859,7 +883,7 @@ blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
-- off widths! see #4028
mconcat <$> mapM (blockToHtml opts) bs'
else blockListToHtml opts' bs'
- let contents' = nl opts >> contents >> nl opts
+ let contents' = nl >> contents >> nl
let (divtag, classes'') = if html5 && "section" `elem` classes'
then (H5.section, filter (/= "section") classes')
else (H.div, classes')
@@ -876,7 +900,7 @@ blockToHtml opts (Div attr@(ident, classes, kvs') bs) = do
_ -> return mempty
else addAttrs opts (ident, classes'', kvs) $
divtag contents'
-blockToHtml opts (RawBlock f str) = do
+blockToHtmlInner opts (RawBlock f str) = do
ishtml <- isRawHtml f
if ishtml
then return $ preEscapedText str
@@ -887,10 +911,10 @@ blockToHtml opts (RawBlock f str) = do
else do
report $ BlockNotRendered (RawBlock f str)
return mempty
-blockToHtml _ HorizontalRule = do
+blockToHtmlInner _ HorizontalRule = do
html5 <- gets stHtml5
return $ if html5 then H5.hr else H.hr
-blockToHtml opts (CodeBlock (id',classes,keyvals) rawCode) = do
+blockToHtmlInner opts (CodeBlock (id',classes,keyvals) rawCode) = do
id'' <- if T.null id'
then do
modify $ \st -> st{ stCodeBlockNum = stCodeBlockNum st + 1 }
@@ -922,7 +946,7 @@ blockToHtml opts (CodeBlock (id',classes,keyvals) rawCode) = do
-- we set writerIdentifierPrefix to "" since id'' already
-- includes it:
addAttrs opts{writerIdentifierPrefix = ""} (id'',[],keyvals) h
-blockToHtml opts (BlockQuote blocks) = do
+blockToHtmlInner opts (BlockQuote blocks) = do
-- in S5, treat list in blockquote specially
-- if default is incremental, make it nonincremental;
-- otherwise incremental
@@ -940,11 +964,11 @@ blockToHtml opts (BlockQuote blocks) = do
(DefinitionList lst)
_ -> do contents <- blockListToHtml opts blocks
return $ H.blockquote
- $ nl opts >> contents >> nl opts
+ $ nl >> contents >> nl
else do
contents <- blockListToHtml opts blocks
- return $ H.blockquote $ nl opts >> contents >> nl opts
-blockToHtml opts (Header level (ident,classes,kvs) lst) = do
+ return $ H.blockquote $ nl >> contents >> nl
+blockToHtmlInner opts (Header level (ident,classes,kvs) lst) = do
contents <- inlineListToHtml opts lst
let secnum = fromMaybe mempty $ lookup "number" kvs
let contents' = if writerNumberSections opts && not (T.null secnum)
@@ -967,12 +991,12 @@ blockToHtml opts (Header level (ident,classes,kvs) lst) = do
5 -> H.h5 contents'
6 -> H.h6 contents'
_ -> H.p ! A.class_ "heading" $ contents'
-blockToHtml opts (BulletList lst) = do
+blockToHtmlInner opts (BulletList lst) = do
contents <- mapM (listItemToHtml opts) lst
let isTaskList = not (null lst) && all isTaskListItem lst
(if isTaskList then (! A.class_ "task-list") else id) <$>
unordList opts contents
-blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do
+blockToHtmlInner opts (OrderedList (startnum, numstyle, _) lst) = do
contents <- mapM (listItemToHtml opts) lst
html5 <- gets stHtml5
let numstyle' = case numstyle of
@@ -995,17 +1019,47 @@ blockToHtml opts (OrderedList (startnum, numstyle, _) lst) = do
else [])
l <- ordList opts contents
return $ foldl' (!) l attribs
-blockToHtml opts (DefinitionList lst) = do
+blockToHtmlInner opts (DefinitionList lst) = do
contents <- mapM (\(term, defs) ->
do term' <- liftM H.dt $ inlineListToHtml opts term
- defs' <- mapM (liftM (\x -> H.dd (x >> nl opts)) .
+ defs' <- mapM (liftM (\x -> H.dd (nl >> x >> nl)) .
blockListToHtml opts) defs
- return $ mconcat $ nl opts : term' : nl opts :
- intersperse (nl opts) defs') lst
+ return $ mconcat $ nl : term' : nl :
+ intersperse (nl) defs') lst
defList opts contents
-blockToHtml opts (Table attr caption colspecs thead tbody tfoot) =
+blockToHtmlInner opts (Table attr caption colspecs thead tbody tfoot) =
tableToHtml opts (Ann.toTable attr caption colspecs thead tbody tfoot)
+-- | Convert Pandoc block element to HTML. All the legwork is done by
+-- 'blockToHtmlInner', this just takes care of emitting the notes after
+-- the block if necessary.
+blockToHtml :: PandocMonad m => WriterOptions -> Block -> StateT WriterState m Html
+blockToHtml opts block = do
+ -- Ignore inserted section divs -- they are not blocks as they came from
+ -- the document itself (at least not when coming from markdown)
+ let isSection = case block of
+ Div (_, classes, _) _ | "section" `elem` classes -> True
+ _ -> False
+ let increaseLevel = not isSection
+ when increaseLevel $
+ modify (\st -> st{ stBlockLevel = stBlockLevel st + 1 })
+ doc <- blockToHtmlInner opts block
+ st <- get
+ let emitNotes =
+ (writerReferenceLocation opts == EndOfBlock && stBlockLevel st == 1) ||
+ (writerReferenceLocation opts == EndOfSection && isSection)
+ res <- if emitNotes
+ then do
+ notes <- if null (stNotes st)
+ then return mempty
+ else footnoteSection (writerReferenceLocation opts) (stEmittedNotes st + 1) (reverse (stNotes st))
+ modify (\st' -> st'{ stNotes = mempty, stEmittedNotes = stEmittedNotes st' + length (stNotes st') })
+ return (doc <> notes)
+ else return doc
+ when increaseLevel $
+ modify (\st' -> st'{ stBlockLevel = stBlockLevel st' - 1 })
+ return res
+
tableToHtml :: PandocMonad m
=> WriterOptions
-> Ann.Table
@@ -1017,10 +1071,10 @@ tableToHtml opts (Ann.Table attr caption colspecs thead tbodies tfoot) = do
cs <- blockListToHtml opts longCapt
return $ do
H.caption cs
- nl opts
- coltags <- colSpecListToHtml opts colspecs
+ nl
+ coltags <- colSpecListToHtml colspecs
head' <- tableHeadToHtml opts thead
- bodies <- intersperse (nl opts) <$> mapM (tableBodyToHtml opts) tbodies
+ bodies <- intersperse (nl) <$> mapM (tableBodyToHtml opts) tbodies
foot' <- tableFootToHtml opts tfoot
let (ident,classes,kvs) = attr
-- When widths of columns are < 100%, we need to set width for the whole
@@ -1037,13 +1091,13 @@ tableToHtml opts (Ann.Table attr caption colspecs thead tbodies tfoot) = do
<> "%;"):kvs)
_ -> attr
addAttrs opts attr' $ H.table $ do
- nl opts
+ nl
captionDoc
coltags
head'
mconcat bodies
foot'
- nl opts
+ nl
tableBodyToHtml :: PandocMonad m
=> WriterOptions
@@ -1090,7 +1144,7 @@ tablePartToHtml opts tblpart attr rows =
tablePartElement <- addAttrs opts attr $ tag' contents
return $ do
tablePartElement
- nl opts
+ nl
where
isEmptyRow (Ann.HeaderRow _attr _rownum cells) = all isEmptyCell cells
isEmptyCell (Ann.Cell _colspecs _colnum cell) =
@@ -1131,14 +1185,13 @@ rowListToHtml :: PandocMonad m
-> [TableRow]
-> StateT WriterState m Html
rowListToHtml opts rows =
- (\x -> nl opts *> mconcat x) <$>
+ (\x -> nl *> mconcat x) <$>
mapM (tableRowToHtml opts) rows
colSpecListToHtml :: PandocMonad m
- => WriterOptions
- -> [ColSpec]
+ => [ColSpec]
-> StateT WriterState m Html
-colSpecListToHtml opts colspecs = do
+colSpecListToHtml colspecs = do
html5 <- gets stHtml5
let hasDefaultWidth (_, ColWidthDefault) = True
hasDefaultWidth _ = False
@@ -1152,16 +1205,16 @@ colSpecListToHtml opts colspecs = do
ColWidth w -> if html5
then A.style (toValue $ "width: " <> percent w)
else A.width (toValue $ percent w)
- nl opts
+ nl
return $
if all hasDefaultWidth colspecs
then mempty
else do
H.colgroup $ do
- nl opts
+ nl
mapM_ (col . snd) colspecs
- nl opts
+ nl
tableRowToHtml :: PandocMonad m
=> WriterOptions
@@ -1180,12 +1233,12 @@ tableRowToHtml opts (TableRow tblpart attr rownum rowhead rowbody) = do
headcells <- mapM (cellToHtml opts HeaderCell) rowhead
bodycells <- mapM (cellToHtml opts celltype) rowbody
rowHtml <- addAttrs opts attr' $ H.tr $ do
- nl opts
+ nl
mconcat headcells
mconcat bodycells
return $ do
rowHtml
- nl opts
+ nl
alignmentToString :: Alignment -> Maybe Text
alignmentToString = \case
@@ -1243,18 +1296,18 @@ tableCellToHtml opts ctype colAlign (Cell attr align rowspan colspan item) = do
: otherAttribs
return $ do
tag' ! attribs $ contents
- nl opts
+ nl
-toListItems :: WriterOptions -> [Html] -> [Html]
-toListItems opts items = map (toListItem opts) items ++ [nl opts]
+toListItems :: [Html] -> [Html]
+toListItems items = map toListItem items ++ [nl]
-toListItem :: WriterOptions -> Html -> Html
-toListItem opts item = nl opts *> H.li item
+toListItem :: Html -> Html
+toListItem item = nl *> H.li item
blockListToHtml :: PandocMonad m
=> WriterOptions -> [Block] -> StateT WriterState m Html
blockListToHtml opts lst =
- mconcat . intersperse (nl opts) . filter nonempty
+ mconcat . intersperse (nl) . filter nonempty
<$> mapM (blockToHtml opts) lst
where nonempty (Empty _) = False
nonempty _ = True
@@ -1286,9 +1339,9 @@ inlineToHtml opts inline = do
(Str str) -> return $ strToHtml str
Space -> return $ strToHtml " "
SoftBreak -> return $ case writerWrapText opts of
- WrapNone -> preEscapedText " "
- WrapAuto -> preEscapedText " "
- WrapPreserve -> preEscapedText "\n"
+ WrapNone -> " "
+ WrapAuto -> " "
+ WrapPreserve -> nl
LineBreak -> return $ do
if html5 then H5.br else H.br
strToHtml "\n"
@@ -1389,7 +1442,7 @@ inlineToHtml opts inline = do
InlineMath -> "\\textstyle "
DisplayMath -> "\\displaystyle "
return $ imtag ! A.style "vertical-align:middle"
- ! A.src (toValue $ url <> T.pack (urlEncode (T.unpack $ s <> str)))
+ ! A.src (toValue . (url <>) . urlEncode $ s <> str)
! A.alt (toValue str)
! A.title (toValue str)
! A.class_ mathClass
@@ -1424,13 +1477,17 @@ inlineToHtml opts inline = do
ishtml <- isRawHtml f
if ishtml
then return $ preEscapedText str
- else if (f == Format "latex" || f == Format "tex") &&
- allowsMathEnvironments (writerHTMLMathMethod opts) &&
- isMathEnvironment str
- then inlineToHtml opts $ Math DisplayMath str
- else do
- report $ InlineNotRendered inline
- return mempty
+ else do
+ let istex = f == Format "latex" || f == Format "tex"
+ let mm = writerHTMLMathMethod opts
+ case istex of
+ True
+ | allowsMathEnvironments mm && isMathEnvironment str
+ -> inlineToHtml opts $ Math DisplayMath str
+ | allowsRef mm && isRef str
+ -> inlineToHtml opts $ Math InlineMath str
+ _ -> do report $ InlineNotRendered inline
+ return mempty
(Link attr txt (s,_)) | "mailto:" `T.isPrefixOf` s -> do
linkText <- inlineListToHtml opts txt
obfuscateLink opts attr linkText s
@@ -1480,7 +1537,8 @@ inlineToHtml opts inline = do
-- note: null title included, as in Markdown.pl
(Note contents) -> do
notes <- gets stNotes
- let number = length notes + 1
+ emittedNotes <- gets stEmittedNotes
+ let number = emittedNotes + length notes + 1
let ref = tshow number
htmlContents <- blockListToNote opts ref contents
epubVersion <- gets stEPUBVersion
@@ -1548,7 +1606,7 @@ blockListToNote opts ref blocks = do
_ | html5 -> noteItem !
customAttribute "role" "doc-endnote"
_ -> noteItem
- return $ nl opts >> noteItem'
+ return $ nl >> noteItem'
inDiv :: PandocMonad m=> Text -> Html -> StateT WriterState m Html
inDiv cls x = do
@@ -1557,6 +1615,9 @@ inDiv cls x = do
(if html5 then H5.div else H.div)
x ! A.class_ (toValue cls)
+isRef :: Text -> Bool
+isRef t = "\\ref{" `T.isPrefixOf` t || "\\eqref{" `T.isPrefixOf` t
+
isMathEnvironment :: Text -> Bool
isMathEnvironment s = "\\begin{" `T.isPrefixOf` s &&
envName `elem` mathmlenvs
@@ -1591,10 +1652,15 @@ isMathEnvironment s = "\\begin{" `T.isPrefixOf` s &&
allowsMathEnvironments :: HTMLMathMethod -> Bool
allowsMathEnvironments (MathJax _) = True
+allowsMathEnvironments (KaTeX _) = True
allowsMathEnvironments MathML = True
allowsMathEnvironments (WebTeX _) = True
allowsMathEnvironments _ = False
+allowsRef :: HTMLMathMethod -> Bool
+allowsRef (MathJax _) = True
+allowsRef _ = False
+
-- | List of intrinsic event attributes allowed on all elements in HTML4.
intrinsicEventsHTML4 :: [Text]
intrinsicEventsHTML4 =
diff --git a/src/Text/Pandoc/Writers/Haddock.hs b/src/Text/Pandoc/Writers/Haddock.hs
index 75e14714b..dfd89bc54 100644
--- a/src/Text/Pandoc/Writers/Haddock.hs
+++ b/src/Text/Pandoc/Writers/Haddock.hs
@@ -98,8 +98,7 @@ blockToHaddock opts (Plain inlines) = do
contents <- inlineListToHaddock opts inlines
return $ contents <> cr
-- title beginning with fig: indicates figure
-blockToHaddock opts (Para [Image attr alt (src,tgt)])
- | Just tit <- T.stripPrefix "fig:" tgt
+blockToHaddock opts (SimpleFigure attr alt (src, tit))
= blockToHaddock opts (Para [Image attr alt (src,tit)])
blockToHaddock opts (Para inlines) =
-- TODO: if it contains linebreaks, we need to use a @...@ block
diff --git a/src/Text/Pandoc/Writers/ICML.hs b/src/Text/Pandoc/Writers/ICML.hs
index c254fbc58..ea6009fd1 100644
--- a/src/Text/Pandoc/Writers/ICML.hs
+++ b/src/Text/Pandoc/Writers/ICML.hs
@@ -1,7 +1,6 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.ICML
@@ -309,9 +308,8 @@ blocksToICML opts style lst = do
-- | Convert a Pandoc block element to ICML.
blockToICML :: PandocMonad m => WriterOptions -> Style -> Block -> WS m (Doc Text)
blockToICML opts style (Plain lst) = parStyle opts style "" lst
--- title beginning with fig: indicates that the image is a figure
-blockToICML opts style (Para img@[Image _ txt (_,Text.stripPrefix "fig:" -> Just _)]) = do
- figure <- parStyle opts (figureName:style) "" img
+blockToICML opts style (SimpleFigure attr txt (src, tit)) = do
+ figure <- parStyle opts (figureName:style) "" [Image attr txt (src, tit)]
caption <- parStyle opts (imgCaptionName:style) "" txt
return $ intersperseBrs [figure, caption]
blockToICML opts style (Para lst) = parStyle opts (paragraphName:style) "" lst
diff --git a/src/Text/Pandoc/Writers/Ipynb.hs b/src/Text/Pandoc/Writers/Ipynb.hs
index 2613851c5..47c6e6966 100644
--- a/src/Text/Pandoc/Writers/Ipynb.hs
+++ b/src/Text/Pandoc/Writers/Ipynb.hs
@@ -37,6 +37,8 @@ import qualified Data.ByteString.Lazy as BL
import Data.Aeson.Encode.Pretty (Config(..), defConfig,
encodePretty', keyOrder, Indent(Spaces))
import Text.DocLayout (literal)
+import Text.Pandoc.UUID (getRandomUUID)
+import Data.Char (isAscii, isAlphaNum)
writeIpynb :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeIpynb opts d = do
@@ -49,7 +51,7 @@ writeIpynb opts d = do
"cell_type", "output_type",
"execution_count", "metadata",
"outputs", "source",
- "data", "name", "text" ] }
+ "data", "name", "text" ] <> compare }
$ notebook
pandocToNotebook :: PandocMonad m
@@ -79,7 +81,7 @@ pandocToNotebook opts (Pandoc meta blocks) = do
let metadata = case fromJSON metadata' of
Error _ -> mempty -- TODO warning here? shouldn't happen
Success x -> x
- cells <- extractCells opts blocks
+ cells <- extractCells nbformat opts blocks
return $ Notebook{
notebookMetadata = metadata
, notebookFormat = nbformat
@@ -97,23 +99,26 @@ addAttachment (Image attr lab (src,tit))
return $ Image attr lab ("attachment:" <> src, tit)
addAttachment x = return x
-extractCells :: PandocMonad m => WriterOptions -> [Block] -> m [Ipynb.Cell a]
-extractCells _ [] = return []
-extractCells opts (Div (_id,classes,kvs) xs : bs)
+extractCells :: PandocMonad m
+ => (Int, Int) -> WriterOptions -> [Block] -> m [Ipynb.Cell a]
+extractCells _ _ [] = return []
+extractCells nbformat opts (Div (ident,classes,kvs) xs : bs)
| "cell" `elem` classes
, "markdown" `elem` classes = do
let meta = pairsToJSONMeta kvs
(newdoc, attachments) <-
runStateT (walkM addAttachment (Pandoc nullMeta xs)) mempty
source <- writeMarkdown opts{ writerTemplate = Nothing } newdoc
+ uuid <- uuidFrom nbformat ident
(Ipynb.Cell{
cellType = Markdown
+ , cellId = uuid
, cellSource = Source $ breakLines $ T.stripEnd source
, cellMetadata = meta
, cellAttachments = if M.null attachments
then Nothing
- else Just attachments } :)
- <$> extractCells opts bs
+ else Just $ MimeAttachments attachments } :)
+ <$> extractCells nbformat opts bs
| "cell" `elem` classes
, "code" `elem` classes = do
let (codeContent, rest) =
@@ -123,14 +128,16 @@ extractCells opts (Div (_id,classes,kvs) xs : bs)
let meta = pairsToJSONMeta kvs
outputs <- catMaybes <$> mapM blockToOutput rest
let exeCount = lookup "execution_count" kvs >>= safeRead
+ uuid <- uuidFrom nbformat ident
(Ipynb.Cell{
cellType = Ipynb.Code {
codeExecutionCount = exeCount
, codeOutputs = outputs
}
+ , cellId = uuid
, cellSource = Source $ breakLines codeContent
, cellMetadata = meta
- , cellAttachments = Nothing } :) <$> extractCells opts bs
+ , cellAttachments = Nothing } :) <$> extractCells nbformat opts bs
| "cell" `elem` classes
, "raw" `elem` classes =
case consolidateAdjacentRawBlocks xs of
@@ -138,38 +145,66 @@ extractCells opts (Div (_id,classes,kvs) xs : bs)
let format' =
case T.toLower f of
"html" -> "text/html"
+ "html4" -> "text/html"
+ "html5" -> "text/html"
+ "s5" -> "text/html"
+ "slidy" -> "text/html"
+ "slideous" -> "text/html"
+ "dzslides" -> "text/html"
"revealjs" -> "text/html"
"latex" -> "text/latex"
"markdown" -> "text/markdown"
- "rst" -> "text/x-rst"
+ "rst" -> "text/restructuredtext"
+ "asciidoc" -> "text/asciidoc"
_ -> f
+ uuid <- uuidFrom nbformat ident
(Ipynb.Cell{
cellType = Raw
+ , cellId = uuid
, cellSource = Source $ breakLines raw
, cellMetadata = if format' == "ipynb" -- means no format given
then mempty
- else M.insert "format"
+ else JSONMeta $ M.insert "raw_mimetype"
(Aeson.String format') mempty
- , cellAttachments = Nothing } :) <$> extractCells opts bs
- _ -> extractCells opts bs
-extractCells opts (CodeBlock (_id,classes,kvs) raw : bs)
+ , cellAttachments = Nothing } :) <$> extractCells nbformat opts bs
+ _ -> extractCells nbformat opts bs
+extractCells nbformat opts (CodeBlock (ident,classes,kvs) raw : bs)
| "code" `elem` classes = do
let meta = pairsToJSONMeta kvs
let exeCount = lookup "execution_count" kvs >>= safeRead
+ uuid <- uuidFrom nbformat ident
(Ipynb.Cell{
cellType = Ipynb.Code {
codeExecutionCount = exeCount
, codeOutputs = []
}
+ , cellId = uuid
, cellSource = Source $ breakLines raw
, cellMetadata = meta
- , cellAttachments = Nothing } :) <$> extractCells opts bs
-extractCells opts (b:bs) = do
+ , cellAttachments = Nothing } :) <$> extractCells nbformat opts bs
+extractCells nbformat opts (b:bs) = do
let isCodeOrDiv (CodeBlock (_,cl,_) _) = "code" `elem` cl
isCodeOrDiv (Div (_,cl,_) _) = "cell" `elem` cl
isCodeOrDiv _ = False
let (mds, rest) = break isCodeOrDiv bs
- extractCells opts (Div ("",["cell","markdown"],[]) (b:mds) : rest)
+ extractCells nbformat opts
+ (Div ("",["cell","markdown"],[]) (b:mds) : rest)
+
+-- Return Nothing if nbformat < 4.5.
+-- Otherwise construct a UUID, using the existing identifier
+-- if it is a valid UUID, otherwise constructing a new one.
+uuidFrom :: PandocMonad m => (Int, Int) -> Text -> m (Maybe Text)
+uuidFrom nbformat ident =
+ if nbformat >= (4,5)
+ then
+ if isValidUUID ident
+ then return $ Just ident
+ else Just . T.pack . drop 9 . show <$> getRandomUUID
+ else return Nothing
+ where
+ isValidUUID t = not (T.null t) && T.length t <= 64 &&
+ T.all isValidUUIDChar t
+ isValidUUIDChar c = isAscii c && (isAlphaNum c || c == '-' || c == '_')
blockToOutput :: PandocMonad m => Block -> m (Maybe (Output a))
blockToOutput (Div (_,["output","stream",sname],_) (CodeBlock _ t:_)) =
@@ -218,11 +253,13 @@ extractData bs = do
return (M.insert "text/html" (TextualData raw) mmap, meta)
go (mmap, meta) (RawBlock (Format "latex") raw) =
return (M.insert "text/latex" (TextualData raw) mmap, meta)
+ go (mmap, meta) (RawBlock (Format "markdown") raw) =
+ return (M.insert "text/markdown" (TextualData raw) mmap, meta)
go (mmap, meta) (Div _ bs') = foldM go (mmap, meta) bs'
go (mmap, meta) b = (mmap, meta) <$ report (BlockNotRendered b)
pairsToJSONMeta :: [(Text, Text)] -> JSONMeta
-pairsToJSONMeta kvs =
+pairsToJSONMeta kvs = JSONMeta $
M.fromList [(k, case Aeson.decode (UTF8.fromTextLazy $ TL.fromStrict v) of
Just val -> val
Nothing -> String v)
diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs
index 9db8723d1..799fe29fa 100644
--- a/src/Text/Pandoc/Writers/JATS.hs
+++ b/src/Text/Pandoc/Writers/JATS.hs
@@ -291,9 +291,7 @@ blockToJATS opts (Header _ _ title) = do
return $ inTagsSimple "title" title'
-- No Plain, everything needs to be in a block-level tag
blockToJATS opts (Plain lst) = blockToJATS opts (Para lst)
--- title beginning with fig: indicates that the image is a figure
-blockToJATS opts (Para [Image (ident,_,kvs) txt
- (src,T.stripPrefix "fig:" -> Just tit)]) = do
+blockToJATS opts (SimpleFigure (ident, _, kvs) txt (src, tit)) = do
alt <- inlinesToJATS opts txt
let (maintype, subtype) = imageMimeType src kvs
let capt = if null txt
@@ -553,6 +551,7 @@ inlineToJATS _ (Image (ident,_,kvs) _ (src, tit)) = do
return $ selfClosingTag "inline-graphic" attr
isParaOrList :: Block -> Bool
+isParaOrList SimpleFigure{} = False -- implicit figures are not paragraphs
isParaOrList Para{} = True
isParaOrList Plain{} = True
isParaOrList BulletList{} = True
diff --git a/src/Text/Pandoc/Writers/JATS/References.hs b/src/Text/Pandoc/Writers/JATS/References.hs
index 5b19fd034..b00875a7c 100644
--- a/src/Text/Pandoc/Writers/JATS/References.hs
+++ b/src/Text/Pandoc/Writers/JATS/References.hs
@@ -70,6 +70,7 @@ referenceToJATS _opts ref = do
, "pages" `varInTag` "page-range"
, "ISBN" `varInTag` "isbn"
, "ISSN" `varInTag` "issn"
+ , "URL" `varInTag` "uri"
, varInTagWith "doi" "pub-id" [("pub-id-type", "doi")]
, varInTagWith "pmid" "pub-id" [("pub-id-type", "pmid")]
]
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 063e347fb..f8847aa08 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -21,15 +21,13 @@ module Text.Pandoc.Writers.LaTeX (
) where
import Control.Monad.State.Strict
import Data.Char (isDigit)
-import Data.List (intersperse, nubBy, (\\))
+import Data.List (intersperse, (\\))
import Data.Maybe (catMaybes, fromMaybe, isJust, mapMaybe, isNothing)
-import qualified Data.Map as M
import Data.Text (Text)
import qualified Data.Text as T
import Network.URI (unEscapeString)
-import Text.DocTemplates (FromContext(lookupContext), renderTemplate,
- Val(..), Context(..))
-import Text.Collate.Lang (Lang (..), renderLang)
+import Text.DocTemplates (FromContext(lookupContext), renderTemplate)
+import Text.Collate.Lang (renderLang)
import Text.Pandoc.Class.PandocMonad (PandocMonad, report, toLang)
import Text.Pandoc.Definition
import Text.Pandoc.Highlighting (formatLaTeXBlock, formatLaTeXInline, highlight,
@@ -46,7 +44,7 @@ import Text.Pandoc.Writers.LaTeX.Table (tableToLaTeX)
import Text.Pandoc.Writers.LaTeX.Citation (citationsToNatbib,
citationsToBiblatex)
import Text.Pandoc.Writers.LaTeX.Types (LW, WriterState (..), startingState)
-import Text.Pandoc.Writers.LaTeX.Lang (toPolyglossia, toBabel)
+import Text.Pandoc.Writers.LaTeX.Lang (toBabel)
import Text.Pandoc.Writers.LaTeX.Util (stringToLaTeX, StringContext(..),
toLabel, inCmd,
wrapDiv, hypertarget, labelFor,
@@ -132,12 +130,6 @@ pandocToLaTeX options (Pandoc meta blocks) = do
,("tmargin","margin-top")
,("bmargin","margin-bottom")
]
- let toPolyObj :: Lang -> Val Text
- toPolyObj lang = MapVal $ Context $
- M.fromList [ ("name" , SimpleVal $ literal name)
- , ("options" , SimpleVal $ literal opts) ]
- where
- (name, opts) = toPolyglossia lang
mblang <- toLang $ case getLang options meta of
Just l -> Just l
Nothing | null docLangs -> Nothing
@@ -216,36 +208,7 @@ pandocToLaTeX options (Pandoc meta blocks) = do
(literal $ toBabel l)) mblang
$ defField "babel-otherlangs"
(map (literal . toBabel) docLangs)
- $ defField "babel-newcommands" (vcat $
- map (\(poly, babel) -> literal $
- -- \textspanish and \textgalician are already used by babel
- -- save them as \oritext... and let babel use that
- if poly `elem` ["spanish", "galician"]
- then "\\let\\oritext" <> poly <> "\\text" <> poly <> "\n" <>
- "\\AddBabelHook{" <> poly <> "}{beforeextras}" <>
- "{\\renewcommand{\\text" <> poly <> "}{\\oritext"
- <> poly <> "}}\n" <>
- "\\AddBabelHook{" <> poly <> "}{afterextras}" <>
- "{\\renewcommand{\\text" <> poly <> "}[2][]{\\foreignlanguage{"
- <> poly <> "}{##2}}}"
- else (if poly == "latin" -- see #4161
- then "\\providecommand{\\textlatin}{}\n\\renewcommand"
- else "\\newcommand") <> "{\\text" <> poly <>
- "}[2][]{\\foreignlanguage{" <> babel <> "}{#2}}\n" <>
- "\\newenvironment{" <> poly <>
- "}[2][]{\\begin{otherlanguage}{" <>
- babel <> "}}{\\end{otherlanguage}}"
- )
- -- eliminate duplicates that have same polyglossia name
- $ nubBy (\a b -> fst a == fst b)
- -- find polyglossia and babel names of languages used in the document
- $ map (\l -> (fst $ toPolyglossia l, toBabel l)) docLangs
- )
- $ maybe id (defField "polyglossia-lang" . toPolyObj) mblang
- $ defField "polyglossia-otherlangs"
- (ListVal (map toPolyObj docLangs :: [Val Text]))
- $
- defField "latex-dir-rtl"
+ $ defField "latex-dir-rtl"
((render Nothing <$> getField "dir" context) ==
Just ("rtl" :: Text)) context
return $ render colwidth $
@@ -383,10 +346,7 @@ blockToLaTeX (Div (identifier,classes,kvs) bs) = do
wrapNotes <$> wrapDiv (identifier,classes,kvs) result
blockToLaTeX (Plain lst) =
inlineListToLaTeX lst
--- title beginning with fig: indicates that the image is a figure
-blockToLaTeX (Para [Image attr@(ident, _, _) txt (src,tgt)])
- | Just tit <- T.stripPrefix "fig:" tgt
- = do
+blockToLaTeX (SimpleFigure attr@(ident, _, _) txt (src, tit)) = do
(capt, captForLof, footnotes) <- getCaption inlineListToLaTeX True txt
lab <- labelFor ident
let caption = "\\caption" <> captForLof <> braces capt <> lab
@@ -429,6 +389,7 @@ blockToLaTeX (BlockQuote lst) = do
blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
opts <- gets stOptions
lab <- labelFor identifier
+ inNote <- stInNote <$> get
linkAnchor' <- hypertarget True identifier lab
let linkAnchor = if isEmpty linkAnchor'
then empty
@@ -438,8 +399,7 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
return $ flush (linkAnchor $$ "\\begin{code}" $$ literal str $$
"\\end{code}") $$ cr
let rawCodeBlock = do
- st <- get
- env <- if stInNote st
+ env <- if inNote
then modify (\s -> s{ stVerbInNote = True }) >>
return "Verbatim"
else return "verbatim"
@@ -475,14 +435,13 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
"\\end{lstlisting}") $$ cr
let highlightedCodeBlock =
case highlight (writerSyntaxMap opts)
- formatLaTeXBlock ("",classes,keyvalAttr) str of
+ formatLaTeXBlock ("",classes ++ ["default"],keyvalAttr) str of
Left msg -> do
unless (T.null msg) $
report $ CouldNotHighlight msg
rawCodeBlock
Right h -> do
- st <- get
- when (stInNote st) $ modify (\s -> s{ stVerbInNote = True })
+ when inNote $ modify (\s -> s{ stVerbInNote = True })
modify (\s -> s{ stHighlighting = True })
return (flush $ linkAnchor $$ text (T.unpack h))
case () of
@@ -491,6 +450,12 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
| writerListings opts -> listingsCodeBlock
| not (null classes) && isJust (writerHighlightStyle opts)
-> highlightedCodeBlock
+ -- we don't want to use \begin{verbatim} if our code
+ -- contains \end{verbatim}:
+ | inNote
+ , "\\end{Verbatim}" `T.isInfixOf` str -> highlightedCodeBlock
+ | not inNote
+ , "\\end{verbatim}" `T.isInfixOf` str -> highlightedCodeBlock
| otherwise -> rawCodeBlock
blockToLaTeX b@(RawBlock f x) = do
beamer <- gets stBeamer
@@ -766,9 +731,8 @@ inlineToLaTeX (Span (id',classes,kvs) ils) = do
kvToCmd _ = Nothing
langCmds =
case lang of
- Just lng -> let (l, o) = toPolyglossia lng
- ops = if T.null o then "" else "[" <> o <> "]"
- in ["text" <> l <> ops]
+ Just lng -> let l = toBabel lng
+ in ["foreignlanguage{" <> l <> "}"]
Nothing -> []
let cmds = mapMaybe classToCmd classes ++ mapMaybe kvToCmd kvs ++ langCmds
contents <- inlineListToLaTeX ils
@@ -786,7 +750,9 @@ inlineToLaTeX (Span (id',classes,kvs) ils) = do
then braces contents
else foldr inCmd contents cmds)
inlineToLaTeX (Emph lst) = inCmd "emph" <$> inlineListToLaTeX lst
-inlineToLaTeX (Underline lst) = inCmd "underline" <$> inlineListToLaTeX lst
+inlineToLaTeX (Underline lst) = do
+ modify $ \st -> st{ stStrikeout = True } -- this gives us the ulem package
+ inCmd "uline" <$> inlineListToLaTeX lst
inlineToLaTeX (Strong lst) = inCmd "textbf" <$> inlineListToLaTeX lst
inlineToLaTeX (Strikeout lst) = do
-- we need to protect VERB in an mbox or we get an error
diff --git a/src/Text/Pandoc/Writers/LaTeX/Lang.hs b/src/Text/Pandoc/Writers/LaTeX/Lang.hs
index 0ba68b74e..3fdbdc5af 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Lang.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Lang.hs
@@ -10,61 +10,12 @@
Portability : portable
-}
module Text.Pandoc.Writers.LaTeX.Lang
- ( toPolyglossiaEnv,
- toPolyglossia,
- toBabel
+ ( toBabel
) where
import Data.Text (Text)
import Text.Collate.Lang (Lang(..))
--- In environments \Arabic instead of \arabic is used
-toPolyglossiaEnv :: Lang -> (Text, Text)
-toPolyglossiaEnv l =
- case toPolyglossia l of
- ("arabic", o) -> ("Arabic", o)
- x -> x
-
--- Takes a list of the constituents of a BCP47 language code and
--- converts it to a Polyglossia (language, options) tuple
--- http://mirrors.ctan.org/macros/latex/contrib/polyglossia/polyglossia.pdf
-toPolyglossia :: Lang -> (Text, Text)
-toPolyglossia (Lang "ar" _ (Just "DZ") _ _ _) = ("arabic", "locale=algeria")
-toPolyglossia (Lang "ar" _ (Just "IQ") _ _ _) = ("arabic", "locale=mashriq")
-toPolyglossia (Lang "ar" _ (Just "JO") _ _ _) = ("arabic", "locale=mashriq")
-toPolyglossia (Lang "ar" _ (Just "LB") _ _ _) = ("arabic", "locale=mashriq")
-toPolyglossia (Lang "ar" _ (Just "LY") _ _ _) = ("arabic", "locale=libya")
-toPolyglossia (Lang "ar" _ (Just "MA") _ _ _) = ("arabic", "locale=morocco")
-toPolyglossia (Lang "ar" _ (Just "MR") _ _ _) = ("arabic", "locale=mauritania")
-toPolyglossia (Lang "ar" _ (Just "PS") _ _ _) = ("arabic", "locale=mashriq")
-toPolyglossia (Lang "ar" _ (Just "SY") _ _ _) = ("arabic", "locale=mashriq")
-toPolyglossia (Lang "ar" _ (Just "TN") _ _ _) = ("arabic", "locale=tunisia")
-toPolyglossia (Lang "de" _ _ vars _ _)
- | "1901" `elem` vars = ("german", "spelling=old")
-toPolyglossia (Lang "de" _ (Just "AT") vars _ _)
- | "1901" `elem` vars = ("german", "variant=austrian, spelling=old")
-toPolyglossia (Lang "de" _ (Just "AT") _ _ _) = ("german", "variant=austrian")
-toPolyglossia (Lang "de" _ (Just "CH") vars _ _)
- | "1901" `elem` vars = ("german", "variant=swiss, spelling=old")
-toPolyglossia (Lang "de" _ (Just "CH") _ _ _) = ("german", "variant=swiss")
-toPolyglossia (Lang "de" _ _ _ _ _) = ("german", "")
-toPolyglossia (Lang "dsb" _ _ _ _ _) = ("lsorbian", "")
-toPolyglossia (Lang "el" _ _ vars _ _)
- | "polyton" `elem` vars = ("greek", "variant=poly")
-toPolyglossia (Lang "en" _ (Just "AU") _ _ _) = ("english", "variant=australian")
-toPolyglossia (Lang "en" _ (Just "CA") _ _ _) = ("english", "variant=canadian")
-toPolyglossia (Lang "en" _ (Just "GB") _ _ _) = ("english", "variant=british")
-toPolyglossia (Lang "en" _ (Just "NZ") _ _ _) = ("english", "variant=newzealand")
-toPolyglossia (Lang "en" _ (Just "UK") _ _ _) = ("english", "variant=british")
-toPolyglossia (Lang "en" _ (Just "US") _ _ _) = ("english", "variant=american")
-toPolyglossia (Lang "grc" _ _ _ _ _) = ("greek", "variant=ancient")
-toPolyglossia (Lang "hsb" _ _ _ _ _) = ("usorbian", "")
-toPolyglossia (Lang "la" _ _ vars _ _)
- | "x-classic" `elem` vars = ("latin", "variant=classic")
-toPolyglossia (Lang "pt" _ (Just "BR") _ _ _) = ("portuguese", "variant=brazilian")
-toPolyglossia (Lang "sl" _ _ _ _ _) = ("slovenian", "")
-toPolyglossia x = (commonFromBcp47 x, "")
-
-- Takes a list of the constituents of a BCP47 language code and
-- converts it to a Babel language string.
-- http://mirrors.ctan.org/macros/latex/required/babel/base/babel.pdf
@@ -92,7 +43,7 @@ toBabel (Lang "en" _ (Just "US") _ _ _) = "american"
toBabel (Lang "fr" _ (Just "CA") _ _ _) = "canadien"
toBabel (Lang "fra" _ _ vars _ _)
| "aca" `elem` vars = "acadian"
-toBabel (Lang "grc" _ _ _ _ _) = "polutonikogreek"
+toBabel (Lang "grc" _ _ _ _ _) = "ancientgreek"
toBabel (Lang "hsb" _ _ _ _ _) = "uppersorbian"
toBabel (Lang "la" _ _ vars _ _)
| "x-classic" `elem` vars = "classiclatin"
diff --git a/src/Text/Pandoc/Writers/LaTeX/Table.hs b/src/Text/Pandoc/Writers/LaTeX/Table.hs
index 27a8a0257..9471c171c 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Table.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Table.hs
@@ -102,7 +102,7 @@ colDescriptors (Ann.Table _attr _caption specs thead tbodies tfoot) =
toColDescriptor :: Int -> Alignment -> Double -> Text
toColDescriptor numcols align width =
T.pack $ printf
- ">{%s\\arraybackslash}p{(\\columnwidth - %d\\tabcolsep) * \\real{%0.2f}}"
+ ">{%s\\arraybackslash}p{(\\columnwidth - %d\\tabcolsep) * \\real{%0.4f}}"
(T.unpack (alignCommand align))
((numcols - 1) * 2)
width
diff --git a/src/Text/Pandoc/Writers/LaTeX/Util.hs b/src/Text/Pandoc/Writers/LaTeX/Util.hs
index c34338121..916ca1a99 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Util.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Util.hs
@@ -26,7 +26,7 @@ import Control.Monad (when)
import Text.Pandoc.Class (PandocMonad, toLang)
import Text.Pandoc.Options (WriterOptions(..), isEnabled)
import Text.Pandoc.Writers.LaTeX.Types (LW, WriterState(..))
-import Text.Pandoc.Writers.LaTeX.Lang (toPolyglossiaEnv)
+import Text.Pandoc.Writers.LaTeX.Lang (toBabel)
import Text.Pandoc.Highlighting (toListingsLanguage)
import Text.DocLayout
import Text.Pandoc.Definition
@@ -124,7 +124,7 @@ stringToLaTeX context zs = do
'\160' -> emits "~"
'\x200B' -> emits "\\hspace{0pt}" -- zero-width space
'\x202F' -> emits "\\,"
- '\x2026' -> emitcseq "\\ldots"
+ '\x2026' | ligatures -> emitcseq "\\ldots"
'\x2018' | ligatures -> emitquote "`"
'\x2019' | ligatures -> emitquote "'"
'\x201C' | ligatures -> emitquote "``"
@@ -238,13 +238,11 @@ wrapDiv (_,classes,kvs) t = do
Just "ltr" -> align "LTR"
_ -> id
wrapLang txt = case lang of
- Just lng -> let (l, o) = toPolyglossiaEnv lng
- ops = if T.null o
- then ""
- else brackets $ literal o
- in inCmd "begin" (literal l) <> ops
+ Just lng -> let l = toBabel lng
+ in inCmd "begin" "otherlanguage"
+ <> (braces (literal l))
$$ blankline <> txt <> blankline
- $$ inCmd "end" (literal l)
+ $$ inCmd "end" "otherlanguage"
Nothing -> txt
return $ wrapColumns . wrapColumn . wrapDir . wrapLang $ t
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs
index 87b2d8d21..8a34bf47f 100644
--- a/src/Text/Pandoc/Writers/Man.hs
+++ b/src/Text/Pandoc/Writers/Man.hs
@@ -109,11 +109,10 @@ blockToMan :: PandocMonad m
blockToMan _ Null = return empty
blockToMan opts (Div _ bs) = blockListToMan opts bs
blockToMan opts (Plain inlines) =
- liftM vcat $ mapM (inlineListToMan opts) $ splitSentences inlines
+ splitSentences <$> inlineListToMan opts inlines
blockToMan opts (Para inlines) = do
- contents <- liftM vcat $ mapM (inlineListToMan opts) $
- splitSentences inlines
- return $ text ".PP" $$ contents
+ contents <- inlineListToMan opts inlines
+ return $ text ".PP" $$ splitSentences contents
blockToMan opts (LineBlock lns) =
blockToMan opts $ linesToPara lns
blockToMan _ b@(RawBlock f str)
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index fda2bbcef..bb68d9fee 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -2,7 +2,6 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
-{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.Markdown
Copyright : Copyright (C) 2006-2021 John MacFarlane
@@ -19,6 +18,7 @@ Markdown: <https://daringfireball.net/projects/markdown/>
module Text.Pandoc.Writers.Markdown (
writeMarkdown,
writeCommonMark,
+ writeMarkua,
writePlain) where
import Control.Monad.Reader
import Control.Monad.State.Strict
@@ -43,7 +43,10 @@ import Text.Pandoc.Templates (renderTemplate)
import Text.DocTemplates (Val(..), Context(..), FromContext(..))
import Text.Pandoc.Walk
import Text.Pandoc.Writers.HTML (writeHtml5String)
-import Text.Pandoc.Writers.Markdown.Inline (inlineListToMarkdown, linkAttributes, attrsToMarkdown)
+import Text.Pandoc.Writers.Markdown.Inline (inlineListToMarkdown,
+ linkAttributes,
+ attrsToMarkdown,
+ attrsToMarkua)
import Text.Pandoc.Writers.Markdown.Types (MarkdownVariant(..),
WriterState(..),
WriterEnv(..),
@@ -78,6 +81,26 @@ writeCommonMark opts document =
enableExtension Ext_intraword_underscores $
writerExtensions opts }
+-- | Convert Pandoc to Markua.
+writeMarkua :: PandocMonad m => WriterOptions -> Pandoc -> m Text
+writeMarkua opts document =
+ evalMD (pandocToMarkdown opts' document) def{ envVariant = Markua } def
+ where
+ opts' = opts{ writerExtensions =
+ enableExtension Ext_hard_line_breaks $
+ enableExtension Ext_pipe_tables $
+ -- required for fancy list enumerators
+ enableExtension Ext_fancy_lists $
+ enableExtension Ext_startnum $
+ enableExtension Ext_strikeout $
+ enableExtension Ext_subscript $
+ enableExtension Ext_superscript $
+ enableExtension Ext_definition_lists $
+ enableExtension Ext_smart $
+ enableExtension Ext_footnotes
+ mempty }
+
+
pandocTitleBlock :: Doc Text -> [Doc Text] -> Doc Text -> Doc Text
pandocTitleBlock tit auths dat =
hang 2 (text "% ") tit <> cr <>
@@ -141,10 +164,20 @@ valToYaml (SimpleVal x)
| otherwise =
if hasNewlines x
then hang 0 ("|" <> cr) x
- else if isNothing $ foldM needsDoubleQuotes True x
- then "\"" <> fmap escapeInDoubleQuotes x <> "\""
- else x
+ else case x of
+ Text _ t | isSpecialString t ->
+ "\"" <> fmap escapeInDoubleQuotes x <> "\""
+ _ | isNothing (foldM needsDoubleQuotes True x) ->
+ "\"" <> fmap escapeInDoubleQuotes x <> "\""
+ | otherwise -> x
where
+ isSpecialString t = Set.member t specialStrings
+ specialStrings = Set.fromList
+ ["y", "Y", "yes", "Yes", "YES", "n", "N",
+ "no", "No", "NO", "true", "True", "TRUE",
+ "false", "False", "FALSE", "on", "On", "ON",
+ "off", "Off", "OFF", "null", "Null",
+ "NULL", "~", "*"]
needsDoubleQuotes isFirst t
= if T.any isBadAnywhere t ||
(isFirst && T.any isYamlPunct (T.take 1 t))
@@ -318,8 +351,15 @@ blockToMarkdown' opts (Div attrs ils) = do
contents <- blockListToMarkdown opts ils
variant <- asks envVariant
return $
- case () of
- _ | isEnabled Ext_fenced_divs opts &&
+ case () of
+ _ | variant == Markua ->
+ case () of
+ () | "blurb" `elem` classes' -> prefixed "B> " contents <> blankline
+ | "aside" `elem` classes' -> prefixed "A> " contents <> blankline
+ -- | necessary to enable option to create a bibliography
+ | (take 3 (T.unpack id')) == "ref" -> contents <> blankline
+ | otherwise -> contents <> blankline
+ | isEnabled Ext_fenced_divs opts &&
attrs /= nullAttr ->
let attrsToMd = if variant == Commonmark
then attrsToMarkdown
@@ -365,14 +405,13 @@ blockToMarkdown' opts (Plain inlines) = do
_ -> inlines
contents <- inlineListToMarkdown opts inlines'
return $ contents <> cr
--- title beginning with fig: indicates figure
-blockToMarkdown' opts (Para [Image attr alt (src,tgt@(T.stripPrefix "fig:" -> Just tit))])
+blockToMarkdown' opts (SimpleFigure attr alt (src, tit))
| isEnabled Ext_raw_html opts &&
not (isEnabled Ext_link_attributes opts || isEnabled Ext_attributes opts) &&
attr /= nullAttr = -- use raw HTML
(<> blankline) . literal . T.strip <$>
writeHtml5String opts{ writerTemplate = Nothing }
- (Pandoc nullMeta [Para [Image attr alt (src,tgt)]])
+ (Pandoc nullMeta [SimpleFigure attr alt (src, tit)])
| otherwise = blockToMarkdown opts (Para [Image attr alt (src,tit)])
blockToMarkdown' opts (Para inlines) =
(<> blankline) `fmap` blockToMarkdown opts (Plain inlines)
@@ -391,7 +430,8 @@ blockToMarkdown' opts b@(RawBlock f str) = do
(literal "```" <> literal "\n")
let renderEmpty = mempty <$ report (BlockNotRendered b)
case variant of
- PlainText -> renderEmpty
+ PlainText
+ | f == "plain" -> return $ literal str <> literal "\n"
Commonmark
| f `elem` ["gfm", "commonmark", "commonmark_x", "markdown"]
-> return $ literal str <> literal "\n"
@@ -399,6 +439,7 @@ blockToMarkdown' opts b@(RawBlock f str) = do
| f `elem` ["markdown", "markdown_github", "markdown_phpextra",
"markdown_mmd", "markdown_strict"]
-> return $ literal str <> literal "\n"
+ Markua -> renderEmpty
_ | isEnabled Ext_raw_attribute opts -> rawAttribBlock
| f `elem` ["html", "html5", "html4"]
, isEnabled Ext_markdown_attribute opts
@@ -410,17 +451,19 @@ blockToMarkdown' opts b@(RawBlock f str) = do
, isEnabled Ext_raw_tex opts
-> return $ literal str <> literal "\n"
_ -> renderEmpty
-blockToMarkdown' opts HorizontalRule =
- return $ blankline <> literal (T.replicate (writerColumns opts) "-") <> blankline
+blockToMarkdown' opts HorizontalRule = do
+ variant <- asks envVariant
+ let indicator = case variant of
+ Markua -> "* * *"
+ _ -> T.replicate (writerColumns opts) "-"
+ return $ blankline <> literal indicator <> blankline
blockToMarkdown' opts (Header level attr inlines) = do
-
-- first, if we're putting references at the end of a section, we
-- put them here.
blkLevel <- asks envBlockLevel
refs <- if writerReferenceLocation opts == EndOfSection && blkLevel == 1
then notesAndRefs opts
else return empty
-
variant <- asks envVariant
-- we calculate the id that would be used by auto_identifiers
-- so we know whether to print an explicit identifier
@@ -433,7 +476,8 @@ blockToMarkdown' opts (Header level attr inlines) = do
&& id' == autoId -> empty
(id',_,_) | isEnabled Ext_mmd_header_identifiers opts ->
space <> brackets (literal id')
- _ | isEnabled Ext_header_attributes opts ||
+ _ | variant == Markua -> attrsToMarkua attr
+ | isEnabled Ext_header_attributes opts ||
isEnabled Ext_attributes opts ->
space <> attrsToMarkdown attr
| otherwise -> empty
@@ -467,6 +511,8 @@ blockToMarkdown' opts (Header level attr inlines) = do
-- ghc interprets '#' characters in column 1 as linenum specifiers.
_ | variant == PlainText || isEnabled Ext_literate_haskell opts ->
contents <> blankline
+ _ | variant == Markua -> attr' <> cr <> literal (T.replicate level "#")
+ <> space <> contents <> blankline
_ -> literal (T.replicate level "#") <> space <> contents <> attr' <> blankline
return $ refs <> hdr
@@ -483,9 +529,11 @@ blockToMarkdown' opts (CodeBlock attribs str) = do
backticks <> attrs <> cr <> literal str <> cr <> backticks <> blankline
| isEnabled Ext_fenced_code_blocks opts ->
tildes <> attrs <> cr <> literal str <> cr <> tildes <> blankline
- _ -> nest (writerTabStop opts) (literal str) <> blankline
+ _ | variant == Markua -> blankline <> attrsToMarkua attribs <> cr <> backticks <> cr <>
+ literal str <> cr <> backticks <> cr <> blankline
+ | otherwise -> nest (writerTabStop opts) (literal str) <> blankline
where
- endlineLen c = maybe 3 ((+1) . maximum) $ nonEmpty $
+ endlineLen c = maybe 3 ((+1) . maximum) $ nonEmpty
[T.length ln
| ln <- map trim (T.lines str)
, T.pack [c,c,c] `T.isPrefixOf` ln
@@ -572,19 +620,29 @@ blockToMarkdown' opts t@(Table _ blkCapt specs thead tbody tfoot) = do
return $ nst (tbl $$ caption'') $$ blankline
blockToMarkdown' opts (BulletList items) = do
contents <- inList $ mapM (bulletListItemToMarkdown opts) items
- return $ (if isTightList items then vcat else vsep) contents <> blankline
+ return $ (if isTightList items then vcat else vsep)
+ contents <> blankline
blockToMarkdown' opts (OrderedList (start,sty,delim) items) = do
variant <- asks envVariant
let start' = if variant == Commonmark || isEnabled Ext_startnum opts
then start
else 1
let sty' = if isEnabled Ext_fancy_lists opts then sty else DefaultStyle
- let delim' = if isEnabled Ext_fancy_lists opts then delim else DefaultDelim
+ let delim' | isEnabled Ext_fancy_lists opts =
+ case variant of
+ -- Markua supports 'fancy' enumerators, but no TwoParens
+ Markua -> if delim == TwoParens then OneParen else delim
+ _ -> delim
+ | variant == Commonmark && --commonmark only supports one paren
+ (delim == OneParen || delim == TwoParens) = OneParen
+ | otherwise = DefaultDelim
let attribs = (start', sty', delim')
let markers = orderedListMarkers attribs
- let markers' = map (\m -> if T.length m < 3
- then m <> T.replicate (3 - T.length m) " "
- else m) markers
+ let markers' = case variant of
+ Markua -> markers
+ _ -> map (\m -> if T.length m < 3
+ then m <> T.replicate (3 - T.length m) " "
+ else m) markers
contents <- inList $
zipWithM (orderedListItemToMarkdown opts) markers' items
return $ (if isTightList items then vcat else vsep) contents <> blankline
@@ -698,10 +756,13 @@ itemEndsWithTightList bs =
-- | Convert bullet list item (list of blocks) to markdown.
bulletListItemToMarkdown :: PandocMonad m => WriterOptions -> [Block] -> MD m (Doc Text)
bulletListItemToMarkdown opts bs = do
+ variant <- asks envVariant
let exts = writerExtensions opts
contents <- blockListToMarkdown opts $ taskListItemToAscii exts bs
let sps = T.replicate (writerTabStop opts - 2) " "
- let start = literal $ "- " <> sps
+ let start = case variant of
+ Markua -> literal "* "
+ _ -> literal $ "- " <> sps
-- remove trailing blank line if item ends with a tight list
let contents' = if itemEndsWithTightList bs
then chomp contents <> cr
@@ -711,19 +772,22 @@ bulletListItemToMarkdown opts bs = do
-- | Convert ordered list item (a list of blocks) to markdown.
orderedListItemToMarkdown :: PandocMonad m
=> WriterOptions -- ^ options
- -> Text -- ^ list item marker
+ -> Text -- ^ list item marker
-> [Block] -- ^ list item (list of blocks)
-> MD m (Doc Text)
orderedListItemToMarkdown opts marker bs = do
let exts = writerExtensions opts
contents <- blockListToMarkdown opts $ taskListItemToAscii exts bs
+ variant <- asks envVariant
let sps = case writerTabStop opts - T.length marker of
n | n > 0 -> literal $ T.replicate n " "
_ -> literal " "
let ind = if isEnabled Ext_four_space_rule opts
then writerTabStop opts
else max (writerTabStop opts) (T.length marker + 1)
- let start = literal marker <> sps
+ let start = case variant of
+ Markua -> literal marker <> " "
+ _ -> literal marker <> sps
-- remove trailing blank line if item ends with a tight list
let contents' = if itemEndsWithTightList bs
then chomp contents <> cr
@@ -742,7 +806,10 @@ definitionListItemToMarkdown opts (label, defs) = do
then do
let tabStop = writerTabStop opts
variant <- asks envVariant
- let leader = if variant == PlainText then " " else ": "
+ let leader = case variant of
+ PlainText -> " "
+ Markua -> ":"
+ _ -> ": "
let sps = case writerTabStop opts - 3 of
n | n > 0 -> literal $ T.replicate n " "
_ -> literal " "
@@ -813,6 +880,7 @@ blockListToMarkdown opts blocks = do
isListBlock _ = False
commentSep
| variant == PlainText = Null
+ | variant == Markua = Null
| isEnabled Ext_raw_html opts = RawBlock "html" "<!-- -->\n"
| otherwise = RawBlock "markdown" "&nbsp;\n"
mconcat <$> mapM (blockToMarkdown opts) (fixBlocks blocks)
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs
index cd5f5b896..0bf70e80e 100644
--- a/src/Text/Pandoc/Writers/Markdown/Inline.hs
+++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs
@@ -13,7 +13,8 @@
module Text.Pandoc.Writers.Markdown.Inline (
inlineListToMarkdown,
linkAttributes,
- attrsToMarkdown
+ attrsToMarkdown,
+ attrsToMarkua
) where
import Control.Monad.Reader
import Control.Monad.State.Strict
@@ -24,7 +25,6 @@ import qualified Data.Map as M
import Data.Maybe (fromMaybe)
import Data.Text (Text)
import qualified Data.Text as T
-import Network.HTTP (urlEncode)
import Text.Pandoc.Class.PandocMonad (PandocMonad, report)
import Text.Pandoc.Definition
import Text.Pandoc.Logging
@@ -32,6 +32,7 @@ import Text.Pandoc.Options
import Text.Pandoc.Parsing hiding (blankline, blanklines, char, space)
import Text.DocLayout
import Text.Pandoc.Shared
+import Text.Pandoc.Network.HTTP (urlEncode)
import Text.Pandoc.Writers.Shared
import Text.Pandoc.Walk
import Text.Pandoc.Writers.HTML (writeHtml5String)
@@ -44,32 +45,35 @@ import Text.Pandoc.Writers.Markdown.Types (MarkdownVariant(..),
-- | Escape special characters for Markdown.
escapeText :: WriterOptions -> Text -> Text
-escapeText opts = T.pack . go . T.unpack
+escapeText opts = T.pack . go' . T.unpack
where
startsWithSpace (' ':_) = True
startsWithSpace ('\t':_) = True
startsWithSpace [] = True
startsWithSpace _ = False
+ go' ('#':cs)
+ | isEnabled Ext_space_in_atx_header opts
+ = if startsWithSpace (dropWhile (=='#') cs)
+ then '\\':'#':go cs
+ else '#':go cs
+ | otherwise = '\\':'#':go cs
+ go' ('@':cs)
+ | isEnabled Ext_citations opts =
+ case cs of
+ (d:_)
+ | isAlphaNum d || d == '_' || d == '{'
+ -> '\\':'@':go cs
+ _ -> '@':go cs
+ go' cs = go cs
go [] = []
go (c:cs) =
case c of
- '<' | isEnabled Ext_all_symbols_escapable opts ->
- '\\' : '<' : go cs
- | otherwise -> "&lt;" ++ go cs
- '>' | isEnabled Ext_all_symbols_escapable opts ->
- '\\' : '>' : go cs
- | otherwise -> "&gt;" ++ go cs
- '@' | isEnabled Ext_citations opts ->
- case cs of
- (d:_)
- | isAlphaNum d || d == '_' || d == '{'
- -> '\\':'@':go cs
- _ -> '@':go cs
- '#' | isEnabled Ext_space_in_atx_header opts
- , startsWithSpace cs
- -> '\\':'#':go cs
_ | c `elem` ['\\','`','*','_','[',']'] ->
'\\':c:go cs
+ '>' | isEnabled Ext_all_symbols_escapable opts -> '\\':'>':go cs
+ | otherwise -> "&gt;" ++ go cs
+ '<' | isEnabled Ext_all_symbols_escapable opts -> '\\':'<':go cs
+ | otherwise -> "&lt;" ++ go cs
'|' | isEnabled Ext_pipe_tables opts -> '\\':'|':go cs
'^' | isEnabled Ext_superscript opts -> '\\':'^':go cs
'~' | isEnabled Ext_subscript opts ||
@@ -90,10 +94,13 @@ escapeText opts = T.pack . go . T.unpack
| isEnabled Ext_intraword_underscores opts
, isAlphaNum c
, isAlphaNum x -> c : '_' : x : go xs
- '#':xs -> c : '#' : go xs
- '>':xs -> c : '>' : go xs
_ -> c : go cs
+-- Escape the escape character, as well as formatting pairs
+escapeMarkuaString :: Text -> Text
+escapeMarkuaString s = foldr (uncurry T.replace) s [("--","~-~-"),
+ ("**","~*~*"),("//","~/~/"),("^^","~^~^"),(",,","~,~,")]
+
attrsToMarkdown :: Attr -> Doc Text
attrsToMarkdown attribs = braces $ hsep [attribId, attribClasses, attribKeys]
where attribId = case attribs of
@@ -115,9 +122,56 @@ attrsToMarkdown attribs = braces $ hsep [attribId, attribClasses, attribKeys]
escAttrChar '\\' = literal "\\\\"
escAttrChar c = literal $ T.singleton c
+attrsToMarkua:: Attr -> Doc Text
+attrsToMarkua attributes
+ | null list = empty
+ | otherwise = braces $ intercalateDocText list
+ where attrId = case attributes of
+ ("",_,_) -> []
+ (i,_,_) -> [literal $ "id: " <> i]
+ -- all non explicit (key,value) attributes besides id are getting
+ -- a default class key to be Markua conform
+ attrClasses = case attributes of
+ (_,[],_) -> []
+ (_,classes,_) -> map (escAttr . ("class: " <>))
+ classes
+ attrKeyValues = case attributes of
+ (_,_,[]) -> []
+ (_,_,keyvalues) -> map ((\(k,v) -> escAttr k
+ <> ": " <> escAttr v) .
+ preprocessKeyValues) keyvalues
+ escAttr = mconcat . map escAttrChar . T.unpack
+ escAttrChar '"' = literal "\""
+ escAttrChar c = literal $ T.singleton c
+
+ list = concat [attrId, attrClasses, attrKeyValues]
+
+ -- if attribute key is alt, caption, title then content
+ -- gets wrapped inside quotes
+ -- attribute gets removed
+ preprocessKeyValues :: (Text, Text) -> (Text, Text)
+ preprocessKeyValues (key,value)
+ | key == "alt" ||
+ key == "caption" ||
+ key == "title" = (key, inquotes value)
+ | otherwise = (key,value)
+ intercalateDocText :: [Doc Text] -> Doc Text
+ intercalateDocText [] = empty
+ intercalateDocText [x] = x
+ intercalateDocText (x:xs) = x <> ", " <> (intercalateDocText xs)
+
+-- | Add a (key, value) pair to Pandoc attr type
+addKeyValueToAttr :: Attr -> (Text,Text) -> Attr
+addKeyValueToAttr (ident,classes,kvs) (key,value)
+ | not (T.null key) && not (T.null value) = (ident,
+ classes,
+ (key,value): kvs)
+ | otherwise = (ident,classes,kvs)
+
linkAttributes :: WriterOptions -> Attr -> Doc Text
linkAttributes opts attr =
- if (isEnabled Ext_link_attributes opts || isEnabled Ext_attributes opts) && attr /= nullAttr
+ if (isEnabled Ext_link_attributes opts ||
+ isEnabled Ext_attributes opts) && attr /= nullAttr
then attrsToMarkdown attr
else empty
@@ -190,11 +244,13 @@ getReference attr label target = do
(stKeys s) })
return lab'
+
+
-- | Convert list of Pandoc inline elements to markdown.
inlineListToMarkdown :: PandocMonad m => WriterOptions -> [Inline] -> MD m (Doc Text)
-inlineListToMarkdown opts lst = do
- inlist <- asks envInList
- go (if inlist then avoidBadWrapsInList lst else lst)
+inlineListToMarkdown opts ils = do
+ inlist <- asks envInList
+ avoidBadWraps inlist <$> go ils
where go [] = return empty
go (x@Math{}:y@(Str t):zs)
| T.all isDigit (T.take 1 t) -- starts with digit -- see #7058
@@ -235,26 +291,25 @@ inlineListToMarkdown opts lst = do
fmap (iMark <>) (go is)
thead = fmap fst . T.uncons
-isSp :: Inline -> Bool
-isSp Space = True
-isSp SoftBreak = True
-isSp _ = False
+-- Remove breaking spaces that might cause bad wraps.
+avoidBadWraps :: Bool -> Doc Text -> Doc Text
+avoidBadWraps inListItem = go . toList
+ where
+ go [] = mempty
+ go (BreakingSpace : Text len t : BreakingSpace : xs)
+ = case T.uncons t of
+ Just (c,t')
+ | c == '>'
+ || ((c == '-' || c == '*' || c == '+') && T.null t')
+ || (inListItem && isOrderedListMarker t)
+ || (t == "1." || t == "1)")
+ -> Text (len + 1) (" " <> t) <> go (BreakingSpace : xs)
+ _ -> BreakingSpace <> Text len t <> go (BreakingSpace : xs)
+ go (x:xs) = x <> go xs
-avoidBadWrapsInList :: [Inline] -> [Inline]
-avoidBadWrapsInList [] = []
-avoidBadWrapsInList (s:Str (T.uncons -> Just ('>',cs)):xs) | isSp s =
- Str (" >" <> cs) : avoidBadWrapsInList xs
-avoidBadWrapsInList [s, Str (T.uncons -> Just (c, cs))]
- | T.null cs && isSp s && c `elem` ['-','*','+'] = [Str $ T.pack [' ', c]]
-avoidBadWrapsInList (s:Str (T.uncons -> Just (c, cs)):Space:xs)
- | T.null cs && isSp s && c `elem` ['-','*','+'] =
- Str (T.pack [' ', c]) : Space : avoidBadWrapsInList xs
-avoidBadWrapsInList (s:Str cs:Space:xs)
- | isSp s && isOrderedListMarker cs =
- Str (" " <> cs) : Space : avoidBadWrapsInList xs
-avoidBadWrapsInList [s, Str cs]
- | isSp s && isOrderedListMarker cs = [Str $ " " <> cs]
-avoidBadWrapsInList (x:xs) = x : avoidBadWrapsInList xs
+ toList (Concat (Concat a b) c) = toList (Concat a (Concat b c))
+ toList (Concat a b) = a : toList b
+ toList x = [x]
isOrderedListMarker :: Text -> Bool
isOrderedListMarker xs = not (T.null xs) && (T.last xs `elem` ['.',')']) &&
@@ -281,6 +336,7 @@ inlineToMarkdown opts (Span attrs ils) = do
_ -> id
$ case variant of
PlainText -> contents
+ Markua -> "`" <> contents <> "`" <> attrsToMarkua attrs
_ | attrs == nullAttr -> contents
| isEnabled Ext_bracketed_spans opts ->
let attrs' = if attrs /= nullAttr
@@ -307,7 +363,7 @@ inlineToMarkdown opts (Underline lst) = do
case variant of
PlainText -> return contents
_ | isEnabled Ext_bracketed_spans opts ->
- return $ "[" <> contents <> "]" <> "{.ul}"
+ return $ "[" <> contents <> "]" <> "{.underline}"
| isEnabled Ext_native_spans opts ->
return $ tagWithAttrs "span" ("", ["underline"], [])
<> contents
@@ -394,60 +450,75 @@ inlineToMarkdown opts (Quoted DoubleQuote lst) = do
then "&ldquo;" <> contents <> "&rdquo;"
else "“" <> contents <> "”"
inlineToMarkdown opts (Code attr str) = do
+ variant <- asks envVariant
let tickGroups = filter (T.any (== '`')) $ T.group str
let longest = maybe 0 maximum $ nonEmpty $ map T.length tickGroups
let marker = T.replicate (longest + 1) "`"
let spacer = if longest == 0 then "" else " "
let attrsEnabled = isEnabled Ext_inline_code_attributes opts ||
isEnabled Ext_attributes opts
- let attrs = if attrsEnabled && attr /= nullAttr
- then attrsToMarkdown attr
- else empty
- variant <- asks envVariant
+ let attrs = case variant of
+ Markua -> attrsToMarkua attr
+ _ -> if attrsEnabled && attr /= nullAttr
+ then attrsToMarkdown attr
+ else empty
case variant of
PlainText -> return $ literal str
_ -> return $ literal
(marker <> spacer <> str <> spacer <> marker) <> attrs
inlineToMarkdown opts (Str str) = do
variant <- asks envVariant
- let str' = (if writerPreferAscii opts
- then toHtml5Entities
- else id) .
- (if isEnabled Ext_smart opts
- then unsmartify opts
- else id) .
- (if variant == PlainText
- then id
- else escapeText opts) $ str
+ let str' = case variant of
+ Markua -> escapeMarkuaString str
+ _ -> (if writerPreferAscii opts
+ then toHtml5Entities
+ else id) .
+ (if isEnabled Ext_smart opts
+ then unsmartify opts
+ else id) .
+ (if variant == PlainText
+ then id
+ else escapeText opts) $ str
return $ literal str'
-inlineToMarkdown opts (Math InlineMath str) =
- case writerHTMLMathMethod opts of
- WebTeX url -> inlineToMarkdown opts
- (Image nullAttr [Str str] (url <> T.pack (urlEncode $ T.unpack str), str))
- _ | isEnabled Ext_tex_math_dollars opts ->
- return $ "$" <> literal str <> "$"
- | isEnabled Ext_tex_math_single_backslash opts ->
- return $ "\\(" <> literal str <> "\\)"
- | isEnabled Ext_tex_math_double_backslash opts ->
- return $ "\\\\(" <> literal str <> "\\\\)"
- | otherwise -> do
- variant <- asks envVariant
- texMathToInlines InlineMath str >>=
- inlineListToMarkdown opts .
- (if variant == PlainText then makeMathPlainer else id)
-inlineToMarkdown opts (Math DisplayMath str) =
- case writerHTMLMathMethod opts of
- WebTeX url -> (\x -> blankline <> x <> blankline) `fmap`
- inlineToMarkdown opts (Image nullAttr [Str str]
- (url <> T.pack (urlEncode $ T.unpack str), str))
- _ | isEnabled Ext_tex_math_dollars opts ->
- return $ "$$" <> literal str <> "$$"
- | isEnabled Ext_tex_math_single_backslash opts ->
- return $ "\\[" <> literal str <> "\\]"
- | isEnabled Ext_tex_math_double_backslash opts ->
- return $ "\\\\[" <> literal str <> "\\\\]"
- | otherwise -> (\x -> cr <> x <> cr) `fmap`
- (texMathToInlines DisplayMath str >>= inlineListToMarkdown opts)
+inlineToMarkdown opts (Math InlineMath str) = do
+ variant <- asks envVariant
+ case () of
+ _ | variant == Markua -> return $ "`" <> literal str <> "`" <> "$"
+ | otherwise -> case writerHTMLMathMethod opts of
+ WebTeX url -> inlineToMarkdown opts
+ (Image nullAttr [Str str] (url <> urlEncode str, str))
+ _ | isEnabled Ext_tex_math_dollars opts ->
+ return $ "$" <> literal str <> "$"
+ | isEnabled Ext_tex_math_single_backslash opts ->
+ return $ "\\(" <> literal str <> "\\)"
+ | isEnabled Ext_tex_math_double_backslash opts ->
+ return $ "\\\\(" <> literal str <> "\\\\)"
+ | otherwise ->
+ texMathToInlines InlineMath str >>=
+ inlineListToMarkdown opts .
+ (if variant == PlainText then makeMathPlainer else id)
+
+inlineToMarkdown opts (Math DisplayMath str) = do
+ variant <- asks envVariant
+ case () of
+ _ | variant == Markua -> do
+ let attributes = attrsToMarkua (addKeyValueToAttr ("",[],[])
+ ("format", "latex"))
+ return $ blankline <> attributes <> cr <> literal "```" <> cr
+ <> literal str <> cr <> literal "```" <> blankline
+ | otherwise -> case writerHTMLMathMethod opts of
+ WebTeX url -> (\x -> blankline <> x <> blankline) `fmap`
+ inlineToMarkdown opts (Image nullAttr [Str str]
+ (url <> urlEncode str, str))
+ _ | isEnabled Ext_tex_math_dollars opts ->
+ return $ "$$" <> literal str <> "$$"
+ | isEnabled Ext_tex_math_single_backslash opts ->
+ return $ "\\[" <> literal str <> "\\]"
+ | isEnabled Ext_tex_math_double_backslash opts ->
+ return $ "\\\\[" <> literal str <> "\\\\]"
+ | otherwise -> (\x -> cr <> x <> cr) `fmap`
+ (texMathToInlines DisplayMath str >>= inlineListToMarkdown opts)
+
inlineToMarkdown opts il@(RawInline f str) = do
let tickGroups = filter (T.any (== '`')) $ T.group str
let numticks = 1 + maybe 0 maximum (nonEmpty (map T.length tickGroups))
@@ -458,7 +529,8 @@ inlineToMarkdown opts il@(RawInline f str) = do
literal (T.replicate numticks "`") <> literal "{=" <> literal fmt <> literal "}"
let renderEmpty = mempty <$ report (InlineNotRendered il)
case variant of
- PlainText -> renderEmpty
+ PlainText
+ | f == "plain" -> return $ literal str
Commonmark
| f `elem` ["gfm", "commonmark", "commonmark_x", "markdown"]
-> return $ literal str
@@ -466,6 +538,7 @@ inlineToMarkdown opts il@(RawInline f str) = do
| f `elem` ["markdown", "markdown_github", "markdown_phpextra",
"markdown_mmd", "markdown_strict"]
-> return $ literal str
+ Markua -> renderEmpty
_ | isEnabled Ext_raw_attribute opts -> rawAttribInline
| f `elem` ["html", "html5", "html4"]
, isEnabled Ext_raw_html opts
@@ -502,7 +575,11 @@ inlineToMarkdown opts (Cite (c:cs) lst)
then do
suffs <- inlineListToMarkdown opts $ citationSuffix c
rest <- mapM convertOne cs
- let inbr = suffs <+> joincits rest
+ let inbr = suffs <>
+ (if not (null (citationSuffix c)) && not (null rest)
+ then text ";"
+ else mempty)
+ <+> joincits rest
br = if isEmpty inbr then empty else char '[' <> inbr <> char ']'
return $ literal ("@" <> maybeInBraces (citationId c)) <+> br
else do
@@ -524,12 +601,14 @@ inlineToMarkdown opts (Cite (c:cs) lst)
sdoc <- inlineListToMarkdown opts sinlines
let k' = literal (modekey m <> "@" <> maybeInBraces k)
r = case sinlines of
- Str (T.uncons -> Just (y,_)):_ | y `elem` (",;]@" :: String) -> k' <> sdoc
- _ -> k' <+> sdoc
+ Str (T.uncons -> Just (y,_)):_
+ | y `elem` (",;]@" :: String) -> k' <> sdoc
+ Space:_ -> k' <> sdoc
+ _ -> k' <+> sdoc
return $ pdoc <+> r
modekey SuppressAuthor = "-"
modekey _ = ""
-inlineToMarkdown opts lnk@(Link attr txt (src, tit)) = do
+inlineToMarkdown opts lnk@(Link attr@(ident,classes,kvs) txt (src, tit)) = do
variant <- asks envVariant
linktext <- inlineListToMarkdown opts txt
let linktitle = if T.null tit
@@ -537,6 +616,9 @@ inlineToMarkdown opts lnk@(Link attr txt (src, tit)) = do
else literal $ " \"" <> tit <> "\""
let srcSuffix = fromMaybe src (T.stripPrefix "mailto:" src)
let useAuto = isURI src &&
+ T.null ident &&
+ null kvs &&
+ (null classes || classes == ["uri"] || classes == ["email"]) &&
case txt of
[Str s] | escapeURI s == srcSuffix -> True
_ -> False
@@ -551,6 +633,11 @@ inlineToMarkdown opts lnk@(Link attr txt (src, tit)) = do
PlainText
| useAuto -> return $ literal srcSuffix
| otherwise -> return linktext
+ Markua
+ | T.null tit -> return $ result <> attrsToMarkua attr
+ | otherwise -> return $ result <> attrsToMarkua attributes
+ where result = "[" <> linktext <> "](" <> (literal src) <> ")"
+ attributes = addKeyValueToAttr attr ("title", tit)
_ | useAuto -> return $ "<" <> literal srcSuffix <> ">"
| useRefLinks ->
let first = "[" <> linktext <> "]"
@@ -582,9 +669,16 @@ inlineToMarkdown opts img@(Image attr alternate (source, tit))
then [Str ""]
else alternate
linkPart <- inlineToMarkdown opts (Link attr txt (source, tit))
+ alt <- inlineListToMarkdown opts alternate
+ let attributes | variant == Markua = attrsToMarkua $
+ addKeyValueToAttr (addKeyValueToAttr attr ("title", tit))
+ ("alt", render (Just (writerColumns opts)) alt)
+ | otherwise = empty
return $ case variant of
- PlainText -> "[" <> linkPart <> "]"
- _ -> "!" <> linkPart
+ PlainText -> "[" <> linkPart <> "]"
+ Markua -> cr <> attributes <> cr <> literal "![](" <>
+ literal source <> ")" <> cr
+ _ -> "!" <> linkPart
inlineToMarkdown opts (Note contents) = do
modify (\st -> st{ stNotes = contents : stNotes st })
st <- get
diff --git a/src/Text/Pandoc/Writers/Markdown/Types.hs b/src/Text/Pandoc/Writers/Markdown/Types.hs
index a1d0d14e4..060446811 100644
--- a/src/Text/Pandoc/Writers/Markdown/Types.hs
+++ b/src/Text/Pandoc/Writers/Markdown/Types.hs
@@ -45,7 +45,8 @@ data WriterEnv = WriterEnv { envInList :: Bool
}
data MarkdownVariant =
- PlainText
+ Markua
+ | PlainText
| Commonmark
| Markdown
deriving (Show, Eq)
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs
index 5029be69f..f047baf1c 100644
--- a/src/Text/Pandoc/Writers/MediaWiki.hs
+++ b/src/Text/Pandoc/Writers/MediaWiki.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.MediaWiki
Copyright : Copyright (C) 2008-2021 John MacFarlane
@@ -91,8 +90,7 @@ blockToMediaWiki (Div attrs bs) = do
blockToMediaWiki (Plain inlines) =
inlineListToMediaWiki inlines
--- title beginning with fig: indicates that the image is a figure
-blockToMediaWiki (Para [Image attr txt (src,T.stripPrefix "fig:" -> Just tit)]) = do
+blockToMediaWiki (SimpleFigure attr txt (src, tit)) = do
capt <- inlineListToMediaWiki txt
img <- imageToMediaWiki attr
let opt = if T.null tit
@@ -130,10 +128,15 @@ blockToMediaWiki b@(RawBlock f str)
blockToMediaWiki HorizontalRule = return "\n-----\n"
-blockToMediaWiki (Header level _ inlines) = do
+blockToMediaWiki (Header level (ident,_,_) inlines) = do
+ let autoId = T.replace " " "_" $ stringify inlines
contents <- inlineListToMediaWiki inlines
let eqs = T.replicate level "="
- return $ eqs <> " " <> contents <> " " <> eqs <> "\n"
+ return $
+ (if T.null ident || autoId == ident
+ then ""
+ else "<span id=\"" <> ident <> "\"></span>\n")
+ <> eqs <> " " <> contents <> " " <> eqs <> "\n"
blockToMediaWiki (CodeBlock (_,classes,keyvals) str) = do
let at = Set.fromList classes `Set.intersection` highlightingLangs
diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs
index 97c23f24d..53763a609 100644
--- a/src/Text/Pandoc/Writers/Ms.hs
+++ b/src/Text/Pandoc/Writers/Ms.hs
@@ -21,7 +21,7 @@ TODO:
module Text.Pandoc.Writers.Ms ( writeMs ) where
import Control.Monad.State.Strict
-import Data.Char (isLower, isUpper, ord)
+import Data.Char (isAscii, isLower, isUpper, ord)
import Data.List (intercalate, intersperse)
import Data.List.NonEmpty (nonEmpty)
import qualified Data.Map as Map
@@ -46,6 +46,8 @@ import Text.Pandoc.Writers.Shared
import Text.Pandoc.Writers.Roff
import Text.Printf (printf)
import Text.TeXMath (writeEqn)
+import qualified Data.Text.Encoding as TE
+import qualified Data.ByteString as B
-- | Convert Pandoc to Ms.
writeMs :: PandocMonad m => WriterOptions -> Pandoc -> m Text
@@ -88,6 +90,21 @@ escapeStr :: WriterOptions -> Text -> Text
escapeStr opts =
escapeString (if writerPreferAscii opts then AsciiOnly else AllowUTF8)
+-- In PDFs we need to escape parentheses and backslash.
+-- In PDF we need to encode as UTF-16 BE.
+escapePDFString :: Text -> Text
+escapePDFString t
+ | T.all isAscii t =
+ T.replace "(" "\\(" . T.replace ")" "\\)" . T.replace "\\" "\\\\" $ t
+ | otherwise = ("\\376\\377" <>) . -- add bom
+ mconcat . map encodeChar . T.unpack $ t
+ where
+ encodeChar c =
+ if isAscii c && c /= '\\' && c /= '(' && c /= ')'
+ then "\\000" <> T.singleton c
+ else mconcat . map toOctal . B.unpack . TE.encodeUtf16BE $ T.singleton c
+ toOctal n = "\\" <> T.pack (printf "%03o" n)
+
escapeUri :: Text -> Text
escapeUri = T.pack . escapeURIString (\c -> c /= '@' && isAllowedInURI c) . T.unpack
@@ -143,7 +160,7 @@ blockToMs opts (Div (ident,cls,kvs) bs) = do
setFirstPara
return $ anchor $$ res
blockToMs opts (Plain inlines) =
- liftM vcat $ mapM (inlineListToMs' opts) $ splitSentences inlines
+ splitSentences <$> inlineListToMs' opts inlines
blockToMs opts (Para [Image attr alt (src,_tit)])
| let ext = takeExtension (T.unpack src) in (ext == ".ps" || ext == ".eps") = do
let (mbW,mbH) = (inPoints opts <$> dimension Width attr,
@@ -156,7 +173,7 @@ blockToMs opts (Para [Image attr alt (src,_tit)])
space <>
doubleQuotes (literal (tshow (floor hp :: Int)))
_ -> empty
- capt <- inlineListToMs' opts alt
+ capt <- splitSentences <$> inlineListToMs' opts alt
return $ nowrap (literal ".PSPIC -C " <>
doubleQuotes (literal (escapeStr opts src)) <>
sizeAttrs) $$
@@ -166,9 +183,9 @@ blockToMs opts (Para [Image attr alt (src,_tit)])
blockToMs opts (Para inlines) = do
firstPara <- gets stFirstPara
resetFirstPara
- contents <- liftM vcat $ mapM (inlineListToMs' opts) $
- splitSentences inlines
- return $ literal (if firstPara then ".LP" else ".PP") $$ contents
+ contents <- inlineListToMs' opts inlines
+ return $ literal (if firstPara then ".LP" else ".PP") $$
+ splitSentences contents
blockToMs _ b@(RawBlock f str)
| f == Format "ms" = return $ literal str
| otherwise = do
@@ -196,7 +213,7 @@ blockToMs opts (Header level (ident,classes,_) inlines) = do
(if T.null secnum
then ""
else " ") <>
- escapeStr opts (stringify inlines))
+ escapePDFString (stringify inlines))
let backlink = nowrap (literal ".pdfhref L -D " <>
doubleQuotes (literal (toAscii ident)) <> space <> literal "\\") <> cr <>
literal " -- "
diff --git a/src/Text/Pandoc/Writers/Native.hs b/src/Text/Pandoc/Writers/Native.hs
index 9c2ce805d..264b9c498 100644
--- a/src/Text/Pandoc/Writers/Native.hs
+++ b/src/Text/Pandoc/Writers/Native.hs
@@ -12,82 +12,20 @@ Conversion of a 'Pandoc' document to a string representation.
-}
module Text.Pandoc.Writers.Native ( writeNative )
where
-import Data.List (intersperse)
import Data.Text (Text)
+import qualified Data.Text as T
import Text.Pandoc.Class.PandocMonad (PandocMonad)
import Text.Pandoc.Definition
-import Text.Pandoc.Options (WrapOption (..), WriterOptions (..))
-import Text.DocLayout
-
-prettyList :: [Doc Text] -> Doc Text
-prettyList ds =
- "[" <>
- mconcat (intersperse (cr <> ",") $ map (nest 1) ds) <> "]"
-
--- | Prettyprint Pandoc block element.
-prettyBlock :: Block -> Doc Text
-prettyBlock (LineBlock lines') =
- "LineBlock" $$ prettyList (map (text . show) lines')
-prettyBlock (BlockQuote blocks) =
- "BlockQuote" $$ prettyList (map prettyBlock blocks)
-prettyBlock (OrderedList attribs blockLists) =
- "OrderedList" <> space <> text (show attribs) $$
- prettyList (map (prettyList . map prettyBlock) blockLists)
-prettyBlock (BulletList blockLists) =
- "BulletList" $$
- prettyList (map (prettyList . map prettyBlock) blockLists)
-prettyBlock (DefinitionList items) = "DefinitionList" $$
- prettyList (map deflistitem items)
- where deflistitem (term, defs) = "(" <> text (show term) <> "," <> cr <>
- nest 1 (prettyList $ map (prettyList . map prettyBlock) defs) <> ")"
-prettyBlock (Table attr blkCapt specs thead tbody tfoot) =
- mconcat [ "Table "
- , text (show attr)
- , " "
- , prettyCaption blkCapt ] $$
- prettyList (map (text . show) specs) $$
- prettyHead thead $$
- prettyBodies tbody $$
- prettyFoot tfoot
- where prettyRows = prettyList . map prettyRow
- prettyRow (Row a body) =
- text ("Row " <> show a) $$ prettyList (map prettyCell body)
- prettyCell (Cell a ma h w b) =
- mconcat [ "Cell "
- , text (show a)
- , " "
- , text (show ma)
- , " ("
- , text (show h)
- , ") ("
- , text (show w)
- , ")" ] $$
- prettyList (map prettyBlock b)
- prettyCaption (Caption mshort body) =
- "(Caption " <> text (showsPrec 11 mshort "") $$ prettyList (map prettyBlock body) <> ")"
- prettyHead (TableHead thattr body)
- = "(TableHead " <> text (show thattr) $$ prettyRows body <> ")"
- prettyBody (TableBody tbattr rhc hd bd)
- = mconcat [ "(TableBody "
- , text (show tbattr)
- , " ("
- , text (show rhc)
- , ")" ] $$ prettyRows hd $$ prettyRows bd <> ")"
- prettyBodies = prettyList . map prettyBody
- prettyFoot (TableFoot tfattr body)
- = "(TableFoot " <> text (show tfattr) $$ prettyRows body <> ")"
-prettyBlock (Div attr blocks) =
- text ("Div " <> show attr) $$ prettyList (map prettyBlock blocks)
-prettyBlock block = text $ show block
+import Text.Pandoc.Options (WriterOptions (..))
+import Text.Show.Pretty (ppDoc)
+import Text.PrettyPrint (renderStyle, Style(..), style, char)
-- | Prettyprint Pandoc document.
writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text
-writeNative opts (Pandoc meta blocks) = return $
- let colwidth = if writerWrapText opts == WrapAuto
- then Just $ writerColumns opts
- else Nothing
- withHead = case writerTemplate opts of
- Just _ -> \bs -> text ("Pandoc (" ++ show meta ++ ")") $$
- bs $$ cr
- Nothing -> id
- in render colwidth $ withHead $ prettyList $ map prettyBlock blocks
+writeNative opts (Pandoc meta blocks) = do
+ let style' = style{ lineLength = writerColumns opts,
+ ribbonsPerLine = 1.2 }
+ return $ T.pack $ renderStyle style' $
+ case writerTemplate opts of
+ Just _ -> ppDoc (Pandoc meta blocks) <> char '\n'
+ Nothing -> ppDoc blocks
diff --git a/src/Text/Pandoc/Writers/OpenDocument.hs b/src/Text/Pandoc/Writers/OpenDocument.hs
index 5f3224c2f..8af64969b 100644
--- a/src/Text/Pandoc/Writers/OpenDocument.hs
+++ b/src/Text/Pandoc/Writers/OpenDocument.hs
@@ -2,7 +2,6 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
-{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.OpenDocument
Copyright : Copyright (C) 2008-2020 Andrea Rossato and John MacFarlane
@@ -193,7 +192,7 @@ formulaStyle mt = inTags False "style:style"
,("style:vertical-rel", "text")]
else
[("style:vertical-pos", "middle")
- ,("style:vertical-rel", "paragraph-content")
+ ,("style:vertical-rel", "text")
,("style:horizontal-pos", "center")
,("style:horizontal-rel", "paragraph-content")
,("style:wrap", "none")]
@@ -377,7 +376,7 @@ blockToOpenDocument o = \case
Plain b -> if null b
then return empty
else inParagraphTags =<< inlinesToOpenDocument o b
- Para [Image attr c (s,T.stripPrefix "fig:" -> Just t)] -> figure attr c s t
+ SimpleFigure attr c (s, t) -> figure attr c s t
Para b -> if null b &&
not (isEnabled Ext_empty_paragraphs o)
then return empty
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index d404f1c8d..d2a383212 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -22,6 +22,7 @@ import Data.List (intersect, intersperse, partition, transpose)
import Data.List.NonEmpty (nonEmpty)
import Data.Text (Text)
import qualified Data.Text as T
+import qualified Data.Map as M
import Text.Pandoc.Class.PandocMonad (PandocMonad, report)
import Text.Pandoc.Definition
import Text.Pandoc.Logging
@@ -29,6 +30,7 @@ import Text.Pandoc.Options
import Text.DocLayout
import Text.Pandoc.Shared
import Text.Pandoc.Templates (renderTemplate)
+import Text.Pandoc.Citeproc.Locator (parseLocator, LocatorMap(..), LocatorInfo(..))
import Text.Pandoc.Writers.Shared
data WriterState =
@@ -103,11 +105,14 @@ blockToOrg :: PandocMonad m
=> Block -- ^ Block element
-> Org m (Doc Text)
blockToOrg Null = return empty
-blockToOrg (Div attr bs) = divToOrg attr bs
+blockToOrg (Div attr@(ident,_,_) bs) = do
+ opts <- gets stOptions
+ -- Strip off bibliography if citations enabled
+ if ident == "refs" && isEnabled Ext_citations opts
+ then return mempty
+ else divToOrg attr bs
blockToOrg (Plain inlines) = inlineListToOrg inlines
--- title beginning with fig: indicates that the image is a figure
-blockToOrg (Para [Image attr txt (src,tgt)])
- | Just tit <- T.stripPrefix "fig:" tgt = do
+blockToOrg (SimpleFigure attr txt (src, tit)) = do
capt <- if null txt
then return empty
else ("#+caption: " <>) `fmap` inlineListToOrg txt
@@ -154,7 +159,7 @@ blockToOrg (CodeBlock (_,classes,kvs) str) = do
let (beg, end) = case at of
[] -> ("#+begin_example" <> numberlines, "#+end_example")
(x:_) -> ("#+begin_src " <> x <> numberlines, "#+end_src")
- return $ literal beg $$ nest 2 (literal str) $$ text end $$ blankline
+ return $ literal beg $$ literal str $$ text end $$ blankline
blockToOrg (BlockQuote blocks) = do
contents <- blockListToOrg blocks
return $ blankline $$ "#+begin_quote" $$
@@ -398,7 +403,35 @@ inlineToOrg (Quoted SingleQuote lst) = do
inlineToOrg (Quoted DoubleQuote lst) = do
contents <- inlineListToOrg lst
return $ "\"" <> contents <> "\""
-inlineToOrg (Cite _ lst) = inlineListToOrg lst
+inlineToOrg (Cite cs lst) = do
+ opts <- gets stOptions
+ if isEnabled Ext_citations opts
+ then do
+ let renderCiteItem c = do
+ citePref <- inlineListToOrg (citationPrefix c)
+ let (locinfo, suffix) = parseLocator locmap (citationSuffix c)
+ citeSuff <- inlineListToOrg suffix
+ let locator = case locinfo of
+ Just info -> literal $
+ T.replace "\160" " " $
+ T.replace "{" "" $
+ T.replace "}" "" $ locatorRaw info
+ Nothing -> mempty
+ return $ hsep [ citePref
+ , ("@" <> literal (citationId c))
+ , locator
+ , citeSuff ]
+ citeItems <- mconcat . intersperse "; " <$> mapM renderCiteItem cs
+ let sty = case cs of
+ (d:_)
+ | citationMode d == AuthorInText
+ -> literal "/t"
+ [d]
+ | citationMode d == SuppressAuthor
+ -> literal "/na"
+ _ -> mempty
+ return $ "[cite" <> sty <> ":" <> citeItems <> "]"
+ else inlineListToOrg lst
inlineToOrg (Code _ str) = return $ "=" <> literal str <> "="
inlineToOrg (Str str) = return . literal $ escapeString str
inlineToOrg (Math t str) = do
@@ -461,20 +494,109 @@ pandocLangToOrg cs =
"c" -> "C"
"commonlisp" -> "lisp"
"r" -> "R"
- "bash" -> "shell"
- "lillypond" -> "ly"
+ "bash" -> "sh"
_ -> cs
-- | List of language identifiers recognized by org-mode.
+-- See <https://orgmode.org/manual/Languages.html>.
orgLangIdentifiers :: [Text]
orgLangIdentifiers =
- [ "abc", "asymptote", "awk", "axiom", "C", "cpp", "calc", "clojure","comint"
- , "coq", "css", "D", "ditaa", "dot", "ebnf", "elixir", "eukleides", "fomus"
- , "forth", "F90", "gnuplot", "Translate", "groovy", "haskell" , "browser"
- , "request", "io", "ipython", "J", "java", "js", "julia", "kotlin", "latex"
- , "ledger", "ly", "lisp", "Flavored", "makefile", "mathematica", "mathomatic"
- , "matlab", "max", "mongo", "mscgen", "cypher", "Caml", "octave" , "org", "oz"
- , "perl", "picolisp", "plantuml", "processing", "prolog", "python" , "R"
- , "rec", "ruby", "sass", "scala", "scheme", "screen", "sed", "shell", "shen"
- , "sql", "sqlite", "stan", "ML", "stata", "tcl", "typescript", "vala"
- ]
+ [ "asymptote"
+ , "lisp"
+ , "awk"
+ , "lua"
+ , "C"
+ , "matlab"
+ , "C++"
+ , "mscgen"
+ , "clojure"
+ , "ocaml"
+ , "css"
+ , "octave"
+ , "D"
+ , "org"
+ , "ditaa"
+ , "oz"
+ , "calc"
+ , "perl"
+ , "emacs-lisp"
+ , "plantuml"
+ , "eshell"
+ , "processing"
+ , "fortran"
+ , "python"
+ , "gnuplot"
+ , "R"
+ , "screen"
+ , "ruby"
+ , "dot"
+ , "sass"
+ , "haskell"
+ , "scheme"
+ , "java"
+ , "sed"
+ , "js"
+ , "sh"
+ , "latex"
+ , "sql"
+ , "ledger"
+ , "sqlite"
+ , "lilypond"
+ , "vala" ]
+
+-- taken from oc-csl.el in the org source tree:
+locmap :: LocatorMap
+locmap = LocatorMap $ M.fromList
+ [ ("bk." , "book")
+ , ("bks." , "book")
+ , ("book" , "book")
+ , ("chap." , "chapter")
+ , ("chaps." , "chapter")
+ , ("chapter" , "chapter")
+ , ("col." , "column")
+ , ("cols." , "column")
+ , ("column" , "column")
+ , ("figure" , "figure")
+ , ("fig." , "figure")
+ , ("figs." , "figure")
+ , ("folio" , "folio")
+ , ("fol." , "folio")
+ , ("fols." , "folio")
+ , ("number" , "number")
+ , ("no." , "number")
+ , ("nos." , "number")
+ , ("line" , "line")
+ , ("l." , "line")
+ , ("ll." , "line")
+ , ("note" , "note")
+ , ("n." , "note")
+ , ("nn." , "note")
+ , ("opus" , "opus")
+ , ("op." , "opus")
+ , ("opp." , "opus")
+ , ("page" , "page")
+ , ("p" , "page")
+ , ("p." , "page")
+ , ("pp." , "page")
+ , ("paragraph" , "paragraph")
+ , ("para." , "paragraph")
+ , ("paras." , "paragraph")
+ , ("¶" , "paragraph")
+ , ("¶¶" , "paragraph")
+ , ("part" , "part")
+ , ("pt." , "part")
+ , ("pts." , "part")
+ , ("§" , "section")
+ , ("§§" , "section")
+ , ("section" , "section")
+ , ("sec." , "section")
+ , ("secs." , "section")
+ , ("sub verbo" , "sub verbo")
+ , ("s.v." , "sub verbo")
+ , ("s.vv." , "sub verbo")
+ , ("verse" , "verse")
+ , ("v." , "verse")
+ , ("vv." , "verse")
+ , ("volume" , "volume")
+ , ("vol." , "volume")
+ , ("vols." , "volume") ]
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
index 157810216..e799297de 100644
--- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
@@ -1,5 +1,10 @@
+{-# LANGUAGE DeriveTraversable #-}
+{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE RecordWildCards #-}
+{-# LANGUAGE TupleSections #-}
{- |
Module : Text.Pandoc.Writers.Powerpoint.Output
Copyright : Copyright (C) 2017-2020 Jesse Rosenthal
@@ -21,14 +26,21 @@ import Control.Monad.Reader
import Control.Monad.State
import Codec.Archive.Zip
import Data.List (intercalate, stripPrefix, nub, union, isPrefixOf, intersperse)
+import Data.Bifunctor (bimap)
+import Data.CaseInsensitive (CI)
+import qualified Data.CaseInsensitive as CI
import Data.Default
+import Data.Foldable (toList)
+import Data.List.NonEmpty (nonEmpty, NonEmpty ((:|)))
+import Data.Ratio ((%), Ratio)
import Data.Text (Text)
import qualified Data.Text as T
-import qualified Data.Text.Read
+import Data.Text.Read (decimal)
import Data.Time (formatTime, defaultTimeLocale)
import Data.Time.Clock (UTCTime)
import Data.Time.Clock.POSIX (utcTimeToPOSIXSeconds, posixSecondsToUTCTime)
-import System.FilePath.Posix (splitDirectories, splitExtension, takeExtension)
+import Data.Traversable (for)
+import System.FilePath.Posix (splitDirectories, splitExtension, takeExtension, takeFileName)
import Text.Pandoc.XML.Light as XML
import Text.Pandoc.Definition
import qualified Text.Pandoc.UTF8 as UTF8
@@ -48,11 +60,11 @@ import System.FilePath.Glob
import Text.DocTemplates (FromContext(lookupContext), Context)
import Text.DocLayout (literal)
import Text.TeXMath
+import Text.Pandoc.Logging (LogMessage(PowerpointTemplateWarning))
import Text.Pandoc.Writers.Math (convertMath)
import Text.Pandoc.Writers.Powerpoint.Presentation
import Text.Pandoc.Shared (tshow, stringify)
import Skylighting (fromColor)
-import Data.List.NonEmpty (nonEmpty)
-- |The 'EMU' type is used to specify sizes in English Metric Units.
type EMU = Integer
@@ -105,11 +117,7 @@ data WriterEnv = WriterEnv { envRefArchive :: Archive
, envInList :: Bool
, envInNoteSlide :: Bool
, envCurSlideId :: Int
- -- the difference between the number at
- -- the end of the slide file name and
- -- the rId number
- , envSlideIdOffset :: Int
- , envContentType :: ContentType
+ , envPlaceholder :: Placeholder
, envSlideIdMap :: M.Map SlideId Int
-- maps the slide number to the
-- corresponding notes id number. If there
@@ -117,6 +125,8 @@ data WriterEnv = WriterEnv { envRefArchive :: Archive
-- no entry in the map for it.
, envSpeakerNotesIdMap :: M.Map Int Int
, envInSpeakerNotes :: Bool
+ , envSlideLayouts :: Maybe SlideLayouts
+ , envOtherStyleIndents :: Maybe Indents
}
deriving (Show)
@@ -131,17 +141,82 @@ instance Default WriterEnv where
, envInList = False
, envInNoteSlide = False
, envCurSlideId = 1
- , envSlideIdOffset = 1
- , envContentType = NormalContent
+ , envPlaceholder = Placeholder ObjType 0
, envSlideIdMap = mempty
, envSpeakerNotesIdMap = mempty
, envInSpeakerNotes = False
+ , envSlideLayouts = Nothing
+ , envOtherStyleIndents = Nothing
}
-data ContentType = NormalContent
- | TwoColumnLeftContent
- | TwoColumnRightContent
- deriving (Show, Eq)
+type SlideLayouts = SlideLayoutsOf SlideLayout
+
+data SlideLayoutsOf a = SlideLayouts
+ { metadata :: a
+ , title :: a
+ , content :: a
+ , twoColumn :: a
+ , comparison :: a
+ , contentWithCaption :: a
+ , blank :: a
+ } deriving (Show, Eq, Functor, Foldable, Traversable)
+
+data SlideLayout = SlideLayout
+ { slElement :: Element
+ , slInReferenceDoc :: Bool
+ -- ^ True if the layout is in the provided reference doc, False if it's in
+ -- the default reference doc.
+ , slPath :: FilePath
+ , slEntry :: Entry
+ } deriving (Show)
+
+getSlideLayouts :: PandocMonad m => P m SlideLayouts
+getSlideLayouts = asks envSlideLayouts >>= maybe (throwError e) pure
+ where
+ e = PandocSomeError ("Slide layouts aren't defined, even though they should "
+ <> "always be. This is a bug in pandoc.")
+
+-- | A placeholder within a layout, identified by type and index.
+--
+-- E.g., @Placeholder ObjType 2@ is the third placeholder of type 'ObjType' in
+-- the layout.
+data Placeholder = Placeholder
+ { placeholderType :: PHType
+ , index :: Int
+ } deriving (Show, Eq)
+
+-- | Paragraph indentation info.
+data Indents = Indents
+ { level1 :: Maybe LevelIndents
+ , level2 :: Maybe LevelIndents
+ , level3 :: Maybe LevelIndents
+ , level4 :: Maybe LevelIndents
+ , level5 :: Maybe LevelIndents
+ , level6 :: Maybe LevelIndents
+ , level7 :: Maybe LevelIndents
+ , level8 :: Maybe LevelIndents
+ , level9 :: Maybe LevelIndents
+ } deriving (Show, Eq)
+
+levelIndent :: Indents -> Int -> Maybe LevelIndents
+levelIndent is index = getter is
+ where
+ getter = case index of
+ 0 -> level1
+ 1 -> level2
+ 2 -> level3
+ 3 -> level4
+ 4 -> level5
+ 5 -> level6
+ 6 -> level7
+ 7 -> level8
+ 8 -> level9
+ _ -> const Nothing
+
+data LevelIndents = LevelIndents
+ { marL :: EMU
+ , indent :: EMU
+ } deriving (Show, Eq)
data MediaInfo = MediaInfo { mInfoFilePath :: FilePath
, mInfoLocalId :: Int
@@ -155,12 +230,14 @@ data WriterState = WriterState { stLinkIds :: M.Map Int (M.Map Int LinkTarget)
-- (FP, Local ID, Global ID, Maybe Mime)
, stMediaIds :: M.Map Int [MediaInfo]
, stMediaGlobalIds :: M.Map FilePath Int
+ , stFooterInfo :: Maybe FooterInfo
} deriving (Show, Eq)
instance Default WriterState where
def = WriterState { stLinkIds = mempty
, stMediaIds = mempty
, stMediaGlobalIds = mempty
+ , stFooterInfo = Nothing
}
type P m = ReaderT WriterEnv (StateT WriterState m)
@@ -199,11 +276,12 @@ alwaysInheritedPatterns =
, "ppt/slideLayouts/_rels/slideLayout*.xml.rels"
, "ppt/slideMasters/slideMaster1.xml"
, "ppt/slideMasters/_rels/slideMaster1.xml.rels"
- , "ppt/theme/theme1.xml"
- , "ppt/theme/_rels/theme1.xml.rels"
+ , "ppt/theme/theme*.xml"
+ , "ppt/theme/_rels/theme*.xml.rels"
, "ppt/presProps.xml"
, "ppt/tableStyles.xml"
, "ppt/media/image*"
+ , "ppt/fonts/*"
]
-- We only look for these under special conditions
@@ -212,8 +290,6 @@ contingentInheritedPatterns pres = [] <>
if presHasSpeakerNotes pres
then map compile [ "ppt/notesMasters/notesMaster*.xml"
, "ppt/notesMasters/_rels/notesMaster*.xml.rels"
- , "ppt/theme/theme2.xml"
- , "ppt/theme/_rels/theme2.xml.rels"
]
else []
@@ -264,7 +340,32 @@ presentationToArchiveP p@(Presentation docProps slides) = do
T.unlines (map (T.pack . (" " <>)) missingFiles)
)
- newArch' <- foldM copyFileToArchive emptyArchive filePaths
+ newArch <- foldM copyFileToArchive emptyArchive filePaths
+
+ -- Add any layouts taken from the default archive,
+ -- overwriting any already added.
+ slideLayouts <- getSlideLayouts
+ let f layout =
+ if not (slInReferenceDoc layout)
+ then addEntryToArchive (slEntry layout)
+ else id
+ let newArch' = foldr f newArch slideLayouts
+
+ master <- getMaster
+ refArchive <- asks envRefArchive
+ distArchive <- asks envDistArchive
+ presentationElement <- parseXml refArchive distArchive "ppt/presentation.xml"
+ modify (\s ->
+ s {stFooterInfo =
+ getFooterInfo (dcDate docProps) slideLayouts master presentationElement
+ })
+
+ -- Update the master to make sure it includes any layouts we've just added
+ masterRels <- getMasterRels
+ let (updatedMasterElem, updatedMasterRelElem) = updateMasterElems slideLayouts master masterRels
+ updatedMasterEntry <- elemToEntry "ppt/slideMasters/slideMaster1.xml" updatedMasterElem
+ updatedMasterRelEntry <- elemToEntry "ppt/slideMasters/_rels/slideMaster1.xml.rels" updatedMasterRelElem
+
-- we make a modified ppt/viewProps.xml out of the presentation viewProps
viewPropsEntry <- makeViewPropsEntry
-- we make a docProps/core.xml entry out of the presentation docprops
@@ -274,10 +375,9 @@ presentationToArchiveP p@(Presentation docProps slides) = do
-- we make this ourself in case there's something unexpected in the
-- one in the reference doc.
relsEntry <- topLevelRelsEntry
- -- presentation entry and rels. We have to do the rels first to make
- -- sure we know the correct offset for the rIds.
- presEntry <- presentationToPresEntry p
- presRelsEntry <- presentationToRelsEntry p
+ -- presentation entry and rels.
+ (presentationRIdUpdateData, presRelsEntry) <- presentationToRelsEntry p
+ presEntry <- presentationToPresEntry presentationRIdUpdateData p
slideEntries <- mapM slideToEntry slides
slideRelEntries <- mapM slideToSlideRelEntry slides
spkNotesEntries <- catMaybes <$> mapM slideToSpeakerNotesEntry slides
@@ -293,9 +393,169 @@ presentationToArchiveP p@(Presentation docProps slides) = do
spkNotesEntries <>
spkNotesRelEntries <>
mediaEntries <>
+ [updatedMasterEntry, updatedMasterRelEntry] <>
[contentTypesEntry, docPropsEntry, docCustomPropsEntry, relsEntry,
presEntry, presRelsEntry, viewPropsEntry]
+updateMasterElems :: SlideLayouts -> Element -> Element -> (Element, Element)
+updateMasterElems layouts master masterRels = (updatedMaster, updatedMasterRels)
+ where
+ updatedMaster = master { elContent = updateSldLayoutIdLst <$> elContent master }
+ (updatedRelationshipIds, updatedMasterRels) = addLayoutRels masterRels
+
+ updateSldLayoutIdLst :: Content -> Content
+ updateSldLayoutIdLst (Elem e) = case elName e of
+ (QName "sldLayoutIdLst" _ _) -> let
+ mkChild relationshipId (lastId, children) = let
+ thisId = lastId + 1
+ newChild = Element
+ { elName = QName "sldLayoutId" Nothing (Just "p")
+ , elAttribs =
+ [ Attr (QName "id" Nothing Nothing) (T.pack (show thisId))
+ , Attr (QName "id" Nothing (Just "r")) relationshipId
+ ]
+ , elContent = []
+ , elLine = Nothing
+ }
+ in (thisId, Elem newChild : children)
+ newChildren = snd (foldr mkChild (maxIdNumber' e, []) updatedRelationshipIds)
+ in Elem e { elContent = elContent e <> newChildren }
+ _ -> Elem e
+ updateSldLayoutIdLst c = c
+
+ addLayoutRels ::
+ Element ->
+ ([Text], Element)
+ addLayoutRels e = let
+ layoutsToAdd = filter (\l -> not (slInReferenceDoc l) && isNew e l)
+ (toList layouts)
+ newRelationships = snd (foldr mkRelationship (maxIdNumber e, []) layoutsToAdd)
+ newRelationshipIds =
+ mapMaybe (findElemAttr (QName "Id" Nothing Nothing)) newRelationships
+ mkRelationship layout (lastId, relationships) = let
+ thisId = lastId + 1
+ slideLayoutPath = "../slideLayouts/" <> T.pack (takeFileName (slPath layout))
+ newRelationship = Element
+ { elName = QName "Relationship" Nothing Nothing
+ , elAttribs =
+ [ Attr (QName "Id" Nothing Nothing) ("rId" <> T.pack (show thisId))
+ , Attr (QName "Type" Nothing Nothing) "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout"
+ , Attr (QName "Target" Nothing Nothing) slideLayoutPath
+ ]
+ , elContent = []
+ , elLine = Nothing
+ }
+ in (thisId, Elem newRelationship : relationships)
+ in (newRelationshipIds, e {elContent = elContent e <> newRelationships})
+
+ -- | Whether the layout needs to be added to the Relationships element.
+ isNew :: Element -> SlideLayout -> Bool
+ isNew relationships SlideLayout{..} = let
+ toDetails = fmap (takeFileName . T.unpack)
+ . findElemAttr (QName "Target" Nothing Nothing)
+ in takeFileName slPath `notElem` mapMaybe toDetails (elContent relationships)
+
+ findElemAttr :: QName -> Content -> Maybe Text
+ findElemAttr attr (Elem e) = findAttr attr e
+ findElemAttr _ _ = Nothing
+
+ maxIdNumber :: Element -> Integer
+ maxIdNumber relationships = maximum (0 : idNumbers)
+ where
+ idNumbers = mapMaybe (readTextAsInteger . T.drop 3) idAttributes
+ idAttributes = mapMaybe getIdAttribute (elContent relationships)
+ getIdAttribute (Elem e) = findAttr (QName "Id" Nothing Nothing) e
+ getIdAttribute _ = Nothing
+
+ maxIdNumber' :: Element -> Integer
+ maxIdNumber' sldLayouts = maximum (0 : idNumbers)
+ where
+ idNumbers = mapMaybe readTextAsInteger idAttributes
+ idAttributes = mapMaybe getIdAttribute (elContent sldLayouts)
+ getIdAttribute (Elem e) = findAttr (QName "id" Nothing Nothing) e
+ getIdAttribute _ = Nothing
+
+data FooterInfo = FooterInfo
+ { fiDate :: SlideLayoutsOf (Maybe Element)
+ , fiFooter :: SlideLayoutsOf (Maybe Element)
+ , fiSlideNumber :: SlideLayoutsOf (Maybe Element)
+ , fiShowOnFirstSlide :: Bool
+ } deriving (Show, Eq)
+
+getFooterInfo :: Maybe Text -> SlideLayouts -> Element -> Element -> Maybe FooterInfo
+getFooterInfo date layouts master presentation = do
+ let ns = elemToNameSpaces master
+ hf <- findChild (elemName ns "p" "hf") master
+ let fiDate = let
+ f layoutDate =
+ case date of
+ Nothing -> layoutDate
+ Just d ->
+ if dateIsAutomatic (elemToNameSpaces layoutDate) layoutDate
+ then layoutDate
+ else replaceDate d layoutDate
+ in fmap f . getShape "dt" hf . slElement <$> layouts
+ fiFooter = getShape "ftr" hf . slElement <$> layouts
+ fiSlideNumber = getShape "sldNum" hf . slElement <$> layouts
+ fiShowOnFirstSlide =
+ fromMaybe True
+ (getBooleanAttribute "showSpecialPlsOnTitleSld" presentation)
+ pure FooterInfo{..}
+ where
+ getShape t hf layout =
+ if fromMaybe True (getBooleanAttribute t hf)
+ then do
+ let ns = elemToNameSpaces layout
+ cSld <- findChild (elemName ns "p" "cSld") layout
+ spTree <- findChild (elemName ns "p" "spTree") cSld
+ let containsPlaceholder sp = fromMaybe False $ do
+ nvSpPr <- findChild (elemName ns "p" "nvSpPr") sp
+ nvPr <- findChild (elemName ns "p" "nvPr") nvSpPr
+ ph <- findChild (elemName ns "p" "ph") nvPr
+ placeholderType <- findAttr (QName "type" Nothing Nothing) ph
+ pure (placeholderType == t)
+ listToMaybe (filterChildren containsPlaceholder spTree)
+ else Nothing
+
+ dateIsAutomatic :: NameSpaces -> Element -> Bool
+ dateIsAutomatic ns shape = isJust $ do
+ txBody <- findChild (elemName ns "p" "txBody") shape
+ p <- findChild (elemName ns "a" "p") txBody
+ findChild (elemName ns "a" "fld") p
+
+ replaceDate :: Text -> Element -> Element
+ replaceDate newDate e =
+ e { elContent =
+ case (elName e) of
+ QName "t" _ (Just "a") ->
+ [ Text (CData { cdVerbatim = CDataText
+ , cdData = newDate
+ , cdLine = Nothing
+ })
+ ]
+ _ -> ifElem (replaceDate newDate) <$> elContent e
+ }
+
+ ifElem :: (Element -> Element) -> (Content -> Content)
+ ifElem f (Elem e) = Elem (f e)
+ ifElem _ c = c
+
+ getBooleanAttribute t e =
+ (`elem` ["1", "true"]) <$>
+ (findAttr (QName t Nothing Nothing) e)
+
+footerElements ::
+ PandocMonad m =>
+ (forall a. SlideLayoutsOf a -> a) ->
+ P m [Content]
+footerElements layout = do
+ footerInfo <- gets stFooterInfo
+ pure
+ $ Elem <$>
+ (toList (footerInfo >>= layout . fiDate)
+ <> toList (footerInfo >>= layout . fiFooter)
+ <> toList (footerInfo >>= layout . fiSlideNumber))
+
makeSlideIdMap :: Presentation -> M.Map SlideId Int
makeSlideIdMap (Presentation _ slides) =
M.fromList $ map slideId slides `zip` [1..]
@@ -304,9 +564,9 @@ makeSpeakerNotesMap :: Presentation -> M.Map Int Int
makeSpeakerNotesMap (Presentation _ slides) =
M.fromList $
mapMaybe f (slides `zip` [1..]) `zip` [1..]
- where f (Slide _ _ notes, n) = if notes == mempty
- then Nothing
- else Just n
+ where f (Slide _ _ notes _, n) = if notes == mempty
+ then Nothing
+ else Just n
presentationToArchive :: PandocMonad m
=> WriterOptions -> Meta -> Presentation -> m Archive
@@ -318,6 +578,71 @@ presentationToArchive opts meta pres = do
Nothing -> toArchive . BL.fromStrict <$>
P.readDataFile "reference.pptx"
+ let (referenceLayouts, defaultReferenceLayouts) =
+ (getLayoutsFromArchive refArchive, getLayoutsFromArchive distArchive)
+ let layoutTitles = SlideLayouts { metadata = "Title Slide" :: Text
+ , title = "Section Header"
+ , content = "Title and Content"
+ , twoColumn = "Two Content"
+ , comparison = "Comparison"
+ , contentWithCaption = "Content with Caption"
+ , blank = "Blank"
+ }
+ layouts <- for layoutTitles $ \layoutTitle -> do
+ let layout = M.lookup (CI.mk layoutTitle) referenceLayouts
+ let defaultLayout = M.lookup (CI.mk layoutTitle) defaultReferenceLayouts
+ case (layout, defaultLayout) of
+ (Nothing, Nothing) ->
+ throwError (PandocSomeError ("Couldn't find layout named \""
+ <> layoutTitle <> "\" in the provided "
+ <> "reference doc or in the default "
+ <> "reference doc included with pandoc."))
+ (Nothing, Just ((element, path, entry) :| _)) -> do
+ P.report (PowerpointTemplateWarning
+ ("Couldn't find layout named \""
+ <> layoutTitle <> "\" in provided "
+ <> "reference doc. Falling back to "
+ <> "the default included with pandoc."))
+ pure SlideLayout { slElement = element
+ , slPath = path
+ , slEntry = entry
+ , slInReferenceDoc = False
+ }
+ (Just ((element, path, entry) :| _), _ ) ->
+ pure SlideLayout { slElement = element
+ , slPath = path
+ , slEntry = entry
+ , slInReferenceDoc = True
+ }
+
+ master <- getMaster' refArchive distArchive
+
+ let otherStyleIndents = do
+ let ns = elemToNameSpaces master
+ txStyles <- findChild (elemName ns "p" "txStyles") master
+ otherStyle <- findChild (elemName ns "p" "otherStyle") txStyles
+ let makeLevelIndents name = do
+ e <- findChild (elemName ns "a" name) otherStyle
+ pure LevelIndents
+ { indent = fromMaybe (-342900)
+ (findAttr (QName "indent" Nothing Nothing) e
+ >>= readTextAsInteger)
+ , marL = fromMaybe 347663
+ (findAttr (QName "marL" Nothing Nothing) e
+ >>= readTextAsInteger)
+ }
+ pure Indents
+ { level1 = makeLevelIndents "lvl1pPr"
+ , level2 = makeLevelIndents "lvl2pPr"
+ , level3 = makeLevelIndents "lvl3pPr"
+ , level4 = makeLevelIndents "lvl4pPr"
+ , level5 = makeLevelIndents "lvl5pPr"
+ , level6 = makeLevelIndents "lvl6pPr"
+ , level7 = makeLevelIndents "lvl7pPr"
+ , level8 = makeLevelIndents "lvl8pPr"
+ , level9 = makeLevelIndents "lvl9pPr"
+ }
+
utctime <- P.getTimestamp
presSize <- case getPresentationSize refArchive distArchive of
@@ -341,6 +666,8 @@ presentationToArchive opts meta pres = do
, envPresentationSize = presSize
, envSlideIdMap = makeSlideIdMap pres
, envSpeakerNotesIdMap = makeSpeakerNotesMap pres
+ , envSlideLayouts = Just layouts
+ , envOtherStyleIndents = otherStyleIndents
}
let st = def { stMediaGlobalIds = initialGlobalIds refArchive distArchive
@@ -348,7 +675,30 @@ presentationToArchive opts meta pres = do
runP env st $ presentationToArchiveP pres
-
+-- | Get all slide layouts from an archive, as a map where the layout's name
+-- gives the map key.
+--
+-- For each layout, the map contains its XML representation, its path within
+-- the archive, and the archive entry.
+getLayoutsFromArchive :: Archive -> M.Map (CI Text) (NonEmpty (Element, FilePath, Entry))
+getLayoutsFromArchive archive =
+ M.fromListWith (<>) ((\t@(e, _, _) -> (CI.mk (name e), pure t)) <$> layouts)
+ where
+ layouts :: [(Element, FilePath, Entry)]
+ layouts = mapMaybe findElementByPath paths
+ parseXml' entry = case parseXMLElement (UTF8.toTextLazy (fromEntry entry)) of
+ Left _ -> Nothing
+ Right element -> Just element
+ findElementByPath :: FilePath -> Maybe (Element, FilePath, Entry)
+ findElementByPath path = do
+ entry <- findEntryByPath path archive
+ element <- parseXml' entry
+ pure (element, path, entry)
+ paths = filter (match (compile "ppt/slideLayouts/slideLayout*.xml")) (filesInArchive archive)
+ name element = fromMaybe "Untitled layout" $ do
+ let ns = elemToNameSpaces element
+ cSld <- findChild (elemName ns "p" "cSld") element
+ findAttr (QName "name" Nothing Nothing) cSld
--------------------------------------------------
@@ -365,38 +715,59 @@ curSlideHasSpeakerNotes =
--------------------------------------------------
getLayout :: PandocMonad m => Layout -> P m Element
-getLayout layout = do
- let layoutpath = case layout of
- MetadataSlide{} -> "ppt/slideLayouts/slideLayout1.xml"
- TitleSlide{} -> "ppt/slideLayouts/slideLayout3.xml"
- ContentSlide{} -> "ppt/slideLayouts/slideLayout2.xml"
- TwoColumnSlide{} -> "ppt/slideLayouts/slideLayout4.xml"
- refArchive <- asks envRefArchive
- distArchive <- asks envDistArchive
- parseXml refArchive distArchive layoutpath
+getLayout layout = getElement <$> getSlideLayouts
+ where
+ getElement =
+ slElement . case layout of
+ MetadataSlide{} -> metadata
+ TitleSlide{} -> title
+ ContentSlide{} -> content
+ TwoColumnSlide{} -> twoColumn
+ ComparisonSlide{} -> comparison
+ ContentWithCaptionSlide{} -> contentWithCaption
+ BlankSlide{} -> blank
shapeHasId :: NameSpaces -> T.Text -> Element -> Bool
-shapeHasId ns ident element
- | Just nvSpPr <- findChild (elemName ns "p" "nvSpPr") element
- , Just cNvPr <- findChild (elemName ns "p" "cNvPr") nvSpPr
- , Just nm <- findAttr (QName "id" Nothing Nothing) cNvPr =
- nm == ident
- | otherwise = False
+shapeHasId ns ident element = getShapeId ns element == Just ident
-getContentShape :: PandocMonad m => NameSpaces -> Element -> P m Element
+getShapeId :: NameSpaces -> Element -> Maybe Text
+getShapeId ns element = do
+ nvSpPr <- findChild (elemName ns "p" "nvSpPr") element
+ cNvPr <- findChild (elemName ns "p" "cNvPr") nvSpPr
+ findAttr (QName "id" Nothing Nothing) cNvPr
+
+type ShapeId = Integer
+
+getContentShape :: PandocMonad m => NameSpaces -> Element -> P m (Maybe ShapeId, Element)
getContentShape ns spTreeElem
| isElem ns "p" "spTree" spTreeElem = do
- contentType <- asks envContentType
- let contentShapes = getShapesByPlaceHolderType ns spTreeElem ObjType
- case contentType of
- NormalContent | (sp : _) <- contentShapes -> return sp
- TwoColumnLeftContent | (sp : _) <- contentShapes -> return sp
- TwoColumnRightContent | (_ : sp : _) <- contentShapes -> return sp
- _ -> throwError $ PandocSomeError
- "Could not find shape for Powerpoint content"
+ ph@Placeholder{index, placeholderType} <- asks envPlaceholder
+ case drop index (getShapesByPlaceHolderType ns spTreeElem placeholderType) of
+ sp : _ -> let
+ shapeId = getShapeId ns sp >>= readTextAsInteger
+ in return (shapeId, sp)
+ [] -> throwError $ PandocSomeError $ missingPlaceholderMessage ph
getContentShape _ _ = throwError $ PandocSomeError
"Attempted to find content on non shapeTree"
+missingPlaceholderMessage :: Placeholder -> Text
+missingPlaceholderMessage Placeholder{..} =
+ "Could not find a " <> ordinal
+ <> " placeholder of type " <> placeholderText
+ where
+ ordinal = T.pack (show index) <>
+ case (index `mod` 100, index `mod` 10) of
+ (11, _) -> "th"
+ (12, _) -> "th"
+ (13, _) -> "th"
+ (_, 1) -> "st"
+ (_, 2) -> "nd"
+ (_, 3) -> "rd"
+ _ -> "th"
+ placeholderText = case placeholderType of
+ ObjType -> "obj (or nothing)"
+ PHType t -> t
+
getShapeDimensions :: NameSpaces
-> Element
-> Maybe ((Integer, Integer), (Integer, Integer))
@@ -438,7 +809,7 @@ getContentShapeSize ns layout master
| isElem ns "p" "sldLayout" layout
, Just cSld <- findChild (elemName ns "p" "cSld") layout
, Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
- sp <- getContentShape ns spTree
+ (_, sp) <- getContentShape ns spTree
case getShapeDimensions ns sp of
Just sz -> return sz
Nothing -> do let mbSz =
@@ -602,8 +973,18 @@ getMaster :: PandocMonad m => P m Element
getMaster = do
refArchive <- asks envRefArchive
distArchive <- asks envDistArchive
+ getMaster' refArchive distArchive
+
+getMaster' :: PandocMonad m => Archive -> Archive -> m Element
+getMaster' refArchive distArchive =
parseXml refArchive distArchive "ppt/slideMasters/slideMaster1.xml"
+getMasterRels :: PandocMonad m => P m Element
+getMasterRels = do
+ refArchive <- asks envRefArchive
+ distArchive <- asks envDistArchive
+ parseXml refArchive distArchive "ppt/slideMasters/_rels/slideMaster1.xml.rels"
+
-- We want to get the header dimensions, so we can make sure that the
-- image goes underneath it. We only use this in a content slide if it
-- has a header.
@@ -654,41 +1035,44 @@ captionHeight = 40
createCaption :: PandocMonad m
=> ((Integer, Integer), (Integer, Integer))
-> [ParaElem]
- -> P m Element
+ -> P m (ShapeId, Element)
createCaption contentShapeDimensions paraElements = do
let para = Paragraph def{pPropAlign = Just AlgnCenter} paraElements
elements <- mapM paragraphToElement [para]
let ((x, y), (cx, cy)) = contentShapeDimensions
let txBody = mknode "p:txBody" [] $
[mknode "a:bodyPr" [] (), mknode "a:lstStyle" [] ()] <> elements
- return $
- mknode "p:sp" [] [ mknode "p:nvSpPr" []
- [ mknode "p:cNvPr" [("id","1"), ("name","TextBox 3")] ()
- , mknode "p:cNvSpPr" [("txBox", "1")] ()
- , mknode "p:nvPr" [] ()
- ]
- , mknode "p:spPr" []
- [ mknode "a:xfrm" []
- [ mknode "a:off" [("x", tshow $ 12700 * x),
- ("y", tshow $ 12700 * (y + cy - captionHeight))] ()
- , mknode "a:ext" [("cx", tshow $ 12700 * cx),
- ("cy", tshow $ 12700 * captionHeight)] ()
- ]
- , mknode "a:prstGeom" [("prst", "rect")]
- [ mknode "a:avLst" [] ()
- ]
- , mknode "a:noFill" [] ()
- ]
- , txBody
- ]
+ return
+ ( 1
+ , mknode "p:sp" [] [ mknode "p:nvSpPr" []
+ [ mknode "p:cNvPr" [("id","1"), ("name","TextBox 3")] ()
+ , mknode "p:cNvSpPr" [("txBox", "1")] ()
+ , mknode "p:nvPr" [] ()
+ ]
+ , mknode "p:spPr" []
+ [ mknode "a:xfrm" []
+ [ mknode "a:off" [("x", tshow $ 12700 * x),
+ ("y", tshow $ 12700 * (y + cy - captionHeight))] ()
+ , mknode "a:ext" [("cx", tshow $ 12700 * cx),
+ ("cy", tshow $ 12700 * captionHeight)] ()
+ ]
+ , mknode "a:prstGeom" [("prst", "rect")]
+ [ mknode "a:avLst" [] ()
+ ]
+ , mknode "a:noFill" [] ()
+ ]
+ , txBody
+ ]
+ )
makePicElements :: PandocMonad m
=> Element
-> PicProps
-> MediaInfo
+ -> Text
-> [ParaElem]
- -> P m [Element]
-makePicElements layout picProps mInfo alt = do
+ -> P m [(ShapeId, Element)]
+makePicElements layout picProps mInfo titleText alt = do
opts <- asks envOpts
(pageWidth, pageHeight) <- asks envPresentationSize
-- hasHeader <- asks envSlideHasHeader
@@ -721,7 +1105,11 @@ makePicElements layout picProps mInfo alt = do
,("noChangeAspect","1")] ()
-- cNvPr will contain the link information so we do that separately,
-- and register the link if necessary.
- let cNvPrAttr = [("descr", T.pack $ mInfoFilePath mInfo),
+ let description = (if T.null titleText
+ then ""
+ else titleText <> "\n\n")
+ <> T.pack (mInfoFilePath mInfo)
+ let cNvPrAttr = [("descr", description),
("id","0"),
("name","Picture 1")]
cNvPr <- case picPropLink picProps of
@@ -751,10 +1139,12 @@ makePicElements layout picProps mInfo alt = do
let spPr = mknode "p:spPr" [("bwMode","auto")]
[xfrm, prstGeom, mknode "a:noFill" [] (), ln]
- let picShape = mknode "p:pic" []
- [ nvPicPr
- , blipFill
- , spPr ]
+ let picShape = ( 0
+ , mknode "p:pic" []
+ [ nvPicPr
+ , blipFill
+ , spPr ]
+ )
-- And now, maybe create the caption:
if hasCaption
@@ -762,6 +1152,12 @@ makePicElements layout picProps mInfo alt = do
return [picShape, cap]
else return [picShape]
+consolidateRuns :: [ParaElem] -> [ParaElem]
+consolidateRuns [] = []
+consolidateRuns (Run pr1 s1 : Run pr2 s2 : xs)
+ | pr1 == pr2 = consolidateRuns (Run pr1 (s1 <> s2) : xs)
+consolidateRuns (x:xs) = x : consolidateRuns xs
+
paraElemToElements :: PandocMonad m => ParaElem -> P m [Content]
paraElemToElements Break = return [Elem $ mknode "a:br" [] ()]
@@ -867,15 +1263,32 @@ surroundWithMathAlternate element =
paragraphToElement :: PandocMonad m => Paragraph -> P m Element
paragraphToElement par = do
+ indents <- asks envOtherStyleIndents
let
- attrs = [("lvl", tshow $ pPropLevel $ paraProps par)] <>
- (case pPropMarginLeft (paraProps par) of
- Just px -> [("marL", tshow $ pixelsToEmu px)]
- Nothing -> []
- ) <>
- (case pPropIndent (paraProps par) of
- Just px -> [("indent", tshow $ pixelsToEmu px)]
- Nothing -> []
+ lvl = pPropLevel (paraProps par)
+ attrs = [("lvl", tshow lvl)] <>
+ (case (pPropIndent (paraProps par), pPropMarginLeft (paraProps par)) of
+ (Just px1, Just px2) -> [ ("indent", tshow $ pixelsToEmu px1)
+ , ("marL", tshow $ pixelsToEmu px2)
+ ]
+ (Just px1, Nothing) -> [("indent", tshow $ pixelsToEmu px1)]
+ (Nothing, Just px2) -> [("marL", tshow $ pixelsToEmu px2)]
+ (Nothing, Nothing) -> fromMaybe [] $ do
+ indents' <- indents
+ thisLevel <- levelIndent indents' lvl
+ nextLevel <- levelIndent indents' (lvl + 1)
+ let (m, i) =
+ case pPropBullet (paraProps par) of
+ Nothing ->
+ (Just (marL thisLevel), Just 0)
+ Just (AutoNumbering _) ->
+ ( Just (marL nextLevel)
+ , Just (marL thisLevel - marL nextLevel)
+ )
+ Just Bullet -> (Nothing, Nothing)
+ pure ( toList ((,) "indent" . tshow <$> i)
+ <> toList ((,) "marL" . tshow <$> m)
+ )
) <>
(case pPropAlign (paraProps par) of
Just AlgnLeft -> [("algn", "l")]
@@ -897,48 +1310,53 @@ paragraphToElement par = do
[mknode "a:buAutoNum" (autoNumAttrs attrs') ()]
Nothing -> [mknode "a:buNone" [] ()]
)
- paras <- mapM paraElemToElements (paraElems par)
- return $ mknode "a:p" [] $
- [Elem $ mknode "a:pPr" attrs props] <> concat paras
+ paras <- mconcat <$> mapM paraElemToElements (consolidateRuns (paraElems par))
+ return $ mknode "a:p" [] $ [Elem $ mknode "a:pPr" attrs props] <> paras
-shapeToElement :: PandocMonad m => Element -> Shape -> P m Element
+shapeToElement :: PandocMonad m => Element -> Shape -> P m (Maybe ShapeId, Element)
shapeToElement layout (TextBox paras)
| ns <- elemToNameSpaces layout
, Just cSld <- findChild (elemName ns "p" "cSld") layout
, Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
- sp <- getContentShape ns spTree
+ (shapeId, sp) <- getContentShape ns spTree
elements <- mapM paragraphToElement paras
let txBody = mknode "p:txBody" [] $
[mknode "a:bodyPr" [] (), mknode "a:lstStyle" [] ()] <> elements
emptySpPr = mknode "p:spPr" [] ()
return
+ . (shapeId,)
. surroundWithMathAlternate
. replaceNamedChildren ns "p" "txBody" [txBody]
. replaceNamedChildren ns "p" "spPr" [emptySpPr]
$ sp
-- GraphicFrame and Pic should never reach this.
-shapeToElement _ _ = return $ mknode "p:sp" [] ()
+shapeToElement _ _ = return (Nothing, mknode "p:sp" [] ())
-shapeToElements :: PandocMonad m => Element -> Shape -> P m [Content]
-shapeToElements layout (Pic picProps fp alt) = do
+shapeToElements :: PandocMonad m => Element -> Shape -> P m [(Maybe ShapeId, Content)]
+shapeToElements layout (Pic picProps fp titleText alt) = do
mInfo <- registerMedia fp alt
case mInfoExt mInfo of
- Just _ -> map Elem <$>
- makePicElements layout picProps mInfo alt
+ Just _ -> map (bimap Just Elem) <$>
+ makePicElements layout picProps mInfo titleText alt
Nothing -> shapeToElements layout $ TextBox [Paragraph def alt]
-shapeToElements layout (GraphicFrame tbls cptn) = map Elem <$>
+shapeToElements layout (GraphicFrame tbls cptn) = map (bimap Just Elem) <$>
graphicFrameToElements layout tbls cptn
shapeToElements _ (RawOOXMLShape str) = return
- [Text (CData CDataRaw str Nothing)]
+ [(Nothing, Text (CData CDataRaw str Nothing))]
shapeToElements layout shp = do
- element <- shapeToElement layout shp
- return [Elem element]
+ (shapeId, element) <- shapeToElement layout shp
+ return [(shapeId, Elem element)]
-shapesToElements :: PandocMonad m => Element -> [Shape] -> P m [Content]
+shapesToElements :: PandocMonad m => Element -> [Shape] -> P m [(Maybe ShapeId, Content)]
shapesToElements layout shps =
concat <$> mapM (shapeToElements layout) shps
-graphicFrameToElements :: PandocMonad m => Element -> [Graphic] -> [ParaElem] -> P m [Element]
+graphicFrameToElements ::
+ PandocMonad m =>
+ Element ->
+ [Graphic] ->
+ [ParaElem] ->
+ P m [(ShapeId, Element)]
graphicFrameToElements layout tbls caption = do
-- get the sizing
master <- getMaster
@@ -952,21 +1370,23 @@ graphicFrameToElements layout tbls caption = do
elements <- mapM (graphicToElement cx) tbls
let graphicFrameElts =
- mknode "p:graphicFrame" [] $
- [ mknode "p:nvGraphicFramePr" []
- [ mknode "p:cNvPr" [("id", "6"), ("name", "Content Placeholder 5")] ()
- , mknode "p:cNvGraphicFramePr" []
- [mknode "a:graphicFrameLocks" [("noGrp", "1")] ()]
- , mknode "p:nvPr" []
- [mknode "p:ph" [("idx", "1")] ()]
- ]
- , mknode "p:xfrm" []
- [ mknode "a:off" [("x", tshow $ 12700 * x),
- ("y", tshow $ 12700 * y)] ()
- , mknode "a:ext" [("cx", tshow $ 12700 * cx),
- ("cy", tshow $ 12700 * cy)] ()
- ]
- ] <> elements
+ ( 6
+ , mknode "p:graphicFrame" [] $
+ [ mknode "p:nvGraphicFramePr" []
+ [ mknode "p:cNvPr" [("id", "6"), ("name", "Content Placeholder 5")] ()
+ , mknode "p:cNvGraphicFramePr" []
+ [mknode "a:graphicFrameLocks" [("noGrp", "1")] ()]
+ , mknode "p:nvPr" []
+ [mknode "p:ph" [("idx", "1")] ()]
+ ]
+ , mknode "p:xfrm" []
+ [ mknode "a:off" [("x", tshow $ 12700 * x),
+ ("y", tshow $ 12700 * y)] ()
+ , mknode "a:ext" [("cx", tshow $ 12700 * cx),
+ ("cy", tshow $ 12700 * cy)] ()
+ ]
+ ] <> elements
+ )
if not $ null caption
then do capElt <- createCaption ((x, y), (cx, cytmp)) caption
@@ -1088,124 +1508,433 @@ getShapeByPlaceHolderTypes ns spTreeElem (s:ss) =
Just element -> Just element
Nothing -> getShapeByPlaceHolderTypes ns spTreeElem ss
-nonBodyTextToElement :: PandocMonad m => Element -> [PHType] -> [ParaElem] -> P m Element
+nonBodyTextToElement ::
+ PandocMonad m =>
+ Element ->
+ [PHType] ->
+ [ParaElem] ->
+ P m (Maybe ShapeId, Element)
nonBodyTextToElement layout phTypes paraElements
| ns <- elemToNameSpaces layout
, Just cSld <- findChild (elemName ns "p" "cSld") layout
, Just spTree <- findChild (elemName ns "p" "spTree") cSld
- , Just sp <- getShapeByPlaceHolderTypes ns spTree phTypes = do
+ , Just sp <- getShapeByPlaceHolderTypes ns spTree phTypes
+ , Just nvSpPr <- findChild (elemName ns "p" "nvSpPr") sp
+ , Just cNvPr <- findChild (elemName ns "p" "cNvPr") nvSpPr
+ , Just shapeId <- findAttr (nodename "id") cNvPr
+ , Right (shapeIdNum, _) <- decimal shapeId = do
let hdrPara = Paragraph def paraElements
element <- paragraphToElement hdrPara
let txBody = mknode "p:txBody" [] $
[mknode "a:bodyPr" [] (), mknode "a:lstStyle" [] ()] <>
[element]
- return $ replaceNamedChildren ns "p" "txBody" [txBody] sp
+ return (Just shapeIdNum, replaceNamedChildren ns "p" "txBody" [txBody] sp)
-- XXX: TODO
- | otherwise = return $ mknode "p:sp" [] ()
-
-contentToElement :: PandocMonad m => Element -> [ParaElem] -> [Shape] -> P m Element
+ | otherwise = return (Nothing, mknode "p:sp" [] ())
+
+data ContentShapeIds = ContentShapeIds
+ { contentHeaderId :: Maybe ShapeId
+ , contentContentIds :: [ShapeId]
+ }
+
+contentToElement ::
+ PandocMonad m =>
+ Element ->
+ [ParaElem] ->
+ [Shape] ->
+ P m (Maybe ContentShapeIds, Element)
contentToElement layout hdrShape shapes
| ns <- elemToNameSpaces layout
, Just cSld <- findChild (elemName ns "p" "cSld") layout
, Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
- element <- nonBodyTextToElement layout [PHType "title"] hdrShape
+ (shapeId, element) <- nonBodyTextToElement layout [PHType "title"] hdrShape
let hdrShapeElements = [Elem element | not (null hdrShape)]
- contentElements <- local
- (\env -> env {envContentType = NormalContent})
+ contentHeaderId = if null hdrShape then Nothing else shapeId
+ content' <- local
+ (\env -> env {envPlaceholder = Placeholder ObjType 0})
(shapesToElements layout shapes)
- return $ buildSpTree ns spTree (hdrShapeElements <> contentElements)
-contentToElement _ _ _ = return $ mknode "p:sp" [] ()
-
-twoColumnToElement :: PandocMonad m => Element -> [ParaElem] -> [Shape] -> [Shape] -> P m Element
+ let contentContentIds = mapMaybe fst content'
+ contentElements = snd <$> content'
+ footer <- footerElements content
+ return ( Just ContentShapeIds{..}
+ , buildSpTree ns spTree (hdrShapeElements <> contentElements <> footer)
+ )
+contentToElement _ _ _ = return (Nothing, mknode "p:sp" [] ())
+
+data TwoColumnShapeIds = TwoColumnShapeIds
+ { twoColumnHeaderId :: Maybe ShapeId
+ , twoColumnLeftIds :: [ShapeId]
+ , twoColumnRightIds :: [ShapeId]
+ }
+
+twoColumnToElement ::
+ PandocMonad m =>
+ Element ->
+ [ParaElem] ->
+ [Shape] ->
+ [Shape] ->
+ P m (Maybe TwoColumnShapeIds, Element)
twoColumnToElement layout hdrShape shapesL shapesR
| ns <- elemToNameSpaces layout
, Just cSld <- findChild (elemName ns "p" "cSld") layout
, Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
- element <- nonBodyTextToElement layout [PHType "title"] hdrShape
+ (headerId, element) <- nonBodyTextToElement layout [PHType "title"] hdrShape
let hdrShapeElements = [Elem element | not (null hdrShape)]
- contentElementsL <- local
- (\env -> env {envContentType =TwoColumnLeftContent})
- (shapesToElements layout shapesL)
- contentElementsR <- local
- (\env -> env {envContentType =TwoColumnRightContent})
- (shapesToElements layout shapesR)
+ twoColumnHeaderId = if null hdrShape then Nothing else headerId
+ contentL <- local (\env -> env {envPlaceholder = Placeholder ObjType 0})
+ (shapesToElements layout shapesL)
+ let twoColumnLeftIds = mapMaybe fst contentL
+ contentElementsL = snd <$> contentL
+ contentR <- local (\env -> env {envPlaceholder = Placeholder ObjType 1})
+ (shapesToElements layout shapesR)
+ let (twoColumnRightIds) = (mapMaybe fst contentR)
+ contentElementsR = snd <$> contentR
-- let contentElementsL' = map (setIdx ns "1") contentElementsL
-- contentElementsR' = map (setIdx ns "2") contentElementsR
- return $ buildSpTree ns spTree $
- hdrShapeElements <> contentElementsL <> contentElementsR
-twoColumnToElement _ _ _ _= return $ mknode "p:sp" [] ()
-
-
-titleToElement :: PandocMonad m => Element -> [ParaElem] -> P m Element
+ footer <- footerElements twoColumn
+ return
+ $ (Just TwoColumnShapeIds{..}, )
+ $ buildSpTree ns spTree
+ $ hdrShapeElements <> contentElementsL <> contentElementsR <> footer
+twoColumnToElement _ _ _ _ = return (Nothing, mknode "p:sp" [] ())
+
+data ComparisonShapeIds = ComparisonShapeIds
+ { comparisonHeaderId :: Maybe ShapeId
+ , comparisonLeftTextIds :: [ShapeId]
+ , comparisonLeftContentIds :: [ShapeId]
+ , comparisonRightTextIds :: [ShapeId]
+ , comparisonRightContentIds :: [ShapeId]
+ }
+
+comparisonToElement ::
+ PandocMonad m =>
+ Element ->
+ [ParaElem] ->
+ ([Shape], [Shape]) ->
+ ([Shape], [Shape]) ->
+ P m (Maybe ComparisonShapeIds, Element)
+comparisonToElement layout hdrShape (shapesL1, shapesL2) (shapesR1, shapesR2)
+ | ns <- elemToNameSpaces layout
+ , Just cSld <- findChild (elemName ns "p" "cSld") layout
+ , Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
+ (headerShapeId, element) <- nonBodyTextToElement layout [PHType "title"] hdrShape
+ let hdrShapeElements = [Elem element | not (null hdrShape)]
+ comparisonHeaderId = if null hdrShape then Nothing else headerShapeId
+ contentL1 <- local (\env -> env {envPlaceholder = Placeholder (PHType "body") 0})
+ (shapesToElements layout shapesL1)
+ let comparisonLeftTextIds = mapMaybe fst contentL1
+ contentElementsL1 = snd <$> contentL1
+ contentL2 <- local (\env -> env {envPlaceholder = Placeholder ObjType 0})
+ (shapesToElements layout shapesL2)
+ let comparisonLeftContentIds = mapMaybe fst contentL2
+ contentElementsL2 = snd <$> contentL2
+ contentR1 <- local (\env -> env {envPlaceholder = Placeholder (PHType "body") 1})
+ (shapesToElements layout shapesR1)
+ let comparisonRightTextIds = mapMaybe fst contentR1
+ contentElementsR1 = snd <$> contentR1
+ contentR2 <- local (\env -> env {envPlaceholder = Placeholder ObjType 1})
+ (shapesToElements layout shapesR2)
+ let comparisonRightContentIds = mapMaybe fst contentR2
+ contentElementsR2 = snd <$> contentR2
+ footer <- footerElements comparison
+ return
+ $ (Just ComparisonShapeIds{..}, )
+ $ buildSpTree ns spTree
+ $ mconcat [ hdrShapeElements
+ , contentElementsL1
+ , contentElementsL2
+ , contentElementsR1
+ , contentElementsR2
+ ] <> footer
+comparisonToElement _ _ _ _= return (Nothing, mknode "p:sp" [] ())
+
+data ContentWithCaptionShapeIds = ContentWithCaptionShapeIds
+ { contentWithCaptionHeaderId :: Maybe ShapeId
+ , contentWithCaptionCaptionIds :: [ShapeId]
+ , contentWithCaptionContentIds :: [ShapeId]
+ }
+
+contentWithCaptionToElement ::
+ PandocMonad m =>
+ Element ->
+ [ParaElem] ->
+ [Shape] ->
+ [Shape] ->
+ P m (Maybe ContentWithCaptionShapeIds, Element)
+contentWithCaptionToElement layout hdrShape textShapes contentShapes
+ | ns <- elemToNameSpaces layout
+ , Just cSld <- findChild (elemName ns "p" "cSld") layout
+ , Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
+ (shapeId, element) <- nonBodyTextToElement layout [PHType "title"] hdrShape
+ let hdrShapeElements = [Elem element | not (null hdrShape)]
+ contentWithCaptionHeaderId = if null hdrShape then Nothing else shapeId
+ text <- local (\env -> env {envPlaceholder = Placeholder (PHType "body") 0})
+ (shapesToElements layout textShapes)
+ let contentWithCaptionCaptionIds = mapMaybe fst text
+ textElements = snd <$> text
+ content <- local (\env -> env {envPlaceholder = Placeholder ObjType 0})
+ (shapesToElements layout contentShapes)
+ let contentWithCaptionContentIds = mapMaybe fst content
+ contentElements = snd <$> content
+ footer <- footerElements contentWithCaption
+ return
+ $ (Just ContentWithCaptionShapeIds{..}, )
+ $ buildSpTree ns spTree
+ $ mconcat [ hdrShapeElements
+ , textElements
+ , contentElements
+ ] <> footer
+contentWithCaptionToElement _ _ _ _ = return (Nothing, mknode "p:sp" [] ())
+
+blankToElement ::
+ PandocMonad m =>
+ Element ->
+ P m Element
+blankToElement layout
+ | ns <- elemToNameSpaces layout
+ , Just cSld <- findChild (elemName ns "p" "cSld") layout
+ , Just spTree <- findChild (elemName ns "p" "spTree") cSld =
+ buildSpTree ns spTree <$> footerElements blank
+blankToElement _ = return $ mknode "p:sp" [] ()
+
+newtype TitleShapeIds = TitleShapeIds
+ { titleHeaderId :: Maybe ShapeId
+ }
+
+titleToElement ::
+ PandocMonad m =>
+ Element ->
+ [ParaElem] ->
+ P m (Maybe TitleShapeIds, Element)
titleToElement layout titleElems
| ns <- elemToNameSpaces layout
, Just cSld <- findChild (elemName ns "p" "cSld") layout
, Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
- element <- nonBodyTextToElement layout [PHType "title", PHType "ctrTitle"] titleElems
+ (shapeId, element) <- nonBodyTextToElement layout [PHType "title", PHType "ctrTitle"] titleElems
let titleShapeElements = [Elem element | not (null titleElems)]
- return $ buildSpTree ns spTree titleShapeElements
-titleToElement _ _ = return $ mknode "p:sp" [] ()
-
-metadataToElement :: PandocMonad m => Element -> [ParaElem] -> [ParaElem] -> [[ParaElem]] -> [ParaElem] -> P m Element
+ titleHeaderId = if null titleElems then Nothing else shapeId
+ footer <- footerElements title
+ return
+ $ (Just TitleShapeIds{..}, )
+ $ buildSpTree ns spTree (titleShapeElements <> footer)
+titleToElement _ _ = return (Nothing, mknode "p:sp" [] ())
+
+data MetadataShapeIds = MetadataShapeIds
+ { metadataTitleId :: Maybe ShapeId
+ , metadataSubtitleId :: Maybe ShapeId
+ , metadataDateId :: Maybe ShapeId
+ }
+
+metadataToElement ::
+ PandocMonad m =>
+ Element ->
+ [ParaElem] ->
+ [ParaElem] ->
+ [[ParaElem]] ->
+ [ParaElem] ->
+ P m (Maybe MetadataShapeIds, Element)
metadataToElement layout titleElems subtitleElems authorsElems dateElems
| ns <- elemToNameSpaces layout
, Just cSld <- findChild (elemName ns "p" "cSld") layout
, Just spTree <- findChild (elemName ns "p" "spTree") cSld = do
- titleShapeElements <- if null titleElems
- then return []
- else sequence [nonBodyTextToElement layout [PHType "ctrTitle"] titleElems]
let combinedAuthorElems = intercalate [Break] authorsElems
subtitleAndAuthorElems = intercalate [Break, Break] [subtitleElems, combinedAuthorElems]
- subtitleShapeElements <- if null subtitleAndAuthorElems
- then return []
- else sequence [nonBodyTextToElement layout [PHType "subTitle"] subtitleAndAuthorElems]
- dateShapeElements <- if null dateElems
- then return []
- else sequence [nonBodyTextToElement layout [PHType "dt"] dateElems]
- return . buildSpTree ns spTree . map Elem $
- (titleShapeElements <> subtitleShapeElements <> dateShapeElements)
-metadataToElement _ _ _ _ _ = return $ mknode "p:sp" [] ()
+ (titleId, titleElement) <- nonBodyTextToElement layout [PHType "ctrTitle"] titleElems
+ (subtitleId, subtitleElement) <- nonBodyTextToElement layout [PHType "subTitle"] subtitleAndAuthorElems
+ (dateId, dateElement) <- nonBodyTextToElement layout [PHType "dt"] dateElems
+ let titleShapeElements = [titleElement | not (null titleElems)]
+ metadataTitleId = if null titleElems then Nothing else titleId
+ subtitleShapeElements = [subtitleElement | not (null subtitleAndAuthorElems)]
+ metadataSubtitleId = if null subtitleAndAuthorElems then Nothing else subtitleId
+ footerInfo <- gets stFooterInfo
+ footer <- (if maybe False fiShowOnFirstSlide footerInfo
+ then id
+ else const []) <$> footerElements metadata
+ let dateShapeElements = [dateElement
+ | not (null dateElems
+ || isJust (footerInfo >>= metadata . fiDate))
+ ]
+ metadataDateId = if null dateElems then Nothing else dateId
+ return
+ $ (Just MetadataShapeIds{..}, )
+ $ buildSpTree ns spTree
+ $ map Elem (titleShapeElements <> subtitleShapeElements <> dateShapeElements)
+ <> footer
+metadataToElement _ _ _ _ _ = return (Nothing, mknode "p:sp" [] ())
slideToElement :: PandocMonad m => Slide -> P m Element
-slideToElement (Slide _ l@(ContentSlide hdrElems shapes) _ )= do
+slideToElement (Slide _ l@(ContentSlide hdrElems shapes) _ backgroundImage) = do
+ layout <- getLayout l
+ backgroundImageElement <- traverse backgroundImageToElement backgroundImage
+ (shapeIds, spTree)
+ <- local (\env -> if null hdrElems
+ then env
+ else env{envSlideHasHeader=True})
+ (contentToElement layout hdrElems shapes)
+ let animations = case shapeIds of
+ Nothing -> []
+ Just ContentShapeIds{..} ->
+ slideToIncrementalAnimations (zip contentContentIds shapes)
+ return $ mknode "p:sld"
+ [ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
+ ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
+ ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main")
+ ] (mknode "p:cSld" [] (toList backgroundImageElement <> [spTree]) : animations)
+slideToElement (Slide _ l@(TwoColumnSlide hdrElems shapesL shapesR) _ backgroundImage) = do
layout <- getLayout l
- spTree <- local (\env -> if null hdrElems
+ backgroundImageElement <- traverse backgroundImageToElement backgroundImage
+ (shapeIds, spTree) <- local (\env -> if null hdrElems
then env
else env{envSlideHasHeader=True}) $
- contentToElement layout hdrElems shapes
+ twoColumnToElement layout hdrElems shapesL shapesR
+ let animations = case shapeIds of
+ Nothing -> []
+ Just TwoColumnShapeIds{..} ->
+ slideToIncrementalAnimations (zip twoColumnLeftIds shapesL
+ <> zip twoColumnRightIds shapesR)
return $ mknode "p:sld"
[ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main")
- ] [mknode "p:cSld" [] [spTree]]
-slideToElement (Slide _ l@(TwoColumnSlide hdrElems shapesL shapesR) _) = do
+ ] (mknode "p:cSld" [] (toList backgroundImageElement <> [spTree]) : animations)
+slideToElement (Slide _ l@(ComparisonSlide hdrElems shapesL shapesR) _ backgroundImage) = do
layout <- getLayout l
- spTree <- local (\env -> if null hdrElems
+ backgroundImageElement <- traverse backgroundImageToElement backgroundImage
+ (shapeIds, spTree) <- local (\env -> if null hdrElems
then env
else env{envSlideHasHeader=True}) $
- twoColumnToElement layout hdrElems shapesL shapesR
+ comparisonToElement layout hdrElems shapesL shapesR
+ let animations = case shapeIds of
+ Nothing -> []
+ Just ComparisonShapeIds{..} ->
+ slideToIncrementalAnimations
+ (zip comparisonLeftTextIds (fst shapesL)
+ <> zip comparisonLeftContentIds (snd shapesL)
+ <> zip comparisonRightTextIds (fst shapesR)
+ <> zip comparisonRightContentIds (snd shapesR))
+ return $ mknode "p:sld"
+ [ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
+ ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
+ ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main")
+ ] (mknode "p:cSld" [] (toList backgroundImageElement <> [spTree]) : animations)
+slideToElement (Slide _ l@(TitleSlide hdrElems) _ backgroundImage) = do
+ layout <- getLayout l
+ backgroundImageElement <- traverse backgroundImageToElement backgroundImage
+ (_, spTree) <- titleToElement layout hdrElems
return $ mknode "p:sld"
[ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main")
- ] [mknode "p:cSld" [] [spTree]]
-slideToElement (Slide _ l@(TitleSlide hdrElems) _) = do
+ ] [mknode "p:cSld" [] (toList backgroundImageElement <> [spTree])]
+slideToElement (Slide
+ _
+ l@(MetadataSlide titleElems subtitleElems authorElems dateElems)
+ _
+ backgroundImage) = do
layout <- getLayout l
- spTree <- titleToElement layout hdrElems
+ backgroundImageElement <- traverse backgroundImageToElement backgroundImage
+ (_, spTree) <- metadataToElement layout titleElems subtitleElems authorElems dateElems
return $ mknode "p:sld"
[ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main")
- ] [mknode "p:cSld" [] [spTree]]
-slideToElement (Slide _ l@(MetadataSlide titleElems subtitleElems authorElems dateElems) _) = do
+ ] [mknode "p:cSld" [] (toList backgroundImageElement <> [spTree])]
+slideToElement (Slide
+ _
+ l@(ContentWithCaptionSlide hdrElems captionShapes contentShapes)
+ _
+ backgroundImage) = do
layout <- getLayout l
- spTree <- metadataToElement layout titleElems subtitleElems authorElems dateElems
+ backgroundImageElement <- traverse backgroundImageToElement backgroundImage
+ (shapeIds, spTree) <- contentWithCaptionToElement layout hdrElems captionShapes contentShapes
+ let animations = case shapeIds of
+ Nothing -> []
+ Just ContentWithCaptionShapeIds{..} ->
+ slideToIncrementalAnimations
+ (zip contentWithCaptionCaptionIds captionShapes
+ <> zip contentWithCaptionContentIds contentShapes)
return $ mknode "p:sld"
[ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main")
- ] [mknode "p:cSld" [] [spTree]]
+ ] (mknode "p:cSld" [] (toList backgroundImageElement <> [spTree]) : animations)
+slideToElement (Slide _ BlankSlide _ backgroundImage) = do
+ layout <- getLayout BlankSlide
+ backgroundImageElement <- traverse backgroundImageToElement backgroundImage
+ spTree <- blankToElement layout
+ return $ mknode "p:sld"
+ [ ("xmlns:a", "http://schemas.openxmlformats.org/drawingml/2006/main"),
+ ("xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"),
+ ("xmlns:p", "http://schemas.openxmlformats.org/presentationml/2006/main")
+ ] [mknode "p:cSld" [] (toList backgroundImageElement <> [spTree])]
+backgroundImageToElement :: PandocMonad m => FilePath -> P m Element
+backgroundImageToElement path = do
+ MediaInfo{mInfoLocalId, mInfoFilePath} <- registerMedia path []
+ (imgBytes, _) <- P.fetchItem (T.pack mInfoFilePath)
+ opts <- asks envOpts
+ let imageDimensions = either (const Nothing)
+ (Just . sizeInPixels)
+ (imageSize opts imgBytes)
+ pageSize <- asks envPresentationSize
+ let fillRectAttributes = maybe [] (offsetAttributes pageSize) imageDimensions
+ let rId = "rId" <> T.pack (show mInfoLocalId)
+ return
+ $ mknode "p:bg" []
+ $ mknode "p:bgPr" []
+ [ mknode "a:blipFill" [("dpi", "0"), ("rotWithShape", "1")]
+ [ mknode "a:blip" [("r:embed", rId)]
+ $ mknode "a:lum" [] ()
+ , mknode "a:srcRect" [] ()
+ , mknode "a:stretch" []
+ $ mknode "a:fillRect" fillRectAttributes ()
+ ]
+ , mknode "a:effectsLst" [] ()
+ ]
+ where
+ offsetAttributes :: (Integer, Integer) -> (Integer, Integer) -> [(Text, Text)]
+ offsetAttributes (pageWidth, pageHeight) (pictureWidth, pictureHeight) = let
+ widthRatio = pictureWidth % pageWidth
+ heightRatio = pictureHeight % pageHeight
+ getOffset :: Ratio Integer -> Text
+ getOffset proportion = let
+ percentageOffset = (proportion - 1) * (-100 % 2)
+ integerOffset = round percentageOffset * 1000 :: Integer
+ in T.pack (show integerOffset)
+ in case compare widthRatio heightRatio of
+ EQ -> []
+ LT -> let
+ offset = getOffset ((pictureHeight % pageHeight) / widthRatio)
+ in [ ("t", offset)
+ , ("b", offset)
+ ]
+ GT -> let
+ offset = getOffset ((pictureWidth % pageWidth) / heightRatio)
+ in [ ("l", offset)
+ , ("r", offset)
+ ]
+
+
+slideToIncrementalAnimations ::
+ [(ShapeId, Shape)] ->
+ [Element]
+slideToIncrementalAnimations shapes = let
+ incrementals :: [(ShapeId, [Bool])]
+ incrementals = do
+ (shapeId, TextBox ps) <- shapes
+ pure . (shapeId,) $ do
+ Paragraph ParaProps{pPropIncremental} _ <- ps
+ pure pPropIncremental
+ toIndices :: [Bool] -> Maybe (NonEmpty (Integer, Integer))
+ toIndices bs = do
+ let indexed = zip [0..] bs
+ ts <- nonEmpty (filter snd indexed)
+ pure (fmap (\(n, _) -> (n, n)) ts)
+ indices :: [(ShapeId, NonEmpty (Integer, Integer))]
+ indices = do
+ (shapeId, bs) <- incrementals
+ toList ((,) shapeId <$> toIndices bs)
+ in toList (incrementalAnimation <$> nonEmpty indices)
--------------------------------------------------------------------
-- Notes:
@@ -1316,8 +2045,8 @@ speakerNotesSlideNumber pgNum fieldId =
]
slideToSpeakerNotesElement :: PandocMonad m => Slide -> P m (Maybe Element)
-slideToSpeakerNotesElement (Slide _ _ (SpeakerNotes [])) = return Nothing
-slideToSpeakerNotesElement slide@(Slide _ _ (SpeakerNotes paras)) = do
+slideToSpeakerNotesElement (Slide _ _ (SpeakerNotes []) _) = return Nothing
+slideToSpeakerNotesElement slide@(Slide _ _ (SpeakerNotes paras) _) = do
master <- getNotesMaster
fieldId <- getSlideNumberFieldId master
num <- slideNum slide
@@ -1373,11 +2102,14 @@ slideToFilePath slide = do
idNum <- slideNum slide
return $ "slide" <> show idNum <> ".xml"
-slideToRelId :: PandocMonad m => Slide -> P m T.Text
-slideToRelId slide = do
+slideToRelId ::
+ PandocMonad m =>
+ MinimumRId ->
+ Slide ->
+ P m T.Text
+slideToRelId minSlideRId slide = do
n <- slideNum slide
- offset <- asks envSlideIdOffset
- return $ "rId" <> tshow (n + offset)
+ return $ "rId" <> tshow (n + minSlideRId - 1)
data Relationship = Relationship { relId :: Int
@@ -1396,19 +2128,18 @@ elementToRel element
return $ Relationship num type' (T.unpack target)
| otherwise = Nothing
-slideToPresRel :: PandocMonad m => Slide -> P m Relationship
-slideToPresRel slide = do
+slideToPresRel :: PandocMonad m => Int -> Slide -> P m Relationship
+slideToPresRel minimumSlideRId slide = do
idNum <- slideNum slide
- n <- asks envSlideIdOffset
- let rId = idNum + n
+ let rId = idNum + minimumSlideRId - 1
fp = "slides/" <> idNumToFilePath idNum
return $ Relationship { relId = rId
, relType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide"
, relTarget = fp
}
-getRels :: PandocMonad m => P m [Relationship]
-getRels = do
+getPresentationRels :: PandocMonad m => P m [Relationship]
+getPresentationRels = do
refArchive <- asks envRefArchive
distArchive <- asks envDistArchive
relsElem <- parseXml refArchive distArchive "ppt/_rels/presentation.xml.rels"
@@ -1416,42 +2147,77 @@ getRels = do
let relElems = findChildren (QName "Relationship" (Just globalNS) Nothing) relsElem
return $ mapMaybe elementToRel relElems
-presentationToRels :: PandocMonad m => Presentation -> P m [Relationship]
+-- | Info required to update a presentation rId from the reference doc for the
+-- output.
+type PresentationRIdUpdateData = (ReferenceMinRIdAfterSlides, NewRIdBounds)
+
+-- | The minimum and maximum rIds for presentation relationships created from
+-- the presentation content (as opposed to from the reference doc).
+--
+-- Relationships taken from the reference doc should have their rId number
+-- adjusted to make sure it sits outside this range.
+type NewRIdBounds = (MinimumRId, MaximumRId)
+
+-- | The minimum presentation rId from the reference doc which comes after the
+-- first slide rId (in the reference doc).
+type ReferenceMinRIdAfterSlides = Int
+type MinimumRId = Int
+type MaximumRId = Int
+
+-- | Given a presentation rId from the reference doc, return the value it should
+-- have in the output.
+updatePresentationRId :: PresentationRIdUpdateData -> Int -> Int
+updatePresentationRId (minOverlappingRId, (minNewId, maxNewId)) n
+ | n < minNewId = n
+ | otherwise = n - minOverlappingRId + maxNewId + 1
+
+presentationToRels ::
+ PandocMonad m =>
+ Presentation ->
+ P m (PresentationRIdUpdateData, [Relationship])
presentationToRels pres@(Presentation _ slides) = do
- mySlideRels <- mapM slideToPresRel slides
- let notesMasterRels =
- [Relationship { relId = length mySlideRels + 2
- , relType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster"
- , relTarget = "notesMasters/notesMaster1.xml"
- } | presHasSpeakerNotes pres]
- insertedRels = mySlideRels <> notesMasterRels
- rels <- getRels
- -- we remove the slide rels and the notesmaster (if it's
- -- there). We'll put these back in ourselves, if necessary.
- let relsWeKeep = filter
+ rels <- getPresentationRels
+
+ -- We want to make room for the slides in the id space. We'll assume the slide
+ -- masters come first (this seems to be what PowerPoint does by default, and
+ -- is true of the reference doc), and we'll put the slides next. So we find
+ -- the starting rId for the slides by finding the maximum rId for the masters
+ -- and adding 1.
+ --
+ -- Then:
+ -- 1. We look to see what the minimum rId which is greater than or equal to
+ -- the minimum slide rId is, in the rels we're keeping from the reference
+ -- doc (i.e. the minimum rId which might overlap with the slides).
+ -- 2. We increase this minimum overlapping rId to 1 higher than the last slide
+ -- rId (or the notesMaster rel, if we're including one), and increase all
+ -- rIds higher than this minimum by the same amount.
+
+ let masterRels = filter (T.isSuffixOf "slideMaster" . relType) rels
+ slideStartId = maybe 1 ((+ 1) . maximum . fmap relId) (nonEmpty masterRels)
+ -- we remove the slide rels and the notesmaster (if it's
+ -- there). We'll put these back in ourselves, if necessary.
+ relsWeKeep = filter
(\r -> relType r /= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" &&
relType r /= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster")
rels
- -- We want to make room for the slides in the id space. The slides
- -- will start at Id2 (since Id1 is for the slide master). There are
- -- two slides in the data file, but that might change in the future,
- -- so we will do this:
- --
- -- 1. We look to see what the minimum relWithoutSlide id (greater than 1) is.
- -- 2. We add the difference between this and the number of slides to
- -- all relWithoutSlide rels (unless they're 1)
- -- 3. If we have a notesmaster slide, we make space for that as well.
+ minOverlappingRel = maybe 0 minimum
+ (nonEmpty (filter (slideStartId <=)
+ (relId <$> relsWeKeep)))
- let minRelNotOne = maybe 0 minimum $ nonEmpty
- $ filter (1 <) $ map relId relsWeKeep
+ mySlideRels <- mapM (slideToPresRel slideStartId) slides
- modifyRelNum :: Int -> Int
- modifyRelNum 1 = 1
- modifyRelNum n = n - minRelNotOne + 2 + length insertedRels
+ let notesMasterRels =
+ [Relationship { relId = slideStartId + length mySlideRels
+ , relType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster"
+ , relTarget = "notesMasters/notesMaster1.xml"
+ } | presHasSpeakerNotes pres]
+ insertedRels = mySlideRels <> notesMasterRels
+ newRIdBounds = (slideStartId, slideStartId + length insertedRels - 1)
+ updateRId = updatePresentationRId (minOverlappingRel, newRIdBounds)
- relsWeKeep' = map (\r -> r{relId = modifyRelNum $ relId r}) relsWeKeep
+ relsWeKeep' = map (\r -> r{relId = updateRId $ relId r}) relsWeKeep
- return $ insertedRels <> relsWeKeep'
+ return ((minOverlappingRel, newRIdBounds), insertedRels <> relsWeKeep')
-- We make this ourselves, in case there's a thumbnail in the one from
-- the template.
@@ -1488,10 +2254,14 @@ relsToElement rels = mknode "Relationships"
[("xmlns", "http://schemas.openxmlformats.org/package/2006/relationships")]
(map relToElement rels)
-presentationToRelsEntry :: PandocMonad m => Presentation -> P m Entry
+presentationToRelsEntry ::
+ PandocMonad m =>
+ Presentation ->
+ P m (PresentationRIdUpdateData, Entry)
presentationToRelsEntry pres = do
- rels <- presentationToRels pres
- elemToEntry "ppt/_rels/presentation.xml.rels" $ relsToElement rels
+ (presentationRIdUpdateData, rels) <- presentationToRels pres
+ element <- elemToEntry "ppt/_rels/presentation.xml.rels" $ relsToElement rels
+ pure (presentationRIdUpdateData, element)
elemToEntry :: PandocMonad m => FilePath -> Element -> P m Entry
elemToEntry fp element = do
@@ -1522,7 +2292,7 @@ slideToSpeakerNotesEntry slide = do
_ -> return Nothing
slideToSpeakerNotesRelElement :: PandocMonad m => Slide -> P m (Maybe Element)
-slideToSpeakerNotesRelElement (Slide _ _ (SpeakerNotes [])) = return Nothing
+slideToSpeakerNotesRelElement (Slide _ _ (SpeakerNotes []) _) = return Nothing
slideToSpeakerNotesRelElement slide@Slide{} = do
idNum <- slideNum slide
return $ Just $
@@ -1606,11 +2376,16 @@ speakerNotesSlideRelElement slide = do
slideToSlideRelElement :: PandocMonad m => Slide -> P m Element
slideToSlideRelElement slide = do
idNum <- slideNum slide
- let target = case slide of
- (Slide _ MetadataSlide{} _) -> "../slideLayouts/slideLayout1.xml"
- (Slide _ TitleSlide{} _) -> "../slideLayouts/slideLayout3.xml"
- (Slide _ ContentSlide{} _) -> "../slideLayouts/slideLayout2.xml"
- (Slide _ TwoColumnSlide{} _) -> "../slideLayouts/slideLayout4.xml"
+ target <- flip fmap getSlideLayouts $
+ T.pack . ("../slideLayouts/" <>) . takeFileName .
+ slPath . case slide of
+ (Slide _ MetadataSlide{} _ _) -> metadata
+ (Slide _ TitleSlide{} _ _) -> title
+ (Slide _ ContentSlide{} _ _) -> content
+ (Slide _ TwoColumnSlide{} _ _) -> twoColumn
+ (Slide _ ComparisonSlide{} _ _) -> comparison
+ (Slide _ ContentWithCaptionSlide{} _ _) -> contentWithCaption
+ (Slide _ BlankSlide _ _) -> blank
speakerNotesRels <- maybeToList <$> speakerNotesSlideRelElement slide
@@ -1632,24 +2407,37 @@ slideToSlideRelElement slide = do
, ("Target", target)] ()
] <> speakerNotesRels <> linkRels <> mediaRels)
-slideToSldIdElement :: PandocMonad m => Slide -> P m Element
-slideToSldIdElement slide = do
+slideToSldIdElement ::
+ PandocMonad m =>
+ MinimumRId ->
+ Slide ->
+ P m Element
+slideToSldIdElement minimumSlideRId slide = do
n <- slideNum slide
let id' = tshow $ n + 255
- rId <- slideToRelId slide
+ rId <- slideToRelId minimumSlideRId slide
return $ mknode "p:sldId" [("id", id'), ("r:id", rId)] ()
-presentationToSldIdLst :: PandocMonad m => Presentation -> P m Element
-presentationToSldIdLst (Presentation _ slides) = do
- ids <- mapM slideToSldIdElement slides
+presentationToSldIdLst ::
+ PandocMonad m =>
+ MinimumRId ->
+ Presentation ->
+ P m Element
+presentationToSldIdLst minimumSlideRId (Presentation _ slides) = do
+ ids <- mapM (slideToSldIdElement minimumSlideRId) slides
return $ mknode "p:sldIdLst" [] ids
-presentationToPresentationElement :: PandocMonad m => Presentation -> P m Element
-presentationToPresentationElement pres@(Presentation _ slds) = do
+presentationToPresentationElement ::
+ PandocMonad m =>
+ PresentationRIdUpdateData ->
+ Presentation ->
+ P m Element
+presentationToPresentationElement presentationUpdateRIdData pres = do
+ let (_, (minSlideRId, maxSlideRId)) = presentationUpdateRIdData
refArchive <- asks envRefArchive
distArchive <- asks envDistArchive
element <- parseXml refArchive distArchive "ppt/presentation.xml"
- sldIdLst <- presentationToSldIdLst pres
+ sldIdLst <- presentationToSldIdLst minSlideRId pres
let modifySldIdLst :: Content -> Content
modifySldIdLst (Elem e) = case elName e of
@@ -1657,11 +2445,11 @@ presentationToPresentationElement pres@(Presentation _ slds) = do
_ -> Elem e
modifySldIdLst ct = ct
- notesMasterRId = length slds + 2
+ notesMasterRId = maxSlideRId
notesMasterElem = mknode "p:notesMasterIdLst" []
[ mknode
- "p:NotesMasterId"
+ "p:notesMasterId"
[("r:id", "rId" <> tshow notesMasterRId)]
()
]
@@ -1692,16 +2480,34 @@ presentationToPresentationElement pres@(Presentation _ slds) = do
then concatMap insertNotesMaster'
else id
+ updateRIds :: Content -> Content
+ updateRIds (Elem el) =
+ Elem (el { elAttribs = fmap updateRIdAttribute (elAttribs el)
+ , elContent = fmap updateRIds (elContent el)
+ })
+ updateRIds content = content
+
+ updateRIdAttribute :: XML.Attr -> XML.Attr
+ updateRIdAttribute attr = fromMaybe attr $ do
+ oldValue <- case attrKey attr of
+ QName "id" _ (Just "r") ->
+ T.stripPrefix "rId" (attrVal attr)
+ >>= fmap fromIntegral . readTextAsInteger
+ _ -> Nothing
+ let newValue = updatePresentationRId presentationUpdateRIdData oldValue
+ pure attr {attrVal = "rId" <> T.pack (show newValue)}
+
newContent = insertNotesMaster $
removeUnwantedMaster $
- map modifySldIdLst $
+ (modifySldIdLst . updateRIds) <$>
elContent element
return $ element{elContent = newContent}
-presentationToPresEntry :: PandocMonad m => Presentation -> P m Entry
-presentationToPresEntry pres = presentationToPresentationElement pres >>=
- elemToEntry "ppt/presentation.xml"
+presentationToPresEntry :: PandocMonad m => PresentationRIdUpdateData -> Presentation -> P m Entry
+presentationToPresEntry presentationRIdUpdateData pres =
+ presentationToPresentationElement presentationRIdUpdateData pres >>=
+ elemToEntry "ppt/presentation.xml"
-- adapted from the Docx writer
docPropsElement :: PandocMonad m => DocProps -> P m Element
@@ -1920,3 +2726,102 @@ autoNumAttrs (startNum, numStyle, numDelim) =
OneParen -> "ParenR"
TwoParens -> "ParenBoth"
_ -> "Period"
+
+-- | The XML required to insert an "appear" animation for each of the given
+-- groups of paragraphs, identified by index.
+incrementalAnimation ::
+ -- | (ShapeId, [(startParagraphIndex, endParagraphIndex)])
+ NonEmpty (ShapeId, NonEmpty (Integer, Integer)) ->
+ Element
+incrementalAnimation indices = mknode "p:timing" [] [tnLst, bldLst]
+ where
+ triples :: NonEmpty (ShapeId, Integer, Integer)
+ triples = do
+ (shapeId, paragraphIds) <- indices
+ (start, end) <- paragraphIds
+ pure (shapeId, start, end)
+
+ tnLst = mknode "p:tnLst" []
+ $ mknode "p:par" []
+ $ mknode "p:cTn" [ ("id", "1")
+ , ("dur", "indefinite")
+ , ("restart", "never")
+ , ("nodeType", "tmRoot")
+ ]
+ $ mknode "p:childTnLst" []
+ $ mknode "p:seq" [ ("concurrent", "1")
+ , ("nextAc", "seek")
+ ]
+ [ mknode "p:cTn" [ ("id", "2")
+ , ("dur", "indefinite")
+ , ("nodeType", "mainSeq")
+ ]
+ $ mknode "p:childTnLst" []
+ $ zipWith makePar [3, 7 ..] (toList triples)
+ , mknode "p:prevCondLst" []
+ $ mknode "p:cond" ([("evt", "onPrev"), ("delay", "0")])
+ $ mknode "p:tgtEl" []
+ $ mknode "p:sldTgt" [] ()
+ , mknode "p:nextCondLst" []
+ $ mknode "p:cond" ([("evt", "onNext"), ("delay", "0")])
+ $ mknode "p:tgtEl" []
+ $ mknode "p:sldTgt" [] ()
+ ]
+ bldLst = mknode "p:bldLst" []
+ [ mknode "p:bldP" [ ("spid", T.pack (show shapeId))
+ , ("grpId", "0")
+ , ("uiExpand", "1")
+ , ("build", "p")
+ ]
+ () | (shapeId, _) <- toList indices
+ ]
+
+ makePar :: Integer -> (ShapeId, Integer, Integer) -> Element
+ makePar nextId (shapeId, start, end) =
+ mknode "p:par" []
+ $ mknode "p:cTn" [("id", T.pack (show nextId)), ("fill", "hold")]
+ [ mknode "p:stCondLst" []
+ $ mknode "p:cond" [("delay", "indefinite")] ()
+ , mknode "p:childTnLst" []
+ $ mknode "p:par" []
+ $ mknode "p:cTn" [ ("id", T.pack (show (nextId + 1)))
+ , ("fill", "hold")
+ ]
+ [ mknode "p:stCondLst" []
+ $ mknode "p:cond" [("delay", "0")] ()
+ , mknode "p:childTnLst" []
+ $ mknode "p:par" []
+ $ mknode "p:cTn" [ ("id", T.pack (show (nextId + 2)))
+ , ("presetID", "1")
+ , ("presetClass", "entr")
+ , ("presetSubtype", "0")
+ , ("fill", "hold")
+ , ("grpId", "0")
+ , ("nodeType", "clickEffect")
+ ]
+ [ mknode "p:stCondLst" []
+ $ mknode "p:cond" [("delay", "0")] ()
+ , mknode "p:childTnLst" []
+ $ mknode "p:set" []
+ [ mknode "p:cBhvr" []
+ [ mknode "p:cTn" [ ("id", T.pack (show (nextId + 3)))
+ , ("dur", "1")
+ , ("fill", "hold")
+ ]
+ $ mknode "p:stCondLst" []
+ $ mknode "p:cond" [("delay", "0")] ()
+ , mknode "p:tgtEl" []
+ $ mknode "p:spTgt" [("spid", T.pack (show shapeId))]
+ $ mknode "p:txEl" []
+ $ mknode "p:pRg" [ ("st", T.pack (show start))
+ , ("end", T.pack (show end))]
+ ()
+ , mknode "p:attrNameLst" []
+ $ mknode "p:attrName" [] ("style.visibility" :: Text)
+ ]
+ , mknode "p:to" []
+ $ mknode "p:strVal" [("val", "visible")] ()
+ ]
+ ]
+ ]
+ ]
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs
index 9246a93e9..fd6b83120 100644
--- a/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint/Presentation.hs
@@ -1,7 +1,9 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE ViewPatterns #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{- |
Module : Text.Pandoc.Writers.Powerpoint.Presentation
Copyright : Copyright (C) 2017-2020 Jesse Rosenthal
@@ -53,7 +55,6 @@ import Text.Pandoc.Slides (getSlideLevel)
import Text.Pandoc.Options
import Text.Pandoc.Logging
import Text.Pandoc.Walk
-import Data.Time (UTCTime)
import qualified Text.Pandoc.Shared as Shared -- so we don't overlap "Element"
import Text.Pandoc.Shared (tshow)
import Text.Pandoc.Writers.Shared (lookupMetaInlines, lookupMetaBlocks
@@ -61,11 +62,13 @@ import Text.Pandoc.Writers.Shared (lookupMetaInlines, lookupMetaBlocks
, toLegacyTable)
import qualified Data.Map as M
import qualified Data.Set as S
-import Data.Maybe (maybeToList, fromMaybe)
+import Data.Maybe (maybeToList, fromMaybe, listToMaybe, isNothing)
import Text.Pandoc.Highlighting
import qualified Data.Text as T
import Control.Applicative ((<|>))
import Skylighting
+import Data.Bifunctor (bimap)
+import Data.Char (isSpace)
data WriterEnv = WriterEnv { envMetadata :: Meta
, envRunProps :: RunProps
@@ -77,6 +80,8 @@ data WriterEnv = WriterEnv { envMetadata :: Meta
, envInNoteSlide :: Bool
, envCurSlideId :: SlideId
, envInSpeakerNotes :: Bool
+ , envInIncrementalDiv :: Maybe InIncrementalDiv
+ , envInListInBlockQuote :: Bool
}
deriving (Show)
@@ -91,6 +96,8 @@ instance Default WriterEnv where
, envInNoteSlide = False
, envCurSlideId = SlideId "Default"
, envInSpeakerNotes = False
+ , envInIncrementalDiv = Nothing
+ , envInListInBlockQuote = False
}
@@ -111,6 +118,23 @@ instance Default WriterState where
, stSpeakerNotes = mempty
}
+data InIncrementalDiv
+ = InIncremental
+ -- ^ The current content is contained within an "incremental" div.
+ | InNonIncremental
+ -- ^ The current content is contained within a "nonincremental" div.
+ deriving (Show)
+
+listShouldBeIncremental :: Pres Bool
+listShouldBeIncremental = do
+ incrementalOption <- asks (writerIncremental . envOpts)
+ inIncrementalDiv <- asks envInIncrementalDiv
+ inBlockQuote <- asks envInListInBlockQuote
+ let toBoolean = (\case InIncremental -> True
+ InNonIncremental -> False)
+ maybeInvert = if inBlockQuote then not else id
+ pure (maybeInvert (maybe incrementalOption toBoolean inIncrementalDiv))
+
metadataSlideId :: SlideId
metadataSlideId = SlideId "Metadata"
@@ -168,7 +192,7 @@ data DocProps = DocProps { dcTitle :: Maybe T.Text
, dcKeywords :: Maybe [T.Text]
, dcDescription :: Maybe T.Text
, cpCategory :: Maybe T.Text
- , dcCreated :: Maybe UTCTime
+ , dcDate :: Maybe T.Text
, customProperties :: Maybe [(T.Text, T.Text)]
} deriving (Show, Eq)
@@ -176,6 +200,7 @@ data DocProps = DocProps { dcTitle :: Maybe T.Text
data Slide = Slide { slideId :: SlideId
, slideLayout :: Layout
, slideSpeakerNotes :: SpeakerNotes
+ , slideBackgroundImage :: Maybe FilePath
} deriving (Show, Eq)
newtype SlideId = SlideId T.Text
@@ -195,9 +220,15 @@ data Layout = MetadataSlide [ParaElem] [ParaElem] [[ParaElem]] [ParaElem]
-- heading content
| TwoColumnSlide [ParaElem] [Shape] [Shape]
-- heading left right
+ | ComparisonSlide [ParaElem] ([Shape], [Shape]) ([Shape], [Shape])
+ -- heading left@(text, content) right@(text, content)
+ | ContentWithCaptionSlide [ParaElem] [Shape] [Shape]
+ -- heading text content
+ | BlankSlide
deriving (Show, Eq)
-data Shape = Pic PicProps FilePath [ParaElem]
+data Shape = Pic PicProps FilePath T.Text [ParaElem]
+ -- title alt-text
| GraphicFrame [Graphic] [ParaElem]
| TextBox [Paragraph]
| RawOOXMLShape T.Text
@@ -218,7 +249,7 @@ data Graphic = Tbl TableProps [TableCell] [[TableCell]]
data Paragraph = Paragraph { paraProps :: ParaProps
- , paraElems :: [ParaElem]
+ , paraElems :: [ParaElem]
} deriving (Show, Eq)
data BulletType = Bullet
@@ -235,6 +266,7 @@ data ParaProps = ParaProps { pPropMarginLeft :: Maybe Pixels
, pPropAlign :: Maybe Algnment
, pPropSpaceBefore :: Maybe Pixels
, pPropIndent :: Maybe Pixels
+ , pPropIncremental :: Bool
} deriving (Show, Eq)
instance Default ParaProps where
@@ -245,6 +277,7 @@ instance Default ParaProps where
, pPropAlign = Nothing
, pPropSpaceBefore = Nothing
, pPropIndent = Just 0
+ , pPropIncremental = False
}
newtype TeXString = TeXString {unTeXString :: T.Text}
@@ -315,7 +348,7 @@ instance Default PicProps where
--------------------------------------------------
inlinesToParElems :: [Inline] -> Pres [ParaElem]
-inlinesToParElems ils = concatMapM inlineToParElems ils
+inlinesToParElems = concatMapM inlineToParElems
inlineToParElems :: Inline -> Pres [ParaElem]
inlineToParElems (Str s) = do
@@ -440,7 +473,8 @@ blockToParagraphs (CodeBlock attr str) = do
-- (BlockQuote List) as a list to maintain compatibility with other
-- formats.
blockToParagraphs (BlockQuote (blk : blks)) | isListType blk = do
- ps <- blockToParagraphs blk
+ ps <- local (\env -> env { envInListInBlockQuote = True })
+ (blockToParagraphs blk)
ps' <- blockToParagraphs $ BlockQuote blks
return $ ps ++ ps'
blockToParagraphs (BlockQuote blks) =
@@ -465,25 +499,26 @@ blockToParagraphs (Header _ (ident, _, _) ils) = do
return [Paragraph def{pPropSpaceBefore = Just 30} parElems]
blockToParagraphs (BulletList blksLst) = do
pProps <- asks envParaProps
- let lvl = pPropLevel pProps
+ incremental <- listShouldBeIncremental
local (\env -> env{ envInList = True
- , envParaProps = pProps{ pPropLevel = lvl + 1
- , pPropBullet = Just Bullet
+ , envParaProps = pProps{ pPropBullet = Just Bullet
, pPropMarginLeft = Nothing
, pPropIndent = Nothing
+ , pPropIncremental = incremental
}}) $
- concatMapM multiParBullet blksLst
+ concatMapM multiParList blksLst
blockToParagraphs (OrderedList listAttr blksLst) = do
pProps <- asks envParaProps
- let lvl = pPropLevel pProps
+ incremental <- listShouldBeIncremental
local (\env -> env{ envInList = True
- , envParaProps = pProps{ pPropLevel = lvl + 1
- , pPropBullet = Just (AutoNumbering listAttr)
+ , envParaProps = pProps{ pPropBullet = Just (AutoNumbering listAttr)
, pPropMarginLeft = Nothing
, pPropIndent = Nothing
+ , pPropIncremental = incremental
}}) $
- concatMapM multiParBullet blksLst
+ concatMapM multiParList blksLst
blockToParagraphs (DefinitionList entries) = do
+ incremental <- listShouldBeIncremental
let go :: ([Inline], [[Block]]) -> Pres [Paragraph]
go (ils, blksLst) = do
term <-blockToParagraphs $ Para [Strong ils]
@@ -491,20 +526,35 @@ blockToParagraphs (DefinitionList entries) = do
-- blockquote. We can extend this further later.
definition <- concatMapM (blockToParagraphs . BlockQuote) blksLst
return $ term ++ definition
- concatMapM go entries
-blockToParagraphs (Div _ blks) = concatMapM blockToParagraphs blks
+ local (\env -> env {envParaProps =
+ (envParaProps env) {pPropIncremental = incremental}})
+ $ concatMapM go entries
+blockToParagraphs (Div (_, classes, _) blks) = let
+ hasIncremental = "incremental" `elem` classes
+ hasNonIncremental = "nonincremental" `elem` classes
+ incremental = if | hasIncremental -> Just InIncremental
+ | hasNonIncremental -> Just InNonIncremental
+ | otherwise -> Nothing
+ addIncremental env = env { envInIncrementalDiv = incremental }
+ in local addIncremental (concatMapM blockToParagraphs blks)
blockToParagraphs blk = do
addLogMessage $ BlockNotRendered blk
return []
--- Make sure the bullet env gets turned off after the first para.
-multiParBullet :: [Block] -> Pres [Paragraph]
-multiParBullet [] = return []
-multiParBullet (b:bs) = do
+-- | Make sure the bullet env gets turned off after the first para.
+multiParList :: [Block] -> Pres [Paragraph]
+multiParList [] = return []
+multiParList (b:bs) = do
pProps <- asks envParaProps
p <- blockToParagraphs b
- ps <- local (\env -> env{envParaProps = pProps{pPropBullet = Nothing}}) $
- concatMapM blockToParagraphs bs
+ let level = pPropLevel pProps
+ ps <- local (\env -> env
+ { envParaProps = pProps
+ { pPropBullet = Nothing
+ , pPropLevel = level + 1
+ }
+ })
+ $ concatMapM blockToParagraphs bs
return $ p ++ ps
cellToParagraphs :: Alignment -> SimpleCell -> Pres [Paragraph]
@@ -525,21 +575,22 @@ rowToParagraphs algns tblCells = do
mapM (uncurry cellToParagraphs) pairs
withAttr :: Attr -> Shape -> Shape
-withAttr attr (Pic picPr url caption) =
+withAttr attr (Pic picPr url title caption) =
let picPr' = picPr { picWidth = dimension Width attr
, picHeight = dimension Height attr
}
in
- Pic picPr' url caption
+ Pic picPr' url title caption
withAttr _ sp = sp
blockToShape :: Block -> Pres Shape
blockToShape (Plain ils) = blockToShape (Para ils)
-blockToShape (Para (il:_)) | Image attr ils (url, _) <- il =
- withAttr attr . Pic def (T.unpack url) <$> inlinesToParElems ils
+blockToShape (Para (il:_)) | Image attr ils (url, title) <- il =
+ withAttr attr . Pic def (T.unpack url) title <$> inlinesToParElems ils
blockToShape (Para (il:_)) | Link _ (il':_) target <- il
- , Image attr ils (url, _) <- il' =
- withAttr attr . Pic def{picPropLink = Just $ ExternalTarget target} (T.unpack url)
+ , Image attr ils (url, title) <- il' =
+ withAttr attr .
+ Pic def{picPropLink = Just $ ExternalTarget target} (T.unpack url) title
<$> inlinesToParElems ils
blockToShape (Table _ blkCapt specs thead tbody tfoot) = do
let (caption, algn, _, hdrCells, rows) = toLegacyTable blkCapt specs thead tbody tfoot
@@ -582,7 +633,30 @@ isImage Image{} = True
isImage (Link _ (Image{} : _) _) = True
isImage _ = False
-splitBlocks' :: [Block] -> [[Block]] -> [Block] -> Pres [[Block]]
+plainOrPara :: Block -> Maybe [Inline]
+plainOrPara (Plain ils) = Just ils
+plainOrPara (Para ils) = Just ils
+plainOrPara _ = Nothing
+
+notText :: Block -> Bool
+notText block | startsWithImage block = True
+notText Table{} = True
+notText _ = False
+
+startsWithImage :: Block -> Bool
+startsWithImage block = fromMaybe False $ do
+ inline <- plainOrPara block >>= listToMaybe
+ pure (isImage inline)
+
+-- | Group blocks into a number of "splits"
+splitBlocks' ::
+ -- | Blocks so far in the current split
+ [Block] ->
+ -- | Splits so far
+ [[Block]] ->
+ -- | All remaining blocks
+ [Block] ->
+ Pres [[Block]]
splitBlocks' cur acc [] = return $ acc ++ ([cur | not (null cur)])
splitBlocks' cur acc (HorizontalRule : blks) =
splitBlocks' [] (acc ++ ([cur | not (null cur)])) blks
@@ -602,25 +676,31 @@ splitBlocks' cur acc (Para (il:ils) : blks) | isImage il = do
then span isNotesDiv blks
else ([], blks)
case cur of
- [Header n _ _] | n == slideLevel ->
+ [Header n _ _] | n == slideLevel || slideLevel == 0 ->
splitBlocks' []
(acc ++ [cur ++ [Para [il]] ++ nts])
(if null ils then blks' else Para ils : blks')
_ -> splitBlocks' []
- (acc ++ ([cur | not (null cur)]) ++ [Para [il] : nts])
+ (if any notText cur
+ then acc ++ ([cur | not (null cur)]) ++ [Para [il] : nts]
+ else acc ++ [cur ++ [Para [il]] ++ nts])
(if null ils then blks' else Para ils : blks')
splitBlocks' cur acc (tbl@Table{} : blks) = do
slideLevel <- asks envSlideLevel
let (nts, blks') = span isNotesDiv blks
case cur of
- [Header n _ _] | n == slideLevel ->
+ [Header n _ _] | n == slideLevel || slideLevel == 0 ->
splitBlocks' [] (acc ++ [cur ++ [tbl] ++ nts]) blks'
- _ -> splitBlocks' [] (acc ++ ([cur | not (null cur)]) ++ [tbl : nts]) blks'
+ _ -> splitBlocks' []
+ (if any notText cur
+ then acc ++ ([cur | not (null cur)]) ++ [tbl : nts]
+ else acc ++ ([cur ++ [tbl] ++ nts]))
+ blks'
splitBlocks' cur acc (d@(Div (_, classes, _) _): blks) | "columns" `elem` classes = do
slideLevel <- asks envSlideLevel
let (nts, blks') = span isNotesDiv blks
case cur of
- [Header n _ _] | n == slideLevel ->
+ [Header n _ _] | n == slideLevel || slideLevel == 0 ->
splitBlocks' [] (acc ++ [cur ++ [d] ++ nts]) blks'
_ -> splitBlocks' [] (acc ++ ([cur | not (null cur)]) ++ [d : nts]) blks'
splitBlocks' cur acc (blk : blks) = splitBlocks' (cur ++ [blk]) acc blks
@@ -628,63 +708,96 @@ splitBlocks' cur acc (blk : blks) = splitBlocks' (cur ++ [blk]) acc blks
splitBlocks :: [Block] -> Pres [[Block]]
splitBlocks = splitBlocks' [] []
+-- | Assuming the slide title is already handled, convert these blocks to the
+-- body content for the slide.
+bodyBlocksToSlide :: Int -> [Block] -> SpeakerNotes -> Pres Slide
+bodyBlocksToSlide _ (blk : blks) spkNotes
+ | Div (_, classes, _) divBlks <- blk
+ , "columns" `elem` classes
+ , Div (_, clsL, _) blksL : Div (_, clsR, _) blksR : remaining <- divBlks
+ , "column" `elem` clsL, "column" `elem` clsR = do
+ mapM_ (addLogMessage . BlockNotRendered) (blks ++ remaining)
+ let mkTwoColumn left right = do
+ blksL' <- join . take 1 <$> splitBlocks left
+ blksR' <- join . take 1 <$> splitBlocks right
+ shapesL <- blocksToShapes blksL'
+ shapesR <- blocksToShapes blksR'
+ sldId <- asks envCurSlideId
+ return $ Slide
+ sldId
+ (TwoColumnSlide [] shapesL shapesR)
+ spkNotes
+ Nothing
+ let mkComparison blksL1 blksL2 blksR1 blksR2 = do
+ shapesL1 <- blocksToShapes blksL1
+ shapesL2 <- blocksToShapes blksL2
+ shapesR1 <- blocksToShapes blksR1
+ shapesR2 <- blocksToShapes blksR2
+ sldId <- asks envCurSlideId
+ return $ Slide
+ sldId
+ (ComparisonSlide [] (shapesL1, shapesL2) (shapesR1, shapesR2))
+ spkNotes
+ Nothing
+ let (blksL1, blksL2) = break notText blksL
+ (blksR1, blksR2) = break notText blksR
+ if (any null [blksL1, blksL2]) && (any null [blksR1, blksR2])
+ then mkTwoColumn blksL blksR
+ else mkComparison blksL1 blksL2 blksR1 blksR2
+bodyBlocksToSlide _ (blk : blks) spkNotes = do
+ sldId <- asks envCurSlideId
+ inNoteSlide <- asks envInNoteSlide
+ let mkSlide s =
+ Slide sldId s spkNotes Nothing
+ if inNoteSlide
+ then mkSlide . ContentSlide [] <$>
+ forceFontSize noteSize (blocksToShapes (blk : blks))
+ else let
+ contentOrBlankSlide =
+ if makesBlankSlide (blk : blks)
+ then pure (mkSlide BlankSlide)
+ else mkSlide . ContentSlide [] <$> blocksToShapes (blk : blks)
+ in case break notText (blk : blks) of
+ ([], _) -> contentOrBlankSlide
+ (_, []) -> contentOrBlankSlide
+ (textBlocks, contentBlocks) -> do
+ textShapes <- blocksToShapes textBlocks
+ contentShapes <- blocksToShapes contentBlocks
+ return (mkSlide (ContentWithCaptionSlide [] textShapes contentShapes))
+bodyBlocksToSlide _ [] spkNotes = do
+ sldId <- asks envCurSlideId
+ return $
+ Slide
+ sldId
+ BlankSlide
+ spkNotes
+ Nothing
+
blocksToSlide' :: Int -> [Block] -> SpeakerNotes -> Pres Slide
-blocksToSlide' lvl (Header n (ident, _, _) ils : blks) spkNotes
+blocksToSlide' lvl (Header n (ident, _, attributes) ils : blks) spkNotes
| n < lvl = do
registerAnchorId ident
sldId <- asks envCurSlideId
hdr <- inlinesToParElems ils
- return $ Slide sldId (TitleSlide hdr) spkNotes
- | n == lvl = do
+ return $ Slide sldId (TitleSlide hdr) spkNotes backgroundImage
+ | n == lvl || lvl == 0 = do
registerAnchorId ident
hdr <- inlinesToParElems ils
-- Now get the slide without the header, and then add the header
-- in.
- slide <- blocksToSlide' lvl blks spkNotes
+ slide <- bodyBlocksToSlide lvl blks spkNotes
let layout = case slideLayout slide of
ContentSlide _ cont -> ContentSlide hdr cont
TwoColumnSlide _ contL contR -> TwoColumnSlide hdr contL contR
+ ComparisonSlide _ contL contR -> ComparisonSlide hdr contL contR
+ ContentWithCaptionSlide _ text content -> ContentWithCaptionSlide hdr text content
+ BlankSlide -> if all inlineIsBlank ils then BlankSlide else ContentSlide hdr []
layout' -> layout'
- return $ slide{slideLayout = layout}
-blocksToSlide' _ (blk : blks) spkNotes
- | Div (_, classes, _) divBlks <- blk
- , "columns" `elem` classes
- , Div (_, clsL, _) blksL : Div (_, clsR, _) blksR : remaining <- divBlks
- , "column" `elem` clsL, "column" `elem` clsR = do
- mapM_ (addLogMessage . BlockNotRendered) (blks ++ remaining)
- mbSplitBlksL <- splitBlocks blksL
- mbSplitBlksR <- splitBlocks blksR
- let blksL' = case mbSplitBlksL of
- bs : _ -> bs
- [] -> []
- let blksR' = case mbSplitBlksR of
- bs : _ -> bs
- [] -> []
- shapesL <- blocksToShapes blksL'
- shapesR <- blocksToShapes blksR'
- sldId <- asks envCurSlideId
- return $ Slide
- sldId
- (TwoColumnSlide [] shapesL shapesR)
- spkNotes
-blocksToSlide' _ (blk : blks) spkNotes = do
- inNoteSlide <- asks envInNoteSlide
- shapes <- if inNoteSlide
- then forceFontSize noteSize $ blocksToShapes (blk : blks)
- else blocksToShapes (blk : blks)
- sldId <- asks envCurSlideId
- return $
- Slide
- sldId
- (ContentSlide [] shapes)
- spkNotes
-blocksToSlide' _ [] spkNotes = do
- sldId <- asks envCurSlideId
- return $
- Slide
- sldId
- (ContentSlide [] [])
- spkNotes
+ return $ slide{slideLayout = layout, slideBackgroundImage = backgroundImage}
+ where
+ backgroundImage = T.unpack <$> (lookup "background-image" attributes
+ <|> lookup "data-background-image" attributes)
+blocksToSlide' lvl blks spkNotes = bodyBlocksToSlide lvl blks spkNotes
blockToSpeakerNotes :: Block -> Pres SpeakerNotes
blockToSpeakerNotes (Div (_, ["notes"], _) blks) =
@@ -764,12 +877,13 @@ getMetaSlide = do
metadataSlideId
(MetadataSlide title subtitle authors date)
mempty
+ Nothing
addSpeakerNotesToMetaSlide :: Slide -> [Block] -> Pres (Slide, [Block])
-addSpeakerNotesToMetaSlide (Slide sldId layout@MetadataSlide{} spkNotes) blks =
+addSpeakerNotesToMetaSlide (Slide sldId layout@MetadataSlide{} spkNotes backgroundImage) blks =
do let (ntsBlks, blks') = span isNotesDiv blks
spkNotes' <- mconcat <$> mapM blockToSpeakerNotes ntsBlks
- return (Slide sldId layout (spkNotes <> spkNotes'), blks')
+ return (Slide sldId layout (spkNotes <> spkNotes') backgroundImage, blks')
addSpeakerNotesToMetaSlide sld blks = return (sld, blks)
makeTOCSlide :: [Block] -> Pres Slide
@@ -805,7 +919,7 @@ applyToParagraph f para = do
return $ para {paraElems = paraElems'}
applyToShape :: Monad m => (ParaElem -> m ParaElem) -> Shape -> m Shape
-applyToShape f (Pic pPr fp pes) = Pic pPr fp <$> mapM f pes
+applyToShape f (Pic pPr fp title pes) = Pic pPr fp title <$> mapM f pes
applyToShape f (GraphicFrame gfx pes) = GraphicFrame gfx <$> mapM f pes
applyToShape f (TextBox paras) = TextBox <$> mapM (applyToParagraph f) paras
applyToShape _ (RawOOXMLShape str) = return $ RawOOXMLShape str
@@ -827,6 +941,19 @@ applyToLayout f (TwoColumnSlide hdr contentL contentR) = do
contentL' <- mapM (applyToShape f) contentL
contentR' <- mapM (applyToShape f) contentR
return $ TwoColumnSlide hdr' contentL' contentR'
+applyToLayout f (ComparisonSlide hdr (contentL1, contentL2) (contentR1, contentR2)) = do
+ hdr' <- mapM f hdr
+ contentL1' <- mapM (applyToShape f) contentL1
+ contentL2' <- mapM (applyToShape f) contentL2
+ contentR1' <- mapM (applyToShape f) contentR1
+ contentR2' <- mapM (applyToShape f) contentR2
+ return $ ComparisonSlide hdr' (contentL1', contentL2') (contentR1', contentR2')
+applyToLayout f (ContentWithCaptionSlide hdr textShapes contentShapes) = do
+ hdr' <- mapM f hdr
+ textShapes' <- mapM (applyToShape f) textShapes
+ contentShapes' <- mapM (applyToShape f) contentShapes
+ return $ ContentWithCaptionSlide hdr' textShapes' contentShapes'
+applyToLayout _ BlankSlide = pure BlankSlide
applyToSlide :: Monad m => (ParaElem -> m ParaElem) -> Slide -> m Slide
applyToSlide f slide = do
@@ -878,9 +1005,72 @@ emptyLayout layout = case layout of
all emptyParaElem hdr &&
all emptyShape shapes1 &&
all emptyShape shapes2
+ ComparisonSlide hdr (shapesL1, shapesL2) (shapesR1, shapesR2) ->
+ all emptyParaElem hdr &&
+ all emptyShape shapesL1 &&
+ all emptyShape shapesL2 &&
+ all emptyShape shapesR1 &&
+ all emptyShape shapesR2
+ ContentWithCaptionSlide hdr textShapes contentShapes ->
+ all emptyParaElem hdr &&
+ all emptyShape textShapes &&
+ all emptyShape contentShapes
+ BlankSlide -> False
+
emptySlide :: Slide -> Bool
-emptySlide (Slide _ layout notes) = (notes == mempty) && emptyLayout layout
+emptySlide (Slide _ layout notes backgroundImage)
+ = (notes == mempty)
+ && emptyLayout layout
+ && isNothing backgroundImage
+
+makesBlankSlide :: [Block] -> Bool
+makesBlankSlide = all blockIsBlank
+
+blockIsBlank :: Block -> Bool
+blockIsBlank
+ = \case
+ Plain ins -> all inlineIsBlank ins
+ Para ins -> all inlineIsBlank ins
+ LineBlock inss -> all (all inlineIsBlank) inss
+ CodeBlock _ txt -> textIsBlank txt
+ RawBlock _ txt -> textIsBlank txt
+ BlockQuote bls -> all blockIsBlank bls
+ OrderedList _ blss -> all (all blockIsBlank) blss
+ BulletList blss -> all (all blockIsBlank) blss
+ DefinitionList ds -> all (uncurry (&&) . bimap (all inlineIsBlank) (all (all blockIsBlank))) ds
+ Header _ _ ils -> all inlineIsBlank ils
+ HorizontalRule -> True
+ Table{} -> False
+ Div _ bls -> all blockIsBlank bls
+ Null -> True
+
+textIsBlank :: T.Text -> Bool
+textIsBlank = T.all isSpace
+
+inlineIsBlank :: Inline -> Bool
+inlineIsBlank
+ = \case
+ (Str txt) -> textIsBlank txt
+ (Emph ins) -> all inlineIsBlank ins
+ (Underline ins) -> all inlineIsBlank ins
+ (Strong ins) -> all inlineIsBlank ins
+ (Strikeout ins) -> all inlineIsBlank ins
+ (Superscript ins) -> all inlineIsBlank ins
+ (Subscript ins) -> all inlineIsBlank ins
+ (SmallCaps ins) -> all inlineIsBlank ins
+ (Quoted _ ins) -> all inlineIsBlank ins
+ (Cite _ _) -> False
+ (Code _ txt) -> textIsBlank txt
+ Space -> True
+ SoftBreak -> True
+ LineBreak -> True
+ (Math _ txt) -> textIsBlank txt
+ (RawInline _ txt) -> textIsBlank txt
+ (Link _ ins (t1, t2)) -> all inlineIsBlank ins && textIsBlank t1 && textIsBlank t2
+ (Image _ ins (t1, t2)) -> all inlineIsBlank ins && textIsBlank t1 && textIsBlank t2
+ (Note bls) -> all blockIsBlank bls
+ (Span _ ins) -> all inlineIsBlank ins
blocksToPresentationSlides :: [Block] -> Pres [Slide]
blocksToPresentationSlides blks = do
@@ -960,7 +1150,11 @@ metaToDocProps meta =
, dcKeywords = keywords
, dcDescription = description
, cpCategory = Shared.stringify <$> lookupMeta "category" meta
- , dcCreated = Nothing
+ , dcDate =
+ let t = Shared.stringify (docDate meta)
+ in if T.null t
+ then Nothing
+ else Just t
, customProperties = customProperties'
}
diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs
index 983ef412a..08733a792 100644
--- a/src/Text/Pandoc/Writers/RST.hs
+++ b/src/Text/Pandoc/Writers/RST.hs
@@ -219,28 +219,34 @@ blockToRST (Div (ident,classes,_kvs) bs) = do
nest 3 contents $$
blankline
blockToRST (Plain inlines) = inlineListToRST inlines
-blockToRST (Para [Image attr txt (src, rawtit)]) = do
+blockToRST (SimpleFigure attr txt (src, tit)) = do
description <- inlineListToRST txt
dims <- imageDimsToRST attr
- -- title beginning with fig: indicates that the image is a figure
- let (isfig, tit) = case T.stripPrefix "fig:" rawtit of
- Nothing -> (False, rawtit)
- Just tit' -> (True, tit')
- let fig | isfig = "figure:: " <> literal src
- | otherwise = "image:: " <> literal src
- alt | isfig = ":alt: " <> if T.null tit then description else literal tit
- | null txt = empty
+ let fig = "figure:: " <> literal src
+ alt = ":alt: " <> if T.null tit then description else literal tit
+ capt = description
+ (_,cls,_) = attr
+ classes = case cls of
+ [] -> empty
+ ["align-right"] -> ":align: right"
+ ["align-left"] -> ":align: left"
+ ["align-center"] -> ":align: center"
+ _ -> ":figclass: " <> literal (T.unwords cls)
+ return $ hang 3 ".. " (fig $$ alt $$ classes $$ dims $+$ capt) $$ blankline
+blockToRST (Para [Image attr txt (src, _)]) = do
+ description <- inlineListToRST txt
+ dims <- imageDimsToRST attr
+ let fig = "image:: " <> literal src
+ alt | null txt = empty
| otherwise = ":alt: " <> description
- capt | isfig = description
- | otherwise = empty
+ capt = empty
(_,cls,_) = attr
classes = case cls of
[] -> empty
["align-right"] -> ":align: right"
["align-left"] -> ":align: left"
["align-center"] -> ":align: center"
- _ | isfig -> ":figclass: " <> literal (T.unwords cls)
- | otherwise -> ":class: " <> literal (T.unwords cls)
+ _ -> ":class: " <> literal (T.unwords cls)
return $ hang 3 ".. " (fig $$ alt $$ classes $$ dims $+$ capt) $$ blankline
blockToRST (Para inlines)
| LineBreak `elem` inlines =
@@ -270,7 +276,12 @@ blockToRST (Header level (name,classes,_) inlines) = do
let headerChar = if level > 5 then ' ' else "=-~^'" !! (level - 1)
let border = literal $ T.replicate (offset contents) $ T.singleton headerChar
let anchor | T.null name || name == autoId = empty
- | otherwise = ".. _" <> literal name <> ":" $$ blankline
+ | otherwise = ".. _" <>
+ (if T.any (==':') name ||
+ T.take 1 name == "_"
+ then "`" <> literal name <> "`"
+ else literal name) <>
+ ":" $$ blankline
return $ nowrap $ anchor $$ contents $$ border $$ blankline
else do
let rub = "rubric:: " <> contents
@@ -402,7 +413,7 @@ blockListToRST' topLevel blocks = do
toClose Header{} = False
toClose LineBlock{} = False
toClose HorizontalRule = False
- toClose (Para [Image _ _ (_,t)]) = "fig:" `T.isPrefixOf` t
+ toClose SimpleFigure{} = True
toClose Para{} = False
toClose _ = True
commentSep = RawBlock "rst" "..\n\n"
diff --git a/src/Text/Pandoc/Writers/RTF.hs b/src/Text/Pandoc/Writers/RTF.hs
index 3527949b4..eeef3eaf3 100644
--- a/src/Text/Pandoc/Writers/RTF.hs
+++ b/src/Text/Pandoc/Writers/RTF.hs
@@ -43,10 +43,11 @@ rtfEmbedImage opts x@(Image attr _ (src,_)) = catchError
(do result <- P.fetchItem src
case result of
(imgdata, Just mime)
- | mime == "image/jpeg" || mime == "image/png" -> do
+ | mime' <- T.takeWhile (/=';') mime
+ , mime' == "image/jpeg" || mime' == "image/png" -> do
let bytes = map (T.pack . printf "%02x") $ B.unpack imgdata
filetype <-
- case mime of
+ case mime' of
"image/jpeg" -> return "\\jpegblip"
"image/png" -> return "\\pngblip"
_ -> throwError $
@@ -64,7 +65,7 @@ rtfEmbedImage opts x@(Image attr _ (src,_)) = catchError
-- twip = 1/1440in = 1/20pt
where (xpx, ypx) = sizeInPixels sz
(xpt, ypt) = desiredSizeInPoints opts attr sz
- let raw = "{\\pict" <> filetype <> sizeSpec <> "\\bin " <>
+ let raw = "{\\pict" <> filetype <> sizeSpec <> " " <>
T.concat bytes <> "}"
if B.null imgdata
then do
@@ -259,7 +260,8 @@ blockToRTF indent _ HorizontalRule = return $
blockToRTF indent alignment (Header level _ lst) = do
contents <- inlinesToRTF lst
return $ rtfPar indent 0 alignment $
- "\\b \\fs" <> tshow (40 - (level * 4)) <> " " <> contents
+ "\\outlinelevel" <> tshow (level - 1) <>
+ " \\b \\fs" <> tshow (40 - (level * 4)) <> " " <> contents
blockToRTF indent alignment (Table _ blkCapt specs thead tbody tfoot) = do
let (caption, aligns, sizes, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot
caption' <- inlinesToRTF caption
diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs
index 0b7c6bee0..b23fc1341 100644
--- a/src/Text/Pandoc/Writers/Shared.hs
+++ b/src/Text/Pandoc/Writers/Shared.hs
@@ -36,6 +36,7 @@ module Text.Pandoc.Writers.Shared (
, toTableOfContents
, endsWithPlain
, toLegacyTable
+ , splitSentences
)
where
import Safe (lastMay)
@@ -49,6 +50,7 @@ import Data.List.NonEmpty (NonEmpty(..), nonEmpty)
import Data.Text.Conversions (FromText(..))
import qualified Data.Map as M
import qualified Data.Text as T
+import Data.Text (Text)
import qualified Text.Pandoc.Builder as Builder
import Text.Pandoc.Definition
import Text.Pandoc.Options
@@ -119,13 +121,13 @@ metaValueToVal _ inlineWriter (MetaInlines is) = SimpleVal <$> inlineWriter is
-- | Retrieve a field value from a template context.
-getField :: FromContext a b => T.Text -> Context a -> Maybe b
+getField :: FromContext a b => Text -> Context a -> Maybe b
getField field (Context m) = M.lookup field m >>= fromVal
-- | Set a field of a template context. If the field already has a value,
-- convert it into a list with the new value appended to the old value(s).
-- This is a utility function to be used in preparing template contexts.
-setField :: ToContext a b => T.Text -> b -> Context a -> Context a
+setField :: ToContext a b => Text -> b -> Context a -> Context a
setField field val (Context m) =
Context $ M.insertWith combine field (toVal val) m
where
@@ -135,21 +137,21 @@ setField field val (Context m) =
-- | Reset a field of a template context. If the field already has a
-- value, the new value replaces it.
-- This is a utility function to be used in preparing template contexts.
-resetField :: ToContext a b => T.Text -> b -> Context a -> Context a
+resetField :: ToContext a b => Text -> b -> Context a -> Context a
resetField field val (Context m) =
Context (M.insert field (toVal val) m)
-- | Set a field of a template context if it currently has no value.
-- If it has a value, do nothing.
-- This is a utility function to be used in preparing template contexts.
-defField :: ToContext a b => T.Text -> b -> Context a -> Context a
+defField :: ToContext a b => Text -> b -> Context a -> Context a
defField field val (Context m) =
Context (M.insertWith f field (toVal val) m)
where
f _newval oldval = oldval
-- | Get the contents of the `lang` metadata field or variable.
-getLang :: WriterOptions -> Meta -> Maybe T.Text
+getLang :: WriterOptions -> Meta -> Maybe Text
getLang opts meta =
case lookupContext "lang" (writerVariables opts) of
Just s -> Just s
@@ -162,7 +164,7 @@ getLang opts meta =
_ -> Nothing
-- | Produce an HTML tag with the given pandoc attributes.
-tagWithAttrs :: HasChars a => T.Text -> Attr -> Doc a
+tagWithAttrs :: HasChars a => Text -> Attr -> Doc a
tagWithAttrs tag (ident,classes,kvs) = hsep
["<" <> text (T.unpack tag)
,if T.null ident
@@ -213,7 +215,7 @@ fixDisplayMath x = x
-- | Converts a Unicode character into the ASCII sequence used to
-- represent the character in "smart" Markdown.
-unsmartify :: WriterOptions -> T.Text -> T.Text
+unsmartify :: WriterOptions -> Text -> Text
unsmartify opts = T.concatMap $ \c -> case c of
'\8217' -> "'"
'\8230' -> "..."
@@ -345,7 +347,7 @@ gridTable opts blocksToDoc headless aligns widths headers rows = do
-- | Retrieve the metadata value for a given @key@
-- and convert to Bool.
-lookupMetaBool :: T.Text -> Meta -> Bool
+lookupMetaBool :: Text -> Meta -> Bool
lookupMetaBool key meta =
case lookupMeta key meta of
Just (MetaBlocks _) -> True
@@ -356,7 +358,7 @@ lookupMetaBool key meta =
-- | Retrieve the metadata value for a given @key@
-- and extract blocks.
-lookupMetaBlocks :: T.Text -> Meta -> [Block]
+lookupMetaBlocks :: Text -> Meta -> [Block]
lookupMetaBlocks key meta =
case lookupMeta key meta of
Just (MetaBlocks bs) -> bs
@@ -366,7 +368,7 @@ lookupMetaBlocks key meta =
-- | Retrieve the metadata value for a given @key@
-- and extract inlines.
-lookupMetaInlines :: T.Text -> Meta -> [Inline]
+lookupMetaInlines :: Text -> Meta -> [Inline]
lookupMetaInlines key meta =
case lookupMeta key meta of
Just (MetaString s) -> [Str s]
@@ -377,7 +379,7 @@ lookupMetaInlines key meta =
-- | Retrieve the metadata value for a given @key@
-- and convert to String.
-lookupMetaString :: T.Text -> Meta -> T.Text
+lookupMetaString :: Text -> Meta -> Text
lookupMetaString key meta =
case lookupMeta key meta of
Just (MetaString s) -> s
@@ -506,7 +508,7 @@ toLegacyTable (Caption _ cbody) specs thead tbodies tfoot
= let (h, w, cBody) = getComponents c
cRowPieces = cBody : replicate (w - 1) mempty
cPendingPieces = replicate w $ replicate (h - 1) mempty
- pendingPieces' = dropWhile null pendingPieces
+ pendingPieces' = drop w pendingPieces
(pendingPieces'', rowPieces) = placeCutCells pendingPieces' cells'
in (cPendingPieces <> pendingPieces'', cRowPieces <> rowPieces)
| otherwise = ([], [])
@@ -519,3 +521,27 @@ toLegacyTable (Caption _ cbody) specs thead tbodies tfoot
getComponents (Cell _ _ (RowSpan h) (ColSpan w) body)
= (h, w, body)
+
+splitSentences :: Doc Text -> Doc Text
+splitSentences = go . toList
+ where
+ go [] = mempty
+ go (Text len t : BreakingSpace : xs) =
+ if isSentenceEnding t
+ then Text len t <> NewLine <> go xs
+ else Text len t <> BreakingSpace <> go xs
+ go (x:xs) = x <> go xs
+
+ toList (Concat (Concat a b) c) = toList (Concat a (Concat b c))
+ toList (Concat a b) = a : toList b
+ toList x = [x]
+
+ isSentenceEnding t =
+ case T.unsnoc t of
+ Just (t',c)
+ | c == '.' || c == '!' || c == '?' -> True
+ | c == ')' || c == ']' || c == '"' || c == '\x201D' ->
+ case T.unsnoc t' of
+ Just (_,d) -> d == '.' || d == '!' || d == '?'
+ _ -> False
+ _ -> False
diff --git a/src/Text/Pandoc/Writers/Texinfo.hs b/src/Text/Pandoc/Writers/Texinfo.hs
index 6a33b4283..3c5591b3a 100644
--- a/src/Text/Pandoc/Writers/Texinfo.hs
+++ b/src/Text/Pandoc/Writers/Texinfo.hs
@@ -123,8 +123,7 @@ blockToTexinfo (Plain lst) =
inlineListToTexinfo lst
-- title beginning with fig: indicates that the image is a figure
-blockToTexinfo (Para [Image attr txt (src,tgt)])
- | Just tit <- T.stripPrefix "fig:" tgt = do
+blockToTexinfo (SimpleFigure attr txt (src, tit)) = do
capt <- if null txt
then return empty
else (\c -> text "@caption" <> braces c) `fmap`
diff --git a/src/Text/Pandoc/Writers/Textile.hs b/src/Text/Pandoc/Writers/Textile.hs
index 03d030477..7f0d668e5 100644
--- a/src/Text/Pandoc/Writers/Textile.hs
+++ b/src/Text/Pandoc/Writers/Textile.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.Textile
Copyright : Copyright (C) 2010-2021 John MacFarlane
@@ -111,8 +110,7 @@ blockToTextile opts (Div attr bs) = do
blockToTextile opts (Plain inlines) =
inlineListToTextile opts inlines
--- title beginning with fig: indicates that the image is a figure
-blockToTextile opts (Para [Image attr txt (src,T.stripPrefix "fig:" -> Just tit)]) = do
+blockToTextile opts (SimpleFigure attr txt (src, tit)) = do
capt <- blockToTextile opts (Para txt)
im <- inlineToTextile opts (Image attr txt (src,tit))
return $ im <> "\n" <> capt
diff --git a/src/Text/Pandoc/Writers/ZimWiki.hs b/src/Text/Pandoc/Writers/ZimWiki.hs
index df914f590..5722b6d2e 100644
--- a/src/Text/Pandoc/Writers/ZimWiki.hs
+++ b/src/Text/Pandoc/Writers/ZimWiki.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE OverloadedStrings #-}
-{-# LANGUAGE ViewPatterns #-}
{- |
Module : Text.Pandoc.Writers.ZimWiki
Copyright : © 2008-2021 John MacFarlane,
@@ -86,9 +85,8 @@ blockToZimWiki opts (Div _attrs bs) = do
blockToZimWiki opts (Plain inlines) = inlineListToZimWiki opts inlines
--- title beginning with fig: indicates that the image is a figure
-- ZimWiki doesn't support captions - so combine together alt and caption into alt
-blockToZimWiki opts (Para [Image attr txt (src,T.stripPrefix "fig:" -> Just tit)]) = do
+blockToZimWiki opts (SimpleFigure attr txt (src, tit)) = do
capt <- if null txt
then return ""
else (" " <>) `fmap` inlineListToZimWiki opts txt
diff --git a/test/Tests/Command.hs b/test/Tests/Command.hs
index 539be1a1a..f437e026b 100644
--- a/test/Tests/Command.hs
+++ b/test/Tests/Command.hs
@@ -12,6 +12,7 @@ Run commands, and test results, defined in markdown files.
module Tests.Command (runTest, tests)
where
+import Data.Maybe (fromMaybe)
import Data.Algorithm.Diff
import System.Environment (getExecutablePath)
import qualified Data.ByteString as BS
@@ -90,18 +91,19 @@ extractCode :: Block -> String
extractCode (CodeBlock _ code) = T.unpack code
extractCode _ = ""
-dropPercent :: String -> String
-dropPercent ('%':xs) = dropWhile (== ' ') xs
-dropPercent xs = xs
+dropPercent :: String -> Maybe String
+dropPercent ('%':xs) = Just $ dropWhile (== ' ') xs
+dropPercent _ = Nothing
runCommandTest :: FilePath -> FilePath -> Int -> String -> TestTree
-runCommandTest testExePath fp num code =
- goldenTest testname getExpected getActual compareValues updateGolden
+runCommandTest testExePath fp num code = do
+ goldenTest testname getExpected getActual compareValues' updateGolden
where
testname = "#" <> show num
codelines = lines code
(continuations, r1) = span ("\\" `isSuffixOf`) codelines
- cmd = dropPercent (unwords (map init continuations ++ take 1 r1))
+ cmd = fromMaybe (error "Command test line does not begin with %")
+ (dropPercent (unwords (map init continuations ++ take 1 r1)))
r2 = drop 1 r1
(inplines, r3) = break (=="^D") r2
normlines = takeWhile (/=".") (drop 1 r3)
@@ -109,7 +111,7 @@ runCommandTest testExePath fp num code =
norm = unlines normlines
getExpected = return norm
getActual = snd <$> execTest testExePath cmd input
- compareValues expected actual
+ compareValues' expected actual
| actual == expected = return Nothing
| otherwise = return $ Just $ "--- test/command/" ++ fp ++ "\n+++ " ++
cmd ++ "\n" ++ showDiff (1,1)
diff --git a/test/Tests/Helpers.hs b/test/Tests/Helpers.hs
index a48a5894e..6c06e3f71 100644
--- a/test/Tests/Helpers.hs
+++ b/test/Tests/Helpers.hs
@@ -16,6 +16,7 @@ module Tests.Helpers ( test
, TestResult(..)
, setupEnvironment
, showDiff
+ , testGolden
, (=?>)
, purely
, ToString(..)
@@ -23,13 +24,16 @@ module Tests.Helpers ( test
)
where
+import System.FilePath
import Data.Algorithm.Diff
import qualified Data.Map as M
+import qualified Text.Pandoc.UTF8 as UTF8
import Data.Text (Text, unpack)
+import qualified Data.Text as T
import System.Exit
-import System.FilePath (takeDirectory)
import qualified System.Environment as Env
import Test.Tasty
+import Test.Tasty.Golden.Advanced (goldenTest)
import Test.Tasty.HUnit
import Text.Pandoc.Builder (Blocks, Inlines, doc, plain)
import Text.Pandoc.Class
@@ -61,6 +65,23 @@ test fn name (input, expected) =
dashes "" = replicate 72 '-'
dashes x = replicate (72 - length x - 5) '-' ++ " " ++ x ++ " ---"
+testGolden :: TestName -> FilePath -> FilePath -> (Text -> IO Text) -> TestTree
+testGolden name expectedPath inputPath fn =
+ goldenTest
+ name
+ (UTF8.readFile expectedPath)
+ (UTF8.readFile inputPath >>= fn)
+ compareVals
+ (UTF8.writeFile expectedPath)
+ where
+ compareVals expected actual
+ | expected == actual = return Nothing
+ | otherwise = return $ Just $
+ "\n--- " ++ expectedPath ++ "\n+++\n" ++
+ showDiff (1,1)
+ (getDiff (lines . filter (/='\r') $ T.unpack actual)
+ (lines . filter (/='\r') $ T.unpack expected))
+
-- | Set up environment for pandoc command tests.
setupEnvironment :: FilePath -> IO [(String, String)]
setupEnvironment testExePath = do
diff --git a/test/Tests/Lua.hs b/test/Tests/Lua.hs
index 31c011900..00193614d 100644
--- a/test/Tests/Lua.hs
+++ b/test/Tests/Lua.hs
@@ -1,5 +1,6 @@
-{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
{- |
Module : Tests.Lua
Copyright : © 2017-2021 Albert Krewinkel
@@ -13,11 +14,10 @@ Unit and integration tests for pandoc's Lua subsystem.
-}
module Tests.Lua ( runLuaTest, tests ) where
-import Control.Monad (when)
+import HsLua as Lua hiding (Operation (Div), error)
import System.FilePath ((</>))
-import Test.Tasty (TestTree, localOption)
-import Test.Tasty.HUnit (Assertion, assertEqual, testCase)
-import Test.Tasty.QuickCheck (QuickCheckTests (..), ioProperty, testProperty)
+import Test.Tasty (TestTree, testGroup)
+import Test.Tasty.HUnit ((@=?), Assertion, HasCallStack, assertEqual, testCase)
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder (bulletList, definitionList, displayMath, divWith,
doc, doubleQuoted, emph, header, lineBlock,
@@ -25,8 +25,8 @@ import Text.Pandoc.Builder (bulletList, definitionList, displayMath, divWith,
singleQuoted, space, str, strong,
HasMeta (setMeta))
import Text.Pandoc.Class (runIOorExplode, setUserDataDir)
-import Text.Pandoc.Definition (Block (BlockQuote, Div, Para), Inline (Emph, Str),
- Attr, Meta, Pandoc, pandocTypesVersion)
+import Text.Pandoc.Definition (Attr, Block (BlockQuote, Div, Para), Pandoc,
+ Inline (Emph, Str), pandocTypesVersion)
import Text.Pandoc.Error (PandocError (PandocLuaError))
import Text.Pandoc.Filter (Filter (LuaFilter), applyFilters)
import Text.Pandoc.Lua (runLua)
@@ -34,25 +34,12 @@ import Text.Pandoc.Options (def)
import Text.Pandoc.Shared (pandocVersion)
import qualified Control.Monad.Catch as Catch
-import qualified Foreign.Lua as Lua
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
tests :: [TestTree]
-tests = map (localOption (QuickCheckTests 20))
- [ testProperty "inline elements can be round-tripped through the lua stack" $
- \x -> ioProperty (roundtripEqual (x::Inline))
-
- , testProperty "block elements can be round-tripped through the lua stack" $
- \x -> ioProperty (roundtripEqual (x::Block))
-
- , testProperty "meta blocks can be round-tripped through the lua stack" $
- \x -> ioProperty (roundtripEqual (x::Meta))
-
- , testProperty "documents can be round-tripped through the lua stack" $
- \x -> ioProperty (roundtripEqual (x::Pandoc))
-
- , testCase "macro expansion via filter" $
+tests =
+ [ testCase "macro expansion via filter" $
assertFilterConversion "a '{{helloworld}}' string is expanded"
"strmacro.lua"
(doc . para $ str "{{helloworld}}")
@@ -163,12 +150,12 @@ tests = map (localOption (QuickCheckTests 20))
Lua.getglobal "PANDOC_VERSION"
Lua.liftIO .
assertEqual "pandoc version is wrong" (TE.encodeUtf8 pandocVersion)
- =<< Lua.tostring' Lua.stackTop
+ =<< Lua.tostring' Lua.top
, testCase "Pandoc types version is set" . runLuaTest $ do
Lua.getglobal "PANDOC_API_VERSION"
Lua.liftIO . assertEqual "pandoc-types version is wrong" pandocTypesVersion
- =<< Lua.peek Lua.stackTop
+ =<< Lua.peek Lua.top
, testCase "require file" $
assertFilterConversion "requiring file failed"
@@ -177,38 +164,67 @@ tests = map (localOption (QuickCheckTests 20))
(doc $ para (str . T.pack $ "lua" </> "require-file.lua"))
, testCase "Allow singleton inline in constructors" . runLuaTest $ do
- Lua.liftIO . assertEqual "Not the expected Emph" (Emph [Str "test"])
- =<< Lua.callFunc "pandoc.Emph" (Str "test")
- Lua.liftIO . assertEqual "Unexpected element" (Para [Str "test"])
- =<< Lua.callFunc "pandoc.Para" ("test" :: String)
+ Lua.liftIO . assertEqual "Not the expected Emph"
+ (Emph [Str "test"]) =<< do
+ Lua.OK <- Lua.dostring "return pandoc.Emph"
+ Lua.push @Inline (Str "test")
+ Lua.call 1 1
+ Lua.peek @Inline top
+ Lua.liftIO . assertEqual "Unexpected element"
+ (Para [Str "test"]) =<< do
+ Lua.getglobal' "pandoc.Para"
+ Lua.pushString "test"
+ Lua.call 1 1
+ Lua.peek @Block top
Lua.liftIO . assertEqual "Unexptected element"
(BlockQuote [Para [Str "foo"]]) =<< (
do
Lua.getglobal' "pandoc.BlockQuote"
Lua.push (Para [Str "foo"])
_ <- Lua.call 1 1
- Lua.peek Lua.stackTop
+ Lua.peek @Block Lua.top
)
, testCase "Elements with Attr have `attr` accessor" . runLuaTest $ do
Lua.push (Div ("hi", ["moin"], [])
[Para [Str "ignored"]])
- Lua.getfield Lua.stackTop "attr"
+ Lua.getfield Lua.top "attr"
Lua.liftIO . assertEqual "no accessor" (("hi", ["moin"], []) :: Attr)
- =<< Lua.peek Lua.stackTop
+ =<< Lua.peek @Attr Lua.top
, testCase "module `pandoc.system` is present" . runLuaTest $ do
Lua.getglobal' "pandoc.system"
- ty <- Lua.ltype Lua.stackTop
+ ty <- Lua.ltype Lua.top
Lua.liftIO $ assertEqual "module should be a table" Lua.TypeTable ty
+ , testGroup "global modules"
+ [ testCase "module 'lpeg' is loaded into a global" . runLuaTest $ do
+ s <- Lua.dostring "assert(type(lpeg)=='table')"
+ Lua.liftIO $ Lua.OK @=? s
+
+ , testCase "module 're' is loaded into a global" . runLuaTest $ do
+ s <- Lua.dostring "assert(type(re)=='table')"
+ Lua.liftIO $ Lua.OK @=? s
+
+ , testCase "module 'lpeg' is available via `require`" . runLuaTest $ do
+ s <- Lua.dostring
+ "package.path = ''; package.cpath = ''; require 'lpeg'"
+ Lua.liftIO $ Lua.OK @=? s
+
+ , testCase "module 're' is available via `require`" . runLuaTest $ do
+ s <- Lua.dostring
+ "package.path = ''; package.cpath = ''; require 're'"
+ Lua.liftIO $ Lua.OK @=? s
+ ]
+
, testCase "informative error messages" . runLuaTest $ do
Lua.pushboolean True
- eitherPandoc <- Catch.try (Lua.peek Lua.stackTop :: Lua.Lua Pandoc)
+ -- Lua.newtable
+ eitherPandoc <- Catch.try (peek @Pandoc Lua.top)
case eitherPandoc of
Left (PandocLuaError msg) -> do
- let expectedMsg = "Could not get Pandoc value: "
- <> "table expected, got boolean"
+ let expectedMsg = "Pandoc expected, got boolean\n"
+ <> "\twhile retrieving Pandoc"
Lua.liftIO $ assertEqual "unexpected error message" expectedMsg msg
Left e -> error ("Expected a Lua error, but got " <> show e)
Right _ -> error "Getting a Pandoc element from a bool should fail."
@@ -221,21 +237,8 @@ assertFilterConversion msg filterPath docIn expectedDoc = do
applyFilters def [LuaFilter ("lua" </> filterPath)] ["HTML"] docIn
assertEqual msg expectedDoc actualDoc
-roundtripEqual :: (Eq a, Lua.Peekable a, Lua.Pushable a) => a -> IO Bool
-roundtripEqual x = (x ==) <$> roundtripped
- where
- roundtripped :: Lua.Peekable a => IO a
- roundtripped = runLuaTest $ do
- oldSize <- Lua.gettop
- Lua.push x
- size <- Lua.gettop
- when (size - oldSize /= 1) $
- error ("not exactly one additional element on the stack: " ++ show size)
- Lua.peek (-1)
-
-runLuaTest :: Lua.Lua a -> IO a
+runLuaTest :: HasCallStack => Lua.LuaE PandocError a -> IO a
runLuaTest op = runIOorExplode $ do
- setUserDataDir (Just "../data")
res <- runLua op
case res of
Left e -> error (show e)
diff --git a/test/Tests/Lua/Module.hs b/test/Tests/Lua/Module.hs
index 8be445f65..e4d1e8bd9 100644
--- a/test/Tests/Lua/Module.hs
+++ b/test/Tests/Lua/Module.hs
@@ -29,7 +29,7 @@ tests =
("lua" </> "module" </> "pandoc-path.lua")
, testPandocLua "pandoc.types"
("lua" </> "module" </> "pandoc-types.lua")
- , testPandocLua "pandoc.util"
+ , testPandocLua "pandoc.utils"
("lua" </> "module" </> "pandoc-utils.lua")
]
diff --git a/test/Tests/Old.hs b/test/Tests/Old.hs
index ad9f249c4..450449946 100644
--- a/test/Tests/Old.hs
+++ b/test/Tests/Old.hs
@@ -146,7 +146,7 @@ tests pandocPath =
"dokuwiki_external_images.native" "dokuwiki_external_images.dokuwiki"
]
, testGroup "opml"
- [ test' "basic" ["-r", "native", "-w", "opml", "--columns=78", "-s"]
+ [ test' "basic" ["-r", "native", "-w", "opml", "--columns=80", "-s"]
"testsuite.native" "writer.opml"
, test' "reader" ["-r", "opml", "-w", "native", "-s"]
"opml-reader.opml" "opml-reader.native"
@@ -175,7 +175,7 @@ tests pandocPath =
"tikiwiki-reader.tikiwiki" "tikiwiki-reader.native" ]
, testGroup "other writers" $ map (\f -> testGroup f $ writerTests' f)
[ "opendocument" , "context" , "texinfo", "icml", "tei"
- , "man" , "plain" , "rtf", "org", "asciidoc", "asciidoctor"
+ , "man" , "plain" , "asciidoc", "asciidoctor"
, "xwiki", "zimwiki"
]
, testGroup "writers-lang-and-dir"
@@ -207,7 +207,10 @@ tests pandocPath =
, testGroup "org"
[ test' "reader" ["-r", "org", "-w", "native", "-s"]
"org-select-tags.org" "org-select-tags.native"
+ , testGroup "writer" $ writerTests' "org"
]
+ , testGroup "rtf"
+ [ testGroup "writer" $ writerTests' "rtf" ]
, testGroup "ipynb"
[ test' "reader" ["-f", "ipynb-raw_html-raw_tex+raw_attribute",
"-t", "native", "-s"]
@@ -216,7 +219,16 @@ tests pandocPath =
"--markdown-headings=setext", "-t",
"ipynb-raw_html-raw_tex+raw_attribute", "-s"]
"ipynb/simple.in.native" "ipynb/simple.ipynb"
+ , test' "reader" ["-t", "native", "-f", "ipynb",
+ "--ipynb-output=all"]
+ "ipynb/mime.ipynb" "ipynb/mime.native"
+ , test' "writer" ["-f", "native", "-t", "ipynb",
+ "--wrap=preserve"]
+ "ipynb/mime.native" "ipynb/mime.out.ipynb"
+ , test' "reader" ["-f", "ipynb", "-t", "html"]
+ "ipynb/rank.ipynb" "ipynb/rank.out.html"
]
+ , testGroup "markua" [ testGroup "writer" $ writerTests' "markua"]
]
where
test' = test pandocPath
@@ -259,7 +271,7 @@ writerTests pandocPath format
"tables" opts "tables.native" ("tables" <.> format)
]
where
- opts = ["-r", "native", "-w", format, "--columns=78",
+ opts = ["-r", "native", "-w", format, "--columns=80",
"--variable", "pandoc-version="]
extendedWriterTests :: FilePath -> String -> [TestTree]
@@ -273,7 +285,7 @@ extendedWriterTests pandocPath format
("tables" </> name <.> format)
in map testForTable ["planets", "nordics", "students"]
where
- opts = ["-r", "native", "-w", format, "--columns=78",
+ opts = ["-r", "native", "-w", format, "--columns=80",
"--variable", "pandoc-version="]
s5WriterTest :: FilePath -> String -> [String] -> String -> TestTree
diff --git a/test/Tests/Readers/Docx.hs b/test/Tests/Readers/Docx.hs
index 220c7d9c5..be5b89b88 100644
--- a/test/Tests/Readers/Docx.hs
+++ b/test/Tests/Readers/Docx.hs
@@ -148,6 +148,18 @@ tests = [ testGroup "document"
"docx/instrText_hyperlink.docx"
"docx/instrText_hyperlink.native"
, testCompare
+ "nested fields with <w:instrText> tag"
+ "docx/nested_instrText.docx"
+ "docx/nested_instrText.native"
+ , testCompare
+ "empty fields with <w:instrText> tag"
+ "docx/empty_field.docx"
+ "docx/empty_field.native"
+ , testCompare
+ "pageref hyperlinks in <w:instrText> tag"
+ "docx/pageref.docx"
+ "docx/pageref.native"
+ , testCompare
"inline image"
"docx/image.docx"
"docx/image_no_embed.native"
@@ -306,6 +318,10 @@ tests = [ testGroup "document"
"docx/block_quotes.docx"
"docx/block_quotes_parse_indent.native"
, testCompare
+ "blockquotes (parsing indent relative to the indent of the parent style as blockquote)"
+ "docx/relative_indentation_blockquotes.docx"
+ "docx/relative_indentation_blockquotes.native"
+ , testCompare
"hanging indents"
"docx/hanging_indent.docx"
"docx/hanging_indent.native"
diff --git a/test/Tests/Readers/FB2.hs b/test/Tests/Readers/FB2.hs
index 42054a235..d540f8b6a 100644
--- a/test/Tests/Readers/FB2.hs
+++ b/test/Tests/Readers/FB2.hs
@@ -7,7 +7,7 @@
Stability : alpha
Portability : portable
-Tests for the EPUB mediabag.
+Tests for the FB2 reader.
-}
module Tests.Readers.FB2 (tests) where
diff --git a/test/Tests/Readers/Markdown.hs b/test/Tests/Readers/Markdown.hs
index f055ab197..02fc0d8ce 100644
--- a/test/Tests/Readers/Markdown.hs
+++ b/test/Tests/Readers/Markdown.hs
@@ -36,6 +36,9 @@ markdownGH :: Text -> Pandoc
markdownGH = purely $ readMarkdown def {
readerExtensions = githubMarkdownExtensions }
+markdownMMD :: Text -> Pandoc
+markdownMMD = purely $ readMarkdown def {
+ readerExtensions = multimarkdownExtensions }
infix 4 =:
(=:) :: ToString c
=> String -> (Text, c) -> TestTree
@@ -360,6 +363,51 @@ tests = [ testGroup "inline code"
("**this should \"be bold**"
=?> para (strong "this should \8220be bold"))
]
+ , testGroup "sub- and superscripts"
+ [
+ test markdownMMD "normal subscript"
+ ("H~2~"
+ =?> para ("H" <> subscript "2"))
+ , test markdownMMD "normal superscript"
+ ("x^3^"
+ =?> para ("x" <> superscript "3"))
+ , test markdownMMD "short subscript delimeted by space"
+ ("O~2 is dangerous"
+ =?> para ("O" <> subscript "2" <> space <> "is dangerous"))
+ , test markdownMMD "short subscript delimeted by newline"
+ ("O~2\n"
+ =?> para ("O" <> subscript "2"))
+ , test markdownMMD "short subscript delimeted by EOF"
+ ("O~2"
+ =?> para ("O" <> subscript "2"))
+ , test markdownMMD "short subscript delimited by punctuation"
+ ("O~2."
+ =?> para ("O" <> subscript "2" <> "."))
+ , test markdownMMD "short subscript delimited by emph"
+ ("O~2*combustible!*"
+ =?> para ("O" <> subscript "2" <> emph "combustible!"))
+ , test markdownMMD "no nesting in short subscripts"
+ ("y~*2*"
+ =?> para ("y~" <> emph "2"))
+ , test markdownMMD "short superscript delimeted by space"
+ ("x^2 = y"
+ =?> para ("x" <> superscript "2" <> space <> "= y"))
+ , test markdownMMD "short superscript delimeted by newline"
+ ("x^2\n"
+ =?> para ("x" <> superscript "2"))
+ , test markdownMMD "short superscript delimeted by ExF"
+ ("x^2"
+ =?> para ("x" <> superscript "2"))
+ , test markdownMMD "short superscript delimited by punctuation"
+ ("x^2."
+ =?> para ("x" <> superscript "2" <> "."))
+ , test markdownMMD "short superscript delimited by emph"
+ ("x^2*combustible!*"
+ =?> para ("x" <> superscript "2" <> emph "combustible!"))
+ , test markdownMMD "no nesting in short superscripts"
+ ("y^*2*"
+ =?> para ("y^" <> emph "2"))
+ ]
, testGroup "footnotes"
[ "indent followed by newline and flush-left text" =:
"[^1]\n\n[^1]: my note\n\n \nnot in note\n"
diff --git a/test/Tests/Readers/Org/Inline/Citation.hs b/test/Tests/Readers/Org/Inline/Citation.hs
index a11804983..2d0d460a2 100644
--- a/test/Tests/Readers/Org/Inline/Citation.hs
+++ b/test/Tests/Readers/Org/Inline/Citation.hs
@@ -19,9 +19,9 @@ import Text.Pandoc.Builder
tests :: [TestTree]
tests =
- [ testGroup "Markdown-style citations"
+ [ testGroup "Org-cite citations"
[ "Citation" =:
- "[@nonexistent]" =?>
+ "[cite:@nonexistent]" =?>
let citation = Citation
{ citationId = "nonexistent"
, citationPrefix = []
@@ -29,10 +29,10 @@ tests =
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0}
- in (para $ cite [citation] "[@nonexistent]")
+ in (para $ cite [citation] "[cite:@nonexistent]")
, "Citation containing text" =:
- "[see @item1 p. 34-35]" =?>
+ "[cite:see @item1 p. 34-35]" =?>
let citation = Citation
{ citationId = "item1"
, citationPrefix = [Str "see"]
@@ -40,7 +40,37 @@ tests =
, citationMode = NormalCitation
, citationNoteNum = 0
, citationHash = 0}
- in (para $ cite [citation] "[see @item1 p. 34-35]")
+ in (para $ cite [citation] "[cite:see @item1 p. 34-35]")
+
+ , "Author-in-text citation with locator and suffix" =:
+ "[cite/t:see @item1 p. 34-35 and *passim*; @item2]" =?>
+ let citations =
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Str "see" ]
+ , citationSuffix =
+ [ Str "p."
+ , Space
+ , Str "34-35"
+ , Space
+ , Str "and"
+ , Space
+ , Strong [ Str "passim" ]
+ ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "item2"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ in (para $ cite citations "[cite/t:see @item1 p. 34-35 and *passim*; @item2]")
]
, testGroup "org-ref citations"
@@ -169,53 +199,6 @@ tests =
in (para $ cite [citation] "[[citep:Dominik201408][See page 20::, for example]]")
]
- , testGroup "Berkeley-style citations" $
- let pandocCite = Citation
- { citationId = "Pandoc"
- , citationPrefix = mempty
- , citationSuffix = mempty
- , citationMode = NormalCitation
- , citationNoteNum = 0
- , citationHash = 0
- }
- pandocInText = pandocCite { citationMode = AuthorInText }
- dominikCite = Citation
- { citationId = "Dominik201408"
- , citationPrefix = mempty
- , citationSuffix = mempty
- , citationMode = NormalCitation
- , citationNoteNum = 0
- , citationHash = 0
- }
- dominikInText = dominikCite { citationMode = AuthorInText }
- in
- [ "Berkeley-style in-text citation" =:
- "See @Dominik201408." =?>
- para ("See "
- <> cite [dominikInText] "@Dominik201408"
- <> ".")
-
- , "Berkeley-style parenthetical citation list" =:
- "[(cite): see; @Dominik201408;also @Pandoc; and others]" =?>
- let pandocCite' = pandocCite {
- citationPrefix = toList "also"
- , citationSuffix = toList "and others"
- }
- dominikCite' = dominikCite {
- citationPrefix = toList "see"
- }
- in (para $ cite [dominikCite', pandocCite'] "")
-
- , "Berkeley-style plain citation list" =:
- "[cite: See; @Dominik201408; and @Pandoc; and others]" =?>
- let pandocCite' = pandocInText { citationPrefix = toList "and" }
- in (para $ "See "
- <> cite [dominikInText] ""
- <> "," <> space
- <> cite [pandocCite'] ""
- <> "," <> space <> "and others")
- ]
-
, "LaTeX citation" =:
"\\cite{Coffee}" =?>
let citation = Citation
diff --git a/test/Tests/Readers/Org/Meta.hs b/test/Tests/Readers/Org/Meta.hs
index 6363d84b0..41a41cb00 100644
--- a/test/Tests/Readers/Org/Meta.hs
+++ b/test/Tests/Readers/Org/Meta.hs
@@ -238,7 +238,7 @@ tests =
, " :setting: foo"
, " :END:"
] =?>
- (mempty::Blocks)
+ (setMeta "setting" ("foo" :: T.Text) (doc mempty))
, "Logbook drawer" =:
T.unlines [ " :LogBook:"
diff --git a/test/Tests/Readers/RST.hs b/test/Tests/Readers/RST.hs
index a12b59fc2..e9ab8cc11 100644
--- a/test/Tests/Readers/RST.hs
+++ b/test/Tests/Readers/RST.hs
@@ -179,6 +179,15 @@ tests = [ "line block with blank line" =:
, "custom code role with language field"
=: ".. role:: lhs(code)\n :language: haskell\n\n:lhs:`a`"
=?> para (codeWith ("", ["lhs", "haskell"], []) "a")
+ , "custom role with class field"
+ =: ".. role:: classy\n :class: myclass\n\n:classy:`a`"
+ =?> para (spanWith ("", ["myclass"], []) "a")
+ , "custom role with class field containing multiple whitespace-separated classes"
+ =: ".. role:: classy\n :class: myclass1 myclass2\n myclass3\n\n:classy:`a`"
+ =?> para (spanWith ("", ["myclass1", "myclass2", "myclass3"], []) "a")
+ , "custom role with inherited class field"
+ =: ".. role:: classy\n :class: myclass1\n.. role:: classier(classy)\n :class: myclass2\n\n:classier:`a`"
+ =?> para (spanWith ("", ["myclass2", "myclass1"], []) "a")
, "custom role with unspecified parent role"
=: ".. role:: classy\n\n:classy:`text`"
=?> para (spanWith ("", ["classy"], []) "text")
diff --git a/test/Tests/Readers/RTF.hs b/test/Tests/Readers/RTF.hs
new file mode 100644
index 000000000..1b335274b
--- /dev/null
+++ b/test/Tests/Readers/RTF.hs
@@ -0,0 +1,42 @@
+{- |
+ Module : Tests.Readers.RTF
+ Copyright : © 2021 John MacFarlane
+ License : GNU GPL, version 2 or above
+
+ Maintainer : jgm@berkeley.edu
+ Stability : alpha
+ Portability : portable
+
+Tests for the RTF reader.
+-}
+module Tests.Readers.RTF (tests) where
+
+import Test.Tasty
+import Tests.Helpers
+import Text.Pandoc
+import System.FilePath (replaceExtension, (</>), (<.>))
+
+rtfTest :: TestName -> TestTree
+rtfTest name = testGolden name native path
+ (\t -> runIOorExplode
+ (readRTF def t >>=
+ writeNative def{ writerTemplate = Just mempty }))
+ where native = replaceExtension path ".native"
+ path = "rtf" </> name <.> "rtf"
+
+
+tests :: [TestTree]
+tests = map rtfTest [ "footnote"
+ , "accent"
+ , "unicode"
+ , "image"
+ , "link"
+ , "heading"
+ , "formatting"
+ , "list_simple"
+ , "list_complex"
+ , "bookmark"
+ , "table_simple"
+ , "table_error_codes"
+ ]
+
diff --git a/test/Tests/Shared.hs b/test/Tests/Shared.hs
index e415ea153..5365812fe 100644
--- a/test/Tests/Shared.hs
+++ b/test/Tests/Shared.hs
@@ -56,6 +56,7 @@ testLegacyTable :: [TestTree]
testLegacyTable =
[ testCase "decomposes a table with head" $ gen1 @?= expect1
, testCase "decomposes a table without head" $ gen2 @?= expect2
+ , testCase "decomposes the table from issue 7683" $ gen3 @?= expect3
]
where
pln = toList . plain . str
@@ -110,3 +111,18 @@ testLegacyTable =
,[pln "j", mempty, mempty]]
)
gen2 = toLegacyTable emptyCaption spec1 (th []) [body1] (tf footRows1)
+
+ spec3 = replicate 4 (AlignDefault, ColWidthDefault)
+ body3 = tb 0
+ []
+ [[cl "a" 2 1, cl "b" 1 2, cl "c" 2 1]
+ ,[cl "d" 1 1, cl "e" 1 1]
+ ]
+ expect3 = ( []
+ , replicate 4 AlignDefault
+ , replicate 4 0
+ , []
+ , [[pln "a", pln "b", mempty, pln "c"]
+ ,[mempty, pln "d", pln "e", mempty]]
+ )
+ gen3 = toLegacyTable emptyCaption spec3 (th []) [body3] (tf [])
diff --git a/test/Tests/Writers/AsciiDoc.hs b/test/Tests/Writers/AsciiDoc.hs
index 04655635f..7b2dd11e8 100644
--- a/test/Tests/Writers/AsciiDoc.hs
+++ b/test/Tests/Writers/AsciiDoc.hs
@@ -38,6 +38,22 @@ tests = [ testGroup "emphasis"
para (singleQuoted (strong (text "foo"))) =?>
"`**foo**'"
]
+ , testGroup "blocks"
+ [ testAsciidoc "code block without line numbers" $
+ codeBlockWith ("", [ "haskell" ], []) "foo" =?> unlines
+ [ "[source,haskell]"
+ , "----"
+ , "foo"
+ , "----"
+ ]
+ , testAsciidoc "code block with line numbers" $
+ codeBlockWith ("", [ "haskell", "numberLines" ], []) "foo" =?> unlines
+ [ "[source%linesnum,haskell]"
+ , "----"
+ , "foo"
+ , "----"
+ ]
+ ]
, testGroup "tables"
[ testAsciidoc "empty cells" $
simpleTable [] [[mempty],[mempty]] =?> unlines
diff --git a/test/Tests/Writers/Docx.hs b/test/Tests/Writers/Docx.hs
index da25b95e0..93b56e1c2 100644
--- a/test/Tests/Writers/Docx.hs
+++ b/test/Tests/Writers/Docx.hs
@@ -31,7 +31,8 @@ tests = [ testGroup "inlines"
"docx/golden/links.docx"
, docxTest
"inline image"
- def
+ def{ writerExtensions =
+ enableExtension Ext_native_numbering (writerExtensions def) }
"docx/image_writer_test.native"
"docx/golden/image.docx"
, docxTest
diff --git a/test/Tests/Writers/HTML.hs b/test/Tests/Writers/HTML.hs
index 404f6da98..a81badae8 100644
--- a/test/Tests/Writers/HTML.hs
+++ b/test/Tests/Writers/HTML.hs
@@ -2,14 +2,18 @@
module Tests.Writers.HTML (tests) where
import Data.Text (unpack)
+import qualified Data.Text as T
import Test.Tasty
import Tests.Helpers
import Text.Pandoc
import Text.Pandoc.Arbitrary ()
import Text.Pandoc.Builder
+htmlWithOpts :: (ToPandoc a) => WriterOptions -> a -> String
+htmlWithOpts opts = unpack . purely (writeHtml4String opts{ writerWrapText = WrapNone }) . toPandoc
+
html :: (ToPandoc a) => a -> String
-html = unpack . purely (writeHtml4String def{ writerWrapText = WrapNone }) . toPandoc
+html = htmlWithOpts def
htmlQTags :: (ToPandoc a) => a -> String
htmlQTags = unpack
@@ -33,6 +37,21 @@ infix 4 =:
=> String -> (a, String) -> TestTree
(=:) = test html
+noteTestDoc :: Blocks
+noteTestDoc =
+ header 1 "Page title" <>
+ header 2 "First section" <>
+ para ("This is a footnote." <>
+ note (para "Down here.") <>
+ " And this is a " <>
+ link "https://www.google.com" "" "link" <>
+ ".") <>
+ blockQuote (para ("A note inside a block quote." <>
+ note (para "The second note.")) <>
+ para "A second paragraph.") <>
+ header 2 "Second section" <>
+ para "Some more text."
+
tests :: [TestTree]
tests =
[ testGroup "inline code"
@@ -50,7 +69,7 @@ tests =
, testGroup "blocks"
[ "definition list with empty <dt>" =:
definitionList [(mempty, [para $ text "foo bar"])]
- =?> "<dl><dt></dt><dd><p>foo bar</p></dd></dl>"
+ =?> "<dl>\n<dt></dt>\n<dd>\n<p>foo bar</p>\n</dd>\n</dl>"
, "heading with disallowed attributes" =:
headerWith ("", [], [("invalid","1"), ("lang", "en")]) 1 "test"
=?>
@@ -86,6 +105,103 @@ tests =
=?> ("<var><code class=\"sourceCode haskell\">" ++
"<span class=\"op\">&gt;&gt;=</span></code></var>")
]
+ , testGroup "footnotes"
+ [ test (htmlWithOpts def{writerReferenceLocation=EndOfDocument})
+ "at the end of a document" $
+ noteTestDoc =?>
+ T.unlines
+ [ "<h1>Page title</h1>"
+ , "<h2>First section</h2>"
+ , "<p>This is a footnote.<a href=\"#fn1\" class=\"footnote-ref\" id=\"fnref1\"><sup>1</sup></a> And this is a <a href=\"https://www.google.com\">link</a>.</p>"
+ , "<blockquote>"
+ , "<p>A note inside a block quote.<a href=\"#fn2\" class=\"footnote-ref\" id=\"fnref2\"><sup>2</sup></a></p>"
+ , "<p>A second paragraph.</p>"
+ , "</blockquote>"
+ , "<h2>Second section</h2>"
+ , "<p>Some more text.</p>"
+ , "<div class=\"footnotes footnotes-end-of-document\">"
+ , "<hr />"
+ , "<ol>"
+ , "<li id=\"fn1\"><p>Down here.<a href=\"#fnref1\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "<li id=\"fn2\"><p>The second note.<a href=\"#fnref2\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "</ol>"
+ , "</div>"
+ ]
+ , test (htmlWithOpts def{writerReferenceLocation=EndOfBlock})
+ "at the end of a block" $
+ noteTestDoc =?>
+ T.unlines
+ [ "<h1>Page title</h1>"
+ , "<h2>First section</h2>"
+ , "<p>This is a footnote.<a href=\"#fn1\" class=\"footnote-ref\" id=\"fnref1\"><sup>1</sup></a> And this is a <a href=\"https://www.google.com\">link</a>.</p>"
+ , "<div class=\"footnotes footnotes-end-of-block\">"
+ , "<ol>"
+ , "<li id=\"fn1\"><p>Down here.<a href=\"#fnref1\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "</ol>"
+ , "</div>"
+ , "<blockquote>"
+ , "<p>A note inside a block quote.<a href=\"#fn2\" class=\"footnote-ref\" id=\"fnref2\"><sup>2</sup></a></p>"
+ , "<p>A second paragraph.</p>"
+ , "</blockquote>"
+ , "<div class=\"footnotes footnotes-end-of-block\">"
+ , "<ol start=\"2\">"
+ , "<li id=\"fn2\"><p>The second note.<a href=\"#fnref2\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "</ol>"
+ , "</div>"
+ , "<h2>Second section</h2>"
+ , "<p>Some more text.</p>"
+ ]
+ , test (htmlWithOpts def{writerReferenceLocation=EndOfSection})
+ "at the end of a section" $
+ noteTestDoc =?>
+ T.unlines
+ [ "<h1>Page title</h1>"
+ , "<h2>First section</h2>"
+ , "<p>This is a footnote.<a href=\"#fn1\" class=\"footnote-ref\" id=\"fnref1\"><sup>1</sup></a> And this is a <a href=\"https://www.google.com\">link</a>.</p>"
+ , "<blockquote>"
+ , "<p>A note inside a block quote.<a href=\"#fn2\" class=\"footnote-ref\" id=\"fnref2\"><sup>2</sup></a></p>"
+ , "<p>A second paragraph.</p>"
+ , "</blockquote>"
+ , "<div class=\"footnotes footnotes-end-of-section\">"
+ , "<hr />"
+ , "<ol>"
+ , "<li id=\"fn1\"><p>Down here.<a href=\"#fnref1\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "<li id=\"fn2\"><p>The second note.<a href=\"#fnref2\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "</ol>"
+ , "</div>"
+ , "<h2>Second section</h2>"
+ , "<p>Some more text.</p>"
+ ]
+ , test (htmlWithOpts def{writerReferenceLocation=EndOfSection, writerSectionDivs=True})
+ "at the end of a section, with section divs" $
+ noteTestDoc =?>
+ -- Footnotes are rendered _after_ their section (in this case after the level2 section
+ -- that contains it).
+ T.unlines
+ [ "<div class=\"section level1\">"
+ , "<h1>Page title</h1>"
+ , "<div class=\"section level2\">"
+ , "<h2>First section</h2>"
+ , "<p>This is a footnote.<a href=\"#fn1\" class=\"footnote-ref\" id=\"fnref1\"><sup>1</sup></a> And this is a <a href=\"https://www.google.com\">link</a>.</p>"
+ , "<blockquote>"
+ , "<p>A note inside a block quote.<a href=\"#fn2\" class=\"footnote-ref\" id=\"fnref2\"><sup>2</sup></a></p>"
+ , "<p>A second paragraph.</p>"
+ , "</blockquote>"
+ , "</div>"
+ , "<div class=\"footnotes footnotes-end-of-section\">"
+ , "<hr />"
+ , "<ol>"
+ , "<li id=\"fn1\"><p>Down here.<a href=\"#fnref1\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "<li id=\"fn2\"><p>The second note.<a href=\"#fnref2\" class=\"footnote-back\">↩︎</a></p></li>"
+ , "</ol>"
+ , "</div>"
+ , "<div class=\"section level2\">"
+ , "<h2>Second section</h2>"
+ , "<p>Some more text.</p>"
+ , "</div>"
+ , "</div>"
+ ]
+ ]
]
where
tQ :: (ToString a, ToPandoc a)
diff --git a/test/Tests/Writers/JATS.hs b/test/Tests/Writers/JATS.hs
index 5b96ed2ed..e605f55e1 100644
--- a/test/Tests/Writers/JATS.hs
+++ b/test/Tests/Writers/JATS.hs
@@ -61,21 +61,39 @@ tests =
, "</fn></p>"
])
]
- , "bullet list" =: bulletList [ plain $ text "first"
- , plain $ text "second"
- , plain $ text "third"
- ]
- =?> "<list list-type=\"bullet\">\n\
- \ <list-item>\n\
- \ <p>first</p>\n\
- \ </list-item>\n\
- \ <list-item>\n\
- \ <p>second</p>\n\
- \ </list-item>\n\
- \ <list-item>\n\
- \ <p>third</p>\n\
- \ </list-item>\n\
- \</list>"
+ , testGroup "bullet list"
+ [ "plain items" =: bulletList [ plain $ text "first"
+ , plain $ text "second"
+ , plain $ text "third"
+ ]
+ =?> "<list list-type=\"bullet\">\n\
+ \ <list-item>\n\
+ \ <p>first</p>\n\
+ \ </list-item>\n\
+ \ <list-item>\n\
+ \ <p>second</p>\n\
+ \ </list-item>\n\
+ \ <list-item>\n\
+ \ <p>third</p>\n\
+ \ </list-item>\n\
+ \</list>"
+
+ , "item with implicit figure" =:
+ bulletList [ simpleFigure (text "caption") "a.png" "" ] =?>
+ T.unlines
+ [ "<list list-type=\"bullet\">"
+ , " <list-item>"
+ , " <p specific-use=\"wrapper\">"
+ , " <fig>"
+ , " <caption><p>caption</p></caption>"
+ , " <graphic mimetype=\"image\" mime-subtype=\"png\"" <>
+ " xlink:href=\"a.png\" xlink:title=\"\" />"
+ , " </fig>"
+ , " </p>"
+ , " </list-item>"
+ , "</list>"
+ ]
+ ]
, testGroup "definition lists"
[ "with internal link" =: definitionList [(link "#go" "" (str "testing"),
[plain (text "hi there")])] =?>
diff --git a/test/Tests/Writers/Markua.hs b/test/Tests/Writers/Markua.hs
new file mode 100644
index 000000000..62239f3da
--- /dev/null
+++ b/test/Tests/Writers/Markua.hs
@@ -0,0 +1,40 @@
+{-# LANGUAGE OverloadedStrings #-}
+module Tests.Writers.Markua (tests) where
+
+import Test.Tasty
+import Tests.Helpers
+import Text.Pandoc
+import Text.Pandoc.Arbitrary ()
+import Text.Pandoc.Builder
+
+{-
+ "my test" =: X =?> Y
+
+is shorthand for
+
+ test html "my test" $ X =?> Y
+
+which is in turn shorthand for
+
+ test html "my test" (X,Y)
+-}
+
+infix 4 =:
+(=:) :: (ToString a, ToPandoc a)
+ => String -> (a, String) -> TestTree
+(=:) = test (purely (writeMarkua def) . toPandoc)
+
+tests :: [TestTree]
+tests = [ testGroup "simple blurb/aside"
+ ["blurb" =: divWith ("",["blurb"],[]) (bulletList [para "blurb content"])
+ =?> "B> * blurb content"
+ ,"aside" =: divWith ("",["aside"],[]) (bulletList [para "aside list"])
+ =?> "A> * aside list"
+ ]
+ ,testGroup "multiclass blurb/aside"
+ ["blurb" =: divWith ("",["blurb", "otherclass"],[]) (bulletList [para "blurb content"])
+ =?> "B> * blurb content"
+ ,"aside" =: divWith ("",["otherclass", "aside"],[]) (bulletList [para "aside list"])
+ =?> "A> * aside list"
+ ]
+ ]
diff --git a/test/Tests/Writers/OOXML.hs b/test/Tests/Writers/OOXML.hs
index 83f05cfec..43543954c 100644
--- a/test/Tests/Writers/OOXML.hs
+++ b/test/Tests/Writers/OOXML.hs
@@ -3,13 +3,15 @@
module Tests.Writers.OOXML (ooxmlTest) where
-import Text.Pandoc
+import Text.Pandoc hiding (Attr)
import Test.Tasty
import Test.Tasty.Golden.Advanced
+import Control.Applicative ((<|>))
import Codec.Archive.Zip
import Text.XML.Light
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BL
+import Data.Foldable (asum)
import qualified Data.Text.IO as T
import Data.List (isSuffixOf, sort, (\\), intercalate, union)
import Data.Maybe (catMaybes, mapMaybe)
@@ -17,34 +19,59 @@ import Tests.Helpers
import Data.Algorithm.Diff
import System.FilePath.Glob (compile, match)
-compareXMLBool :: Content -> Content -> Bool
+compareXML :: Content -> Content -> Maybe XMLDifference
-- We make a special exception for times at the moment, and just pass
-- them because we can't control the utctime when running IO. Besides,
-- so long as we have two times, we're okay.
-compareXMLBool (Elem myElem) (Elem goodElem)
+compareXML (Elem goodElem) (Elem myElem)
| (QName "created" _ (Just "dcterms")) <- elName myElem
, (QName "created" _ (Just "dcterms")) <- elName goodElem =
- True
-compareXMLBool (Elem myElem) (Elem goodElem)
+ Nothing
+compareXML (Elem goodElem) (Elem myElem)
| (QName "modified" _ (Just "dcterms")) <- elName myElem
, (QName "modified" _ (Just "dcterms")) <- elName goodElem =
- True
-compareXMLBool (Elem myElem) (Elem goodElem) =
- elName myElem == elName goodElem &&
- elAttribs myElem == elAttribs goodElem &&
- and (zipWith compareXMLBool (elContent myElem) (elContent goodElem))
-compareXMLBool (Text myCData) (Text goodCData) =
- cdVerbatim myCData == cdVerbatim goodCData &&
- cdData myCData == cdData goodCData &&
- cdLine myCData == cdLine goodCData
-compareXMLBool (CRef myStr) (CRef goodStr) =
- myStr == goodStr
-compareXMLBool _ _ = False
-
-displayDiff :: Content -> Content -> String
+ Nothing
+compareXML (Elem goodElem) (Elem myElem) =
+ (if elName myElem == elName goodElem
+ then Nothing
+ else Just
+ (ElemNamesDiffer
+ (Comparison {mine = elName myElem, good = elName goodElem}))
+ )
+ <|> (if sort (elAttribs myElem) == sort (elAttribs goodElem)
+ then Nothing
+ else Just
+ (ElemAttributesDiffer
+ (Comparison { mine = sort (elAttribs myElem)
+ , good = sort (elAttribs goodElem)
+ })))
+ <|> asum (zipWith compareXML (elContent myElem) (elContent goodElem))
+compareXML (Text goodCData) (Text myCData) =
+ (if cdVerbatim myCData == cdVerbatim goodCData
+ && cdData myCData == cdData goodCData
+ then Nothing
+ else Just (CDatasDiffer (Comparison { mine = myCData, good = goodCData })))
+compareXML (CRef goodStr) (CRef myStr) =
+ if myStr == goodStr
+ then Nothing
+ else Just (CRefsDiffer (Comparison { mine = myStr, good = goodStr }))
+compareXML g m = Just (OtherContentsDiffer (Comparison {mine = m, good = g}))
+
+data XMLDifference
+ = ElemNamesDiffer (Comparison QName)
+ | ElemAttributesDiffer (Comparison [Attr])
+ | CDatasDiffer (Comparison CData)
+ | CRefsDiffer (Comparison String)
+ | OtherContentsDiffer (Comparison Content)
+ deriving (Show)
+
+data Comparison a = Comparison { good :: a, mine :: a }
+ deriving (Show)
+
+displayDiff :: Element -> Element -> String
displayDiff elemA elemB =
showDiff (1,1)
- (getDiff (lines $ showContent elemA) (lines $ showContent elemB))
+ (getDiff (lines $ ppElement elemA) (lines $ ppElement elemB))
goldenArchive :: FilePath -> IO Archive
goldenArchive fp = toArchive . BL.fromStrict <$> BS.readFile fp
@@ -57,6 +84,7 @@ testArchive writerFn opts fp = do
txt <- T.readFile fp
bs <- runIOorExplode $ do
setTranslations "en-US"
+ setVerbosity ERROR -- otherwise test output is confusingly noisy
readNative def txt >>= writerFn opts
return $ toArchive bs
@@ -106,11 +134,13 @@ compareXMLFile' fp goldenArch testArch = do
let testContent = Elem testXMLDoc
goldenContent = Elem goldenXMLDoc
+ display difference = "Non-matching xml in "
+ ++ fp ++ ":\n"
+ ++ "* " ++ show difference ++ "\n"
+ ++ displayDiff testXMLDoc goldenXMLDoc
- if compareXMLBool goldenContent testContent
- then Right ()
- else Left $
- "Non-matching xml in " ++ fp ++ ":\n" ++ displayDiff testContent goldenContent
+
+ maybe (Right ()) (Left . display) (compareXML goldenContent testContent)
compareXMLFile :: FilePath -> Archive -> Archive -> Maybe String
compareXMLFile fp goldenArch testArch =
diff --git a/test/Tests/Writers/Powerpoint.hs b/test/Tests/Writers/Powerpoint.hs
index 87ebe990c..0e8ef076b 100644
--- a/test/Tests/Writers/Powerpoint.hs
+++ b/test/Tests/Writers/Powerpoint.hs
@@ -1,5 +1,6 @@
module Tests.Writers.Powerpoint (tests) where
+import Control.Arrow ((***))
import Tests.Writers.OOXML (ooxmlTest)
import Text.Pandoc
import Test.Tasty
@@ -12,13 +13,13 @@ import Data.Text (pack)
-- we want to run all our tests with both default formatting and a
-- template.
-modifyPptxName :: FilePath -> FilePath
-modifyPptxName fp =
- addExtension (dropExtension fp ++ "_templated") "pptx"
+modifyPptxName :: FilePath -> String -> FilePath
+modifyPptxName fp suffix =
+ addExtension (takeDirectory fp ++ suffix) "pptx"
pptxTests :: String -> WriterOptions -> FilePath -> FilePath -> (TestTree, TestTree)
pptxTests name opts native pptx =
- let referenceDoc = "pptx/reference_depth.pptx"
+ let referenceDoc = "pptx/reference-depth.pptx"
in
( ooxmlTest
writePowerpoint
@@ -31,7 +32,7 @@ pptxTests name opts native pptx =
name
opts{writerReferenceDoc=Just referenceDoc}
native
- (modifyPptxName pptx)
+ (modifyPptxName pptx "/templated")
)
groupPptxTests :: [(TestTree, TestTree)] -> [TestTree]
@@ -42,91 +43,230 @@ groupPptxTests pairs =
, testGroup "With `--reference-doc` pptx file" refs
]
+testGroup' :: String -> [(TestTree, TestTree)] -> (TestTree, TestTree)
+testGroup' descr = (testGroup descr *** testGroup descr) . unzip
+
tests :: [TestTree]
-tests = groupPptxTests [ pptxTests "Inline formatting"
- def
- "pptx/inline_formatting.native"
- "pptx/inline_formatting.pptx"
- , pptxTests "Slide breaks (default slide-level)"
- def
- "pptx/slide_breaks.native"
- "pptx/slide_breaks.pptx"
- , pptxTests "slide breaks (slide-level set to 1)"
- def{ writerSlideLevel = Just 1 }
- "pptx/slide_breaks.native"
- "pptx/slide_breaks_slide_level_1.pptx"
- , pptxTests "lists"
- def
- "pptx/lists.native"
- "pptx/lists.pptx"
- , pptxTests "start ordered list at specified num"
- def
- "pptx/start_numbering_at.native"
- "pptx/start_numbering_at.pptx"
- , pptxTests "tables"
- def
- "pptx/tables.native"
- "pptx/tables.pptx"
- , pptxTests "table of contents"
- def{ writerTableOfContents = True }
- "pptx/slide_breaks.native"
- "pptx/slide_breaks_toc.pptx"
- , pptxTests "end notes"
- def
- "pptx/endnotes.native"
- "pptx/endnotes.pptx"
- , pptxTests "end notes, with table of contents"
- def { writerTableOfContents = True }
- "pptx/endnotes.native"
- "pptx/endnotes_toc.pptx"
- , pptxTests "images"
- def
- "pptx/images.native"
- "pptx/images.pptx"
- , pptxTests "two-column layout"
- def
- "pptx/two_column.native"
- "pptx/two_column.pptx"
- , pptxTests "speaker notes"
- def
- "pptx/speaker_notes.native"
- "pptx/speaker_notes.pptx"
- , pptxTests "speaker notes after a separating block"
- def
- "pptx/speaker_notes_afterseps.native"
- "pptx/speaker_notes_afterseps.pptx"
- , pptxTests "speaker notes after a separating header"
- def
- "pptx/speaker_notes_afterheader.native"
- "pptx/speaker_notes_afterheader.pptx"
- , pptxTests "speaker notes after metadata"
- def
- "pptx/speaker_notes_after_metadata.native"
- "pptx/speaker_notes_after_metadata.pptx"
- , pptxTests "remove empty slides"
- def
- "pptx/remove_empty_slides.native"
- "pptx/remove_empty_slides.pptx"
- , pptxTests "raw ooxml"
- def
- "pptx/raw_ooxml.native"
- "pptx/raw_ooxml.pptx"
- , pptxTests "metadata, custom properties"
- def
- "pptx/document-properties.native"
- "pptx/document-properties.pptx"
- , pptxTests "metadata, short description"
- def
- "pptx/document-properties-short-desc.native"
- "pptx/document-properties-short-desc.pptx"
- , pptxTests "inline code and code blocks"
- def
- "pptx/code.native"
- "pptx/code.pptx"
- , pptxTests "inline code and code blocks, custom formatting"
- def { writerVariables = Context $ M.fromList
- [(pack "monofont", toVal $ pack "Consolas")] }
- "pptx/code.native"
- "pptx/code-custom.pptx"
- ]
+tests = let
+ regularTests = groupPptxTests
+ [ pptxTests "Inline formatting"
+ def
+ "pptx/inline-formatting/input.native"
+ "pptx/inline-formatting/output.pptx"
+ , pptxTests "Slide breaks (default slide-level)"
+ def
+ "pptx/slide-breaks/input.native"
+ "pptx/slide-breaks/output.pptx"
+ , pptxTests "slide breaks (slide-level set to 1)"
+ def{ writerSlideLevel = Just 1 }
+ "pptx/slide-breaks/input.native"
+ "pptx/slide-breaks-slide-level-1/output.pptx"
+ , pptxTests "lists"
+ def
+ "pptx/lists/input.native"
+ "pptx/lists/output.pptx"
+ , pptxTests "start ordered list at specified num"
+ def
+ "pptx/start-numbering-at/input.native"
+ "pptx/start-numbering-at/output.pptx"
+ , pptxTests "List continuation paragraph indentation"
+ def
+ "pptx/list-level/input.native"
+ "pptx/list-level/output.pptx"
+ , pptxTests "tables"
+ def
+ "pptx/tables/input.native"
+ "pptx/tables/output.pptx"
+ , pptxTests "table of contents"
+ def{ writerTableOfContents = True }
+ "pptx/slide-breaks/input.native"
+ "pptx/slide-breaks-toc/output.pptx"
+ , pptxTests "end notes"
+ def
+ "pptx/endnotes/input.native"
+ "pptx/endnotes/output.pptx"
+ , pptxTests "end notes, with table of contents"
+ def { writerTableOfContents = True }
+ "pptx/endnotes/input.native"
+ "pptx/endnotes-toc/output.pptx"
+ , pptxTests "images"
+ def
+ "pptx/images/input.native"
+ "pptx/images/output.pptx"
+ , pptxTests "two-column layout"
+ def
+ "pptx/two-column/all-text/input.native"
+ "pptx/two-column/all-text/output.pptx"
+ , pptxTests "two-column (not comparison)"
+ def
+ "pptx/two-column/text-and-image/input.native"
+ "pptx/two-column/text-and-image/output.pptx"
+ , pptxTests "speaker notes"
+ def
+ "pptx/speaker-notes/input.native"
+ "pptx/speaker-notes/output.pptx"
+ , pptxTests "speaker notes after a separating block"
+ def
+ "pptx/speaker-notes-afterseps/input.native"
+ "pptx/speaker-notes-afterseps/output.pptx"
+ , pptxTests "speaker notes after a separating header"
+ def
+ "pptx/speaker-notes-afterheader/input.native"
+ "pptx/speaker-notes-afterheader/output.pptx"
+ , pptxTests "speaker notes after metadata"
+ def
+ "pptx/speaker-notes-after-metadata/input.native"
+ "pptx/speaker-notes-after-metadata/output.pptx"
+ , pptxTests "remove empty slides"
+ def
+ "pptx/remove-empty-slides/input.native"
+ "pptx/remove-empty-slides/output.pptx"
+ , pptxTests "raw ooxml"
+ def
+ "pptx/raw-ooxml/input.native"
+ "pptx/raw-ooxml/output.pptx"
+ , pptxTests "metadata, custom properties"
+ def
+ "pptx/document-properties/input.native"
+ "pptx/document-properties/output.pptx"
+ , pptxTests "metadata, short description"
+ def
+ "pptx/document-properties-short-desc/input.native"
+ "pptx/document-properties-short-desc/output.pptx"
+ , pptxTests "inline code and code blocks"
+ def
+ "pptx/code/input.native"
+ "pptx/code/output.pptx"
+ , pptxTests "inline code and code blocks, custom formatting"
+ def { writerVariables = Context $ M.fromList
+ [(pack "monofont", toVal $ pack "Consolas")] }
+ "pptx/code/input.native"
+ "pptx/code-custom/output.pptx"
+ , testGroup' "Using slide level 0, if the first thing on a slide is"
+ [ pptxTests ("a h1 it's used as the slide title")
+ def { writerSlideLevel = Just 0 }
+ "pptx/slide-level-0/h1-with-image/input.native"
+ "pptx/slide-level-0/h1-with-image/output.pptx"
+ , pptxTests ("a h2 it's used as the "
+ <> "slide title")
+ def { writerSlideLevel = Just 0 }
+ "pptx/slide-level-0/h2-with-image/input.native"
+ "pptx/slide-level-0/h2-with-image/output.pptx"
+ , testGroup' "a heading it's used as the slide title"
+ [ pptxTests "(works with a table)"
+ def { writerSlideLevel = Just 0 }
+ "pptx/slide-level-0/h1-with-table/input.native"
+ "pptx/slide-level-0/h1-with-table/output.pptx"
+ , pptxTests ("(content with caption layout)")
+ def { writerSlideLevel = Just 0 }
+ "pptx/slide-level-0/h1-h2-with-table/input.native"
+ "pptx/slide-level-0/h1-h2-with-table/output.pptx"
+ ]
+ ]
+ , testGroup' "comparison layout"
+ [ testGroup' "comparison layout is used..."
+ [ pptxTests "when two columns contain text + non-text"
+ def
+ "pptx/comparison/both-columns/input.native"
+ "pptx/comparison/both-columns/output.pptx"
+ , pptxTests "even when only one col contains text + non-text"
+ def
+ "pptx/comparison/one-column/input.native"
+ "pptx/comparison/one-column/output.pptx"
+ ]
+ , testGroup' "extra ... in one column gets overlaid"
+ [ pptxTests "text"
+ def
+ "pptx/comparison/extra-text/input.native"
+ "pptx/comparison/extra-text/output.pptx"
+ , pptxTests "image"
+ def
+ "pptx/comparison/extra-image/input.native"
+ "pptx/comparison/extra-image/output.pptx"
+ ]
+ , pptxTests "is not used if the non-text comes first"
+ def
+ "pptx/comparison/non-text-first/input.native"
+ "pptx/comparison/non-text-first/output.pptx"
+ ]
+ , testGroup' "Content with Caption layout is ..."
+ [ pptxTests "used for heading, text, image on the same slide"
+ def
+ "pptx/content-with-caption/heading-text-image/input.native"
+ "pptx/content-with-caption/heading-text-image/output.pptx"
+ , pptxTests "used for text and an image on the same slide"
+ def
+ "pptx/content-with-caption/text-image/input.native"
+ "pptx/content-with-caption/text-image/output.pptx"
+ , pptxTests "not used if the image comes first"
+ def
+ "pptx/content-with-caption/image-text/input.native"
+ "pptx/content-with-caption/image-text/output.pptx"
+ ]
+ , testGroup' "The Blank layout is used if a slide contains only..."
+ [ pptxTests "speaker notes"
+ def
+ "pptx/blanks/just-speaker-notes/input.native"
+ "pptx/blanks/just-speaker-notes/output.pptx"
+ , pptxTests "an empty heading with a body of only NBSPs"
+ def
+ "pptx/blanks/nbsp-in-body/input.native"
+ "pptx/blanks/nbsp-in-body/output.pptx"
+ , pptxTests "a heading containing only non-breaking spaces"
+ def
+ "pptx/blanks/nbsp-in-heading/input.native"
+ "pptx/blanks/nbsp-in-heading/output.pptx"
+ ]
+ , pptxTests ("Incremental lists are supported")
+ def { writerIncremental = True }
+ "pptx/incremental-lists/with-flag/input.native"
+ "pptx/incremental-lists/with-flag/output.pptx"
+ , pptxTests ("One-off incremental lists are supported")
+ def
+ "pptx/incremental-lists/without-flag/input.native"
+ "pptx/incremental-lists/without-flag/output.pptx"
+ , pptxTests "Background images"
+ def
+ "pptx/background-image/input.native"
+ "pptx/background-image/output.pptx"
+ ]
+ referenceSpecificTests =
+ [ ooxmlTest
+ writePowerpoint
+ "Basic footer"
+ def { writerReferenceDoc = Just "pptx/footer/basic/reference.pptx"}
+ "pptx/footer/input.native"
+ "pptx/footer/basic/output.pptx"
+ , ooxmlTest
+ writePowerpoint
+ "Footer with fixed date, replaced by meta block date"
+ def { writerReferenceDoc = Just "pptx/footer/fixed-date/reference.pptx"}
+ "pptx/footer/input.native"
+ "pptx/footer/fixed-date/output.pptx"
+ , ooxmlTest
+ writePowerpoint
+ "Footer not shown on title slide"
+ def { writerReferenceDoc = Just "pptx/footer/no-title-slide/reference.pptx"}
+ "pptx/footer/input.native"
+ "pptx/footer/no-title-slide/output.pptx"
+ , ooxmlTest
+ writePowerpoint
+ "Footer with slide number starting from 3"
+ def { writerReferenceDoc = Just "pptx/footer/higher-slide-number/reference.pptx"}
+ "pptx/footer/input.native"
+ "pptx/footer/higher-slide-number/output.pptx"
+ , ooxmlTest
+ writePowerpoint
+ "Layouts can be moved around in reference doc"
+ def {writerReferenceDoc = Just "pptx/reference-moved-layouts.pptx"}
+ "pptx/layouts/input.native"
+ "pptx/layouts/moved.pptx"
+ , ooxmlTest
+ writePowerpoint
+ "Layouts can be missing from the reference doc"
+ def {writerReferenceDoc = Just "pptx/reference-deleted-layouts.pptx"}
+ "pptx/layouts/input.native"
+ "pptx/layouts/deleted.pptx"
+ ]
+ in regularTests <> referenceSpecificTests
diff --git a/test/command/1279.md b/test/command/1279.md
index d3572f245..522e399cf 100644
--- a/test/command/1279.md
+++ b/test/command/1279.md
@@ -1,5 +1,5 @@
```
-pandoc -s -t markdown
+% pandoc -s -t markdown
---
author: 'John Doe[^1]'
date: 2014
diff --git a/test/command/1390.md b/test/command/1390.md
index ffd2cef8d..4fea32290 100644
--- a/test/command/1390.md
+++ b/test/command/1390.md
@@ -3,7 +3,13 @@
\newcommand\foo{+}
Testing: $\mu\foo\eta$.
^D
-[Para [Str "Testing:",Space,Math InlineMath "\\mu+\\eta",Str "."]]
+[ Para
+ [ Str "Testing:"
+ , Space
+ , Math InlineMath "\\mu+\\eta"
+ , Str "."
+ ]
+]
```
<!-- It would be nice to handle this case, but I don't
diff --git a/test/command/1592.md b/test/command/1592.md
index 0f6151063..c3dc933a8 100644
--- a/test/command/1592.md
+++ b/test/command/1592.md
@@ -2,35 +2,35 @@
% pandoc -t native
[hi]{.smallcaps}
^D
-[Para [SmallCaps [Str "hi"]]]
+[ Para [ SmallCaps [ Str "hi" ] ] ]
```
```
% pandoc -t native
[hi]{style="font-variant: small-caps;"}
^D
-[Para [SmallCaps [Str "hi"]]]
+[ Para [ SmallCaps [ Str "hi" ] ] ]
```
```
% pandoc -t native
<span class="smallcaps">hi</span>
^D
-[Para [SmallCaps [Str "hi"]]]
+[ Para [ SmallCaps [ Str "hi" ] ] ]
```
```
% pandoc -f html -t native
<p><span class="smallcaps">hi</span></p>
^D
-[Para [SmallCaps [Str "hi"]]]
+[ Para [ SmallCaps [ Str "hi" ] ] ]
```
```
% pandoc -f html -t native
<p><span style="font-variant:small-caps">hi</span></p>
^D
-[Para [SmallCaps [Str "hi"]]]
+[ Para [ SmallCaps [ Str "hi" ] ] ]
```
```
@@ -41,7 +41,7 @@
```
```
-pandoc -f native -t markdown
+% pandoc -f native -t markdown
[Para [SmallCaps [Str "hi"]]]
^D
[hi]{.smallcaps}
@@ -51,14 +51,24 @@ pandoc -f native -t markdown
% pandoc -f html -t native
<bdo dir="ltr">foo</bdo>
^D
-[Plain [Span ("",[],[("dir","ltr")]) [Str "foo"]]]
+[ Plain
+ [ Span ( "" , [] , [ ( "dir" , "ltr" ) ] ) [ Str "foo" ] ]
+]
```
```
% pandoc -f html -t native
<bdo dir="rtl">foo<bdo dir="ltr">bar</bdo>baz</bdo>
^D
-[Plain [Span ("",[],[("dir","rtl")]) [Str "foo",Span ("",[],[("dir","ltr")]) [Str "bar"],Str "baz"]]]
+[ Plain
+ [ Span
+ ( "" , [] , [ ( "dir" , "rtl" ) ] )
+ [ Str "foo"
+ , Span ( "" , [] , [ ( "dir" , "ltr" ) ] ) [ Str "bar" ]
+ , Str "baz"
+ ]
+ ]
+]
```
```
@@ -66,5 +76,23 @@ pandoc -f native -t markdown
<p><bdo dir="rtl">This text will go right
to left.</bdo></p>
^D
-[Para [Span ("",[],[("dir","rtl")]) [Str "This",Space,Str "text",Space,Str "will",Space,Str "go",Space,Str "right",SoftBreak,Str "to",Space,Str "left."]]]
+[ Para
+ [ Span
+ ( "" , [] , [ ( "dir" , "rtl" ) ] )
+ [ Str "This"
+ , Space
+ , Str "text"
+ , Space
+ , Str "will"
+ , Space
+ , Str "go"
+ , Space
+ , Str "right"
+ , SoftBreak
+ , Str "to"
+ , Space
+ , Str "left."
+ ]
+ ]
+]
```
diff --git a/test/command/1608.md b/test/command/1608.md
index f7ef2b839..77fdaf6d3 100644
--- a/test/command/1608.md
+++ b/test/command/1608.md
@@ -28,14 +28,178 @@ Triangles with sides of length \(a=p^2-q^2\), \(b=2pq\) and \(c=p^2+q^2\) are ri
These are all pretty interesting facts.
\end{remark}
^D
-[Div ("def:tri",["definition"],[])
- [Para [Strong [Str "Definition",Space,Str "1"],Space,Str "(right-angled",Space,Str "triangles).",Space,Space,Str "A",Space,Emph [Str "right-angled",Space,Str "triangle"],Space,Str "is",Space,Str "a",Space,Str "triangle",Space,Str "whose",Space,Str "sides",Space,Str "of",Space,Str "length\160",Math InlineMath "a",Str ",",Space,Math InlineMath "b",Space,Str "and\160",Math InlineMath "c",Str ",",Space,Str "in",Space,Str "some",Space,Str "permutation",Space,Str "of",Space,Str "order,",Space,Str "satisfies",Space,Math InlineMath "a^2+b^2=c^2",Str "."]]
-,Div ("",["lemma"],[])
- [Para [Strong [Str "Lemma",Space,Str "2"],Str ".",Space,Space,Emph [Str "The",Space,Str "triangle",Space,Str "with",Space,Str "sides",Space,Str "of",Space,Str "length\160",Math InlineMath "3",Str ",",Space,Math InlineMath "4",Space,Str "and\160",Math InlineMath "5",Space,Str "is",Space,Str "right-angled."]]]
-,Div ("",["proof"],[])
- [Para [Emph [Str "Proof."],Space,Str "This",Space,Str "lemma",Space,Str "follows",Space,Str "from",Space,Link ("",[],[("reference-type","ref"),("reference","def:tri")]) [Str "Definition\160\&1"] ("#def:tri",""),Space,Str "since",Space,Math InlineMath "3^2+4^2=9+16=25=5^2",Str ".",Str "\160\9723"]]
-,Div ("thm:py",["theorem"],[])
- [Para [Strong [Str "Theorem",Space,Str "3"],Space,Str "(Pythagorean",Space,Str "triplets).",Space,Space,Emph [Str "Triangles",Space,Str "with",Space,Str "sides",Space,Str "of",Space,Str "length",Space,Math InlineMath "a=p^2-q^2",Str ",",Space,Math InlineMath "b=2pq",Space,Str "and",Space,Math InlineMath "c=p^2+q^2",Space,Str "are",Space,Str "right-angled",Space,Str "triangles."]]]
-,Div ("",["remark"],[])
- [Para [Emph [Str "Remark",Space,Str "1"],Str ".",Space,Space,Str "These",Space,Str "are",Space,Str "all",Space,Str "pretty",Space,Str "interesting",Space,Str "facts."]]]
+[ Div
+ ( "def:tri" , [ "definition" ] , [] )
+ [ Para
+ [ Strong [ Str "Definition" , Space , Str "1" ]
+ , Space
+ , Str "(right-angled"
+ , Space
+ , Str "triangles)."
+ , Space
+ , Space
+ , Str "A"
+ , Space
+ , Emph [ Str "right-angled" , Space , Str "triangle" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "triangle"
+ , Space
+ , Str "whose"
+ , Space
+ , Str "sides"
+ , Space
+ , Str "of"
+ , Space
+ , Str "length\160"
+ , Math InlineMath "a"
+ , Str ","
+ , Space
+ , Math InlineMath "b"
+ , Space
+ , Str "and\160"
+ , Math InlineMath "c"
+ , Str ","
+ , Space
+ , Str "in"
+ , Space
+ , Str "some"
+ , Space
+ , Str "permutation"
+ , Space
+ , Str "of"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "satisfies"
+ , Space
+ , Math InlineMath "a^2+b^2=c^2"
+ , Str "."
+ ]
+ ]
+, Div
+ ( "" , [ "lemma" ] , [] )
+ [ Para
+ [ Strong [ Str "Lemma" , Space , Str "2" ]
+ , Str "."
+ , Space
+ , Space
+ , Emph
+ [ Str "The"
+ , Space
+ , Str "triangle"
+ , Space
+ , Str "with"
+ , Space
+ , Str "sides"
+ , Space
+ , Str "of"
+ , Space
+ , Str "length\160"
+ , Math InlineMath "3"
+ , Str ","
+ , Space
+ , Math InlineMath "4"
+ , Space
+ , Str "and\160"
+ , Math InlineMath "5"
+ , Space
+ , Str "is"
+ , Space
+ , Str "right-angled."
+ ]
+ ]
+ ]
+, Div
+ ( "" , [ "proof" ] , [] )
+ [ Para
+ [ Emph [ Str "Proof." ]
+ , Space
+ , Str "This"
+ , Space
+ , Str "lemma"
+ , Space
+ , Str "follows"
+ , Space
+ , Str "from"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "def:tri" )
+ ]
+ )
+ [ Str "1" ]
+ ( "#def:tri" , "" )
+ , Space
+ , Str "since"
+ , Space
+ , Math InlineMath "3^2+4^2=9+16=25=5^2"
+ , Str "."
+ , Str "\160\9723"
+ ]
+ ]
+, Div
+ ( "thm:py" , [ "theorem" ] , [] )
+ [ Para
+ [ Strong [ Str "Theorem" , Space , Str "3" ]
+ , Space
+ , Str "(Pythagorean"
+ , Space
+ , Str "triplets)."
+ , Space
+ , Space
+ , Emph
+ [ Str "Triangles"
+ , Space
+ , Str "with"
+ , Space
+ , Str "sides"
+ , Space
+ , Str "of"
+ , Space
+ , Str "length"
+ , Space
+ , Math InlineMath "a=p^2-q^2"
+ , Str ","
+ , Space
+ , Math InlineMath "b=2pq"
+ , Space
+ , Str "and"
+ , Space
+ , Math InlineMath "c=p^2+q^2"
+ , Space
+ , Str "are"
+ , Space
+ , Str "right-angled"
+ , Space
+ , Str "triangles."
+ ]
+ ]
+ ]
+, Div
+ ( "" , [ "remark" ] , [] )
+ [ Para
+ [ Emph [ Str "Remark" , Space , Str "1" ]
+ , Str "."
+ , Space
+ , Space
+ , Str "These"
+ , Space
+ , Str "are"
+ , Space
+ , Str "all"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "interesting"
+ , Space
+ , Str "facts."
+ ]
+ ]
+]
```
diff --git a/test/command/168.md b/test/command/168.md
index 43c3b865a..acd42b97d 100644
--- a/test/command/168.md
+++ b/test/command/168.md
@@ -11,13 +11,25 @@ nested div
:::
:::::::::::::::::::::::::::::::
^D
-[Div ("",["warning"],[])
- [Para [Str "This",Space,Str "is",Space,Str "the",Space,Str "warning!"]
- ,OrderedList (1,Decimal,Period)
- [[Plain [Str "list"]]
- ,[Plain [Str "another"]]]
- ,Div ("myid",["class"],[("key","val")])
- [Para [Str "nested",Space,Str "div"]]]]
+[ Div
+ ( "" , [ "warning" ] , [] )
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "warning!"
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "list" ] ] , [ Plain [ Str "another" ] ] ]
+ , Div
+ ( "myid" , [ "class" ] , [ ( "key" , "val" ) ] )
+ [ Para [ Str "nested" , Space , Str "div" ] ]
+ ]
+]
```
```
@@ -26,7 +38,14 @@ foo
:::
bar
^D
-[Para [Str "foo",SoftBreak,Str ":::",SoftBreak,Str "bar"]]
+[ Para
+ [ Str "foo"
+ , SoftBreak
+ , Str ":::"
+ , SoftBreak
+ , Str "bar"
+ ]
+]
```
```
@@ -37,7 +56,18 @@ Here is a paragraph.
And another.
:::::
^D
-[Div ("",["Warning"],[])
- [Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "paragraph."]
- ,Para [Str "And",Space,Str "another."]]]
+[ Div
+ ( "" , [ "Warning" ] , [] )
+ [ Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para [ Str "And" , Space , Str "another." ]
+ ]
+]
```
diff --git a/test/command/1718.md b/test/command/1718.md
index 7e07bf1e9..c93067869 100644
--- a/test/command/1718.md
+++ b/test/command/1718.md
@@ -7,5 +7,13 @@ Note[^1].
[^2]: the second, unused, note.
^D
[WARNING] Note with key '2' defined at line 5 column 1 but not used.
-[Para [Str "Note",Note [Para [Str "the",Space,Str "first",Space,Str "note."]],Str "."]]
+[ Para
+ [ Str "Note"
+ , Note
+ [ Para
+ [ Str "the" , Space , Str "first" , Space , Str "note." ]
+ ]
+ , Str "."
+ ]
+]
```
diff --git a/test/command/1773.md b/test/command/1773.md
index b93267287..c529ec972 100644
--- a/test/command/1773.md
+++ b/test/command/1773.md
@@ -2,5 +2,7 @@
% pandoc -f latex+raw_tex -t native
\noindent hi
^D
-[Para [RawInline (Format "latex") "\\noindent ",Str "hi"]]
+[ Para
+ [ RawInline (Format "latex") "\\noindent " , Str "hi" ]
+]
```
diff --git a/test/command/1881.md b/test/command/1881.md
index f91c50d68..7a2468c1b 100644
--- a/test/command/1881.md
+++ b/test/command/1881.md
@@ -20,35 +20,92 @@
</tbody>
</table>
^D
-[Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",["header"],[])
- [Cell ("",[],[]) AlignRight (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignLeft (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",["odd"],[])
- [Cell ("",[],[]) AlignRight (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignLeft (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [ "header" ] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignRight
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignLeft
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [ "odd" ] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignRight
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignLeft
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
@@ -62,26 +119,49 @@
</tr>
</table>
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",["odd"],[])
- [Cell ("",[],[]) AlignRight (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignLeft (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignRight (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [ "odd" ] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignRight
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignLeft
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignRight
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/2103.md b/test/command/2103.md
index 14a522a5e..e5220def6 100644
--- a/test/command/2103.md
+++ b/test/command/2103.md
@@ -1,5 +1,5 @@
```
-pandoc -t latex
+% pandoc -t latex
| A happy pandoc user said "fix this bug please
| or I'll go crazy!"
^D
diff --git a/test/command/2118.md b/test/command/2118.md
index b38f48c80..8be5c4886 100644
--- a/test/command/2118.md
+++ b/test/command/2118.md
@@ -7,5 +7,11 @@
\label{fig:setminus}
\end{figure}
^D
-[Para [Image ("fig:setminus",[],[("width","80%")]) [Str "Set",Space,Str "subtraction"] ("setminus.png","fig:")]]
+[ Para
+ [ Image
+ ( "fig:setminus" , [] , [ ( "width" , "80%" ) ] )
+ [ Str "Set" , Space , Str "subtraction" ]
+ ( "setminus.png" , "fig:" )
+ ]
+]
```
diff --git a/test/command/2549.md b/test/command/2549.md
index 8f4aea852..12b21d0a1 100644
--- a/test/command/2549.md
+++ b/test/command/2549.md
@@ -4,7 +4,9 @@
\section{A section}\label{foo}
}
^D
-[Header 1 ("foo",[],[]) [Str "A",Space,Str "section"]]
+[ Header
+ 1 ( "foo" , [] , [] ) [ Str "A" , Space , Str "section" ]
+]
```
```
@@ -13,15 +15,24 @@
\section{A section}\label{foo}
}
^D
-[Div ("bar",[],[])
- [Header 1 ("foo",[],[]) [Str "A",Space,Str "section"]]]
+[ Div
+ ( "bar" , [] , [] )
+ [ Header
+ 1 ( "foo" , [] , [] ) [ Str "A" , Space , Str "section" ]
+ ]
+]
```
```
% pandoc -f latex -t native
Bar \hypertarget{foo}{Foo}
^D
-[Para [Str "Bar",Space,Span ("foo",[],[]) [Str "Foo"]]]
+[ Para
+ [ Str "Bar"
+ , Space
+ , Span ( "foo" , [] , [] ) [ Str "Foo" ]
+ ]
+]
```
```
@@ -32,7 +43,8 @@ bar
\end{verbatim}
}
^D
-[Div ("foo",[],[])
- [CodeBlock ("",[],[]) "bar"]]
+[ Div
+ ( "foo" , [] , [] ) [ CodeBlock ( "" , [] , [] ) "bar" ]
+]
```
diff --git a/test/command/256.md b/test/command/256.md
index 08e483e5c..7e3f34dbd 100644
--- a/test/command/256.md
+++ b/test/command/256.md
@@ -2,11 +2,41 @@
% pandoc --abbreviations=command/abbrevs -t native
Foo. bar baz h.k. and e.g. and Mr. Brown.
^D
-[Para [Str "Foo.\160bar",Space,Str "baz",Space,Str "h.k.\160and",Space,Str "e.g.",Space,Str "and",Space,Str "Mr.",Space,Str "Brown."]]
+[ Para
+ [ Str "Foo.\160bar"
+ , Space
+ , Str "baz"
+ , Space
+ , Str "h.k.\160and"
+ , Space
+ , Str "e.g."
+ , Space
+ , Str "and"
+ , Space
+ , Str "Mr."
+ , Space
+ , Str "Brown."
+ ]
+]
```
```
% pandoc -t native
Foo. bar baz h.k. and e.g. and Mr. Brown.
^D
-[Para [Str "Foo.",Space,Str "bar",Space,Str "baz",Space,Str "h.k.",Space,Str "and",Space,Str "e.g.\160and",Space,Str "Mr.\160Brown."]]
+[ Para
+ [ Str "Foo."
+ , Space
+ , Str "bar"
+ , Space
+ , Str "baz"
+ , Space
+ , Str "h.k."
+ , Space
+ , Str "and"
+ , Space
+ , Str "e.g.\160and"
+ , Space
+ , Str "Mr.\160Brown."
+ ]
+]
```
diff --git a/test/command/262.md b/test/command/262.md
index bda2acb35..61af20ede 100644
--- a/test/command/262.md
+++ b/test/command/262.md
@@ -5,7 +5,8 @@
.. _hello:
.. _goodbye: example.com
^D
-<p><a href="example.com">hello</a> and <a href="example.com">goodbye</a></p>
+<p><a href="example.com">hello</a> and <a
+href="example.com">goodbye</a></p>
```
```
diff --git a/test/command/2649.md b/test/command/2649.md
index 52ae16ce4..4ab059ea0 100644
--- a/test/command/2649.md
+++ b/test/command/2649.md
@@ -90,17 +90,20 @@
<tbody>
<tr class="odd">
<td><p>1</p></td>
-<td><p><a href="Sébastien_Loeb" title="wikilink">Sébastien Loeb</a></p></td>
+<td><p><a href="Sébastien_Loeb" title="wikilink">Sébastien
+Loeb</a></p></td>
<td><p>78</p></td>
</tr>
<tr class="even">
<td><p>2</p></td>
-<td><p><strong><a href="Sébastien_Ogier" title="wikilink">Sébastien Ogier</a></strong></p></td>
+<td><p><strong><a href="Sébastien_Ogier" title="wikilink">Sébastien
+Ogier</a></strong></p></td>
<td><p>38</p></td>
</tr>
<tr class="odd">
<td><p>10</p></td>
-<td><p><a href="Hannu_Mikkola" title="wikilink">Hannu Mikkola</a></p></td>
+<td><p><a href="Hannu_Mikkola" title="wikilink">Hannu
+Mikkola</a></p></td>
<td><p>18</p></td>
</tr>
</tbody>
diff --git a/test/command/3113.md b/test/command/3113.md
index 5ca171d97..7452995b5 100644
--- a/test/command/3113.md
+++ b/test/command/3113.md
@@ -8,6 +8,11 @@ C&=&D,\\
E&=&F
\end{eqnarray}
^D
-[Para [Math DisplayMath "\\begin{aligned}\nA&=&B,\\\\\nC&=&D,\\\\\n%\\end{eqnarray}\n%\\begin{eqnarray}\nE&=&F\\end{aligned}"]]
+[ Para
+ [ Math
+ DisplayMath
+ "\\begin{aligned}\nA&=&B,\\\\\nC&=&D,\\\\\n%\\end{eqnarray}\n%\\begin{eqnarray}\nE&=&F\\end{aligned}"
+ ]
+]
```
diff --git a/test/command/3123.md b/test/command/3123.md
index b71241cdf..a97165bc8 100644
--- a/test/command/3123.md
+++ b/test/command/3123.md
@@ -2,12 +2,16 @@
% pandoc -f markdown -t native
<?php echo "1" ; ?>
^D
-[RawBlock (Format "html") "<?php echo \"1\" ; ?>"]
+[ RawBlock (Format "html") "<?php echo \"1\" ; ?>" ]
```
```
% pandoc -f markdown -t native
a<?php echo "1" ; ?>
^D
-[Para [Str "a",RawInline (Format "html") "<?php echo \"1\" ; ?>"]]
+[ Para
+ [ Str "a"
+ , RawInline (Format "html") "<?php echo \"1\" ; ?>"
+ ]
+]
```
diff --git a/test/command/3236.md b/test/command/3236.md
index 1d1a9b2c3..b9a98f160 100644
--- a/test/command/3236.md
+++ b/test/command/3236.md
@@ -1,9 +1,21 @@
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
\newcommand{\mycolor}{red}
\includegraphics[width=17cm]{\mycolor /header}
Magnificent \mycolor{} header.
^D
-[Para [Image ("",[],[("width","17cm")]) [Str "image"] ("red/header",""),SoftBreak,Str "Magnificent",Space,Str "red",Space,Str "header."]]
+[ Para
+ [ Image
+ ( "" , [] , [ ( "width" , "17cm" ) ] )
+ [ Str "image" ]
+ ( "red/header" , "" )
+ , SoftBreak
+ , Str "Magnificent"
+ , Space
+ , Str "red"
+ , Space
+ , Str "header."
+ ]
+]
```
diff --git a/test/command/3257.md b/test/command/3257.md
index 31d9426ee..ef2419481 100644
--- a/test/command/3257.md
+++ b/test/command/3257.md
@@ -2,12 +2,12 @@
% pandoc -t native
(i<j)
^D
-[Para [Str "(i<j)"]]
+[ Para [ Str "(i<j)" ] ]
```
```
% pandoc -t native
i<j-1, j>k
^D
-[Para [Str "i<j-1,",Space,Str "j>k"]]
+[ Para [ Str "i<j-1," , Space , Str "j>k" ] ]
```
diff --git a/test/command/3324.md b/test/command/3324.md
index 9e9228ed1..45405fee5 100644
--- a/test/command/3324.md
+++ b/test/command/3324.md
@@ -1,5 +1,5 @@
```
-pandoc -t latex
+% pandoc -t latex
Signatures
\
diff --git a/test/command/3348.md b/test/command/3348.md
index 86b1514d1..964136086 100644
--- a/test/command/3348.md
+++ b/test/command/3348.md
@@ -7,24 +7,64 @@
line of text
----- ------------------------------------------------
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidth 8.333333333333333e-2)
- ,(AlignLeft,ColWidth 0.6805555555555556)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "foo"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "bar"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "foo"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "long",SoftBreak,Str "line",Space,Str "of",Space,Str "text"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidth 8.333333333333333e-2 )
+ , ( AlignLeft , ColWidth 0.6805555555555556 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "foo" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "bar" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "foo" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "long"
+ , SoftBreak
+ , Str "line"
+ , Space
+ , Str "of"
+ , Space
+ , Str "text"
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/3401.md b/test/command/3401.md
index 99528553a..3b16e84a4 100644
--- a/test/command/3401.md
+++ b/test/command/3401.md
@@ -5,7 +5,7 @@ See #3401 and <http://orgmode.org/manual/Macro-replacement.html>
#+MACRO: HELLO /Hello, $1/
{{{HELLO(World)}}}
^D
-[Para [Emph [Str "Hello,",Space,Str "World"]]]
+[ Para [ Emph [ Str "Hello," , Space , Str "World" ] ] ]
```
Inverted argument order
@@ -15,5 +15,5 @@ Inverted argument order
#+MACRO: A $2,$1
{{{A(1,2)}}}
^D
-[Para [Str "2,1"]]
+[ Para [ Str "2,1" ] ]
```
diff --git a/test/command/3407.md b/test/command/3407.md
index aec253ff5..edc1bcb2b 100644
--- a/test/command/3407.md
+++ b/test/command/3407.md
@@ -9,5 +9,10 @@
% pandoc -f rst -t native
:foo:`text`
^D
-[Para [Code ("",["interpreted-text"],[("role","foo")]) "text"]]
+[ Para
+ [ Code
+ ( "" , [ "interpreted-text" ] , [ ( "role" , "foo" ) ] )
+ "text"
+ ]
+]
```
diff --git a/test/command/3475.md b/test/command/3475.md
index afba4ea3c..41a738f67 100644
--- a/test/command/3475.md
+++ b/test/command/3475.md
@@ -1,7 +1,7 @@
RST implicit internal links to headers:
```
-pandoc -f rst
+% pandoc -f rst
Years
-----
@@ -12,7 +12,7 @@ Years_
```
```
-pandoc -f rst
+% pandoc -f rst
Years_
Years
@@ -23,7 +23,7 @@ Years
```
```
-pandoc -f rst
+% pandoc -f rst
Years and years
---------------
@@ -34,7 +34,7 @@ Years and years
```
```
-pandoc -f rst
+% pandoc -f rst
Years and *years*
-----------------
diff --git a/test/command/3510.md b/test/command/3510.md
index 7993db848..48522f7e1 100644
--- a/test/command/3510.md
+++ b/test/command/3510.md
@@ -10,11 +10,13 @@ Text
More text
^D
-[Para [Str "Text"]
-,Header 1 ("subsection",[],[]) [Str "Subsection"]
-,Para [Str "Included",Space,Str "text"]
-,Plain [Str "Lorem",Space,Str "ipsum."]
-,CodeBlock ("",["haskell"],[]) "putStrLn outString\n"
-,RawBlock (Format "latex") "\\emph{Hello}"
-,Para [Str "More",Space,Str "text"]]
+[ Para [ Str "Text" ]
+, Header 1 ( "subsection" , [] , [] ) [ Str "Subsection" ]
+, Para [ Str "Included" , Space , Str "text" ]
+, Plain [ Str "Lorem" , Space , Str "ipsum." ]
+, CodeBlock
+ ( "" , [ "haskell" ] , [] ) "putStrLn outString\n"
+, RawBlock (Format "latex") "\\emph{Hello}"
+, Para [ Str "More" , Space , Str "text" ]
+]
```
diff --git a/test/command/3511.md b/test/command/3511.md
index b8bcedbb0..0fede7a0e 100644
--- a/test/command/3511.md
+++ b/test/command/3511.md
@@ -10,16 +10,20 @@
not continuation
^D
-[BulletList
- [[Plain [Str "a"]
- ,BulletList
- [[Plain [Str "b"]
- ,BulletList
- [[Plain [Str "c"]]]]]]
- ,[CodeBlock ("",[],[]) "code"]]
-,OrderedList (1000,Decimal,Period)
- [[Plain [Str "one"]]]
-,CodeBlock ("",[],[]) "not continuation"]
+[ BulletList
+ [ [ Plain [ Str "a" ]
+ , BulletList
+ [ [ Plain [ Str "b" ]
+ , BulletList [ [ Plain [ Str "c" ] ] ]
+ ]
+ ]
+ ]
+ , [ CodeBlock ( "" , [] , [] ) "code" ]
+ ]
+, OrderedList
+ ( 1000 , Decimal , Period ) [ [ Plain [ Str "one" ] ] ]
+, CodeBlock ( "" , [] , [] ) "not continuation"
+]
```
```
@@ -34,13 +38,15 @@
continuation
^D
-[BulletList
- [[Plain [Str "a"]]
- ,[Plain [Str "b"]
- ,BulletList
- [[Plain [Str "c"]]]]
- ,[CodeBlock ("",[],[]) "not code"]]
-,OrderedList (1000,Decimal,Period)
- [[Para [Str "one"]
- ,Para [Str "continuation"]]]]
+[ BulletList
+ [ [ Plain [ Str "a" ] ]
+ , [ Plain [ Str "b" ]
+ , BulletList [ [ Plain [ Str "c" ] ] ]
+ ]
+ , [ CodeBlock ( "" , [] , [] ) "not code" ]
+ ]
+, OrderedList
+ ( 1000 , Decimal , Period )
+ [ [ Para [ Str "one" ] , Para [ Str "continuation" ] ] ]
+]
```
diff --git a/test/command/3516.md b/test/command/3516.md
index dc8770bad..615befb3e 100644
--- a/test/command/3516.md
+++ b/test/command/3516.md
@@ -24,26 +24,43 @@ on Windows builds.
| | |
+---+---+
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 5.555555555555555e-2)
- ,(AlignDefault,ColWidth 5.555555555555555e-2)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 5.555555555555555e-2 )
+ , ( AlignDefault , ColWidth 5.555555555555555e-2 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell
+ ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
diff --git a/test/command/3518.md b/test/command/3518.md
index ec3322192..a4ba7a3a0 100644
--- a/test/command/3518.md
+++ b/test/command/3518.md
@@ -1,5 +1,5 @@
```
-pandoc -f latex -t plain
+% pandoc -f latex -t plain
$\alpha^2 \cdot \alpha^{2+3} \equiv \alpha^7$
^D
α² ⋅ α² ⁺ ³ ≡ α⁷
diff --git a/test/command/3523.md b/test/command/3523.md
index cb0089489..c3574943c 100644
--- a/test/command/3523.md
+++ b/test/command/3523.md
@@ -19,8 +19,12 @@
\end{document}
^D
<div class="epigraph">
-<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.</p>
-<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr ist das Leben des Menschen selbst, von einer besonderen Seite angesehen.</p>
+<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr
+ist das Leben des Menschen selbst, von einer besonderen Seite
+angesehen.</p>
+<p>Das Recht hat kein Dasein f<span>ü</span>r sich, sein Wesen vielmehr
+ist das Leben des Menschen selbst, von einer besonderen Seite
+angesehen.</p>
<ul>
<li><p>hey</p></li>
<li><p>hey</p></li>
diff --git a/test/command/3530.md b/test/command/3530.md
index 178b36ff0..168cb7067 100644
--- a/test/command/3530.md
+++ b/test/command/3530.md
@@ -3,10 +3,55 @@
\subfile{command/sub-file-chapter-1}
\subfile{command/sub-file-chapter-2}
^D
-[Header 1 ("chapter-1",[],[]) [Str "Chapter",Space,Str "1"]
-,Para [Str "This",Space,Str "is",Space,Str "Chapter",Space,Str "1,",Space,Str "provided",Space,Str "in",Space,Str "a",Space,Str "sub",Space,Str "file."]
-,Header 1 ("chapter-2",[],[]) [Str "Chapter",Space,Str "2"]
-,Para [Str "This",Space,Str "is",Space,Str "Chapter",Space,Str "2,",Space,Str "provided",Space,Str "in",Space,Str "a",Space,Str "second",Space,Str "sub",Space,Str "file."]]
+[ Header
+ 1
+ ( "chapter-1" , [] , [] )
+ [ Str "Chapter" , Space , Str "1" ]
+, Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Chapter"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "provided"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "file."
+ ]
+, Header
+ 1
+ ( "chapter-2" , [] , [] )
+ [ Str "Chapter" , Space , Str "2" ]
+, Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Chapter"
+ , Space
+ , Str "2,"
+ , Space
+ , Str "provided"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "second"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "file."
+ ]
+]
```
```
@@ -14,6 +59,9 @@
\subfile{command/sub-file-chapter-1}
\subfile{command/sub-file-chapter-2}
^D
-[RawBlock (Format "latex") "\\subfile{command/sub-file-chapter-1}"
-,RawBlock (Format "latex") "\\subfile{command/sub-file-chapter-2}"]
+[ RawBlock
+ (Format "latex") "\\subfile{command/sub-file-chapter-1}"
+, RawBlock
+ (Format "latex") "\\subfile{command/sub-file-chapter-2}"
+]
```
diff --git a/test/command/3533-rst-csv-tables.md b/test/command/3533-rst-csv-tables.md
index 70339d95d..ed69ca860 100644
--- a/test/command/3533-rst-csv-tables.md
+++ b/test/command/3533-rst-csv-tables.md
@@ -5,37 +5,121 @@
:header: Flavor,Price,Slogan
:file: command/3533-rst-csv-tables.csv
^D
-[Table ("",[],[]) (Caption Nothing
- [Plain [Str "Test"]])
- [(AlignDefault,ColWidth 0.4)
- ,(AlignDefault,ColWidth 0.2)
- ,(AlignDefault,ColWidth 0.4)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Flavor"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Price"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Slogan"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Albatross"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2.99"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "On",Space,Str "a",Space,Str "stick!"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Crunchy",Space,Str "Frog"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1.49"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "If",Space,Str "we",Space,Str "took",Space,Str "the",Space,Str "bones",Space,Str "out,",Space,Str "it",Space,Str "wouldn't",Space,Str "be",SoftBreak,Str "crunchy,",Space,Str "now",Space,Str "would",Space,Str "it?"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [ Plain [ Str "Test" ] ])
+ [ ( AlignDefault , ColWidth 0.4 )
+ , ( AlignDefault , ColWidth 0.2 )
+ , ( AlignDefault , ColWidth 0.4 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Flavor" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Price" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Slogan" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Albatross" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2.99" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "On"
+ , Space
+ , Str "a"
+ , Space
+ , Str "stick!"
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Crunchy" , Space , Str "Frog" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1.49" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "If"
+ , Space
+ , Str "we"
+ , Space
+ , Str "took"
+ , Space
+ , Str "the"
+ , Space
+ , Str "bones"
+ , Space
+ , Str "out,"
+ , Space
+ , Str "it"
+ , Space
+ , Str "wouldn't"
+ , Space
+ , Str "be"
+ , SoftBreak
+ , Str "crunchy,"
+ , Space
+ , Str "now"
+ , Space
+ , Str "would"
+ , Space
+ , Str "it?"
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
@@ -49,37 +133,83 @@
'cat''s' 3 4
'dog''s' 2 3
^D
-[Table ("",[],[]) (Caption Nothing
- [Plain [Str "Test"]])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "cat's"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "dog's"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [ Plain [ Str "Test" ] ])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "cat's" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "dog's" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
@@ -89,20 +219,35 @@
"1","\""
^D
-[Table ("",[],[]) (Caption Nothing
- [Plain [Str "Test"]])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\""]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [ Plain [ Str "Test" ] ])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\"" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/3534.md b/test/command/3534.md
index cd0915d88..42dca9207 100644
--- a/test/command/3534.md
+++ b/test/command/3534.md
@@ -2,7 +2,9 @@
% pandoc -f latex -t html
I want to explain the interface of \lstinline[language=Java]{public class MyClass}.
^D
-<p>I want to explain the interface of <code class="sourceCode java"><span class="kw">public</span> <span class="kw">class</span> MyClass</code>.</p>
+<p>I want to explain the interface of <code class="sourceCode
+java"><span class="kw">public</span> <span class="kw">class</span>
+MyClass</code>.</p>
```
@@ -10,7 +12,8 @@ I want to explain the interface of \lstinline[language=Java]{public class MyClas
% pandoc -f latex -t html
I want to explain the interface of \lstinline{public class MyClass}.
^D
-<p>I want to explain the interface of <code>public class MyClass</code>.</p>
+<p>I want to explain the interface of <code>public class
+MyClass</code>.</p>
```
@@ -18,14 +21,34 @@ I want to explain the interface of \lstinline{public class MyClass}.
% pandoc -f latex -t native
I want to explain the interface of \lstinline[language=Java]{public class MyClass}.
^D
-[Para [Str "I",Space,Str "want",Space,Str "to",Space,Str "explain",Space,Str "the",Space,Str "interface",Space,Str "of",Space,Code ("",["java"],[]) "public class MyClass",Str "."]]
+[ Para
+ [ Str "I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "explain"
+ , Space
+ , Str "the"
+ , Space
+ , Str "interface"
+ , Space
+ , Str "of"
+ , Space
+ , Code ( "" , [ "java" ] , [] ) "public class MyClass"
+ , Str "."
+ ]
+]
```
```
% pandoc -f latex -t html
I want to explain the interface of \mintinline{java}{public class MyClass}.
^D
-<p>I want to explain the interface of <code class="sourceCode java"><span class="kw">public</span> <span class="kw">class</span> MyClass</code>.</p>
+<p>I want to explain the interface of <code class="sourceCode
+java"><span class="kw">public</span> <span class="kw">class</span>
+MyClass</code>.</p>
```
@@ -33,7 +56,9 @@ I want to explain the interface of \mintinline{java}{public class MyClass}.
% pandoc -f latex -t html
I want to explain the interface of \mintinline{java}|public class MyClass|.
^D
-<p>I want to explain the interface of <code class="sourceCode java"><span class="kw">public</span> <span class="kw">class</span> MyClass</code>.</p>
+<p>I want to explain the interface of <code class="sourceCode
+java"><span class="kw">public</span> <span class="kw">class</span>
+MyClass</code>.</p>
```
@@ -41,5 +66,23 @@ I want to explain the interface of \mintinline{java}|public class MyClass|.
% pandoc -f latex -t native
I want to explain the interface of \mintinline[linenos]{java}{public class MyClass}.
^D
-[Para [Str "I",Space,Str "want",Space,Str "to",Space,Str "explain",Space,Str "the",Space,Str "interface",Space,Str "of",Space,Code ("",["java"],[]) "public class MyClass",Str "."]]
+[ Para
+ [ Str "I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "explain"
+ , Space
+ , Str "the"
+ , Space
+ , Str "interface"
+ , Space
+ , Str "of"
+ , Space
+ , Code ( "" , [ "java" ] , [] ) "public class MyClass"
+ , Str "."
+ ]
+]
```
diff --git a/test/command/3537.md b/test/command/3537.md
index df4eeba7d..3f4445343 100644
--- a/test/command/3537.md
+++ b/test/command/3537.md
@@ -7,14 +7,20 @@ Generalized raw attributes.
foo bar
```
^D
-[RawBlock (Format "ms") ".MACRO\nfoo bar"]
+[ RawBlock (Format "ms") ".MACRO\nfoo bar" ]
````
````
% pandoc -t native
Hi `there`{=ms}.
^D
-[Para [Str "Hi",Space,RawInline (Format "ms") "there",Str "."]]
+[ Para
+ [ Str "Hi"
+ , Space
+ , RawInline (Format "ms") "there"
+ , Str "."
+ ]
+]
````
````
@@ -24,5 +30,5 @@ Hi `there`{=ms}.
foo bar
~~~
^D
-[RawBlock (Format "ms") ".MACRO\nfoo bar"]
+[ RawBlock (Format "ms") ".MACRO\nfoo bar" ]
````
diff --git a/test/command/3539.md b/test/command/3539.md
index 6ef9ffac7..b2ce5455f 100644
--- a/test/command/3539.md
+++ b/test/command/3539.md
@@ -4,35 +4,205 @@
% pandoc -f latex -t native
Many programming languages provide \glspl{API}. Each \gls{API} should provide a documentation.
^D
-[Para [Str "Many",Space,Str "programming",Space,Str "languages",Space,Str "provide",Space,Span ("",[],[("acronym-label","API"),("acronym-form","plural+short")]) [Str "APIs"],Str ".",Space,Str "Each",Space,Span ("",[],[("acronym-label","API"),("acronym-form","singular+short")]) [Str "API"],Space,Str "should",Space,Str "provide",Space,Str "a",Space,Str "documentation."]]
+[ Para
+ [ Str "Many"
+ , Space
+ , Str "programming"
+ , Space
+ , Str "languages"
+ , Space
+ , Str "provide"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "plural+short" )
+ ]
+ )
+ [ Str "APIs" ]
+ , Str "."
+ , Space
+ , Str "Each"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+short" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "should"
+ , Space
+ , Str "provide"
+ , Space
+ , Str "a"
+ , Space
+ , Str "documentation."
+ ]
+]
```
```
% pandoc -f latex -t native
\Glsdesc{API} XYZ ist not as performant as \glsdesc{API} ZXY.
^D
-[Para [Span ("",[],[("acronym-label","API"),("acronym-form","singular+long")]) [Str "API"],Space,Str "XYZ",Space,Str "ist",Space,Str "not",Space,Str "as",Space,Str "performant",Space,Str "as",Space,Span ("",[],[("acronym-label","API"),("acronym-form","singular+long")]) [Str "API"],Space,Str "ZXY."]]
+[ Para
+ [ Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+long" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "XYZ"
+ , Space
+ , Str "ist"
+ , Space
+ , Str "not"
+ , Space
+ , Str "as"
+ , Space
+ , Str "performant"
+ , Space
+ , Str "as"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+long" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "ZXY."
+ ]
+]
```
```
% pandoc -f latex -t native
\Acrlong{API} XYZ ist not as performant as \acrlong{API} ZXY.
^D
-[Para [Span ("",[],[("acronym-label","API"),("acronym-form","singular+long")]) [Str "API"],Space,Str "XYZ",Space,Str "ist",Space,Str "not",Space,Str "as",Space,Str "performant",Space,Str "as",Space,Span ("",[],[("acronym-label","API"),("acronym-form","singular+long")]) [Str "API"],Space,Str "ZXY."]]
+[ Para
+ [ Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+long" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "XYZ"
+ , Space
+ , Str "ist"
+ , Space
+ , Str "not"
+ , Space
+ , Str "as"
+ , Space
+ , Str "performant"
+ , Space
+ , Str "as"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+long" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "ZXY."
+ ]
+]
```
```
% pandoc -f latex -t native
\Acrfull{API} XYZ ist not as performant as \acrfull{API} ZXY.
^D
-[Para [Span ("",[],[("acronym-label","API"),("acronym-form","singular+full")]) [Str "API"],Space,Str "XYZ",Space,Str "ist",Space,Str "not",Space,Str "as",Space,Str "performant",Space,Str "as",Space,Span ("",[],[("acronym-label","API"),("acronym-form","singular+full")]) [Str "API"],Space,Str "ZXY."]]
+[ Para
+ [ Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+full" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "XYZ"
+ , Space
+ , Str "ist"
+ , Space
+ , Str "not"
+ , Space
+ , Str "as"
+ , Space
+ , Str "performant"
+ , Space
+ , Str "as"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+full" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "ZXY."
+ ]
+]
```
```
% pandoc -f latex -t native
\Acrshort{API} XYZ ist not as performant as \acrshort{API} ZXY.
^D
-[Para [Span ("",[],[("acronym-label","API"),("acronym-form","singular+abbrv")]) [Str "API"],Space,Str "XYZ",Space,Str "ist",Space,Str "not",Space,Str "as",Space,Str "performant",Space,Str "as",Space,Span ("",[],[("acronym-label","API"),("acronym-form","singular+abbrv")]) [Str "API"],Space,Str "ZXY."]]
+[ Para
+ [ Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+abbrv" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "XYZ"
+ , Space
+ , Str "ist"
+ , Space
+ , Str "not"
+ , Space
+ , Str "as"
+ , Space
+ , Str "performant"
+ , Space
+ , Str "as"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+abbrv" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "ZXY."
+ ]
+]
```
# Commands of [acronym package](ftp://ftp.mpi-sb.mpg.de/pub/tex/mirror/ftp.dante.de/pub/tex/macros/latex/contrib/acronym/acronym.pdf)
@@ -41,5 +211,43 @@ Many programming languages provide \glspl{API}. Each \gls{API} should provide a
% pandoc -f latex -t native
Many programming languages provide \acp{API}. Each \ac{API} should provide a documentation.
^D
-[Para [Str "Many",Space,Str "programming",Space,Str "languages",Space,Str "provide",Space,Span ("",[],[("acronym-label","API"),("acronym-form","plural+short")]) [Str "APIs"],Str ".",Space,Str "Each",Space,Span ("",[],[("acronym-label","API"),("acronym-form","singular+short")]) [Str "API"],Space,Str "should",Space,Str "provide",Space,Str "a",Space,Str "documentation."]]
+[ Para
+ [ Str "Many"
+ , Space
+ , Str "programming"
+ , Space
+ , Str "languages"
+ , Space
+ , Str "provide"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "plural+short" )
+ ]
+ )
+ [ Str "APIs" ]
+ , Str "."
+ , Space
+ , Str "Each"
+ , Space
+ , Span
+ ( ""
+ , []
+ , [ ( "acronym-label" , "API" )
+ , ( "acronym-form" , "singular+short" )
+ ]
+ )
+ [ Str "API" ]
+ , Space
+ , Str "should"
+ , Space
+ , Str "provide"
+ , Space
+ , Str "a"
+ , Space
+ , Str "documentation."
+ ]
+]
```
diff --git a/test/command/3558.md b/test/command/3558.md
index 956b09e57..c9c782c16 100644
--- a/test/command/3558.md
+++ b/test/command/3558.md
@@ -6,7 +6,8 @@ hello
\endmulti
^D
-[RawBlock (Format "tex") "\\multi"
-,Para [Str "hello"]
-,RawBlock (Format "tex") "\\endmulti"]
+[ RawBlock (Format "tex") "\\multi"
+, Para [ Str "hello" ]
+, RawBlock (Format "tex") "\\endmulti"
+]
```
diff --git a/test/command/3577.md b/test/command/3577.md
index 2f415146d..2caeb7c11 100644
--- a/test/command/3577.md
+++ b/test/command/3577.md
@@ -16,10 +16,12 @@
\end{figure}
^D
<figure>
-<img src="img1.jpg" alt="Caption 1" /><figcaption aria-hidden="true">Caption 1</figcaption>
+<img src="img1.jpg" alt="Caption 1" />
+<figcaption aria-hidden="true">Caption 1</figcaption>
</figure>
<figure>
-<img src="img2.jpg" alt="Caption 2" /><figcaption aria-hidden="true">Caption 2</figcaption>
+<img src="img2.jpg" alt="Caption 2" />
+<figcaption aria-hidden="true">Caption 2</figcaption>
</figure>
```
```
@@ -30,6 +32,7 @@
\end{figure}
^D
<figure>
-<img src="img1.jpg" alt="Caption 3" /><figcaption aria-hidden="true">Caption 3</figcaption>
+<img src="img1.jpg" alt="Caption 3" />
+<figcaption aria-hidden="true">Caption 3</figcaption>
</figure>
```
diff --git a/test/command/3585.md b/test/command/3585.md
index 739ddeea4..3f014db94 100644
--- a/test/command/3585.md
+++ b/test/command/3585.md
@@ -4,13 +4,32 @@
Same but bzip2 it and nice it <tt>zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh user@hyper.somewhere.org "> /storage/c-3po/tank-storage-data-svn.dmp.bz2"</tt>
^D
-[Para [Quoted DoubleQuote [Str "Hello"]]
-,Para [Str "Same",Space,Str "but",Space,Str "bzip2",Space,Str "it",Space,Str "and",Space,Str "nice",Space,Str "it",Space,Code ("",[],[]) "zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh user@hyper.somewhere.org \"> /storage/c-3po/tank-storage-data-svn.dmp.bz2\""]]
+[ Para [ Quoted DoubleQuote [ Str "Hello" ] ]
+, Para
+ [ Str "Same"
+ , Space
+ , Str "but"
+ , Space
+ , Str "bzip2"
+ , Space
+ , Str "it"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nice"
+ , Space
+ , Str "it"
+ , Space
+ , Code
+ ( "" , [] , [] )
+ "zfs send tank/storage/data/svn@daily-2014-03-20_00.00.00--2w | nice -15 bzip2 | ssh user@hyper.somewhere.org \"> /storage/c-3po/tank-storage-data-svn.dmp.bz2\""
+ ]
+]
```
```
% pandoc -f mediawiki -t native
"Hello"
^D
-[Para [Str "\"Hello\""]]
+[ Para [ Str "\"Hello\"" ] ]
```
diff --git a/test/command/3587.md b/test/command/3587.md
index 3016afa5a..0a3c389b9 100644
--- a/test/command/3587.md
+++ b/test/command/3587.md
@@ -2,14 +2,36 @@
% pandoc -f latex -t native
\SI[round-precision=2]{1}{m} is equal to \SI{1000}{mm}
^D
-[Para [Str "1\160m",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "1000\160mm"]]
+[ Para
+ [ Str "1\160m"
+ , Space
+ , Str "is"
+ , Space
+ , Str "equal"
+ , Space
+ , Str "to"
+ , Space
+ , Str "1000\160mm"
+ ]
+]
```
```
% pandoc -f latex -t native
\SI[round-precision=2]{1}[\$]{} is equal to \SI{0.938094}{\euro}
^D
-[Para [Str "$\160\&1",Space,Str "is",Space,Str "equal",Space,Str "to",Space,Str "0.938094\160\8364"]]
+[ Para
+ [ Str "$\160\&1"
+ , Space
+ , Str "is"
+ , Space
+ , Str "equal"
+ , Space
+ , Str "to"
+ , Space
+ , Str "0.938094\160\8364"
+ ]
+]
```
@@ -17,35 +39,35 @@
% pandoc -f latex -t native
\SI{30}{\milli\meter}
^D
-[Para [Str "30\160mm"]]
+[ Para [ Str "30\160mm" ] ]
```
```
% pandoc -f latex -t native
\SI{6}{\gram}
^D
-[Para [Str "6\160g"]]
+[ Para [ Str "6\160g" ] ]
```
```
% pandoc -f latex -t native
\SI{25}{\square\meter}
^D
-[Para [Str "25\160m",Superscript [Str "2"]]]
+[ Para [ Str "25\160m" , Superscript [ Str "2" ] ] ]
```
```
% pandoc -f latex -t native
\SI{18.2}{\degreeCelsius}
^D
-[Para [Str "18.2\160\176C"]]
+[ Para [ Str "18.2\160\176C" ] ]
```
```
% pandoc -f latex -t native
\SI{18.2}{\celsius}
^D
-[Para [Str "18.2\160\176C"]]
+[ Para [ Str "18.2\160\176C" ] ]
```
# SIrange tests
@@ -56,19 +78,19 @@
% pandoc -f latex -t native
\SIrange{10}{20}{\gram}
^D
-[Para [Str "10\160g\8211\&20\160g"]]
+[ Para [ Str "10\160g\8211\&20\160g" ] ]
```
```
% pandoc -f latex -t native
\SIrange{35}{9}{\milli\meter}
^D
-[Para [Str "35\160mm\8211\&9\160mm"]]
+[ Para [ Str "35\160mm\8211\&9\160mm" ] ]
```
```
% pandoc -f latex -t native
\SIrange{4}{97367265}{\celsius}
^D
-[Para [Str "4\160\176C\8211\&97367265\160\176C"]]
+[ Para [ Str "4\160\176C\8211\&97367265\160\176C" ] ]
```
## Decimal range with simple units
@@ -77,7 +99,7 @@
% pandoc -f latex -t native
\SIrange{4.5}{97367265.5}{\celsius}
^D
-[Para [Str "4.5\160\176C\8211\&97367265.5\160\176C"]]
+[ Para [ Str "4.5\160\176C\8211\&97367265.5\160\176C" ] ]
```
## Squared, cubed etc. units
@@ -86,21 +108,39 @@
% pandoc -f latex -t native
\SIrange{10}{20}{\square\meter}
^D
-[Para [Str "10\160m",Superscript [Str "2"],Str "\8211\&20\160m",Superscript [Str "2"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript [ Str "2" ]
+ , Str "\8211\&20\160m"
+ , Superscript [ Str "2" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\cubic\meter}
^D
-[Para [Str "10\160m",Superscript [Str "3"],Str "\8211\&20\160m",Superscript [Str "3"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript [ Str "3" ]
+ , Str "\8211\&20\160m"
+ , Superscript [ Str "3" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\raisetothe{4}\meter}
^D
-[Para [Str "10\160m",Superscript [Str "4"],Str "\8211\&20\160m",Superscript [Str "4"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript [ Str "4" ]
+ , Str "\8211\&20\160m"
+ , Superscript [ Str "4" ]
+ ]
+]
```
@@ -108,21 +148,39 @@
% pandoc -f latex -t native
\SIrange{10}{20}{\meter\squared}
^D
-[Para [Str "10\160m",Superscript [Str "2"],Str "\8211\&20\160m",Superscript [Str "2"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript [ Str "2" ]
+ , Str "\8211\&20\160m"
+ , Superscript [ Str "2" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\meter\cubed}
^D
-[Para [Str "10\160m",Superscript [Str "3"],Str "\8211\&20\160m",Superscript [Str "3"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript [ Str "3" ]
+ , Str "\8211\&20\160m"
+ , Superscript [ Str "3" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\SIrange{10}{20}{\meter\tothe{4}}
^D
-[Para [Str "10\160m",Superscript [Str "4"],Str "\8211\&20\160m",Superscript [Str "4"]]]
+[ Para
+ [ Str "10\160m"
+ , Superscript [ Str "4" ]
+ , Str "\8211\&20\160m"
+ , Superscript [ Str "4" ]
+ ]
+]
```
@@ -136,12 +194,12 @@
% pandoc -f latex -t native
\SIrange[round-precision=2]{10}{20}{\gram}
^D
-[Para [Str "10\160g\8211\&20\160g"]]
+[ Para [ Str "10\160g\8211\&20\160g" ] ]
```
```
% pandoc -f latex -t native
\SIrange[round-precision=2]{10.0}{20.25}{\gram}
^D
-[Para [Str "10.0\160g\8211\&20.25\160g"]]
+[ Para [ Str "10.0\160g\8211\&20.25\160g" ] ]
```
diff --git a/test/command/3681.md b/test/command/3681.md
index d0805e820..dc6b90860 100644
--- a/test/command/3681.md
+++ b/test/command/3681.md
@@ -4,7 +4,34 @@
Software developers create \cicd pipelines to… Following issue can be resolved by \cicd:
^D
-[Para [Str "Software",Space,Str "developers",Space,Str "create",Space,Str "CI/CD",Space,Str "pipelines",Space,Str "to\8230",Space,Str "Following",Space,Str "issue",Space,Str "can",Space,Str "be",Space,Str "resolved",Space,Str "by",Space,Str "CI/CD:"]]
+[ Para
+ [ Str "Software"
+ , Space
+ , Str "developers"
+ , Space
+ , Str "create"
+ , Space
+ , Str "CI/CD"
+ , Space
+ , Str "pipelines"
+ , Space
+ , Str "to\8230"
+ , Space
+ , Str "Following"
+ , Space
+ , Str "issue"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "resolved"
+ , Space
+ , Str "by"
+ , Space
+ , Str "CI/CD:"
+ ]
+]
```
```
@@ -13,7 +40,22 @@ Software developers create \cicd pipelines to… Following issue can be resolved
\cicd\footnote{\url{https://en.wikipedia.org/wiki/CI/CD}} is awesome.
^D
-[Para [Str "CI/CD",Note [Para [Link ("",[],[]) [Str "https://en.wikipedia.org/wiki/CI/CD"] ("https://en.wikipedia.org/wiki/CI/CD","")]],Space,Str "is",Space,Str "awesome."]]
+[ Para
+ [ Str "CI/CD"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "https://en.wikipedia.org/wiki/CI/CD" ]
+ ( "https://en.wikipedia.org/wiki/CI/CD" , "" )
+ ]
+ ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "awesome."
+ ]
+]
```
```
@@ -23,5 +65,5 @@ Software developers create \cicd pipelines to… Following issue can be resolved
\cicd\pipeline.
^D
-[Para [Str "CI/CD",Space,Str "pipeline."]]
+[ Para [ Str "CI/CD" , Space , Str "pipeline." ] ]
```
diff --git a/test/command/3701.md b/test/command/3701.md
index 01e438639..bd70fae59 100644
--- a/test/command/3701.md
+++ b/test/command/3701.md
@@ -55,6 +55,7 @@
^D
<p><a href="u">a</a></p>
<p><a href="u">a</a></p>
-<p><a href="u2">a</a> <a href="u">A</a> <a href="u" class="foo">a</a></p>
+<p><a href="u2">a</a> <a href="u">A</a> <a href="u"
+class="foo">a</a></p>
<p><a href="u3">a</a></p>
```
diff --git a/test/command/3706.md b/test/command/3706.md
index b6c2c6db1..fcd95dfdd 100644
--- a/test/command/3706.md
+++ b/test/command/3706.md
@@ -1,7 +1,7 @@
Results marker can be hidden in block attributes (#3706)
```
-pandoc -f org -t native
+% pandoc -f org -t native
#+begin_src r :exports results :colnames yes
data.frame(Id = 1:3, Desc = rep("La",3))
#+end_src
@@ -15,40 +15,90 @@ pandoc -f org -t native
| 2 | La |
| 3 | La |
^D
-[Div ("tab",[],[])
- [Table ("",[],[]) (Caption Nothing
- [Plain [Str "Lalelu."]])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Id"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Desc"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "La"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "La"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "La"]]]])]
- (TableFoot ("",[],[])
- [])]]
+[ Div
+ ( "tab" , [] , [] )
+ [ Table
+ ( "" , [] , [] )
+ (Caption Nothing [ Plain [ Str "Lalelu." ] ])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Id" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Desc" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "La" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "La" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "La" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
+]
```
```
-pandoc -f org -t native
+% pandoc -f org -t native
#+begin_src R :exports none :colnames yes
data.frame(Id = 1:2, Desc = rep("La",2))
#+end_src
diff --git a/test/command/3708.md b/test/command/3708.md
index b4fc0da1b..e456617de 100644
--- a/test/command/3708.md
+++ b/test/command/3708.md
@@ -5,24 +5,49 @@
C & D
\end{tabular}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "A"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "B&1"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "C"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "D"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "A" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "B&1" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "C" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "D" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/3733.md b/test/command/3733.md
index b8a326938..0b24d0c1b 100644
--- a/test/command/3733.md
+++ b/test/command/3733.md
@@ -6,8 +6,8 @@
some: code
```
^D
-[BulletList
- [[Plain [Str "Item1"]]
- ,[Plain [Str "Item2"]]]
-,CodeBlock ("",["yaml"],[]) "some: code"]
+[ BulletList
+ [ [ Plain [ Str "Item1" ] ] , [ Plain [ Str "Item2" ] ] ]
+, CodeBlock ( "" , [ "yaml" ] , [] ) "some: code"
+]
````
diff --git a/test/command/3752.md b/test/command/3752.md
index 863e3f2d4..7db581cfe 100644
--- a/test/command/3752.md
+++ b/test/command/3752.md
@@ -32,11 +32,14 @@ A spider: [spider]
^D
<h1 id="chapter-one">Chapter one</h1>
<p>A spider: <img src="command/chap1/spider.png" alt="spider" /></p>
-<p>Another spider: <img src="command/chap2/spider.png" alt="another spider" /></p>
+<p>Another spider: <img src="command/chap2/spider.png" alt="another
+spider" /></p>
<p>The moon: <img src="command/chap1/../../lalune.jpg" alt="moon" /></p>
<p>Link to <a href="command/chap1/spider.png">spider picture</a>.</p>
-<p>URL left alone: <a href="https://pandoc.org/MANUAL.html">manual</a>.</p>
-<p>Absolute path left alone: <a href="/foo/bar/baz.png">absolute</a>.</p>
+<p>URL left alone: <a
+href="https://pandoc.org/MANUAL.html">manual</a>.</p>
+<p>Absolute path left alone: <a
+href="/foo/bar/baz.png">absolute</a>.</p>
<p>Link to fragment: <a href="#chapter-two">chapter two</a>.</p>
<p>Empty path: <a href="">empty</a>.</p>
<h1 id="chapter-two">Chapter two</h1>
@@ -48,11 +51,14 @@ A spider: [spider]
^D
<h1>Chapter one</h1>
<p>A spider: <img src="command/chap1/spider.png" alt="spider" /></p>
-<p>Another spider: <img src="command/chap2/spider.png" alt="another spider" /></p>
+<p>Another spider: <img src="command/chap2/spider.png" alt="another
+spider" /></p>
<p>The moon: <img src="command/chap1/../../lalune.jpg" alt="moon" /></p>
<p>Link to <a href="command/chap1/spider.png">spider picture</a>.</p>
-<p>URL left alone: <a href="https://pandoc.org/MANUAL.html">manual</a>.</p>
-<p>Absolute path left alone: <a href="/foo/bar/baz.png">absolute</a>.</p>
+<p>URL left alone: <a
+href="https://pandoc.org/MANUAL.html">manual</a>.</p>
+<p>Absolute path left alone: <a
+href="/foo/bar/baz.png">absolute</a>.</p>
<p>Link to fragment: <a href="#chapter-two">chapter two</a>.</p>
<p>Empty path: <a href="">empty</a>.</p>
<h1>Chapter two</h1>
diff --git a/test/command/3755.md b/test/command/3755.md
index 5e1ffc921..e89eaec35 100644
--- a/test/command/3755.md
+++ b/test/command/3755.md
@@ -5,8 +5,18 @@ title: 'Titel'
date: '22. Juni 2017'
---
^D
-Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "22.",Space,Str "Juni",Space,Str "2017"]),("title",MetaInlines [Str "Titel"])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "date"
+ , MetaInlines
+ [ Str "22." , Space , Str "Juni" , Space , Str "2017" ]
+ )
+ , ( "title" , MetaInlines [ Str "Titel" ] )
+ ]
+ }
+ []
```
```
@@ -17,7 +27,23 @@ date: |
22. Juni 2017
---
^D
-Pandoc (Meta {unMeta = fromList [("date",MetaBlocks [OrderedList (22,Decimal,Period) [[Plain [Str "Juni",Space,Str "2017"]]]]),("title",MetaBlocks [Div ("",[],[]) [Plain [Str "foo"]]])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "date"
+ , MetaBlocks
+ [ OrderedList
+ ( 22 , Decimal , Period )
+ [ [ Plain [ Str "Juni" , Space , Str "2017" ] ] ]
+ ]
+ )
+ , ( "title"
+ , MetaBlocks
+ [ Div ( "" , [] , [] ) [ Plain [ Str "foo" ] ] ]
+ )
+ ]
+ }
+ []
```
diff --git a/test/command/3779.md b/test/command/3779.md
index 1097123f0..04111c2a6 100644
--- a/test/command/3779.md
+++ b/test/command/3779.md
@@ -20,9 +20,38 @@
Pandoc is 300\% awesome.
}
^D
-[BulletList
- [[Para [Str "Pandoc",Space,Str "is",Space,Str "100%",Space,Str "awesome."]]]
-,BulletList
- [[Para [Str "Pandoc",Space,Str "is",Space,Str "200%",Space,Str "awesome."]]]
-,Para [Str "Pandoc",Space,Str "is",Space,Str "300%",Space,Str "awesome."]]
+[ BulletList
+ [ [ Para
+ [ Str "Pandoc"
+ , Space
+ , Str "is"
+ , Space
+ , Str "100%"
+ , Space
+ , Str "awesome."
+ ]
+ ]
+ ]
+, BulletList
+ [ [ Para
+ [ Str "Pandoc"
+ , Space
+ , Str "is"
+ , Space
+ , Str "200%"
+ , Space
+ , Str "awesome."
+ ]
+ ]
+ ]
+, Para
+ [ Str "Pandoc"
+ , Space
+ , Str "is"
+ , Space
+ , Str "300%"
+ , Space
+ , Str "awesome."
+ ]
+]
```
diff --git a/test/command/3792.md b/test/command/3792.md
index eff26d517..eb109b9cc 100644
--- a/test/command/3792.md
+++ b/test/command/3792.md
@@ -6,7 +6,7 @@ and properly escaped.
ok
^D
---
-title: \<this> \*that\*
+title: \<this\> \*that\*
---
ok
diff --git a/test/command/3794.md b/test/command/3794.md
index b56e7b504..974b7dbe4 100644
--- a/test/command/3794.md
+++ b/test/command/3794.md
@@ -2,6 +2,5 @@
% pandoc -f html -t native
<div><p>hello</div>
^D
-[Div ("",[],[])
- [Para [Str "hello"]]]
+[ Div ( "" , [] , [] ) [ Para [ Str "hello" ] ] ]
```
diff --git a/test/command/3804.md b/test/command/3804.md
index 520d408df..6637b23c7 100644
--- a/test/command/3804.md
+++ b/test/command/3804.md
@@ -2,5 +2,8 @@
% pandoc -t native
\titleformat{\chapter}[display]{\normalfont\large\bfseries}{第\thechapter{}章}{20pt}{\Huge}
^D
-[RawBlock (Format "tex") "\\titleformat{\\chapter}[display]{\\normalfont\\large\\bfseries}{\31532\\thechapter{}\31456}{20pt}{\\Huge}"]
+[ RawBlock
+ (Format "tex")
+ "\\titleformat{\\chapter}[display]{\\normalfont\\large\\bfseries}{\31532\\thechapter{}\31456}{20pt}{\\Huge}"
+]
```
diff --git a/test/command/3840.md b/test/command/3840.md
index ceb1d1e51..a0dd314d3 100644
--- a/test/command/3840.md
+++ b/test/command/3840.md
@@ -2,7 +2,8 @@
% pandoc
[@Alhazen1572-qk, V.9]: "competentius est"
^D
-<p><span class="citation" data-cites="Alhazen1572-qk">[@Alhazen1572-qk, V.9]</span>: “competentius est”</p>
+<p><span class="citation" data-cites="Alhazen1572-qk">[@Alhazen1572-qk,
+V.9]</span>: “competentius est”</p>
```
```
diff --git a/test/command/3853.md b/test/command/3853.md
index 19e8e2260..caf21ed54 100644
--- a/test/command/3853.md
+++ b/test/command/3853.md
@@ -20,7 +20,9 @@ more
hello \iftoggle{ebook}{ebook}{noebook}
^D
-[Para [Str "ebook",SoftBreak,Str "more"]
-,Para [Str "not",Space,Str "ebook",SoftBreak,Str "more"]
-,Para [Str "hello",Space,Str "noebook"]]
+[ Para [ Str "ebook" , SoftBreak , Str "more" ]
+, Para
+ [ Str "not" , Space , Str "ebook" , SoftBreak , Str "more" ]
+, Para [ Str "hello" , Space , Str "noebook" ]
+]
```
diff --git a/test/command/3880.md b/test/command/3880.md
index b8edaf08f..ff68c6c8a 100644
--- a/test/command/3880.md
+++ b/test/command/3880.md
@@ -1,6 +1,6 @@
```
-pandoc -f rst -t native
+% pandoc -f rst -t native
.. include:: command/3880.txt
^D
-[Para [Str "hi"]]
+[ Para [ Str "hi" ] ]
```
diff --git a/test/command/3916.md b/test/command/3916.md
index 9ac0834d7..8775ae7f6 100644
--- a/test/command/3916.md
+++ b/test/command/3916.md
@@ -4,8 +4,12 @@
<pre>blabla</pre>
# more
^D
-[OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "text",Space,Str "text"]
- ,CodeBlock ("",[],[]) "blabla"]
- ,[Plain [Str "more"]]]]
+[ OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "text" , Space , Str "text" ]
+ , CodeBlock ( "" , [] , [] ) "blabla"
+ ]
+ , [ Plain [ Str "more" ] ]
+ ]
+]
```
diff --git a/test/command/3947.md b/test/command/3947.md
index b1d695fbd..68118a9da 100644
--- a/test/command/3947.md
+++ b/test/command/3947.md
@@ -6,6 +6,8 @@
Another Code block
^D
-[RawBlock (Format "tex") "\\newpage"
-,CodeBlock ("",[],[]) "Code block\n\nAnother Code block"]
+[ RawBlock (Format "tex") "\\newpage"
+, CodeBlock
+ ( "" , [] , [] ) "Code block\n\nAnother Code block"
+]
```
diff --git a/test/command/3958.md b/test/command/3958.md
index 1793dd05c..eccf632c4 100644
--- a/test/command/3958.md
+++ b/test/command/3958.md
@@ -2,19 +2,19 @@
% pandoc -f latex -t native
\texttt{"hi"}
^D
-[Para [Code ("",[],[]) "\"hi\""]]
+[ Para [ Code ( "" , [] , [] ) "\"hi\"" ] ]
```
```
% pandoc -f latex -t native
\texttt{``hi''}
^D
-[Para [Code ("",[],[]) "\8220hi\8221"]]
+[ Para [ Code ( "" , [] , [] ) "\8220hi\8221" ] ]
```
```
% pandoc -f latex -t native
\texttt{`hi'}
^D
-[Para [Code ("",[],[]) "\8216hi\8217"]]
+[ Para [ Code ( "" , [] , [] ) "\8216hi\8217" ] ]
```
diff --git a/test/command/3971.md b/test/command/3971.md
index 533540743..b051caed3 100644
--- a/test/command/3971.md
+++ b/test/command/3971.md
@@ -5,5 +5,5 @@
\code{f}
\end{document}
^D
-[Para [Code ("",[],[]) "f"]]
+[ Para [ Code ( "" , [] , [] ) "f" ] ]
```
diff --git a/test/command/3983.md b/test/command/3983.md
index 5d83941e7..82c1deef0 100644
--- a/test/command/3983.md
+++ b/test/command/3983.md
@@ -1,29 +1,31 @@
```
-pandoc -f latex+raw_tex -t native
+% pandoc -f latex+raw_tex -t native
\def\filename@area{foo:bar:baz}
\makeatletter
\graphicspath\expandafter{\expandafter{\filename@area}}%
\makeatother
^D
-[RawBlock (Format "latex") "\\makeatletter"
-,RawBlock (Format "latex") "\\makeatother"]
+[ RawBlock (Format "latex") "\\makeatletter"
+, RawBlock (Format "latex") "\\makeatother"
+]
```
```
-pandoc -f latex+raw_tex -t native
+% pandoc -f latex+raw_tex -t native
\makeatletter
\newcommand\urlfootnote@[1]{\footnote{\url@{#1}}}
\DeclareRobustCommand{\urlfootnote}{\hyper@normalise\urlfootnote@}
\makeatother
^D
-[RawBlock (Format "latex") "\\makeatletter"
-,RawBlock (Format "latex") "\\makeatother"]
+[ RawBlock (Format "latex") "\\makeatletter"
+, RawBlock (Format "latex") "\\makeatother"
+]
```
```
-pandoc -f latex+raw_tex -t native
+% pandoc -f latex+raw_tex -t native
\def\foo{bar}
\expandafter\bam\foo
^D
-[RawBlock (Format "latex") "\\bambar"]
+[ RawBlock (Format "latex") "\\bambar" ]
```
diff --git a/test/command/3989.md b/test/command/3989.md
index bf078b2e4..647aa355a 100644
--- a/test/command/3989.md
+++ b/test/command/3989.md
@@ -1,7 +1,22 @@
```
-pandoc -f markdown -t native
+% pandoc -f markdown -t native
<span title="1st line of text <br> 2nd line of text">foo</span>
<span title="1st line of text <br> 2nd line of text">foo</span>
^D
-[Para [Span ("",[],[("title","1st line of text <br> 2nd line of text")]) [Str "foo"],SoftBreak,Span ("",[],[("title","1st line of text <br> 2nd line of text")]) [Str "foo"]]]
+[ Para
+ [ Span
+ ( ""
+ , []
+ , [ ( "title" , "1st line of text <br> 2nd line of text" ) ]
+ )
+ [ Str "foo" ]
+ , SoftBreak
+ , Span
+ ( ""
+ , []
+ , [ ( "title" , "1st line of text <br> 2nd line of text" ) ]
+ )
+ [ Str "foo" ]
+ ]
+]
```
diff --git a/test/command/4007.md b/test/command/4007.md
index c6064e0f2..974a88ab9 100644
--- a/test/command/4007.md
+++ b/test/command/4007.md
@@ -1,23 +1,23 @@
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
\newcommand\arrow\to
$a\arrow b$
^D
-[Para [Math InlineMath "a\\to b"]]
+[ Para [ Math InlineMath "a\\to b" ] ]
```
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
\newcommand\pfeil[1]{\to #1}
$a\pfeil b$
^D
-[Para [Math InlineMath "a\\to b"]]
+[ Para [ Math InlineMath "a\\to b" ] ]
```
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
\newcommand\fleche{\to}
$a\fleche b$
^D
-[Para [Math InlineMath "a\\to b"]]
+[ Para [ Math InlineMath "a\\to b" ] ]
```
diff --git a/test/command/4012.md b/test/command/4012.md
index 602c23219..26e971d4e 100644
--- a/test/command/4012.md
+++ b/test/command/4012.md
@@ -1,8 +1,9 @@
```
-pandoc -f markdown-implicit_figures
+% pandoc -f markdown-implicit_figures
![image]
[image]: http://example.com/image.jpg {height=35mm}
^D
-<p><img src="http://example.com/image.jpg" style="height:35mm" alt="image" /></p>
+<p><img src="http://example.com/image.jpg" style="height:35mm"
+alt="image" /></p>
```
diff --git a/test/command/4016.md b/test/command/4016.md
index 577ac1b09..8683c0056 100644
--- a/test/command/4016.md
+++ b/test/command/4016.md
@@ -1,5 +1,5 @@
```
-pandoc -t beamer
+% pandoc -t beamer
# Level 2 blocks
<div class="columns">
diff --git a/test/command/4019.md b/test/command/4019.md
index ab13f0233..641905b54 100644
--- a/test/command/4019.md
+++ b/test/command/4019.md
@@ -1,5 +1,5 @@
```
-pandoc --wrap=preserve
+% pandoc --wrap=preserve
This <!-- x > 0 --> works!
This <!-- x > 0 --> fails?
^D
diff --git a/test/command/4054.md b/test/command/4054.md
index 3689773c4..81c6e4012 100644
--- a/test/command/4054.md
+++ b/test/command/4054.md
@@ -2,13 +2,20 @@
% pandoc -t native -s -M title=New
% Old
^D
-Pandoc (Meta {unMeta = fromList [("title",MetaString "New")]})
-[]
+Pandoc
+ Meta
+ { unMeta = fromList [ ( "title" , MetaString "New" ) ] }
+ []
```
```
% pandoc -t native -s -M foo=1 -M foo=2
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaList [MetaString "1",MetaString "2"])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "foo" , MetaList [ MetaString "1" , MetaString "2" ] ) ]
+ }
+ []
```
diff --git a/test/command/4056.md b/test/command/4056.md
index 2f5111aeb..c270d25ca 100644
--- a/test/command/4056.md
+++ b/test/command/4056.md
@@ -5,7 +5,10 @@
\end{shaded}
}
^D
-[RawBlock (Format "tex") "\\parbox[t]{0.4\\textwidth}{\n\\begin{shaded}\n\\end{shaded}\n}"]
+[ RawBlock
+ (Format "tex")
+ "\\parbox[t]{0.4\\textwidth}{\n\\begin{shaded}\n\\end{shaded}\n}"
+]
```
```
@@ -14,22 +17,41 @@
Blah & Foo & Bar \\
\end{tabular}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Blah"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Foo"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bar"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Blah" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Foo" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Bar" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/4063.md b/test/command/4063.md
index 838472b46..29aeae854 100644
--- a/test/command/4063.md
+++ b/test/command/4063.md
@@ -11,19 +11,34 @@
</tr>
</table>
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.3)
- ,(AlignDefault,ColWidth 0.7)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.3 )
+ , ( AlignDefault , ColWidth 0.7 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/4068.md b/test/command/4068.md
index 7b43a7084..83527a6fd 100644
--- a/test/command/4068.md
+++ b/test/command/4068.md
@@ -1,9 +1,33 @@
```
-pandoc -f mediawiki -t native
+% pandoc -f mediawiki -t native
[https://domain.com/script.php?a=1&b=2&c=&d=4 open productname bugs]
[http://domain.com?a=. open productname bugs]
^D
-[Para [Link ("",[],[]) [Str "open",Space,Str "productname",Space,Str "bugs"] ("https://domain.com/script.php?a=1&b=2&c=&d=4","")]
-,Para [Str "[",Link ("",[],[]) [Str "http://domain.com?a="] ("http://domain.com?a=",""),Str ".",Space,Str "open",Space,Str "productname",Space,Str "bugs]"]]
+[ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "open"
+ , Space
+ , Str "productname"
+ , Space
+ , Str "bugs"
+ ]
+ ( "https://domain.com/script.php?a=1&b=2&c=&d=4" , "" )
+ ]
+, Para
+ [ Str "["
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com?a=" ]
+ ( "http://domain.com?a=" , "" )
+ , Str "."
+ , Space
+ , Str "open"
+ , Space
+ , Str "productname"
+ , Space
+ , Str "bugs]"
+ ]
+]
```
diff --git a/test/command/4119.md b/test/command/4119.md
index c4efac30f..fcbf79386 100644
--- a/test/command/4119.md
+++ b/test/command/4119.md
@@ -1,5 +1,5 @@
```
-pandoc -t native
+% pandoc -t native
| col1 | col2 |
| ---- | ---- |
| 1 | 2 |
@@ -8,25 +8,56 @@ pandoc -t native
not a caption!
::::::::::::::::
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col2"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]]])]
- (TableFoot ("",[],[])
- [])
-,Div ("",["notes"],[])
- [Para [Str "not",Space,Str "a",Space,Str "caption!"]]]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col2" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Div
+ ( "" , [ "notes" ] , [] )
+ [ Para
+ [ Str "not" , Space , Str "a" , Space , Str "caption!" ]
+ ]
+]
```
diff --git a/test/command/4134.md b/test/command/4134.md
index b5473d948..195d85129 100644
--- a/test/command/4134.md
+++ b/test/command/4134.md
@@ -3,7 +3,7 @@
Hello.\
world.
^D
-[Para [Str "Hello.\160world."]]
+[ Para [ Str "Hello.\160world." ] ]
```
```
@@ -11,7 +11,7 @@ world.
Hello.\
world.
^D
-[Para [Str "Hello.\160world."]]
+[ Para [ Str "Hello.\160world." ] ]
```
```
@@ -20,6 +20,5 @@ Hello.\
World.
^D
-[Para [Str "Hello.\160"]
-,Para [Str "World."]]
+[ Para [ Str "Hello.\160" ] , Para [ Str "World." ] ]
```
diff --git a/test/command/4159.md b/test/command/4159.md
index d61959950..bea4632c9 100644
--- a/test/command/4159.md
+++ b/test/command/4159.md
@@ -3,6 +3,7 @@
\newcommand{\gen}{a\ Gen\ b}
abc
^D
-[RawBlock (Format "tex") "\\newcommand{\\gen}{a\\ Gen\\ b}"
-,Para [Str "abc"]]
+[ RawBlock (Format "tex") "\\newcommand{\\gen}{a\\ Gen\\ b}"
+, Para [ Str "abc" ]
+]
```
diff --git a/test/command/4162.md b/test/command/4162.md
index d88e1ec4e..85b48dbdf 100644
--- a/test/command/4162.md
+++ b/test/command/4162.md
@@ -3,8 +3,5 @@
<div class="line-block">hi<br /><br>
 there</div>
^D
-[LineBlock
- [[Str "hi"]
- ,[]
- ,[Str "\160there"]]]
+[ LineBlock [ [ Str "hi" ] , [] , [ Str "\160there" ] ] ]
```
diff --git a/test/command/4164.md b/test/command/4164.md
index 68cbd0584..4e7b7e285 100644
--- a/test/command/4164.md
+++ b/test/command/4164.md
@@ -26,6 +26,6 @@ Here is inline html:
Here is inline html:
-\<div> \<balise> bla bla \</div>
+\<div\> \<balise\> bla bla \</div\>
```
diff --git a/test/command/4183.md b/test/command/4183.md
index c18320882..8d6c65a01 100644
--- a/test/command/4183.md
+++ b/test/command/4183.md
@@ -4,7 +4,7 @@
<img src="foo" alt="bar">
</figure>
^D
-[Para [Image ("",[],[]) [] ("foo","fig:")]]
+[ Para [ Image ( "" , [] , [] ) [] ( "foo" , "fig:" ) ] ]
```
```
@@ -18,7 +18,9 @@
</figcaption>
</figure>
^D
-[Para [Image ("",[],[]) [Str "baz"] ("foo","fig:")]]
+[ Para
+ [ Image ( "" , [] , [] ) [ Str "baz" ] ( "foo" , "fig:" ) ]
+]
```
```
@@ -28,5 +30,9 @@
<figcaption><p><em>baz</em></p></figcaption>
</figure>
^D
-[Para [Image ("",[],[]) [Emph [Str "baz"]] ("foo","fig:")]]
+[ Para
+ [ Image
+ ( "" , [] , [] ) [ Emph [ Str "baz" ] ] ( "foo" , "fig:" )
+ ]
+]
```
diff --git a/test/command/4186.md b/test/command/4186.md
index 8c0d04a31..b2a2bd6e9 100644
--- a/test/command/4186.md
+++ b/test/command/4186.md
@@ -4,7 +4,10 @@
This should retain the four leading spaces
#+end_example
^D
-[CodeBlock ("",["example"],[]) " This should retain the four leading spaces\n"]
+[ CodeBlock
+ ( "" , [ "example" ] , [] )
+ " This should retain the four leading spaces\n"
+]
```
```
@@ -54,7 +57,8 @@ Outside all lists.
</ul>
<pre id="carrie" class="example"><code>This belongs to the outer list element, and is aligned accordingly, since the NAME attribute is not indented deeply enough. It is not enough for the BEGIN alone to be aligned deeply if the block is meant to have a NAME.
</code></pre>
-<p>Still in the shallower list element since the preceding example block forced the deeper list element to terminate.</p></li>
+<p>Still in the shallower list element since the preceding example block
+forced the deeper list element to terminate.</p></li>
</ul>
<p>Outside all lists.</p>
```
diff --git a/test/command/4193.md b/test/command/4193.md
index 44c7d70cc..67ca5a4f7 100644
--- a/test/command/4193.md
+++ b/test/command/4193.md
@@ -4,7 +4,7 @@
a
- b
^D
-[BulletList
- [[Plain [Str "a"]]
- ,[Plain [Str "b"]]]]
+[ BulletList
+ [ [ Plain [ Str "a" ] ] , [ Plain [ Str "b" ] ] ]
+]
```
diff --git a/test/command/4199.md b/test/command/4199.md
index 49d2bdbcb..36385bc2a 100644
--- a/test/command/4199.md
+++ b/test/command/4199.md
@@ -2,5 +2,8 @@
% pandoc -f latex -t native
\foreignlanguage{ngerman}{foo}
^D
-[Para [Span ("",[],[("lang","de-DE")]) [Str "foo"]]]
+[ Para
+ [ Span ( "" , [] , [ ( "lang" , "de-DE" ) ] ) [ Str "foo" ]
+ ]
+]
```
diff --git a/test/command/4235.md b/test/command/4235.md
index 8bbf43ff9..5b534b6d7 100644
--- a/test/command/4235.md
+++ b/test/command/4235.md
@@ -2,11 +2,15 @@
% pandoc --id-prefix=foo
This.^[Has a footnote.]
^D
-<p>This.<a href="#foofn1" class="footnote-ref" id="foofnref1" role="doc-noteref"><sup>1</sup></a></p>
-<section class="footnotes" role="doc-endnotes">
+<p>This.<a href="#foofn1" class="footnote-ref" id="foofnref1"
+role="doc-noteref"><sup>1</sup></a></p>
+<section class="footnotes footnotes-end-of-document"
+role="doc-endnotes">
<hr />
<ol>
-<li id="foofn1" role="doc-endnote"><p>Has a footnote.<a href="#foofnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
+<li id="foofn1" role="doc-endnote"><p>Has a footnote.<a
+href="#foofnref1" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
```
diff --git a/test/command/4240.md b/test/command/4240.md
index 39a7d2adf..49585438a 100644
--- a/test/command/4240.md
+++ b/test/command/4240.md
@@ -25,9 +25,20 @@ header3
header4
~~~~~~~
^D
-Pandoc (Meta {unMeta = fromList [("subtitle",MetaInlines [Str "Subtitle"]),("title",MetaInlines [Str "Title"])]})
-[Header 1 ("header1",[],[]) [Str "header1"]
-,Header 2 ("header2",[],[]) [Str "header2"]
-,Header 3 ("id",[],[]) [Str "header3"]
-,Header 3 ("id3",[],[]) [Str "header4",Span ("id2",[],[]) []]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "subtitle" , MetaInlines [ Str "Subtitle" ] )
+ , ( "title" , MetaInlines [ Str "Title" ] )
+ ]
+ }
+ [ Header 1 ( "header1" , [] , [] ) [ Str "header1" ]
+ , Header 2 ( "header2" , [] , [] ) [ Str "header2" ]
+ , Header 3 ( "id" , [] , [] ) [ Str "header3" ]
+ , Header
+ 3
+ ( "id3" , [] , [] )
+ [ Str "header4" , Span ( "id2" , [] , [] ) [] ]
+ ]
```
diff --git a/test/command/4253.md b/test/command/4253.md
index 01f5eea86..2c994a9fc 100644
--- a/test/command/4253.md
+++ b/test/command/4253.md
@@ -4,5 +4,5 @@
\noop{\newcommand{\foo}[1]{#1}}
\foo{hi}
^D
-[Para [Str "hi"]]
+[ Para [ Str "hi" ] ]
```
diff --git a/test/command/4280.md b/test/command/4280.md
index 6a89b5e63..343a2ab07 100644
--- a/test/command/4280.md
+++ b/test/command/4280.md
@@ -3,5 +3,5 @@
Driver
------
^D
-[Header 1 ("driver",[],[]) [Str "Driver"]]
+[ Header 1 ( "driver" , [] , [] ) [ Str "Driver" ] ]
```
diff --git a/test/command/4281.md b/test/command/4281.md
index 9806e8178..53943e503 100644
--- a/test/command/4281.md
+++ b/test/command/4281.md
@@ -9,10 +9,13 @@
:::
::::
^D
-[Div ("",["a"],[])
- [BulletList
- [[Div ("",["b"],[])
- [Para [Str "text"]]
- ,Div ("",["c"],[])
- [Para [Str "text"]]]]]]
+[ Div
+ ( "" , [ "a" ] , [] )
+ [ BulletList
+ [ [ Div ( "" , [ "b" ] , [] ) [ Para [ Str "text" ] ]
+ , Div ( "" , [ "c" ] , [] ) [ Para [ Str "text" ] ]
+ ]
+ ]
+ ]
+]
```
diff --git a/test/command/4284.md b/test/command/4284.md
index eddd1b03a..0308f521f 100644
--- a/test/command/4284.md
+++ b/test/command/4284.md
@@ -8,7 +8,34 @@
** Children of headers with excluded tags should not appear :xylophone:
* This should not appear :%:
^D
-[Header 1 ("noexport-should-appear-if-not-specified-in-excludetags",[],[]) [Str "NOEXPORT",Space,Str "should",Space,Str "appear",Space,Str "if",Space,Str "not",Space,Str "specified",Space,Str "in",Space,Str "EXCLUDE",Subscript [Str "TAGS"],Space,Span ("",["tag"],[("tag-name","noexport")]) [SmallCaps [Str "noexport"]]]]
+[ Header
+ 1
+ ( "noexport-should-appear-if-not-specified-in-excludetags"
+ , []
+ , []
+ )
+ [ Str "NOEXPORT"
+ , Space
+ , Str "should"
+ , Space
+ , Str "appear"
+ , Space
+ , Str "if"
+ , Space
+ , Str "not"
+ , Space
+ , Str "specified"
+ , Space
+ , Str "in"
+ , Space
+ , Str "EXCLUDE"
+ , Subscript [ Str "TAGS" ]
+ , Space
+ , Span
+ ( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )
+ [ SmallCaps [ Str "noexport" ] ]
+ ]
+]
```
```
@@ -17,7 +44,20 @@
* This should not appear :elephant:
* This should appear :fawn:
^D
-[Header 1 ("this-should-appear",[],[]) [Str "This",Space,Str "should",Space,Str "appear",Space,Span ("",["tag"],[("tag-name","fawn")]) [SmallCaps [Str "fawn"]]]]
+[ Header
+ 1
+ ( "this-should-appear" , [] , [] )
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "appear"
+ , Space
+ , Span
+ ( "" , [ "tag" ] , [ ( "tag-name" , "fawn" ) ] )
+ [ SmallCaps [ Str "fawn" ] ]
+ ]
+]
```
```
@@ -28,7 +68,20 @@
* This should not appear :hippo:
* This should appear :noexport:
^D
-[Header 1 ("this-should-appear",[],[]) [Str "This",Space,Str "should",Space,Str "appear",Space,Span ("",["tag"],[("tag-name","noexport")]) [SmallCaps [Str "noexport"]]]]
+[ Header
+ 1
+ ( "this-should-appear" , [] , [] )
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "appear"
+ , Space
+ , Span
+ ( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )
+ [ SmallCaps [ Str "noexport" ] ]
+ ]
+]
```
```
@@ -36,5 +89,32 @@
#+EXCLUDE_TAGS:
* NOEXPORT should appear if not specified in EXCLUDE_TAGS :noexport:
^D
-[Header 1 ("noexport-should-appear-if-not-specified-in-excludetags",[],[]) [Str "NOEXPORT",Space,Str "should",Space,Str "appear",Space,Str "if",Space,Str "not",Space,Str "specified",Space,Str "in",Space,Str "EXCLUDE",Subscript [Str "TAGS"],Space,Span ("",["tag"],[("tag-name","noexport")]) [SmallCaps [Str "noexport"]]]]
+[ Header
+ 1
+ ( "noexport-should-appear-if-not-specified-in-excludetags"
+ , []
+ , []
+ )
+ [ Str "NOEXPORT"
+ , Space
+ , Str "should"
+ , Space
+ , Str "appear"
+ , Space
+ , Str "if"
+ , Space
+ , Str "not"
+ , Space
+ , Str "specified"
+ , Space
+ , Str "in"
+ , Space
+ , Str "EXCLUDE"
+ , Subscript [ Str "TAGS" ]
+ , Space
+ , Span
+ ( "" , [ "tag" ] , [ ( "tag-name" , "noexport" ) ] )
+ [ SmallCaps [ Str "noexport" ] ]
+ ]
+]
```
diff --git a/test/command/4306.md b/test/command/4306.md
index f1267eb9b..dcb90e312 100644
--- a/test/command/4306.md
+++ b/test/command/4306.md
@@ -1,10 +1,22 @@
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
\documentclass{article}
\usepackage{hyperref}
\begin{document}
The file id is \nolinkurl{ESP_123_5235}.
\end{document}
^D
-[Para [Str "The",Space,Str "file",Space,Str "id",Space,Str "is",Space,Code ("",[],[]) "ESP_123_5235",Str "."]]
+[ Para
+ [ Str "The"
+ , Space
+ , Str "file"
+ , Space
+ , Str "id"
+ , Space
+ , Str "is"
+ , Space
+ , Code ( "" , [] , [] ) "ESP_123_5235"
+ , Str "."
+ ]
+]
```
diff --git a/test/command/4374.md b/test/command/4374.md
index 296c116a9..4a0990fff 100644
--- a/test/command/4374.md
+++ b/test/command/4374.md
@@ -3,5 +3,18 @@
\cite{a%
}
^D
-[Para [Cite [Citation {citationId = "a", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite{a%\n}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "a"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline (Format "latex") "\\cite{a%\n}" ]
+ ]
+]
```
diff --git a/test/command/4382.md b/test/command/4382.md
index 4a840489f..847f4732e 100644
--- a/test/command/4382.md
+++ b/test/command/4382.md
@@ -4,7 +4,5 @@
=====
^D
-[BulletList
- [[]]
-,HorizontalRule]
+[ BulletList [ [] ] , HorizontalRule ]
```
diff --git a/test/command/4424.md b/test/command/4424.md
index b0b95510b..a1b38544b 100644
--- a/test/command/4424.md
+++ b/test/command/4424.md
@@ -6,5 +6,5 @@
Test
\end{document}
^D
-[Para [Str "Test"]]
+[ Para [ Str "Test" ] ]
```
diff --git a/test/command/4454.md b/test/command/4454.md
index db0b0a406..aeb62aabb 100644
--- a/test/command/4454.md
+++ b/test/command/4454.md
@@ -3,7 +3,7 @@
• a
• b
^D
-[BulletList
- [[Plain [Str "a"]]
- ,[Plain [Str "b"]]]]
+[ BulletList
+ [ [ Plain [ Str "a" ] ] , [ Plain [ Str "b" ] ] ]
+]
```
diff --git a/test/command/4499.md b/test/command/4499.md
index 073f76c0e..5e86d6ee4 100644
--- a/test/command/4499.md
+++ b/test/command/4499.md
@@ -9,7 +9,7 @@
% pandoc -f latex+raw_tex -t native
\mbox{abc def}
^D
-[Para [RawInline (Format "latex") "\\mbox{abc def}"]]
+[ Para [ RawInline (Format "latex") "\\mbox{abc def}" ] ]
```
```
@@ -53,7 +53,7 @@ mno} pqr
% pandoc -f latex+raw_tex -t native
\hbox{abc def}
^D
-[Para [RawInline (Format "latex") "\\hbox{abc def}"]]
+[ Para [ RawInline (Format "latex") "\\hbox{abc def}" ] ]
```
```
diff --git a/test/command/4513.md b/test/command/4513.md
index 88b0b672a..1f36d1958 100644
--- a/test/command/4513.md
+++ b/test/command/4513.md
@@ -2,19 +2,31 @@
% pandoc -f textile -t native
|_. heading 1 |_. heading 2|
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "heading",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "heading",Space,Str "2"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "heading" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "heading" , Space , Str "2" ] ]
+ ]
+ ])
+ [ TableBody ( "" , [] , [] ) (RowHeadColumns 0) [] [] ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/4528.md b/test/command/4528.md
index a34af33c5..80be1df2c 100644
--- a/test/command/4528.md
+++ b/test/command/4528.md
@@ -15,7 +15,6 @@ This has \textsc{small caps} in it.
^D
This has <span class="smallcaps">small caps</span> in it.
```
-```
```
% pandoc --wrap=none -f latex -t markdown_strict+raw_html
@@ -31,6 +30,7 @@ This has <span class="smallcaps">small caps</span> in it.
This has <s>strikeout</s> in it.
^D
This has strikeout in it.
+```
```
% pandoc --wrap=none -f html -t commonmark+raw_html-strikeout
diff --git a/test/command/4553.md b/test/command/4553.md
index e5122d4d9..0104a08a8 100644
--- a/test/command/4553.md
+++ b/test/command/4553.md
@@ -1,15 +1,21 @@
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
foo \include{command/bar}
^D
-[Para [Str "foo"]
-,Para [Emph [Str "hi",Space,Str "there"]]]
+[ Para [ Str "foo" ]
+, Para [ Emph [ Str "hi" , Space , Str "there" ] ]
+]
```
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
foo \input{command/bar}
^D
-[Para [Str "foo",Space,Emph [Str "hi",Space,Str "there"]]]
+[ Para
+ [ Str "foo"
+ , Space
+ , Emph [ Str "hi" , Space , Str "there" ]
+ ]
+]
```
diff --git a/test/command/4576.md b/test/command/4576.md
index 1c82b96eb..85322d463 100644
--- a/test/command/4576.md
+++ b/test/command/4576.md
@@ -2,5 +2,5 @@
% pandoc -f latex -t native
$\rho_\text{D$_2$O}=866$
^D
-[Para [Math InlineMath "\\rho_\\text{D$_2$O}=866"]]
+[ Para [ Math InlineMath "\\rho_\\text{D$_2$O}=866" ] ]
```
diff --git a/test/command/4579.md b/test/command/4579.md
index 8858f2351..353a4a514 100644
--- a/test/command/4579.md
+++ b/test/command/4579.md
@@ -8,23 +8,51 @@
* - spam
- ham
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Foo"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bar"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "spam"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "ham"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Foo" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Bar" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "spam" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "ham" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/4624.md b/test/command/4624.md
index f9aa45596..abbdf61f4 100644
--- a/test/command/4624.md
+++ b/test/command/4624.md
@@ -22,9 +22,12 @@ code4
\begin{verbatim}
code5\end{verbatim}
^D
-[CodeBlock ("",[],[("key1","value1")]) "code1\n"
-,CodeBlock ("",[],[("key2","value2")]) "code2\n "
-,CodeBlock ("",[],[]) "code3"
-,CodeBlock ("",[],[]) "code4"
-,CodeBlock ("",[],[]) "code5"]
+[ CodeBlock
+ ( "" , [] , [ ( "key1" , "value1" ) ] ) "code1\n"
+, CodeBlock
+ ( "" , [] , [ ( "key2" , "value2" ) ] ) "code2\n "
+, CodeBlock ( "" , [] , [] ) "code3"
+, CodeBlock ( "" , [] , [] ) "code4"
+, CodeBlock ( "" , [] , [] ) "code5"
+]
```
diff --git a/test/command/4635.md b/test/command/4635.md
index ad9af9c67..7acb08539 100644
--- a/test/command/4635.md
+++ b/test/command/4635.md
@@ -3,7 +3,7 @@
(cf.
foo)
^D
-[Para [Str "(cf.",SoftBreak,Str "foo)"]]
+[ Para [ Str "(cf." , SoftBreak , Str "foo)" ] ]
```
```
@@ -11,7 +11,9 @@ foo)
a (cf.
foo)
^D
-[Para [Str "a",Space,Str "(cf.",SoftBreak,Str "foo)"]]
+[ Para
+ [ Str "a" , Space , Str "(cf." , SoftBreak , Str "foo)" ]
+]
```
```
@@ -19,7 +21,7 @@ foo)
cf.
foo
^D
-[Para [Str "cf.",SoftBreak,Str "foo"]]
+[ Para [ Str "cf." , SoftBreak , Str "foo" ] ]
```
```
@@ -27,5 +29,7 @@ foo
a cf.
foo
^D
-[Para [Str "a",Space,Str "cf.",SoftBreak,Str "foo"]]
+[ Para
+ [ Str "a" , Space , Str "cf." , SoftBreak , Str "foo" ]
+]
```
diff --git a/test/command/4639.md b/test/command/4639.md
index c35df1749..31ac3a5d9 100644
--- a/test/command/4639.md
+++ b/test/command/4639.md
@@ -5,6 +5,6 @@
\end{equation}
^D
<p><span class="math display">\[\begin{equation}
- E=mc^2
+E=mc^2
\end{equation}\]</span></p>
```
diff --git a/test/command/4667.md b/test/command/4667.md
index 1fff3708d..a4ea0a5f4 100644
--- a/test/command/4667.md
+++ b/test/command/4667.md
@@ -1,5 +1,5 @@
```
-pandoc -t latex
+% pandoc -t latex
---
header-includes:
- \newcommand{\blandscape}{\begin{landscape}}
diff --git a/test/command/4669.md b/test/command/4669.md
index ade2ea0d8..41f6ae327 100644
--- a/test/command/4669.md
+++ b/test/command/4669.md
@@ -6,8 +6,10 @@
while (n > 0) {
\end{verbatim}
^D
-[Para [Span ("",[],[]) [Code ("",[],[]) "<-"]]
-,CodeBlock ("",[],[]) " while (n > 0) {"]
+[ Para
+ [ Span ( "" , [] , [] ) [ Code ( "" , [] , [] ) "<-" ] ]
+, CodeBlock ( "" , [] , [] ) " while (n > 0) {"
+]
```
```
@@ -20,10 +22,12 @@
\item<beamer:2> five
\end{itemize}
^D
-[BulletList
- [[Para [Str "one"]]
- ,[Para [Str "two"]]
- ,[Para [Str "three"]]
- ,[Para [Str "four"]]
- ,[Para [Str "five"]]]]
+[ BulletList
+ [ [ Para [ Str "one" ] ]
+ , [ Para [ Str "two" ] ]
+ , [ Para [ Str "three" ] ]
+ , [ Para [ Str "four" ] ]
+ , [ Para [ Str "five" ] ]
+ ]
+]
```
diff --git a/test/command/4677.md b/test/command/4677.md
index 2694624b9..64c436005 100644
--- a/test/command/4677.md
+++ b/test/command/4677.md
@@ -3,6 +3,7 @@
![Caption](img.png){#img:1}
^D
<figure>
-<img src="img.png" id="img:1" alt="Caption" /><figcaption aria-hidden="true">Caption</figcaption>
+<img src="img.png" id="img:1" alt="Caption" />
+<figcaption aria-hidden="true">Caption</figcaption>
</figure>
```
diff --git a/test/command/4715.md b/test/command/4715.md
index 50873c2b5..f6bf8736d 100644
--- a/test/command/4715.md
+++ b/test/command/4715.md
@@ -11,6 +11,21 @@
acquisizione-software.rst
riuso-software.rst
^D
-[Div ("tree1",["toctree","foo","bar"],[("caption","Indice dei contenuti"),("numbered",""),("maxdepth","3")])
- [Para [Str "premessa.rst",SoftBreak,Str "acquisizione-software.rst",SoftBreak,Str "riuso-software.rst"]]]
+[ Div
+ ( "tree1"
+ , [ "toctree" , "foo" , "bar" ]
+ , [ ( "caption" , "Indice dei contenuti" )
+ , ( "numbered" , "" )
+ , ( "maxdepth" , "3" )
+ ]
+ )
+ [ Para
+ [ Str "premessa.rst"
+ , SoftBreak
+ , Str "acquisizione-software.rst"
+ , SoftBreak
+ , Str "riuso-software.rst"
+ ]
+ ]
+]
```
diff --git a/test/command/4722.md b/test/command/4722.md
index 6c8c14716..2b2ceb640 100644
--- a/test/command/4722.md
+++ b/test/command/4722.md
@@ -6,14 +6,18 @@
***Level 3
*Level 1
^D
-[BulletList
- [[Plain [Str "Level",Space,Str "1"]]
- ,[Plain [Str "Level",Space,Str "1"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "2"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "3"]]]]]]
- ,[Plain [Str "Level",Space,Str "1"]]]]
+[ BulletList
+ [ [ Plain [ Str "Level" , Space , Str "1" ] ]
+ , [ Plain [ Str "Level" , Space , Str "1" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "2" ]
+ , BulletList [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Level" , Space , Str "1" ] ]
+ ]
+]
```
```
% pandoc -f tikiwiki -t native
@@ -23,12 +27,20 @@
###Level 3
#Level 1
^D
-[OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Level",Space,Str "1"]]
- ,[Plain [Str "Level",Space,Str "1"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Level",Space,Str "2"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Level",Space,Str "3"]]]]]]
- ,[Plain [Str "Level",Space,Str "1"]]]]
+[ OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Level" , Space , Str "1" ] ]
+ , [ Plain [ Str "Level" , Space , Str "1" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Level" , Space , Str "2" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Level" , Space , Str "1" ] ]
+ ]
+]
```
diff --git a/test/command/4742.md b/test/command/4742.md
index 7be9a6077..a91dffb33 100644
--- a/test/command/4742.md
+++ b/test/command/4742.md
@@ -5,7 +5,18 @@ extension properly.
% pandoc -f commonmark+gfm_auto_identifiers+ascii_identifiers -t native
# non ascii ⚠️ räksmörgås
^D
-[Header 1 ("non-ascii--raksmorgas",[],[]) [Str "non",Space,Str "ascii",Space,Str "\9888\65039",Space,Str "r\228ksm\246rg\229s"]]
+[ Header
+ 1
+ ( "non-ascii--raksmorgas" , [] , [] )
+ [ Str "non"
+ , Space
+ , Str "ascii"
+ , Space
+ , Str "\9888\65039"
+ , Space
+ , Str "r\228ksm\246rg\229s"
+ ]
+]
```
Note that the emoji here is actually a composite character,
@@ -16,7 +27,18 @@ so it survives...
% pandoc -f commonmark+gfm_auto_identifiers-ascii_identifiers -t native
# non ascii ⚠️ räksmörgås
^D
-[Header 1 ("non-ascii-\65039-r\228ksm\246rg\229s",[],[]) [Str "non",Space,Str "ascii",Space,Str "\9888\65039",Space,Str "r\228ksm\246rg\229s"]]
+[ Header
+ 1
+ ( "non-ascii-\65039-r\228ksm\246rg\229s" , [] , [] )
+ [ Str "non"
+ , Space
+ , Str "ascii"
+ , Space
+ , Str "\9888\65039"
+ , Space
+ , Str "r\228ksm\246rg\229s"
+ ]
+]
```
`gfm` should have `ascii_identifiers` disabled by default.
@@ -25,5 +47,16 @@ so it survives...
% pandoc -f gfm -t native
# non ascii ⚠️ räksmörgås
^D
-[Header 1 ("non-ascii-\65039-r\228ksm\246rg\229s",[],[]) [Str "non",Space,Str "ascii",Space,Str "\9888\65039",Space,Str "r\228ksm\246rg\229s"]]
+[ Header
+ 1
+ ( "non-ascii-\65039-r\228ksm\246rg\229s" , [] , [] )
+ [ Str "non"
+ , Space
+ , Str "ascii"
+ , Space
+ , Str "\9888\65039"
+ , Space
+ , Str "r\228ksm\246rg\229s"
+ ]
+]
```
diff --git a/test/command/4743.md b/test/command/4743.md
index 49b4b6d59..a75ec1078 100644
--- a/test/command/4743.md
+++ b/test/command/4743.md
@@ -4,14 +4,34 @@ Test that emojis are wrapped in Span
% pandoc -f commonmark+emoji -t native
My:thumbsup:emoji:heart:
^D
-[Para [Str "My",Span ("",["emoji"],[("data-emoji","thumbsup")]) [Str "\128077"],Str "emoji",Span ("",["emoji"],[("data-emoji","heart")]) [Str "\10084\65039"]]]
+[ Para
+ [ Str "My"
+ , Span
+ ( "" , [ "emoji" ] , [ ( "data-emoji" , "thumbsup" ) ] )
+ [ Str "\128077" ]
+ , Str "emoji"
+ , Span
+ ( "" , [ "emoji" ] , [ ( "data-emoji" , "heart" ) ] )
+ [ Str "\10084\65039" ]
+ ]
+]
```
```
% pandoc -f markdown+emoji -t native
My:thumbsup:emoji:heart:
^D
-[Para [Str "My",Span ("",["emoji"],[("data-emoji","thumbsup")]) [Str "\128077"],Str "emoji",Span ("",["emoji"],[("data-emoji","heart")]) [Str "\10084\65039"]]]
+[ Para
+ [ Str "My"
+ , Span
+ ( "" , [ "emoji" ] , [ ( "data-emoji" , "thumbsup" ) ] )
+ [ Str "\128077" ]
+ , Str "emoji"
+ , Span
+ ( "" , [ "emoji" ] , [ ( "data-emoji" , "heart" ) ] )
+ [ Str "\10084\65039" ]
+ ]
+]
```
```
@@ -21,5 +41,7 @@ My:thumbsup:emoji:heart:
My:thumbsup:emoji:heart:x :hearts: xyz
^D
<h1><span class="emoji" data-emoji="zero">0️⃣</span> header</h1>
-<p>My<span class="emoji" data-emoji="thumbsup">👍</span>emoji<span class="emoji" data-emoji="heart">❤️</span>x <span class="emoji" data-emoji="hearts">♥️</span> xyz</p>
+<p>My<span class="emoji" data-emoji="thumbsup">👍</span>emoji<span
+class="emoji" data-emoji="heart">❤️</span>x <span class="emoji"
+data-emoji="hearts">♥️</span> xyz</p>
```
diff --git a/test/command/4781.md b/test/command/4781.md
index 8a75e09a0..e240facf3 100644
--- a/test/command/4781.md
+++ b/test/command/4781.md
@@ -6,9 +6,19 @@ Markdown parsed *here*
*But not here*
^D
-[Para [Str "Markdown",Space,Str "parsed",Space,Emph [Str "here"]]
-,RawBlock (Format "tex") "\\include{command/bar}"
-,Para [Emph [Str "But",Space,Str "not",Space,Str "here"]]]
+[ Para
+ [ Str "Markdown"
+ , Space
+ , Str "parsed"
+ , Space
+ , Emph [ Str "here" ]
+ ]
+, RawBlock (Format "tex") "\\include{command/bar}"
+, Para
+ [ Emph
+ [ Str "But" , Space , Str "not" , Space , Str "here" ]
+ ]
+]
```
```
@@ -17,6 +27,14 @@ Markdown parsed *here*
*But not here*
^D
-[Para [Emph [Str "here"],Space,RawInline (Format "tex") "\\input{command/bar}"]
-,Para [Emph [Str "But",Space,Str "not",Space,Str "here"]]]
+[ Para
+ [ Emph [ Str "here" ]
+ , Space
+ , RawInline (Format "tex") "\\input{command/bar}"
+ ]
+, Para
+ [ Emph
+ [ Str "But" , Space , Str "not" , Space , Str "here" ]
+ ]
+]
```
diff --git a/test/command/4805-beamer-columns-alignment.md b/test/command/4805-beamer-columns-alignment.md
index bd1be0f20..d890730a8 100644
--- a/test/command/4805-beamer-columns-alignment.md
+++ b/test/command/4805-beamer-columns-alignment.md
@@ -1,5 +1,5 @@
```
-pandoc -t beamer
+% pandoc -t beamer
:::: { .columns }
::: { .column align=center }
:::
diff --git a/test/command/4811.md b/test/command/4811.md
index 81a60d78d..4c0b0faa9 100644
--- a/test/command/4811.md
+++ b/test/command/4811.md
@@ -6,8 +6,7 @@ No blank lines in inline interpreted roles:
blank`:myrole:
^D
-[Para [Str "`no"]
-,Para [Str "blank`:myrole:"]]
+[ Para [ Str "`no" ] , Para [ Str "blank`:myrole:" ] ]
```
Backslash escape behaves properly in interpreted roles:
@@ -18,8 +17,9 @@ Backslash escape behaves properly in interpreted roles:
`hi\ there`:code:
^D
-[Para [Superscript [Str "hithere"]]
-,Para [Code ("",[],[]) "hi\\ there"]]
+[ Para [ Superscript [ Str "hithere" ] ]
+, Para [ Code ( "" , [] , [] ) "hi\\ there" ]
+]
```
Backtick followed by alphanumeric doesn't end the span:
@@ -27,7 +27,12 @@ Backtick followed by alphanumeric doesn't end the span:
% pandoc -f rst -t native
`hi`there`:myrole:
^D
-[Para [Code ("",["interpreted-text"],[("role","myrole")]) "hi`there"]]
+[ Para
+ [ Code
+ ( "" , [ "interpreted-text" ] , [ ( "role" , "myrole" ) ] )
+ "hi`there"
+ ]
+]
```
Newline is okay, as long as not blank:
@@ -36,7 +41,12 @@ Newline is okay, as long as not blank:
`hi
there`:myrole:
^D
-[Para [Code ("",["interpreted-text"],[("role","myrole")]) "hi\nthere"]]
+[ Para
+ [ Code
+ ( "" , [ "interpreted-text" ] , [ ( "role" , "myrole" ) ] )
+ "hi\nthere"
+ ]
+]
```
Use span for title-reference:
@@ -44,5 +54,7 @@ Use span for title-reference:
% pandoc -f rst -t native
`default`
^D
-[Para [Span ("",["title-ref"],[]) [Str "default"]]]
+[ Para
+ [ Span ( "" , [ "title-ref" ] , [] ) [ Str "default" ] ]
+]
```
diff --git a/test/command/4817.md b/test/command/4817.md
index 7718e3b3a..84db64b5f 100644
--- a/test/command/4817.md
+++ b/test/command/4817.md
@@ -5,6 +5,17 @@ foo:
- bar: bam
...
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaList [MetaMap (fromList [("bar",MetaInlines [Str "bam"])])])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "foo"
+ , MetaList
+ [ MetaMap
+ (fromList [ ( "bar" , MetaInlines [ Str "bam" ] ) ])
+ ]
+ )
+ ]
+ }
+ []
```
diff --git a/test/command/4819.md b/test/command/4819.md
index 548583387..5caa5c6de 100644
--- a/test/command/4819.md
+++ b/test/command/4819.md
@@ -4,8 +4,11 @@
foo: 42
...
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaInlines [Str "42"])]})
-[]
+Pandoc
+ Meta
+ { unMeta = fromList [ ( "foo" , MetaInlines [ Str "42" ] ) ]
+ }
+ []
```
```
@@ -14,8 +17,8 @@ Pandoc (Meta {unMeta = fromList [("foo",MetaInlines [Str "42"])]})
foo: true
...
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaBool True)]})
-[]
+Pandoc
+ Meta { unMeta = fromList [ ( "foo" , MetaBool True ) ] } []
```
```
@@ -24,8 +27,8 @@ Pandoc (Meta {unMeta = fromList [("foo",MetaBool True)]})
foo: True
...
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaBool True)]})
-[]
+Pandoc
+ Meta { unMeta = fromList [ ( "foo" , MetaBool True ) ] } []
```
```
@@ -34,8 +37,9 @@ Pandoc (Meta {unMeta = fromList [("foo",MetaBool True)]})
foo: FALSE
...
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaBool False)]})
-[]
+Pandoc
+ Meta { unMeta = fromList [ ( "foo" , MetaBool False ) ] }
+ []
```
```
@@ -44,7 +48,8 @@ Pandoc (Meta {unMeta = fromList [("foo",MetaBool False)]})
foo: no
...
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaInlines [Str "no"])]})
-[]
+Pandoc
+ Meta { unMeta = fromList [ ( "foo" , MetaBool False ) ] }
+ []
```
diff --git a/test/command/4832.md b/test/command/4832.md
index 9ba40804c..ec636b2b7 100644
--- a/test/command/4832.md
+++ b/test/command/4832.md
@@ -2,20 +2,38 @@
% pandoc -f latex -t native
\url{http://example.com/foo%20bar.htm}
^D
-[Para [Link ("",[],[]) [Str "http://example.com/foo%20bar.htm"] ("http://example.com/foo%20bar.htm","")]]
+[ Para
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/foo%20bar.htm" ]
+ ( "http://example.com/foo%20bar.htm" , "" )
+ ]
+]
```
```
% pandoc -f latex -t native
\url{http://example.com/foo{bar}.htm}
^D
-[Para [Link ("",[],[]) [Str "http://example.com/foo{bar}.htm"] ("http://example.com/foo{bar}.htm","")]]
+[ Para
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/foo{bar}.htm" ]
+ ( "http://example.com/foo{bar}.htm" , "" )
+ ]
+]
```
```
% pandoc -f latex -t native
\href{http://example.com/foo%20bar}{Foobar}
^D
-[Para [Link ("",[],[]) [Str "Foobar"] ("http://example.com/foo%20bar","")]]
+[ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Foobar" ]
+ ( "http://example.com/foo%20bar" , "" )
+ ]
+]
```
diff --git a/test/command/4833.md b/test/command/4833.md
index 42001ec74..838fe1463 100644
--- a/test/command/4833.md
+++ b/test/command/4833.md
@@ -1,5 +1,5 @@
```
-pandoc -f native -t rst
+% pandoc -f native -t rst
[Div ("",["warning"],[])
[Div ("",["title"],[])
[Para [Str "Warning"]]
@@ -10,7 +10,7 @@ pandoc -f native -t rst
Hi
```
```
-pandoc -f native -t rst
+% pandoc -f native -t rst
[Div ("",["unknown"],[])
[Para [Str "Hi"]]]
^D
diff --git a/test/command/4842.md b/test/command/4842.md
index a311739b7..e78d31412 100644
--- a/test/command/4842.md
+++ b/test/command/4842.md
@@ -1,6 +1,6 @@
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
\l
^D
-[Para [Str "\322"]]
+[ Para [ Str "\322" ] ]
```
diff --git a/test/command/4845.md b/test/command/4845.md
index 093161ac7..10d11127b 100644
--- a/test/command/4845.md
+++ b/test/command/4845.md
@@ -2,5 +2,20 @@
% pandoc -f html -t native
x<a href="/foo"> leading trailing space </a>x
^D
-[Plain [Str "x",Space,Link ("",[],[]) [Str "leading",Space,Str "trailing",Space,Str "space"] ("/foo",""),Space,Str "x"]]
+[ Plain
+ [ Str "x"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "leading"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "space"
+ ]
+ ( "/foo" , "" )
+ , Space
+ , Str "x"
+ ]
+]
```
diff --git a/test/command/4848.md b/test/command/4848.md
index 2cd2bab34..c73699a3c 100644
--- a/test/command/4848.md
+++ b/test/command/4848.md
@@ -2,21 +2,31 @@
% pandoc -f latex -t native
\enquote*{hi}
^D
-[Para [Quoted SingleQuote [Str "hi"]]]
+[ Para [ Quoted SingleQuote [ Str "hi" ] ] ]
```
```
% pandoc -f latex -t native
\foreignquote{italian}{hi}
^D
-[Para [Quoted DoubleQuote [Span ("",[],[("lang","it")]) [Str "hi"]]]]
+[ Para
+ [ Quoted
+ DoubleQuote
+ [ Span ( "" , [] , [ ( "lang" , "it" ) ] ) [ Str "hi" ] ]
+ ]
+]
```
```
% pandoc -f latex -t native
\hyphenquote*{italian}{hi}
^D
-[Para [Quoted SingleQuote [Span ("",[],[("lang","it")]) [Str "hi"]]]]
+[ Para
+ [ Quoted
+ SingleQuote
+ [ Span ( "" , [] , [ ( "lang" , "it" ) ] ) [ Str "hi" ] ]
+ ]
+]
```
```
@@ -25,10 +35,13 @@ Lorem ipsum
\blockquote{dolor sit amet}
consectetuer.
^D
-[Para [Str "Lorem",Space,Str "ipsum"]
-,BlockQuote
- [Para [Str "dolor",Space,Str "sit",Space,Str "amet"]]
-,Para [Str "consectetuer."]]
+[ Para [ Str "Lorem" , Space , Str "ipsum" ]
+, BlockQuote
+ [ Para
+ [ Str "dolor" , Space , Str "sit" , Space , Str "amet" ]
+ ]
+, Para [ Str "consectetuer." ]
+]
```
```
@@ -37,11 +50,26 @@ Lorem ipsum
\blockcquote[198]{Knu86}{dolor sit amet}
consectetuer.
^D
-[Para [Str "Lorem",Space,Str "ipsum"]
-,BlockQuote
- [Para [Str "dolor",Space,Str "sit",Space,Str "amet"]
- ,Para [Cite [Citation {citationId = "Knu86", citationPrefix = [], citationSuffix = [Str "198"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] []]]
-,Para [Str "consectetuer."]]
+[ Para [ Str "Lorem" , Space , Str "ipsum" ]
+, BlockQuote
+ [ Para
+ [ Str "dolor" , Space , Str "sit" , Space , Str "amet" ]
+ , Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix = []
+ , citationSuffix = [ Str "198" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ []
+ ]
+ ]
+, Para [ Str "consectetuer." ]
+]
```
```
@@ -50,10 +78,15 @@ Lorem ipsum
\foreignblockquote{italian}{dolor sit amet}
consectetuer.
^D
-[Para [Str "Lorem",Space,Str "ipsum"]
-,BlockQuote
- [Div ("",[],[("lang","it")])
- [Para [Str "dolor",Space,Str "sit",Space,Str "amet"]]]
-,Para [Str "consectetuer."]]
+[ Para [ Str "Lorem" , Space , Str "ipsum" ]
+, BlockQuote
+ [ Div
+ ( "" , [] , [ ( "lang" , "it" ) ] )
+ [ Para
+ [ Str "dolor" , Space , Str "sit" , Space , Str "amet" ]
+ ]
+ ]
+, Para [ Str "consectetuer." ]
+]
```
diff --git a/test/command/4860.md b/test/command/4860.md
index 9198f68d7..65b6bf65f 100644
--- a/test/command/4860.md
+++ b/test/command/4860.md
@@ -5,5 +5,16 @@ This is broken_.
.. ***** REFERENCES FOLLOW *****
.. _broken: http://google.com
^D
-[Para [Str "This",Space,Str "is",Space,Link ("",[],[]) [Str "broken"] ("http://google.com",""),Str "."]]
+[ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "broken" ]
+ ( "http://google.com" , "" )
+ , Str "."
+ ]
+]
```
diff --git a/test/command/4877.md b/test/command/4877.md
index 070687345..ba8acd122 100644
--- a/test/command/4877.md
+++ b/test/command/4877.md
@@ -2,12 +2,14 @@
% pandoc -f html -t native
My <script type="math/tex">\mathcal{D}</script>
^D
-[Plain [Str "My",Space,Math InlineMath "\\mathcal{D}"]]
+[ Plain
+ [ Str "My" , Space , Math InlineMath "\\mathcal{D}" ]
+]
```
```
% pandoc -f html -t native
<script type="math/tex; mode=display">\mathcal{D}</script>
^D
-[Plain [Math DisplayMath "\\mathcal{D}"]]
+[ Plain [ Math DisplayMath "\\mathcal{D}" ] ]
```
diff --git a/test/command/4919.md b/test/command/4919.md
index 029d1beff..b8f153848 100644
--- a/test/command/4919.md
+++ b/test/command/4919.md
@@ -7,8 +7,11 @@
V = \frac{K}{r^2}
^D
-[Div ("tgtmath",[],[])
- [BlockQuote
- [Para [Math DisplayMath "V = \\frac{K}{r^2}"]]]]
+[ Div
+ ( "tgtmath" , [] , [] )
+ [ BlockQuote
+ [ Para [ Math DisplayMath "V = \\frac{K}{r^2}" ] ]
+ ]
+]
```
diff --git a/test/command/4928.md b/test/command/4928.md
index d1e2b6db7..86699aab5 100644
--- a/test/command/4928.md
+++ b/test/command/4928.md
@@ -2,47 +2,220 @@
% pandoc -f latex -t native
\cites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
-[Para [Cite [Citation {citationId = "Knu86", citationPrefix = [Str "Multiprenote",Space,Str "23"], citationSuffix = [Str "42"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "Nie72", citationPrefix = [], citationSuffix = [Str "65",Str ",",Space,Str "multipostnote"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix = [ Str "Multiprenote" , Space , Str "23" ]
+ , citationSuffix = [ Str "42" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "Nie72"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Str "65" , Str "," , Space , Str "multipostnote" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline
+ (Format "latex")
+ "\\cites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
+ ]
+ ]
+]
```
```
% pandoc -f latex -t native
\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}
^D
-[Para [Cite [Citation {citationId = "Knu86", citationPrefix = [Str "Multiprenote",Space,Str "23"], citationSuffix = [Str "42"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "Nie72", citationPrefix = [], citationSuffix = [Str "65"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix = [ Str "Multiprenote" , Space , Str "23" ]
+ , citationSuffix = [ Str "42" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "Nie72"
+ , citationPrefix = []
+ , citationSuffix = [ Str "65" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline
+ (Format "latex")
+ "\\cites(Multiprenote)()[23][42]{Knu86}[65]{Nie72}"
+ ]
+ ]
+]
```
```
% pandoc -f latex -t native
\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
-[Para [Cite [Citation {citationId = "Knu86", citationPrefix = [Str "23"], citationSuffix = [Str "42"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "Nie72", citationPrefix = [], citationSuffix = [Str "65",Str ",",Space,Str "multipostnote"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix = [ Str "23" ]
+ , citationSuffix = [ Str "42" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "Nie72"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Str "65" , Str "," , Space , Str "multipostnote" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline
+ (Format "latex")
+ "\\cites()(multipostnote)[23][42]{Knu86}[65]{Nie72}"
+ ]
+ ]
+]
```
```
% pandoc -f latex -t native
\cites()()[23][42]{Knu86}[65]{Nie72}
^D
-[Para [Cite [Citation {citationId = "Knu86", citationPrefix = [Str "23"], citationSuffix = [Str "42"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "Nie72", citationPrefix = [], citationSuffix = [Str "65"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cites()()[23][42]{Knu86}[65]{Nie72}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix = [ Str "23" ]
+ , citationSuffix = [ Str "42" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "Nie72"
+ , citationPrefix = []
+ , citationSuffix = [ Str "65" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline
+ (Format "latex") "\\cites()()[23][42]{Knu86}[65]{Nie72}"
+ ]
+ ]
+]
```
```
% pandoc -f latex -t native
\cites(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
-[Para [Cite [Citation {citationId = "Knu86", citationPrefix = [Str "23"], citationSuffix = [Str "42"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "Nie72", citationPrefix = [], citationSuffix = [Str "65",Str ",",Space,Str "multipostnote"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cites(multipostnote)[23][42]{Knu86}[65]{Nie72}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix = [ Str "23" ]
+ , citationSuffix = [ Str "42" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "Nie72"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Str "65" , Str "," , Space , Str "multipostnote" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline
+ (Format "latex")
+ "\\cites(multipostnote)[23][42]{Knu86}[65]{Nie72}"
+ ]
+ ]
+]
```
```
% pandoc -f latex -t native
\cites(Multiprenote)(multipostnote){Knu86}
^D
-[Para [Cite [Citation {citationId = "Knu86", citationPrefix = [Str "Multiprenote"], citationSuffix = [Str ",",Space,Str "multipostnote"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cites(Multiprenote)(multipostnote){Knu86}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix = [ Str "Multiprenote" ]
+ , citationSuffix = [ Str "," , Space , Str "multipostnote" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline
+ (Format "latex")
+ "\\cites(Multiprenote)(multipostnote){Knu86}"
+ ]
+ ]
+]
```
```
% pandoc -f latex -t native
\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}
^D
-[Para [Note [Para [Cite [Citation {citationId = "Knu86", citationPrefix = [Str "Multiprenote",Space,Str "23"], citationSuffix = [Str "42"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0},Citation {citationId = "Nie72", citationPrefix = [], citationSuffix = [Str "65",Str ",",Space,Str "multipostnote"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"],Str "."]]]]
+[ Para
+ [ Note
+ [ Para
+ [ Cite
+ [ Citation
+ { citationId = "Knu86"
+ , citationPrefix =
+ [ Str "Multiprenote" , Space , Str "23" ]
+ , citationSuffix = [ Str "42" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "Nie72"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Str "65"
+ , Str ","
+ , Space
+ , Str "multipostnote"
+ ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline
+ (Format "latex")
+ "\\footcites(Multiprenote)(multipostnote)[23][42]{Knu86}[65]{Nie72}"
+ ]
+ , Str "."
+ ]
+ ]
+ ]
+]
```
diff --git a/test/command/4933.md b/test/command/4933.md
index 4ab41e8a5..b8dedfa20 100644
--- a/test/command/4933.md
+++ b/test/command/4933.md
@@ -2,5 +2,9 @@
% pandoc -f latex -t native
\includegraphics{lalune}
^D
-[Para [Image ("",[],[]) [Str "image"] ("lalune.jpg","")]]
+[ Para
+ [ Image
+ ( "" , [] , [] ) [ Str "image" ] ( "lalune.jpg" , "" )
+ ]
+]
```
diff --git a/test/command/5014.md b/test/command/5014.md
index a3aae4151..8acc55750 100644
--- a/test/command/5014.md
+++ b/test/command/5014.md
@@ -13,18 +13,37 @@
</tbody>
</table>
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Name"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Accounts"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault ) ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Name" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Accounts" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/5050.md b/test/command/5050.md
index 9c8fa1655..735156105 100644
--- a/test/command/5050.md
+++ b/test/command/5050.md
@@ -1,5 +1,5 @@
```
-pandoc -t rst
+% pandoc -t rst
<unknown>
x
^D
diff --git a/test/command/5079.md b/test/command/5079.md
index a43c9840a..3eb0628c5 100644
--- a/test/command/5079.md
+++ b/test/command/5079.md
@@ -10,16 +10,26 @@
</tbody>
</table>
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault ) ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/5080.md b/test/command/5080.md
index c9e9a2971..2dfd0683a 100644
--- a/test/command/5080.md
+++ b/test/command/5080.md
@@ -1,12 +1,12 @@
```
-pandoc -t asciidoc
+% pandoc -t asciidoc
[foo *bar*]{.small .red key=val}
^D
[.small .red]#foo _bar_#
```
```
-pandoc -f html -t asciidoc
+% pandoc -f html -t asciidoc
<small>SMALL</small>
^D
[.small]#SMALL#
diff --git a/test/command/5099.md b/test/command/5099.md
index 19b067b79..d464f9c8a 100644
--- a/test/command/5099.md
+++ b/test/command/5099.md
@@ -2,12 +2,28 @@
% pandoc -t native
(@citation
^D
-[Para [Str "(",Cite [Citation {citationId = "citation", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 1, citationHash = 0}] [Str "@citation"]]]
+[ Para
+ [ Str "("
+ , Cite
+ [ Citation
+ { citationId = "citation"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "@citation" ]
+ ]
+]
```
```
% pandoc -t native
('asd')
^D
-[Para [Str "(",Quoted SingleQuote [Str "asd"],Str ")"]]
+[ Para
+ [ Str "(" , Quoted SingleQuote [ Str "asd" ] , Str ")" ]
+]
```
diff --git a/test/command/512.md b/test/command/512.md
index b95921309..21b3ea9a7 100644
--- a/test/command/512.md
+++ b/test/command/512.md
@@ -8,7 +8,8 @@
__ link1_
__ link2_
^D
-<p><a href="http://www.example.com/">click here</a> or <a href="http://johnmacfarlane.net/pandoc/">click here</a></p>
+<p><a href="http://www.example.com/">click here</a> or <a
+href="http://johnmacfarlane.net/pandoc/">click here</a></p>
```
Multiple indirection:
diff --git a/test/command/5121.md b/test/command/5121.md
index 1ee6bda77..f1b972fb4 100644
--- a/test/command/5121.md
+++ b/test/command/5121.md
@@ -5,7 +5,8 @@
## Header 2
^D
<figure>
-<img src="./my-figure.jpg" width="500" alt="My caption" /><figcaption aria-hidden="true">My caption</figcaption>
+<img src="./my-figure.jpg" width="500" alt="My caption" />
+<figcaption aria-hidden="true">My caption</figcaption>
</figure>
## Header 2
diff --git a/test/command/5128.md b/test/command/5128.md
index 35866547e..261cea507 100644
--- a/test/command/5128.md
+++ b/test/command/5128.md
@@ -1,5 +1,5 @@
```
-pandoc -f org -t rst --columns=78
+% pandoc -f org -t rst --columns=78
| Option | Meaning |
|--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| =<= | Left alignment, additional characters are added to the right (default for string). |
diff --git a/test/command/5178.md b/test/command/5178.md
index 856f86abc..1c39b5071 100644
--- a/test/command/5178.md
+++ b/test/command/5178.md
@@ -7,8 +7,8 @@
unsafePerformIO main
^D
#+begin_src haskell -n 42
- main = putStrLn "Hello World!"
- unsafePerformIO main
+main = putStrLn "Hello World!"
+unsafePerformIO main
#+end_src
```
@@ -22,8 +22,19 @@
(+ 2 2)
#+end_src
^D
-[CodeBlock ("",["commonlisp","numberLines"],[("org-language","lisp"),("startFrom","20")]) "(+ 1 1)\n"
-,CodeBlock ("",["commonlisp","numberLines","continuedSourceBlock"],[("org-language","lisp"),("startFrom","10")]) "(+ 2 2)\n"]
+[ CodeBlock
+ ( ""
+ , [ "commonlisp" , "numberLines" ]
+ , [ ( "org-language" , "lisp" ) , ( "startFrom" , "20" ) ]
+ )
+ "(+ 1 1)\n"
+, CodeBlock
+ ( ""
+ , [ "commonlisp" , "numberLines" , "continuedSourceBlock" ]
+ , [ ( "org-language" , "lisp" ) , ( "startFrom" , "10" ) ]
+ )
+ "(+ 2 2)\n"
+]
```
```
@@ -32,10 +43,10 @@
,CodeBlock ("",["commonlisp","numberLines","continuedSourceBlock"],[("org-language","lisp"),("startFrom","10")]) "(+ 2 2)\n"]
^D
#+begin_src lisp -n 20
- (+ 1 1)
+(+ 1 1)
#+end_src
#+begin_src lisp +n 10
- (+ 2 2)
+(+ 2 2)
#+end_src
```
diff --git a/test/command/5182.md b/test/command/5182.md
index dc30a12ce..5898f9edf 100644
--- a/test/command/5182.md
+++ b/test/command/5182.md
@@ -1,6 +1,9 @@
```
-pandoc -f rst -t native
+% pandoc -f rst -t native
.. include:: command/5182.txt
^D
-[CodeBlock ("",["python","numberLines"],[]) "def func(x):\n return y"]
+[ CodeBlock
+ ( "" , [ "python" , "numberLines" ] , [] )
+ "def func(x):\n return y"
+]
```
diff --git a/test/command/5271.md b/test/command/5271.md
index 910ea5888..5df3958ef 100644
--- a/test/command/5271.md
+++ b/test/command/5271.md
@@ -7,6 +7,35 @@ abstract: |
It consists of two paragraphs.
...
^D
-Pandoc (Meta {unMeta = fromList [("abstract",MetaBlocks [Para [Str "This",Space,Str "is",Space,Str "the",Space,Str "abstract."],Para [Str "It",Space,Str "consists",Space,Str "of",Space,Str "two",Space,Str "paragraphs."]])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "abstract"
+ , MetaBlocks
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "abstract."
+ ]
+ , Para
+ [ Str "It"
+ , Space
+ , Str "consists"
+ , Space
+ , Str "of"
+ , Space
+ , Str "two"
+ , Space
+ , Str "paragraphs."
+ ]
+ ]
+ )
+ ]
+ }
+ []
```
diff --git a/test/command/5285.md b/test/command/5285.md
index 6085ec1a9..6c5b7f987 100644
--- a/test/command/5285.md
+++ b/test/command/5285.md
@@ -7,11 +7,12 @@
- b
^D
-[BulletList
- [[Para [Str "a"]
- ,Para [Str "b"]]
- ,[Para [Str "a"]]
- ,[Para [Str "b"]]]]
+[ BulletList
+ [ [ Para [ Str "a" ] , Para [ Str "b" ] ]
+ , [ Para [ Str "a" ] ]
+ , [ Para [ Str "b" ] ]
+ ]
+]
```
```
@@ -23,10 +24,9 @@
> foo
^D
-[BulletList
- [[Para [Str "foo"]
- ,Para [Str "foo"]]
- ,[Para [Str "foo"]
- ,BlockQuote
- [Para [Str "foo"]]]]]
+[ BulletList
+ [ [ Para [ Str "foo" ] , Para [ Str "foo" ] ]
+ , [ Para [ Str "foo" ] , BlockQuote [ Para [ Str "foo" ] ] ]
+ ]
+]
```
diff --git a/test/command/5321.md b/test/command/5321.md
index 83404632a..975852482 100644
--- a/test/command/5321.md
+++ b/test/command/5321.md
@@ -7,7 +7,11 @@
<graphic xlink:href="foo.png" xlink:alt-text="baz" />
</fig>
^D
-[Para [Image ("fig-1",[],[]) [Str "bar"] ("foo.png","fig:")]]
+[ Para
+ [ Image
+ ( "fig-1" , [] , [] ) [ Str "bar" ] ( "foo.png" , "fig:" )
+ ]
+]
```
```
@@ -20,5 +24,11 @@
<graphic xlink:href="foo.png" xlink:alt-text="baz" />
</fig>
^D
-[Para [Image ("fig-1",[],[]) [Str "foo",LineBreak,Str "bar"] ("foo.png","fig:")]]
+[ Para
+ [ Image
+ ( "fig-1" , [] , [] )
+ [ Str "foo" , LineBreak , Str "bar" ]
+ ( "foo.png" , "fig:" )
+ ]
+]
```
diff --git a/test/command/5360.md b/test/command/5360.md
index 924c1ea28..2250ba9f9 100644
--- a/test/command/5360.md
+++ b/test/command/5360.md
@@ -8,12 +8,15 @@
</table>
:::
^D
-[Div ("",["foo"],[])
- [RawBlock (Format "html") "<table>"
- ,RawBlock (Format "html") "<tr>"
- ,RawBlock (Format "html") "<td>"
- ,Plain [Str "hi"]
- ,RawBlock (Format "html") "</td>"
- ,RawBlock (Format "html") "</tr>"
- ,RawBlock (Format "html") "</table>"]]
+[ Div
+ ( "" , [ "foo" ] , [] )
+ [ RawBlock (Format "html") "<table>"
+ , RawBlock (Format "html") "<tr>"
+ , RawBlock (Format "html") "<td>"
+ , Plain [ Str "hi" ]
+ , RawBlock (Format "html") "</td>"
+ , RawBlock (Format "html") "</tr>"
+ , RawBlock (Format "html") "</table>"
+ ]
+]
```
diff --git a/test/command/5367.md b/test/command/5367.md
index a67011c2f..427aab913 100644
--- a/test/command/5367.md
+++ b/test/command/5367.md
@@ -21,7 +21,7 @@ dolly[^5]
hello\footnote{doc footnote}
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{0.17}}@{}}
+ >{\centering\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{0.1667}}@{}}
\caption[Sample table.]{Sample table.\footnote{caption footnote}}\tabularnewline
\toprule
\begin{minipage}[b]{\linewidth}\centering
diff --git a/test/command/5368.md b/test/command/5368.md
index c755fde48..e8b54bf7b 100644
--- a/test/command/5368.md
+++ b/test/command/5368.md
@@ -12,12 +12,27 @@
Quux.
^D
-[OrderedList (1,Decimal,Period)
- [[Para [Str "foo"]
- ,Para [Image ("",[],[]) [Str "bar"] ("bar.png","fig:")]]
- ,[Para [Str "foo2"]
- ,Para [Image ("",[],[]) [Str "bar2"] ("bar2.png","fig:")]]
- ,[Para [Str "foo3"]
- ,Para [Image ("",[],[]) [Str "foo3"] ("foo3.png","fig:")]]]
-,Para [Str "Quux."]]
+[ OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "foo" ]
+ , Para
+ [ Image
+ ( "" , [] , [] ) [ Str "bar" ] ( "bar.png" , "fig:" )
+ ]
+ ]
+ , [ Para [ Str "foo2" ]
+ , Para
+ [ Image
+ ( "" , [] , [] ) [ Str "bar2" ] ( "bar2.png" , "fig:" )
+ ]
+ ]
+ , [ Para [ Str "foo3" ]
+ , Para
+ [ Image
+ ( "" , [] , [] ) [ Str "foo3" ] ( "foo3.png" , "fig:" )
+ ]
+ ]
+ ]
+, Para [ Str "Quux." ]
+]
```
diff --git a/test/command/5410.md b/test/command/5410.md
index fee90a1a4..752da51c5 100644
--- a/test/command/5410.md
+++ b/test/command/5410.md
@@ -3,5 +3,5 @@
.ie n \{\
'br\}
^D
-[Para [LineBreak]]
+[ Para [ LineBreak ] ]
```
diff --git a/test/command/5416.md b/test/command/5416.md
index 619f4223e..d97f9881e 100644
--- a/test/command/5416.md
+++ b/test/command/5416.md
@@ -2,12 +2,12 @@
% pandoc -f dokuwiki -t native
{
^D
-[Para [Str "{"]]
+[ Para [ Str "{" ] ]
```
```
% pandoc -f dokuwiki -t native
{{
^D
-[Para [Str "{{"]]
+[ Para [ Str "{{" ] ]
```
diff --git a/test/command/5540.md b/test/command/5540.md
index 802a88d9d..41239020e 100644
--- a/test/command/5540.md
+++ b/test/command/5540.md
@@ -4,5 +4,11 @@
Stay pure!
\end{lstlisting}
^D
-[CodeBlock ("",["myfunnylanguage"],[("language","myfunnylanguage")]) "Stay pure!"]
+[ CodeBlock
+ ( ""
+ , [ "myfunnylanguage" ]
+ , [ ( "language" , "myfunnylanguage" ) ]
+ )
+ "Stay pure!"
+]
```
diff --git a/test/command/5549.md b/test/command/5549.md
index fa030d921..49d6f168f 100644
--- a/test/command/5549.md
+++ b/test/command/5549.md
@@ -4,6 +4,5 @@
[]
^D
-[Header 2 ("section",[],[]) []
-,Para [Str "[]"]]
+[ Header 2 ( "section" , [] , [] ) [] , Para [ Str "[]" ] ]
```
diff --git a/test/command/5619.md b/test/command/5619.md
index 776d57acc..0f612ea67 100644
--- a/test/command/5619.md
+++ b/test/command/5619.md
@@ -6,5 +6,32 @@
The caption. Here's what piggybacking on caption would look like {#fig:1}
^D
-[Para [Image ("test",[],[("width","1in")]) [Str "The",Space,Str "caption.",Space,Str "Here's",Space,Str "what",Space,Str "piggybacking",Space,Str "on",Space,Str "caption",Space,Str "would",Space,Str "look",Space,Str "like",Space,Str "{#fig:1}"] ("img1.jpg","fig:")]]
+[ Para
+ [ Image
+ ( "test" , [] , [ ( "width" , "1in" ) ] )
+ [ Str "The"
+ , Space
+ , Str "caption."
+ , Space
+ , Str "Here's"
+ , Space
+ , Str "what"
+ , Space
+ , Str "piggybacking"
+ , Space
+ , Str "on"
+ , Space
+ , Str "caption"
+ , Space
+ , Str "would"
+ , Space
+ , Str "look"
+ , Space
+ , Str "like"
+ , Space
+ , Str "{#fig:1}"
+ ]
+ ( "img1.jpg" , "fig:" )
+ ]
+]
```
diff --git a/test/command/5627.md b/test/command/5627.md
index 9910e76c5..dde4c99d6 100644
--- a/test/command/5627.md
+++ b/test/command/5627.md
@@ -20,8 +20,10 @@ Something
<li>Two <code>--&gt;something&lt;!--</code></li>
<li>Three</li>
</ol>
-<div class="sourceCode" id="cb1"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>--&gt;<span class="co">&lt;!--&lt;script&gt;alert(&#39;Escaped!&#39;)&lt;/script&gt;</span></span></code></pre></div>
-<div class="sourceCode" id="cb2"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>Something</span></code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode
+html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>--&gt;<span class="co">&lt;!--&lt;script&gt;alert(&#39;Escaped!&#39;)&lt;/script&gt;</span></span></code></pre></div>
+<div class="sourceCode" id="cb2"><pre class="sourceCode
+html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>Something</span></code></pre></div>
```
```
@@ -46,8 +48,10 @@ Something
<li><code>--&gt;something&lt;!--</code></li>
<li>bye <code>--&gt;something else&lt;!--</code></li>
</ul>
-<div class="sourceCode" id="cb1"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>--&gt;<span class="co">&lt;!--&lt;script&gt;alert(&#39;Escaped!&#39;)&lt;/script&gt;</span></span></code></pre></div>
-<div class="sourceCode" id="cb2"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>Something</span></code></pre></div>
+<div class="sourceCode" id="cb1"><pre class="sourceCode
+html"><code class="sourceCode html"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>--&gt;<span class="co">&lt;!--&lt;script&gt;alert(&#39;Escaped!&#39;)&lt;/script&gt;</span></span></code></pre></div>
+<div class="sourceCode" id="cb2"><pre class="sourceCode
+html"><code class="sourceCode html"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>Something</span></code></pre></div>
```
```
diff --git a/test/command/5642.md b/test/command/5642.md
index cd60df812..120a88ada 100644
--- a/test/command/5642.md
+++ b/test/command/5642.md
@@ -3,6 +3,7 @@
![test](foo){aria-describedby="barbaz"}
^D
<figure>
-<img src="foo" aria-describedby="barbaz" alt="test" /><figcaption aria-hidden="true">test</figcaption>
+<img src="foo" aria-describedby="barbaz" alt="test" />
+<figcaption aria-hidden="true">test</figcaption>
</figure>
```
diff --git a/test/command/5650.md b/test/command/5650.md
index a2dd215bc..1e96aeaa4 100644
--- a/test/command/5650.md
+++ b/test/command/5650.md
@@ -5,7 +5,8 @@ a
b
```
^D
-<div class="sourceCode" id="foocb1"><pre class="sourceCode haskell"><code class="sourceCode haskell"><span id="foocb1-1"><a href="#foocb1-1" aria-hidden="true" tabindex="-1"></a>a</span>
+<div class="sourceCode" id="foocb1"><pre class="sourceCode
+haskell"><code class="sourceCode haskell"><span id="foocb1-1"><a href="#foocb1-1" aria-hidden="true" tabindex="-1"></a>a</span>
<span id="foocb1-2"><a href="#foocb1-2" aria-hidden="true" tabindex="-1"></a>b</span></code></pre></div>
````
@@ -16,7 +17,8 @@ a
b
```
^D
-<div class="sourceCode" id="foobar"><pre class="sourceCode haskell"><code class="sourceCode haskell"><span id="foobar-1"><a href="#foobar-1" aria-hidden="true" tabindex="-1"></a>a</span>
+<div class="sourceCode" id="foobar"><pre class="sourceCode
+haskell"><code class="sourceCode haskell"><span id="foobar-1"><a href="#foobar-1" aria-hidden="true" tabindex="-1"></a>a</span>
<span id="foobar-2"><a href="#foobar-2" aria-hidden="true" tabindex="-1"></a>b</span></code></pre></div>
````
diff --git a/test/command/5655.md b/test/command/5655.md
index 692009562..72ad46e5e 100644
--- a/test/command/5655.md
+++ b/test/command/5655.md
@@ -2,13 +2,19 @@
% pandoc --webtex
$T_n={n+1 \choose 2}$
^D
-<p><img style="vertical-align:middle" src="https://latex.codecogs.com/png.latex?%5Ctextstyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D" alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" class="math inline" /></p>
+<p><img style="vertical-align:middle"
+src="https://latex.codecogs.com/png.latex?%5Ctextstyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D"
+alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" class="math
+inline" /></p>
````
````
% pandoc --webtex
$$T_n={n+1 \choose 2}$$
^D
-<p><img style="vertical-align:middle" src="https://latex.codecogs.com/png.latex?%5Cdisplaystyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D" alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" class="math display" /></p>
+<p><img style="vertical-align:middle"
+src="https://latex.codecogs.com/png.latex?%5Cdisplaystyle%20T_n%3D%7Bn%2B1%20%5Cchoose%202%7D"
+alt="T_n={n+1 \choose 2}" title="T_n={n+1 \choose 2}" class="math
+display" /></p>
````
diff --git a/test/command/5682.md b/test/command/5682.md
index 6d3b9fa0c..3ce81afb8 100644
--- a/test/command/5682.md
+++ b/test/command/5682.md
@@ -3,6 +3,6 @@
\newcommand{\ittakestwo}[2][defaultone]{#2}
\ittakestwo[to]{tango}
^D
-[Para [Str "tango"]]
+[ Para [ Str "tango" ] ]
```
diff --git a/test/command/5686.md b/test/command/5686.md
index 1c18109c3..d669ae49b 100644
--- a/test/command/5686.md
+++ b/test/command/5686.md
@@ -4,6 +4,28 @@ FOO\t0BAR
This part does not make it to the html output.
^D
-[Para [Str "FOO",RawInline (Format "tex") "\\t0",Str "BAR"]
-,Para [Str "This",Space,Str "part",Space,Str "does",Space,Str "not",Space,Str "make",Space,Str "it",Space,Str "to",Space,Str "the",Space,Str "html",Space,Str "output."]]
+[ Para
+ [ Str "FOO" , RawInline (Format "tex") "\\t0" , Str "BAR" ]
+, Para
+ [ Str "This"
+ , Space
+ , Str "part"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "make"
+ , Space
+ , Str "it"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , Space
+ , Str "html"
+ , Space
+ , Str "output."
+ ]
+]
```
diff --git a/test/command/5700.md b/test/command/5700.md
index 64f99c862..eae3663e5 100644
--- a/test/command/5700.md
+++ b/test/command/5700.md
@@ -1,6 +1,39 @@
```
% pandoc -t native -s --metadata-file command/5700-metadata-file-1.yml --metadata-file command/5700-metadata-file-2.yml
^D
-Pandoc (Meta {unMeta = fromList [("desc",MetaInlines [Str "Both",Space,Str "of",Space,Str "these",Space,Str "files",Space,Str "should",Space,Str "be",Space,Str "loaded."]),("title",MetaInlines [Str "Multiple",Space,Str "metadata",Space,Str "files",Space,Str "test"])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "desc"
+ , MetaInlines
+ [ Str "Both"
+ , Space
+ , Str "of"
+ , Space
+ , Str "these"
+ , Space
+ , Str "files"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "loaded."
+ ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Multiple"
+ , Space
+ , Str "metadata"
+ , Space
+ , Str "files"
+ , Space
+ , Str "test"
+ ]
+ )
+ ]
+ }
+ []
```
diff --git a/test/command/5708.md b/test/command/5708.md
index e5ba72c69..e97edcf30 100644
--- a/test/command/5708.md
+++ b/test/command/5708.md
@@ -4,19 +4,34 @@
| 123456 | :math:`a + b` |
+--------+----------------+
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.125)
- ,(AlignDefault,ColWidth 0.2361111111111111)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123456"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "a + b"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.125 )
+ , ( AlignDefault , ColWidth 0.2361111111111111 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123456" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "a + b" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/5711.md b/test/command/5711.md
index 5758138f9..131173079 100644
--- a/test/command/5711.md
+++ b/test/command/5711.md
@@ -7,16 +7,26 @@
\end{tabular}
\end{document}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "d",LineBreak,Str "e"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault ) ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "d" , LineBreak , Str "e" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/5714.md b/test/command/5714.md
index 48e25c1a2..c874f1af7 100644
--- a/test/command/5714.md
+++ b/test/command/5714.md
@@ -6,8 +6,11 @@ b_
# hi _c
c
^D
-[Header 1 ("hi-_a",[],[]) [Str "hi",Space,Str "_a"]
-,Para [Str "b_"]
-,Header 1 ("hi-_c",[],[]) [Str "hi",Space,Str "_c"]
-,Para [Str "c"]]
+[ Header
+ 1 ( "hi-_a" , [] , [] ) [ Str "hi" , Space , Str "_a" ]
+, Para [ Str "b_" ]
+, Header
+ 1 ( "hi-_c" , [] , [] ) [ Str "hi" , Space , Str "_c" ]
+, Para [ Str "c" ]
+]
```
diff --git a/test/command/5753.md b/test/command/5753.md
index 6e761e4f6..686c8f495 100644
--- a/test/command/5753.md
+++ b/test/command/5753.md
@@ -10,6 +10,10 @@
end
^D
-[Para [Math DisplayMath "q_3\n+ 4",Math DisplayMath "- 5 +\nq_5"]
-,Para [Str "end"]]
+[ Para
+ [ Math DisplayMath "q_3\n+ 4"
+ , Math DisplayMath "- 5 +\nq_5"
+ ]
+, Para [ Str "end" ]
+]
```
diff --git a/test/command/5795.md b/test/command/5795.md
index 0d5154b4d..8271e1232 100644
--- a/test/command/5795.md
+++ b/test/command/5795.md
@@ -9,7 +9,12 @@
% pandoc -f html -t native
<dfn class="dfn" id="foo" title="bax"><span>foo</span></dfn>
^D
-[Plain [Span ("foo",["dfn","dfn"],[("title","bax")]) [Span ("",[],[]) [Str "foo"]]]]
+[ Plain
+ [ Span
+ ( "foo" , [ "dfn" , "dfn" ] , [ ( "title" , "bax" ) ] )
+ [ Span ( "" , [] , [] ) [ Str "foo" ] ]
+ ]
+]
```
```
diff --git a/test/command/5797.md b/test/command/5797.md
index 0509a341c..4be51c629 100644
--- a/test/command/5797.md
+++ b/test/command/5797.md
@@ -9,7 +9,7 @@
% pandoc -f html -t native
<mark>Ctrl-C</mark>
^D
-[Plain [Span ("",["mark"],[]) [Str "Ctrl-C"]]]
+[ Plain [ Span ( "" , [ "mark" ] , [] ) [ Str "Ctrl-C" ] ] ]
```
```
diff --git a/test/command/5805.md b/test/command/5805.md
index 8bfc75f2d..03c72bd75 100644
--- a/test/command/5805.md
+++ b/test/command/5805.md
@@ -9,7 +9,7 @@
% pandoc -f html -t native
<kbd>Ctrl-C</kbd>
^D
-[Plain [Span ("",["kbd"],[]) [Str "Ctrl-C"]]]
+[ Plain [ Span ( "" , [ "kbd" ] , [] ) [ Str "Ctrl-C" ] ] ]
```
```
diff --git a/test/command/5813.md b/test/command/5813.md
index 927a161ed..51f774524 100644
--- a/test/command/5813.md
+++ b/test/command/5813.md
@@ -2,5 +2,6 @@
% pandoc -f gfm
### Jekyll Plugins & Gems :gem:
^D
-<h3 id="jekyll-plugins--gems-gem">Jekyll Plugins &amp; Gems <span class="emoji" data-emoji="gem">💎</span></h3>
+<h3 id="jekyll-plugins--gems-gem">Jekyll Plugins &amp; Gems <span
+class="emoji" data-emoji="gem">💎</span></h3>
```
diff --git a/test/command/5845.md b/test/command/5845.md
index aa09b08e7..aac73cf47 100644
--- a/test/command/5845.md
+++ b/test/command/5845.md
@@ -2,7 +2,7 @@
% pandoc -t native
\parbox{1em}{#1}
^D
-[Para [Str "\\parbox{1em}{#1}"]]
+[ Para [ Str "\\parbox{1em}{#1}" ] ]
```
```
@@ -11,6 +11,15 @@
Hello World
^D
-[Para [Str "\\newcommand{",RawInline (Format "tex") "\\highlight",Str "}[1]{\\colorbox{yellow}{\\parbox{",RawInline (Format "tex") "\\dimexpr",RawInline (Format "tex") "\\linewidth-2",RawInline (Format "tex") "\\fboxsep",Str "}{#1}}"]
-,Para [Str "Hello",Space,Str "World"]]
+[ Para
+ [ Str "\\newcommand{"
+ , RawInline (Format "tex") "\\highlight"
+ , Str "}[1]{\\colorbox{yellow}{\\parbox{"
+ , RawInline (Format "tex") "\\dimexpr"
+ , RawInline (Format "tex") "\\linewidth-2"
+ , RawInline (Format "tex") "\\fboxsep"
+ , Str "}{#1}}"
+ ]
+, Para [ Str "Hello" , Space , Str "World" ]
+]
```
diff --git a/test/command/5878.md b/test/command/5878.md
index 9e0f6bde3..06ff29b76 100644
--- a/test/command/5878.md
+++ b/test/command/5878.md
@@ -3,5 +3,13 @@
Zozime^[],
Synésius^[]
^D
-[Para [Str "Zozime",Note [Para []],Str ",",SoftBreak,Str "Syn\233sius",Note [Para []]]]
+[ Para
+ [ Str "Zozime"
+ , Note [ Para [] ]
+ , Str ","
+ , SoftBreak
+ , Str "Syn\233sius"
+ , Note [ Para [] ]
+ ]
+]
```
diff --git a/test/command/5986.md b/test/command/5986.md
index ed8dd30c9..aaa1e6568 100644
--- a/test/command/5986.md
+++ b/test/command/5986.md
@@ -6,8 +6,9 @@
<p><span id="nav.xhtml"></span></p>
<nav epub:type="landmarks" id="landmarks" hidden="hidden">
<ol>
-<li><a href="text/title_page.xhtml">Title Page</a></li>
-<li><a href="#nav.xhtml#toc">Table of Contents</a></li>
+<li><a href="text/title_page.xhtml" class="titlepage">Title
+Page</a></li>
+<li><a href="#nav.xhtml#toc" class="toc">Table of Contents</a></li>
</ol>
</nav>
<p><span id="ch001.xhtml"></span></p>
diff --git a/test/command/6009.md b/test/command/6009.md
index ed6b46cbb..b2785dd36 100644
--- a/test/command/6009.md
+++ b/test/command/6009.md
@@ -9,10 +9,11 @@ x
y
^D
-[RawBlock (Format "html") "<tr>"
-,RawBlock (Format "html") "<td>"
-,RawBlock (Format "html") "</td>"
-,RawBlock (Format "html") "</tr>"
-,Para [Str "x"]
-,CodeBlock ("",[],[]) "y"]
+[ RawBlock (Format "html") "<tr>"
+, RawBlock (Format "html") "<td>"
+, RawBlock (Format "html") "</td>"
+, RawBlock (Format "html") "</tr>"
+, Para [ Str "x" ]
+, CodeBlock ( "" , [] , [] ) "y"
+]
```
diff --git a/test/command/6026.md b/test/command/6026.md
index 5e18a5f42..ae3bfb45c 100644
--- a/test/command/6026.md
+++ b/test/command/6026.md
@@ -4,8 +4,34 @@
@https://openreview.net/forum?id=HkwoSDPgg
^D
-[Para [Cite [Citation {citationId = "https://openreview.net/forum?id=HkwoSDPgg", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 1, citationHash = 0}] [Str "@https://openreview.net/forum?id=HkwoSDPgg"]]
-,Para [Cite [Citation {citationId = "https://openreview.net/forum?id", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 2, citationHash = 0}] [Str "@https://openreview.net/forum?id"],Str "=HkwoSDPgg"]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "https://openreview.net/forum?id=HkwoSDPgg"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "@https://openreview.net/forum?id=HkwoSDPgg" ]
+ ]
+, Para
+ [ Cite
+ [ Citation
+ { citationId = "https://openreview.net/forum?id"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 2
+ , citationHash = 0
+ }
+ ]
+ [ Str "@https://openreview.net/forum?id" ]
+ , Str "=HkwoSDPgg"
+ ]
+]
```
```
% pandoc -t markdown
diff --git a/test/command/6034.md b/test/command/6034.md
index af41f2d50..eb8999d11 100644
--- a/test/command/6034.md
+++ b/test/command/6034.md
@@ -7,5 +7,8 @@
\end{overpic}
\end{figure*}
^D
-[RawBlock (Format "latex") "\\begin{figure*}\n \\centering\n \\begin{overpic}{test_pic}\n \\put (70,80) {Caption}\n \\end{overpic}\n\\end{figure*}"]
+[ RawBlock
+ (Format "latex")
+ "\\begin{figure*}\n \\centering\n \\begin{overpic}{test_pic}\n \\put (70,80) {Caption}\n \\end{overpic}\n\\end{figure*}"
+]
```
diff --git a/test/command/6114.md b/test/command/6114.md
index e0f2d675b..83d2869bb 100644
--- a/test/command/6114.md
+++ b/test/command/6114.md
@@ -3,5 +3,11 @@
\includegraphics[width=.85\textwidth]%
{pic_M87star.pdf}
^D
-[Para [Image ("",[],[("width",".85\\textwidth")]) [Str "image"] ("pic_M87star.pdf","")]]
+[ Para
+ [ Image
+ ( "" , [] , [ ( "width" , ".85\\textwidth" ) ] )
+ [ Str "image" ]
+ ( "pic_M87star.pdf" , "" )
+ ]
+]
```
diff --git a/test/command/6137.md b/test/command/6137.md
index 9081f775f..a58b4876f 100644
--- a/test/command/6137.md
+++ b/test/command/6137.md
@@ -15,33 +15,143 @@ This reference to Figure \ref{fig:label} works fine.
\caption{A numbered caption, if I use pandoc-crossref.}\label{fig:label}
\end{figure}
^D
-[Para [Str "This",Space,Str "reference",Space,Str "to",Space,Str "Table",Space,Link ("",[],[("reference-type","ref"),("reference","tbl:label")]) [Str "1"] ("#tbl:label",""),Space,Str "doesn\8217t",Space,Str "work."]
-,Div ("tbl:label",[],[])
- [Table ("",[],[]) (Caption Nothing
- [Plain [Str "This",Space,Str "caption",Space,Str "has",Space,Str "no",Space,Str "number."]])
- [(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\8212\8212\8211"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\8212\8212\8211"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\8212\8212\8211"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\8212\8212\8211"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\8212\8212\8211"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\8212\8212\8211"]]]])]
- (TableFoot ("",[],[])
- [])]
-,Para [Str "This",Space,Str "reference",Space,Str "to",Space,Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:label")]) [Str "1"] ("#fig:label",""),Space,Str "works",Space,Str "fine."]
-,Para [Image ("fig:label",[],[("width","\\textwidth")]) [Str "A",Space,Str "numbered",Space,Str "caption,",Space,Str "if",Space,Str "I",Space,Str "use",Space,Str "pandoc-crossref."] ("example.png","fig:")]]
+[ Para
+ [ Str "This"
+ , Space
+ , Str "reference"
+ , Space
+ , Str "to"
+ , Space
+ , Str "Table"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "tbl:label" )
+ ]
+ )
+ [ Str "1" ]
+ ( "#tbl:label" , "" )
+ , Space
+ , Str "doesn\8217t"
+ , Space
+ , Str "work."
+ ]
+, Div
+ ( "tbl:label" , [] , [] )
+ [ Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "This"
+ , Space
+ , Str "caption"
+ , Space
+ , Str "has"
+ , Space
+ , Str "no"
+ , Space
+ , Str "number."
+ ]
+ ])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\8212\8212\8211" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\8212\8212\8211" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\8212\8212\8211" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\8212\8212\8211" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\8212\8212\8211" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\8212\8212\8211" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
+, Para
+ [ Str "This"
+ , Space
+ , Str "reference"
+ , Space
+ , Str "to"
+ , Space
+ , Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:label" )
+ ]
+ )
+ [ Str "1" ]
+ ( "#fig:label" , "" )
+ , Space
+ , Str "works"
+ , Space
+ , Str "fine."
+ ]
+, Para
+ [ Image
+ ( "fig:label" , [] , [ ( "width" , "\\textwidth" ) ] )
+ [ Str "A"
+ , Space
+ , Str "numbered"
+ , Space
+ , Str "caption,"
+ , Space
+ , Str "if"
+ , Space
+ , Str "I"
+ , Space
+ , Str "use"
+ , Space
+ , Str "pandoc-crossref."
+ ]
+ ( "example.png" , "fig:" )
+ ]
+]
```
diff --git a/test/command/6288.md b/test/command/6288.md
index 29aff0fb9..042e0a72e 100644
--- a/test/command/6288.md
+++ b/test/command/6288.md
@@ -4,5 +4,7 @@
<label>I</label><title>Introduction</title>
</sec>
^D
-[Header 1 ("",[],[]) [Str "I.",Space,Str "Introduction"]]
+[ Header
+ 1 ( "" , [] , [] ) [ Str "I." , Space , Str "Introduction" ]
+]
```
diff --git a/test/command/6324.md b/test/command/6324.md
index 0fe57ce65..51a22480c 100644
--- a/test/command/6324.md
+++ b/test/command/6324.md
@@ -12,6 +12,15 @@ Me
\maketitle
\end{document}
^D
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Me"]]),("title",MetaInlines [Str "Document",Space,Str "title"])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author" , MetaList [ MetaInlines [ Str "Me" ] ] )
+ , ( "title"
+ , MetaInlines [ Str "Document" , Space , Str "title" ]
+ )
+ ]
+ }
+ []
```
diff --git a/test/command/6658.md b/test/command/6658.md
index 96700c8fe..c4e5dbf3a 100644
--- a/test/command/6658.md
+++ b/test/command/6658.md
@@ -1,5 +1,5 @@
```
-pandoc -f latex -t html
+% pandoc -f latex -t html
\num{12345,67890}
\num{1+-2i}
diff --git a/test/command/6699.md b/test/command/6699.md
index 347e04577..6dfea4ded 100644
--- a/test/command/6699.md
+++ b/test/command/6699.md
@@ -7,7 +7,9 @@ title
text
^D
-[Header 1 ("title",["allowframebreaks"],[]) [Str "title"]
-,Para [Str "text"]]
+[ Header
+ 1 ( "title" , [ "allowframebreaks" ] , [] ) [ Str "title" ]
+, Para [ Str "text" ]
+]
```
diff --git a/test/command/6709.md b/test/command/6709.md
index d6d514552..419895000 100644
--- a/test/command/6709.md
+++ b/test/command/6709.md
@@ -7,5 +7,7 @@ if true; then
fi
```
^D
-[CodeBlock ("",[],[]) "if true; then\n echo \"yup\"\nfi"]
+[ CodeBlock
+ ( "" , [] , [] ) "if true; then\n echo \"yup\"\nfi"
+]
````
diff --git a/test/command/6719.md b/test/command/6719.md
index 788e7b617..23701c066 100644
--- a/test/command/6719.md
+++ b/test/command/6719.md
@@ -4,7 +4,7 @@
<emphasis>emphasized </emphasis>text
</para>
^D
-[Para [Emph [Str "emphasized"],Space,Str "text"]]
+[ Para [ Emph [ Str "emphasized" ] , Space , Str "text" ] ]
```
```
@@ -13,6 +13,6 @@
<italic> hi </italic>there
</p>
^D
-[Para [Emph [Str "hi"],Space,Str "there"]]
+[ Para [ Emph [ Str "hi" ] , Space , Str "there" ] ]
```
diff --git a/test/command/6739.md b/test/command/6739.md
index 7c9ed24a2..ff2d4bc75 100644
--- a/test/command/6739.md
+++ b/test/command/6739.md
@@ -4,7 +4,8 @@
* `--argA | --argB` This item has a pipe character
^D
<ul>
-<li><code>--argument</code> This item does not have a pipe character</li>
+<li><code>--argument</code> This item does not have a pipe
+character</li>
<li><code>--argA | --argB</code> This item has a pipe character</li>
</ul>
```
diff --git a/test/command/6741.md b/test/command/6741.md
index 5fcc0700e..7764055a1 100644
--- a/test/command/6741.md
+++ b/test/command/6741.md
@@ -35,13 +35,13 @@ references:
type: article-journal
- author:
- family: Suzuki
- given: Y
+ given: Y.
- family: Minami
- given: T
+ given: T.
- family: Laeng
- given: B
+ given: B.
- family: Nakauchi
- given: S
+ given: S.
container-title: Acta Psychologica
DOI: 10.1016/j.actpsy.2019.102882
id: suzuki2019
diff --git a/test/command/6791.md b/test/command/6791.md
index 478647721..c35c04eb3 100644
--- a/test/command/6791.md
+++ b/test/command/6791.md
@@ -14,19 +14,34 @@
</tgroup>
</informaltable>
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.25)
- ,(AlignDefault,ColWidth 0.25)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.25 )
+ , ( AlignDefault , ColWidth 0.25 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/6792.md b/test/command/6792.md
index 3d31942fe..253009d46 100644
--- a/test/command/6792.md
+++ b/test/command/6792.md
@@ -22,7 +22,7 @@
<style:font-face style:name="Courier New" style:font-family-generic="modern" style:font-pitch="fixed" svg:font-family="'Courier New'" />
</office:font-face-decls>
<office:automatic-styles>
- <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:wrap="none" /></style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:wrap="none" /></style:style>
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" /></style:style>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" />
diff --git a/test/command/6802.md b/test/command/6802.md
index 8f56f0e43..5e66c1d1b 100644
--- a/test/command/6802.md
+++ b/test/command/6802.md
@@ -2,8 +2,7 @@
% pandoc -f latex -t native
\blockquote[test][]{quote}
^D
-[BlockQuote
- [Para [Str "quote"]
- ,Para [Str "test"]]]
+[ BlockQuote [ Para [ Str "quote" ] , Para [ Str "test" ] ]
+]
```
diff --git a/test/command/6836.md b/test/command/6836.md
index c35048045..b8e668a62 100644
--- a/test/command/6836.md
+++ b/test/command/6836.md
@@ -1,5 +1,5 @@
```
-pandoc -t native
+% pandoc -t native
[@buchanan]
(@foo)
@@ -8,10 +8,34 @@ See @foo.
[@buchanan]
^D
-[Para [Cite [Citation {citationId = "buchanan", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 1, citationHash = 0}] [Str "[@buchanan]"]]
-,OrderedList (1,Example,TwoParens)
- [[]]
-,Para [Str "See",Space,Str "1."]
-,Para [Cite [Citation {citationId = "buchanan", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 2, citationHash = 0}] [Str "[@buchanan]"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "buchanan"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@buchanan]" ]
+ ]
+, OrderedList ( 1 , Example , TwoParens ) [ [] ]
+, Para [ Str "See" , Space , Str "1." ]
+, Para
+ [ Cite
+ [ Citation
+ { citationId = "buchanan"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 2
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@buchanan]" ]
+ ]
+]
```
diff --git a/test/command/6844.md b/test/command/6844.md
index 0431cfed8..e7af336a3 100644
--- a/test/command/6844.md
+++ b/test/command/6844.md
@@ -5,7 +5,7 @@ Negative numbers with siunitx
\SI{123}{\celsius}
^D
-[Para [Str "123\160\176C"]]
+[ Para [ Str "123\160\176C" ] ]
```
```
@@ -13,7 +13,7 @@ Negative numbers with siunitx
\SI{-123}{\celsius}
^D
-[Para [Str "\8722\&123\160\176C"]]
+[ Para [ Str "\8722\&123\160\176C" ] ]
```
```
@@ -21,7 +21,7 @@ Negative numbers with siunitx
\SI{+123}{\celsius}
^D
-[Para [Str "123\160\176C"]]
+[ Para [ Str "123\160\176C" ] ]
```
diff --git a/test/command/6869.md b/test/command/6869.md
index cd8ff9ff4..cbef00f68 100644
--- a/test/command/6869.md
+++ b/test/command/6869.md
@@ -2,5 +2,18 @@
% pandoc -f latex -t native
\cite[„Aber“]{key}
^D
-[Para [Cite [Citation {citationId = "key", citationPrefix = [], citationSuffix = [Str "\8222Aber\8220"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite[\8222Aber\8220]{key}"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "key"
+ , citationPrefix = []
+ , citationSuffix = [ Str "\8222Aber\8220" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline (Format "latex") "\\cite[\8222Aber\8220]{key}" ]
+ ]
+]
```
diff --git a/test/command/6873.md b/test/command/6873.md
index d747a47ff..20667d64c 100644
--- a/test/command/6873.md
+++ b/test/command/6873.md
@@ -3,5 +3,33 @@
\cite[„Etwas […{]} auslassen“]{key}
^D
[WARNING] Citeproc: citation key not found
-[Para [Cite [Citation {citationId = "key", citationPrefix = [], citationSuffix = [Str "\8222Etwas",Space,Str "[\8230",Span ("",[],[]) [Str "]"],Space,Str "auslassen\8220"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [Str "(",Strong [Str "key?"],Str "\8222Etwas",Space,Str "[\8230",Span ("",[],[]) [Str "]"],Space,Str "auslassen\8220)"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "key"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Str "\8222Etwas"
+ , Space
+ , Str "[\8230"
+ , Span ( "" , [] , [] ) [ Str "]" ]
+ , Space
+ , Str "auslassen\8220"
+ ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ Str "("
+ , Strong [ Str "key?" ]
+ , Str "\8222Etwas"
+ , Space
+ , Str "[\8230"
+ , Span ( "" , [] , [] ) [ Str "]" ]
+ , Space
+ , Str "auslassen\8220)"
+ ]
+ ]
+]
```
diff --git a/test/command/6890.md b/test/command/6890.md
index e36c12771..579342980 100644
--- a/test/command/6890.md
+++ b/test/command/6890.md
@@ -27,10 +27,116 @@ Some text.[^1]
[^1]: @fruchtel-sozialer-2013a
^D
-[Para [Cite [Citation {citationId = "fruchtel-sozialer-2013a", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 1, citationHash = 0}] [Str "Fr\252chtel,",Space,Str "Budde,",Space,Str "and",Space,Str "Cyprian",Space,Str "(2013)"]]
-,Para [Str "Some",Space,Str "text.",Note [Para [Cite [Citation {citationId = "fruchtel-sozialer-2013a", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 2, citationHash = 0}] [Str "Fr\252chtel,",Space,Str "Budde,",Space,Str "and",Space,Str "Cyprian",Space,Str "(2013)"]]]]
-,Div ("refs",["references","csl-bib-body","hanging-indent"],[])
- [Div ("ref-fruchtel-sozialer-2013a",["csl-entry"],[])
- [Para [Str "Fr\252chtel,",Space,Str "Frank,",Space,Str "Wolfgang",Space,Str "Budde,",Space,Str "and",Space,Str "Gudrun",Space,Str "Cyprian.",Space,Str "2013.",Space,Emph [Str "Sozialer",Space,Str "Raum",Space,Str "und",Space,Str "Soziale",Space,Str "Arbeit",Space,Str "Fieldbook:",Space,Str "Methoden",Space,Str "und",Space,Str "Techniken"],Str ".",Space,Str "3rd",Space,Str "ed.",Space,Str "Wiesbaden,",Space,Str "Germany:",Space,Str "Springer",Space,Str "VS."]]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "fruchtel-sozialer-2013a"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "Fr\252chtel,"
+ , Space
+ , Str "Budde,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Cyprian"
+ , Space
+ , Str "(2013)"
+ ]
+ ]
+, Para
+ [ Str "Some"
+ , Space
+ , Str "text."
+ , Note
+ [ Para
+ [ Cite
+ [ Citation
+ { citationId = "fruchtel-sozialer-2013a"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 2
+ , citationHash = 0
+ }
+ ]
+ [ Str "Fr\252chtel,"
+ , Space
+ , Str "Budde,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Cyprian"
+ , Space
+ , Str "(2013)"
+ ]
+ ]
+ ]
+ ]
+, Div
+ ( "refs"
+ , [ "references" , "csl-bib-body" , "hanging-indent" ]
+ , []
+ )
+ [ Div
+ ( "ref-fruchtel-sozialer-2013a" , [ "csl-entry" ] , [] )
+ [ Para
+ [ Str "Fr\252chtel,"
+ , Space
+ , Str "Frank,"
+ , Space
+ , Str "Wolfgang"
+ , Space
+ , Str "Budde,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Gudrun"
+ , Space
+ , Str "Cyprian."
+ , Space
+ , Str "2013."
+ , Space
+ , Emph
+ [ Str "Sozialer"
+ , Space
+ , Str "Raum"
+ , Space
+ , Str "und"
+ , Space
+ , Str "Soziale"
+ , Space
+ , Str "Arbeit"
+ , Space
+ , Str "Fieldbook:"
+ , Space
+ , Str "Methoden"
+ , Space
+ , Str "und"
+ , Space
+ , Str "Techniken"
+ ]
+ , Str "."
+ , Space
+ , Str "3rd"
+ , Space
+ , Str "ed."
+ , Space
+ , Str "Wiesbaden,"
+ , Space
+ , Str "Germany:"
+ , Space
+ , Str "Springer"
+ , Space
+ , Str "VS."
+ ]
+ ]
+ ]
+]
```
diff --git a/test/command/6970.md b/test/command/6970.md
new file mode 100644
index 000000000..45d9b76bd
--- /dev/null
+++ b/test/command/6970.md
@@ -0,0 +1,12 @@
+```
+% pandoc -f html -t native
+<a name="foo" class="bar baz" href='https://example.com' target='_blank'>https://example.com<a>
+^D
+[ Plain
+ [ Link
+ ( "foo" , [ "bar" , "baz" ] , [ ( "target" , "_blank" ) ] )
+ [ Str "https://example.com" ]
+ ( "https://example.com" , "" )
+ ]
+]
+```
diff --git a/test/command/6993.md b/test/command/6993.md
index b7f7f5384..d2baa2748 100644
--- a/test/command/6993.md
+++ b/test/command/6993.md
@@ -2,20 +2,32 @@
% pandoc -f mediawiki -t native
'''Should be bold '''
^D
-[Para [Strong [Str "Should",Space,Str "be",Space,Str "bold"]]]
+[ Para
+ [ Strong
+ [ Str "Should" , Space , Str "be" , Space , Str "bold" ]
+ ]
+]
```
```
% pandoc -f mediawiki -t native
''' Should be bold'''
^D
-[Para [Strong [Str "Should",Space,Str "be",Space,Str "bold"]]]
+[ Para
+ [ Strong
+ [ Str "Should" , Space , Str "be" , Space , Str "bold" ]
+ ]
+]
```
```
% pandoc -f mediawiki -t native
'' Should be emph ''
^D
-[Para [Emph [Str "Should",Space,Str "be",Space,Str "emph"]]]
+[ Para
+ [ Emph
+ [ Str "Should" , Space , Str "be" , Space , Str "emph" ]
+ ]
+]
```
diff --git a/test/command/7003.md b/test/command/7003.md
index 1f6275943..5f88a58a6 100644
--- a/test/command/7003.md
+++ b/test/command/7003.md
@@ -30,8 +30,29 @@ This a Foo section
\lstinputlisting{example.tex}
\end{document}
^D
-[Header 1 ("with-lstlisting-environment",[],[]) [Str "With",Space,Str "lstlisting",Space,Str "environment"]
-,CodeBlock ("",[],[]) "\\documentclass{article}\n\\begin{document}\n\\section{Foo}\nThis a Foo section\n\\end{document}"
-,Header 1 ("with-lstinputlisting-command",[],[]) [Str "With",Space,Str "lstinputlisting",Space,Str "command"]
-,CodeBlock ("",["latex"],[]) "\\documentclass{article}\n\\begin{document}\n\\section{Bar}\nThis a Bar section\n\\end{document}"]
+[ Header
+ 1
+ ( "with-lstlisting-environment" , [] , [] )
+ [ Str "With"
+ , Space
+ , Str "lstlisting"
+ , Space
+ , Str "environment"
+ ]
+, CodeBlock
+ ( "" , [] , [] )
+ "\\documentclass{article}\n\\begin{document}\n\\section{Foo}\nThis a Foo section\n\\end{document}"
+, Header
+ 1
+ ( "with-lstinputlisting-command" , [] , [] )
+ [ Str "With"
+ , Space
+ , Str "lstinputlisting"
+ , Space
+ , Str "command"
+ ]
+, CodeBlock
+ ( "" , [ "latex" ] , [] )
+ "\\documentclass{article}\n\\begin{document}\n\\section{Bar}\nThis a Bar section\n\\end{document}"
+]
```
diff --git a/test/command/7006.md b/test/command/7006.md
index e7951fb1a..22aaf84ad 100644
--- a/test/command/7006.md
+++ b/test/command/7006.md
@@ -6,13 +6,16 @@ Test.[^fn]
![Caption.](/image.jpg)
^D
-<p>Test.<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
-<section class="footnotes" role="doc-endnotes">
+<p>Test.<a href="#fn1" class="footnote-ref" id="fnref1"
+role="doc-noteref"><sup>1</sup></a></p>
+<section class="footnotes footnotes-end-of-document"
+role="doc-endnotes">
<hr />
<ol>
<li id="fn1" role="doc-endnote"><p>Foo:</p>
<figure>
-<img src="/image.jpg" alt="Caption." /><figcaption aria-hidden="true">Caption.</figcaption>
+<img src="/image.jpg" alt="Caption." />
+<figcaption aria-hidden="true">Caption.</figcaption>
</figure>
<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></li>
</ol>
diff --git a/test/command/7080.md b/test/command/7080.md
index 0727c1083..565a6544d 100644
--- a/test/command/7080.md
+++ b/test/command/7080.md
@@ -4,5 +4,14 @@
[image]: image.png width=100px height=150px
^D
-[Para [Image ("",[],[("width","100px"),("height","150px")]) [] ("image.png","")]]
+[ Para
+ [ Image
+ ( ""
+ , []
+ , [ ( "width" , "100px" ) , ( "height" , "150px" ) ]
+ )
+ []
+ ( "image.png" , "" )
+ ]
+]
```
diff --git a/test/command/7092.md b/test/command/7092.md
index e7f127244..d6a526392 100644
--- a/test/command/7092.md
+++ b/test/command/7092.md
@@ -4,5 +4,7 @@
\em{\parseMe{foo}}
^D
-[Para [Emph [RawInline (Format "latex") "\\parseMe{foo}"]]]
+[ Para
+ [ Emph [ RawInline (Format "latex") "\\parseMe{foo}" ] ]
+]
```
diff --git a/test/command/7129.md b/test/command/7129.md
index fef4ca2c3..14005f0d1 100644
--- a/test/command/7129.md
+++ b/test/command/7129.md
@@ -5,23 +5,51 @@
foo & \verb|b&r| \\ \hline
\end{tabular}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "FOO"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "BAR"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "foo"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Code ("",[],[]) "b&r"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "FOO" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "BAR" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "foo" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Code ( "" , [] , [] ) "b&r" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/7134.md b/test/command/7134.md
index c69ae4bd0..041d7ea24 100644
--- a/test/command/7134.md
+++ b/test/command/7134.md
@@ -8,9 +8,44 @@ This is a paragraph.
This should be a second block quote.
^D
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "paragraph."]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."]]
-,BlockQuote
- [Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "second",Space,Str "block",Space,Str "quote."]]]
+[ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph."
+ ]
+, BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ ]
+ ]
+, BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "second"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ ]
+ ]
+]
```
diff --git a/test/command/7145.md b/test/command/7145.md
index a04345890..623f40880 100644
--- a/test/command/7145.md
+++ b/test/command/7145.md
@@ -8,5 +8,65 @@ empty
linebreaks</ref> Nulla ut massa eget ex venenatis lobortis id in eros.
^D
-[Para [Str "Maecenas",Space,Str "at",Space,Str "sapien",Space,Str "tempor,",Space,Str "pretium",Space,Str "turpis",Space,Str "ut,",Space,Str "imperdiet",Space,Str "augue.",Note [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "multiline"],Para [Str "reference",SoftBreak,RawInline (Format "html") "<i>",Str "with",RawInline (Format "html") "</i>",SoftBreak,Str "empty"],Para [Str "linebreaks"]],Space,Str "Nulla",Space,Str "ut",Space,Str "massa",Space,Str "eget",Space,Str "ex",Space,Str "venenatis",Space,Str "lobortis",Space,Str "id",Space,Str "in",Space,Str "eros."]]
+[ Para
+ [ Str "Maecenas"
+ , Space
+ , Str "at"
+ , Space
+ , Str "sapien"
+ , Space
+ , Str "tempor,"
+ , Space
+ , Str "pretium"
+ , Space
+ , Str "turpis"
+ , Space
+ , Str "ut,"
+ , Space
+ , Str "imperdiet"
+ , Space
+ , Str "augue."
+ , Note
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "multiline"
+ ]
+ , Para
+ [ Str "reference"
+ , SoftBreak
+ , RawInline (Format "html") "<i>"
+ , Str "with"
+ , RawInline (Format "html") "</i>"
+ , SoftBreak
+ , Str "empty"
+ ]
+ , Para [ Str "linebreaks" ]
+ ]
+ , Space
+ , Str "Nulla"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "massa"
+ , Space
+ , Str "eget"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "venenatis"
+ , Space
+ , Str "lobortis"
+ , Space
+ , Str "id"
+ , Space
+ , Str "in"
+ , Space
+ , Str "eros."
+ ]
+]
```
diff --git a/test/command/7155.md b/test/command/7155.md
index 49358bf97..454c387d5 100644
--- a/test/command/7155.md
+++ b/test/command/7155.md
@@ -3,7 +3,16 @@
\(x\) \[x\]
\\(x\\) \\[x\\]
^D
-[Para [Math InlineMath "x",Space,Math DisplayMath "x",SoftBreak,Str "\\(x\\)",Space,Str "\\[x\\]"]]
+[ Para
+ [ Math InlineMath "x"
+ , Space
+ , Math DisplayMath "x"
+ , SoftBreak
+ , Str "\\(x\\)"
+ , Space
+ , Str "\\[x\\]"
+ ]
+]
```
```
@@ -11,5 +20,14 @@
\(x\) \[x\]
\\(x\\) \\[x\\]
^D
-[Para [Str "(x)",Space,Str "[x]",SoftBreak,Math InlineMath "x",Space,Math DisplayMath "x"]]
+[ Para
+ [ Str "(x)"
+ , Space
+ , Str "[x]"
+ , SoftBreak
+ , Math InlineMath "x"
+ , Space
+ , Math DisplayMath "x"
+ ]
+]
```
diff --git a/test/command/7208.md b/test/command/7208.md
index fe02ec32e..e65943ade 100644
--- a/test/command/7208.md
+++ b/test/command/7208.md
@@ -2,5 +2,5 @@
% pandoc -t gfm
\<hi\>
^D
-\<hi>
+\<hi\>
```
diff --git a/test/command/7216.md b/test/command/7216.md
index cab3b9689..2fb99c7b5 100644
--- a/test/command/7216.md
+++ b/test/command/7216.md
@@ -1,5 +1,5 @@
```
-pandoc -t latex
+% pandoc -t latex
"This is some text in quotes. Another paragraph by the same speaker follows. The first paragraph should have no close quote.
"The second paragraph should have open and close quotes."
diff --git a/test/command/7272.md b/test/command/7272.md
index d27b25143..cea282a10 100644
--- a/test/command/7272.md
+++ b/test/command/7272.md
@@ -15,7 +15,7 @@
</table>
^D
\begin{longtable}[]{@{}
- >{\raggedright\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{1.00}}@{}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 0\tabcolsep) * \real{1.0000}}@{}}
\toprule
\endhead
\begin{minipage}[t]{\linewidth}\raggedright
diff --git a/test/command/7329.md b/test/command/7329.md
new file mode 100644
index 000000000..9ed9c52ff
--- /dev/null
+++ b/test/command/7329.md
@@ -0,0 +1,67 @@
+```
+% pandoc -f markdown -t org
+- @item1
+- @item1 [p. 12]
+- @item1 [p.12; see also @item2]
+- [@item1]
+- [-@item1]
+- [see @item1 p. 12]
+- [see @item1, p. 12]
+- [see @item1, p. 12 and *passim*]
+- [@item1;@item2]
+- [see @item1; @item2]
+^D
+- [cite/t:@item1]
+- [cite/t:@item1 p. 12]
+- [cite/t:@item1 p.12; see also @item2]
+- [cite:@item1]
+- [cite/na:@item1]
+- [cite:see @item1 p. 12]
+- [cite:see @item1 p. 12]
+- [cite:see @item1 p. 12 and /passim/]
+- [cite:@item1; @item2]
+- [cite:see @item1; @item2]
+```
+
+```
+% pandoc -f markdown -t org -C --bibliography command/biblio.bib
+- [@item1]
+^D
+- [cite:@item1]
+```
+
+
+```
+% pandoc -f markdown -t org-citations -C --bibliography command/biblio.bib
+[@item1]
+^D
+(Doe 2005)
+
+<<refs>>
+
+<<ref-item1>>
+Doe, John. 2005. /First Book/. Cambridge: Cambridge University Press.
+```
+
+```
+% pandoc -f org -t markdown
+- [cite/t:@item1]
+- [cite/t:@item1 p. 12]
+- [cite/t:@item1 p.12; see also @item2]
+- [cite:@item1]
+- [cite/na:@item1]
+- [cite:see @item1 p. 12]
+- [cite:see @item1 p. 12 and /passim/]
+- [cite:@item1; @item2]
+- [cite:see @item1; @item2]
+^D
+- @item1
+- @item1 [p. 12]
+- @item1 [p.12; see also @item2]
+- [@item1]
+- [-@item1]
+- [see @item1 p. 12]
+- [see @item1 p. 12 and *passim*]
+- [@item1; @item2]
+- [see @item1; @item2]
+```
diff --git a/test/command/7339.md b/test/command/7339.md
index 9697c1c32..f8d004f68 100644
--- a/test/command/7339.md
+++ b/test/command/7339.md
@@ -6,6 +6,10 @@ title: Test
Hi
^D
-Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Str "Test"])]})
-[Para [Str "Hi"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList [ ( "title" , MetaInlines [ Str "Test" ] ) ]
+ }
+ [ Para [ Str "Hi" ] ]
```
diff --git a/test/command/7340.md b/test/command/7340.md
index 25decd732..2c080a439 100644
--- a/test/command/7340.md
+++ b/test/command/7340.md
@@ -2,5 +2,5 @@
% pandoc -f latex -t native
\(*\)
^D
-[Para [Math InlineMath "*"]]
+[ Para [ Math InlineMath "*" ] ]
```
diff --git a/test/command/7400.md b/test/command/7400.md
index d4be32d72..785ded88d 100644
--- a/test/command/7400.md
+++ b/test/command/7400.md
@@ -4,6 +4,5 @@
# Comment only
...
^D
-Pandoc (Meta {unMeta = fromList []})
-[]
+Pandoc Meta { unMeta = fromList [] } []
```
diff --git a/test/command/7416.md b/test/command/7416.md
index 2f9577f10..d440725ab 100644
--- a/test/command/7416.md
+++ b/test/command/7416.md
@@ -4,7 +4,8 @@
^D
<figure>
-<img src="../media/rId25.jpg" title="title" alt="alt" /><figcaption>caption</figcaption>
+<img src="../media/rId25.jpg" title="title" alt="alt" />
+<figcaption>caption</figcaption>
</figure>
```
@@ -14,6 +15,7 @@
^D
<figure>
-<img src="../media/rId25.jpg" title="title" alt="caption" /><figcaption aria-hidden="true">caption</figcaption>
+<img src="../media/rId25.jpg" title="title" alt="caption" />
+<figcaption aria-hidden="true">caption</figcaption>
</figure>
```
diff --git a/test/command/7434.md b/test/command/7434.md
index be8732bc2..e4f2743a1 100644
--- a/test/command/7434.md
+++ b/test/command/7434.md
@@ -9,7 +9,15 @@
[\*\a](x)
^D
-[RawBlock (Format "tex") "\\begin{proof}\n\\newcommand{\\x}{\\left.\\right.}\n\\left.\\right.\n\\end{proof}"
-,Para [Str "1234567890abcdefghi"]
-,Para [Link ("",[],[]) [Str "*",RawInline (Format "tex") "\\a"] ("x","")]]
+[ RawBlock
+ (Format "tex")
+ "\\begin{proof}\n\\newcommand{\\x}{\\left.\\right.}\n\\left.\\right.\n\\end{proof}"
+, Para [ Str "1234567890abcdefghi" ]
+, Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "*" , RawInline (Format "tex") "\\a" ]
+ ( "x" , "" )
+ ]
+]
```
diff --git a/test/command/7436.md b/test/command/7436.md
index ad4cb8c2f..c2d434d60 100644
--- a/test/command/7436.md
+++ b/test/command/7436.md
@@ -8,7 +8,24 @@
.. include:: command/three.txt
^D
-[CodeBlock ("",[""],[("code","")]) "1st line.\n2nd line.\n3rd line.\n"
-,RawBlock (Format "rst") "1st line.\n2nd line.\n3rd line.\n"
-,Para [Str "1st",Space,Str "line.",SoftBreak,Str "2nd",Space,Str "line.",SoftBreak,Str "3rd",Space,Str "line."]]
+[ CodeBlock
+ ( "" , [ "" ] , [ ( "code" , "" ) ] )
+ "1st line.\n2nd line.\n3rd line.\n"
+, CodeBlock
+ ( "" , [ "" ] , [ ( "literal" , "" ) ] )
+ "1st line.\n2nd line.\n3rd line.\n"
+, Para
+ [ Str "1st"
+ , Space
+ , Str "line."
+ , SoftBreak
+ , Str "2nd"
+ , Space
+ , Str "line."
+ , SoftBreak
+ , Str "3rd"
+ , Space
+ , Str "line."
+ ]
+]
```
diff --git a/test/command/7482.md b/test/command/7482.md
new file mode 100644
index 000000000..b4f750e2f
--- /dev/null
+++ b/test/command/7482.md
@@ -0,0 +1,47 @@
+```
+% pandoc -f html -t org
+<table border=0 cellpadding=0 cellspacing=0 width=206 style='border-collapse:
+ collapse;width:154pt'>
+<!--StartFragment-->
+ <col width=99 style='mso-width-source:userset;mso-width-alt:3157;width:74pt'>
+ <col width=107 style='mso-width-source:userset;mso-width-alt:3413;width:80pt'>
+ <tr height=23 style='height:17.0pt'>
+ <td height=23 align=left width=99 style='height:17.0pt;width:74pt'>Last N
+ credits</td>
+ <td align=left width=107 style='width:80pt'>Average grade</td>
+ </tr>
+ <tr height=21 style='height:16.0pt'>
+ <td height=21 align=right style='height:16.0pt'>140</td>
+ <td align=right>17.06571429</td>
+ </tr>
+ <tr height=21 style='height:16.0pt'>
+ <td height=21 class=xl63 align=right style='height:16.0pt'>84</td>
+ <td class=xl63 align=right>17.95595238</td>
+ </tr>
+ <tr height=21 style='height:16.0pt'>
+ <td height=21 class=xl63 align=right style='height:16.0pt'>64</td>
+ <td class=xl63 align=right>18.9734375</td>
+ </tr>
+ <tr height=21 style='height:16.0pt'>
+ <td height=21 align=right style='height:16.0pt'>36</td>
+ <td align=right>19.12777778</td>
+ </tr>
+ <tr height=27 style='mso-height-source:userset;height:20.0pt'>
+ <td height=27 align=right style='height:20.0pt'>29</td>
+ <td align=right>19.18275862</td>
+ </tr>
+ <tr height=21 style='height:16.0pt'>
+ <td height=21 align=right style='height:16.0pt'>19</td>
+ <td align=right>19.00526316</td>
+ </tr>
+<!--EndFragment-->
+</table>
+^D
+| Last N credits | Average grade |
+| 140 | 17.06571429 |
+| 84 | 17.95595238 |
+| 64 | 18.9734375 |
+| 36 | 19.12777778 |
+| 29 | 19.18275862 |
+| 19 | 19.00526316 |
+```
diff --git a/test/command/7494.md b/test/command/7494.md
new file mode 100644
index 000000000..364bcb7e1
--- /dev/null
+++ b/test/command/7494.md
@@ -0,0 +1,62 @@
+```
+% pandoc -f latex -t plain
+\def\foo{BAR}
+{\foo
+\def\foo{BAZ}
+\foo
+}
+\foo
+^D
+BAR BAZ BAR
+```
+
+```
+% pandoc -f latex -t plain
+\def\foo{BAR}
+{\foo
+\gdef\foo{BAZ}
+\foo
+}
+\foo
+^D
+BAR BAZ BAZ
+```
+
+```
+% pandoc -f latex -t plain
+\def\foo{BAR}
+{\foo
+\global\def\foo{BAZ}
+\foo
+}
+\foo
+^D
+BAR BAZ BAZ
+```
+
+```
+% pandoc -f latex -t plain
+\newcommand{\aaa}{BBB}
+{
+\renewcommand{\aaa}{AAA}
+\aaa
+}
+\aaa
+^D
+AAA BBB
+```
+
+```
+% pandoc -f latex -t markdown
+\newcommand{\aaa}{BBB}
+\begin{quote}
+\renewcommand{\aaa}{AAA}
+\aaa
+\end{quote}
+\aaa
+^D
+> AAA
+
+BBB
+```
+
diff --git a/test/command/7497.md b/test/command/7497.md
new file mode 100644
index 000000000..4b80bf267
--- /dev/null
+++ b/test/command/7497.md
@@ -0,0 +1,37 @@
+````
+% pandoc -f markdown-raw_tex -t latex
+```
+\end{verbatim}
+\LaTeX
+\begin{verbatim}
+```
+^D
+\begin{Shaded}
+\begin{Highlighting}[]
+\NormalTok{\textbackslash{}end\{verbatim\}}
+\NormalTok{\textbackslash{}LaTeX}
+\NormalTok{\textbackslash{}begin\{verbatim\}}
+\end{Highlighting}
+\end{Shaded}
+````
+
+````
+% pandoc -f markdown-raw_tex -t latex
+hi[^1]
+
+[^1]:
+ ```
+ \end{Verbatim}
+ \LaTeX
+ \begin{Verbatim}
+ ```
+^D
+hi\footnote{\begin{Shaded}
+\begin{Highlighting}[]
+\NormalTok{\textbackslash{}end\{Verbatim\}}
+\NormalTok{\textbackslash{}LaTeX}
+\NormalTok{\textbackslash{}begin\{Verbatim\}}
+\end{Highlighting}
+\end{Shaded}
+}
+````
diff --git a/test/command/7520.md b/test/command/7520.md
new file mode 100644
index 000000000..0300a9e45
--- /dev/null
+++ b/test/command/7520.md
@@ -0,0 +1,22 @@
+```
+% pandoc -f org -t native -s
+:PROPERTIES:
+:ID: d5b18943-98a3-4b2a-a545-41d17bf50f3e
+:END:
+#+title: Common Ground
+^D
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "id"
+ , MetaString "d5b18943-98a3-4b2a-a545-41d17bf50f3e"
+ )
+ , ( "title"
+ , MetaInlines [ Str "Common" , Space , Str "Ground" ]
+ )
+ ]
+ }
+ []
+
+```
diff --git a/test/command/7521.md b/test/command/7521.md
new file mode 100644
index 000000000..4a24f13e1
--- /dev/null
+++ b/test/command/7521.md
@@ -0,0 +1,11 @@
+```
+% pandoc --strip-comments
+- one
+ <!-- with comm -->
+- two
+^D
+<ul>
+<li>one </li>
+<li>two</li>
+</ul>
+```
diff --git a/test/command/7529.md b/test/command/7529.md
new file mode 100644
index 000000000..9515258e9
--- /dev/null
+++ b/test/command/7529.md
@@ -0,0 +1,7 @@
+```
+% pandoc -f html -t asciidoc
+<a href="https://example.com/show.cgi?id=hi--there--everyone">https://example.com/show.cgi?id=hi--there--everyone</a>
+^D
+link:++https://example.com/show.cgi?id=hi--there--everyone++[]
+```
+
diff --git a/test/command/7546.md b/test/command/7546.md
new file mode 100644
index 000000000..aed17275e
--- /dev/null
+++ b/test/command/7546.md
@@ -0,0 +1,6 @@
+```
+% pandoc -t html -f native
+Span ("", [], [("","")]) []
+^D
+<span></span>
+```
diff --git a/test/command/7557.md b/test/command/7557.md
new file mode 100644
index 000000000..c837d0b3c
--- /dev/null
+++ b/test/command/7557.md
@@ -0,0 +1,20 @@
+```
+% pandoc -f org -t native
+- 11. and 12. 09. meeting
+^D
+[ BulletList
+ [ [ Plain
+ [ Str "11."
+ , Space
+ , Str "and"
+ , Space
+ , Str "12."
+ , Space
+ , Str "09."
+ , Space
+ , Str "meeting"
+ ]
+ ]
+ ]
+]
+```
diff --git a/test/command/7568.md b/test/command/7568.md
new file mode 100644
index 000000000..487da0861
--- /dev/null
+++ b/test/command/7568.md
@@ -0,0 +1,16 @@
+```
+% pandoc -f rst
+While `Labyrinth Lord: Revised Edition`_ (LLRE; PDF and POD) has been
+criticized for not being a completely faithful retro-clone of the
+Moldvay/Cook/Marsh Basic/Expert D&D rules (B/X), I think it still
+holds a useful spot.
+
+.. _Labyrinth Lord\: Revised Edition: https://www.drivethrurpg.com/product/64332/Labyrinth-Lord-Revised-Edition
+^D
+<p>While <a
+href="https://www.drivethrurpg.com/product/64332/Labyrinth-Lord-Revised-Edition">Labyrinth
+Lord: Revised Edition</a> (LLRE; PDF and POD) has been criticized for
+not being a completely faithful retro-clone of the Moldvay/Cook/Marsh
+Basic/Expert D&amp;D rules (B/X), I think it still holds a useful
+spot.</p>
+```
diff --git a/test/command/7573.md b/test/command/7573.md
new file mode 100644
index 000000000..d6529cde6
--- /dev/null
+++ b/test/command/7573.md
@@ -0,0 +1,11 @@
+```
+% pandoc --preserve-tabs
+<ol>
+ <li>one
+</ol>
+^D
+<ol>
+<li>
+one
+</ol>
+```
diff --git a/test/command/7589.md b/test/command/7589.md
new file mode 100644
index 000000000..aff21dad8
--- /dev/null
+++ b/test/command/7589.md
@@ -0,0 +1,72 @@
+```
+% pandoc -f html -t native
+<table>
+ <thead>
+ <tr>
+ <th>experience</th>
+ <th>expertise</th>
+ <th>paradigms</th>
+ <th>haskell</th>
+ <th>name</th>
+ <th>image</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+</table>
+^D
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "experience" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "expertise" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "paradigms" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "haskell" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "name" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "image" ] ]
+ ]
+ ])
+ [ TableBody ( "" , [] , [] ) (RowHeadColumns 0) [] [] ]
+ (TableFoot ( "" , [] , [] ) [])
+]
+```
diff --git a/test/command/7615.md b/test/command/7615.md
new file mode 100644
index 000000000..9235b0a17
--- /dev/null
+++ b/test/command/7615.md
@@ -0,0 +1,6 @@
+```
+% pandoc -f latex -t native
+\texttt{\^}
+^D
+[ Para [ Code ( "" , [] , [] ) "^" ] ]
+```
diff --git a/test/command/7623.md b/test/command/7623.md
new file mode 100644
index 000000000..1c4c8a0c1
--- /dev/null
+++ b/test/command/7623.md
@@ -0,0 +1,12 @@
+```
+% pandoc -t native
+[link $(0,1]$](url)
+^D
+[ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "link" , Space , Math InlineMath "(0,1]" ]
+ ( "url" , "" )
+ ]
+]
+```
diff --git a/test/command/7632.md b/test/command/7632.md
new file mode 100644
index 000000000..4256bc207
--- /dev/null
+++ b/test/command/7632.md
@@ -0,0 +1,66 @@
+```
+% pandoc -t native
+(@a) First case
+
+[link to (@a)](url)
+^D
+[ OrderedList
+ ( 1 , Example , TwoParens )
+ [ [ Plain [ Str "First" , Space , Str "case" ] ] ]
+, Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "link" , Space , Str "to" , Space , Str "(1)" ]
+ ( "url" , "" )
+ ]
+]
+```
+
+```
+% pandoc -t native
+[@a]{.class}
+^D
+[ Para
+ [ Span
+ ( "" , [ "class" ] , [] )
+ [ Cite
+ [ Citation
+ { citationId = "a"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "@a" ]
+ ]
+ ]
+]
+
+```
+
+```
+% pandoc -t native
+[@a](url)
+^D
+[ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Cite
+ [ Citation
+ { citationId = "a"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "@a" ]
+ ]
+ ( "url" , "" )
+ ]
+]
+
+```
diff --git a/test/command/7668.md b/test/command/7668.md
new file mode 100644
index 000000000..6f85aa4de
--- /dev/null
+++ b/test/command/7668.md
@@ -0,0 +1,36 @@
+```
+% pandoc -f bibtex -t csljson
+%@Book{JW82,
+ author = {Richard A. Johnson and Dean W. Wichern},
+ title = {Applied Multivariate Statistical Analysis},
+ publisher= {Prentice-Hall},
+ year = {1983}
+}
+@Book{JW83,
+ author = {Richard %A.
+ B. Johnson},
+% title = {Multivariate Analysis},
+ year = "%
+ 1983"
+}
+^D
+[
+ {
+ "author": [
+ {
+ "family": "Johnson",
+ "given": "Richard B."
+ }
+ ],
+ "id": "JW83",
+ "issued": {
+ "date-parts": [
+ [
+ 1983
+ ]
+ ]
+ },
+ "type": "book"
+ }
+]
+```
diff --git a/test/command/7692.md b/test/command/7692.md
new file mode 100644
index 000000000..2a91ef378
--- /dev/null
+++ b/test/command/7692.md
@@ -0,0 +1,13 @@
+```
+% pandoc -t markdown
+[https://example.com](https://example.com){.clz}
+^D
+[https://example.com](https://example.com){.clz}
+```
+
+```
+% pandoc -f markdown -t html | pandoc -f html -t markdown
+<http://example.com>
+^D
+<http://example.com>
+```
diff --git a/test/command/7697.md b/test/command/7697.md
new file mode 100644
index 000000000..eb9c823d0
--- /dev/null
+++ b/test/command/7697.md
@@ -0,0 +1,27 @@
+```
+% pandoc -f rst -t mediawiki
+.. _refsubpage1:
+
+heading
+-------
+
+ref to top of this section: `refsubpage1`_.
+^D
+<span id="refsubpage1"></span>
+= heading =
+
+ref to top of this section: [[#refsubpage1|refsubpage1]].
+```
+```
+% pandoc -f markdown -t mediawiki
+# Heading {#foo}
+^D
+<span id="foo"></span>
+= Heading =
+```
+```
+% pandoc -f markdown -t mediawiki
+# My Heading {#My_Heading}
+^D
+= My Heading =
+```
diff --git a/test/command/7713.md b/test/command/7713.md
new file mode 100644
index 000000000..851cb4729
--- /dev/null
+++ b/test/command/7713.md
@@ -0,0 +1,29 @@
+```
+% pandoc
+| aaaaaaaaaaaa | bbbbb | ccccccccccc |
+| --- | --- | --- |
+| | | cccccccccc cccccccccc cccccccccc cccccccccc cccccccccc cccccccccc |
+^D
+<table>
+<colgroup>
+<col style="width: 33%" />
+<col style="width: 33%" />
+<col style="width: 33%" />
+</colgroup>
+<thead>
+<tr class="header">
+<th>aaaaaaaaaaaa</th>
+<th>bbbbb</th>
+<th>ccccccccccc</th>
+</tr>
+</thead>
+<tbody>
+<tr class="odd">
+<td></td>
+<td></td>
+<td>cccccccccc cccccccccc cccccccccc cccccccccc cccccccccc
+cccccccccc</td>
+</tr>
+</tbody>
+</table>
+```
diff --git a/test/command/7723.md b/test/command/7723.md
new file mode 100644
index 000000000..f3229eb1e
--- /dev/null
+++ b/test/command/7723.md
@@ -0,0 +1,8 @@
+```
+% pandoc -t native
+Bug![^1]
+
+[^1]: Note.
+^D
+[ Para [ Str "Bug!" , Note [ Para [ Str "Note." ] ] ] ]
+```
diff --git a/test/command/7726.md b/test/command/7726.md
new file mode 100644
index 000000000..bab11ca04
--- /dev/null
+++ b/test/command/7726.md
@@ -0,0 +1,22 @@
+```
+% pandoc -t markdown
+\# Hi
+
+\## Hi
+
+\### Hi
+
+\#### hi
+
+and #hi
+^D
+\# Hi
+
+\## Hi
+
+\### Hi
+
+\#### hi
+
+and #hi
+```
diff --git a/test/command/7738.md b/test/command/7738.md
new file mode 100644
index 000000000..e3c629aa0
--- /dev/null
+++ b/test/command/7738.md
@@ -0,0 +1,6 @@
+```
+% pandoc
+![_](url.png) image
+^D
+<p><img src="url.png" alt="_" /> image</p>
+```
diff --git a/test/command/7761.md b/test/command/7761.md
new file mode 100644
index 000000000..0307bcaee
--- /dev/null
+++ b/test/command/7761.md
@@ -0,0 +1,35 @@
+```
+% pandoc --citeproc --csl command/chicago-fullnote-bibliography.csl -t plain
+---
+references:
+- id: noauthor
+ issued: 2020
+ publisher: Oxford University Press
+ publisher-place: Oxford
+ title: Title
+ type: book
+- id: author
+ author:
+ - family: Jones
+ given: Jim
+ issued: 2021
+ title: Title
+ type: book
+ url: "https://duckduckgo.com/cite2021"
+---
+
+Text.[^n]
+
+[^n]: See @author. Another example of a sea level mapping tool with
+similar limitations is @noauthor.
+^D
+Text.[1]
+
+Jones, Jim. Title, 2021. https://duckduckgo.com/cite2021.
+
+Title. Oxford: Oxford University Press, 2020.
+
+[1] See Jim Jones, Title, 2021, https://duckduckgo.com/cite2021. Another
+example of a sea level mapping tool with similar limitations is Title
+(Oxford: Oxford University Press, 2020).
+```
diff --git a/test/command/853.md b/test/command/853.md
index 54eb416a9..518c6593b 100644
--- a/test/command/853.md
+++ b/test/command/853.md
@@ -7,11 +7,14 @@ Here is a citation reference: [CIT2002]_.
.. [CIT2002] This is the citation. It's just like a footnote,
except the label is textual.
^D
-<p>Here is a citation reference: <a href="#CIT2002" class="citation">[CIT2002]</a>.</p>
+<p>Here is a citation reference: <a href="#CIT2002"
+class="citation">[CIT2002]</a>.</p>
<div id="citations">
<dl>
<dt><span id="CIT2002" class="citation-label">CIT2002</span></dt>
-<dd><p>This is the citation. It's just like a footnote, except the label is textual.</p>
+<dd>
+<p>This is the citation. It's just like a footnote, except the label is
+textual.</p>
</dd>
</dl>
</div>
diff --git a/test/command/934.md b/test/command/934.md
index ef99abdf9..3c86a1f26 100644
--- a/test/command/934.md
+++ b/test/command/934.md
@@ -7,6 +7,38 @@
}
\ddb{This should be italic and in quotes}{And this is the attribution}
^D
-[Para [Emph [Quoted DoubleQuote [Str "This",Space,Str "should",Space,Str "be",Space,Str "italic",Space,Str "and",Space,Str "in",Space,Str "quotes"]]]
-,Para [Strong [Str "And",Space,Str "this",Space,Str "is",Space,Str "the",Space,Str "attribution"]]]
+[ Para
+ [ Emph
+ [ Quoted
+ DoubleQuote
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "italic"
+ , Space
+ , Str "and"
+ , Space
+ , Str "in"
+ , Space
+ , Str "quotes"
+ ]
+ ]
+ ]
+, Para
+ [ Strong
+ [ Str "And"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "attribution"
+ ]
+ ]
+]
```
diff --git a/test/command/982.md b/test/command/982.md
index 5f54f7713..4b997c4c4 100644
--- a/test/command/982.md
+++ b/test/command/982.md
@@ -7,5 +7,5 @@
y=x^2
\EEQ
^D
-[Para [Math DisplayMath "y=x^2"]]
+[ Para [ Math DisplayMath "y=x^2" ] ]
```
diff --git a/test/command/987.md b/test/command/987.md
index f632231ef..fc75d2c56 100644
--- a/test/command/987.md
+++ b/test/command/987.md
@@ -1,5 +1,5 @@
```
-pandoc -f latex -t markdown
+% pandoc -f latex -t markdown
\documentclass{article}
\newenvironment{flubble}{FOO}{BAR}
\begin{document}
diff --git a/test/command/adjacent_latex_blocks.md b/test/command/adjacent_latex_blocks.md
index e7dc6d895..4483d6e3f 100644
--- a/test/command/adjacent_latex_blocks.md
+++ b/test/command/adjacent_latex_blocks.md
@@ -4,6 +4,7 @@
\listoftables
^D
-[RawBlock (Format "tex") "\\listoffigures"
-,RawBlock (Format "tex") "\\listoftables"]
+[ RawBlock (Format "tex") "\\listoffigures"
+, RawBlock (Format "tex") "\\listoftables"
+]
```
diff --git a/test/command/ascii.md b/test/command/ascii.md
index 0826d7414..a328ed863 100644
--- a/test/command/ascii.md
+++ b/test/command/ascii.md
@@ -1,19 +1,19 @@
```
-pandoc -t html --ascii
+% pandoc -t html --ascii
äéıå
^D
<p>&#xE4;&#xE9;&#x131;&#xE5;</p>
```
```
-pandoc -t latex --ascii
+% pandoc -t latex --ascii
äéıå
^D
\"{a}\'{e}\i\r{a}
```
```
-pandoc -t man --ascii
+% pandoc -t man --ascii
äéıå
^D
.PP
@@ -21,7 +21,7 @@ pandoc -t man --ascii
```
```
-pandoc -t ms --ascii
+% pandoc -t ms --ascii
äéıå
^D
.LP
@@ -29,7 +29,7 @@ pandoc -t ms --ascii
```
```
-pandoc -t docbook --ascii
+% pandoc -t docbook --ascii
äéıå
^D
<para>
@@ -38,14 +38,14 @@ pandoc -t docbook --ascii
```
```
-pandoc -t jats --ascii
+% pandoc -t jats --ascii
äéıå
^D
<p>&#xE4;&#xE9;&#x131;&#xE5;</p>
```
```
-pandoc -t markdown-smart --ascii
+% pandoc -t markdown-smart --ascii
"äéıå"
^D
&ldquo;&auml;&eacute;&imath;&aring;&rdquo;
diff --git a/test/command/bar-endinput.tex b/test/command/bar-endinput.tex
new file mode 100644
index 000000000..2f3f9bd6c
--- /dev/null
+++ b/test/command/bar-endinput.tex
@@ -0,0 +1,3 @@
+\emph{hi there}
+\endinput
+\emph{invisible}
diff --git a/test/command/biblatex-article.md b/test/command/biblatex-article.md
index 705369f78..68d467526 100644
--- a/test/command/biblatex-article.md
+++ b/test/command/biblatex-article.md
@@ -97,7 +97,7 @@ references:
- family: Author
given: Ann A.
suffix: Jr.
- collection-title: new series
+ collection-title: New series
container-title: "The Journaltitle: The Journalsubtitle"
doi: 10.1086/520976
editor:
diff --git a/test/command/biblatex-gillies.md b/test/command/biblatex-gillies.md
index e1a64af23..a63c1311d 100644
--- a/test/command/biblatex-gillies.md
+++ b/test/command/biblatex-gillies.md
@@ -54,7 +54,7 @@ references:
author:
- family: Gillies
given: Alexander
- collection-title: new series
+ collection-title: New series
container-title: Publications of the English Goethe Society
id: gillies
issued: 1933
diff --git a/test/command/biblatex-shore.md b/test/command/biblatex-shore.md
index cc9c079e1..efe97ef7a 100644
--- a/test/command/biblatex-shore.md
+++ b/test/command/biblatex-shore.md
@@ -49,7 +49,7 @@ references:
author:
- family: Shore
given: Bradd
- collection-title: new series
+ collection-title: New series
container-title: American Anthropologist
id: shore
issue: 1
diff --git a/test/command/biblatex-sigfridsson.md b/test/command/biblatex-sigfridsson.md
index e042a8762..f83c35622 100644
--- a/test/command/biblatex-sigfridsson.md
+++ b/test/command/biblatex-sigfridsson.md
@@ -90,7 +90,7 @@ references:
- family: Ryde
given: Ulf
container-title: Journal of Computational Chemistry
- doi: "10.1002/(SICI)1096-987X(199803)19:4\\<377::AID-JCC1>3.0.CO;2-P"
+ doi: "10.1002/(SICI)1096-987X(199803)19:4\\<377::AID-JCC1\\>3.0.CO;2-P"
id: sigfridsson
issue: 4
issued: 1998
diff --git a/test/command/cite-in-inline-note.md b/test/command/cite-in-inline-note.md
index 962eddd2a..aa61b93e8 100644
--- a/test/command/cite-in-inline-note.md
+++ b/test/command/cite-in-inline-note.md
@@ -2,5 +2,25 @@
% pandoc -t native
foo^[bar [@doe]]
^D
-[Para [Str "foo",Note [Para [Str "bar",Space,Cite [Citation {citationId = "doe", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 1, citationHash = 0}] [Str "[@doe]"]]]]]
+[ Para
+ [ Str "foo"
+ , Note
+ [ Para
+ [ Str "bar"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "doe"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@doe]" ]
+ ]
+ ]
+ ]
+]
```
diff --git a/test/command/citeproc-87.md b/test/command/citeproc-87.md
new file mode 100644
index 000000000..dd9287e78
--- /dev/null
+++ b/test/command/citeproc-87.md
@@ -0,0 +1,55 @@
+```
+% pandoc --citeproc -Mlang=it-IT -t markdown-citations
+Foo [@a 50: «Disse: "bar"»]. «Disse: "baz"»
+
+---
+suppress-bibliography: true
+references:
+- id: a
+ author:
+ - literal: Aristotele
+ title: Metafisica
+ type: book
+...
+^D
+Foo (Aristotele, s.d., 50: «Disse: "bar"»). «Disse: "baz"»
+```
+
+The Quoted is passed to citeproc as a Span ("",["csl-quoted"],[])
+so that flipflopping and localization occur.
+```
+% pandoc -C -t plain -Mlang=en
+---
+references:
+- id: a
+ author:
+ - literal: Aristotele
+ title: Metafisica et "Physica"
+ type: article-journal
+...
+
+Foo [@a 50].
+^D
+Foo (Aristotele, n.d., 50).
+
+Aristotele. n.d. “Metafisica Et ‘Physica’.”
+```
+
+```
+% pandoc -C -t plain -Mlang=it
+---
+references:
+- id: a
+ author:
+ - literal: Aristotele
+ title: Metafisica et "Physica"
+ type: article-journal
+...
+
+Foo [@a 50].
+^D
+Foo (Aristotele, s.d., 50).
+
+Aristotele. s.d. «Metafisica et “Physica”».
+```
+
diff --git a/test/command/citeproc-author-in-text-suffix.md b/test/command/citeproc-author-in-text-suffix.md
index b55502053..df3184aa8 100644
--- a/test/command/citeproc-author-in-text-suffix.md
+++ b/test/command/citeproc-author-in-text-suffix.md
@@ -2,5 +2,33 @@
% pandoc -t native
@a [p. 33; @b]
^D
-[Para [Cite [Citation {citationId = "a", citationPrefix = [], citationSuffix = [Str "p.\160\&33"], citationMode = AuthorInText, citationNoteNum = 1, citationHash = 0},Citation {citationId = "b", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 1, citationHash = 0}] [Str "@a",Space,Str "[p.",Space,Str "33;",Space,Str "@b]"]]]
+[ Para
+ [ Cite
+ [ Citation
+ { citationId = "a"
+ , citationPrefix = []
+ , citationSuffix = [ Str "p.\160\&33" ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "b"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "@a"
+ , Space
+ , Str "[p."
+ , Space
+ , Str "33;"
+ , Space
+ , Str "@b]"
+ ]
+ ]
+]
```
diff --git a/test/command/csv.md b/test/command/csv.md
index 75dccf1a7..353512553 100644
--- a/test/command/csv.md
+++ b/test/command/csv.md
@@ -5,42 +5,98 @@ Apple,25 cents,33
"""Navel"" Orange","35 cents",22
,,45
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Fruit"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Price"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Quantity"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "25",Space,Str "cents"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "33"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\"Navel\"",Space,Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "35",Space,Str "cents"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "22"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "45"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Fruit" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Price" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Quantity" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "25" , Space , Str "cents" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "33" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\"Navel\"" , Space , Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "35" , Space , Str "cents" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "22" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell
+ ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "45" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/docbook-bibliography.md b/test/command/docbook-bibliography.md
index 37ac05b30..6e42732ad 100644
--- a/test/command/docbook-bibliography.md
+++ b/test/command/docbook-bibliography.md
@@ -13,8 +13,33 @@
</bibliomixed>
</bibliodiv>
^D
-[Header 1 ("",[],[]) [Str "Document",Space,Str "References"]
-,Para [Span ("refTheFirst",[],[]) [],Str "[1]",Space,Str "First",Space,Str "reference"]
-,Para [Span ("refTheSecond",[],[]) [],Str "[2]",Space,Str "Second",Space,Str "reference"]
-,Para [Span ("refTheThird",[],[]) [],Str "[3]",Space,Str "Third",Space,Str "reference"]]
+[ Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Document" , Space , Str "References" ]
+, Para
+ [ Span ( "refTheFirst" , [] , [] ) []
+ , Str "[1]"
+ , Space
+ , Str "First"
+ , Space
+ , Str "reference"
+ ]
+, Para
+ [ Span ( "refTheSecond" , [] , [] ) []
+ , Str "[2]"
+ , Space
+ , Str "Second"
+ , Space
+ , Str "reference"
+ ]
+, Para
+ [ Span ( "refTheThird" , [] , [] ) []
+ , Str "[3]"
+ , Space
+ , Str "Third"
+ , Space
+ , Str "reference"
+ ]
+]
```
diff --git a/test/command/dots.md b/test/command/dots.md
index 08bc561a8..cd9a978cf 100644
--- a/test/command/dots.md
+++ b/test/command/dots.md
@@ -6,7 +6,8 @@
\vdots
^D
-[Para [Str "\8230"]
-,Para [Str "\8230"]
-,Para [Str "\8942"]]
+[ Para [ Str "\8230" ]
+, Para [ Str "\8230" ]
+, Para [ Str "\8942" ]
+]
```
diff --git a/test/command/empty_paragraphs.md b/test/command/empty_paragraphs.md
index 14bd8d060..6efbab9cd 100644
--- a/test/command/empty_paragraphs.md
+++ b/test/command/empty_paragraphs.md
@@ -2,34 +2,32 @@
% pandoc -f native -t docx -o - | pandoc -f docx -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
-[Para [Str "hi"]
-,Para [Str "lo"]]
+[ Para [ Str "hi" ] , Para [ Str "lo" ] ]
```
```
% pandoc -f native -t docx+empty_paragraphs -o - | pandoc -f docx -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
-[Para [Str "hi"]
-,Para [Str "lo"]]
+[ Para [ Str "hi" ] , Para [ Str "lo" ] ]
```
```
% pandoc -f native -t docx -o - | pandoc -f docx+empty_paragraphs -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
-[Para [Str "hi"]
-,Para [Str "lo"]]
+[ Para [ Str "hi" ] , Para [ Str "lo" ] ]
```
```
% pandoc -f native -t docx+empty_paragraphs -o - | pandoc -f docx+empty_paragraphs -t native
[Para [Str "hi"], Para [], Para [], Para [Str "lo"]]
^D
-[Para [Str "hi"]
-,Para []
-,Para []
-,Para [Str "lo"]]
+[ Para [ Str "hi" ]
+, Para []
+, Para []
+, Para [ Str "lo" ]
+]
```
```
@@ -57,10 +55,11 @@
<p></p>
<p>lo</p>
^D
-[Para [Str "hi"]
-,Para []
-,Para []
-,Para [Str "lo"]]
+[ Para [ Str "hi" ]
+, Para []
+, Para []
+, Para [ Str "lo" ]
+]
```
```
@@ -70,8 +69,7 @@
<p></p>
<p>lo</p>
^D
-[Para [Str "hi"]
-,Para [Str "lo"]]
+[ Para [ Str "hi" ] , Para [ Str "lo" ] ]
```
```
diff --git a/test/command/gfm.md b/test/command/gfm.md
index f1bce1b89..78736b2d6 100644
--- a/test/command/gfm.md
+++ b/test/command/gfm.md
@@ -7,37 +7,76 @@ gfm tests:
| apple | 0.13 |
| orange|1.12|
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Fruit"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Price"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "apple"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "0.13"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1.12"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Fruit" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Price" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "apple" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "0.13" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1.12" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
% pandoc -f gfm -t native
~~stricken out~~
^D
-[Para [Strikeout [Str "stricken",Space,Str "out"]]]
+[ Para [ Strikeout [ Str "stricken" , Space , Str "out" ] ]
+]
```
```
@@ -46,30 +85,42 @@ gfm tests:
## Header
# -foo-bar_baz
^D
-[Header 1 ("header",[],[]) [Str "Header"]
-,Header 2 ("header-1",[],[]) [Str "Header"]
-,Header 1 ("-foo-bar_baz",[],[]) [Str "-foo-bar_baz"]]
+[ Header 1 ( "header" , [] , [] ) [ Str "Header" ]
+, Header 2 ( "header-1" , [] , [] ) [ Str "Header" ]
+, Header
+ 1 ( "-foo-bar_baz" , [] , [] ) [ Str "-foo-bar_baz" ]
+]
```
```
% pandoc -f gfm -t native
My:thumbsup:emoji:heart:
^D
-[Para [Str "My",Span ("",["emoji"],[("data-emoji","thumbsup")]) [Str "\128077"],Str "emoji",Span ("",["emoji"],[("data-emoji","heart")]) [Str "\10084\65039"]]]
+[ Para
+ [ Str "My"
+ , Span
+ ( "" , [ "emoji" ] , [ ( "data-emoji" , "thumbsup" ) ] )
+ [ Str "\128077" ]
+ , Str "emoji"
+ , Span
+ ( "" , [ "emoji" ] , [ ( "data-emoji" , "heart" ) ] )
+ [ Str "\10084\65039" ]
+ ]
+]
```
```
% pandoc -f gfm -t native
"hi"
^D
-[Para [Str "\"hi\""]]
+[ Para [ Str "\"hi\"" ] ]
```
```
% pandoc -f gfm+smart -t native
"hi"
^D
-[Para [Quoted DoubleQuote [Str "hi"]]]
+[ Para [ Quoted DoubleQuote [ Str "hi" ] ] ]
```
```
@@ -133,7 +184,7 @@ The caption.
hi
hi
^D
-[Para [Str "hi",LineBreak,Str "hi"]]
+[ Para [ Str "hi" , LineBreak , Str "hi" ] ]
```
```
@@ -141,9 +192,11 @@ hi
- [ ] foo
- [x] bar
^D
-[BulletList
- [[Plain [Str "\9744",Space,Str "foo"]]
- ,[Plain [Str "\9746",Space,Str "bar"]]]]
+[ BulletList
+ [ [ Plain [ Str "\9744" , Space , Str "foo" ] ]
+ , [ Plain [ Str "\9746" , Space , Str "bar" ] ]
+ ]
+]
```
```
@@ -151,9 +204,12 @@ hi
- [ ] foo
- [x] bar
^D
-[BulletList
- [[Plain [Str "[",Space,Str "]",Space,Str "foo"]]
- ,[Plain [Str "[x]",Space,Str "bar"]]]]
+[ BulletList
+ [ [ Plain [ Str "[" , Space , Str "]" , Space , Str "foo" ]
+ ]
+ , [ Plain [ Str "[x]" , Space , Str "bar" ] ]
+ ]
+]
```
```
diff --git a/test/command/hspace.md b/test/command/hspace.md
index a8b97b8bc..c011f17fc 100644
--- a/test/command/hspace.md
+++ b/test/command/hspace.md
@@ -8,7 +8,10 @@ Here they need to be inline:
\caption{lalune \hspace{2em} \vspace{1em} bloo}
\end{figure}
^D
-[RawBlock (Format "tex") "\\begin{figure}\n\\includegraphics{lalune.jpg}\n\\caption{lalune \\hspace{2em} \\vspace{1em} bloo}\n\\end{figure}"]
+[ RawBlock
+ (Format "tex")
+ "\\begin{figure}\n\\includegraphics{lalune.jpg}\n\\caption{lalune \\hspace{2em} \\vspace{1em} bloo}\n\\end{figure}"
+]
```
Here block:
@@ -32,14 +35,22 @@ F & T &\\
F & F &\\
\end{tabular}
^D
-[RawBlock (Format "tex") "\\begin{tabular}[t]{cc|c}\n\\(P\\) & \\(Q\\) & \\(P\\wedge Q\\)\\\\\n\\hline\nT & T &\\\\\nT & F &\\\\\nF & T &\\\\\nF & F &\\\\\n\\end{tabular}\n\\hspace{1em}\n\\begin{tabular}[t]{cc|c}\n\\(P\\) & \\(Q\\) & \\(P\\vee Q\\)\\\\\n\\hline\nT & T &\\\\\nT & F &\\\\\nF & T &\\\\\nF & F &\\\\\n\\end{tabular}"]
+[ RawBlock
+ (Format "tex")
+ "\\begin{tabular}[t]{cc|c}\n\\(P\\) & \\(Q\\) & \\(P\\wedge Q\\)\\\\\n\\hline\nT & T &\\\\\nT & F &\\\\\nF & T &\\\\\nF & F &\\\\\n\\end{tabular}\n\\hspace{1em}\n\\begin{tabular}[t]{cc|c}\n\\(P\\) & \\(Q\\) & \\(P\\vee Q\\)\\\\\n\\hline\nT & T &\\\\\nT & F &\\\\\nF & T &\\\\\nF & F &\\\\\n\\end{tabular}"
+]
```
```
% pandoc -f markdown+raw_tex -t native
hi\hspace{1em}there
^D
-[Para [Str "hi",RawInline (Format "tex") "\\hspace{1em}",Str "there"]]
+[ Para
+ [ Str "hi"
+ , RawInline (Format "tex") "\\hspace{1em}"
+ , Str "there"
+ ]
+]
```
```
@@ -50,7 +61,8 @@ hi
there
^D
-[Para [Str "hi"]
-,RawBlock (Format "tex") "\\hspace{1em}"
-,Para [Str "there"]]
+[ Para [ Str "hi" ]
+, RawBlock (Format "tex") "\\hspace{1em}"
+, Para [ Str "there" ]
+]
```
diff --git a/test/command/html-read-figure.md b/test/command/html-read-figure.md
index 9c604c706..d7eb96bb4 100644
--- a/test/command/html-read-figure.md
+++ b/test/command/html-read-figure.md
@@ -5,7 +5,11 @@
<figcaption>bar</figcaption>
</figure>
^D
-[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]]
+[ Para
+ [ Image
+ ( "" , [] , [] ) [ Str "bar" ] ( "foo.png" , "fig:voyage" )
+ ]
+]
```
```
@@ -15,7 +19,11 @@
<img src="foo.png" title="voyage">
</figure>
^D
-[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]]
+[ Para
+ [ Image
+ ( "" , [] , [] ) [ Str "bar" ] ( "foo.png" , "fig:voyage" )
+ ]
+]
```
```
@@ -24,7 +32,9 @@
<img src="foo.png" title="voyage">
</figure>
^D
-[Para [Image ("",[],[]) [] ("foo.png","fig:voyage")]]
+[ Para
+ [ Image ( "" , [] , [] ) [] ( "foo.png" , "fig:voyage" ) ]
+]
```
```
@@ -34,12 +44,22 @@
<figcaption>bar</figcaption>
</figure>
^D
-[Para [Image ("",[],[]) [Str "bar"] ("foo.png","fig:voyage")]]
+[ Para
+ [ Image
+ ( "" , [] , [] ) [ Str "bar" ] ( "foo.png" , "fig:voyage" )
+ ]
+]
```
```
% pandoc -f html -t native
<figure><img src="foo.png" title="voyage" alt="this is ignored"><figcaption>bar <strong>baz</strong></figcaption></figure>
^D
-[Para [Image ("",[],[]) [Str "bar",Space,Strong [Str "baz"]] ("foo.png","fig:voyage")]]
+[ Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "bar" , Space , Strong [ Str "baz" ] ]
+ ( "foo.png" , "fig:voyage" )
+ ]
+]
```
diff --git a/test/command/html-trim-definition-list-terms.md b/test/command/html-trim-definition-list-terms.md
index 08e58c73a..d2b019996 100644
--- a/test/command/html-trim-definition-list-terms.md
+++ b/test/command/html-trim-definition-list-terms.md
@@ -11,7 +11,15 @@
<dd>test</dd>
</dl>
^D
-[DefinitionList
- [([Str "foo",SoftBreak,Str "bar",LineBreak,Str "baz"],
- [[Plain [Str "test"]]])]]
+[ DefinitionList
+ [ ( [ Str "foo"
+ , SoftBreak
+ , Str "bar"
+ , LineBreak
+ , Str "baz"
+ ]
+ , [ [ Plain [ Str "test" ] ] ]
+ )
+ ]
+]
```
diff --git a/test/command/hyphenat.md b/test/command/hyphenat.md
index 3aae85101..ca418c111 100644
--- a/test/command/hyphenat.md
+++ b/test/command/hyphenat.md
@@ -2,48 +2,60 @@
% pandoc -f latex -t native
electromagnetic\hyp{}endioscopy
^D
-[Para [Str "electromagnetic-endioscopy"]]
+[ Para [ Str "electromagnetic-endioscopy" ] ]
```
```
% pandoc -f latex -t native
C\colonhyp\bshyp{}Windows\bshyp
^D
-[Para [Str "C:\173\\\173Windows\\\173"]]
+[ Para [ Str "C:\173\\\173Windows\\\173" ] ]
```
```
% pandoc -f latex -t native
\fshyp{}usr\fshyp{}share\fshyp
^D
-[Para [Str "/\173usr/\173share/\173"]]
+[ Para [ Str "/\173usr/\173share/\173" ] ]
```
```
% pandoc -f latex -t native
\fshyp{}home\fshyp{}schrieveslaach\fshyp\dothyp{}m2
^D
-[Para [Str "/\173home/\173schrieveslaach/\173.\173m2"]]
+[ Para [ Str "/\173home/\173schrieveslaach/\173.\173m2" ] ]
```
```
% pandoc -f latex -t native
\nohyphens{Pneumonoultramicroscopicsilicovolcanoconiosis}
^D
-[Para [Str "Pneumonoultramicroscopicsilicovolcanoconiosis"]]
+[ Para
+ [ Str "Pneumonoultramicroscopicsilicovolcanoconiosis" ]
+]
```
```
% pandoc -f latex -t native
\textnhtt{Pneumonoultramicroscopicsilicovolcanoconiosis}
^D
-[Para [Code ("",[],[]) "Pneumonoultramicroscopicsilicovolcanoconiosis"]]
+[ Para
+ [ Code
+ ( "" , [] , [] )
+ "Pneumonoultramicroscopicsilicovolcanoconiosis"
+ ]
+]
```
```
% pandoc -f latex -t native
\nhttfamily{Pneumonoultramicroscopicsilicovolcanoconiosis}
^D
-[Para [Code ("",[],[]) "Pneumonoultramicroscopicsilicovolcanoconiosis"]]
+[ Para
+ [ Code
+ ( "" , [] , [] )
+ "Pneumonoultramicroscopicsilicovolcanoconiosis"
+ ]
+]
```
diff --git a/test/command/ifstrequal.md b/test/command/ifstrequal.md
index 24ed7ef54..92fe6bf95 100644
--- a/test/command/ifstrequal.md
+++ b/test/command/ifstrequal.md
@@ -5,5 +5,12 @@
\h{a}
\h{b}
^D
-[Para [Emph [Str "no"],SoftBreak,Str "\225",SoftBreak,Str "b"]]
+[ Para
+ [ Emph [ Str "no" ]
+ , SoftBreak
+ , Str "\225"
+ , SoftBreak
+ , Str "b"
+ ]
+]
```
diff --git a/test/command/indented-fences.md b/test/command/indented-fences.md
index eb3b78212..12aade1a7 100644
--- a/test/command/indented-fences.md
+++ b/test/command/indented-fences.md
@@ -5,7 +5,7 @@
in y
```
^D
-[CodeBlock ("",["haskell"],[]) "let x = y\nin y"]
+[ CodeBlock ( "" , [ "haskell" ] , [] ) "let x = y\nin y" ]
`````
`````
% pandoc -t native
@@ -16,5 +16,7 @@ y +
y
~~~
^D
-[CodeBlock ("",["haskell"],[]) " let x = y\nin y +\ny +\ny"]
+[ CodeBlock
+ ( "" , [ "haskell" ] , [] ) " let x = y\nin y +\ny +\ny"
+]
`````
diff --git a/test/command/input-with-endinput.md b/test/command/input-with-endinput.md
new file mode 100644
index 000000000..55d298bc4
--- /dev/null
+++ b/test/command/input-with-endinput.md
@@ -0,0 +1,15 @@
+```
+% pandoc --from=latex -t native
+\begin{document}
+Visible
+
+\include{command/bar-endinput}
+
+Visible
+\end{document}
+^D
+[ Para [ Str "Visible" ]
+, Para [ Emph [ Str "hi" , Space , Str "there" ] ]
+, Para [ Str "Visible" ]
+]
+```
diff --git a/test/command/jats-figure-alt-text.md b/test/command/jats-figure-alt-text.md
new file mode 100644
index 000000000..229e52eda
--- /dev/null
+++ b/test/command/jats-figure-alt-text.md
@@ -0,0 +1,18 @@
+```
+% pandoc -f jats -t native
+<fig id="fig-1">
+ <caption>
+ <p>bar</p>
+ </caption>
+ <alt-text>alternative-decription</alt-text>
+ <graphic xlink:href="foo.png" xlink:alt-text="baz" />
+</fig>
+^D
+[ Para
+ [ Image
+ ( "fig-1" , [] , [ ( "alt" , "alternative-decription" ) ] )
+ [ Str "bar" ]
+ ( "foo.png" , "fig:" )
+ ]
+]
+```
diff --git a/test/command/latex-center.md b/test/command/latex-center.md
index 3d0bf0429..078a58068 100644
--- a/test/command/latex-center.md
+++ b/test/command/latex-center.md
@@ -7,7 +7,6 @@ Hello
\end{center}
^D
-[Div ("",["center"],[])
- [Para [Str "Hello"]]]
+[ Div ( "" , [ "center" ] , [] ) [ Para [ Str "Hello" ] ] ]
```
diff --git a/test/command/latex-color.md b/test/command/latex-color.md
index 9fd2585a3..97d7f84c0 100644
--- a/test/command/latex-color.md
+++ b/test/command/latex-color.md
@@ -4,21 +4,40 @@
% pandoc -f latex -t native
Hello \textcolor{red}{World}
^D
-[Para [Str "Hello",Space,Span ("",[],[("style","color: red")]) [Str "World"]]]
+[ Para
+ [ Str "Hello"
+ , Space
+ , Span
+ ( "" , [] , [ ( "style" , "color: red" ) ] ) [ Str "World" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\textcolor{red}{Hello} World
^D
-[Para [Span ("",[],[("style","color: red")]) [Str "Hello"],Space,Str "World"]]
+[ Para
+ [ Span
+ ( "" , [] , [ ( "style" , "color: red" ) ] ) [ Str "Hello" ]
+ , Space
+ , Str "World"
+ ]
+]
```
```
% pandoc -f latex -t native
Hello \textcolor{blue}{\textbf{World}}
^D
-[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]]]]
+[ Para
+ [ Str "Hello"
+ , Space
+ , Span
+ ( "" , [] , [ ( "style" , "color: blue" ) ] )
+ [ Strong [ Str "World" ] ]
+ ]
+]
```
@@ -26,7 +45,15 @@ Hello \textcolor{blue}{\textbf{World}}
% pandoc -f latex -t native
Hello \textcolor{blue}{\textbf{World}}.
^D
-[Para [Str "Hello",Space,Span ("",[],[("style","color: blue")]) [Strong [Str "World"]],Str "."]]
+[ Para
+ [ Str "Hello"
+ , Space
+ , Span
+ ( "" , [] , [ ( "style" , "color: blue" ) ] )
+ [ Strong [ Str "World" ] ]
+ , Str "."
+ ]
+]
```
```
@@ -38,10 +65,14 @@ Hello \textcolor{blue}{\textbf{World}}.
\end{itemize}
}
^D
-[Div ("",[],[("style","color: orange")])
- [BulletList
- [[Para [Str "Item",Space,Str "1"]]
- ,[Para [Str "Item",Space,Str "2"]]]]]
+[ Div
+ ( "" , [] , [ ( "style" , "color: orange" ) ] )
+ [ BulletList
+ [ [ Para [ Str "Item" , Space , Str "1" ] ]
+ , [ Para [ Str "Item" , Space , Str "2" ] ]
+ ]
+ ]
+]
```
```
@@ -53,11 +84,16 @@ Hello \textcolor{blue}{\textbf{World}}.
\end{itemize}
} some more text
^D
-[Div ("",[],[("style","color: blue")])
- [BulletList
- [[Para [Str "Item",Space,Str "1"]]
- ,[Para [Str "Item",Space,Str "2"]]]]
-,Para [Str "some",Space,Str "more",Space,Str "text"]]
+[ Div
+ ( "" , [] , [ ( "style" , "color: blue" ) ] )
+ [ BulletList
+ [ [ Para [ Str "Item" , Space , Str "1" ] ]
+ , [ Para [ Str "Item" , Space , Str "2" ] ]
+ ]
+ ]
+, Para
+ [ Str "some" , Space , Str "more" , Space , Str "text" ]
+]
```
# `\colorbox{}{}`
@@ -67,28 +103,57 @@ Hello \textcolor{blue}{\textbf{World}}.
% pandoc -f latex -t native
Hello \colorbox{red}{World}
^D
-[Para [Str "Hello",Space,Span ("",[],[("style","background-color: red")]) [Str "World"]]]
+[ Para
+ [ Str "Hello"
+ , Space
+ , Span
+ ( "" , [] , [ ( "style" , "background-color: red" ) ] )
+ [ Str "World" ]
+ ]
+]
```
```
% pandoc -f latex -t native
\colorbox{red}{Hello} World
^D
-[Para [Span ("",[],[("style","background-color: red")]) [Str "Hello"],Space,Str "World"]]
+[ Para
+ [ Span
+ ( "" , [] , [ ( "style" , "background-color: red" ) ] )
+ [ Str "Hello" ]
+ , Space
+ , Str "World"
+ ]
+]
```
```
% pandoc -f latex -t native
Hello \colorbox{blue}{\textbf{World}}
^D
-[Para [Str "Hello",Space,Span ("",[],[("style","background-color: blue")]) [Strong [Str "World"]]]]
+[ Para
+ [ Str "Hello"
+ , Space
+ , Span
+ ( "" , [] , [ ( "style" , "background-color: blue" ) ] )
+ [ Strong [ Str "World" ] ]
+ ]
+]
```
```
% pandoc -f latex -t native
Hello \colorbox{blue}{\textbf{World}}.
^D
-[Para [Str "Hello",Space,Span ("",[],[("style","background-color: blue")]) [Strong [Str "World"]],Str "."]]
+[ Para
+ [ Str "Hello"
+ , Space
+ , Span
+ ( "" , [] , [ ( "style" , "background-color: blue" ) ] )
+ [ Strong [ Str "World" ] ]
+ , Str "."
+ ]
+]
```
```
@@ -102,10 +167,14 @@ Hello \colorbox{blue}{\textbf{World}}.
\end{minipage}
}
^D
-[Div ("",[],[("style","background-color: orange")])
- [BulletList
- [[Para [Str "Item",Space,Str "1"]]
- ,[Para [Str "Item",Space,Str "2"]]]]]
+[ Div
+ ( "" , [] , [ ( "style" , "background-color: orange" ) ] )
+ [ BulletList
+ [ [ Para [ Str "Item" , Space , Str "1" ] ]
+ , [ Para [ Str "Item" , Space , Str "2" ] ]
+ ]
+ ]
+]
```
```
@@ -119,9 +188,14 @@ Hello \colorbox{blue}{\textbf{World}}.
\end{minipage}
} some more text
^D
-[Div ("",[],[("style","background-color: blue")])
- [BulletList
- [[Para [Str "Item",Space,Str "1"]]
- ,[Para [Str "Item",Space,Str "2"]]]]
-,Para [Str "some",Space,Str "more",Space,Str "text"]]
+[ Div
+ ( "" , [] , [ ( "style" , "background-color: blue" ) ] )
+ [ BulletList
+ [ [ Para [ Str "Item" , Space , Str "1" ] ]
+ , [ Para [ Str "Item" , Space , Str "2" ] ]
+ ]
+ ]
+, Para
+ [ Str "some" , Space , Str "more" , Space , Str "text" ]
+]
```
diff --git a/test/command/latex-command-comment.md b/test/command/latex-command-comment.md
index 640277f15..1a1317925 100644
--- a/test/command/latex-command-comment.md
+++ b/test/command/latex-command-comment.md
@@ -1,7 +1,7 @@
```
-pandoc -f latex -t native
+% pandoc -f latex -t native
\emph%
{hi}
^D
-[Para [Emph [Str "hi"]]]
+[ Para [ Emph [ Str "hi" ] ] ]
```
diff --git a/test/command/latex-fontawesome.md b/test/command/latex-fontawesome.md
index 2a7e91185..18512ac72 100644
--- a/test/command/latex-fontawesome.md
+++ b/test/command/latex-fontawesome.md
@@ -2,12 +2,12 @@
% pandoc -f latex -t native
Check: \faCheck
^D
-[Para [Str "Check:",Space,Str "\10003"]]
+[ Para [ Str "Check:" , Space , Str "\10003" ] ]
```
```
% pandoc -f latex -t native
Close: \faClose
^D
-[Para [Str "Close:",Space,Str "\10007"]]
+[ Para [ Str "Close:" , Space , Str "\10007" ] ]
```
diff --git a/test/command/latex-tabular-column-specs.md b/test/command/latex-tabular-column-specs.md
index 7767667aa..586fed3d1 100644
--- a/test/command/latex-tabular-column-specs.md
+++ b/test/command/latex-tabular-column-specs.md
@@ -11,35 +11,85 @@ f & 0.5 & 5,5 \\
\bottomrule
\end{tabular}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath ""]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "f1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "f2"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "0.5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "4"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "f"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "0.5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Math InlineMath "5,5"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "f1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "f2" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "0.5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "4" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "f" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "0.5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Math InlineMath "5,5" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/lettrine.md b/test/command/lettrine.md
index 7bbc20080..b4a2794d2 100644
--- a/test/command/lettrine.md
+++ b/test/command/lettrine.md
@@ -4,6 +4,17 @@
\lettrine[lhang=0.17]{A}{category} is
^D
-[Para [Span ("",["lettrine"],[]) [Str "A"],SmallCaps [Str "category"],Space,Str "is"]
-,Para [Span ("",["lettrine"],[]) [Str "A"],SmallCaps [Str "category"],Space,Str "is"]]
+[ Para
+ [ Span ( "" , [ "lettrine" ] , [] ) [ Str "A" ]
+ , SmallCaps [ Str "category" ]
+ , Space
+ , Str "is"
+ ]
+, Para
+ [ Span ( "" , [ "lettrine" ] , [] ) [ Str "A" ]
+ , SmallCaps [ Str "category" ]
+ , Space
+ , Str "is"
+ ]
+]
```
diff --git a/test/command/lstlisting.md b/test/command/lstlisting.md
index d928cc702..2ea8b4ba7 100644
--- a/test/command/lstlisting.md
+++ b/test/command/lstlisting.md
@@ -8,7 +8,16 @@ public class World {
}
\end{lstlisting}
^D
-[CodeBlock ("lst:Hello-World",["java"],[("language","Java"),("caption","Java Example"),("label","lst:Hello-World")]) "public class World {\n public static void main(String[] args) {\n System.out.println(\"Hello World\");\n }\n}"]
+[ CodeBlock
+ ( "lst:Hello-World"
+ , [ "java" ]
+ , [ ( "language" , "Java" )
+ , ( "caption" , "Java Example" )
+ , ( "label" , "lst:Hello-World" )
+ ]
+ )
+ "public class World {\n public static void main(String[] args) {\n System.out.println(\"Hello World\");\n }\n}"
+]
```
```
@@ -21,5 +30,15 @@ public class World {
}
\end{lstlisting}
^D
-[CodeBlock ("lst:Hello-World",["java"],[("language","Java"),("escapechar","|"),("caption","Java Example"),("label","lst:Hello-World")]) "public class World {\n public static void main(String[] args) {\n System.out.println(\"Hello World\");\n }\n}"]
+[ CodeBlock
+ ( "lst:Hello-World"
+ , [ "java" ]
+ , [ ( "language" , "Java" )
+ , ( "escapechar" , "|" )
+ , ( "caption" , "Java Example" )
+ , ( "label" , "lst:Hello-World" )
+ ]
+ )
+ "public class World {\n public static void main(String[] args) {\n System.out.println(\"Hello World\");\n }\n}"
+]
```
diff --git a/test/command/macro-defs-in-preamble.md b/test/command/macro-defs-in-preamble.md
index dd5a503df..7bd72d140 100644
--- a/test/command/macro-defs-in-preamble.md
+++ b/test/command/macro-defs-in-preamble.md
@@ -9,8 +9,10 @@
$\vara \varb$
\end{document}
^D
-Pandoc (Meta {unMeta = fromList []})
-[RawBlock (Format "latex") "\\newcommand{\\vara}{\\alpha}"
-,RawBlock (Format "latex") "\\newcommand{\\varb}{b}"
-,Para [Math InlineMath "\\vara \\varb"]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ RawBlock (Format "latex") "\\newcommand{\\vara}{\\alpha}"
+ , RawBlock (Format "latex") "\\newcommand{\\varb}{b}"
+ , Para [ Math InlineMath "\\vara \\varb" ]
+ ]
```
diff --git a/test/command/macros.md b/test/command/macros.md
index e3c07e661..9f7a0f9d3 100644
--- a/test/command/macros.md
+++ b/test/command/macros.md
@@ -25,7 +25,7 @@ expanded at point of use:
```
% pandoc -f latex -t latex
\let\a\b
-\newcommand{\b}{\emph{ouk}}
+\def\b{\emph{ouk}}
\a a
^D
@@ -123,3 +123,39 @@ hello+hello
hello+goodbye
```
+```
+% pandoc -f latex -t plain
+\def\txt{a}
+\def\foo{\txt}
+\let\bar\foo
+\bar % -> a
+\def\txt{b}
+\bar % -> b
+\def\foo{OH}
+\bar % -> b
+^D
+a b b
+```
+
+```
+% pandoc -f latex -t plain
+\def\aaa{aaa}
+\def\bbb{x\aaa}
+\edef\ccc{y\aaa}
+\def\aaa{AAA}
+\bbb \ccc
+^D
+xAAAyaaa
+```
+
+```
+% pandoc -f latex -t plain
+\gdef\aaa{aaa}
+\gdef\bbb{x\aaa}
+\xdef\ccc{y\aaa}
+\gdef\aaa{AAA}
+\bbb \ccc
+^D
+xAAAyaaa
+```
+
diff --git a/test/command/md-abbrevs.md b/test/command/md-abbrevs.md
index 15ab8a728..a3ee6af30 100644
--- a/test/command/md-abbrevs.md
+++ b/test/command/md-abbrevs.md
@@ -6,7 +6,7 @@ space from being inserted in LaTeX output).
% pandoc -t native
Mr. Bob
^D
-[Para [Str "Mr.\160Bob"]]
+[ Para [ Str "Mr.\160Bob" ] ]
```
If you don't want this to happen you can escape the period:
@@ -15,6 +15,7 @@ If you don't want this to happen you can escape the period:
% pandoc -t native
Hi Mr\. Bob
^D
-[Para [Str "Hi",Space,Str "Mr.",Space,Str "Bob"]]
+[ Para [ Str "Hi" , Space , Str "Mr." , Space , Str "Bob" ]
+]
```
diff --git a/test/command/multiple-metadata-blocks.md b/test/command/multiple-metadata-blocks.md
index 5adbfe423..e117f3784 100644
--- a/test/command/multiple-metadata-blocks.md
+++ b/test/command/multiple-metadata-blocks.md
@@ -10,6 +10,10 @@ foo: bar
foo: bim
...
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaInlines [Str "bim"])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList [ ( "foo" , MetaInlines [ Str "bim" ] ) ]
+ }
+ []
```
diff --git a/test/command/pandoc-citeproc-31.md b/test/command/pandoc-citeproc-31.md
index a06b2ae41..91aaa8f0b 100644
--- a/test/command/pandoc-citeproc-31.md
+++ b/test/command/pandoc-citeproc-31.md
@@ -29,8 +29,9 @@ Foo.[^1] Bar.[^2] Baz.[^3]
::: {#refs .references .csl-bib-body}
::: {#ref-item1 .csl-entry}
-Olson HA, 'Codes, Costs, and Critiques: The Organization of Information
-in *Library Quarterly*, 1931--2004' (2006) 76 *Library Quarterly* 19
+Olson HA, '[Codes, Costs, and Critiques: The Organization of Information
+in *Library Quarterly*, 1931--2004](https://doi.org/10.1086/504343)'
+(2006) 76 *Library Quarterly* 19
:::
::: {#ref-item2 .csl-entry}
diff --git a/test/command/pandoc-citeproc-312.md b/test/command/pandoc-citeproc-312.md
index dfc4fe25c..20a9b759b 100644
--- a/test/command/pandoc-citeproc-312.md
+++ b/test/command/pandoc-citeproc-312.md
@@ -6,7 +6,7 @@ nocite: '@*'
references:
- author:
- literal: NN
- id: Y
+ id: 'Y'
issued:
- year: 1950
title: 'Date: Year'
diff --git a/test/command/pandoc-citeproc-327.md b/test/command/pandoc-citeproc-327.md
index 92b29bdf8..2ea3a247e 100644
--- a/test/command/pandoc-citeproc-327.md
+++ b/test/command/pandoc-citeproc-327.md
@@ -44,8 +44,8 @@ I referenced something here^\[1\]^
::: {#refs .references .csl-bib-body}
::: {#ref-LiLiaoDongWanHaiYuDiQiDongWuCiJiShengChanLiYanJiuJiShengJingGuaYiXingPingJie2017 .csl-entry}
[\[1\] ]{.csl-left-margin}[李轶平, 于旭光, 孙明, 等.
-辽东湾海域底栖动物次级生产力研究及生境适宜性评价\[J\]. 水产科学,
-2017(06): 728--734.]{.csl-right-inline}
+[辽东湾海域底栖动物次级生产力研究及生境适宜性评价](http://kns.cnki.net/kns/detail/detail.aspx?QueryID=4&CurRec=4&recid=&FileName=CHAN201706006&DbName=CJFDLAST2018&DbCode=CJFQ&yx=Y&pr=&URLID=21.1110.S.20171129.1725.006)\[J\].
+水产科学, 2017(6): 728--734.]{.csl-right-inline}
:::
:::
```
diff --git a/test/command/pandoc-citeproc-338.md b/test/command/pandoc-citeproc-338.md
index 3250b680e..c9cf0d254 100644
--- a/test/command/pandoc-citeproc-338.md
+++ b/test/command/pandoc-citeproc-338.md
@@ -28,8 +28,7 @@ references:
::: {#ref-item-1 .csl-entry}
[Wolfinger, Christine]{.smallcaps}: *Keine Angst vor Linux, Unix: ein
Lehrbuch für Linux- und Unix-Anwender*. 11., vollst. überarb. Aufl.
-Aufl. Berlin \[u.a.\] : Springer Vieweg, 2013
---- ISBN [978-3-642-32078-1](https://worldcat.org/isbn/978-3-642-32078-1)
+Aufl. Berlin \[u.a.\] : Springer Vieweg, 2013 --- ISBN 978-3-642-32078-1
:::
:::
```
diff --git a/test/command/pandoc-citeproc-386.md b/test/command/pandoc-citeproc-386.md
index 6f346e7db..ae709fc34 100644
--- a/test/command/pandoc-citeproc-386.md
+++ b/test/command/pandoc-citeproc-386.md
@@ -28,8 +28,8 @@ references:
::: {#refs .references .csl-bib-body line-spacing="2"}
::: {#ref-ding_metallic_2012 .csl-entry}
-[\[1\] ]{.csl-left-margin}[K. Ding, C. Z. Ning, *Light Sci. Appl.*
-**2012**, *1*, e20.]{.csl-right-inline}
+[[\[1\]K. Ding, C. Z. Ning, *Light Sci. Appl.* **2012**, *1*,
+e20](https://doi.org/10.1038/lsa.2012.20)]{.csl-left-margin}.
:::
:::
```
diff --git a/test/command/refs.md b/test/command/refs.md
index 320d63e17..c6457be4c 100644
--- a/test/command/refs.md
+++ b/test/command/refs.md
@@ -2,21 +2,78 @@
% pandoc -f latex -t native
Figure \ref{fig:1}
^D
-[Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:1")]) [Str "[fig:1]"] ("#fig:1","")]]
+[ Para
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:1" )
+ ]
+ )
+ [ Str "[fig:1]" ]
+ ( "#fig:1" , "" )
+ ]
+]
```
```
% pandoc -f latex -t native
Figure \cref{fig:1}
^D
-[Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:1")]) [Str "[fig:1]"] ("#fig:1","")]]
+[ Para
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:1" )
+ ]
+ )
+ [ Str "[fig:1]" ]
+ ( "#fig:1" , "" )
+ ]
+]
```
```
% pandoc -f latex -t native
Figure \vref{fig:1}
^D
-[Para [Str "Figure",Space,Link ("",[],[("reference-type","ref+page"),("reference","fig:1")]) [Str "[fig:1]"] ("#fig:1","")]]
+[ Para
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref+page" )
+ , ( "reference" , "fig:1" )
+ ]
+ )
+ [ Str "[fig:1]" ]
+ ( "#fig:1" , "" )
+ ]
+]
+```
+
+```
+% pandoc -f latex -t native
+\autoref{fig:flowchart}
+^D
+[ Para
+ [ Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "autoref" )
+ , ( "reference" , "fig:flowchart" )
+ ]
+ )
+ [ Str "[fig:flowchart]" ]
+ ( "#fig:flowchart" , "" )
+ ]
+]
```
```
@@ -28,8 +85,42 @@ Accuracy~\eqref{eq:Accuracy} is the proportion, measuring true results among all
Accuracy = \frac{t_p + t_n}{t_p + f_p + f_n + t_n}
\end{equation}
^D
-[Para [Str "Accuracy\160",Link ("",[],[("reference-type","eqref"),("reference","eq:Accuracy")]) [Str "[eq:Accuracy]"] ("#eq:Accuracy",""),Space,Str "is",Space,Str "the",Space,Str "proportion,",Space,Str "measuring",Space,Str "true",Space,Str "results",Space,Str "among",Space,Str "all",Space,Str "results."]
-,Para [Math DisplayMath "\\label{eq:Accuracy}\n Accuracy = \\frac{t_p + t_n}{t_p + f_p + f_n + t_n}"]]
+[ Para
+ [ Str "Accuracy\160"
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "eqref" )
+ , ( "reference" , "eq:Accuracy" )
+ ]
+ )
+ [ Str "[eq:Accuracy]" ]
+ ( "#eq:Accuracy" , "" )
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "proportion,"
+ , Space
+ , Str "measuring"
+ , Space
+ , Str "true"
+ , Space
+ , Str "results"
+ , Space
+ , Str "among"
+ , Space
+ , Str "all"
+ , Space
+ , Str "results."
+ ]
+, Para
+ [ Math
+ DisplayMath
+ "\\label{eq:Accuracy}\n Accuracy = \\frac{t_p + t_n}{t_p + f_p + f_n + t_n}"
+ ]
+]
```
```
@@ -42,8 +133,34 @@ Accuracy~\eqref{eq:Accuracy} is the proportion, measuring true results among all
Figure \ref{fig:Logo} illustrated the SVG logo
^D
-[Para [Image ("fig:Logo",[],[]) [Str "Logo"] ("command/SVG_logo.svg","fig:")]
-,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo")]) [Str "1"] ("#fig:Logo",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"]]
+[ Para
+ [ Image
+ ( "fig:Logo" , [] , [] )
+ [ Str "Logo" ]
+ ( "command/SVG_logo.svg" , "fig:" )
+ ]
+, Para
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:Logo" )
+ ]
+ )
+ [ Str "1" ]
+ ( "#fig:Logo" , "" )
+ , Space
+ , Str "illustrated"
+ , Space
+ , Str "the"
+ , Space
+ , Str "SVG"
+ , Space
+ , Str "logo"
+ ]
+]
```
```
@@ -77,15 +194,91 @@ Figure \ref{fig:Logo2} illustrated the SVG logo
Figure \ref{fig:Logo3} illustrated the SVG logo
^D
-[Header 1 ("one",[],[]) [Str "One"]
-,Para [Image ("fig:Logo",[],[]) [Str "Logo"] ("command/SVG_logo.svg","fig:")]
-,Para [Image ("fig:Logo2",[],[]) [Str "Logo2"] ("command/SVG_logo2.svg","fig:")]
-,Header 1 ("two",[],[]) [Str "Two"]
-,Header 2 ("subone",[],[]) [Str "Subone"]
-,Para [Image ("fig:Logo3",[],[]) [Str "Logo3"] ("command/SVG_logo3.svg","fig:")]
-,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo")]) [Str "1.1"] ("#fig:Logo",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"]
-,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo2")]) [Str "1.2"] ("#fig:Logo2",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"]
-,Para [Str "Figure",Space,Link ("",[],[("reference-type","ref"),("reference","fig:Logo3")]) [Str "2.1"] ("#fig:Logo3",""),Space,Str "illustrated",Space,Str "the",Space,Str "SVG",Space,Str "logo"]]
+[ Header 1 ( "one" , [] , [] ) [ Str "One" ]
+, Para
+ [ Image
+ ( "fig:Logo" , [] , [] )
+ [ Str "Logo" ]
+ ( "command/SVG_logo.svg" , "fig:" )
+ ]
+, Para
+ [ Image
+ ( "fig:Logo2" , [] , [] )
+ [ Str "Logo2" ]
+ ( "command/SVG_logo2.svg" , "fig:" )
+ ]
+, Header 1 ( "two" , [] , [] ) [ Str "Two" ]
+, Header 2 ( "subone" , [] , [] ) [ Str "Subone" ]
+, Para
+ [ Image
+ ( "fig:Logo3" , [] , [] )
+ [ Str "Logo3" ]
+ ( "command/SVG_logo3.svg" , "fig:" )
+ ]
+, Para
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:Logo" )
+ ]
+ )
+ [ Str "1.1" ]
+ ( "#fig:Logo" , "" )
+ , Space
+ , Str "illustrated"
+ , Space
+ , Str "the"
+ , Space
+ , Str "SVG"
+ , Space
+ , Str "logo"
+ ]
+, Para
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:Logo2" )
+ ]
+ )
+ [ Str "1.2" ]
+ ( "#fig:Logo2" , "" )
+ , Space
+ , Str "illustrated"
+ , Space
+ , Str "the"
+ , Space
+ , Str "SVG"
+ , Space
+ , Str "logo"
+ ]
+, Para
+ [ Str "Figure"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "fig:Logo3" )
+ ]
+ )
+ [ Str "2.1" ]
+ ( "#fig:Logo3" , "" )
+ , Space
+ , Str "illustrated"
+ , Space
+ , Str "the"
+ , Space
+ , Str "SVG"
+ , Space
+ , Str "logo"
+ ]
+]
```
@@ -93,5 +286,20 @@ Figure \ref{fig:Logo3} illustrated the SVG logo
% pandoc -f latex -t native
\label{section} Section \ref{section}
^D
-[Para [Span ("section",[],[("label","section")]) [Str "[section]"],Space,Str "Section",Space,Link ("",[],[("reference-type","ref"),("reference","section")]) [Str "[section]"] ("#section","")]]
+[ Para
+ [ Span ( "section" , [] , [ ( "label" , "section" ) ] ) []
+ , Space
+ , Str "Section"
+ , Space
+ , Link
+ ( ""
+ , []
+ , [ ( "reference-type" , "ref" )
+ , ( "reference" , "section" )
+ ]
+ )
+ [ Str "[section]" ]
+ ( "#section" , "" )
+ ]
+]
```
diff --git a/test/command/setext-fenced-div.md b/test/command/setext-fenced-div.md
index 27301ea22..3494cbf70 100644
--- a/test/command/setext-fenced-div.md
+++ b/test/command/setext-fenced-div.md
@@ -4,6 +4,5 @@
---
:::
^D
-[Div ("",["cell"],[])
- [HorizontalRule]]
+[ Div ( "" , [ "cell" ] , [] ) [ HorizontalRule ] ]
```
diff --git a/test/command/shift-heading-level-by.md b/test/command/shift-heading-level-by.md
index 323783f24..1ce966989 100644
--- a/test/command/shift-heading-level-by.md
+++ b/test/command/shift-heading-level-by.md
@@ -8,9 +8,21 @@ title: My title
## Second
^D
-Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Str "My",Space,Str "title"])]})
-[Header 2 ("first-heading",[],[]) [Str "First",Space,Str "heading"]
-,Header 3 ("second",[],[]) [Str "Second"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "title"
+ , MetaInlines [ Str "My" , Space , Str "title" ]
+ )
+ ]
+ }
+ [ Header
+ 2
+ ( "first-heading" , [] , [] )
+ [ Str "First" , Space , Str "heading" ]
+ , Header 3 ( "second" , [] , [] ) [ Str "Second" ]
+ ]
```
```
@@ -25,8 +37,23 @@ title: Old title
# Another top-level heading
^D
-Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Str "First",Space,Str "heading"])]})
-[Header 1 ("second",[],[]) [Str "Second"]
-,Para [Str "Another",Space,Str "top-level",Space,Str "heading"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "title"
+ , MetaInlines [ Str "First" , Space , Str "heading" ]
+ )
+ ]
+ }
+ [ Header 1 ( "second" , [] , [] ) [ Str "Second" ]
+ , Para
+ [ Str "Another"
+ , Space
+ , Str "top-level"
+ , Space
+ , Str "heading"
+ ]
+ ]
```
diff --git a/test/command/sloppypar.md b/test/command/sloppypar.md
index e2ff4d550..44ec93af3 100644
--- a/test/command/sloppypar.md
+++ b/test/command/sloppypar.md
@@ -6,8 +6,111 @@ Sequi id qui facere et incidunt ut. Et fuga ut voluptate enim qui. Odit unde mag
Qui et temporibus explicabo. Esse ab ut quidem. Vel qui perspiciatis quae odio consectetur alias non sed. Quo consectetur libero omnis quos eius ad vel.
\end{sloppypar}
^D
-[Para [Str "Sequi",Space,Str "id",Space,Str "qui",Space,Str "facere",Space,Str "et",Space,Str "incidunt",Space,Str "ut.",Space,Str "Et",Space,Str "fuga",Space,Str "ut",Space,Str "voluptate",Space,Str "enim",Space,Str "qui.",Space,Str "Odit",Space,Str "unde",Space,Str "magni",Space,Str "ipsam",Space,Str "dicta",Space,Str "modi.",Space,Str "Modi",Space,Str "soluta",Space,Str "velit",Space,Str "est",Space,Str "aut",Space,Str "aut",Space,Str "possimus."]
-,Para [Str "Qui",Space,Str "et",Space,Str "temporibus",Space,Str "explicabo.",Space,Str "Esse",Space,Str "ab",Space,Str "ut",Space,Str "quidem.",Space,Str "Vel",Space,Str "qui",Space,Str "perspiciatis",Space,Str "quae",Space,Str "odio",Space,Str "consectetur",Space,Str "alias",Space,Str "non",Space,Str "sed.",Space,Str "Quo",Space,Str "consectetur",Space,Str "libero",Space,Str "omnis",Space,Str "quos",Space,Str "eius",Space,Str "ad",Space,Str "vel."]]
+[ Para
+ [ Str "Sequi"
+ , Space
+ , Str "id"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "facere"
+ , Space
+ , Str "et"
+ , Space
+ , Str "incidunt"
+ , Space
+ , Str "ut."
+ , Space
+ , Str "Et"
+ , Space
+ , Str "fuga"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "qui."
+ , Space
+ , Str "Odit"
+ , Space
+ , Str "unde"
+ , Space
+ , Str "magni"
+ , Space
+ , Str "ipsam"
+ , Space
+ , Str "dicta"
+ , Space
+ , Str "modi."
+ , Space
+ , Str "Modi"
+ , Space
+ , Str "soluta"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "est"
+ , Space
+ , Str "aut"
+ , Space
+ , Str "aut"
+ , Space
+ , Str "possimus."
+ ]
+, Para
+ [ Str "Qui"
+ , Space
+ , Str "et"
+ , Space
+ , Str "temporibus"
+ , Space
+ , Str "explicabo."
+ , Space
+ , Str "Esse"
+ , Space
+ , Str "ab"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "quidem."
+ , Space
+ , Str "Vel"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "perspiciatis"
+ , Space
+ , Str "quae"
+ , Space
+ , Str "odio"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "alias"
+ , Space
+ , Str "non"
+ , Space
+ , Str "sed."
+ , Space
+ , Str "Quo"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "libero"
+ , Space
+ , Str "omnis"
+ , Space
+ , Str "quos"
+ , Space
+ , Str "eius"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "vel."
+ ]
+]
```
```
@@ -18,6 +121,109 @@ Sequi id qui facere et incidunt ut. Et fuga ut voluptate enim qui. Odit unde mag
Qui et temporibus explicabo. Esse ab ut quidem. Vel qui perspiciatis quae odio consectetur alias non sed. Quo consectetur libero omnis quos eius ad vel.
\end{sloppypar}
^D
-[Para [Str "Sequi",Space,Str "id",Space,Str "qui",Space,Str "facere",Space,Str "et",Space,Str "incidunt",Space,Str "ut.",Space,Str "Et",Space,Str "fuga",Space,Str "ut",Space,Str "voluptate",Space,Str "enim",Space,Str "qui.",Space,Str "Odit",Space,Str "unde",Space,Str "magni",Space,Str "ipsam",Space,Str "dicta",Space,Str "modi.",Space,Str "Modi",Space,Str "soluta",Space,Str "velit",Space,Str "est",Space,Str "aut",Space,Str "aut",Space,Str "possimus."]
-,Para [Str "Qui",Space,Str "et",Space,Str "temporibus",Space,Str "explicabo.",Space,Str "Esse",Space,Str "ab",Space,Str "ut",Space,Str "quidem.",Space,Str "Vel",Space,Str "qui",Space,Str "perspiciatis",Space,Str "quae",Space,Str "odio",Space,Str "consectetur",Space,Str "alias",Space,Str "non",Space,Str "sed.",Space,Str "Quo",Space,Str "consectetur",Space,Str "libero",Space,Str "omnis",Space,Str "quos",Space,Str "eius",Space,Str "ad",Space,Str "vel."]]
+[ Para
+ [ Str "Sequi"
+ , Space
+ , Str "id"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "facere"
+ , Space
+ , Str "et"
+ , Space
+ , Str "incidunt"
+ , Space
+ , Str "ut."
+ , Space
+ , Str "Et"
+ , Space
+ , Str "fuga"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "qui."
+ , Space
+ , Str "Odit"
+ , Space
+ , Str "unde"
+ , Space
+ , Str "magni"
+ , Space
+ , Str "ipsam"
+ , Space
+ , Str "dicta"
+ , Space
+ , Str "modi."
+ , Space
+ , Str "Modi"
+ , Space
+ , Str "soluta"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "est"
+ , Space
+ , Str "aut"
+ , Space
+ , Str "aut"
+ , Space
+ , Str "possimus."
+ ]
+, Para
+ [ Str "Qui"
+ , Space
+ , Str "et"
+ , Space
+ , Str "temporibus"
+ , Space
+ , Str "explicabo."
+ , Space
+ , Str "Esse"
+ , Space
+ , Str "ab"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "quidem."
+ , Space
+ , Str "Vel"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "perspiciatis"
+ , Space
+ , Str "quae"
+ , Space
+ , Str "odio"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "alias"
+ , Space
+ , Str "non"
+ , Space
+ , Str "sed."
+ , Space
+ , Str "Quo"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "libero"
+ , Space
+ , Str "omnis"
+ , Space
+ , Str "quos"
+ , Space
+ , Str "eius"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "vel."
+ ]
+]
```
diff --git a/test/command/table-with-cell-align.md b/test/command/table-with-cell-align.md
index f6a454ad2..ccf119cbd 100644
--- a/test/command/table-with-cell-align.md
+++ b/test/command/table-with-cell-align.md
@@ -13,27 +13,50 @@
</tgroup>
</informaltable>
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignLeft (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignRight (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignLeft
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignRight
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
% pandoc -f native -t opendocument --quiet
diff --git a/test/command/table-with-column-span.md b/test/command/table-with-column-span.md
index 55977554f..d4e8bebd4 100644
--- a/test/command/table-with-column-span.md
+++ b/test/command/table-with-column-span.md
@@ -49,73 +49,182 @@
</tgroup>
</informaltable>
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)
- ,(AlignDefault,ColWidth 6.25e-2)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 8)
- [Para [Strong [Str "Octet",Space,Str "no.",Space,Str "1"]]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 8)
- [Para [Strong [Str "Octet",Space,Str "no.",Space,Str "2"]]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "16"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "15"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "14"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "13"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "12"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "11"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "10"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "9"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "8"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "7"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 8)
- [Para [Str "Code",Space,Str "A"]]
- ,Cell ("",[],[]) AlignCenter (RowSpan 1) (ColSpan 8)
- [Para [Str "Code",Space,Str "B"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ , ( AlignDefault , ColWidth 6.25e-2 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 8)
+ [ Para
+ [ Strong
+ [ Str "Octet"
+ , Space
+ , Str "no."
+ , Space
+ , Str "1"
+ ]
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 8)
+ [ Para
+ [ Strong
+ [ Str "Octet"
+ , Space
+ , Str "no."
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "16" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "15" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "14" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "13" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "11" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "10" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "9" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "8" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "7" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 8)
+ [ Para [ Str "Code" , Space , Str "A" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignCenter
+ (RowSpan 1)
+ (ColSpan 8)
+ [ Para [ Str "Code" , Space , Str "B" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
% pandoc -f native -t opendocument --quiet
diff --git a/test/command/tabularx.md b/test/command/tabularx.md
index 209517e00..399741732 100644
--- a/test/command/tabularx.md
+++ b/test/command/tabularx.md
@@ -20,44 +20,129 @@
\hline
\end{tabularx}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.3"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
@@ -82,44 +167,129 @@
\hline
\end{tabularx}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidth 0.25)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.3"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidth 0.25 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
```
@@ -144,42 +314,127 @@
\hline
\end{tabularx}
^D
-[Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidth 0.25)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidth 0.25)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Column",Space,Str "Heading",Space,Str "3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1.3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2.3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3.3"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidth 0.25 )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidth 0.25 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Column"
+ , Space
+ , Str "Heading"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1.3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2.3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3.3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
```
diff --git a/test/command/translations.md b/test/command/translations.md
index 34531df7c..8d1890467 100644
--- a/test/command/translations.md
+++ b/test/command/translations.md
@@ -2,14 +2,14 @@
% pandoc -f latex -t native -M lang=en
\figurename\ 2
^D
-[Para [Str "Figure\160\&2"]]
+[ Para [ Str "Figure\160\&2" ] ]
```
```
% pandoc -f latex -t native -M lang=de-DE
\figurename\ 2
^D
-[Para [Str "Abbildung\160\&2"]]
+[ Para [ Str "Abbildung\160\&2" ] ]
```
```
@@ -17,7 +17,7 @@
\setmainlanguage{german}
\figurename 2
^D
-[Para [Str "Abbildung2"]]
+[ Para [ Str "Abbildung2" ] ]
```
```
@@ -25,5 +25,5 @@
\figurename~2
\figurename.
^D
-[Para [Str "Slika\160\&2",SoftBreak,Str "Slika."]]
+[ Para [ Str "Slika\160\&2" , SoftBreak , Str "Slika." ] ]
```
diff --git a/test/command/video-audio.md b/test/command/video-audio.md
index 451b614d8..4fbd58db3 100644
--- a/test/command/video-audio.md
+++ b/test/command/video-audio.md
@@ -10,9 +10,13 @@
![](./test.jpg)
^D
-<p><video src="./test.mp4" controls=""><a href="./test.mp4">Video</a></video></p>
-<p><video src="foo/test.webm" width="300" controls=""><a href="foo/test.webm">Your browser does not support video.</a></video></p>
-<p><audio src="test.mp3" controls=""><a href="test.mp3">Audio</a></audio></p>
+<p><video src="./test.mp4" controls=""><a
+href="./test.mp4">Video</a></video></p>
+<p><video src="foo/test.webm" width="300" controls=""><a
+href="foo/test.webm">Your browser does not support
+video.</a></video></p>
+<p><audio src="test.mp3" controls=""><a
+href="test.mp3">Audio</a></audio></p>
<p><embed src="./test.pdf" /></p>
<p><img src="./test.jpg" /></p>
```
diff --git a/test/command/write18.md b/test/command/write18.md
index 5000c298b..4a3f10b85 100644
--- a/test/command/write18.md
+++ b/test/command/write18.md
@@ -3,12 +3,12 @@ Handle \write18{..} as raw tex:
% pandoc -t native
\write18{git --version}
^D
-[RawBlock (Format "tex") "\\write18{git --version}"]
+[ RawBlock (Format "tex") "\\write18{git --version}" ]
```
```
% pandoc -f latex+raw_tex -t native
\write18{git --version}
^D
-[RawBlock (Format "latex") "\\write18{git --version}"]
+[ RawBlock (Format "latex") "\\write18{git --version}" ]
```
diff --git a/test/command/yaml-metadata-blocks.md b/test/command/yaml-metadata-blocks.md
index 0733623dd..d92994b03 100644
--- a/test/command/yaml-metadata-blocks.md
+++ b/test/command/yaml-metadata-blocks.md
@@ -6,8 +6,10 @@ foo:
bar_: as should this
---
^D
-Pandoc (Meta {unMeta = fromList [("foo",MetaMap (fromList []))]})
-[]
+Pandoc
+ Meta
+ { unMeta = fromList [ ( "foo" , MetaMap (fromList []) ) ] }
+ []
```
```
% pandoc -s -t native
@@ -32,8 +34,32 @@ nested:
scientific: 3.7e-5
---
^D
-Pandoc (Meta {unMeta = fromList [("bool",MetaBool True),("empty",MetaList []),("float",MetaInlines [Str "1.5"]),("int",MetaInlines [Str "7"]),("more",MetaBool False),("nested",MetaMap (fromList [("bool",MetaBool True),("empty",MetaList []),("float",MetaInlines [Str "2.5"]),("int",MetaInlines [Str "8"]),("more",MetaBool False),("nothing",MetaInlines [Str "null"]),("scientific",MetaInlines [Str "3.7e-5"])])),("nothing",MetaInlines [Str "null"]),("scientific",MetaInlines [Str "3.7e-5"])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "bool" , MetaBool True )
+ , ( "empty" , MetaList [] )
+ , ( "float" , MetaInlines [ Str "1.5" ] )
+ , ( "int" , MetaInlines [ Str "7" ] )
+ , ( "more" , MetaBool False )
+ , ( "nested"
+ , MetaMap
+ (fromList
+ [ ( "bool" , MetaBool True )
+ , ( "empty" , MetaList [] )
+ , ( "float" , MetaInlines [ Str "2.5" ] )
+ , ( "int" , MetaInlines [ Str "8" ] )
+ , ( "more" , MetaBool False )
+ , ( "nothing" , MetaString "" )
+ , ( "scientific" , MetaInlines [ Str "3.7e-5" ] )
+ ])
+ )
+ , ( "nothing" , MetaString "" )
+ , ( "scientific" , MetaInlines [ Str "3.7e-5" ] )
+ ]
+ }
+ []
```
```
% pandoc -s -t native
@@ -43,8 +69,20 @@ array:
- bool: True
---
^D
-Pandoc (Meta {unMeta = fromList [("array",MetaList [MetaMap (fromList [("foo",MetaInlines [Str "bar"])]),MetaMap (fromList [("bool",MetaBool True)])])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "array"
+ , MetaList
+ [ MetaMap
+ (fromList [ ( "foo" , MetaInlines [ Str "bar" ] ) ])
+ , MetaMap (fromList [ ( "bool" , MetaBool True ) ])
+ ]
+ )
+ ]
+ }
+ []
```
```
% pandoc -s -t native --metadata-file command/yaml-metadata.yaml
@@ -52,12 +90,32 @@ Pandoc (Meta {unMeta = fromList [("array",MetaList [MetaMap (fromList [("foo",Me
title: document
---
^D
-Pandoc (Meta {unMeta = fromList [("other",MetaInlines [Emph [Str "markdown"],Space,Str "value"]),("title",MetaInlines [Str "document"])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "other"
+ , MetaInlines
+ [ Emph [ Str "markdown" ] , Space , Str "value" ]
+ )
+ , ( "title" , MetaInlines [ Str "document" ] )
+ ]
+ }
+ []
```
```
% pandoc -s -t native --metadata-file command/yaml-metadata.yaml -M title=cmdline
^D
-Pandoc (Meta {unMeta = fromList [("other",MetaInlines [Emph [Str "markdown"],Space,Str "value"]),("title",MetaString "cmdline")]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "other"
+ , MetaInlines
+ [ Emph [ Str "markdown" ] , Space , Str "value" ]
+ )
+ , ( "title" , MetaString "cmdline" )
+ ]
+ }
+ []
```
diff --git a/test/command/yaml-with-chomp.md b/test/command/yaml-with-chomp.md
index d4c4f7cfd..98cc76e18 100644
--- a/test/command/yaml-with-chomp.md
+++ b/test/command/yaml-with-chomp.md
@@ -7,6 +7,14 @@ ml: |-
BLOCK
...
^D
-Pandoc (Meta {unMeta = fromList [("ml",MetaBlocks [Para [Str "TEST"],Plain [Str "BLOCK"]])]})
-[]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "ml"
+ , MetaBlocks [ Para [ Str "TEST" ] , Plain [ Str "BLOCK" ] ]
+ )
+ ]
+ }
+ []
```
diff --git a/test/creole-reader.native b/test/creole-reader.native
index 00000434d..5590a14d1 100644
--- a/test/creole-reader.native
+++ b/test/creole-reader.native
@@ -1,132 +1,970 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("",[],[]) [Str "Top-level heading (1)"]
-,Header 2 ("",[],[]) [Str "This a test for creole 0.1 (2)"]
-,Header 3 ("",[],[]) [Str "This is a Subheading (3)"]
-,Header 4 ("",[],[]) [Str "Subsub (4)"]
-,Header 5 ("",[],[]) [Str "Subsubsub (5)"]
-,Para [Str "The",Space,Str "ending",Space,Str "equal",Space,Str "signs",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "displayed:"]
-,Header 1 ("",[],[]) [Str "Top-level heading (1)"]
-,Header 2 ("",[],[]) [Str "This a test for creole 0.1 (2)"]
-,Header 3 ("",[],[]) [Str "This is a Subheading (3)"]
-,Header 4 ("",[],[]) [Str "Subsub (4)"]
-,Header 5 ("",[],[]) [Str "Subsubsub (5)"]
-,Para [Str "You",Space,Str "can",Space,Str "make",Space,Str "things",Space,Strong [Str "bold"],Space,Str "or",Space,Emph [Str "italic"],Space,Str "or",Space,Strong [Emph [Str "both"]],Space,Str "or",Space,Emph [Strong [Str "both"]],Str "."]
-,Para [Str "Character",Space,Str "formatting",Space,Str "extends",Space,Str "across",Space,Str "line",Space,Str "breaks:",Space,Strong [Str "bold,",Space,Str "this",Space,Str "is",Space,Str "still",Space,Str "bold.",Space,Str "This",Space,Str "line",Space,Str "deliberately",Space,Str "does",Space,Str "not",Space,Str "end",Space,Str "in",Space,Str "star-star."]]
-,Para [Str "Not",Space,Str "bold.",Space,Str "Character",Space,Str "formatting",Space,Str "does",Space,Str "not",Space,Str "cross",Space,Str "paragraph",Space,Str "boundaries."]
-,Para [Str "You",Space,Str "can",Space,Str "use",Space,Link ("",[],[]) [Str "internal links"] ("internal links",""),Space,Str "or",Space,Link ("",[],[]) [Str "external links"] ("http://www.wikicreole.org",""),Str ",",Space,Str "give",Space,Str "the",Space,Str "link",Space,Str "a",Space,Link ("",[],[]) [Str "different"] ("internal links",""),Space,Str "name."]
-,Para [Str "Here's",Space,Str "another",Space,Str "sentence:",Space,Str "This",Space,Str "wisdom",Space,Str "is",Space,Str "taken",Space,Str "from",Space,Link ("",[],[]) [Str "Ward Cunningham's"] ("Ward Cunningham's",""),Space,Link ("",[],[]) [Str "Presentation at the Wikisym 06"] ("http://www.c2.com/doc/wikisym/WikiSym2006.pdf",""),Str "."]
-,Para [Str "Here's",Space,Str "a",Space,Str "external",Space,Str "link",Space,Str "without",Space,Str "a",Space,Str "description:",Space,Link ("",[],[]) [Str "http://www.wikicreole.org"] ("http://www.wikicreole.org","")]
-,Para [Str "Be",Space,Str "careful",Space,Str "that",Space,Str "italic",Space,Str "links",Space,Str "are",Space,Str "rendered",Space,Str "properly:",Space,Emph [Link ("",[],[]) [Str "My Book Title"] ("http://my.book.example/","")]]
-,Para [Str "Free",Space,Str "links",Space,Str "without",Space,Str "braces",Space,Str "should",Space,Str "be",Space,Str "rendered",Space,Str "as",Space,Str "well,",Space,Str "like",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/"] ("http://www.wikicreole.org/",""),Space,Str "and",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/users/~example"] ("http://www.wikicreole.org/users/~example",""),Str "."]
-,Para [Str "Creole1.0",Space,Str "specifies",Space,Str "that",Space,Link ("",[],[]) [Str "http://bar"] ("http://bar",""),Space,Str "and",Space,Link ("",[],[]) [Str "ftp://bar"] ("ftp://bar",""),Space,Str "should",Space,Str "not",Space,Str "render",Space,Str "italic,",Space,Str "something",Space,Str "like",Space,Str "foo:",Emph [Str "bar",Space,Str "should",Space,Str "render",Space,Str "as",Space,Str "italic."]]
-,Para [Str "You",Space,Str "can",Space,Str "use",Space,Str "this",Space,Str "to",Space,Str "draw",Space,Str "a",Space,Str "line",Space,Str "to",Space,Str "separate",Space,Str "the",Space,Str "page:"]
-,HorizontalRule
-,Para [Str "You",Space,Str "can",Space,Str "use",Space,Str "lists,",Space,Str "start",Space,Str "it",Space,Str "at",Space,Str "the",Space,Str "first",Space,Str "column",Space,Str "for",Space,Str "now,",Space,Str "please..."]
-,Para [Str "unnumbered",Space,Str "lists",Space,Str "are",Space,Str "like"]
-,BulletList
- [[Plain [Str "item",Space,Str "a"]]
- ,[Plain [Str "item",Space,Str "b"]]
- ,[Plain [Strong [Str "bold",Space,Str "item",Space,Str "c"]]]]
-,Para [Str "blank",Space,Str "space",Space,Str "is",Space,Str "also",Space,Str "permitted",Space,Str "before",Space,Str "lists",Space,Str "like:"]
-,BulletList
- [[Plain [Str "item",Space,Str "a"]]
- ,[Plain [Str "item",Space,Str "b"]]
- ,[Plain [Str "item",Space,Str "c"]
- ,BulletList
- [[Plain [Str "item",Space,Str "c.a"]]]]]
-,Para [Str "or",Space,Str "you",Space,Str "can",Space,Str "number",Space,Str "them"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Link ("",[],[]) [Str "item 1"] ("item 1","")]]
- ,[Plain [Str "item",Space,Str "2"]]
- ,[Plain [Emph [Space,Str "italic",Space,Str "item",Space,Str "3",Space]]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "item",Space,Str "3.1"]]
- ,[Plain [Str "item",Space,Str "3.2"]]]]]
-,Para [Str "up",Space,Str "to",Space,Str "five",Space,Str "levels"]
-,BulletList
- [[Plain [Str "1"]
- ,BulletList
- [[Plain [Str "2"]
- ,BulletList
- [[Plain [Str "3"]
- ,BulletList
- [[Plain [Str "4"]
- ,BulletList
- [[Plain [Str "5"]]]]]]]]]]]
-,BulletList
- [[Plain [Str "You",Space,Str "can",Space,Str "have",Space,Str "multiline",Space,Str "list",Space,Str "items"]]
- ,[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "second",Space,Str "multiline",Space,Str "list",Space,Str "item"]]]
-,Para [Str "You",Space,Str "can",Space,Str "use",Space,Str "nowiki",Space,Str "syntax",Space,Str "if",Space,Str "you",Space,Str "would",Space,Str "like",Space,Str "do",Space,Str "stuff",Space,Str "like",Space,Str "this:"]
-,CodeBlock ("",[],[]) "Guitar Chord C:\n\n||---|---|---|\n||-0-|---|---|\n||---|---|---|\n||---|-0-|---|\n||---|---|-0-|\n||---|---|---|"
-,Para [Str "You",Space,Str "can",Space,Str "also",Space,Str "use",Space,Str "it",Space,Str "inline",Space,Str "nowiki",Space,Code ("",[],[]) " in a sentence ",Space,Str "like",Space,Str "this."]
-,Header 1 ("",[],[]) [Str "Escapes"]
-,Para [Str "Normal",Space,Str "Link:",Space,Link ("",[],[]) [Str "http://wikicreole.org/"] ("http://wikicreole.org/",""),Space,Str "-",Space,Str "now",Space,Str "same",Space,Str "link,",Space,Str "but",Space,Str "escaped:",Space,Str "http://wikicreole.org/"]
-,Para [Str "Normal",Space,Str "asterisks:",Space,Str "**not",Space,Str "bold**"]
-,Para [Str "a",Space,Str "tilde",Space,Str "alone:",Space,Str "~"]
-,Para [Str "a",Space,Str "tilde",Space,Str "escapes",Space,Str "itself:",Space,Str "~xxx"]
-,Header 3 ("",[],[]) [Str "Creole 0.2"]
-,Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "flower",Space,Str "with",Space,Str "the",Space,Str "ALT",Space,Str "text",Space,Str "\"this",Space,Str "is",Space,Str "a",Space,Str "flower\"",Space,Str "if",Space,Str "your",Space,Str "wiki",Space,Str "supports",Space,Str "ALT",Space,Str "text",Space,Str "on",Space,Str "images:"]
-,Para [Image ("",[],[]) [Str "here is a red flower"] ("Red-Flower.jpg","")]
-,Header 3 ("",[],[]) [Str "Creole 0.4"]
-,Para [Str "Tables",Space,Str "are",Space,Str "done",Space,Str "like",Space,Str "this:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "header",Space,Str "col1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "header",Space,Str "col2"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "you"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "can"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "also"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "align",LineBreak,Str "it."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "You",Space,Str "can",Space,Str "format",Space,Str "an",Space,Str "address",Space,Str "by",Space,Str "simply",Space,Str "forcing",Space,Str "linebreaks:"]
-,Para [Str "My",Space,Str "contact",Space,Str "dates:",LineBreak,Str "Pone:",Space,Str "xyz",LineBreak,Str "Fax:",Space,Str "+45",LineBreak,Str "Mobile:",Space,Str "abc"]
-,Header 3 ("",[],[]) [Str "Creole 0.5"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Header",Space,Str "title"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Another",Space,Str "header",Space,Str "title"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Code ("",[],[]) " //not italic text// "]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Code ("",[],[]) " **not bold text** "]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Emph [Str "italic",Space,Str "text"]]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Strong [Space,Str "bold",Space,Str "text",Space]]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 3 ("",[],[]) [Str "Creole 1.0"]
-,Para [Str "If",Space,Str "interwiki",Space,Str "links",Space,Str "are",Space,Str "setup",Space,Str "in",Space,Str "your",Space,Str "wiki,",Space,Str "this",Space,Str "links",Space,Str "to",Space,Str "the",Space,Str "WikiCreole",Space,Str "page",Space,Str "about",Space,Str "Creole",Space,Str "1.0",Space,Str "test",Space,Str "cases:",Space,Link ("",[],[]) [Str "WikiCreole:Creole1.0TestCases"] ("WikiCreole:Creole1.0TestCases",""),Str "."]
-,HorizontalRule
-,Para [Str "The",Space,Str "above",Space,Str "test",Space,Str "document",Space,Str "was",Space,Str "found",Space,Str "on",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/wiki/Creole1.0TestCases"] ("http://www.wikicreole.org/wiki/Creole1.0TestCases",""),Space,Str "and",Space,Str "downloaded",Space,Str "from",Space,Link ("",[],[]) [Str "http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt"] ("http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt",""),Str "."]
-,Para [Str "The",Space,Str "Creole",Space,Str "Wiki",Space,Str "is",Space,Str "licensed:",Space,Str "Copyright",Space,Str "(C)",Space,Str "by",Space,Str "the",Space,Str "contributors.",Space,Str "Some",Space,Str "rights",Space,Str "reserved,",Space,Str "license",Space,Link ("",[],[]) [Str "https://creativecommons.org/licenses/by-sa/1.0/"] ("BY-SA",""),Str "."]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header 1 ( "" , [] , [] ) [ Str "Top-level heading (1)" ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "This a test for creole 0.1 (2)" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "This is a Subheading (3)" ]
+ , Header 4 ( "" , [] , [] ) [ Str "Subsub (4)" ]
+ , Header 5 ( "" , [] , [] ) [ Str "Subsubsub (5)" ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "ending"
+ , Space
+ , Str "equal"
+ , Space
+ , Str "signs"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "displayed:"
+ ]
+ , Header 1 ( "" , [] , [] ) [ Str "Top-level heading (1)" ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "This a test for creole 0.1 (2)" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "This is a Subheading (3)" ]
+ , Header 4 ( "" , [] , [] ) [ Str "Subsub (4)" ]
+ , Header 5 ( "" , [] , [] ) [ Str "Subsubsub (5)" ]
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "make"
+ , Space
+ , Str "things"
+ , Space
+ , Strong [ Str "bold" ]
+ , Space
+ , Str "or"
+ , Space
+ , Emph [ Str "italic" ]
+ , Space
+ , Str "or"
+ , Space
+ , Strong [ Emph [ Str "both" ] ]
+ , Space
+ , Str "or"
+ , Space
+ , Emph [ Strong [ Str "both" ] ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Character"
+ , Space
+ , Str "formatting"
+ , Space
+ , Str "extends"
+ , Space
+ , Str "across"
+ , Space
+ , Str "line"
+ , Space
+ , Str "breaks:"
+ , Space
+ , Strong
+ [ Str "bold,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "still"
+ , Space
+ , Str "bold."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "deliberately"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "end"
+ , Space
+ , Str "in"
+ , Space
+ , Str "star-star."
+ ]
+ ]
+ , Para
+ [ Str "Not"
+ , Space
+ , Str "bold."
+ , Space
+ , Str "Character"
+ , Space
+ , Str "formatting"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "cross"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "boundaries."
+ ]
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "use"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "internal links" ]
+ ( "internal links" , "" )
+ , Space
+ , Str "or"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "external links" ]
+ ( "http://www.wikicreole.org" , "" )
+ , Str ","
+ , Space
+ , Str "give"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "different" ]
+ ( "internal links" , "" )
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "another"
+ , Space
+ , Str "sentence:"
+ , Space
+ , Str "This"
+ , Space
+ , Str "wisdom"
+ , Space
+ , Str "is"
+ , Space
+ , Str "taken"
+ , Space
+ , Str "from"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "Ward Cunningham's" ]
+ ( "Ward Cunningham's" , "" )
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "Presentation at the Wikisym 06" ]
+ ( "http://www.c2.com/doc/wikisym/WikiSym2006.pdf" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "external"
+ , Space
+ , Str "link"
+ , Space
+ , Str "without"
+ , Space
+ , Str "a"
+ , Space
+ , Str "description:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.wikicreole.org" ]
+ ( "http://www.wikicreole.org" , "" )
+ ]
+ , Para
+ [ Str "Be"
+ , Space
+ , Str "careful"
+ , Space
+ , Str "that"
+ , Space
+ , Str "italic"
+ , Space
+ , Str "links"
+ , Space
+ , Str "are"
+ , Space
+ , Str "rendered"
+ , Space
+ , Str "properly:"
+ , Space
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "My Book Title" ]
+ ( "http://my.book.example/" , "" )
+ ]
+ ]
+ , Para
+ [ Str "Free"
+ , Space
+ , Str "links"
+ , Space
+ , Str "without"
+ , Space
+ , Str "braces"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "rendered"
+ , Space
+ , Str "as"
+ , Space
+ , Str "well,"
+ , Space
+ , Str "like"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.wikicreole.org/" ]
+ ( "http://www.wikicreole.org/" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.wikicreole.org/users/~example" ]
+ ( "http://www.wikicreole.org/users/~example" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Creole1.0"
+ , Space
+ , Str "specifies"
+ , Space
+ , Str "that"
+ , Space
+ , Link
+ ( "" , [] , [] ) [ Str "http://bar" ] ( "http://bar" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Link
+ ( "" , [] , [] ) [ Str "ftp://bar" ] ( "ftp://bar" , "" )
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "render"
+ , Space
+ , Str "italic,"
+ , Space
+ , Str "something"
+ , Space
+ , Str "like"
+ , Space
+ , Str "foo:"
+ , Emph
+ [ Str "bar"
+ , Space
+ , Str "should"
+ , Space
+ , Str "render"
+ , Space
+ , Str "as"
+ , Space
+ , Str "italic."
+ ]
+ ]
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "use"
+ , Space
+ , Str "this"
+ , Space
+ , Str "to"
+ , Space
+ , Str "draw"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "to"
+ , Space
+ , Str "separate"
+ , Space
+ , Str "the"
+ , Space
+ , Str "page:"
+ ]
+ , HorizontalRule
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "use"
+ , Space
+ , Str "lists,"
+ , Space
+ , Str "start"
+ , Space
+ , Str "it"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "column"
+ , Space
+ , Str "for"
+ , Space
+ , Str "now,"
+ , Space
+ , Str "please..."
+ ]
+ , Para
+ [ Str "unnumbered"
+ , Space
+ , Str "lists"
+ , Space
+ , Str "are"
+ , Space
+ , Str "like"
+ ]
+ , BulletList
+ [ [ Plain [ Str "item" , Space , Str "a" ] ]
+ , [ Plain [ Str "item" , Space , Str "b" ] ]
+ , [ Plain
+ [ Strong
+ [ Str "bold" , Space , Str "item" , Space , Str "c" ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "blank"
+ , Space
+ , Str "space"
+ , Space
+ , Str "is"
+ , Space
+ , Str "also"
+ , Space
+ , Str "permitted"
+ , Space
+ , Str "before"
+ , Space
+ , Str "lists"
+ , Space
+ , Str "like:"
+ ]
+ , BulletList
+ [ [ Plain [ Str "item" , Space , Str "a" ] ]
+ , [ Plain [ Str "item" , Space , Str "b" ] ]
+ , [ Plain [ Str "item" , Space , Str "c" ]
+ , BulletList
+ [ [ Plain [ Str "item" , Space , Str "c.a" ] ] ]
+ ]
+ ]
+ , Para
+ [ Str "or"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "number"
+ , Space
+ , Str "them"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Link ( "" , [] , [] ) [ Str "item 1" ] ( "item 1" , "" ) ]
+ ]
+ , [ Plain [ Str "item" , Space , Str "2" ] ]
+ , [ Plain
+ [ Emph
+ [ Space
+ , Str "italic"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ , Space
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "item" , Space , Str "3.1" ] ]
+ , [ Plain [ Str "item" , Space , Str "3.2" ] ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "up"
+ , Space
+ , Str "to"
+ , Space
+ , Str "five"
+ , Space
+ , Str "levels"
+ ]
+ , BulletList
+ [ [ Plain [ Str "1" ]
+ , BulletList
+ [ [ Plain [ Str "2" ]
+ , BulletList
+ [ [ Plain [ Str "3" ]
+ , BulletList
+ [ [ Plain [ Str "4" ]
+ , BulletList [ [ Plain [ Str "5" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "have"
+ , Space
+ , Str "multiline"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items"
+ ]
+ ]
+ , [ Plain
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "second"
+ , Space
+ , Str "multiline"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ ]
+ ]
+ ]
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "use"
+ , Space
+ , Str "nowiki"
+ , Space
+ , Str "syntax"
+ , Space
+ , Str "if"
+ , Space
+ , Str "you"
+ , Space
+ , Str "would"
+ , Space
+ , Str "like"
+ , Space
+ , Str "do"
+ , Space
+ , Str "stuff"
+ , Space
+ , Str "like"
+ , Space
+ , Str "this:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "Guitar Chord C:\n\n||---|---|---|\n||-0-|---|---|\n||---|---|---|\n||---|-0-|---|\n||---|---|-0-|\n||---|---|---|"
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "use"
+ , Space
+ , Str "it"
+ , Space
+ , Str "inline"
+ , Space
+ , Str "nowiki"
+ , Space
+ , Code ( "" , [] , [] ) " in a sentence "
+ , Space
+ , Str "like"
+ , Space
+ , Str "this."
+ ]
+ , Header 1 ( "" , [] , [] ) [ Str "Escapes" ]
+ , Para
+ [ Str "Normal"
+ , Space
+ , Str "Link:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://wikicreole.org/" ]
+ ( "http://wikicreole.org/" , "" )
+ , Space
+ , Str "-"
+ , Space
+ , Str "now"
+ , Space
+ , Str "same"
+ , Space
+ , Str "link,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "escaped:"
+ , Space
+ , Str "http://wikicreole.org/"
+ ]
+ , Para
+ [ Str "Normal"
+ , Space
+ , Str "asterisks:"
+ , Space
+ , Str "**not"
+ , Space
+ , Str "bold**"
+ ]
+ , Para
+ [ Str "a"
+ , Space
+ , Str "tilde"
+ , Space
+ , Str "alone:"
+ , Space
+ , Str "~"
+ ]
+ , Para
+ [ Str "a"
+ , Space
+ , Str "tilde"
+ , Space
+ , Str "escapes"
+ , Space
+ , Str "itself:"
+ , Space
+ , Str "~xxx"
+ ]
+ , Header 3 ( "" , [] , [] ) [ Str "Creole 0.2" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "flower"
+ , Space
+ , Str "with"
+ , Space
+ , Str "the"
+ , Space
+ , Str "ALT"
+ , Space
+ , Str "text"
+ , Space
+ , Str "\"this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "flower\""
+ , Space
+ , Str "if"
+ , Space
+ , Str "your"
+ , Space
+ , Str "wiki"
+ , Space
+ , Str "supports"
+ , Space
+ , Str "ALT"
+ , Space
+ , Str "text"
+ , Space
+ , Str "on"
+ , Space
+ , Str "images:"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "here is a red flower" ]
+ ( "Red-Flower.jpg" , "" )
+ ]
+ , Header 3 ( "" , [] , [] ) [ Str "Creole 0.4" ]
+ , Para
+ [ Str "Tables"
+ , Space
+ , Str "are"
+ , Space
+ , Str "done"
+ , Space
+ , Str "like"
+ , Space
+ , Str "this:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "header" , Space , Str "col1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "header" , Space , Str "col2" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col2" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "you" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "can" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "also" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "align" , LineBreak , Str "it." ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "format"
+ , Space
+ , Str "an"
+ , Space
+ , Str "address"
+ , Space
+ , Str "by"
+ , Space
+ , Str "simply"
+ , Space
+ , Str "forcing"
+ , Space
+ , Str "linebreaks:"
+ ]
+ , Para
+ [ Str "My"
+ , Space
+ , Str "contact"
+ , Space
+ , Str "dates:"
+ , LineBreak
+ , Str "Pone:"
+ , Space
+ , Str "xyz"
+ , LineBreak
+ , Str "Fax:"
+ , Space
+ , Str "+45"
+ , LineBreak
+ , Str "Mobile:"
+ , Space
+ , Str "abc"
+ ]
+ , Header 3 ( "" , [] , [] ) [ Str "Creole 0.5" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Header" , Space , Str "title" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Another"
+ , Space
+ , Str "header"
+ , Space
+ , Str "title"
+ ]
+ ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Code ( "" , [] , [] ) " //not italic text// " ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Code ( "" , [] , [] ) " **not bold text** " ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Emph [ Str "italic" , Space , Str "text" ] ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Strong
+ [ Space
+ , Str "bold"
+ , Space
+ , Str "text"
+ , Space
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header 3 ( "" , [] , [] ) [ Str "Creole 1.0" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "interwiki"
+ , Space
+ , Str "links"
+ , Space
+ , Str "are"
+ , Space
+ , Str "setup"
+ , Space
+ , Str "in"
+ , Space
+ , Str "your"
+ , Space
+ , Str "wiki,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "links"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , Space
+ , Str "WikiCreole"
+ , Space
+ , Str "page"
+ , Space
+ , Str "about"
+ , Space
+ , Str "Creole"
+ , Space
+ , Str "1.0"
+ , Space
+ , Str "test"
+ , Space
+ , Str "cases:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "WikiCreole:Creole1.0TestCases" ]
+ ( "WikiCreole:Creole1.0TestCases" , "" )
+ , Str "."
+ ]
+ , HorizontalRule
+ , Para
+ [ Str "The"
+ , Space
+ , Str "above"
+ , Space
+ , Str "test"
+ , Space
+ , Str "document"
+ , Space
+ , Str "was"
+ , Space
+ , Str "found"
+ , Space
+ , Str "on"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.wikicreole.org/wiki/Creole1.0TestCases" ]
+ ( "http://www.wikicreole.org/wiki/Creole1.0TestCases" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Str "downloaded"
+ , Space
+ , Str "from"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt"
+ ]
+ ( "http://www.wikicreole.org/attach/Creole1.0TestCases/creole1.0test.txt"
+ , ""
+ )
+ , Str "."
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "Creole"
+ , Space
+ , Str "Wiki"
+ , Space
+ , Str "is"
+ , Space
+ , Str "licensed:"
+ , Space
+ , Str "Copyright"
+ , Space
+ , Str "(C)"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "contributors."
+ , Space
+ , Str "Some"
+ , Space
+ , Str "rights"
+ , Space
+ , Str "reserved,"
+ , Space
+ , Str "license"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "https://creativecommons.org/licenses/by-sa/1.0/" ]
+ ( "BY-SA" , "" )
+ , Str "."
+ ]
+ ]
diff --git a/test/docbook-chapter.native b/test/docbook-chapter.native
index 396b6a21a..c77867ad9 100644
--- a/test/docbook-chapter.native
+++ b/test/docbook-chapter.native
@@ -1,17 +1,173 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("",[],[]) [Str "Test",Space,Str "Chapter"]
-,Para [Str "This",Space,Str "chapter",Space,Str "uses",Space,Str "recursive",Space,Str "sections."]
-,Header 2 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect1"]
-,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect1."]
-,Header 3 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect2"]
-,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect2."]
-,Header 4 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect3"]
-,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect3."]
-,Header 5 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect4"]
-,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect4."]
-,Header 6 ("",[],[]) [Str "Like",Space,Str "a",Space,Str "Sect5"]
-,Para [Str "This",Space,Str "section",Space,Str "is",Space,Str "like",Space,Str "a",Space,Str "Sect5."]
-,Header 7 ("",[],[]) [Str "Would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect6"]
-,Para [Str "This",Space,Str "section",Space,Str "would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect6,",Space,Str "if",Space,Str "there",Space,Str "was",Space,Str "one."]
-,Header 8 ("",[],[]) [Str "Would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect7"]
-,Para [Str "This",Space,Str "section",Space,Str "would",Space,Str "be",Space,Str "like",Space,Str "a",Space,Str "Sect7,",Space,Str "if",Space,Str "there",Space,Str "was",Space,Str "one."]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header
+ 1 ( "" , [] , [] ) [ Str "Test" , Space , Str "Chapter" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "chapter"
+ , Space
+ , Str "uses"
+ , Space
+ , Str "recursive"
+ , Space
+ , Str "sections."
+ ]
+ , Header
+ 2
+ ( "" , [] , [] )
+ [ Str "Like" , Space , Str "a" , Space , Str "Sect1" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "is"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect1."
+ ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Like" , Space , Str "a" , Space , Str "Sect2" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "is"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect2."
+ ]
+ , Header
+ 4
+ ( "" , [] , [] )
+ [ Str "Like" , Space , Str "a" , Space , Str "Sect3" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "is"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect3."
+ ]
+ , Header
+ 5
+ ( "" , [] , [] )
+ [ Str "Like" , Space , Str "a" , Space , Str "Sect4" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "is"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect4."
+ ]
+ , Header
+ 6
+ ( "" , [] , [] )
+ [ Str "Like" , Space , Str "a" , Space , Str "Sect5" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "is"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect5."
+ ]
+ , Header
+ 7
+ ( "" , [] , [] )
+ [ Str "Would"
+ , Space
+ , Str "be"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect6"
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "would"
+ , Space
+ , Str "be"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect6,"
+ , Space
+ , Str "if"
+ , Space
+ , Str "there"
+ , Space
+ , Str "was"
+ , Space
+ , Str "one."
+ ]
+ , Header
+ 8
+ ( "" , [] , [] )
+ [ Str "Would"
+ , Space
+ , Str "be"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect7"
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "would"
+ , Space
+ , Str "be"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "Sect7,"
+ , Space
+ , Str "if"
+ , Space
+ , Str "there"
+ , Space
+ , Str "was"
+ , Space
+ , Str "one."
+ ]
+ ]
diff --git a/test/docbook-reader.docbook b/test/docbook-reader.docbook
index f021dc8be..8b0b34c42 100644
--- a/test/docbook-reader.docbook
+++ b/test/docbook-reader.docbook
@@ -102,6 +102,11 @@ sub status {
print &quot;working&quot;;
}
</programlisting>
+ <programlisting linenumbering="numbered">
+sub status {
+ print &quot;working with line numbers&quot;;
+}
+</programlisting>
<screen>
% <command>ls</command>
</screen>
@@ -1598,4 +1603,20 @@ or here: &lt;http://example.com/&gt;
</step>
</procedure>
</sect1>
+<sect1 id="indexterms">
+ <title>Index terms</title>
+ <para>
+ In the simplest case, index terms<indexterm><primary>index term</primary></indexterm> consists of just a <code>&lt;primary&gt;</code> element, but <indexterm><primary>index term</primary><secondary>multi-level</secondary></indexterm> they can also consist of a <code>&lt;primary&gt;</code> <emph>and</emph> <code>&lt;secondary&gt;</code> element, and <indexterm><primary>index term</primary><secondary>multi-level</secondary><tertiary>3-level</tertiary></indexterm> can even include a <code>&lt;tertiary&gt;</code> term.
+ </para>
+ <para>
+ Index terms can also refer to other index terms: <indexterm><primary>index cross referencing</primary></indexterm><indexterm><primary>index term</primary><secondary>cross references</secondary><see>index cross referencing</see></indexterm>exclusively, using the <code>&lt;see&gt;</code> tag; or <indexterm><primary>index cross referencing</primary><seealso>cross referencing</seealso></indexterm> as a reference to related terms, using the <code>&lt;seealso&gt;</code> tag.
+ </para>
+ <para>
+ <indexterm><primary>food</primary><secondary>big <foreignphrase>baguette</foreignphrase> <strong>supreme</strong></secondary></indexterm>Nested content in index term elements is flattened.
+ </para>
+</sect1>
+<sect1 id="titleabbrev">
+ <title>Abbreviated title</title>
+ <titleabbrev>Abbr. title</titleabbrev>
+</sect1>
</article>
diff --git a/test/docbook-reader.native b/test/docbook-reader.native
index b1f5fd085..16eef6632 100644
--- a/test/docbook-reader.native
+++ b/test/docbook-reader.native
@@ -1,584 +1,3127 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",SoftBreak,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",SoftBreak,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,Header 1 ("headers",[],[]) [Str "Headers"]
-,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")]
-,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"]
-,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
-,Para [Str "Hi."]
-,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
-,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 4 ("",["unnumbered"],[]) [Str "Level",Space,Str "4"]
-,Para [Str "An",Space,Str "unnumbered",Space,Str "section."]
-,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",SoftBreak,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",SoftBreak,Str "a",Space,Str "list",Space,Str "item."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "E-mail",Space,Str "style:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,BlockQuote
- [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
- ,CodeBlock ("",[],[]) "% ls"
- ,Para [Str "A",Space,Str "list:"]
- ,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "item",Space,Str "one"]]
- ,[Para [Str "item",Space,Str "two"]]]
- ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
- ,BlockQuote
- [Para [Str "nested"]]
- ,BlockQuote
- [Para [Str "nested"]]]
-,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."]
-,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "loose:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and",Space,Str "using",Space,Str "spaces:"]
-,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Multiple",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
- ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",SoftBreak,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Header 2 ("nested",[],[]) [Str "Nested"]
-,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]]]]]]]
-,Para [Str "Here\8217s",Space,Str "another:"]
-,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
-,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]
- ,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]]
-,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
-,OrderedList (2,Decimal,DefaultDelim)
- [[Para [Str "begins",Space,Str "with",Space,Str "2"]]
- ,[Para [Str "and",Space,Str "now",Space,Str "3"]
- ,Para [Str "with",Space,Str "a",Space,Str "continuation"]
- ,OrderedList (4,LowerRoman,DefaultDelim)
- [[Para [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]]
- ,[Para [Str "more",Space,Str "items"]
- ,OrderedList (1,UpperAlpha,DefaultDelim)
- [[Para [Str "a",Space,Str "subsublist"]]
- ,[Para [Str "a",Space,Str "subsublist"]]]]]]]
-,Para [Str "Nesting:"]
-,OrderedList (1,UpperAlpha,DefaultDelim)
- [[Para [Str "Upper",Space,Str "Alpha"]
- ,OrderedList (1,UpperRoman,DefaultDelim)
- [[Para [Str "Upper",Space,Str "Roman."]
- ,OrderedList (6,Decimal,DefaultDelim)
- [[Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
- ,OrderedList (3,LowerAlpha,DefaultDelim)
- [[Para [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
-,Para [Str "Autonumbering:"]
-,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "Autonumber."]]
- ,[Para [Str "More."]
- ,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "Nested."]]]]]
-,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"]
-,Para [Str "M.A.\160\&2007"]
-,Para [Str "B.",Space,Str "Williams"]
-,Header 2 ("callout",[],[]) [Str "Callout"]
-,Para [Str "Simple."]
-,BulletList
- [[Para [Str "A",Space,Code ("",[],[]) "__letrec",Space,Str "is",Space,Str "equivalent",Space,Str "to",Space,Str "a",Space,Str "normal",SoftBreak,Str "Haskell",Space,Str "LET."]]
- ,[Para [Str "GHC",Space,Str "compiled",Space,Str "the",Space,Str "body",Space,Str "of",Space,Str "our",Space,Str "list",Space,Str "comprehension",Space,Str "into",SoftBreak,Str "a",Space,Str "loop",Space,Str "named",Space,Code ("",[],[]) "go_s1YC",Str "."]]
- ,[Para [Str "If",Space,Str "our",Space,Str "CASE",Space,Str "expression",Space,Str "matches",Space,Str "the",Space,Str "empty",Space,Str "list,",Space,Str "we",SoftBreak,Str "return",Space,Str "the",Space,Str "empty",Space,Str "list.",Space,Str "This",Space,Str "is",Space,Str "reassuringly",SoftBreak,Str "familiar."]]]
-,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Para [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
-,DefinitionList
- [([Emph [Str "apple"]],
- [[Para [Str "red",Space,Str "fruit"]
- ,Para [Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]])
- ,([Emph [Str "orange"]],
- [[Para [Str "orange",Space,Str "fruit"]
- ,CodeBlock ("",[],[]) "{ orange code block }"
- ,BlockQuote
- [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])]
-,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]
- ,[Para [Str "computer"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]
- ,[Para [Str "bank"]]])]
-,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]
- ,[Para [Str "computer"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]
- ,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "sublist"]]
- ,[Para [Str "sublist"]]]]])]
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",SoftBreak,Str "this"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",SoftBreak,Strong [Str "is",Space,Str "this"],Str "."]
-,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",SoftBreak,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",SoftBreak,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",SoftBreak,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",SoftBreak,Code ("",[],[]) "<html>",Str "."]
-,Para [Str "More",Space,Str "code:",Space,Code ("",[],[]) "Class",Space,Str "and",Space,Code ("",[],[]) "Type"]
-,Para [Str "Referencing",Space,Str "a",Space,Str "man",Space,Str "page:",Space,Code ("",["citerefentry"],[]) "nix.conf(5)"]
-,Para [Strikeout [Str "This",Space,Str "is",SoftBreak,Emph [Str "strikeout"],Str "."]]
-,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",SoftBreak,Str "a",Superscript [Emph [Str "hello"]],SoftBreak,Str "a",Superscript [Str "hello\160there"],Str "."]
-,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",SoftBreak,Str "H",Subscript [Str "many\160of\160them"],Str "O."]
-,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",SoftBreak,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."]
-,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
-,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",SoftBreak,Str "name."]]
-,Para [Quoted DoubleQuote [Str "A"],Str ",",Space,Quoted DoubleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted DoubleQuote [Str "C"],Space,Str "are",Space,Str "letters."]
-,Para [Quoted DoubleQuote [Str "He",Space,Str "said,",Space,Quoted SingleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"]
-,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."]
-,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."]
-,Para [Str "Ellipses\8230and\8230and\8230."]
-,Header 1 ("math",[],[]) []
-,Para [Math DisplayMath "e = mc^{2}",Math DisplayMath "1",SoftBreak,Math InlineMath "e = mc^{2}",SoftBreak,Math DisplayMath "e = mc^{2}"]
-,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Para [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Para [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Para [Str "section:",Space,Str "\167"]]
- ,[Para [Str "set",Space,Str "membership:",Space,Str "\8712"]]
- ,[Para [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,Header 1 ("links",[],[]) [Str "Links"]
-,Header 2 ("explicit",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
-,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")]
-,Para [Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
-,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
-,Header 2 ("reference",[],[]) [Str "Reference"]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."]
-,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."]
-,CodeBlock ("",[],[]) "[not]: /url"
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/",""),Str "."]
-,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",SoftBreak,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",SoftBreak,Link ("",[],[]) [Str "AT&T"] ("http://att.com/",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",SoftBreak,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
-,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
-,Para [Str "With",Space,Str "an",Space,Str "ampersand:",SoftBreak,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
-,BulletList
- [[Para [Str "In",Space,Str "a",Space,Str "list?"]]
- ,[Para [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
- ,[Para [Str "It",Space,Str "should."]]]
-,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
-,BlockQuote
- [Para [Str "Blockquoted:",SoftBreak,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
-,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",SoftBreak,Code ("",[],[]) "<http://example.com/>"]
-,CodeBlock ("",[],[]) "or here: <http://example.com/>"
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [Str "lalune",Space,Str "fig",Space,Str "caption"] ("lalune.jpg","fig:")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [] ("movie.jpg",""),Space,Str "icon.",SoftBreak,Str "And",Space,Str "here",Space,Str "a",Space,Str "second",Space,Str "movie",Space,Image ("",[],[]) [Str "alt",Space,Str "text"] ("movie.jpg",""),Space,Str "icon.",SoftBreak,Str "And",Space,Str "here",Space,Str "a",Space,Str "third",Space,Str "movie",Space,Image ("",[],[]) [Str "alt",Space,Str "text"] ("movie.jpg",""),Space,Str "icon."]
-,Para [Image ("",[],[]) [Str "lalune",Space,Str "no",Space,Str "figure",Space,Str "alt",Space,Str "text"] ("lalune.jpg","")]
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",Space,Str "reference.",SoftBreak,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",Space,Str "and",SoftBreak,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",SoftBreak,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",SoftBreak,Str "verbatim",Space,Str "characters,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]]
-,BlockQuote
- [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
-,OrderedList (1,Decimal,DefaultDelim)
- [[Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]]
-,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]
-,Header 1 ("tables",[],[]) [Str "Tables"]
-,Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Here's",Space,Str "the",Space,Str "caption.",Space,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."]])
- [(AlignCenter,ColWidth 0.2)
- ,(AlignLeft,ColWidth 0.2)
- ,(AlignRight,ColWidth 0.3)
- ,(AlignLeft,ColWidth 0.3)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Centered",Space,Str "Header"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",Space,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right",Space,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default",Space,Str "aligned"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidth 0.1)
- ,(AlignLeft,ColWidth 0.2)
- ,(AlignRight,ColWidth 0.3)
- ,(AlignLeft,ColWidth 0.4)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Centered",Space,Str "Header"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",Space,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right",Space,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default",Space,Str "aligned"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidth 0.25)
- ,(AlignLeft,ColWidth 0.25)
- ,(AlignRight,ColWidth 0.25)
- ,(AlignLeft,ColWidth 0.25)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,BulletList
- [[Para [Str "A",Space,Str "Step"]]
- ,[Para [Str "Another",Space,Str "Step"]
- ,Para [Str "Substeps",Space,Str "can",Space,Str "be",Space,Str "nested",Space,Str "indefinitely",Space,Str "deep."]]
- ,[Para [Str "A",Space,Str "Final",Space,Str "Step"]]]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines
+ [ Str "John" , SoftBreak , Str "MacFarlane" ]
+ , MetaInlines [ Str "Anonymous" ]
+ ]
+ )
+ , ( "date"
+ , MetaInlines
+ [ Str "July" , Space , Str "17," , Space , Str "2006" ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Suite"
+ ]
+ )
+ ]
+ }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ , Space
+ , Str "Most"
+ , Space
+ , Str "of"
+ , Space
+ , Str "them"
+ , Space
+ , Str "are"
+ , Space
+ , Str "adapted"
+ , Space
+ , Str "from"
+ , Space
+ , Str "John"
+ , SoftBreak
+ , Str "Gruber\8217s"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 2
+ ( "level-2-with-an-embedded-link" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Header
+ 3
+ ( "level-3-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 4 ( "level-4" , [] , [] ) [ Str "Level" , Space , Str "4" ]
+ , Header
+ 5 ( "level-5" , [] , [] ) [ Str "Level" , Space , Str "5" ]
+ , Para [ Str "Hi." ]
+ , Header
+ 1 ( "level-1" , [] , [] ) [ Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "level-2-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 3 ( "level-3" , [] , [] ) [ Str "Level" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header
+ 4
+ ( "" , [ "unnumbered" ] , [] )
+ [ Str "Level" , Space , Str "4" ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "unnumbered"
+ , Space
+ , Str "section."
+ ]
+ , Header
+ 2 ( "level-2" , [] , [] ) [ Str "Level" , Space , Str "2" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , Space
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , SoftBreak
+ , Str "item."
+ , Space
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "looked"
+ , Space
+ , Str "like"
+ , SoftBreak
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , Space
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , Para [ Str "E-mail" , Space , Str "style:" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ , CodeBlock
+ ( "" , [ "numberLines" ] , [] )
+ "sub status {\n print \"working with line numbers\";\n}"
+ , CodeBlock ( "" , [] , [] ) "% ls"
+ , Para [ Str "A" , Space , Str "list:" ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "item" , Space , Str "one" ] ]
+ , [ Para [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Para
+ [ Str "Nested"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quotes:"
+ ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ , Space
+ , Str "2"
+ , Space
+ , Str ">"
+ , Space
+ , Str "1."
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "a"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "and" , Space , Str "using" , Space , Str "spaces:" ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para [ Str "Multiple" , Space , Str "paragraphs:" ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "graf"
+ , Space
+ , Str "one."
+ ]
+ , Para
+ [ Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "graf"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "dog\8217s"
+ , SoftBreak
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList [ [ Para [ Str "Tab" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here\8217s" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "Same"
+ , Space
+ , Str "thing"
+ , Space
+ , Str "but"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paragraphs:"
+ ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "tabs-and-spaces" , [] , [] )
+ [ Str "Tabs" , Space , Str "and" , Space , Str "spaces" ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "fancy-list-markers" , [] , [] )
+ [ Str "Fancy" , Space , Str "list" , Space , Str "markers" ]
+ , OrderedList
+ ( 2 , Decimal , DefaultDelim )
+ [ [ Para
+ [ Str "begins" , Space , Str "with" , Space , Str "2" ]
+ ]
+ , [ Para [ Str "and" , Space , Str "now" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "continuation"
+ ]
+ , OrderedList
+ ( 4 , LowerRoman , DefaultDelim )
+ [ [ Para
+ [ Str "sublist"
+ , Space
+ , Str "with"
+ , Space
+ , Str "roman"
+ , Space
+ , Str "numerals,"
+ , Space
+ , Str "starting"
+ , Space
+ , Str "with"
+ , Space
+ , Str "4"
+ ]
+ ]
+ , [ Para [ Str "more" , Space , Str "items" ]
+ , OrderedList
+ ( 1 , UpperAlpha , DefaultDelim )
+ [ [ Para [ Str "a" , Space , Str "subsublist" ] ]
+ , [ Para [ Str "a" , Space , Str "subsublist" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Nesting:" ]
+ , OrderedList
+ ( 1 , UpperAlpha , DefaultDelim )
+ [ [ Para [ Str "Upper" , Space , Str "Alpha" ]
+ , OrderedList
+ ( 1 , UpperRoman , DefaultDelim )
+ [ [ Para [ Str "Upper" , Space , Str "Roman." ]
+ , OrderedList
+ ( 6 , Decimal , DefaultDelim )
+ [ [ Para
+ [ Str "Decimal"
+ , Space
+ , Str "start"
+ , Space
+ , Str "with"
+ , Space
+ , Str "6"
+ ]
+ , OrderedList
+ ( 3 , LowerAlpha , DefaultDelim )
+ [ [ Para
+ [ Str "Lower"
+ , Space
+ , Str "alpha"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paren"
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Autonumbering:" ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "Autonumber." ] ]
+ , [ Para [ Str "More." ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "Nested." ] ] ]
+ ]
+ ]
+ , Para
+ [ Str "Should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item:"
+ ]
+ , Para [ Str "M.A.\160\&2007" ]
+ , Para [ Str "B." , Space , Str "Williams" ]
+ , Header 2 ( "callout" , [] , [] ) [ Str "Callout" ]
+ , Para [ Str "Simple." ]
+ , BulletList
+ [ [ Para
+ [ Str "A"
+ , Space
+ , Code ( "" , [] , [] ) "__letrec"
+ , Space
+ , Str "is"
+ , Space
+ , Str "equivalent"
+ , Space
+ , Str "to"
+ , Space
+ , Str "a"
+ , Space
+ , Str "normal"
+ , SoftBreak
+ , Str "Haskell"
+ , Space
+ , Str "LET."
+ ]
+ ]
+ , [ Para
+ [ Str "GHC"
+ , Space
+ , Str "compiled"
+ , Space
+ , Str "the"
+ , Space
+ , Str "body"
+ , Space
+ , Str "of"
+ , Space
+ , Str "our"
+ , Space
+ , Str "list"
+ , Space
+ , Str "comprehension"
+ , Space
+ , Str "into"
+ , SoftBreak
+ , Str "a"
+ , Space
+ , Str "loop"
+ , Space
+ , Str "named"
+ , Space
+ , Code ( "" , [] , [] ) "go_s1YC"
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "If"
+ , Space
+ , Str "our"
+ , Space
+ , Str "CASE"
+ , Space
+ , Str "expression"
+ , Space
+ , Str "matches"
+ , Space
+ , Str "the"
+ , Space
+ , Str "empty"
+ , Space
+ , Str "list,"
+ , Space
+ , Str "we"
+ , SoftBreak
+ , Str "return"
+ , Space
+ , Str "the"
+ , Space
+ , Str "empty"
+ , Space
+ , Str "list."
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "reassuringly"
+ , SoftBreak
+ , Str "familiar."
+ ]
+ ]
+ ]
+ , Header
+ 1
+ ( "definition-lists" , [] , [] )
+ [ Str "Definition" , Space , Str "Lists" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Para [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "with"
+ , Space
+ , Str "italics:"
+ ]
+ , DefinitionList
+ [ ( [ Emph [ Str "apple" ] ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ]
+ , Para
+ [ Str "contains"
+ , Space
+ , Str "seeds,"
+ , Space
+ , Str "crisp,"
+ , Space
+ , Str "pleasant"
+ , Space
+ , Str "to"
+ , Space
+ , Str "taste"
+ ]
+ ]
+ ]
+ )
+ , ( [ Emph [ Str "orange" ] ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ]
+ , CodeBlock ( "" , [] , [] ) "{ orange code block }"
+ , BlockQuote
+ [ Para
+ [ Str "orange"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote"
+ ]
+ ]
+ ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "definitions,"
+ , Space
+ , Str "loose:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ]
+ , [ Para [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ]
+ , [ Para [ Str "bank" ] ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "after"
+ , Space
+ , Str "term,"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "marker,"
+ , Space
+ , Str "alternate"
+ , Space
+ , Str "markers:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ]
+ , [ Para [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para [ Str "sublist" ] ]
+ , [ Para [ Str "sublist" ] ]
+ ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , SoftBreak , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , SoftBreak
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "emphasized" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , SoftBreak
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , SoftBreak
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , SoftBreak
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , SoftBreak
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Str "More"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) "Class"
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "Type"
+ ]
+ , Para
+ [ Str "Referencing"
+ , Space
+ , Str "a"
+ , Space
+ , Str "man"
+ , Space
+ , Str "page:"
+ , Space
+ , Code ( "" , [ "citerefentry" ] , [] ) "nix.conf(5)"
+ ]
+ , Para
+ [ Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , SoftBreak
+ , Emph [ Str "strikeout" ]
+ , Str "."
+ ]
+ ]
+ , Para
+ [ Str "Superscripts:"
+ , Space
+ , Str "a"
+ , Superscript [ Str "bc" ]
+ , Str "d"
+ , SoftBreak
+ , Str "a"
+ , Superscript [ Emph [ Str "hello" ] ]
+ , SoftBreak
+ , Str "a"
+ , Superscript [ Str "hello\160there" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Subscripts:"
+ , Space
+ , Str "H"
+ , Subscript [ Str "2" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Subscript [ Str "23" ]
+ , Str "O,"
+ , SoftBreak
+ , Str "H"
+ , Subscript [ Str "many\160of\160them" ]
+ , Str "O."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "superscripts"
+ , Space
+ , Str "or"
+ , Space
+ , Str "subscripts,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "unescaped"
+ , SoftBreak
+ , Str "spaces:"
+ , Space
+ , Str "a^b"
+ , Space
+ , Str "c^d,"
+ , Space
+ , Str "a~b"
+ , Space
+ , Str "c~d."
+ ]
+ , Header
+ 1
+ ( "smart-quotes-ellipses-dashes" , [] , [] )
+ [ Str "Smart"
+ , Space
+ , Str "quotes,"
+ , Space
+ , Str "ellipses,"
+ , Space
+ , Str "dashes"
+ ]
+ , Para
+ [ Quoted DoubleQuote [ Str "Hello," ]
+ , Space
+ , Str "said"
+ , Space
+ , Str "the"
+ , Space
+ , Str "spider."
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Quoted SingleQuote [ Str "Shelob" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "my"
+ , SoftBreak
+ , Str "name."
+ ]
+ ]
+ , Para
+ [ Quoted DoubleQuote [ Str "A" ]
+ , Str ","
+ , Space
+ , Quoted DoubleQuote [ Str "B" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Quoted DoubleQuote [ Str "C" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "letters."
+ ]
+ , Para
+ [ Quoted
+ DoubleQuote
+ [ Str "He"
+ , Space
+ , Str "said,"
+ , Space
+ , Quoted
+ SingleQuote
+ [ Str "I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "go."
+ ]
+ ]
+ , Space
+ , Str "Were"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alive"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "70\8217s?"
+ ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "dashes:"
+ , Space
+ , Str "one\8212two"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "three\8212four"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "five."
+ ]
+ , Para
+ [ Str "Dashes"
+ , Space
+ , Str "between"
+ , Space
+ , Str "numbers:"
+ , Space
+ , Str "5\8211\&7,"
+ , Space
+ , Str "255\8211\&66,"
+ , Space
+ , Str "1987\8211\&1999."
+ ]
+ , Para [ Str "Ellipses\8230and\8230and\8230." ]
+ , Header 1 ( "math" , [] , [] ) []
+ , Para
+ [ Math DisplayMath "e = mc^{2}"
+ , Math DisplayMath "1"
+ , SoftBreak
+ , Math InlineMath "e = mc^{2}"
+ , SoftBreak
+ , Math DisplayMath "e = mc^{2}"
+ ]
+ , Header
+ 1
+ ( "special-characters" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "I" , Space , Str "hat:" , Space , Str "\206" ]
+ ]
+ , [ Para
+ [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Para [ Str "section:" , Space , Str "\167" ] ]
+ , [ Para
+ [ Str "set"
+ , Space
+ , Str "membership:"
+ , Space
+ , Str "\8712"
+ ]
+ ]
+ , [ Para [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "way"
+ , Space
+ , Str "to"
+ , Space
+ , Str "write"
+ , Space
+ , Str "it."
+ ]
+ , Para
+ [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para
+ [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para
+ [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para
+ [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para
+ [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para
+ [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para
+ [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "explicit" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "with_underscore" ]
+ ( "/url/with_underscore" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "nobody@nowhere.net" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "Empty" ] ( "" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "reference" , [] , [] ) [ Str "Reference" ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "[brackets]" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
+ , Space
+ , Str "by"
+ , Space
+ , Str "itself"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "thrice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "[not][]"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , CodeBlock ( "" , [] , [] ) "[not]: /url"
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "biz" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "with-ampersands" , [] , [] )
+ [ Str "With" , Space , Str "ampersands" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "amersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "AT&T" ] ( "http://att.com/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline" , Space , Str "link" ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline"
+ , Space
+ , Str "link"
+ , Space
+ , Str "in"
+ , Space
+ , Str "pointy"
+ , SoftBreak
+ , Str "braces"
+ ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "autolinks" , [] , [] ) [ Str "Autolinks" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "In" , Space , Str "a" , Space , Str "list?" ]
+ ]
+ , [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , [ Para [ Str "It" , Space , Str "should." ] ]
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "e-mail"
+ , Space
+ , Str "address:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "nobody@nowhere.net" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Blockquoted:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , Para
+ [ Str "Auto-links"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "occur"
+ , Space
+ , Str "here:"
+ , SoftBreak
+ , Code ( "" , [] , [] ) "<http://example.com/>"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "or here: <http://example.com/>"
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune"
+ ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "lalune" , Space , Str "fig" , Space , Str "caption" ]
+ ( "lalune.jpg" , "fig:" )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , Space
+ , Image ( "" , [] , [] ) [] ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ , SoftBreak
+ , Str "And"
+ , Space
+ , Str "here"
+ , Space
+ , Str "a"
+ , Space
+ , Str "second"
+ , Space
+ , Str "movie"
+ , Space
+ , Image
+ ( "" , [] , [] )
+ [ Str "alt" , Space , Str "text" ]
+ ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ , SoftBreak
+ , Str "And"
+ , Space
+ , Str "here"
+ , Space
+ , Str "a"
+ , Space
+ , Str "third"
+ , Space
+ , Str "movie"
+ , Space
+ , Image
+ ( "" , [] , [] )
+ [ Str "alt" , Space , Str "text" ]
+ ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "lalune"
+ , Space
+ , Str "no"
+ , Space
+ , Str "figure"
+ , Space
+ , Str "alt"
+ , Space
+ , Str "text"
+ ]
+ ( "lalune.jpg" , "" )
+ ]
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Note
+ [ Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "anywhere"
+ , Space
+ , Str "after"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference."
+ , SoftBreak
+ , Str "It"
+ , Space
+ , Str "need"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "placed"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document."
+ ]
+ ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "another."
+ , Note
+ [ Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "the"
+ , Space
+ , Str "long"
+ , Space
+ , Str "note."
+ , Space
+ , Str "This"
+ , Space
+ , Str "one"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "blocks."
+ ]
+ , Para
+ [ Str "Subsequent"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "are"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "to"
+ , Space
+ , Str "show"
+ , Space
+ , Str "that"
+ , Space
+ , Str "they"
+ , Space
+ , Str "belong"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "footnote"
+ , Space
+ , Str "(as"
+ , Space
+ , Str "with"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items)."
+ ]
+ , CodeBlock ( "" , [] , [] ) " { <code> }"
+ , Para
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "want,"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "every"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "be"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "and"
+ , SoftBreak
+ , Str "just"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "line"
+ , Space
+ , Str "of"
+ , Space
+ , Str "each"
+ , Space
+ , Str "block."
+ ]
+ ]
+ , Space
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Emph [ Str "not" ]
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , SoftBreak
+ , Str "because"
+ , Space
+ , Str "it"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "a"
+ , Space
+ , Str "space.[^my"
+ , Space
+ , Str "note]"
+ , Space
+ , Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "inline"
+ , Space
+ , Str "note."
+ , Note
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "easier" ]
+ , Space
+ , Str "to"
+ , Space
+ , Str "type."
+ , Space
+ , Str "Inline"
+ , Space
+ , Str "notes"
+ , Space
+ , Str "may"
+ , Space
+ , Str "contain"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "links" ]
+ ( "http://google.com" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "]"
+ , SoftBreak
+ , Str "verbatim"
+ , Space
+ , Str "characters,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "well"
+ , Space
+ , Str "as"
+ , Space
+ , Str "[bracketed"
+ , Space
+ , Str "text]."
+ ]
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Notes"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "in"
+ , Space
+ , Str "quotes."
+ , Note [ Para [ Str "In" , Space , Str "quote." ] ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , Decimal , DefaultDelim )
+ [ [ Para
+ [ Str "And"
+ , Space
+ , Str "in"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items."
+ , Note [ Para [ Str "In" , Space , Str "list." ] ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "note,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "it"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "indented."
+ ]
+ , Header 1 ( "tables" , [] , [] ) [ Str "Tables" ]
+ , Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "caption:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "two"
+ , Space
+ , Str "spaces:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "caption:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Here's"
+ , Space
+ , Str "the"
+ , Space
+ , Str "caption."
+ , Space
+ , Str "It"
+ , Space
+ , Str "may"
+ , Space
+ , Str "span"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ])
+ [ ( AlignCenter , ColWidth 0.2 )
+ , ( AlignLeft , ColWidth 0.2 )
+ , ( AlignRight , ColWidth 0.3 )
+ , ( AlignLeft , ColWidth 0.3 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Centered" , Space , Str "Header" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , Space , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" , Space , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" , Space , Str "aligned" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , Space
+ , Str "spans"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here's"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , Space
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidth 0.1 )
+ , ( AlignLeft , ColWidth 0.2 )
+ , ( AlignRight , ColWidth 0.3 )
+ , ( AlignLeft , ColWidth 0.4 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Centered" , Space , Str "Header" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , Space , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" , Space , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" , Space , Str "aligned" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , Space
+ , Str "spans"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here's"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , Space
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "column"
+ , Space
+ , Str "headers:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "column"
+ , Space
+ , Str "headers:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidth 0.25 )
+ , ( AlignLeft , ColWidth 0.25 )
+ , ( AlignRight , ColWidth 0.25 )
+ , ( AlignLeft , ColWidth 0.25 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , Space
+ , Str "spans"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here's"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , Space
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , BulletList
+ [ [ Para [ Str "A" , Space , Str "Step" ] ]
+ , [ Para [ Str "Another" , Space , Str "Step" ]
+ , Para
+ [ Str "Substeps"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "indefinitely"
+ , Space
+ , Str "deep."
+ ]
+ ]
+ , [ Para
+ [ Str "A" , Space , Str "Final" , Space , Str "Step" ]
+ ]
+ ]
+ , Header
+ 1
+ ( "indexterms" , [] , [] )
+ [ Str "Index" , Space , Str "terms" ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "the"
+ , Space
+ , Str "simplest"
+ , Space
+ , Str "case,"
+ , Space
+ , Str "index"
+ , Space
+ , Str "terms"
+ , Span
+ ( "" , [ "indexterm" ] , [ ( "primary" , "index term" ) ] )
+ []
+ , Space
+ , Str "consists"
+ , Space
+ , Str "of"
+ , Space
+ , Str "just"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "<primary>"
+ , Space
+ , Str "element,"
+ , Space
+ , Str "but"
+ , Space
+ , Span
+ ( ""
+ , [ "indexterm" ]
+ , [ ( "primary" , "index term" )
+ , ( "secondary" , "multi-level" )
+ ]
+ )
+ []
+ , Space
+ , Str "they"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "consist"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "<primary>"
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "<secondary>"
+ , Space
+ , Str "element,"
+ , Space
+ , Str "and"
+ , Space
+ , Span
+ ( ""
+ , [ "indexterm" ]
+ , [ ( "primary" , "index term" )
+ , ( "secondary" , "multi-level" )
+ , ( "tertiary" , "3-level" )
+ ]
+ )
+ []
+ , Space
+ , Str "can"
+ , Space
+ , Str "even"
+ , Space
+ , Str "include"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "<tertiary>"
+ , Space
+ , Str "term."
+ ]
+ , Para
+ [ Str "Index"
+ , Space
+ , Str "terms"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "refer"
+ , Space
+ , Str "to"
+ , Space
+ , Str "other"
+ , Space
+ , Str "index"
+ , Space
+ , Str "terms:"
+ , Space
+ , Span
+ ( ""
+ , [ "indexterm" ]
+ , [ ( "primary" , "index cross referencing" ) ]
+ )
+ []
+ , Span
+ ( ""
+ , [ "indexterm" ]
+ , [ ( "primary" , "index term" )
+ , ( "secondary" , "cross references" )
+ , ( "see" , "index cross referencing" )
+ ]
+ )
+ []
+ , Str "exclusively,"
+ , Space
+ , Str "using"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "<see>"
+ , Space
+ , Str "tag;"
+ , Space
+ , Str "or"
+ , Space
+ , Span
+ ( ""
+ , [ "indexterm" ]
+ , [ ( "primary" , "index cross referencing" )
+ , ( "seealso" , "cross referencing" )
+ ]
+ )
+ []
+ , Space
+ , Str "as"
+ , Space
+ , Str "a"
+ , Space
+ , Str "reference"
+ , Space
+ , Str "to"
+ , Space
+ , Str "related"
+ , Space
+ , Str "terms,"
+ , Space
+ , Str "using"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "<seealso>"
+ , Space
+ , Str "tag."
+ ]
+ , Para
+ [ Span
+ ( ""
+ , [ "indexterm" ]
+ , [ ( "primary" , "food" )
+ , ( "secondary" , "big baguette supreme" )
+ ]
+ )
+ []
+ , Str "Nested"
+ , Space
+ , Str "content"
+ , Space
+ , Str "in"
+ , Space
+ , Str "index"
+ , Space
+ , Str "term"
+ , Space
+ , Str "elements"
+ , Space
+ , Str "is"
+ , Space
+ , Str "flattened."
+ ]
+ , Header
+ 1
+ ( "titleabbrev"
+ , []
+ , [ ( "titleabbrev" , "Abbr. title" ) ]
+ )
+ [ Str "Abbreviated" , Space , Str "title" ]
+ ]
diff --git a/test/docbook-xref.native b/test/docbook-xref.native
index 54a63768e..2983eac0c 100644
--- a/test/docbook-xref.native
+++ b/test/docbook-xref.native
@@ -1,29 +1,177 @@
-Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Str "An",Space,Str "Example",Space,Str "Book"])]})
-[Header 1 ("ch01",[],[]) [Str "XRef",Space,Str "Samples"]
-,Para [Str "This",Space,Str "paragraph",Space,Str "demonstrates",Space,Str "several",Space,Str "features",Space,Str "of",SoftBreak,Str "XRef."]
-,BulletList
- [[Para [Str "A",Space,Str "straight",Space,Str "link",Space,Str "generates",Space,Str "the",SoftBreak,Str "cross-reference",Space,Str "text:",Space,Link ("",[],[]) [Str "The",Space,Str "Second",Space,Str "Chapter"] ("#ch02",""),Str "."]]
- ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",Space,Str "element",Space,Str "with",Space,Str "an",SoftBreak,Str "XRefLabel:",SoftBreak,Link ("",[],[]) [Str "Chapter",Space,Str "the",Space,Str "Third"] ("#ch03",""),Str "."]]
- ,[Para [Str "A",Space,Str "link",Space,Str "with",Space,Str "an",SoftBreak,Str "EndTerm:",SoftBreak,Link ("",[],[]) [Str "Chapter",Space,Str "4"] ("#ch04",""),Str "."]]
- ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",SoftBreak,Str "cmdsynopsis",Space,Str "element:",Space,Link ("",[],[]) [Str "chgrp"] ("#cmd01",""),Str "."]]
- ,[Para [Str "A",Space,Str "link",Space,Str "to",Space,Str "an",SoftBreak,Str "funcsynopsis",Space,Str "element:",Space,Link ("",[],[]) [Str "max"] ("#func01",""),Str "."]]]
-,Header 1 ("ch02",[],[]) [Str "The",Space,Str "Second",Space,Str "Chapter"]
-,Para [Str "Some",Space,Str "content",Space,Str "here"]
-,Header 1 ("ch03",[],[]) [Str "The",Space,Str "Third",Space,Str "Chapter"]
-,Para [Str "Some",Space,Str "content",Space,Str "here"]
-,Header 1 ("ch04",[],[]) [Str "The",Space,Str "Fourth",Space,Str "Chapter"]
-,Para [Str "Some",Space,Str "content",Space,Str "here"]
-,Plain [Str "chgrp"]
-,Plain [Str "-R"]
-,Plain [Str "-H"]
-,Plain [Str "-L"]
-,Plain [Str "-P"]
-,Plain [Str "-f"]
-,Plain [Str "group"]
-,Plain [Str "file"]
-,Plain [Str "int"]
-,Plain [Str "max"]
-,Plain [Str "int"]
-,Plain [Str "int1"]
-,Plain [Str "int"]
-,Plain [Str "int2"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "title"
+ , MetaInlines
+ [ Str "An"
+ , Space
+ , Str "Example"
+ , Space
+ , Str "Book"
+ ]
+ )
+ ]
+ }
+ [ Header
+ 1
+ ( "ch01" , [] , [] )
+ [ Str "XRef" , Space , Str "Samples" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "demonstrates"
+ , Space
+ , Str "several"
+ , Space
+ , Str "features"
+ , Space
+ , Str "of"
+ , SoftBreak
+ , Str "XRef."
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "A"
+ , Space
+ , Str "straight"
+ , Space
+ , Str "link"
+ , Space
+ , Str "generates"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "cross-reference"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Str "Second"
+ , Space
+ , Str "Chapter"
+ ]
+ ( "#ch02" , "" )
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "A"
+ , Space
+ , Str "link"
+ , Space
+ , Str "to"
+ , Space
+ , Str "an"
+ , Space
+ , Str "element"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Str "XRefLabel:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "Chapter"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Third"
+ ]
+ ( "#ch03" , "" )
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "A"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Str "EndTerm:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "Chapter" , Space , Str "4" ]
+ ( "#ch04" , "" )
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "A"
+ , Space
+ , Str "link"
+ , Space
+ , Str "to"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Str "cmdsynopsis"
+ , Space
+ , Str "element:"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "chgrp" ] ( "#cmd01" , "" )
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "A"
+ , Space
+ , Str "link"
+ , Space
+ , Str "to"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Str "funcsynopsis"
+ , Space
+ , Str "element:"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "max" ] ( "#func01" , "" )
+ , Str "."
+ ]
+ ]
+ ]
+ , Header
+ 1
+ ( "ch02" , [] , [] )
+ [ Str "The" , Space , Str "Second" , Space , Str "Chapter" ]
+ , Para
+ [ Str "Some" , Space , Str "content" , Space , Str "here" ]
+ , Header
+ 1
+ ( "ch03" , [] , [] )
+ [ Str "The" , Space , Str "Third" , Space , Str "Chapter" ]
+ , Para
+ [ Str "Some" , Space , Str "content" , Space , Str "here" ]
+ , Header
+ 1
+ ( "ch04" , [] , [ ( "titleabbrev" , "Chapter 4" ) ] )
+ [ Str "The" , Space , Str "Fourth" , Space , Str "Chapter" ]
+ , Para
+ [ Str "Some" , Space , Str "content" , Space , Str "here" ]
+ , Plain [ Str "chgrp" ]
+ , Plain [ Str "-R" ]
+ , Plain [ Str "-H" ]
+ , Plain [ Str "-L" ]
+ , Plain [ Str "-P" ]
+ , Plain [ Str "-f" ]
+ , Plain [ Str "group" ]
+ , Plain [ Str "file" ]
+ , Plain [ Str "int" ]
+ , Plain [ Str "max" ]
+ , Plain [ Str "int" ]
+ , Plain [ Str "int1" ]
+ , Plain [ Str "int" ]
+ , Plain [ Str "int2" ]
+ ]
diff --git a/test/docx/0_level_headers.native b/test/docx/0_level_headers.native
index ed589b029..7080063f9 100644
--- a/test/docx/0_level_headers.native
+++ b/test/docx/0_level_headers.native
@@ -39,9 +39,9 @@
[])
,Para [Str "CONTENTS"]
,Para [Strong [Str "Section",Space,Str "Page"]]
-,Para [Str "FIGURES",Space,Str "iv"]
-,Para [Str "TABLES",Space,Str "v"]
-,Para [Str "SECTION",Space,Str "1",Space,Str "Introduction",Space,Str "2"]
+,Para [Str "FIGURES",Space,Link ("",[],[]) [Str "iv"] ("#figures","")]
+,Para [Str "TABLES",Space,Link ("",[],[]) [Str "v"] ("#tables","")]
+,Para [Str "SECTION",Space,Str "1",Space,Str "Introduction",Space,Link ("",[],[]) [Str "2"] ("#introduction","")]
,Header 1 ("figures",["Heading-0"],[]) [Str "FIGURES"]
,Para [Strong [Str "Figure",Space,Str "Page"]]
,Para [Strong [Str "No",Space,Str "table",Space,Str "of",Space,Str "figures",Space,Str "entries",Space,Str "found."]]
diff --git a/test/docx/diagram.docx b/test/docx/diagram.docx
new file mode 100644
index 000000000..462cf8028
--- /dev/null
+++ b/test/docx/diagram.docx
Binary files differ
diff --git a/test/docx/diagram.native b/test/docx/diagram.native
new file mode 100644
index 000000000..0510497dc
--- /dev/null
+++ b/test/docx/diagram.native
@@ -0,0 +1,2 @@
+[Header 1 ("diagram-after",[],[]) [Str "Diagram",Space,Str "after:"]
+,Para [Span ("",["diagram"],[]) [Str "[DIAGRAM]"]]]
diff --git a/test/docx/empty_field.docx b/test/docx/empty_field.docx
new file mode 100644
index 000000000..fb3830b0d
--- /dev/null
+++ b/test/docx/empty_field.docx
Binary files differ
diff --git a/test/docx/empty_field.native b/test/docx/empty_field.native
new file mode 100644
index 000000000..18d892454
--- /dev/null
+++ b/test/docx/empty_field.native
@@ -0,0 +1,7 @@
+[Para
+ [Str "\24076\26395\28145\20837\20102\35299\30340\35835\32773\21487\20197\21435\30475David",Space,Str "French",Space,Str "Belding\21644Kevin",Space,Str "J.",Space,Str "Mitchell\30340"
+ ,Link ("",[],[]) [Str "Foundations",Space,Str "of",Space,Str "Analysis,",Space,Str "2nd",Space,Str "Edition"] ("https://books.google.com/books?id=sp_Zcb9ot90C&lpg=PR4&hl=zh-CN&pg=PA19#v=onepage&q&f=true",""),Str ",\21487\20174\&19\39029\30475\36215\65292\25110D.C.",Space,Str "Goldrei\30340",Space
+ ,Link ("",[],[]) [Str "Classic",Space,Str "Set",Space,Str "Theory:",Space,Str "For",Space,Str "Guided",Space,Str "Independent",Space,Str "Study"] ("https://books.google.ae/books?id=dlc0DwAAQBAJ&lpg=PT29&hl=zh-CN&pg=PT26#v=onepage&q&f=true","")
+ ,Str "\65292\20174\31532\20108\31456\30475\36215\65292\38405\35835\26102\35201\27880\24847\26412\25991\19982\36825\20123\20070\25152\19981\21516\30340\26159\24182\27809\26377\25226\23454\25968\30475\20316\26159\26377\29702\25968\38598\30340\20998\21106\12290"]
+,Para [Str "Index:"]
+,Para [Str "French,",Space,Str "1"]]
diff --git a/test/docx/golden/image.docx b/test/docx/golden/image.docx
index 7c2d8a9ac..099f705e4 100644
--- a/test/docx/golden/image.docx
+++ b/test/docx/golden/image.docx
Binary files differ
diff --git a/test/docx/golden/inline_images.docx b/test/docx/golden/inline_images.docx
index 662e70556..f3c19555f 100644
--- a/test/docx/golden/inline_images.docx
+++ b/test/docx/golden/inline_images.docx
Binary files differ
diff --git a/test/docx/golden/nested_anchors_in_header.docx b/test/docx/golden/nested_anchors_in_header.docx
index 88dd21abd..9d89070d9 100644
--- a/test/docx/golden/nested_anchors_in_header.docx
+++ b/test/docx/golden/nested_anchors_in_header.docx
Binary files differ
diff --git a/test/docx/image_vml.native b/test/docx/image_vml.native
index e9fded614..5991f333c 100644
--- a/test/docx/image_vml.native
+++ b/test/docx/image_vml.native
@@ -1,4 +1,3 @@
[Header 1 ("vml-image",[],[]) [Strong [Str "VML",Space,Str "Image"]]
-,BlockQuote
- [Para [Str "It",Space,Str "should",Space,Str "follow",Space,Str "below:"]
- ,Para [Image ("",[],[]) [] ("media/image4.jpeg","")]]]
+,Para [Str "It",Space,Str "should",Space,Str "follow",Space,Str "below:"]
+,Para [Image ("",[],[]) [] ("media/image4.jpeg","")]]
diff --git a/test/docx/image_writer_test.native b/test/docx/image_writer_test.native
index a0fb3ee3a..8d3bac1ee 100644
--- a/test/docx/image_writer_test.native
+++ b/test/docx/image_writer_test.native
@@ -1,8 +1,10 @@
[Para [Str "No",Space,Str "width",Space,Str "given:"]
-,Para [Image ("",[],[]) [Str "testimg"] ("lalune.jpg","fig:")]
+,Para [Image ("fig:testimg",[],[]) [Str "testimg"] ("lalune.jpg","fig:")]
,Para [Str "With",Space,Str "height",Space,Str "10cm:"]
-,Para [Image ("",[],[("height","10cm")]) [Str "2testimg"] ("lalune.jpg","fig:")]
+,Para [Image ("fig:2testimg",[],[("height","10cm")]) [Str "2testimg"] ("lalune.jpg","fig:")]
,Para [Str "With",Space,Str "width",Space,Str "6cm:"]
,Para [Image ("",[],[("width","6cm")]) [Str "3testimg"] ("lalune.jpg","fig:")]
,Header 1 ("with-height-3in-and-width-6in",[],[]) [Str "With",Space,Str "height",Space,Str "3in",Space,Str "and",Space,Str "width",Space,Str "6in:"]
-,Para [Image ("",[],[("width","6in"),("height","3in")]) [Str "4testimg"] ("lalune.jpg","fig:")]] \ No newline at end of file
+,Para [Image ("",[],[("width","6in"),("height","3in")]) [Str "4testimg"] ("lalune.jpg","fig:")]
+,Para [RawInline (Format "openxml") "<w:fldSimple w:instr=\"REF ref_fig:testimg\" />"]
+,Para [RawInline (Format "openxml") "<w:fldSimple w:instr=\"REF ref_fig:2testimg\" />"]]
diff --git a/test/docx/nested_anchors_in_header.native b/test/docx/nested_anchors_in_header.native
index 314b31663..9cc256d28 100644
--- a/test/docx/nested_anchors_in_header.native
+++ b/test/docx/nested_anchors_in_header.native
@@ -1,8 +1,8 @@
[Header 1 ("\1086\1075\1083\1072\1074\1083\1077\1085\1080\1077",["TOC-Heading"],[]) [Str "\1054\1075\1083\1072\1074\1083\1077\1085\1080\1077"]
-,Para [Link ("",[],[]) [Str "Short",Space,Str "instructions",Space,Str "1"] ("#short-instructions","")]
-,Para [Link ("",[],[]) [Str "Some",Space,Str "instructions",Space,Str "1"] ("#some-instructions","")]
-,Para [Link ("",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "opening",Space,Str "2"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")]
-,Para [Link ("",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "closing",Space,Str "2"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing","")]
+,Para [Link ("",[],[]) [Str "Short",Space,Str "instructions",Space,Link ("",[],[]) [Str "1"] ("#short-instructions","")] ("#short-instructions","")]
+,Para [Link ("",[],[]) [Str "Some",Space,Str "instructions",Space,Link ("",[],[]) [Str "1"] ("#some-instructions","")] ("#some-instructions","")]
+,Para [Link ("",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "opening",Space,Link ("",[],[]) [Str "2"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")]
+,Para [Link ("",[],[]) [Str "Remote",Space,Str "folder",Space,Str "or",Space,Str "longlonglonglonglong",Space,Str "file",Space,Str "with",Space,Str "manymanymanymany",Space,Str "letters",Space,Str "inside",Space,Str "closing",Space,Link ("",[],[]) [Str "2"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing","")] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-closing","")]
,Header 1 ("short-instructions",[],[]) [Str "Short",Space,Str "instructions"]
,Para [Link ("",[],[]) [Str "Open",Space,Str "remote",Space,Str "folder"] ("#remote-folder-or-longlonglonglonglong-file-with-manymanymanymany-letters-inside-opening","")]
,Para [Str "Do",Space,Str "staff"]
diff --git a/test/docx/nested_instrText.docx b/test/docx/nested_instrText.docx
new file mode 100644
index 000000000..532584193
--- /dev/null
+++ b/test/docx/nested_instrText.docx
Binary files differ
diff --git a/test/docx/nested_instrText.native b/test/docx/nested_instrText.native
new file mode 100644
index 000000000..730b041f5
--- /dev/null
+++ b/test/docx/nested_instrText.native
@@ -0,0 +1,5 @@
+[Para [Str "\24076\26395\28145\20837\20102\35299\30340\35835\32773\21487\20197\21435\30475David",Space,Str "French",Space,Str "Belding\21644Kevin",Space,Str "J.",Space,Str "Mitchell\30340"
+ ,Link ("",[],[]) [Str "Foundations",Space,Str "of",Space,Str "Analysis,",Space,Str "1/16/18",Space,Str "8:40:00",Space,Str "AM,",Space,Str "2nd",Space,Str "Edition"] ("https://books.google.com/books?id=sp_Zcb9ot90C&lpg=PR4&hl=zh-CN&pg=PA19#v=onepage&q&f=true","")
+ ,Str ",\21487\20174\&19\39029\30475\36215\65292\25110D.C.",Space,Str "Goldrei\30340",Space
+ ,Link ("",[],[]) [Str "Classic",Space,Str "Set",Space,Str "Theory:",Space,Str "For",Space,Str "Guided",Space,Str "Independent",Space,Str "Study"] ("https://books.google.ae/books?id=dlc0DwAAQBAJ&lpg=PT29&hl=zh-CN&pg=PT26#v=onepage&q&f=true","")
+ ,Str "\65292\20174\31532\20108\31456\30475\36215\65292\38405\35835\26102\35201\27880\24847\26412\25991\19982\36825\20123\20070\25152\19981\21516\30340\26159\24182\27809\26377\25226\23454\25968\30475\20316\26159\26377\29702\25968\38598\30340\20998\21106\12290"]]
diff --git a/test/docx/pageref.docx b/test/docx/pageref.docx
new file mode 100644
index 000000000..0a9159cab
--- /dev/null
+++ b/test/docx/pageref.docx
Binary files differ
diff --git a/test/docx/pageref.native b/test/docx/pageref.native
new file mode 100644
index 000000000..6c683de67
--- /dev/null
+++ b/test/docx/pageref.native
@@ -0,0 +1,4 @@
+[Para [Str "Title",Space,Link ("",[],[]) [Str "2"] ("#title","")]
+,Para [Str "Title2",Space,Link ("",[],[]) [Str "2"] ("#title2","")]
+,Header 1 ("title", [],[]) [Str "Title"]
+,Header 1 ("title2",[],[]) [Str "Title2"]]
diff --git a/test/docx/relative_indentation_blockquotes.docx b/test/docx/relative_indentation_blockquotes.docx
new file mode 100644
index 000000000..fe252280e
--- /dev/null
+++ b/test/docx/relative_indentation_blockquotes.docx
Binary files differ
diff --git a/test/docx/relative_indentation_blockquotes.native b/test/docx/relative_indentation_blockquotes.native
new file mode 100644
index 000000000..6a70aece8
--- /dev/null
+++ b/test/docx/relative_indentation_blockquotes.native
@@ -0,0 +1,6 @@
+[Header 1 ("indentation-blockquotes",[],[]) [Str "Indentation",Space,Str "blockquotes"]
+,Para [Str "Foobar"]
+,Para [Str "First",Space,Str "line",Space,Str "indented."]
+,Para [Str "Normal",Space,Str "list",Space,Str "paragraph"]
+,Para [Str "List",Space,Str "paragraph",Space,Str "with",Space,Str "less",Space,Str "indent"]
+,BlockQuote [Para [Str "List",Space,Str "paragraph",Space,Str "with",Space,Str "more",Space,Str "indent"]]]
diff --git a/test/epub/epub2_cover.epub b/test/epub/epub2_cover.epub
index 02f8ec1fb..059f8c900 100644
--- a/test/epub/epub2_cover.epub
+++ b/test/epub/epub2_cover.epub
Binary files differ
diff --git a/test/epub/epub2_no_cover.epub b/test/epub/epub2_no_cover.epub
index cd8e24b3f..d3b64deeb 100644
--- a/test/epub/epub2_no_cover.epub
+++ b/test/epub/epub2_no_cover.epub
Binary files differ
diff --git a/test/epub/epub2_picture.epub b/test/epub/epub2_picture.epub
index d19684ce2..fbc85a4f9 100644
--- a/test/epub/epub2_picture.epub
+++ b/test/epub/epub2_picture.epub
Binary files differ
diff --git a/test/epub/features.epub b/test/epub/features.epub
index 0d50380ac..3715722d2 100644
--- a/test/epub/features.epub
+++ b/test/epub/features.epub
Binary files differ
diff --git a/test/epub/features.native b/test/epub/features.native
index 86a61360e..61d0f8ba9 100644
--- a/test/epub/features.native
+++ b/test/epub/features.native
@@ -1,93 +1,1676 @@
-[Para [Span ("front.xhtml",[],[]) []]
-,Div ("",["section"],[])
- [Header 1 ("",[],[]) [Str "Reflowable",Space,Str "EPUB",Space,Str "3",Space,Str "Conformance",Space,Str "Test",Space,Str "Document:",Space,Str "0100"]
- ,Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "Status",Space,Str "of",Space,Str "this",Space,Str "Document"]
- ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "currently",Space,Str "considered",Space,Span ("",["status"],[]) [Str "[UNDER",Space,Str "DEVELOPMENT]"],Space,Str "by",Space,Str "the",Space,Str "IDPF."]
- ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "part",Space,Str "of",Space,Str "version",Space,Span ("",["version"],[]) [Str "X.X"],Space,Str "of",Space,Str "the",Space,Str "EPUB",Space,Str "3.0",Space,Str "Compliance",Space,Str "Test",Space,Str "Suite",Space,Str "released",SoftBreak,Str "on",Space,RawInline (Format "html") "<time class=\"release\">",Str "TBD",RawInline (Format "html") "</time>",Str "."]
- ,Para [Str "Before",Space,Str "using",Space,Str "this",Space,Str "publication",Space,Str "to",Space,Str "evaluate",Space,Str "reading",Space,Str "systems,",Space,Str "testers",Space,Str "are",Space,Str "strongly",Space,Str "encouraged",Space,Str "to",SoftBreak,Str "verify",Space,Str "that",Space,Str "they",Space,Str "have",Space,Str "the",Space,Str "latest",Space,Str "release",Space,Str "by",Space,Str "checking",Space,Str "the",Space,Str "current",Space,Str "release",Space,Str "version",Space,Str "and",Space,Str "date",Space,Str "of",SoftBreak,Str "the",Space,Str "test",Space,Str "suite",Space,Str "at",Space,Link ("",[],[]) [Str "TBD"] ("http://idpf.org/","")]
- ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "one",Space,Str "of",Space,Str "several",Space,Str "that",Space,Str "currently",Space,Str "comprise",Space,Str "the",Space,Str "EPUB",Space,Str "3",Space,Str "conformance",Space,Str "test",Space,Str "suite",SoftBreak,Str "for",Space,Str "reflowable",Space,Str "content.",Space,Str "The",Space,Str "complete",Space,Str "test",Space,Str "suite",Space,Str "includes",Space,Str "all",Space,Str "of",Space,Str "the",Space,Str "following",Space,Str "publications:"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "."]]]]
- ,Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "About",Space,Str "this",Space,Str "Document"]
- ,Para [Str "This",Space,Str "document",Space,Str "focuses",Space,Str "on",Space,Str "human-evaluated",Space,Str "binary",Space,Str "(pass/fail)",Space,Str "tests",Space,Str "in",Space,Str "a",SoftBreak,Str "reflowable",Space,Str "context.",Space,Str "Tests",Space,Str "for",Space,Str "fixed-layout",Space,Str "content",Space,Str "and",Space,Str "other",Space,Str "individual",Space,Str "tests",Space,Str "that",SoftBreak,Str "require",Space,Str "a",Space,Str "dedicated",Space,Str "epub",Space,Str "file",Space,Str "are",Space,Str "available",Space,Str "in",Space,Str "additional",Space,Str "sibling",Space,Str "documents;",Space,Str "refer",Space,Str "to",SoftBreak,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",SoftBreak,Str "wiki"] ("https://github.com/mgylling/epub-testsuite/wiki/Overview",""),Space,Str "(",Code ("",[],[]) "https://github.com/mgylling/epub-testsuite/wiki/Overview",Str ")",Space,Str "for",Space,Str "additional",SoftBreak,Str "information."]]
- ,Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "Conventions"]
- ,Para [Str "The",Space,Str "following",Space,Str "conventions",Space,Str "are",Space,Str "used",Space,Str "throughout",Space,Str "the",Space,Str "document:"]
- ,DefinitionList
- [([Str "1.",Space,Str "Locating",Space,Str "a",Space,Str "test"],
- [[Div ("",["ctest"],[])
- [Para [Str "Tests",Space,Str "for",Space,Emph [Str "required"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",SoftBreak,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[REQUIRED]"]]]
- ,Div ("",["otest"],[])
- [Para [Str "Tests",Space,Str "for",Space,Emph [Str "optional"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",SoftBreak,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[OPTIONAL]"]]]]])
- ,([Str "2.",Space,Str "Performing",Space,Str "the",Space,Str "test"],
- [[Plain [Str "Each",Space,Str "test",Space,Str "includes",Space,Str "a",Space,Str "description",Space,Str "of",Space,Str "its",Space,Str "purpose",Space,Str "followed",Space,Str "by",Space,Str "the",Space,Str "actual",Space,Strong [Str "test",Space,Str "statement,",SoftBreak,Str "which",Space,Str "can",Space,Str "always",Space,Str "be",Space,Str "evaluated",Space,Str "to",Space,Str "true",Space,Str "or",Space,Str "false"],Str ".",Space,Str "These",Space,Str "statements",Space,Str "typically",Space,Str "have",Space,Str "the",Space,Str "form:",SoftBreak,Str "\"If",Space,Str "[some",Space,Str "condition],",Space,Str "the",Space,Str "test",Space,Str "passes\"."]]])
- ,([Str "3.",Space,Str "Scoring",Space,Str "in",Space,Str "the",Space,Str "results",Space,Str "form"],
- [[Plain [Str "@@@TODO",Space,Str "provide",Space,Str "info",Space,Str "on",Space,Str "where",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "results",Space,Str "form"]]])]]]
-,Para [Span ("content-mathml-001.xhtml",[],[]) []]
-,Div ("",["section"],[])
- [Header 2 ("content-mathml-001.xhtml#mathml",[],[]) [Str "MathML"]
- ,Div ("content-mathml-001.xhtml#mathml-010",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-010"],Space,Str "Rendering"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "MathML",Space,Str "equation",Space,Str "rendering",Space,Str "is",Space,Str "supported."]
- ,Plain [Math DisplayMath "\\int_{- \\infty}^{\\infty}e^{- x^{2}}\\, dx = \\sqrt{\\pi}",SoftBreak,Math DisplayMath "\\sum\\limits_{n = 1}^{\\infty}\\frac{1}{n^{2}} = \\frac{\\pi^{2}}{6}",SoftBreak,Math DisplayMath "x = \\frac{- b \\pm \\sqrt{b^{2} - 4ac}}{2a}"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "equations",Space,Str "are",Space,Str "not",Space,Str "presented",Space,Str "as",Space,Str "linear",Space,Str "text",Space,Str "(e.g.,",Space,Str "x=-b\177b2-4ac2a),",SoftBreak,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("content-mathml-001.xhtml#mathml-020",["section","otest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-020"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "math",Space,Str "element"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "math",Space,Str "element."]
- ,Plain [Math InlineMath "{2x}{+ y - z}"]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "equation",Space,Str "has",Space,Str "a",Space,Str "yellow",Space,Str "background",Space,Str "and",Space,Str "a",Space,Str "dashed",Space,Str "border."]
- ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",SoftBreak,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]]
- ,Div ("content-mathml-001.xhtml#mathml-021",["section","otest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-021"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mo",Space,Str "element"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mo",Space,Str "element."]
- ,Plain [Math InlineMath "{2x}{+ y - z}"]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "operators",Space,Str "are",Space,Str "enlarged",Space,Str "relative",Space,Str "to",Space,Str "the",Space,Str "other",Space,Str "symbols",Space,Str "and",Space,Str "numbers."]
- ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",SoftBreak,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]]
- ,Div ("content-mathml-001.xhtml#mathml-022",["section","otest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-022"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mi",Space,Str "element"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mi",Space,Str "element."]
- ,Plain [Math InlineMath "{2x}{+ y - z}"]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "identifiers",Space,Str "are",Space,Str "bolded",Space,Str "and",Space,Str "blue."]
- ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",SoftBreak,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]]
- ,Div ("content-mathml-001.xhtml#mathml-023",["section","otest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-023"],Space,Str "CSS",Space,Str "Styling",Space,Str "of",Space,Str "the",Space,Code ("",[],[]) "mn",Space,Str "element"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "basic",Space,Str "CSS",Space,Str "styling",Space,Str "of",Space,Str "MathML",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "the",Space,Code ("",[],[]) "mn",Space,Str "element."]
- ,Plain [Math InlineMath "{2x}{+ y - z}"]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "number",Space,Str "2",Space,Str "is",Space,Str "italicized",Space,Str "and",Space,Str "blue."]
- ,Para [Str "If",Space,Str "the",Space,Str "reading",Space,Str "system",Space,Str "does",Space,Str "not",Space,Str "have",Space,Str "a",Space,Str "viewport,",Space,Str "or",Space,Str "does",Space,Str "not",Space,Str "support",SoftBreak,Str "CSS",Space,Str "styles,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]]
- ,Div ("content-mathml-001.xhtml#mathml-024",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-024"],Str "Horizontal",Space,Str "stretch,",Space,Code ("",[],[]) "mover",Str ",",Space,Code ("",[],[]) "munder",Str ",",Space,Str "and",Space,Code ("",[],[]) "mspace",Space,Str "elements"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "horizontal",Space,Str "stretch,",Space,Code ("",[],[]) "mover",Str ",",Space,Code ("",[],[]) "munder",Str ",",Space,Code ("",[],[]) "mspace",Space,Str "elements",Space,Str "are",Space,Str "supported."]
- ,Plain [Math DisplayMath "c = \\overset{\\text{complex\\ number}}{\\overbrace{\\underset{\\text{real}}{\\underbrace{\\mspace{20mu} a\\mspace{20mu}}} + \\underset{\\text{imaginary}}{\\underbrace{\\quad b{\\mathbb{i}}\\quad}}}}"]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "."]]
- ,Div ("content-mathml-001.xhtml#mathml-025",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-025"],Str "Testing",Space,Code ("",[],[]) "mtable",Space,Str "with",Space,Code ("",[],[]) "colspan",Space,Str "and",Space,Code ("",[],[]) "rowspan",Space,Str "attributes,",Space,Str "Hebrew",Space,Str "and",Space,Str "Script",Space,Str "fonts"]
- ,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mtable",Space,Str "with",Space,Code ("",[],[]) "colspan",Space,Str "and",Space,Code ("",[],[]) "mspace",Space,Str "attributes",Space,Str "(column",Space,Str "and",Space,Str "row",Space,Str "spanning)",Space,Str "are",Space,Str "supported;",Space,Str "uses",Space,Str "Hebrew",Space,Str "and",Space,Str "Script",Space,Str "alphabets."]
- ,Plain [Math DisplayMath "\\begin{matrix}\n & {\\operatorname{cov}(\\mathcal{L})} & \\longrightarrow & {\\operatorname{non}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cof}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cof}(\\mathcal{L})} & \\longrightarrow & 2^{\\aleph_{0}} \\\\\n & \\uparrow & & \\uparrow & & \\uparrow & & \\uparrow & & \\\\\n & {\\mathfrak{b}} & \\longrightarrow & {\\mathfrak{d}} & & & & & & \\\\\n & \\uparrow & & \\uparrow & & & & & & \\\\\n\\aleph_{1} & \\longrightarrow & {\\operatorname{add}(\\mathcal{L})} & \\longrightarrow & {\\operatorname{add}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cov}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{non}(\\mathcal{L})} & \\\\\n\\end{matrix}"]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Link ("",[],[]) [Str "Cicho\324's",Space,Str "Diagram"] ("http://en.wikipedia.org/wiki/Cicho%C5%84's_diagram",""),Str ":",Space,Str "."]]
- ,Div ("content-mathml-001.xhtml#mathml-026",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-026"],Str "BiDi,",Space,Str "RTL",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "right-to-left",Space,Str "and",Space,Str "Arabic",Space,Str "alphabets",Space,Str "are",Space,Str "supported."]
- ,Plain [Math DisplayMath "{\1583(\1587)} = \\left\\{ \\begin{matrix}\n{\\sum\\limits_{\1646 = 1}^{\1589}\1587^{\1646}} & {\\text{\1573\1584\1575\1603\1575\1606}\1587 > 0} \\\\\n{\\int_{1}^{\1589}{\1587^{\1646}\1569\1587}} & {\\text{\1573\1584\1575\1603\1575\1606}\1587 \\in \1605} \\\\\n{{\1591\1575}\\pi} & {\\text{\1594\1610\1585\1584\1604\1603}\\left( \\text{\1605\1593}\\pi \\simeq 3,141 \\right)} \\\\\n\\end{matrix} \\right."]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:"]]
- ,Div ("content-mathml-001.xhtml#mathml-027",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],SoftBreak,Span ("",["test-id"],[]) [Str "mathml-027"],Str "Elementary",Space,Str "math:",Space,Str "long",Space,Str "division",Space,Str "notation"]
- ,Para [Str "Tests",Space,Str "whether",Space,Code ("",[],[]) "mlongdiv",Space,Str "elements",Space,Str "(from",Space,Str "elementary",Space,Str "math)",Space,Str "are",Space,Str "supported."]
- ,Plain [Span ("",["math"],[("xmlns","http://www.w3.org/1998/Math/MathML")]) [SoftBreak,Str "3",SoftBreak,Str "435.3",SoftBreak,Str "1306",SoftBreak,Str "12",SoftBreak,Str "10",SoftBreak,Str "9",SoftBreak,Str "16",SoftBreak,Str "15",SoftBreak,Str "1.0",SoftBreak,Str "9",SoftBreak,Str "1",SoftBreak]]
- ,Para [Str "The",Space,Str "test",Space,Str "passes",Space,Str "if",Space,Str "the",Space,Str "rendering",Space,Str "looks",Space,Str "like",Space,Str "the",Space,Str "following",Space,Str "image:",Space,Str "."]]]
-,Para [Span ("content-switch-001.xhtml",[],[]) []]
-,Div ("content-switch-001.xhtml#epub-switch",["section"],[])
- [Header 3 ("",[],[]) [Code ("",[],[]) "epub:switch"]
- ,Div ("content-switch-001.xhtml#switch-010",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "switch-010"],Space,Str "Support"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "epub:switch",Space,Str "element",Space,Str "is",Space,Str "supported."]
- ,Para [Str "PASS"]
- ,Para [Str "If",Space,Str "only",Space,Str "the",Space,Str "word",Space,Str "\"PASS\"",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes.",Space,Str "If",Space,Str "both",Space,Str "\"PASS\"",Space,Str "and",Space,Str "\"FAIL\"",Space,Str "are",Space,Str "rendered,",Space,Str "or",Space,Str "neither",SoftBreak,Str "\"PASS\"",Space,Str "nor",Space,Str "\"FAIL\"",Space,Str "is",Space,Str "rendered,",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("content-switch-001.xhtml#switch-020",["section","otest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[OPTIONAL]"],SoftBreak,Span ("",["test-id"],[]) [Str "switch-020"],SoftBreak,Str "MathML",Space,Str "Embedding"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Str "MathML",Space,Str "namespace",Space,Str "is",Space,Str "recognized",Space,Str "when",Space,Str "used",Space,Str "in",Space,Str "an",Space,Code ("",[],[]) "epub:case",Space,Str "element."]
- ,Para [Math InlineMath "{2x}{+ y - z}"]
- ,Para [Str "If",Space,Str "a",Space,Str "MathML",Space,Str "equation",Space,Str "is",Space,Str "rendered",Space,Str "before",Space,Str "this",Space,Str "paragraph,",Space,Str "the",Space,Str "test",Space,Str "passes."]
- ,Para [Str "If",Space,Str "test",Space,Code ("",[],[]) "switch-010",Space,Str "did",Space,Str "not",Space,Str "pass,",Space,Str "this",Space,Str "test",Space,Str "should",Space,Str "be",Space,Str "marked",Space,Code ("",[],[]) "Not Supported",Str "."]]]]
+[ Para [ Span ( "front.xhtml" , [] , [] ) [] ]
+, Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Reflowable"
+ , Space
+ , Str "EPUB"
+ , Space
+ , Str "3"
+ , Space
+ , Str "Conformance"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Document:"
+ , Space
+ , Str "0100"
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "Status"
+ , Space
+ , Str "of"
+ , Space
+ , Str "this"
+ , Space
+ , Str "Document"
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "is"
+ , Space
+ , Str "currently"
+ , Space
+ , Str "considered"
+ , Space
+ , Span
+ ( "" , [ "status" ] , [] )
+ [ Str "[UNDER" , Space , Str "DEVELOPMENT]" ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "IDPF."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "is"
+ , Space
+ , Str "part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "version"
+ , Space
+ , Span ( "" , [ "version" ] , [] ) [ Str "X.X" ]
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "EPUB"
+ , Space
+ , Str "3.0"
+ , Space
+ , Str "Compliance"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Suite"
+ , Space
+ , Str "released"
+ , SoftBreak
+ , Str "on"
+ , Space
+ , RawInline (Format "html") "<time class=\"release\">"
+ , Str "TBD"
+ , RawInline (Format "html") "</time>"
+ , Str "."
+ ]
+ , Para
+ [ Str "Before"
+ , Space
+ , Str "using"
+ , Space
+ , Str "this"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "to"
+ , Space
+ , Str "evaluate"
+ , Space
+ , Str "reading"
+ , Space
+ , Str "systems,"
+ , Space
+ , Str "testers"
+ , Space
+ , Str "are"
+ , Space
+ , Str "strongly"
+ , Space
+ , Str "encouraged"
+ , Space
+ , Str "to"
+ , SoftBreak
+ , Str "verify"
+ , Space
+ , Str "that"
+ , Space
+ , Str "they"
+ , Space
+ , Str "have"
+ , Space
+ , Str "the"
+ , Space
+ , Str "latest"
+ , Space
+ , Str "release"
+ , Space
+ , Str "by"
+ , Space
+ , Str "checking"
+ , Space
+ , Str "the"
+ , Space
+ , Str "current"
+ , Space
+ , Str "release"
+ , Space
+ , Str "version"
+ , Space
+ , Str "and"
+ , Space
+ , Str "date"
+ , Space
+ , Str "of"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite"
+ , Space
+ , Str "at"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "TBD" ]
+ ( "http://idpf.org/" , "" )
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "is"
+ , Space
+ , Str "one"
+ , Space
+ , Str "of"
+ , Space
+ , Str "several"
+ , Space
+ , Str "that"
+ , Space
+ , Str "currently"
+ , Space
+ , Str "comprise"
+ , Space
+ , Str "the"
+ , Space
+ , Str "EPUB"
+ , Space
+ , Str "3"
+ , Space
+ , Str "conformance"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite"
+ , SoftBreak
+ , Str "for"
+ , Space
+ , Str "reflowable"
+ , Space
+ , Str "content."
+ , Space
+ , Str "The"
+ , Space
+ , Str "complete"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite"
+ , Space
+ , Str "includes"
+ , Space
+ , Str "all"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "following"
+ , Space
+ , Str "publications:"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "." ] ] ]
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "About"
+ , Space
+ , Str "this"
+ , Space
+ , Str "Document"
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "document"
+ , Space
+ , Str "focuses"
+ , Space
+ , Str "on"
+ , Space
+ , Str "human-evaluated"
+ , Space
+ , Str "binary"
+ , Space
+ , Str "(pass/fail)"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "reflowable"
+ , Space
+ , Str "context."
+ , Space
+ , Str "Tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "fixed-layout"
+ , Space
+ , Str "content"
+ , Space
+ , Str "and"
+ , Space
+ , Str "other"
+ , Space
+ , Str "individual"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "that"
+ , SoftBreak
+ , Str "require"
+ , Space
+ , Str "a"
+ , Space
+ , Str "dedicated"
+ , Space
+ , Str "epub"
+ , Space
+ , Str "file"
+ , Space
+ , Str "are"
+ , Space
+ , Str "available"
+ , Space
+ , Str "in"
+ , Space
+ , Str "additional"
+ , Space
+ , Str "sibling"
+ , Space
+ , Str "documents;"
+ , Space
+ , Str "refer"
+ , Space
+ , Str "to"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "test"
+ , Space
+ , Str "suite"
+ , SoftBreak
+ , Str "wiki"
+ ]
+ ( "https://github.com/mgylling/epub-testsuite/wiki/Overview"
+ , ""
+ )
+ , Space
+ , Str "("
+ , Code
+ ( "" , [] , [] )
+ "https://github.com/mgylling/epub-testsuite/wiki/Overview"
+ , Str ")"
+ , Space
+ , Str "for"
+ , Space
+ , Str "additional"
+ , SoftBreak
+ , Str "information."
+ ]
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header 2 ( "" , [] , [] ) [ Str "Conventions" ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "following"
+ , Space
+ , Str "conventions"
+ , Space
+ , Str "are"
+ , Space
+ , Str "used"
+ , Space
+ , Str "throughout"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document:"
+ ]
+ , DefinitionList
+ [ ( [ Str "1."
+ , Space
+ , Str "Locating"
+ , Space
+ , Str "a"
+ , Space
+ , Str "test"
+ ]
+ , [ [ Div
+ ( "" , [ "ctest" ] , [] )
+ [ Para
+ [ Str "Tests"
+ , Space
+ , Str "for"
+ , Space
+ , Emph [ Str "required" ]
+ , Space
+ , Str "Reading"
+ , Space
+ , Str "System"
+ , Space
+ , Str "functionality"
+ , Space
+ , Str "are"
+ , SoftBreak
+ , Str "preceded"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "label:"
+ , Space
+ , Span
+ ( ""
+ , [ "nature" ]
+ , [ ( "style"
+ , "display: inline; font-size: 100%"
+ )
+ ]
+ )
+ [ Str "[REQUIRED]" ]
+ ]
+ ]
+ , Div
+ ( "" , [ "otest" ] , [] )
+ [ Para
+ [ Str "Tests"
+ , Space
+ , Str "for"
+ , Space
+ , Emph [ Str "optional" ]
+ , Space
+ , Str "Reading"
+ , Space
+ , Str "System"
+ , Space
+ , Str "functionality"
+ , Space
+ , Str "are"
+ , SoftBreak
+ , Str "preceded"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "label:"
+ , Space
+ , Span
+ ( ""
+ , [ "nature" ]
+ , [ ( "style"
+ , "display: inline; font-size: 100%"
+ )
+ ]
+ )
+ [ Str "[OPTIONAL]" ]
+ ]
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "2."
+ , Space
+ , Str "Performing"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ ]
+ , [ [ Plain
+ [ Str "Each"
+ , Space
+ , Str "test"
+ , Space
+ , Str "includes"
+ , Space
+ , Str "a"
+ , Space
+ , Str "description"
+ , Space
+ , Str "of"
+ , Space
+ , Str "its"
+ , Space
+ , Str "purpose"
+ , Space
+ , Str "followed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "actual"
+ , Space
+ , Strong
+ [ Str "test"
+ , Space
+ , Str "statement,"
+ , SoftBreak
+ , Str "which"
+ , Space
+ , Str "can"
+ , Space
+ , Str "always"
+ , Space
+ , Str "be"
+ , Space
+ , Str "evaluated"
+ , Space
+ , Str "to"
+ , Space
+ , Str "true"
+ , Space
+ , Str "or"
+ , Space
+ , Str "false"
+ ]
+ , Str "."
+ , Space
+ , Str "These"
+ , Space
+ , Str "statements"
+ , Space
+ , Str "typically"
+ , Space
+ , Str "have"
+ , Space
+ , Str "the"
+ , Space
+ , Str "form:"
+ , SoftBreak
+ , Str "\"If"
+ , Space
+ , Str "[some"
+ , Space
+ , Str "condition],"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes\"."
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "3."
+ , Space
+ , Str "Scoring"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "results"
+ , Space
+ , Str "form"
+ ]
+ , [ [ Plain
+ [ Str "@@@TODO"
+ , Space
+ , Str "provide"
+ , Space
+ , Str "info"
+ , Space
+ , Str "on"
+ , Space
+ , Str "where"
+ , Space
+ , Str "to"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "results"
+ , Space
+ , Str "form"
+ ]
+ ]
+ ]
+ )
+ ]
+ ]
+ ]
+, Para [ Span ( "content-mathml-001.xhtml" , [] , [] ) [] ]
+, Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 2
+ ( "content-mathml-001.xhtml#mathml" , [] , [] )
+ [ Str "MathML" ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-010"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-010" ]
+ , Space
+ , Str "Rendering"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "MathML"
+ , Space
+ , Str "equation"
+ , Space
+ , Str "rendering"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Plain
+ [ Math
+ DisplayMath
+ "\\int_{- \\infty}^{\\infty}e^{- x^{2}}\\, dx = \\sqrt{\\pi}"
+ , SoftBreak
+ , Math
+ DisplayMath
+ "\\sum\\limits_{n = 1}^{\\infty}\\frac{1}{n^{2}} = \\frac{\\pi^{2}}{6}"
+ , SoftBreak
+ , Math
+ DisplayMath
+ "x = \\frac{- b \\pm \\sqrt{b^{2} - 4ac}}{2a}"
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "equations"
+ , Space
+ , Str "are"
+ , Space
+ , Str "not"
+ , Space
+ , Str "presented"
+ , Space
+ , Str "as"
+ , Space
+ , Str "linear"
+ , Space
+ , Str "text"
+ , Space
+ , Str "(e.g.,"
+ , Space
+ , Str "x=-b\177b2-4ac2a),"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-020"
+ , [ "section" , "otest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-020" ]
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "Styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "math"
+ , Space
+ , Str "element"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "basic"
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "MathML"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "math"
+ , Space
+ , Str "element."
+ ]
+ , Plain [ Math InlineMath "{2x}{+ y - z}" ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "equation"
+ , Space
+ , Str "has"
+ , Space
+ , Str "a"
+ , Space
+ , Str "yellow"
+ , Space
+ , Str "background"
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Str "dashed"
+ , Space
+ , Str "border."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "reading"
+ , Space
+ , Str "system"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "have"
+ , Space
+ , Str "a"
+ , Space
+ , Str "viewport,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "support"
+ , SoftBreak
+ , Str "CSS"
+ , Space
+ , Str "styles,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "test"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "marked"
+ , Space
+ , Code ( "" , [] , [] ) "Not Supported"
+ , Str "."
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-021"
+ , [ "section" , "otest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-021" ]
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "Styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "mo"
+ , Space
+ , Str "element"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "basic"
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "MathML"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "mo"
+ , Space
+ , Str "element."
+ ]
+ , Plain [ Math InlineMath "{2x}{+ y - z}" ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "operators"
+ , Space
+ , Str "are"
+ , Space
+ , Str "enlarged"
+ , Space
+ , Str "relative"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , Space
+ , Str "other"
+ , Space
+ , Str "symbols"
+ , Space
+ , Str "and"
+ , Space
+ , Str "numbers."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "reading"
+ , Space
+ , Str "system"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "have"
+ , Space
+ , Str "a"
+ , Space
+ , Str "viewport,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "support"
+ , SoftBreak
+ , Str "CSS"
+ , Space
+ , Str "styles,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "test"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "marked"
+ , Space
+ , Code ( "" , [] , [] ) "Not Supported"
+ , Str "."
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-022"
+ , [ "section" , "otest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-022" ]
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "Styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "mi"
+ , Space
+ , Str "element"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "basic"
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "MathML"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "mi"
+ , Space
+ , Str "element."
+ ]
+ , Plain [ Math InlineMath "{2x}{+ y - z}" ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "identifiers"
+ , Space
+ , Str "are"
+ , Space
+ , Str "bolded"
+ , Space
+ , Str "and"
+ , Space
+ , Str "blue."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "reading"
+ , Space
+ , Str "system"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "have"
+ , Space
+ , Str "a"
+ , Space
+ , Str "viewport,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "support"
+ , SoftBreak
+ , Str "CSS"
+ , Space
+ , Str "styles,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "test"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "marked"
+ , Space
+ , Code ( "" , [] , [] ) "Not Supported"
+ , Str "."
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-023"
+ , [ "section" , "otest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-023" ]
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "Styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "mn"
+ , Space
+ , Str "element"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "basic"
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "styling"
+ , Space
+ , Str "of"
+ , Space
+ , Str "MathML"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "mn"
+ , Space
+ , Str "element."
+ ]
+ , Plain [ Math InlineMath "{2x}{+ y - z}" ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "number"
+ , Space
+ , Str "2"
+ , Space
+ , Str "is"
+ , Space
+ , Str "italicized"
+ , Space
+ , Str "and"
+ , Space
+ , Str "blue."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "reading"
+ , Space
+ , Str "system"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "have"
+ , Space
+ , Str "a"
+ , Space
+ , Str "viewport,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "does"
+ , Space
+ , Str "not"
+ , Space
+ , Str "support"
+ , SoftBreak
+ , Str "CSS"
+ , Space
+ , Str "styles,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "test"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "marked"
+ , Space
+ , Code ( "" , [] , [] ) "Not Supported"
+ , Str "."
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-024"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-024" ]
+ , Str "Horizontal"
+ , Space
+ , Str "stretch,"
+ , Space
+ , Code ( "" , [] , [] ) "mover"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "munder"
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "mspace"
+ , Space
+ , Str "elements"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "horizontal"
+ , Space
+ , Str "stretch,"
+ , Space
+ , Code ( "" , [] , [] ) "mover"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "munder"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "mspace"
+ , Space
+ , Str "elements"
+ , Space
+ , Str "are"
+ , Space
+ , Str "supported."
+ ]
+ , Plain
+ [ Math
+ DisplayMath
+ "c = \\overset{\\text{complex\\ number}}{\\overbrace{\\underset{\\text{real}}{\\underbrace{\\mspace{20mu} a\\mspace{20mu}}} + \\underset{\\text{imaginary}}{\\underbrace{\\quad b{\\mathbb{i}}\\quad}}}}"
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "rendering"
+ , Space
+ , Str "looks"
+ , Space
+ , Str "like"
+ , Space
+ , Str "."
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-025"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-025" ]
+ , Str "Testing"
+ , Space
+ , Code ( "" , [] , [] ) "mtable"
+ , Space
+ , Str "with"
+ , Space
+ , Code ( "" , [] , [] ) "colspan"
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "rowspan"
+ , Space
+ , Str "attributes,"
+ , Space
+ , Str "Hebrew"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Script"
+ , Space
+ , Str "fonts"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Code ( "" , [] , [] ) "mtable"
+ , Space
+ , Str "with"
+ , Space
+ , Code ( "" , [] , [] ) "colspan"
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "mspace"
+ , Space
+ , Str "attributes"
+ , Space
+ , Str "(column"
+ , Space
+ , Str "and"
+ , Space
+ , Str "row"
+ , Space
+ , Str "spanning)"
+ , Space
+ , Str "are"
+ , Space
+ , Str "supported;"
+ , Space
+ , Str "uses"
+ , Space
+ , Str "Hebrew"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Script"
+ , Space
+ , Str "alphabets."
+ ]
+ , Plain
+ [ Math
+ DisplayMath
+ "\\begin{matrix}\n & {\\operatorname{cov}(\\mathcal{L})} & \\longrightarrow & {\\operatorname{non}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cof}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cof}(\\mathcal{L})} & \\longrightarrow & 2^{\\aleph_{0}} \\\\\n & \\uparrow & & \\uparrow & & \\uparrow & & \\uparrow & & \\\\\n & {\\mathfrak{b}} & \\longrightarrow & {\\mathfrak{d}} & & & & & & \\\\\n & \\uparrow & & \\uparrow & & & & & & \\\\\n\\aleph_{1} & \\longrightarrow & {\\operatorname{add}(\\mathcal{L})} & \\longrightarrow & {\\operatorname{add}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{cov}(\\mathcal{K})} & \\longrightarrow & {\\operatorname{non}(\\mathcal{L})} & \\\\\n\\end{matrix}"
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "rendering"
+ , Space
+ , Str "looks"
+ , Space
+ , Str "like"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "Cicho\324's" , Space , Str "Diagram" ]
+ ( "http://en.wikipedia.org/wiki/Cicho%C5%84's_diagram"
+ , ""
+ )
+ , Str ":"
+ , Space
+ , Str "."
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-026"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-026" ]
+ , Str "BiDi,"
+ , Space
+ , Str "RTL"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Arabic"
+ , Space
+ , Str "alphabets"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "right-to-left"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Arabic"
+ , Space
+ , Str "alphabets"
+ , Space
+ , Str "are"
+ , Space
+ , Str "supported."
+ ]
+ , Plain
+ [ Math
+ DisplayMath
+ "{\1583(\1587)} = \\left\\{ \\begin{matrix}\n{\\sum\\limits_{\1646 = 1}^{\1589}\1587^{\1646}} & {\\text{\1573\1584\1575\1603\1575\1606}\1587 > 0} \\\\\n{\\int_{1}^{\1589}{\1587^{\1646}\1569\1587}} & {\\text{\1573\1584\1575\1603\1575\1606}\1587 \\in \1605} \\\\\n{{\1591\1575}\\pi} & {\\text{\1594\1610\1585\1584\1604\1603}\\left( \\text{\1605\1593}\\pi \\simeq 3,141 \\right)} \\\\\n\\end{matrix} \\right."
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "rendering"
+ , Space
+ , Str "looks"
+ , Space
+ , Str "like"
+ , Space
+ , Str "the"
+ , Space
+ , Str "following"
+ , Space
+ , Str "image:"
+ ]
+ ]
+ , Div
+ ( "content-mathml-001.xhtml#mathml-027"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "mathml-027" ]
+ , Str "Elementary"
+ , Space
+ , Str "math:"
+ , Space
+ , Str "long"
+ , Space
+ , Str "division"
+ , Space
+ , Str "notation"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Code ( "" , [] , [] ) "mlongdiv"
+ , Space
+ , Str "elements"
+ , Space
+ , Str "(from"
+ , Space
+ , Str "elementary"
+ , Space
+ , Str "math)"
+ , Space
+ , Str "are"
+ , Space
+ , Str "supported."
+ ]
+ , Plain
+ [ Span
+ ( ""
+ , [ "math" ]
+ , [ ( "xmlns" , "http://www.w3.org/1998/Math/MathML" ) ]
+ )
+ [ SoftBreak
+ , Str "3"
+ , SoftBreak
+ , Str "435.3"
+ , SoftBreak
+ , Str "1306"
+ , SoftBreak
+ , Str "12"
+ , SoftBreak
+ , Str "10"
+ , SoftBreak
+ , Str "9"
+ , SoftBreak
+ , Str "16"
+ , SoftBreak
+ , Str "15"
+ , SoftBreak
+ , Str "1.0"
+ , SoftBreak
+ , Str "9"
+ , SoftBreak
+ , Str "1"
+ , SoftBreak
+ ]
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes"
+ , Space
+ , Str "if"
+ , Space
+ , Str "the"
+ , Space
+ , Str "rendering"
+ , Space
+ , Str "looks"
+ , Space
+ , Str "like"
+ , Space
+ , Str "the"
+ , Space
+ , Str "following"
+ , Space
+ , Str "image:"
+ , Space
+ , Str "."
+ ]
+ ]
+ ]
+, Para [ Span ( "content-switch-001.xhtml" , [] , [] ) [] ]
+, Div
+ ( "content-switch-001.xhtml#epub-switch"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 3 ( "" , [] , [] ) [ Code ( "" , [] , [] ) "epub:switch" ]
+ , Div
+ ( "content-switch-001.xhtml#switch-010"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "switch-010" ]
+ , Space
+ , Str "Support"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "epub:switch"
+ , Space
+ , Str "element"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "PASS" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "only"
+ , Space
+ , Str "the"
+ , Space
+ , Str "word"
+ , Space
+ , Str "\"PASS\""
+ , Space
+ , Str "is"
+ , Space
+ , Str "rendered"
+ , Space
+ , Str "before"
+ , Space
+ , Str "this"
+ , Space
+ , Str "paragraph,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ , Space
+ , Str "If"
+ , Space
+ , Str "both"
+ , Space
+ , Str "\"PASS\""
+ , Space
+ , Str "and"
+ , Space
+ , Str "\"FAIL\""
+ , Space
+ , Str "are"
+ , Space
+ , Str "rendered,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "neither"
+ , SoftBreak
+ , Str "\"PASS\""
+ , Space
+ , Str "nor"
+ , Space
+ , Str "\"FAIL\""
+ , Space
+ , Str "is"
+ , Space
+ , Str "rendered,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "content-switch-001.xhtml#switch-020"
+ , [ "section" , "otest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[OPTIONAL]" ]
+ , SoftBreak
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "switch-020" ]
+ , SoftBreak
+ , Str "MathML"
+ , Space
+ , Str "Embedding"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Str "MathML"
+ , Space
+ , Str "namespace"
+ , Space
+ , Str "is"
+ , Space
+ , Str "recognized"
+ , Space
+ , Str "when"
+ , Space
+ , Str "used"
+ , Space
+ , Str "in"
+ , Space
+ , Str "an"
+ , Space
+ , Code ( "" , [] , [] ) "epub:case"
+ , Space
+ , Str "element."
+ ]
+ , Para [ Math InlineMath "{2x}{+ y - z}" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "a"
+ , Space
+ , Str "MathML"
+ , Space
+ , Str "equation"
+ , Space
+ , Str "is"
+ , Space
+ , Str "rendered"
+ , Space
+ , Str "before"
+ , Space
+ , Str "this"
+ , Space
+ , Str "paragraph,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "test"
+ , Space
+ , Code ( "" , [] , [] ) "switch-010"
+ , Space
+ , Str "did"
+ , Space
+ , Str "not"
+ , Space
+ , Str "pass,"
+ , Space
+ , Str "this"
+ , Space
+ , Str "test"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "marked"
+ , Space
+ , Code ( "" , [] , [] ) "Not Supported"
+ , Str "."
+ ]
+ ]
+ ]
+]
diff --git a/test/epub/formatting.epub b/test/epub/formatting.epub
index f3f9b5b93..c6ca6e57a 100644
--- a/test/epub/formatting.epub
+++ b/test/epub/formatting.epub
Binary files differ
diff --git a/test/epub/formatting.native b/test/epub/formatting.native
index e1507ff74..cab9e40fa 100644
--- a/test/epub/formatting.native
+++ b/test/epub/formatting.native
@@ -1,402 +1,5984 @@
-[Para [Span ("front.xhtml",[],[]) []]
-,Div ("",["section"],[])
- [Header 1 ("",[],[]) [Str "EPUB",Space,Str "3",Space,Str "Styling",Space,Str "Test",Space,Str "Document:",Space,Str "0101"]
- ,Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "Status",Space,Str "of",Space,Str "this",Space,Str "Document"]
- ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "currently",Space,Str "considered",Space,Span ("",["status"],[]) [Str "[UNDER",Space,Str "DEVELOPMENT]"],Space,Str "by",Space,Str "the",Space,Str "IDPF."]
- ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "part",Space,Str "of",Space,Str "version",Space,Span ("",["version"],[]) [Str "X.X"],Space,Str "of",Space,Str "the",Space,Str "EPUB",Space,Str "3.0",Space,Str "Compliance",Space,Str "Test",Space,Str "Suite",Space,Str "released",SoftBreak,Str "on",Space,RawInline (Format "html") "<time class=\"release\">",Str "TBD",RawInline (Format "html") "</time>",Str "."]
- ,Para [Str "Before",Space,Str "using",Space,Str "this",Space,Str "publication",Space,Str "to",Space,Str "evaluate",Space,Str "reading",Space,Str "systems,",Space,Str "testers",Space,Str "are",Space,Str "strongly",Space,Str "encouraged",Space,Str "to",SoftBreak,Str "verify",Space,Str "that",Space,Str "they",Space,Str "have",Space,Str "the",Space,Str "latest",Space,Str "release",Space,Str "by",Space,Str "checking",Space,Str "the",Space,Str "current",Space,Str "release",Space,Str "version",Space,Str "and",Space,Str "date",Space,Str "of",SoftBreak,Str "the",Space,Str "test",Space,Str "suite",Space,Str "at",Space,Link ("",[],[]) [Str "TBD"] ("http://idpf.org/","")]
- ,Para [Str "This",Space,Str "publication",Space,Str "is",Space,Str "one",Space,Str "of",Space,Str "several",Space,Str "that",Space,Str "currently",Space,Str "comprise",Space,Str "the",Space,Str "EPUB",Space,Str "3",Space,Str "conformance",Space,Str "test",Space,Str "suite",SoftBreak,Str "for",Space,Str "reflowable",Space,Str "content.",Space,Str "The",Space,Str "complete",Space,Str "test",Space,Str "suite",Space,Str "includes",Space,Str "all",Space,Str "of",Space,Str "the",Space,Str "following",Space,Str "publications:"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "."]]]]
- ,Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "About",Space,Str "this",Space,Str "Document"]
- ,Para [Str "This",Space,Str "document",Space,Str "focuses",Space,Str "on",Space,Str "human-evaluated",Space,Str "binary",Space,Str "(pass/fail)",Space,Str "tests",Space,Str "in",Space,Str "a",SoftBreak,Str "reflowable",Space,Str "context.",Space,Str "Tests",Space,Str "for",Space,Str "fixed-layout",Space,Str "content",Space,Str "and",Space,Str "other",Space,Str "individual",Space,Str "tests",Space,Str "that",SoftBreak,Str "require",Space,Str "a",Space,Str "dedicated",Space,Str "epub",Space,Str "file",Space,Str "are",Space,Str "available",Space,Str "in",Space,Str "additional",Space,Str "sibling",Space,Str "documents;",Space,Str "refer",Space,Str "to",SoftBreak,Str "the",Space,Link ("",[],[]) [Str "test",Space,Str "suite",SoftBreak,Str "wiki"] ("https://github.com/mgylling/epub-testsuite/wiki/Overview",""),Space,Str "(",Code ("",[],[]) "https://github.com/mgylling/epub-testsuite/wiki/Overview",Str ")",Space,Str "for",Space,Str "additional",SoftBreak,Str "information."]]
- ,Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "Conventions"]
- ,Para [Str "The",Space,Str "following",Space,Str "conventions",Space,Str "are",Space,Str "used",Space,Str "throughout",Space,Str "the",Space,Str "document:"]
- ,DefinitionList
- [([Str "1.",Space,Str "Locating",Space,Str "a",Space,Str "test"],
- [[Div ("",["ctest"],[])
- [Para [Str "Tests",Space,Str "for",Space,Emph [Str "required"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",SoftBreak,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[REQUIRED]"]]]
- ,Div ("",["otest"],[])
- [Para [Str "Tests",Space,Str "for",Space,Emph [Str "optional"],Space,Str "Reading",Space,Str "System",Space,Str "functionality",Space,Str "are",SoftBreak,Str "preceded",Space,Str "by",Space,Str "the",Space,Str "label:",Space,Span ("",["nature"],[("style","display: inline; font-size: 100%")]) [Str "[OPTIONAL]"]]]]])
- ,([Str "2.",Space,Str "Performing",Space,Str "the",Space,Str "test"],
- [[Plain [Str "Each",Space,Str "test",Space,Str "includes",Space,Str "a",Space,Str "description",Space,Str "of",Space,Str "its",Space,Str "purpose",Space,Str "followed",Space,Str "by",Space,Str "the",Space,Str "actual",Space,Strong [Str "test",Space,Str "statement,",SoftBreak,Str "which",Space,Str "can",Space,Str "always",Space,Str "be",Space,Str "evaluated",Space,Str "to",Space,Str "true",Space,Str "or",Space,Str "false"],Str ".",Space,Str "These",Space,Str "statements",Space,Str "typically",Space,Str "have",Space,Str "the",Space,Str "form:",SoftBreak,Str "\"If",Space,Str "[some",Space,Str "condition],",Space,Str "the",Space,Str "test",Space,Str "passes\"."]]])
- ,([Str "3.",Space,Str "Scoring",Space,Str "in",Space,Str "the",Space,Str "results",Space,Str "form"],
- [[Plain [Str "@@@TODO",Space,Str "provide",Space,Str "info",Space,Str "on",Space,Str "where",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "results",Space,Str "form"]]])]]]
-,Para [Span ("styling-xhtml-001.xhtml",[],[]) []]
-,Div ("styling-xhtml-001.xhtml#epub-css",["section"],[])
- [Header 1 ("",[],[]) [Str "EPUB",Space,Str "Style",Space,Str "Sheets"]
- ,Para [Str "This",Space,Str "section",Space,Str "contains",Space,Str "tests",Space,Str "for",Space,Str "styling",Space,Str "and",Space,Str "layout."]]
-,Para [Span ("styling-xhtml-003.xhtml",[],[]) []]
-,Div ("styling-xhtml-003.xhtml#style-110",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-110"],Space,Str "Multi-Column",Space,Str "Layouts"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "CSS Multi-Column Layout",Space,Str "properties",Space,Str "are",Space,Str "supported."]
- ,Div ("",["multicol"],[])
- [Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "text",Space,Str "is",Space,Str "rendered",Space,Str "in",Space,Str "three",Space,Str "columns,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
-,Para [Span ("styling-xhtml-002.xhtml",[],[]) []]
-,Div ("styling-xhtml-002.xhtml#style-lists",["section"],[])
- [Header 2 ("",[],[]) [Str "Lists"]
- ,Div ("styling-xhtml-002.xhtml#style-list-style-type",["section"],[])
- [Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style-type",Space,Str "property"]
- ,Div ("styling-xhtml-002.xhtml#style-009",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-009"],Space,Code ("",[],[]) "decimal"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "decimal",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "decimal",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-010",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-010"],Space,Code ("",[],[]) "circle"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "circle",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."]
- ,BulletList
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "circle",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-011",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-011"],Space,Code ("",[],[]) "square"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "square",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."]
- ,BulletList
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "square",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-012",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-012"],Space,Code ("",[],[]) "disc"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "disc",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."]
- ,BulletList
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "disc",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-013",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-013"],Space,Code ("",[],[]) "lower-latin"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-latin",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-latin",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-014",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-014"],Space,Code ("",[],[]) "lower-roman"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-roman",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-roman",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-015",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-015"],Space,Code ("",[],[]) "upper-alpha"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-alpha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-alpha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-016",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-016"],Space,Code ("",[],[]) "hiragana"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hiragana",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hiragana",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-017",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-017"],Space,Code ("",[],[]) "hiragana-iroha"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hiragana-iroha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hiragana-iroha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-018",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-018"],Space,Code ("",[],[]) "katakana"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "katakana",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "katakana",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-019",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-019"],Space,Code ("",[],[]) "katakana-iroha"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "katakana-iroha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "katakana-iroha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-020",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-020"],Space,Code ("",[],[]) "upper-roman"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-roman",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-roman",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-021",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-021"],Space,Code ("",[],[]) "upper-latin"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "upper-latin",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "upper-latin",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-022",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-022"],Space,Code ("",[],[]) "lower-alpha"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-alpha",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-alpha",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-023",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-023"],Space,Code ("",[],[]) "lower-greek"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "lower-greek",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "lower-greek",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-024",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-024"],Space,Code ("",[],[]) "armenian"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "armenian",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "armenian",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-025",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-025"],Space,Code ("",[],[]) "cjk-ideographic"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "cjk-ideographic",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "cjk-ideographic",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-026",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-026"],Space,Code ("",[],[]) "decimal-leading-zero"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "decimal-leading-zero",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "decimal-leading-zero",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-027",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-027"],Space,Code ("",[],[]) "georgian"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "georgian",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "georgian",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-028",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-028"],Space,Code ("",[],[]) "hebrew"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "hebrew",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "hebrew",Space,Str "markers",Space,Str "in",Space,Str "ascending",Space,Str "order,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-029",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-029"],Space,Code ("",[],[]) "none"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-type",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "none",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "no",Space,Str "markers,",Space,Str "the",Space,Str "test",Space,Str "passes."]]]
- ,Div ("styling-xhtml-002.xhtml#style-list-style",["section"],[])
- [Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style",Space,Str "property"]
- ,Div ("styling-xhtml-002.xhtml#style-030",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-030"],Space,Str "images"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style",Space,Str "shorthand",Space,Str "property",Space,Str "is",Space,Str "supported",Space,Str "using",Space,Str "a",Space,Str "gif",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."]
- ,BulletList
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "the",Space,Str "purple",Space,Str "and",Space,Str "aqua",Space,Str "square",Space,Str "bullet",Space,Str "the",Space,Str "test",Space,Str "passes."]]]
- ,Div ("styling-xhtml-002.xhtml#style-list-style-position",["section"],[])
- [Header 3 ("",[],[]) [Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property"]
- ,Div ("styling-xhtml-002.xhtml#style-040",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-040"],Space,Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property:",Space,Code ("",[],[]) "inside"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "inside",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."]
- ,BulletList
- [[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]
- ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]
- ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "markers",Space,Str "inside",Space,Str "the",Space,Str "indentation,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-041",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-041"],Space,Str "The",Space,Code ("",[],[]) "list-style-position",Space,Str "property:",Space,Code ("",[],[]) "outside"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "list-style-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "outside",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ul",Space,Str "element."]
- ,BulletList
- [[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]
- ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]
- ,[Plain [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat."]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "has",Space,Str "the",Space,Str "default",Space,Str "setting",Space,Str "(marker",Space,Str "outside",Space,Str "the",Space,Str "indentation),",Space,Str "the",Space,Str "test",Space,Str "passes."]]]
- ,Div ("styling-xhtml-002.xhtml#style-list-start",["section"],[])
- [Header 3 ("",[],[]) [Str "The",Space,Str "HTML",Space,Code ("",[],[]) "start",Space,Str "attribute"]
- ,Div ("styling-xhtml-002.xhtml#style-050",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-050"],Space,Str "Without",Space,Code ("",[],[]) "list-style-type",Space,Str "set"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "start",Space,Str "attribute",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element",Space,Str "with",Space,Str "no",Space,Code ("",[],[]) "list-style-type",Space,Str "property."]
- ,OrderedList (25,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "starts",Space,Str "at",Space,Str "25,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-002.xhtml#style-051",["section","ctest"],[])
- [Header 4 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-051"],Space,Str "With",Space,Code ("",[],[]) "list-style-type",Space,Str "set"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "start",Space,Str "attribute",Space,Str "is",Space,Str "supported",Space,Str "on",Space,Str "a",Space,Code ("",[],[]) "ol",Space,Str "element",Space,Str "with",Space,Str "a",Space,Code ("",[],[]) "list-style-type",Space,Str "property."]
- ,OrderedList (50,DefaultStyle,DefaultDelim)
- [[Plain [Str "Lorem"]]
- ,[Plain [Str "Ipsum"]]
- ,[Plain [Str "Dolor"]]
- ,[Plain [Str "Sit"]]
- ,[Plain [Str "Amet"]]]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "list",Space,Str "starts",Space,Str "at",Space,Str "'L'",Space,Str "(50),",Space,Str "the",Space,Str "test",Space,Str "passes."]]]]
-,Para [Span ("styling-xhtml-004.xhtml",[],[]) []]
-,Div ("styling-xhtml-004.xhtml#style-media-rules",["section"],[])
- [Header 2 ("",[],[]) [Code ("",[],[]) "@media",Space,Str "Rules"]
- ,Div ("styling-xhtml-004.xhtml#style-210",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-210"],Space,Code ("",[],[]) "all"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "all",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-211",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-211"],Space,Code ("",[],[]) "screen"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "screen",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-212",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-212"],Space,Code ("",[],[]) "handheld"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "handheld",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-213",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-213"],Space,Code ("",[],[]) "tv"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "tv",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-220",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-220"],Space,Code ("",[],[]) "orientation:landscape"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "orientation:landscape",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\"",Space,Str "when",Space,Str "the",Space,Str "device",Space,Str "is",Space,Str "held",Space,Str "in",Space,Str "landscape",Space,Str "mode,",Space,Str "and",Space,Str "the",Space,Str "device",Space,Str "supports",Space,Str "multiple",Space,Str "orientations,",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-221",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-221"],Space,Code ("",[],[]) "orientation:portrait"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "orientation:portrait",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\"",Space,Str "when",Space,Str "the",Space,Str "device",Space,Str "is",Space,Str "held",Space,Str "in",Space,Str "portrait",Space,Str "mode,",Space,Str "and",Space,Str "the",Space,Str "device",Space,Str "supports",Space,Str "multiple",Space,Str "orientations,",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-230",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-230"],Space,Code ("",[],[]) "min-width"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "min-width:200px",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-231",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-231"],Space,Code ("",[],[]) "max-width"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "max-width:2000px",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-240",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-240"],Space,Code ("",[],[]) "min-device-width"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "min-device-width:200px",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]
- ,Div ("styling-xhtml-004.xhtml#style-241",["section","ctest"],[])
- [Header 3 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-241"],Space,Code ("",[],[]) "max-device-width"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "@media",Space,Str "rule",Space,Str "set",Space,Str "to",Space,Code ("",[],[]) "max-device-width:2000px",Space,Str "is",Space,Str "supported."]
- ,Para [Str "FAIL"]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "reads",Space,Str "\"FAIL\",",Space,Str "the",Space,Str "test",Space,Str "fails."]]]
-,Para [Span ("styling-xhtml-005.xhtml",[],[]) []]
-,Div ("styling-xhtml-005.xhtml#style-text-xform",["section"],[])
- [Header 2 ("",[],[]) [Str "The",Space,Code ("",[],[]) "text-transform",Space,Str "property"]
- ,Div ("styling-xhtml-005.xhtml#style-310",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-310"],Space,Code ("",[],[]) "uppercase"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "uppercase",Space,Str "is",Space,Str "supported."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "upper",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-005.xhtml#style-311",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-311"],Space,Code ("",[],[]) "capitalize"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "capitalize",Space,Str "is",Space,Str "supported."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "If",Space,Str "each",Space,Str "first",Space,Str "letter",Space,Str "of",Space,Str "each",Space,Str "word",Space,Str "in",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "upper",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-005.xhtml#style-312",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-312"],Space,Code ("",[],[]) "lowercase"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "text-transform",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "lowercase",Space,Str "is",Space,Str "supported."]
- ,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipisicing",Space,Str "elit,",Space,Str "sed",Space,Str "do",Space,Str "eiusmod",Space,Str "tempor",Space,Str "incididunt",Space,Str "ut",Space,Str "labore",Space,Str "et",Space,Str "dolore",Space,Str "magna",Space,Str "aliqua.",Space,Str "Ut",Space,Str "enim",Space,Str "ad",Space,Str "minim",Space,Str "veniam,",Space,Str "quis",Space,Str "nostrud",Space,Str "exercitation",Space,Str "ullamco",Space,Str "laboris",Space,Str "nisi",Space,Str "ut",Space,Str "aliquip",Space,Str "ex",Space,Str "ea",Space,Str "commodo",Space,Str "consequat.",Space,Str "Duis",Space,Str "aute",Space,Str "irure",Space,Str "dolor",Space,Str "in",Space,Str "reprehenderit",Space,Str "in",Space,Str "voluptate",Space,Str "velit",Space,Str "esse",Space,Str "cillum",Space,Str "dolore",Space,Str "eu",Space,Str "fugiat",Space,Str "nulla",Space,Str "pariatur.",Space,Str "Excepteur",Space,Str "sint",Space,Str "occaecat",Space,Str "cupidatat",Space,Str "non",Space,Str "proident,",Space,Str "sunt",Space,Str "in",Space,Str "culpa",Space,Str "qui",Space,Str "officia",Space,Str "deserunt",Space,Str "mollit",Space,Str "anim",Space,Str "id",Space,Str "est",Space,Str "laborum."]
- ,Para [Str "If",Space,Str "the",Space,Str "preceding",Space,Str "paragraph",Space,Str "is",Space,Str "in",Space,Str "lower",Space,Str "case,",Space,Str "the",Space,Str "test",Space,Str "passes."]]]
-,Para [Span ("styling-xhtml-006.xhtml",[],[]) []]
-,Div ("styling-xhtml-006.xhtml#style-ruby",["section"],[])
- [Header 2 ("",[],[]) [Str "The",Space,Code ("",[],[]) "epub-ruby-position",Space,Str "property"]
- ,Div ("styling-xhtml-006.xhtml#style-410",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-410"],Space,Code ("",[],[]) "over"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "over",Space,Str "is",Space,Str "supported."]
- ,Plain [RawInline (Format "html") "<ruby class=\"ruby-over\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"]
- ,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Link ("",[],[]) [Str "over"] ("http://www.w3.org/TR/css3-writing-modes/#over",""),Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "ruby",Space,Str "base,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-006.xhtml#style-411",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-411"],Space,Code ("",[],[]) "under"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "under",Space,Str "is",Space,Str "supported."]
- ,Plain [RawInline (Format "html") "<ruby class=\"ruby-under\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"]
- ,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Link ("",[],[]) [Str "under"] ("http://www.w3.org/TR/css3-writing-modes/#under",""),Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "ruby",Space,Str "base,",Space,Str "the",Space,Str "test",Space,Str "passes."]]
- ,Div ("styling-xhtml-006.xhtml#style-412",["section","ctest"],[])
- [Header 2 ("",[],[]) [Span ("",["nature"],[]) [Str "[REQUIRED]"],Space,Span ("",["test-id"],[]) [Str "style-412"],Space,Code ("",[],[]) "inter-character"]
- ,Para [Str "Tests",Space,Str "whether",Space,Str "the",Space,Code ("",[],[]) "-epub-ruby-position",Space,Str "property",Space,Str "set",Space,Str "to",Space,Str "inter-caracter",Space,Str "is",Space,Str "supported."]
- ,Plain [RawInline (Format "html") "<ruby class=\"ruby-inter-character\">",Strong [Str "Lorem",Space,Str "Ipsum"],Space,RawInline (Format "html") "<rp>",Str "(",RawInline (Format "html") "</rp>",RawInline (Format "html") "<rt>",Str "Lorem",Space,Str "Ipsum",RawInline (Format "html") "</rt>",RawInline (Format "html") "<rp>",Str ")",RawInline (Format "html") "</rp>",RawInline (Format "html") "</ruby>"]
- ,Para [Str "If",Space,Str "the",Space,Str "Ruby",Space,Str "text",Space,Str "is",Space,Str "positioned",Space,Str "on",Space,Str "the",Space,Str "right",Space,Str "side",Space,Str "of",Space,Str "the",Space,Str "base",Space,Str "text,",Space,Str "the",Space,Str "test",Space,Str "passes."]]]]
+[ Para [ Span ( "front.xhtml" , [] , [] ) [] ]
+, Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 1
+ ( "" , [] , [] )
+ [ Str "EPUB"
+ , Space
+ , Str "3"
+ , Space
+ , Str "Styling"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Document:"
+ , Space
+ , Str "0101"
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "Status"
+ , Space
+ , Str "of"
+ , Space
+ , Str "this"
+ , Space
+ , Str "Document"
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "is"
+ , Space
+ , Str "currently"
+ , Space
+ , Str "considered"
+ , Space
+ , Span
+ ( "" , [ "status" ] , [] )
+ [ Str "[UNDER" , Space , Str "DEVELOPMENT]" ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "IDPF."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "is"
+ , Space
+ , Str "part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "version"
+ , Space
+ , Span ( "" , [ "version" ] , [] ) [ Str "X.X" ]
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "EPUB"
+ , Space
+ , Str "3.0"
+ , Space
+ , Str "Compliance"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Suite"
+ , Space
+ , Str "released"
+ , SoftBreak
+ , Str "on"
+ , Space
+ , RawInline (Format "html") "<time class=\"release\">"
+ , Str "TBD"
+ , RawInline (Format "html") "</time>"
+ , Str "."
+ ]
+ , Para
+ [ Str "Before"
+ , Space
+ , Str "using"
+ , Space
+ , Str "this"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "to"
+ , Space
+ , Str "evaluate"
+ , Space
+ , Str "reading"
+ , Space
+ , Str "systems,"
+ , Space
+ , Str "testers"
+ , Space
+ , Str "are"
+ , Space
+ , Str "strongly"
+ , Space
+ , Str "encouraged"
+ , Space
+ , Str "to"
+ , SoftBreak
+ , Str "verify"
+ , Space
+ , Str "that"
+ , Space
+ , Str "they"
+ , Space
+ , Str "have"
+ , Space
+ , Str "the"
+ , Space
+ , Str "latest"
+ , Space
+ , Str "release"
+ , Space
+ , Str "by"
+ , Space
+ , Str "checking"
+ , Space
+ , Str "the"
+ , Space
+ , Str "current"
+ , Space
+ , Str "release"
+ , Space
+ , Str "version"
+ , Space
+ , Str "and"
+ , Space
+ , Str "date"
+ , Space
+ , Str "of"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite"
+ , Space
+ , Str "at"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "TBD" ]
+ ( "http://idpf.org/" , "" )
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "publication"
+ , Space
+ , Str "is"
+ , Space
+ , Str "one"
+ , Space
+ , Str "of"
+ , Space
+ , Str "several"
+ , Space
+ , Str "that"
+ , Space
+ , Str "currently"
+ , Space
+ , Str "comprise"
+ , Space
+ , Str "the"
+ , Space
+ , Str "EPUB"
+ , Space
+ , Str "3"
+ , Space
+ , Str "conformance"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite"
+ , SoftBreak
+ , Str "for"
+ , Space
+ , Str "reflowable"
+ , Space
+ , Str "content."
+ , Space
+ , Str "The"
+ , Space
+ , Str "complete"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite"
+ , Space
+ , Str "includes"
+ , Space
+ , Str "all"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "following"
+ , Space
+ , Str "publications:"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "." ] ] ]
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "About"
+ , Space
+ , Str "this"
+ , Space
+ , Str "Document"
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "document"
+ , Space
+ , Str "focuses"
+ , Space
+ , Str "on"
+ , Space
+ , Str "human-evaluated"
+ , Space
+ , Str "binary"
+ , Space
+ , Str "(pass/fail)"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "reflowable"
+ , Space
+ , Str "context."
+ , Space
+ , Str "Tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "fixed-layout"
+ , Space
+ , Str "content"
+ , Space
+ , Str "and"
+ , Space
+ , Str "other"
+ , Space
+ , Str "individual"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "that"
+ , SoftBreak
+ , Str "require"
+ , Space
+ , Str "a"
+ , Space
+ , Str "dedicated"
+ , Space
+ , Str "epub"
+ , Space
+ , Str "file"
+ , Space
+ , Str "are"
+ , Space
+ , Str "available"
+ , Space
+ , Str "in"
+ , Space
+ , Str "additional"
+ , Space
+ , Str "sibling"
+ , Space
+ , Str "documents;"
+ , Space
+ , Str "refer"
+ , Space
+ , Str "to"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "test"
+ , Space
+ , Str "suite"
+ , SoftBreak
+ , Str "wiki"
+ ]
+ ( "https://github.com/mgylling/epub-testsuite/wiki/Overview"
+ , ""
+ )
+ , Space
+ , Str "("
+ , Code
+ ( "" , [] , [] )
+ "https://github.com/mgylling/epub-testsuite/wiki/Overview"
+ , Str ")"
+ , Space
+ , Str "for"
+ , Space
+ , Str "additional"
+ , SoftBreak
+ , Str "information."
+ ]
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header 2 ( "" , [] , [] ) [ Str "Conventions" ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "following"
+ , Space
+ , Str "conventions"
+ , Space
+ , Str "are"
+ , Space
+ , Str "used"
+ , Space
+ , Str "throughout"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document:"
+ ]
+ , DefinitionList
+ [ ( [ Str "1."
+ , Space
+ , Str "Locating"
+ , Space
+ , Str "a"
+ , Space
+ , Str "test"
+ ]
+ , [ [ Div
+ ( "" , [ "ctest" ] , [] )
+ [ Para
+ [ Str "Tests"
+ , Space
+ , Str "for"
+ , Space
+ , Emph [ Str "required" ]
+ , Space
+ , Str "Reading"
+ , Space
+ , Str "System"
+ , Space
+ , Str "functionality"
+ , Space
+ , Str "are"
+ , SoftBreak
+ , Str "preceded"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "label:"
+ , Space
+ , Span
+ ( ""
+ , [ "nature" ]
+ , [ ( "style"
+ , "display: inline; font-size: 100%"
+ )
+ ]
+ )
+ [ Str "[REQUIRED]" ]
+ ]
+ ]
+ , Div
+ ( "" , [ "otest" ] , [] )
+ [ Para
+ [ Str "Tests"
+ , Space
+ , Str "for"
+ , Space
+ , Emph [ Str "optional" ]
+ , Space
+ , Str "Reading"
+ , Space
+ , Str "System"
+ , Space
+ , Str "functionality"
+ , Space
+ , Str "are"
+ , SoftBreak
+ , Str "preceded"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "label:"
+ , Space
+ , Span
+ ( ""
+ , [ "nature" ]
+ , [ ( "style"
+ , "display: inline; font-size: 100%"
+ )
+ ]
+ )
+ [ Str "[OPTIONAL]" ]
+ ]
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "2."
+ , Space
+ , Str "Performing"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ ]
+ , [ [ Plain
+ [ Str "Each"
+ , Space
+ , Str "test"
+ , Space
+ , Str "includes"
+ , Space
+ , Str "a"
+ , Space
+ , Str "description"
+ , Space
+ , Str "of"
+ , Space
+ , Str "its"
+ , Space
+ , Str "purpose"
+ , Space
+ , Str "followed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "actual"
+ , Space
+ , Strong
+ [ Str "test"
+ , Space
+ , Str "statement,"
+ , SoftBreak
+ , Str "which"
+ , Space
+ , Str "can"
+ , Space
+ , Str "always"
+ , Space
+ , Str "be"
+ , Space
+ , Str "evaluated"
+ , Space
+ , Str "to"
+ , Space
+ , Str "true"
+ , Space
+ , Str "or"
+ , Space
+ , Str "false"
+ ]
+ , Str "."
+ , Space
+ , Str "These"
+ , Space
+ , Str "statements"
+ , Space
+ , Str "typically"
+ , Space
+ , Str "have"
+ , Space
+ , Str "the"
+ , Space
+ , Str "form:"
+ , SoftBreak
+ , Str "\"If"
+ , Space
+ , Str "[some"
+ , Space
+ , Str "condition],"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes\"."
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "3."
+ , Space
+ , Str "Scoring"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "results"
+ , Space
+ , Str "form"
+ ]
+ , [ [ Plain
+ [ Str "@@@TODO"
+ , Space
+ , Str "provide"
+ , Space
+ , Str "info"
+ , Space
+ , Str "on"
+ , Space
+ , Str "where"
+ , Space
+ , Str "to"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "results"
+ , Space
+ , Str "form"
+ ]
+ ]
+ ]
+ )
+ ]
+ ]
+ ]
+, Para [ Span ( "styling-xhtml-001.xhtml" , [] , [] ) [] ]
+, Div
+ ( "styling-xhtml-001.xhtml#epub-css" , [ "section" ] , [] )
+ [ Header
+ 1
+ ( "" , [] , [] )
+ [ Str "EPUB" , Space , Str "Style" , Space , Str "Sheets" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "styling"
+ , Space
+ , Str "and"
+ , Space
+ , Str "layout."
+ ]
+ ]
+, Para [ Span ( "styling-xhtml-003.xhtml" , [] , [] ) [] ]
+, Div
+ ( "styling-xhtml-003.xhtml#style-110"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-110" ]
+ , Space
+ , Str "Multi-Column"
+ , Space
+ , Str "Layouts"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "CSS Multi-Column Layout"
+ , Space
+ , Str "properties"
+ , Space
+ , Str "are"
+ , Space
+ , Str "supported."
+ ]
+ , Div
+ ( "" , [ "multicol" ] , [] )
+ [ Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "text"
+ , Space
+ , Str "is"
+ , Space
+ , Str "rendered"
+ , Space
+ , Str "in"
+ , Space
+ , Str "three"
+ , Space
+ , Str "columns,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+, Para [ Span ( "styling-xhtml-002.xhtml" , [] , [] ) [] ]
+, Div
+ ( "styling-xhtml-002.xhtml#style-lists"
+ , [ "section" ]
+ , []
+ )
+ [ Header 2 ( "" , [] , [] ) [ Str "Lists" ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-list-style-type"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-009"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-009" ]
+ , Space
+ , Code ( "" , [] , [] ) "decimal"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "decimal"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "decimal"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-010"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-010" ]
+ , Space
+ , Code ( "" , [] , [] ) "circle"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "circle"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ul"
+ , Space
+ , Str "element."
+ ]
+ , BulletList
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "circle"
+ , Space
+ , Str "markers,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-011"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-011" ]
+ , Space
+ , Code ( "" , [] , [] ) "square"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "square"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ul"
+ , Space
+ , Str "element."
+ ]
+ , BulletList
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "square"
+ , Space
+ , Str "markers,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-012"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-012" ]
+ , Space
+ , Code ( "" , [] , [] ) "disc"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "disc"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ul"
+ , Space
+ , Str "element."
+ ]
+ , BulletList
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "disc"
+ , Space
+ , Str "markers,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-013"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-013" ]
+ , Space
+ , Code ( "" , [] , [] ) "lower-latin"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "lower-latin"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "lower-latin"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-014"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-014" ]
+ , Space
+ , Code ( "" , [] , [] ) "lower-roman"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "lower-roman"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "lower-roman"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-015"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-015" ]
+ , Space
+ , Code ( "" , [] , [] ) "upper-alpha"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "upper-alpha"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "upper-alpha"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-016"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-016" ]
+ , Space
+ , Code ( "" , [] , [] ) "hiragana"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "hiragana"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "hiragana"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-017"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-017" ]
+ , Space
+ , Code ( "" , [] , [] ) "hiragana-iroha"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "hiragana-iroha"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "hiragana-iroha"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-018"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-018" ]
+ , Space
+ , Code ( "" , [] , [] ) "katakana"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "katakana"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "katakana"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-019"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-019" ]
+ , Space
+ , Code ( "" , [] , [] ) "katakana-iroha"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "katakana-iroha"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "katakana-iroha"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-020"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-020" ]
+ , Space
+ , Code ( "" , [] , [] ) "upper-roman"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "upper-roman"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "upper-roman"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-021"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-021" ]
+ , Space
+ , Code ( "" , [] , [] ) "upper-latin"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "upper-latin"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "upper-latin"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-022"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-022" ]
+ , Space
+ , Code ( "" , [] , [] ) "lower-alpha"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "lower-alpha"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "lower-alpha"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-023"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-023" ]
+ , Space
+ , Code ( "" , [] , [] ) "lower-greek"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "lower-greek"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "lower-greek"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-024"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-024" ]
+ , Space
+ , Code ( "" , [] , [] ) "armenian"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "armenian"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "armenian"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-025"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-025" ]
+ , Space
+ , Code ( "" , [] , [] ) "cjk-ideographic"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "cjk-ideographic"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "cjk-ideographic"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-026"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-026" ]
+ , Space
+ , Code ( "" , [] , [] ) "decimal-leading-zero"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "decimal-leading-zero"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "decimal-leading-zero"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-027"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-027" ]
+ , Space
+ , Code ( "" , [] , [] ) "georgian"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "georgian"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "georgian"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-028"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-028" ]
+ , Space
+ , Code ( "" , [] , [] ) "hebrew"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "hebrew"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "hebrew"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "in"
+ , Space
+ , Str "ascending"
+ , Space
+ , Str "order,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-029"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-029" ]
+ , Space
+ , Code ( "" , [] , [] ) "none"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "none"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "no"
+ , Space
+ , Str "markers,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-list-style"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Code ( "" , [] , [] ) "list-style"
+ , Space
+ , Str "property"
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-030"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-030" ]
+ , Space
+ , Str "images"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style"
+ , Space
+ , Str "shorthand"
+ , Space
+ , Str "property"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "using"
+ , Space
+ , Str "a"
+ , Space
+ , Str "gif"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ul"
+ , Space
+ , Str "element."
+ ]
+ , BulletList
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "the"
+ , Space
+ , Str "purple"
+ , Space
+ , Str "and"
+ , Space
+ , Str "aqua"
+ , Space
+ , Str "square"
+ , Space
+ , Str "bullet"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-list-style-position"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-position"
+ , Space
+ , Str "property"
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-040"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-040" ]
+ , Space
+ , Str "The"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-position"
+ , Space
+ , Str "property:"
+ , Space
+ , Code ( "" , [] , [] ) "inside"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-position"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "inside"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ul"
+ , Space
+ , Str "element."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ ]
+ ]
+ , [ Plain
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ ]
+ ]
+ , [ Plain
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "inside"
+ , Space
+ , Str "the"
+ , Space
+ , Str "indentation,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-041"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-041" ]
+ , Space
+ , Str "The"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-position"
+ , Space
+ , Str "property:"
+ , Space
+ , Code ( "" , [] , [] ) "outside"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-position"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "outside"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ul"
+ , Space
+ , Str "element."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ ]
+ ]
+ , [ Plain
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ ]
+ ]
+ , [ Plain
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "has"
+ , Space
+ , Str "the"
+ , Space
+ , Str "default"
+ , Space
+ , Str "setting"
+ , Space
+ , Str "(marker"
+ , Space
+ , Str "outside"
+ , Space
+ , Str "the"
+ , Space
+ , Str "indentation),"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-list-start"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Str "HTML"
+ , Space
+ , Code ( "" , [] , [] ) "start"
+ , Space
+ , Str "attribute"
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-050"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-050" ]
+ , Space
+ , Str "Without"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "set"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "start"
+ , Space
+ , Str "attribute"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element"
+ , Space
+ , Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property."
+ ]
+ , OrderedList
+ ( 25 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "starts"
+ , Space
+ , Str "at"
+ , Space
+ , Str "25,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-002.xhtml#style-051"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 4
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-051" ]
+ , Space
+ , Str "With"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "set"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "start"
+ , Space
+ , Str "attribute"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "ol"
+ , Space
+ , Str "element"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Code ( "" , [] , [] ) "list-style-type"
+ , Space
+ , Str "property."
+ ]
+ , OrderedList
+ ( 50 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Lorem" ] ]
+ , [ Plain [ Str "Ipsum" ] ]
+ , [ Plain [ Str "Dolor" ] ]
+ , [ Plain [ Str "Sit" ] ]
+ , [ Plain [ Str "Amet" ] ]
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "list"
+ , Space
+ , Str "starts"
+ , Space
+ , Str "at"
+ , Space
+ , Str "'L'"
+ , Space
+ , Str "(50),"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ ]
+ ]
+, Para [ Span ( "styling-xhtml-004.xhtml" , [] , [] ) [] ]
+, Div
+ ( "styling-xhtml-004.xhtml#style-media-rules"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Code ( "" , [] , [] ) "@media" , Space , Str "Rules" ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-210"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-210" ]
+ , Space
+ , Code ( "" , [] , [] ) "all"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "all"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-211"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-211" ]
+ , Space
+ , Code ( "" , [] , [] ) "screen"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "screen"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-212"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-212" ]
+ , Space
+ , Code ( "" , [] , [] ) "handheld"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "handheld"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-213"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-213" ]
+ , Space
+ , Code ( "" , [] , [] ) "tv"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "tv"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-220"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-220" ]
+ , Space
+ , Code ( "" , [] , [] ) "orientation:landscape"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "orientation:landscape"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\""
+ , Space
+ , Str "when"
+ , Space
+ , Str "the"
+ , Space
+ , Str "device"
+ , Space
+ , Str "is"
+ , Space
+ , Str "held"
+ , Space
+ , Str "in"
+ , Space
+ , Str "landscape"
+ , Space
+ , Str "mode,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "the"
+ , Space
+ , Str "device"
+ , Space
+ , Str "supports"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "orientations,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-221"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-221" ]
+ , Space
+ , Code ( "" , [] , [] ) "orientation:portrait"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "orientation:portrait"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\""
+ , Space
+ , Str "when"
+ , Space
+ , Str "the"
+ , Space
+ , Str "device"
+ , Space
+ , Str "is"
+ , Space
+ , Str "held"
+ , Space
+ , Str "in"
+ , Space
+ , Str "portrait"
+ , Space
+ , Str "mode,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "the"
+ , Space
+ , Str "device"
+ , Space
+ , Str "supports"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "orientations,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-230"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-230" ]
+ , Space
+ , Code ( "" , [] , [] ) "min-width"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "min-width:200px"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-231"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-231" ]
+ , Space
+ , Code ( "" , [] , [] ) "max-width"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "max-width:2000px"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-240"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-240" ]
+ , Space
+ , Code ( "" , [] , [] ) "min-device-width"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "min-device-width:200px"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-004.xhtml#style-241"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-241" ]
+ , Space
+ , Code ( "" , [] , [] ) "max-device-width"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "@media"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Code ( "" , [] , [] ) "max-device-width:2000px"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para [ Str "FAIL" ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "reads"
+ , Space
+ , Str "\"FAIL\","
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "fails."
+ ]
+ ]
+ ]
+, Para [ Span ( "styling-xhtml-005.xhtml" , [] , [] ) [] ]
+, Div
+ ( "styling-xhtml-005.xhtml#style-text-xform"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Code ( "" , [] , [] ) "text-transform"
+ , Space
+ , Str "property"
+ ]
+ , Div
+ ( "styling-xhtml-005.xhtml#style-310"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-310" ]
+ , Space
+ , Code ( "" , [] , [] ) "uppercase"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "text-transform"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Str "uppercase"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "is"
+ , Space
+ , Str "in"
+ , Space
+ , Str "upper"
+ , Space
+ , Str "case,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-005.xhtml#style-311"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-311" ]
+ , Space
+ , Code ( "" , [] , [] ) "capitalize"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "text-transform"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Str "capitalize"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "each"
+ , Space
+ , Str "first"
+ , Space
+ , Str "letter"
+ , Space
+ , Str "of"
+ , Space
+ , Str "each"
+ , Space
+ , Str "word"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "is"
+ , Space
+ , Str "in"
+ , Space
+ , Str "upper"
+ , Space
+ , Str "case,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-005.xhtml#style-312"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-312" ]
+ , Space
+ , Code ( "" , [] , [] ) "lowercase"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "text-transform"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Str "lowercase"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Para
+ [ Str "Lorem"
+ , Space
+ , Str "ipsum"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipisicing"
+ , Space
+ , Str "elit,"
+ , Space
+ , Str "sed"
+ , Space
+ , Str "do"
+ , Space
+ , Str "eiusmod"
+ , Space
+ , Str "tempor"
+ , Space
+ , Str "incididunt"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "labore"
+ , Space
+ , Str "et"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "magna"
+ , Space
+ , Str "aliqua."
+ , Space
+ , Str "Ut"
+ , Space
+ , Str "enim"
+ , Space
+ , Str "ad"
+ , Space
+ , Str "minim"
+ , Space
+ , Str "veniam,"
+ , Space
+ , Str "quis"
+ , Space
+ , Str "nostrud"
+ , Space
+ , Str "exercitation"
+ , Space
+ , Str "ullamco"
+ , Space
+ , Str "laboris"
+ , Space
+ , Str "nisi"
+ , Space
+ , Str "ut"
+ , Space
+ , Str "aliquip"
+ , Space
+ , Str "ex"
+ , Space
+ , Str "ea"
+ , Space
+ , Str "commodo"
+ , Space
+ , Str "consequat."
+ , Space
+ , Str "Duis"
+ , Space
+ , Str "aute"
+ , Space
+ , Str "irure"
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "in"
+ , Space
+ , Str "reprehenderit"
+ , Space
+ , Str "in"
+ , Space
+ , Str "voluptate"
+ , Space
+ , Str "velit"
+ , Space
+ , Str "esse"
+ , Space
+ , Str "cillum"
+ , Space
+ , Str "dolore"
+ , Space
+ , Str "eu"
+ , Space
+ , Str "fugiat"
+ , Space
+ , Str "nulla"
+ , Space
+ , Str "pariatur."
+ , Space
+ , Str "Excepteur"
+ , Space
+ , Str "sint"
+ , Space
+ , Str "occaecat"
+ , Space
+ , Str "cupidatat"
+ , Space
+ , Str "non"
+ , Space
+ , Str "proident,"
+ , Space
+ , Str "sunt"
+ , Space
+ , Str "in"
+ , Space
+ , Str "culpa"
+ , Space
+ , Str "qui"
+ , Space
+ , Str "officia"
+ , Space
+ , Str "deserunt"
+ , Space
+ , Str "mollit"
+ , Space
+ , Str "anim"
+ , Space
+ , Str "id"
+ , Space
+ , Str "est"
+ , Space
+ , Str "laborum."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "is"
+ , Space
+ , Str "in"
+ , Space
+ , Str "lower"
+ , Space
+ , Str "case,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ ]
+, Para [ Span ( "styling-xhtml-006.xhtml" , [] , [] ) [] ]
+, Div
+ ( "styling-xhtml-006.xhtml#style-ruby"
+ , [ "section" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "The"
+ , Space
+ , Code ( "" , [] , [] ) "epub-ruby-position"
+ , Space
+ , Str "property"
+ ]
+ , Div
+ ( "styling-xhtml-006.xhtml#style-410"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-410" ]
+ , Space
+ , Code ( "" , [] , [] ) "over"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "-epub-ruby-position"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Str "over"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Plain
+ [ RawInline (Format "html") "<ruby class=\"ruby-over\">"
+ , Strong [ Str "Lorem" , Space , Str "Ipsum" ]
+ , Space
+ , RawInline (Format "html") "<rp>"
+ , Str "("
+ , RawInline (Format "html") "</rp>"
+ , RawInline (Format "html") "<rt>"
+ , Str "Lorem"
+ , Space
+ , Str "Ipsum"
+ , RawInline (Format "html") "</rt>"
+ , RawInline (Format "html") "<rp>"
+ , Str ")"
+ , RawInline (Format "html") "</rp>"
+ , RawInline (Format "html") "</ruby>"
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Ruby"
+ , Space
+ , Str "text"
+ , Space
+ , Str "is"
+ , Space
+ , Str "positioned"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "over" ]
+ ( "http://www.w3.org/TR/css3-writing-modes/#over" , "" )
+ , Space
+ , Str "side"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "ruby"
+ , Space
+ , Str "base,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-006.xhtml#style-411"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-411" ]
+ , Space
+ , Code ( "" , [] , [] ) "under"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "-epub-ruby-position"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Str "under"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Plain
+ [ RawInline (Format "html") "<ruby class=\"ruby-under\">"
+ , Strong [ Str "Lorem" , Space , Str "Ipsum" ]
+ , Space
+ , RawInline (Format "html") "<rp>"
+ , Str "("
+ , RawInline (Format "html") "</rp>"
+ , RawInline (Format "html") "<rt>"
+ , Str "Lorem"
+ , Space
+ , Str "Ipsum"
+ , RawInline (Format "html") "</rt>"
+ , RawInline (Format "html") "<rp>"
+ , Str ")"
+ , RawInline (Format "html") "</rp>"
+ , RawInline (Format "html") "</ruby>"
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Ruby"
+ , Space
+ , Str "text"
+ , Space
+ , Str "is"
+ , Space
+ , Str "positioned"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "under" ]
+ ( "http://www.w3.org/TR/css3-writing-modes/#under"
+ , ""
+ )
+ , Space
+ , Str "side"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "ruby"
+ , Space
+ , Str "base,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ , Div
+ ( "styling-xhtml-006.xhtml#style-412"
+ , [ "section" , "ctest" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "" , [ "nature" ] , [] ) [ Str "[REQUIRED]" ]
+ , Space
+ , Span ( "" , [ "test-id" ] , [] ) [ Str "style-412" ]
+ , Space
+ , Code ( "" , [] , [] ) "inter-character"
+ ]
+ , Para
+ [ Str "Tests"
+ , Space
+ , Str "whether"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [] , [] ) "-epub-ruby-position"
+ , Space
+ , Str "property"
+ , Space
+ , Str "set"
+ , Space
+ , Str "to"
+ , Space
+ , Str "inter-caracter"
+ , Space
+ , Str "is"
+ , Space
+ , Str "supported."
+ ]
+ , Plain
+ [ RawInline
+ (Format "html") "<ruby class=\"ruby-inter-character\">"
+ , Strong [ Str "Lorem" , Space , Str "Ipsum" ]
+ , Space
+ , RawInline (Format "html") "<rp>"
+ , Str "("
+ , RawInline (Format "html") "</rp>"
+ , RawInline (Format "html") "<rt>"
+ , Str "Lorem"
+ , Space
+ , Str "Ipsum"
+ , RawInline (Format "html") "</rt>"
+ , RawInline (Format "html") "<rp>"
+ , Str ")"
+ , RawInline (Format "html") "</rp>"
+ , RawInline (Format "html") "</ruby>"
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Ruby"
+ , Space
+ , Str "text"
+ , Space
+ , Str "is"
+ , Space
+ , Str "positioned"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "right"
+ , Space
+ , Str "side"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "base"
+ , Space
+ , Str "text,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "test"
+ , Space
+ , Str "passes."
+ ]
+ ]
+ ]
+]
diff --git a/test/epub/img.epub b/test/epub/img.epub
index ebe80d935..de4ae712a 100644
--- a/test/epub/img.epub
+++ b/test/epub/img.epub
Binary files differ
diff --git a/test/epub/img_no_cover.epub b/test/epub/img_no_cover.epub
index d8028ff2e..70431ff1a 100644
--- a/test/epub/img_no_cover.epub
+++ b/test/epub/img_no_cover.epub
Binary files differ
diff --git a/test/epub/wasteland.epub b/test/epub/wasteland.epub
index c958c5fc2..6541fe066 100644
--- a/test/epub/wasteland.epub
+++ b/test/epub/wasteland.epub
Binary files differ
diff --git a/test/epub/wasteland.native b/test/epub/wasteland.native
index ff59182a6..cd3347f4e 100644
--- a/test/epub/wasteland.native
+++ b/test/epub/wasteland.native
@@ -1,938 +1,4551 @@
-[Para [Image ("",[],[]) [] ("wasteland-cover.jpg","")]
-,Para [Span ("wasteland-content.xhtml",[],[]) []]
-,Div ("wasteland-content.xhtml#frontmatter",["section","frontmatter"],[])
- []
-,Div ("wasteland-content.xhtml#bodymatter",["section","bodymatter"],[])
- [Div ("wasteland-content.xhtml#ch1",["section"],[])
- [Header 2 ("",[],[]) [Str "I.",Space,Str "THE",Space,Str "BURIAL",Space,Str "OF",Space,Str "THE",Space,Str "DEAD"]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "April",Space,Str "is",Space,Str "the",Space,Str "cruellest",Space,Str "month,",Space,Str "breeding"]]
- ,Div ("",[],[])
- [Plain [Str "Lilacs",Space,Str "out",Space,Str "of",Space,Str "the",Space,Str "dead",Space,Str "land,",Space,Str "mixing"]]
- ,Div ("",[],[])
- [Plain [Str "Memory",Space,Str "and",Space,Str "desire,",Space,Str "stirring"]]
- ,Div ("",[],[])
- [Plain [Str "Dull",Space,Str "roots",Space,Str "with",Space,Str "spring",Space,Str "rain."]]
- ,Div ("",[],[])
- [Plain [Str "Winter",Space,Str "kept",Space,Str "us",Space,Str "warm,",Space,Str "covering"]]
- ,Div ("",[],[])
- [Plain [Str "Earth",Space,Str "in",Space,Str "forgetful",Space,Str "snow,",Space,Str "feeding"]]
- ,Div ("",[],[])
- [Plain [Str "A",Space,Str "little",Space,Str "life",Space,Str "with",Space,Str "dried",Space,Str "tubers."]]
- ,Div ("",[],[])
- [Plain [Str "Summer",Space,Str "surprised",Space,Str "us,",Space,Str "coming",Space,Str "over",Space,Str "the",Space,Str "Starnbergersee"]]
- ,Div ("",[],[])
- [Plain [Str "With",Space,Str "a",Space,Str "shower",Space,Str "of",Space,Str "rain;",Space,Str "we",Space,Str "stopped",Space,Str "in",Space,Str "the",Space,Str "colonnade,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "went",Space,Str "on",Space,Str "in",Space,Str "sunlight,",Space,Str "into",Space,Str "the",Space,Str "Hofgarten,",Span ("",["lnum"],[]) [Str "10"]]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "drank",Space,Str "coffee,",Space,Str "and",Space,Str "talked",Space,Str "for",Space,Str "an",Space,Str "hour."]]
- ,Div ("",[],[("lang","de")])
- [Plain [Str "Bin",Space,Str "gar",Space,Str "keine",Space,Str "Russin,",Space,Str "stamm'",Space,Str "aus",Space,Str "Litauen,",Space,Str "echt",SoftBreak,Str "deutsch."]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "when",Space,Str "we",Space,Str "were",Space,Str "children,",Space,Str "staying",Space,Str "at",Space,Str "the",Space,Str "archduke's,"]]
- ,Div ("",[],[])
- [Plain [Str "My",Space,Str "cousin's,",Space,Str "he",Space,Str "took",Space,Str "me",Space,Str "out",Space,Str "on",Space,Str "a",Space,Str "sled,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "I",Space,Str "was",Space,Str "frightened.",Space,Str "He",Space,Str "said,",Space,Str "Marie,"]]
- ,Div ("",[],[])
- [Plain [Str "Marie,",Space,Str "hold",Space,Str "on",Space,Str "tight.",Space,Str "And",Space,Str "down",Space,Str "we",Space,Str "went."]]
- ,Div ("",[],[])
- [Plain [Str "In",Space,Str "the",Space,Str "mountains,",Space,Str "there",Space,Str "you",Space,Str "feel",Space,Str "free."]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "read,",Space,Str "much",Space,Str "of",Space,Str "the",Space,Str "night,",Space,Str "and",Space,Str "go",Space,Str "south",Space,Str "in",Space,Str "the",Space,Str "winter."]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "What",Space,Str "are",Space,Str "the",Space,Str "roots",Space,Str "that",Space,Str "clutch,",Space,Str "what",Space,Str "branches",Space,Str "grow"]]
- ,Div ("wasteland-content.xhtml#ln20",[],[])
- [Plain [Str "Out",Space,Str "of",Space,Str "this",Space,Str "stony",Space,Str "rubbish?",Space,Str "Son",Space,Str "of",Space,Str "man,",Note [Para [Link ("",[],[]) [Str "Line",Space,Str "20."] ("#wasteland-content.xhtml#ln20",""),Space,Str "Cf.",Space,Str "Ezekiel",Space,Str "2:1."]],Span ("",["lnum"],[]) [Str "20"]]]
- ,Div ("",[],[])
- [Plain [Str "You",Space,Str "cannot",Space,Str "say,",Space,Str "or",Space,Str "guess,",Space,Str "for",Space,Str "you",Space,Str "know",Space,Str "only"]]
- ,Div ("",[],[])
- [Plain [Str "A",Space,Str "heap",Space,Str "of",Space,Str "broken",Space,Str "images,",Space,Str "where",Space,Str "the",Space,Str "sun",Space,Str "beats,"]]
- ,Div ("wasteland-content.xhtml#ln23",[],[])
- [Plain [Str "And",Space,Str "the",Space,Str "dead",Space,Str "tree",Space,Str "gives",Space,Str "no",Space,Str "shelter,",Space,Str "the",Space,Str "cricket",Space,Str "no",Space,Str "relief,",Note [Para [Link ("",[],[]) [Str "23."] ("#wasteland-content.xhtml#ln23",""),Space,Str "Cf.",Space,Str "Ecclesiastes",Space,Str "12:5."]]]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "the",Space,Str "dry",Space,Str "stone",Space,Str "no",Space,Str "sound",Space,Str "of",Space,Str "water.",Space,Str "Only"]]
- ,Div ("",[],[])
- [Plain [Str "There",Space,Str "is",Space,Str "shadow",Space,Str "under",Space,Str "this",Space,Str "red",Space,Str "rock,"]]
- ,Div ("",[],[])
- [Plain [Str "(Come",Space,Str "in",Space,Str "under",Space,Str "the",Space,Str "shadow",Space,Str "of",Space,Str "this",Space,Str "red",Space,Str "rock),"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "I",Space,Str "will",Space,Str "show",Space,Str "you",Space,Str "something",Space,Str "different",Space,Str "from",Space,Str "either"]]
- ,Div ("",[],[])
- [Plain [Str "Your",Space,Str "shadow",Space,Str "at",Space,Str "morning",Space,Str "striding",Space,Str "behind",Space,Str "you"]]
- ,Div ("",[],[])
- [Plain [Str "Or",Space,Str "your",Space,Str "shadow",Space,Str "at",Space,Str "evening",Space,Str "rising",Space,Str "to",Space,Str "meet",Space,Str "you;"]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "will",Space,Str "show",Space,Str "you",Space,Str "fear",Space,Str "in",Space,Str "a",Space,Str "handful",Space,Str "of",Space,Str "dust.",Span ("",["lnum"],[]) [Str "30"]]]
- ,BlockQuote
- [Div ("",[],[])
- [Div ("wasteland-content.xhtml#ln31",[],[])
- [Plain [Str "Frisch",Space,Str "weht",Space,Str "der",Space,Str "Wind",Note [Para [Link ("",[],[]) [Str "31."] ("#wasteland-content.xhtml#ln31",""),Space,Str "V.",Space,Str "Tristan",Space,Str "und",Space,Str "Isolde,",Space,Str "i,",Space,Str "verses",Space,Str "5-8."]]]]
- ,Div ("",[],[])
- [Plain [Str "Der",Space,Str "Heimat",Space,Str "zu"]]
- ,Div ("",[],[])
- [Plain [Str "Mein",Space,Str "Irisch",Space,Str "Kind,"]]
- ,Div ("",[],[])
- [Plain [Str "Wo",Space,Str "weilest",Space,Str "du?"]]]]
- ,Div ("",[],[])
- [Plain [Str "\"You",Space,Str "gave",Space,Str "me",Space,Str "hyacinths",Space,Str "first",Space,Str "a",Space,Str "year",Space,Str "ago;"]]
- ,Div ("",[],[])
- [Plain [Str "\"They",Space,Str "called",Space,Str "me",Space,Str "the",Space,Str "hyacinth",Space,Str "girl.\""]]
- ,Div ("",[],[])
- [Plain [Str "\8213Yet",Space,Str "when",Space,Str "we",Space,Str "came",Space,Str "back,",Space,Str "late,",Space,Str "from",Space,Str "the",Space,Str "Hyacinth",SoftBreak,Str "garden,"]]
- ,Div ("",[],[])
- [Plain [Str "Your",Space,Str "arms",Space,Str "full,",Space,Str "and",Space,Str "your",Space,Str "hair",Space,Str "wet,",Space,Str "I",Space,Str "could",Space,Str "not"]]
- ,Div ("",[],[])
- [Plain [Str "Speak,",Space,Str "and",Space,Str "my",Space,Str "eyes",Space,Str "failed,",Space,Str "I",Space,Str "was",Space,Str "neither"]]
- ,Div ("",[],[])
- [Plain [Str "Living",Space,Str "nor",Space,Str "dead,",Space,Str "and",Space,Str "I",Space,Str "knew",Space,Str "nothing,",Span ("",["lnum"],[]) [Str "40"]]]
- ,Div ("",[],[])
- [Plain [Str "Looking",Space,Str "into",Space,Str "the",Space,Str "heart",Space,Str "of",Space,Str "light,",Space,Str "the",Space,Str "silence."]]
- ,Div ("wasteland-content.xhtml#ln42",[],[("lang","de")])
- [Plain [Emph [Str "Od'",Space,Str "und",Space,Str "leer",Space,Str "das",Space,Str "Meer"],Str ".",Note [Para [Link ("",[],[]) [Str "42."] ("#wasteland-content.xhtml#ln42",""),Space,Str "Id.",Space,Str "iii,",Space,Str "verse",Space,Str "24."]]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "Madame",Space,Str "Sosostris,",Space,Str "famous",Space,Str "clairvoyante,"]]
- ,Div ("",[],[])
- [Plain [Str "Had",Space,Str "a",Space,Str "bad",Space,Str "cold,",Space,Str "nevertheless"]]
- ,Div ("",[],[])
- [Plain [Str "Is",Space,Str "known",Space,Str "to",Space,Str "be",Space,Str "the",Space,Str "wisest",Space,Str "woman",Space,Str "in",Space,Str "Europe,"]]
- ,Div ("wasteland-content.xhtml#ln46",[],[])
- [Plain [Str "With",Space,Str "a",Space,Str "wicked",Space,Str "pack",Space,Str "of",Space,Str "cards.",Space,Str "Here,",Space,Str "said",Space,Str "she,",Note [Para [Link ("",[],[]) [Str "46."] ("#wasteland-content.xhtml#ln46",""),Space,Str "I",Space,Str "am",Space,Str "not",Space,Str "familiar",Space,Str "with",Space,Str "the",Space,Str "exact",Space,Str "constitution",Space,Str "of",Space,Str "the",Space,Str "Tarot",Space,Str "pack",Space,Str "of",SoftBreak,Str "cards,",Space,Str "from",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "obviously",Space,Str "departed",Space,Str "to",Space,Str "suit",Space,Str "my",Space,Str "own",Space,Str "convenience.",SoftBreak,Str "The",Space,Str "Hanged",Space,Str "Man,",Space,Str "a",Space,Str "member",Space,Str "of",Space,Str "the",Space,Str "traditional",Space,Str "pack,",Space,Str "fits",Space,Str "my",Space,Str "purpose",Space,Str "in",Space,Str "two",SoftBreak,Str "ways:",Space,Str "because",Space,Str "he",Space,Str "is",Space,Str "associated",Space,Str "in",Space,Str "my",Space,Str "mind",Space,Str "with",Space,Str "the",Space,Str "Hanged",Space,Str "God",Space,Str "of",Space,Str "Frazer,",SoftBreak,Str "and",Space,Str "because",Space,Str "I",Space,Str "associate",Space,Str "him",Space,Str "with",Space,Str "the",Space,Str "hooded",Space,Str "figure",Space,Str "in",Space,Str "the",Space,Str "passage",Space,Str "of",Space,Str "the",SoftBreak,Str "disciples",Space,Str "to",Space,Str "Emmaus",Space,Str "in",Space,Str "Part",Space,Str "V.",Space,Str "The",Space,Str "Phoenician",Space,Str "Sailor",Space,Str "and",Space,Str "the",Space,Str "Merchant",SoftBreak,Str "appear",Space,Str "later;",Space,Str "also",Space,Str "the",Space,Str "\"crowds",Space,Str "of",Space,Str "people,\"",Space,Str "and",Space,Str "Death",Space,Str "by",Space,Str "Water",Space,Str "is",SoftBreak,Str "executed",Space,Str "in",Space,Str "Part",Space,Str "IV.",Space,Str "The",Space,Str "Man",Space,Str "with",Space,Str "Three",Space,Str "Staves",Space,Str "(an",Space,Str "authentic",Space,Str "member",Space,Str "of",SoftBreak,Str "the",Space,Str "Tarot",Space,Str "pack)",Space,Str "I",Space,Str "associate,",Space,Str "quite",Space,Str "arbitrarily,",Space,Str "with",Space,Str "the",Space,Str "Fisher",Space,Str "King",SoftBreak,Str "himself."]]]]
- ,Div ("",[],[])
- [Plain [Str "Is",Space,Str "your",Space,Str "card,",Space,Str "the",Space,Str "drowned",Space,Str "Phoenician",Space,Str "Sailor,"]]
- ,Div ("",[],[])
- [Plain [Str "(Those",Space,Str "are",Space,Str "pearls",Space,Str "that",Space,Str "were",Space,Str "his",Space,Str "eyes.",Space,Str "Look!)"]]
- ,Div ("",[],[])
- [Plain [Str "Here",Space,Str "is",Space,Str "Belladonna,",Space,Str "the",Space,Str "Lady",Space,Str "of",Space,Str "the",Space,Str "Rocks,"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "lady",Space,Str "of",Space,Str "situations.",Span ("",["lnum"],[]) [Str "50"]]]
- ,Div ("",[],[])
- [Plain [Str "Here",Space,Str "is",Space,Str "the",Space,Str "man",Space,Str "with",Space,Str "three",Space,Str "staves,",Space,Str "and",Space,Str "here",Space,Str "the",Space,Str "Wheel,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "here",Space,Str "is",Space,Str "the",Space,Str "one-eyed",Space,Str "merchant,",Space,Str "and",Space,Str "this",Space,Str "card,"]]
- ,Div ("",[],[])
- [Plain [Str "Which",Space,Str "is",Space,Str "blank,",Space,Str "is",Space,Str "something",Space,Str "he",Space,Str "carries",Space,Str "on",Space,Str "his",Space,Str "back,"]]
- ,Div ("",[],[])
- [Plain [Str "Which",Space,Str "I",Space,Str "am",Space,Str "forbidden",Space,Str "to",Space,Str "see.",Space,Str "I",Space,Str "do",Space,Str "not",Space,Str "find"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "Hanged",Space,Str "Man.",Space,Str "Fear",Space,Str "death",Space,Str "by",Space,Str "water."]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "see",Space,Str "crowds",Space,Str "of",Space,Str "people,",Space,Str "walking",Space,Str "round",Space,Str "in",Space,Str "a",Space,Str "ring."]]
- ,Div ("",[],[])
- [Plain [Str "Thank",Space,Str "you.",Space,Str "If",Space,Str "you",Space,Str "see",Space,Str "dear",Space,Str "Mrs.",Space,Str "Equitone,"]]
- ,Div ("",[],[])
- [Plain [Str "Tell",Space,Str "her",Space,Str "I",Space,Str "bring",Space,Str "the",Space,Str "horoscope",Space,Str "myself:"]]
- ,Div ("",[],[])
- [Plain [Str "One",Space,Str "must",Space,Str "be",Space,Str "so",Space,Str "careful",Space,Str "these",Space,Str "days."]]]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln60",[],[])
- [Plain [Str "Unreal",Space,Str "City,",Note [Para [Link ("",[],[]) [Str "60."] ("#wasteland-content.xhtml#ln60",""),Space,Str "Cf.",Space,Str "Baudelaire:"],BlockQuote [Para [Str "\"Fourmillante",Space,Str "cite;,",Space,Str "cite;",Space,Str "pleine",Space,Str "de",Space,Str "reves,",LineBreak,Str "Ou",Space,Str "le",Space,Str "spectre",Space,Str "en",SoftBreak,Str "plein",Space,Str "jour",Space,Str "raccroche",Space,Str "le",Space,Str "passant.\""]]],Span ("",["lnum"],[]) [Str "60"]]]
- ,Div ("",[],[])
- [Plain [Str "Under",Space,Str "the",Space,Str "brown",Space,Str "fog",Space,Str "of",Space,Str "a",Space,Str "winter",Space,Str "dawn,"]]
- ,Div ("",[],[])
- [Plain [Str "A",Space,Str "crowd",Space,Str "flowed",Space,Str "over",Space,Str "London",Space,Str "Bridge,",Space,Str "so",Space,Str "many,"]]
- ,Div ("wasteland-content.xhtml#ln63",[],[])
- [Plain [Str "I",Space,Str "had",Space,Str "not",Space,Str "thought",Space,Str "death",Space,Str "had",Space,Str "undone",Space,Str "so",Space,Str "many.",Note [Para [Link ("",[],[]) [Str "63."] ("#wasteland-content.xhtml#ln63",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "iii.",Space,Str "55-7."],BlockQuote [Para [Str "\"si",Space,Str "lunga",Space,Str "tratta",LineBreak,Str "di",Space,Str "gente,",Space,Str "ch'io",Space,Str "non",Space,Str "avrei",Space,Str "mai",Space,Str "creduto",LineBreak,Str "che",SoftBreak,Str "morte",Space,Str "tanta",Space,Str "n'avesse",Space,Str "disfatta.\""]]]]]
- ,Div ("wasteland-content.xhtml#ln64",[],[])
- [Plain [Str "Sighs,",Space,Str "short",Space,Str "and",Space,Str "infrequent,",Space,Str "were",Space,Str "exhaled,",Note [Para [Link ("",[],[]) [Str "64."] ("#wasteland-content.xhtml#ln64",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "iv.",Space,Str "25-7:"],BlockQuote [Para [Str "\"Quivi,",Space,Str "secondo",Space,Str "che",Space,Str "per",Space,Str "ascoltahre,",LineBreak,Str "\"non",Space,Str "avea",Space,Str "pianto,",Space,Str "ma'",Space,Str "che",Space,Str "di",SoftBreak,Str "sospiri,",LineBreak,Str "\"che",Space,Str "l'aura",Space,Str "eterna",Space,Str "facevan",Space,Str "tremare.\""]]]]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "each",Space,Str "man",Space,Str "fixed",Space,Str "his",Space,Str "eyes",Space,Str "before",Space,Str "his",Space,Str "feet."]]
- ,Div ("",[],[])
- [Plain [Str "Flowed",Space,Str "up",Space,Str "the",Space,Str "hill",Space,Str "and",Space,Str "down",Space,Str "King",Space,Str "William",Space,Str "Street,"]]
- ,Div ("",[],[])
- [Plain [Str "To",Space,Str "where",Space,Str "Saint",Space,Str "Mary",Space,Str "Woolnoth",Space,Str "kept",Space,Str "the",Space,Str "hours"]]
- ,Div ("wasteland-content.xhtml#ln68",[],[])
- [Plain [Str "With",Space,Str "a",Space,Str "dead",Space,Str "sound",Space,Str "on",Space,Str "the",Space,Str "final",Space,Str "stroke",Space,Str "of",Space,Str "nine.",Note [Para [Link ("",[],[]) [Str "68."] ("#wasteland-content.xhtml#ln68",""),Space,Str "A",Space,Str "phenomenon",Space,Str "which",Space,Str "I",Space,Str "have",Space,Str "often",Space,Str "noticed."]]]]
- ,Div ("",[],[])
- [Plain [Str "There",Space,Str "I",Space,Str "saw",Space,Str "one",Space,Str "I",Space,Str "knew,",Space,Str "and",Space,Str "stopped",Space,Str "him,",Space,Str "crying",SoftBreak,Str "\"Stetson!"]]
- ,Div ("",[],[])
- [Plain [Str "\"You",Space,Str "who",Space,Str "were",Space,Str "with",Space,Str "me",Space,Str "in",Space,Str "the",Space,Str "ships",Space,Str "at",Space,Str "Mylae!",Span ("",["lnum"],[]) [Str "70"]]]
- ,Div ("",[],[])
- [Plain [Str "\"That",Space,Str "corpse",Space,Str "you",Space,Str "planted",Space,Str "last",Space,Str "year",Space,Str "in",Space,Str "your",Space,Str "garden,"]]
- ,Div ("",[],[])
- [Plain [Str "\"Has",Space,Str "it",Space,Str "begun",Space,Str "to",Space,Str "sprout?",Space,Str "Will",Space,Str "it",Space,Str "bloom",Space,Str "this",Space,Str "year?"]]
- ,Div ("",[],[])
- [Plain [Str "\"Or",Space,Str "has",Space,Str "the",Space,Str "sudden",Space,Str "frost",Space,Str "disturbed",Space,Str "its",Space,Str "bed?"]]]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln74",[],[])
- [Plain [Str "\"Oh",Space,Str "keep",Space,Str "the",Space,Str "Dog",Space,Str "far",Space,Str "hence,",Space,Str "that's",Space,Str "friend",Space,Str "to",Space,Str "men,",Note [Para [Link ("",[],[]) [Str "74."] ("#wasteland-content.xhtml#ln74",""),Space,Str "Cf.",Space,Str "the",Space,Str "Dirge",Space,Str "in",Space,Str "Webster's",Space,Str "White",Space,Str "Devil",Space,Str "."]]]]
- ,Div ("",[],[])
- [Plain [Str "\"Or",Space,Str "with",Space,Str "his",Space,Str "nails",Space,Str "he'll",Space,Str "dig",Space,Str "it",Space,Str "up",Space,Str "again!"]]
- ,Div ("wasteland-content.xhtml#ln76",[],[])
- [Plain [Str "\"You!",Space,Span ("",[],[("lang","fr")]) [Str "hypocrite",Space,Str "lecteur!",Space,Str "-",Space,Str "mon",Space,Str "semblable,",Space,Str "-",SoftBreak,Str "mon",Space,Str "frere"],Space,Str "!\"",Note [Para [Link ("",[],[]) [Str "76."] ("#wasteland-content.xhtml#ln76",""),Space,Str "V.",Space,Str "Baudelaire,",Space,Str "Preface",Space,Str "to",Space,Str "Fleurs",Space,Str "du",Space,Str "Mal."]]]]]]
- ,Div ("wasteland-content.xhtml#ch2",["section"],[])
- [Header 2 ("",[],[]) [Str "II.",Space,Str "A",Space,Str "GAME",Space,Str "OF",Space,Str "CHESS"]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln77",[],[])
- [Plain [Str "The",Space,Str "Chair",Space,Str "she",Space,Str "sat",Space,Str "in,",Space,Str "like",Space,Str "a",Space,Str "burnished",Space,Str "throne,",Note [Para [Link ("",[],[]) [Str "77."] ("#wasteland-content.xhtml#ln77",""),Space,Str "Cf.",Space,Str "Antony",Space,Str "and",Space,Str "Cleopatra,",Space,Str "II.",Space,Str "ii.,",Space,Str "l.",Space,Str "190."]]]]
- ,Div ("",[],[])
- [Plain [Str "Glowed",Space,Str "on",Space,Str "the",Space,Str "marble,",Space,Str "where",Space,Str "the",Space,Str "glass"]]
- ,Div ("",[],[])
- [Plain [Str "Held",Space,Str "up",Space,Str "by",Space,Str "standards",Space,Str "wrought",Space,Str "with",Space,Str "fruited",Space,Str "vines"]]
- ,Div ("",[],[])
- [Plain [Str "From",Space,Str "which",Space,Str "a",Space,Str "golden",Space,Str "Cupidon",Space,Str "peeped",Space,Str "out",Span ("",["lnum"],[]) [Str "80"]]]
- ,Div ("",[],[])
- [Plain [Str "(Another",Space,Str "hid",Space,Str "his",Space,Str "eyes",Space,Str "behind",Space,Str "his",Space,Str "wing)"]]
- ,Div ("",[],[])
- [Plain [Str "Doubled",Space,Str "the",Space,Str "flames",Space,Str "of",Space,Str "sevenbranched",Space,Str "candelabra"]]
- ,Div ("",[],[])
- [Plain [Str "Reflecting",Space,Str "light",Space,Str "upon",Space,Str "the",Space,Str "table",Space,Str "as"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "glitter",Space,Str "of",Space,Str "her",Space,Str "jewels",Space,Str "rose",Space,Str "to",Space,Str "meet",Space,Str "it,"]]
- ,Div ("",[],[])
- [Plain [Str "From",Space,Str "satin",Space,Str "cases",Space,Str "poured",Space,Str "in",Space,Str "rich",Space,Str "profusion;"]]
- ,Div ("",[],[])
- [Plain [Str "In",Space,Str "vials",Space,Str "of",Space,Str "ivory",Space,Str "and",Space,Str "coloured",Space,Str "glass"]]
- ,Div ("",[],[])
- [Plain [Str "Unstoppered,",Space,Str "lurked",Space,Str "her",Space,Str "strange",Space,Str "synthetic",Space,Str "perfumes,"]]
- ,Div ("",[],[])
- [Plain [Str "Unguent,",Space,Str "powdered,",Space,Str "or",Space,Str "liquid",Space,Str "-",Space,Str "troubled,",Space,Str "confused"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "drowned",Space,Str "the",Space,Str "sense",Space,Str "in",Space,Str "odours;",Space,Str "stirred",Space,Str "by",Space,Str "the",Space,Str "air"]]
- ,Div ("",[],[])
- [Plain [Str "That",Space,Str "freshened",Space,Str "from",Space,Str "the",Space,Str "window,",Space,Str "these",Space,Str "ascended",Span ("",["lnum"],[]) [Str "90"]]]
- ,Div ("",[],[])
- [Plain [Str "In",Space,Str "fattening",Space,Str "the",Space,Str "prolonged",Space,Str "candle-flames,"]]
- ,Div ("wasteland-content.xhtml#ln92",[],[])
- [Plain [Str "Flung",Space,Str "their",Space,Str "smoke",Space,Str "into",Space,Str "the",Space,Str "laquearia,",Note [Para [Link ("",[],[]) [Str "92."] ("#wasteland-content.xhtml#ln92",""),Space,Str "Laquearia.",Space,Str "V.",Space,Str "Aeneid,",Space,Str "I.",Space,Str "726:"],BlockQuote [Para [Str "dependent",Space,Str "lychni",Space,Str "laquearibus",Space,Str "aureis",Space,Str "incensi,",Space,Str "et",Space,Str "noctem",SoftBreak,Str "flammis",LineBreak,Str "funalia",Space,Str "vincunt."]]]]]
- ,Div ("",[],[])
- [Plain [Str "Stirring",Space,Str "the",Space,Str "pattern",Space,Str "on",Space,Str "the",Space,Str "coffered",Space,Str "ceiling."]]
- ,Div ("",[],[])
- [Plain [Str "Huge",Space,Str "sea-wood",Space,Str "fed",Space,Str "with",Space,Str "copper"]]
- ,Div ("",[],[])
- [Plain [Str "Burned",Space,Str "green",Space,Str "and",Space,Str "orange,",Space,Str "framed",Space,Str "by",Space,Str "the",Space,Str "coloured",Space,Str "stone,"]]
- ,Div ("",[],[])
- [Plain [Str "In",Space,Str "which",Space,Str "sad",Space,Str "light",Space,Str "a",Space,Str "carved",Space,Str "dolphin",Space,Str "swam."]]
- ,Div ("",[],[])
- [Plain [Str "Above",Space,Str "the",Space,Str "antique",Space,Str "mantel",Space,Str "was",Space,Str "displayed"]]
- ,Div ("wasteland-content.xhtml#ln98",[],[])
- [Plain [Str "As",Space,Str "though",Space,Str "a",Space,Str "window",Space,Str "gave",Space,Str "upon",Space,Str "the",Space,Str "sylvan",Space,Str "scene",Note [Para [Link ("",[],[]) [Str "98."] ("#wasteland-content.xhtml#ln98",""),Space,Str "Sylvan",Space,Str "scene.",Space,Str "V.",Space,Str "Milton,",Space,Str "Paradise",Space,Str "Lost,",Space,Str "iv.",Space,Str "140."]]]]
- ,Div ("wasteland-content.xhtml#ln99",[],[])
- [Plain [Str "The",Space,Str "change",Space,Str "of",Space,Str "Philomel,",Space,Str "by",Space,Str "the",Space,Str "barbarous",Space,Str "king",Note [Para [Link ("",[],[]) [Str "99."] ("#wasteland-content.xhtml#ln99",""),Space,Str "V.",Space,Str "Ovid,",Space,Str "Metamorphoses,",Space,Str "vi,",Space,Str "Philomela."]]]]
- ,Div ("wasteland-content.xhtml#ln100",[],[])
- [Plain [Str "So",Space,Str "rudely",Space,Str "forced;",Space,Str "yet",Space,Str "there",Space,Str "the",Space,Str "nightingale",Note [Para [Link ("",[],[]) [Str "100."] ("#wasteland-content.xhtml#ln100",""),Space,Str "Cf.",Space,Str "Part",Space,Str "III,",Space,Str "l.",Space,Str "204."]],SoftBreak,Span ("",["lnum"],[]) [Str "100"]]]
- ,Div ("",[],[])
- [Plain [Str "Filled",Space,Str "all",Space,Str "the",Space,Str "desert",Space,Str "with",Space,Str "inviolable",Space,Str "voice"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "still",Space,Str "she",Space,Str "cried,",Space,Str "and",Space,Str "still",Space,Str "the",Space,Str "world",Space,Str "pursues,"]]
- ,Div ("",[],[])
- [Plain [Str "\"Jug",Space,Str "Jug\"",Space,Str "to",Space,Str "dirty",Space,Str "ears."]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "other",Space,Str "withered",Space,Str "stumps",Space,Str "of",Space,Str "time"]]
- ,Div ("",[],[])
- [Plain [Str "Were",Space,Str "told",Space,Str "upon",Space,Str "the",Space,Str "walls;",Space,Str "staring",Space,Str "forms"]]
- ,Div ("",[],[])
- [Plain [Str "Leaned",Space,Str "out,",Space,Str "leaning,",Space,Str "hushing",Space,Str "the",Space,Str "room",Space,Str "enclosed."]]
- ,Div ("",[],[])
- [Plain [Str "Footsteps",Space,Str "shuffled",Space,Str "on",Space,Str "the",Space,Str "stair."]]
- ,Div ("",[],[])
- [Plain [Str "Under",Space,Str "the",Space,Str "firelight,",Space,Str "under",Space,Str "the",Space,Str "brush,",Space,Str "her",Space,Str "hair"]]
- ,Div ("",[],[])
- [Plain [Str "Spread",Space,Str "out",Space,Str "in",Space,Str "fiery",Space,Str "points"]]
- ,Div ("",[],[])
- [Plain [Str "Glowed",Space,Str "into",Space,Str "words,",Space,Str "then",Space,Str "would",Space,Str "be",Space,Str "savagely",Space,Str "still.",Span ("",["lnum"],[]) [Str "110"]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "\"My",Space,Str "nerves",Space,Str "are",Space,Str "bad",Space,Str "to-night.",Space,Str "Yes,",Space,Str "bad.",Space,Str "Stay",Space,Str "with",Space,Str "me."]]
- ,Div ("",[],[])
- [Plain [Str "\"Speak",Space,Str "to",Space,Str "me.",Space,Str "Why",Space,Str "do",Space,Str "you",Space,Str "never",Space,Str "speak.",Space,Str "Speak."]]
- ,Div ("",[],[])
- [Plain [Str "\"What",Space,Str "are",Space,Str "you",Space,Str "thinking",Space,Str "of?",Space,Str "What",Space,Str "thinking?",Space,Str "What?"]]
- ,Div ("",[],[])
- [Plain [Str "\"I",Space,Str "never",Space,Str "know",Space,Str "what",Space,Str "you",Space,Str "are",Space,Str "thinking.",Space,Str "Think.\""]]]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln115",[],[])
- [Plain [Str "I",Space,Str "think",Space,Str "we",Space,Str "are",Space,Str "in",Space,Str "rats'",Space,Str "alley",Note [Para [Link ("",[],[]) [Str "115."] ("#wasteland-content.xhtml#ln115",""),Space,Str "Cf.",Space,Str "Part",Space,Str "III,",Space,Str "l.",Space,Str "195."]]]]
- ,Div ("",[],[])
- [Plain [Str "Where",Space,Str "the",Space,Str "dead",Space,Str "men",Space,Str "lost",Space,Str "their",Space,Str "bones."]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "\"What",Space,Str "is",Space,Str "that",Space,Str "noise?\""]]
- ,Div ("wasteland-content.xhtml#ln118",["indent"],[])
- [Plain [Str "The",Space,Str "wind",Space,Str "under",Space,Str "the",Space,Str "door.",Note [Para [Link ("",[],[]) [Str "118."] ("#wasteland-content.xhtml#ln118",""),Space,Str "Cf.",Space,Str "Webster:"],BlockQuote [Para [Str "\"Is",Space,Str "the",Space,Str "wind",Space,Str "in",Space,Str "that",Space,Str "door",Space,Str "still?\""]]]]]
- ,Div ("",[],[])
- [Plain [Str "\"What",Space,Str "is",Space,Str "that",Space,Str "noise",Space,Str "now?",Space,Str "What",Space,Str "is",Space,Str "the",Space,Str "wind",Space,Str "doing?\""]]
- ,Div ("",["indent"],[])
- [Plain [Str "Nothing",Space,Str "again",Space,Str "nothing.",Span ("",["lnum"],[]) [Str "120"]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "\"Do"]]
- ,Div ("",[],[])
- [Plain [Str "\"You",Space,Str "know",Space,Str "nothing?",Space,Str "Do",Space,Str "you",Space,Str "see",Space,Str "nothing?",Space,Str "Do",Space,Str "you",Space,Str "remember"]]
- ,Div ("",[],[])
- [Plain [Str "\"Nothing?\""]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "I",Space,Str "remember"]]
- ,Div ("",[],[])
- [Plain [Str "Those",Space,Str "are",Space,Str "pearls",Space,Str "that",Space,Str "were",Space,Str "his",Space,Str "eyes."]]
- ,Div ("wasteland-content.xhtml#ln126",[],[])
- [Plain [Str "\"Are",Space,Str "you",Space,Str "alive,",Space,Str "or",Space,Str "not?",Space,Str "Is",Space,Str "there",Space,Str "nothing",Space,Str "in",Space,Str "your",Space,Str "head?\"",Note [Para [Link ("",[],[]) [Str "126."] ("#wasteland-content.xhtml#ln126",""),Space,Str "Cf.",Space,Str "Part",Space,Str "I,",Space,Str "l.",Space,Str "37,",Space,Str "48."]]]]
- ,Div ("",[],[])
- [Plain [Str "But"]]
- ,Div ("",[],[])
- [Plain [Str "O",Space,Str "O",Space,Str "O",Space,Str "O",Space,Str "that",Space,Str "Shakespeherian",Space,Str "Rag\8213"]]
- ,Div ("",[],[])
- [Plain [Str "It's",Space,Str "so",Space,Str "elegant"]]
- ,Div ("",[],[])
- [Plain [Str "So",Space,Str "intelligent",Span ("",["lnum"],[]) [Str "130"]]]
- ,Div ("",[],[])
- [Plain [Str "\"What",Space,Str "shall",Space,Str "I",Space,Str "do",Space,Str "now?",Space,Str "What",Space,Str "shall",Space,Str "I",Space,Str "do?\""]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "shall",Space,Str "rush",Space,Str "out",Space,Str "as",Space,Str "I",Space,Str "am,",Space,Str "and",Space,Str "walk",Space,Str "the",Space,Str "street"]]
- ,Div ("",[],[])
- [Plain [Str "\"With",Space,Str "my",Space,Str "hair",Space,Str "down,",Space,Str "so.",Space,Str "What",Space,Str "shall",Space,Str "we",Space,Str "do",Space,Str "to-morrow?"]]
- ,Div ("",[],[])
- [Plain [Str "\"What",Space,Str "shall",Space,Str "we",Space,Str "ever",Space,Str "do?\""]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "hot",Space,Str "water",Space,Str "at",Space,Str "ten."]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "if",Space,Str "it",Space,Str "rains,",Space,Str "a",Space,Str "closed",Space,Str "car",Space,Str "at",Space,Str "four."]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "we",Space,Str "shall",Space,Str "play",Space,Str "a",Space,Str "game",Space,Str "of",Space,Str "chess,"]]
- ,Div ("wasteland-content.xhtml#ln138",[],[])
- [Plain [Str "Pressing",Space,Str "lidless",Space,Str "eyes",Space,Str "and",Space,Str "waiting",Space,Str "for",Space,Str "a",Space,Str "knock",Space,Str "upon",Space,Str "the",Space,Str "door.",Note [Para [Link ("",[],[]) [Str "138."] ("#wasteland-content.xhtml#ln138",""),Space,Str "Cf.",Space,Str "the",Space,Str "game",Space,Str "of",Space,Str "chess",Space,Str "in",Space,Str "Middleton's",Space,Str "Women",Space,Str "beware",Space,Str "Women."]]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "When",Space,Str "Lil's",Space,Str "husband",Space,Str "got",Space,Str "demobbed,",Space,Str "I",Space,Str "said",Space,Str "-"]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "didn't",Space,Str "mince",Space,Str "my",Space,Str "words,",Space,Str "I",Space,Str "said",Space,Str "to",Space,Str "her",Space,Str "myself,",Span ("",["lnum"],[]) [Str "140"]]]
- ,Div ("",[],[])
- [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]]
- ,Div ("",[],[])
- [Plain [Str "Now",Space,Str "Albert's",Space,Str "coming",Space,Str "back,",Space,Str "make",Space,Str "yourself",Space,Str "a",Space,Str "bit",Space,Str "smart."]]
- ,Div ("",[],[])
- [Plain [Str "He'll",Space,Str "want",Space,Str "to",Space,Str "know",Space,Str "what",Space,Str "you",Space,Str "done",Space,Str "with",Space,Str "that",Space,Str "money",Space,Str "he",Space,Str "gave",SoftBreak,Str "you"]]
- ,Div ("",[],[])
- [Plain [Str "To",Space,Str "get",Space,Str "yourself",Space,Str "some",Space,Str "teeth.",Space,Str "He",Space,Str "did,",Space,Str "I",Space,Str "was",Space,Str "there."]]
- ,Div ("",[],[])
- [Plain [Str "You",Space,Str "have",Space,Str "them",Space,Str "all",Space,Str "out,",Space,Str "Lil,",Space,Str "and",Space,Str "get",Space,Str "a",Space,Str "nice",Space,Str "set,"]]
- ,Div ("",[],[])
- [Plain [Str "He",Space,Str "said,",Space,Str "I",Space,Str "swear,",Space,Str "I",Space,Str "can't",Space,Str "bear",Space,Str "to",Space,Str "look",Space,Str "at",Space,Str "you."]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "no",Space,Str "more",Space,Str "can't",Space,Str "I,",Space,Str "I",Space,Str "said,",Space,Str "and",Space,Str "think",Space,Str "of",Space,Str "poor",Space,Str "Albert,"]]
- ,Div ("",[],[])
- [Plain [Str "He's",Space,Str "been",Space,Str "in",Space,Str "the",Space,Str "army",Space,Str "four",Space,Str "years,",Space,Str "he",Space,Str "wants",Space,Str "a",Space,Str "good",Space,Str "time,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "if",Space,Str "you",Space,Str "don't",Space,Str "give",Space,Str "it",Space,Str "him,",Space,Str "there's",Space,Str "others",Space,Str "will,",Space,Str "I",SoftBreak,Str "said."]]
- ,Div ("",[],[])
- [Plain [Str "Oh",Space,Str "is",Space,Str "there,",Space,Str "she",Space,Str "said.",Space,Str "Something",Space,Str "o'",Space,Str "that,",Space,Str "I",Space,Str "said.",Span ("",["lnum"],[]) [Str "150"]]]
- ,Div ("",[],[])
- [Plain [Str "Then",Space,Str "I'll",Space,Str "know",Space,Str "who",Space,Str "to",Space,Str "thank,",Space,Str "she",Space,Str "said,",Space,Str "and",Space,Str "give",Space,Str "me",Space,Str "a",Space,Str "straight",SoftBreak,Str "look."]]
- ,Div ("",[],[])
- [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]]
- ,Div ("",[],[])
- [Plain [Str "If",Space,Str "you",Space,Str "don't",Space,Str "like",Space,Str "it",Space,Str "you",Space,Str "can",Space,Str "get",Space,Str "on",Space,Str "with",Space,Str "it,",Space,Str "I",Space,Str "said."]]
- ,Div ("",[],[])
- [Plain [Str "Others",Space,Str "can",Space,Str "pick",Space,Str "and",Space,Str "choose",Space,Str "if",Space,Str "you",Space,Str "can't."]]
- ,Div ("",[],[])
- [Plain [Str "But",Space,Str "if",Space,Str "Albert",Space,Str "makes",Space,Str "off,",Space,Str "it",Space,Str "won't",Space,Str "be",Space,Str "for",Space,Str "lack",Space,Str "of",SoftBreak,Str "telling."]]
- ,Div ("",[],[])
- [Plain [Str "You",Space,Str "ought",Space,Str "to",Space,Str "be",Space,Str "ashamed,",Space,Str "I",Space,Str "said,",Space,Str "to",Space,Str "look",Space,Str "so",Space,Str "antique."]]
- ,Div ("",[],[])
- [Plain [Str "(And",Space,Str "her",Space,Str "only",Space,Str "thirty-one.)"]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "can't",Space,Str "help",Space,Str "it,",Space,Str "she",Space,Str "said,",Space,Str "pulling",Space,Str "a",Space,Str "long",Space,Str "face,"]]
- ,Div ("",[],[])
- [Plain [Str "It's",Space,Str "them",Space,Str "pills",Space,Str "I",Space,Str "took,",Space,Str "to",Space,Str "bring",Space,Str "it",Space,Str "off,",Space,Str "she",Space,Str "said."]]
- ,Div ("",[],[])
- [Plain [Str "(She's",Space,Str "had",Space,Str "five",Space,Str "already,",Space,Str "and",Space,Str "nearly",Space,Str "died",Space,Str "of",Space,Str "young",Space,Str "George.)",Span ("",["lnum"],[]) [Str "160"]]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "chemist",Space,Str "said",Space,Str "it",Space,Str "would",Space,Str "be",Space,Str "all",Space,Str "right,",Space,Str "but",Space,Str "I've",Space,Str "never",Space,Str "been",Space,Str "the",SoftBreak,Str "same."]]
- ,Div ("",[],[])
- [Plain [Str "You",Space,Emph [Str "are"],Space,Str "a",Space,Str "proper",Space,Str "fool,",Space,Str "I",Space,Str "said."]]
- ,Div ("",[],[])
- [Plain [Str "Well,",Space,Str "if",Space,Str "Albert",Space,Str "won't",Space,Str "leave",Space,Str "you",Space,Str "alone,",Space,Str "there",Space,Str "it",Space,Str "is,",Space,Str "I",SoftBreak,Str "said,"]]
- ,Div ("",[],[])
- [Plain [Str "What",Space,Str "you",Space,Str "get",Space,Str "married",Space,Str "for",Space,Str "if",Space,Str "you",Space,Str "don't",Space,Str "want",Space,Str "children?"]]
- ,Div ("",[],[])
- [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]]
- ,Div ("",[],[])
- [Plain [Str "Well,",Space,Str "that",Space,Str "Sunday",Space,Str "Albert",Space,Str "was",Space,Str "home,",Space,Str "they",Space,Str "had",Space,Str "a",Space,Str "hot",SoftBreak,Str "gammon,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "they",Space,Str "asked",Space,Str "me",Space,Str "in",Space,Str "to",Space,Str "dinner,",Space,Str "to",Space,Str "get",Space,Str "the",Space,Str "beauty",Space,Str "of",Space,Str "it",SoftBreak,Str "hot\8213"]]
- ,Div ("",[],[])
- [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]]
- ,Div ("",[],[])
- [Plain [Str "HURRY",Space,Str "UP",Space,Str "PLEASE",Space,Str "ITS",Space,Str "TIME"]]
- ,Div ("",[],[])
- [Plain [Str "Goonight",Space,Str "Bill.",Space,Str "Goonight",Space,Str "Lou.",Space,Str "Goonight",Space,Str "May.",Space,Str "Goonight.",Span ("",["lnum"],[]) [Str "170"]]]
- ,Div ("",[],[])
- [Plain [Str "Ta",Space,Str "ta.",Space,Str "Goonight.",Space,Str "Goonight."]]
- ,Div ("",[],[])
- [Plain [Str "Good",Space,Str "night,",Space,Str "ladies,",Space,Str "good",Space,Str "night,",Space,Str "sweet",Space,Str "ladies,",Space,Str "good",Space,Str "night,",Space,Str "good",SoftBreak,Str "night."]]]]
- ,Div ("wasteland-content.xhtml#ch3",["section"],[])
- [Header 2 ("",[],[]) [Str "III.",Space,Str "THE",Space,Str "FIRE",Space,Str "SERMON"]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "The",Space,Str "river's",Space,Str "tent",Space,Str "is",Space,Str "broken:",Space,Str "the",Space,Str "last",Space,Str "fingers",Space,Str "of",Space,Str "leaf"]]
- ,Div ("",[],[])
- [Plain [Str "Clutch",Space,Str "and",Space,Str "sink",Space,Str "into",Space,Str "the",Space,Str "wet",Space,Str "bank.",Space,Str "The",Space,Str "wind"]]
- ,Div ("",[],[])
- [Plain [Str "Crosses",Space,Str "the",Space,Str "brown",Space,Str "land,",Space,Str "unheard.",Space,Str "The",Space,Str "nymphs",Space,Str "are",SoftBreak,Str "departed."]]
- ,Div ("wasteland-content.xhtml#ln176",[],[])
- [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly,",Space,Str "till",Space,Str "I",Space,Str "end",Space,Str "my",Space,Str "song.",Note [Para [Link ("",[],[]) [Str "176."] ("#wasteland-content.xhtml#ln176",""),Space,Str "V.",Space,Str "Spenser,",Space,Str "Prothalamion."]]]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "river",Space,Str "bears",Space,Str "no",Space,Str "empty",Space,Str "bottles,",Space,Str "sandwich",Space,Str "papers,"]]
- ,Div ("",[],[])
- [Plain [Str "Silk",Space,Str "handkerchiefs,",Space,Str "cardboard",Space,Str "boxes,",Space,Str "cigarette",Space,Str "ends"]]
- ,Div ("",[],[])
- [Plain [Str "Or",Space,Str "other",Space,Str "testimony",Space,Str "of",Space,Str "summer",Space,Str "nights.",Space,Str "The",Space,Str "nymphs",Space,Str "are",SoftBreak,Str "departed."]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "their",Space,Str "friends,",Space,Str "the",Space,Str "loitering",Space,Str "heirs",Space,Str "of",Space,Str "city",Space,Str "directors;",Span ("",["lnum"],[]) [Str "180"]]]
- ,Div ("",[],[])
- [Plain [Str "Departed,",Space,Str "have",Space,Str "left",Space,Str "no",Space,Str "addresses."]]
- ,Div ("",[],[])
- [Plain [Str "By",Space,Str "the",Space,Str "waters",Space,Str "of",Space,Str "Leman",Space,Str "I",Space,Str "sat",Space,Str "down",Space,Str "and",Space,Str "wept",Space,Str ".",Space,Str ".",Space,Str "."]]
- ,Div ("",[],[])
- [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly",Space,Str "till",Space,Str "I",Space,Str "end",Space,Str "my",Space,Str "song,"]]
- ,Div ("",[],[])
- [Plain [Str "Sweet",Space,Str "Thames,",Space,Str "run",Space,Str "softly,",Space,Str "for",Space,Str "I",Space,Str "speak",Space,Str "not",Space,Str "loud",Space,Str "or",Space,Str "long."]]
- ,Div ("",[],[])
- [Plain [Str "But",Space,Str "at",Space,Str "my",Space,Str "back",Space,Str "in",Space,Str "a",Space,Str "cold",Space,Str "blast",Space,Str "I",Space,Str "hear"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "rattle",Space,Str "of",Space,Str "the",Space,Str "bones,",Space,Str "and",Space,Str "chuckle",Space,Str "spread",Space,Str "from",Space,Str "ear",Space,Str "to",SoftBreak,Str "ear."]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "A",Space,Str "rat",Space,Str "crept",Space,Str "softly",Space,Str "through",Space,Str "the",Space,Str "vegetation"]]
- ,Div ("",[],[])
- [Plain [Str "Dragging",Space,Str "its",Space,Str "slimy",Space,Str "belly",Space,Str "on",Space,Str "the",Space,Str "bank"]]
- ,Div ("",[],[])
- [Plain [Str "While",Space,Str "I",Space,Str "was",Space,Str "fishing",Space,Str "in",Space,Str "the",Space,Str "dull",Space,Str "canal"]]
- ,Div ("",[],[])
- [Plain [Str "On",Space,Str "a",Space,Str "winter",Space,Str "evening",Space,Str "round",Space,Str "behind",Space,Str "the",Space,Str "gashouse",Span ("",["lnum"],[]) [Str "190"]]]
- ,Div ("",[],[])
- [Plain [Str "Musing",Space,Str "upon",Space,Str "the",Space,Str "king",Space,Str "my",Space,Str "brother's",Space,Str "wreck"]]
- ,Div ("wasteland-content.xhtml#ln192",[],[])
- [Plain [Str "And",Space,Str "on",Space,Str "the",Space,Str "king",Space,Str "my",Space,Str "father's",Space,Str "death",Space,Str "before",Space,Str "him.",Note [Para [Link ("",[],[]) [Str "192."] ("#wasteland-content.xhtml#ln192",""),Space,Str "Cf.",Space,Str "The",Space,Str "Tempest,",Space,Str "I.",Space,Str "ii."]]]]
- ,Div ("",[],[])
- [Plain [Str "White",Space,Str "bodies",Space,Str "naked",Space,Str "on",Space,Str "the",Space,Str "low",Space,Str "damp",Space,Str "ground"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "bones",Space,Str "cast",Space,Str "in",Space,Str "a",Space,Str "little",Space,Str "low",Space,Str "dry",Space,Str "garret,"]]
- ,Div ("",[],[])
- [Plain [Str "Rattled",Space,Str "by",Space,Str "the",Space,Str "rat's",Space,Str "foot",Space,Str "only,",Space,Str "year",Space,Str "to",Space,Str "year."]]
- ,Div ("wasteland-content.xhtml#ln196",[],[])
- [Plain [Str "But",Space,Str "at",Space,Str "my",Space,Str "back",Space,Str "from",Space,Str "time",Space,Str "to",Space,Str "time",Space,Str "I",Space,Str "hear",Note [Para [Link ("",[],[]) [Str "196."] ("#wasteland-content.xhtml#ln196",""),Space,Str "Cf.",Space,Str "Marvell,",Space,Str "To",Space,Str "His",Space,Str "Coy",Space,Str "Mistress."]]]]
- ,Div ("wasteland-content.xhtml#ln197",[],[])
- [Plain [Str "The",Space,Str "sound",Space,Str "of",Space,Str "horns",Space,Str "and",Space,Str "motors,",Space,Str "which",Space,Str "shall",Space,Str "bring",Note [Para [Link ("",[],[]) [Str "197."] ("#wasteland-content.xhtml#ln197",""),Space,Str "Cf.",Space,Str "Day,",Space,Str "Parliament",Space,Str "of",Space,Str "Bees:"],BlockQuote [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "\"When",Space,Str "of",Space,Str "the",Space,Str "sudden,",Space,Str "listening,",Space,Str "you",Space,Str "shall",SoftBreak,Str "hear,"]],Div ("",[],[]) [Plain [Str "\"A",Space,Str "noise",Space,Str "of",Space,Str "horns",Space,Str "and",Space,Str "hunting,",Space,Str "which",Space,Str "shall",SoftBreak,Str "bring"]],Div ("",[],[]) [Plain [Str "\"Actaeon",Space,Str "to",Space,Str "Diana",Space,Str "in",Space,Str "the",Space,Str "spring,"]],Div ("",[],[]) [Plain [Str "\"Where",Space,Str "all",Space,Str "shall",Space,Str "see",Space,Str "her",Space,Str "naked",Space,Str "skin",Space,Str ".",Space,Str ".",Space,Str ".\""]]]]]]]
- ,Div ("",[],[])
- [Plain [Str "Sweeney",Space,Str "to",Space,Str "Mrs.",Space,Str "Porter",Space,Str "in",Space,Str "the",Space,Str "spring."]]
- ,Div ("wasteland-content.xhtml#ln199",[],[])
- [Plain [Str "O",Space,Str "the",Space,Str "moon",Space,Str "shone",Space,Str "bright",Space,Str "on",Space,Str "Mrs.",Space,Str "Porter",Note [Para [Link ("",[],[]) [Str "199."] ("#wasteland-content.xhtml#ln199",""),Space,Str "I",Space,Str "do",Space,Str "not",Space,Str "know",Space,Str "the",Space,Str "origin",Space,Str "of",Space,Str "the",Space,Str "ballad",Space,Str "from",Space,Str "which",Space,Str "these",Space,Str "lines",Space,Str "are",SoftBreak,Str "taken:",Space,Str "it",Space,Str "was",Space,Str "reported",Space,Str "to",Space,Str "me",Space,Str "from",Space,Str "Sydney,",Space,Str "Australia."]]]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "on",Space,Str "her",Space,Str "daughter",Span ("",["lnum"],[]) [Str "200"]]]
- ,Div ("",[],[])
- [Plain [Str "They",Space,Str "wash",Space,Str "their",Space,Str "feet",Space,Str "in",Space,Str "soda",Space,Str "water"]]
- ,Div ("wasteland-content.xhtml#ln202",[],[("lang","fr")])
- [Plain [Emph [Str "Et",Space,Str "O",Space,Str "ces",Space,Str "voix",Space,Str "d'enfants,",Space,Str "chantant",Space,Str "dans",Space,Str "la",Space,Str "coupole"],Str "!",Note [Para [Link ("",[],[]) [Str "202."] ("#wasteland-content.xhtml#ln202",""),Space,Str "V.",Space,Str "Verlaine,",Space,Str "Parsifal."]]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "Twit",Space,Str "twit",Space,Str "twit"]]
- ,Div ("",[],[])
- [Plain [Str "Jug",Space,Str "jug",Space,Str "jug",Space,Str "jug",Space,Str "jug",Space,Str "jug"]]
- ,Div ("",[],[])
- [Plain [Str "So",Space,Str "rudely",Space,Str "forc'd."]]
- ,Div ("",[],[])
- [Plain [Str "Tereu"]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "Unreal",Space,Str "City"]]
- ,Div ("",[],[])
- [Plain [Str "Under",Space,Str "the",Space,Str "brown",Space,Str "fog",Space,Str "of",Space,Str "a",Space,Str "winter",Space,Str "noon"]]
- ,Div ("",[],[])
- [Plain [Str "Mr.",Space,Str "Eugenides,",Space,Str "the",Space,Str "Smyrna",Space,Str "merchant"]]
- ,Div ("wasteland-content.xhtml#ln210",[],[])
- [Plain [Str "Unshaven,",Space,Str "with",Space,Str "a",Space,Str "pocket",Space,Str "full",Space,Str "of",Space,Str "currants",Note [Para [Link ("",[],[]) [Str "210."] ("#wasteland-content.xhtml#ln210",""),Space,Str "The",Space,Str "currants",Space,Str "were",Space,Str "quoted",Space,Str "at",Space,Str "a",Space,Str "price",Space,Str "\"cost",Space,Str "insurance",Space,Str "and",Space,Str "freight",Space,Str "to",SoftBreak,Str "London\";",Space,Str "and",Space,Str "the",Space,Str "Bill",Space,Str "of",Space,Str "Lading",Space,Str "etc.",Space,Str "were",Space,Str "to",Space,Str "be",Space,Str "handed",Space,Str "to",Space,Str "the",Space,Str "buyer",Space,Str "upon",SoftBreak,Str "payment",Space,Str "of",Space,Str "the",Space,Str "sight",Space,Str "draft."]],SoftBreak,Span ("",["lnum"],[]) [Str "210"]]]
- ,Div ("",[],[])
- [Plain [Str "C.i.f.",Space,Str "London:",Space,Str "documents",Space,Str "at",Space,Str "sight,"]]
- ,Div ("",[],[])
- [Plain [Str "Asked",Space,Str "me",Space,Str "in",Space,Str "demotic",Space,Str "French"]]
- ,Div ("",[],[])
- [Plain [Str "To",Space,Str "luncheon",Space,Str "at",Space,Str "the",Space,Str "Cannon",Space,Str "Street",Space,Str "Hotel"]]
- ,Div ("",[],[])
- [Plain [Str "Followed",Space,Str "by",Space,Str "a",Space,Str "weekend",Space,Str "at",Space,Str "the",Space,Str "Metropole."]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "At",Space,Str "the",Space,Str "violet",Space,Str "hour,",Space,Str "when",Space,Str "the",Space,Str "eyes",Space,Str "and",Space,Str "back"]]
- ,Div ("",[],[])
- [Plain [Str "Turn",Space,Str "upward",Space,Str "from",Space,Str "the",Space,Str "desk,",Space,Str "when",Space,Str "the",Space,Str "human",Space,Str "engine",Space,Str "waits"]]
- ,Div ("",[],[])
- [Plain [Str "Like",Space,Str "a",Space,Str "taxi",Space,Str "throbbing",Space,Str "waiting,"]]
- ,Div ("wasteland-content.xhtml#ln218",[],[])
- [Plain [Str "I",Space,Str "Tiresias,",Space,Str "though",Space,Str "blind,",Space,Str "throbbing",Space,Str "between",Space,Str "two",Space,Str "lives,",Note [Para [Link ("",[],[]) [Str "218."] ("#wasteland-content.xhtml#ln218",""),Space,Str "Tiresias,",Space,Str "although",Space,Str "a",Space,Str "mere",Space,Str "spectator",Space,Str "and",Space,Str "not",Space,Str "indeed",Space,Str "a",Space,Str "\"character,\"",Space,Str "is",SoftBreak,Str "yet",Space,Str "the",Space,Str "most",Space,Str "important",Space,Str "personage",Space,Str "in",Space,Str "the",Space,Str "poem,",Space,Str "uniting",Space,Str "all",Space,Str "the",Space,Str "rest.",Space,Str "Just",SoftBreak,Str "as",Space,Str "the",Space,Str "one-eyed",Space,Str "merchant,",Space,Str "seller",Space,Str "of",Space,Str "currants,",Space,Str "melts",Space,Str "into",Space,Str "the",Space,Str "Phoenician",SoftBreak,Str "Sailor,",Space,Str "and",Space,Str "the",Space,Str "latter",Space,Str "is",Space,Str "not",Space,Str "wholly",Space,Str "distinct",Space,Str "from",Space,Str "Ferdinand",Space,Str "Prince",Space,Str "of",SoftBreak,Str "Naples,",Space,Str "so",Space,Str "all",Space,Str "the",Space,Str "women",Space,Str "are",Space,Str "one",Space,Str "woman,",Space,Str "and",Space,Str "the",Space,Str "two",Space,Str "sexes",Space,Str "meet",Space,Str "in",SoftBreak,Str "Tiresias.",Space,Str "What",Space,Str "Tiresias",Space,Str "sees,",Space,Str "in",Space,Str "fact,",Space,Str "is",Space,Str "the",Space,Str "substance",Space,Str "of",Space,Str "the",Space,Str "poem.",Space,Str "The",SoftBreak,Str "whole",Space,Str "passage",Space,Str "from",Space,Str "Ovid",Space,Str "is",Space,Str "of",Space,Str "great",Space,Str "anthropological",Space,Str "interest:"],BlockQuote [Para [Str "'.",Space,Str ".",Space,Str ".",Space,Str "Cum",Space,Str "Iunone",Space,Str "iocos",Space,Str "et",Space,Str "maior",Space,Str "vestra",Space,Str "profecto",Space,Str "est",LineBreak,Str "Quam,",Space,Str "quae",SoftBreak,Str "contingit",Space,Str "maribus,'",Space,Str "dixisse,",Space,Str "'voluptas.'",LineBreak,Str "Illa",Space,Str "negat;",Space,Str "placuit",SoftBreak,Str "quae",Space,Str "sit",Space,Str "sententia",Space,Str "docti",LineBreak,Str "Quaerere",Space,Str "Tiresiae:",Space,Str "venus",Space,Str "huic",Space,Str "erat",SoftBreak,Str "utraque",Space,Str "nota.",LineBreak,Str "Nam",Space,Str "duo",Space,Str "magnorum",Space,Str "viridi",Space,Str "coeuntia",Space,Str "silva",LineBreak,Str "Corpora",Space,Str "serpentum",Space,Str "baculi",Space,Str "violaverat",Space,Str "ictu",LineBreak,Str "Deque",Space,Str "viro",Space,Str "factus,",SoftBreak,Str "mirabile,",Space,Str "femina",Space,Str "septem",LineBreak,Str "Egerat",Space,Str "autumnos;",Space,Str "octavo",Space,Str "rursus",SoftBreak,Str "eosdem",LineBreak,Str "Vidit",Space,Str "et",Space,Str "'est",Space,Str "vestrae",Space,Str "si",Space,Str "tanta",Space,Str "potentia",Space,Str "plagae,'",LineBreak,Str "Dixit",Space,Str "'ut",Space,Str "auctoris",Space,Str "sortem",Space,Str "in",Space,Str "contraria",Space,Str "mutet,",LineBreak,Str "Nunc",Space,Str "quoque",Space,Str "vos",SoftBreak,Str "feriam!'",Space,Str "percussis",Space,Str "anguibus",Space,Str "isdem",LineBreak,Str "Forma",Space,Str "prior",Space,Str "rediit",SoftBreak,Str "genetivaque",Space,Str "venit",Space,Str "imago.",LineBreak,Str "Arbiter",Space,Str "hic",Space,Str "igitur",Space,Str "sumptus",Space,Str "de",Space,Str "lite",SoftBreak,Str "iocosa",LineBreak,Str "Dicta",Space,Str "Iovis",Space,Str "firmat;",Space,Str "gravius",Space,Str "Saturnia",Space,Str "iusto",LineBreak,Str "Nec",SoftBreak,Str "pro",Space,Str "materia",Space,Str "fertur",Space,Str "doluisse",Space,Str "suique",LineBreak,Str "Iudicis",Space,Str "aeterna",Space,Str "damnavit",SoftBreak,Str "lumina",Space,Str "nocte,",LineBreak,Str "At",Space,Str "pater",Space,Str "omnipotens",Space,Str "(neque",Space,Str "enim",Space,Str "licet",Space,Str "inrita",SoftBreak,Str "cuiquam",LineBreak,Str "Facta",Space,Str "dei",Space,Str "fecisse",Space,Str "deo)",Space,Str "pro",Space,Str "lumine",Space,Str "adempto",LineBreak,Str "Scire",SoftBreak,Str "futura",Space,Str "dedit",Space,Str "poenamque",Space,Str "levavit",Space,Str "honore.",LineBreak]]]]]
- ,Div ("",[],[])
- [Plain [Str "Old",Space,Str "man",Space,Str "with",Space,Str "wrinkled",Space,Str "female",Space,Str "breasts,",Space,Str "can",Space,Str "see"]]
- ,Div ("",[],[])
- [Plain [Str "At",Space,Str "the",Space,Str "violet",Space,Str "hour,",Space,Str "the",Space,Str "evening",Space,Str "hour",Space,Str "that",Space,Str "strives",Span ("",["lnum"],[]) [Str "220"]]]
- ,Div ("wasteland-content.xhtml#ln221",[],[])
- [Plain [Str "Homeward,",Space,Str "and",Space,Str "brings",Space,Str "the",Space,Str "sailor",Space,Str "home",Space,Str "from",Space,Str "sea,",Note [Para [Link ("",[],[]) [Str "221."] ("#wasteland-content.xhtml#ln221",""),Space,Str "This",Space,Str "may",Space,Str "not",Space,Str "appear",Space,Str "as",Space,Str "exact",Space,Str "as",Space,Str "Sappho's",Space,Str "lines,",Space,Str "but",Space,Str "I",Space,Str "had",Space,Str "in",Space,Str "mind",SoftBreak,Str "the",Space,Str "\"longshore\"",Space,Str "or",Space,Str "\"dory\"",Space,Str "fisherman,",Space,Str "who",Space,Str "returns",Space,Str "at",Space,Str "nightfall."]]]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "typist",Space,Str "home",Space,Str "at",Space,Str "teatime,",Space,Str "clears",Space,Str "her",Space,Str "breakfast,",Space,Str "lights"]]
- ,Div ("",[],[])
- [Plain [Str "Her",Space,Str "stove,",Space,Str "and",Space,Str "lays",Space,Str "out",Space,Str "food",Space,Str "in",Space,Str "tins."]]
- ,Div ("",[],[])
- [Plain [Str "Out",Space,Str "of",Space,Str "the",Space,Str "window",Space,Str "perilously",Space,Str "spread"]]
- ,Div ("",[],[])
- [Plain [Str "Her",Space,Str "drying",Space,Str "combinations",Space,Str "touched",Space,Str "by",Space,Str "the",Space,Str "sun's",Space,Str "last",Space,Str "rays,"]]
- ,Div ("",[],[])
- [Plain [Str "On",Space,Str "the",Space,Str "divan",Space,Str "are",Space,Str "piled",Space,Str "(at",Space,Str "night",Space,Str "her",Space,Str "bed)"]]
- ,Div ("",[],[])
- [Plain [Str "Stockings,",Space,Str "slippers,",Space,Str "camisoles,",Space,Str "and",Space,Str "stays."]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "Tiresias,",Space,Str "old",Space,Str "man",Space,Str "with",Space,Str "wrinkled",Space,Str "dugs"]]
- ,Div ("",[],[])
- [Plain [Str "Perceived",Space,Str "the",Space,Str "scene,",Space,Str "and",Space,Str "foretold",Space,Str "the",Space,Str "rest",Space,Str "-"]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "too",Space,Str "awaited",Space,Str "the",Space,Str "expected",Space,Str "guest.",Span ("",["lnum"],[]) [Str "230"]]]
- ,Div ("",[],[])
- [Plain [Str "He,",Space,Str "the",Space,Str "young",Space,Str "man",Space,Str "carbuncular,",Space,Str "arrives,"]]
- ,Div ("",[],[])
- [Plain [Str "A",Space,Str "small",Space,Str "house",Space,Str "agent's",Space,Str "clerk,",Space,Str "with",Space,Str "one",Space,Str "bold",Space,Str "stare,"]]
- ,Div ("",[],[])
- [Plain [Str "One",Space,Str "of",Space,Str "the",Space,Str "low",Space,Str "on",Space,Str "whom",Space,Str "assurance",Space,Str "sits"]]
- ,Div ("",[],[])
- [Plain [Str "As",Space,Str "a",Space,Str "silk",Space,Str "hat",Space,Str "on",Space,Str "a",Space,Str "Bradford",Space,Str "millionaire."]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "time",Space,Str "is",Space,Str "now",Space,Str "propitious,",Space,Str "as",Space,Str "he",Space,Str "guesses,"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "meal",Space,Str "is",Space,Str "ended,",Space,Str "she",Space,Str "is",Space,Str "bored",Space,Str "and",Space,Str "tired,"]]
- ,Div ("",[],[])
- [Plain [Str "Endeavours",Space,Str "to",Space,Str "engage",Space,Str "her",Space,Str "in",Space,Str "caresses"]]
- ,Div ("",[],[])
- [Plain [Str "Which",Space,Str "still",Space,Str "are",Space,Str "unreproved,",Space,Str "if",Space,Str "undesired."]]
- ,Div ("",[],[])
- [Plain [Str "Flushed",Space,Str "and",Space,Str "decided,",Space,Str "he",Space,Str "assaults",Space,Str "at",Space,Str "once;"]]
- ,Div ("",[],[])
- [Plain [Str "Exploring",Space,Str "hands",Space,Str "encounter",Space,Str "no",Space,Str "defence;",Span ("",["lnum"],[]) [Str "240"]]]
- ,Div ("",[],[])
- [Plain [Str "His",Space,Str "vanity",Space,Str "requires",Space,Str "no",Space,Str "response,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "makes",Space,Str "a",Space,Str "welcome",Space,Str "of",Space,Str "indifference."]]
- ,Div ("",[],[])
- [Plain [Str "(And",Space,Str "I",Space,Str "Tiresias",Space,Str "have",Space,Str "foresuffered",Space,Str "all"]]
- ,Div ("",[],[])
- [Plain [Str "Enacted",Space,Str "on",Space,Str "this",Space,Str "same",Space,Str "divan",Space,Str "or",Space,Str "bed;"]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "who",Space,Str "have",Space,Str "sat",Space,Str "by",Space,Str "Thebes",Space,Str "below",Space,Str "the",Space,Str "wall"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "walked",Space,Str "among",Space,Str "the",Space,Str "lowest",Space,Str "of",Space,Str "the",Space,Str "dead.)"]]
- ,Div ("",[],[])
- [Plain [Str "Bestows",Space,Str "one",Space,Str "final",Space,Str "patronising",Space,Str "kiss,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "gropes",Space,Str "his",Space,Str "way,",Space,Str "finding",Space,Str "the",Space,Str "stairs",Space,Str "unlit",Space,Str ".",Space,Str ".",Space,Str "."]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "She",Space,Str "turns",Space,Str "and",Space,Str "looks",Space,Str "a",Space,Str "moment",Space,Str "in",Space,Str "the",Space,Str "glass,"]]
- ,Div ("",[],[])
- [Plain [Str "Hardly",Space,Str "aware",Space,Str "of",Space,Str "her",Space,Str "departed",Space,Str "lover;",Span ("",["lnum"],[]) [Str "250"]]]
- ,Div ("",[],[])
- [Plain [Str "Her",Space,Str "brain",Space,Str "allows",Space,Str "one",Space,Str "half-formed",Space,Str "thought",Space,Str "to",Space,Str "pass:"]]
- ,Div ("",[],[])
- [Plain [Str "\"Well",Space,Str "now",Space,Str "that's",Space,Str "done:",Space,Str "and",Space,Str "I'm",Space,Str "glad",Space,Str "it's",Space,Str "over.\""]]
- ,Div ("wasteland-content.xhtml#ln253",[],[])
- [Plain [Str "When",Space,Str "lovely",Space,Str "woman",Space,Str "stoops",Space,Str "to",Space,Str "folly",Space,Str "and",Note [Para [Link ("",[],[]) [Str "253."] ("#wasteland-content.xhtml#ln253",""),Space,Str "V.",Space,Str "Goldsmith,",Space,Str "the",Space,Str "song",Space,Str "in",Space,Str "The",Space,Str "Vicar",Space,Str "of",Space,Str "Wakefield."]]]]
- ,Div ("",[],[])
- [Plain [Str "Paces",Space,Str "about",Space,Str "her",Space,Str "room",Space,Str "again,",Space,Str "alone,"]]
- ,Div ("",[],[])
- [Plain [Str "She",Space,Str "smoothes",Space,Str "her",Space,Str "hair",Space,Str "with",Space,Str "automatic",Space,Str "hand,"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "puts",Space,Str "a",Space,Str "record",Space,Str "on",Space,Str "the",Space,Str "gramophone."]]]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln257",[],[])
- [Plain [Str "\"This",Space,Str "music",Space,Str "crept",Space,Str "by",Space,Str "me",Space,Str "upon",Space,Str "the",Space,Str "waters\"",Note [Para [Link ("",[],[]) [Str "257."] ("#wasteland-content.xhtml#ln257",""),Space,Str "V.",Space,Str "The",Space,Str "Tempest,",Space,Str "as",Space,Str "above."]]]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "along",Space,Str "the",Space,Str "Strand,",Space,Str "up",Space,Str "Queen",Space,Str "Victoria",Space,Str "Street."]]
- ,Div ("",[],[])
- [Plain [Str "O",Space,Str "City",Space,Str "city,",Space,Str "I",Space,Str "can",Space,Str "sometimes",Space,Str "hear"]]
- ,Div ("",[],[])
- [Plain [Str "Beside",Space,Str "a",Space,Str "public",Space,Str "bar",Space,Str "in",Space,Str "Lower",Space,Str "Thames",Space,Str "Street,",Span ("",["lnum"],[]) [Str "260"]]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "pleasant",Space,Str "whining",Space,Str "of",Space,Str "a",Space,Str "mandoline"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "a",Space,Str "clatter",Space,Str "and",Space,Str "a",Space,Str "chatter",Space,Str "from",Space,Str "within"]]
- ,Div ("",[],[])
- [Plain [Str "Where",Space,Str "fishmen",Space,Str "lounge",Space,Str "at",Space,Str "noon:",Space,Str "where",Space,Str "the",Space,Str "walls"]]
- ,Div ("wasteland-content.xhtml#ln264",[],[])
- [Plain [Str "Of",Space,Str "Magnus",Space,Str "Martyr",Space,Str "hold",Note [Para [Link ("",[],[]) [Str "264."] ("#wasteland-content.xhtml#ln264",""),Space,Str "The",Space,Str "interior",Space,Str "of",Space,Str "St.",Space,Str "Magnus",Space,Str "Martyr",Space,Str "is",Space,Str "to",Space,Str "my",Space,Str "mind",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "finest",SoftBreak,Str "among",Space,Str "Wren's",Space,Str "interiors.",Space,Str "See",Space,Str "The",Space,Str "Proposed",Space,Str "Demolition",Space,Str "of",Space,Str "Nineteen",Space,Str "City",SoftBreak,Str "Churches",Space,Str "(P.",Space,Str "S.",Space,Str "King",Space,Str "&",Space,Str "Son,",Space,Str "Ltd.)."]]]]
- ,Div ("",[],[])
- [Plain [Str "Inexplicable",Space,Str "splendour",Space,Str "of",Space,Str "Ionian",Space,Str "white",Space,Str "and",Space,Str "gold."]]]
- ,Div ("",["linegroup","indent"],[])
- [Div ("wasteland-content.xhtml#ln266",[],[])
- [Plain [Str "The",Space,Str "river",Space,Str "sweats",Note [Para [Link ("",[],[]) [Str "266."] ("#wasteland-content.xhtml#ln266",""),Space,Str "The",Space,Str "Song",Space,Str "of",Space,Str "the",Space,Str "(three)",Space,Str "Thames-daughters",Space,Str "begins",Space,Str "here.",Space,Str "From",Space,Str "line",Space,Str "292",SoftBreak,Str "to",Space,Str "306",Space,Str "inclusive",Space,Str "they",Space,Str "speak",Space,Str "in",Space,Str "turn.",Space,Str "V.",Space,Str "Gutterdsammerung,",Space,Str "III.",Space,Str "i:",Space,Str "the",SoftBreak,Str "Rhine-daughters."]]]]
- ,Div ("",[],[])
- [Plain [Str "Oil",Space,Str "and",Space,Str "tar"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "barges",Space,Str "drift"]]
- ,Div ("",[],[])
- [Plain [Str "With",Space,Str "the",Space,Str "turning",Space,Str "tide"]]
- ,Div ("",[],[])
- [Plain [Str "Red",Space,Str "sails",Span ("",["lnum"],[]) [Str "270"]]]
- ,Div ("",[],[])
- [Plain [Str "Wide"]]
- ,Div ("",[],[])
- [Plain [Str "To",Space,Str "leeward,",Space,Str "swing",Space,Str "on",Space,Str "the",Space,Str "heavy",Space,Str "spar."]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "barges",Space,Str "wash"]]
- ,Div ("",[],[])
- [Plain [Str "Drifting",Space,Str "logs"]]
- ,Div ("",[],[])
- [Plain [Str "Down",Space,Str "Greenwich",Space,Str "reach"]]
- ,Div ("",[],[])
- [Plain [Str "Past",Space,Str "the",Space,Str "Isle",Space,Str "of",Space,Str "Dogs."]]
- ,Div ("",["indent"],[])
- [Plain [Str "Weialala",Space,Str "leia"]]
- ,Div ("",["indent"],[])
- [Plain [Str "Wallala",Space,Str "leialala"]]]
- ,Div ("",["linegroup","indent"],[])
- [Div ("wasteland-content.xhtml#ln279",[],[])
- [Plain [Str "Elizabeth",Space,Str "and",Space,Str "Leicester",Note [Para [Link ("",[],[]) [Str "279."] ("#wasteland-content.xhtml#ln279",""),Space,Str "V.",Space,Str "Froude,",Space,Str "Elizabeth,",Space,Str "Vol.",Space,Str "I,",Space,Str "ch.",Space,Str "iv,",Space,Str "letter",Space,Str "of",Space,Str "De",Space,Str "Quadra",Space,Str "to",Space,Str "Philip",SoftBreak,Str "of",Space,Str "Spain:"],BlockQuote [Div ("",[],[]) [Div ("",[],[]) [Plain [Str "\"In",Space,Str "the",Space,Str "afternoon",Space,Str "we",Space,Str "were",Space,Str "in",Space,Str "a",Space,Str "barge,",Space,Str "watching",Space,Str "the",SoftBreak,Str "games",Space,Str "on",Space,Str "the",Space,Str "river."]],Div ("",[],[]) [Plain [Str "(The",Space,Str "queen)",Space,Str "was",Space,Str "alone",Space,Str "with",Space,Str "Lord",Space,Str "Robert",Space,Str "and",Space,Str "myself",SoftBreak,Str "on",Space,Str "the",Space,Str "poop,"]],Div ("",[],[]) [Plain [Str "when",Space,Str "they",Space,Str "began",Space,Str "to",Space,Str "talk",Space,Str "nonsense,",Space,Str "and",Space,Str "went",Space,Str "so",Space,Str "far",SoftBreak,Str "that",Space,Str "Lord",Space,Str "Robert"]],Div ("",[],[]) [Plain [Str "at",Space,Str "last",Space,Str "said,",Space,Str "as",Space,Str "I",Space,Str "was",Space,Str "on",Space,Str "the",Space,Str "spot",Space,Str "there",Space,Str "was",Space,Str "no",SoftBreak,Str "reason",Space,Str "why",Space,Str "they"]],Div ("",[],[]) [Plain [Str "should",Space,Str "not",Space,Str "be",Space,Str "married",Space,Str "if",Space,Str "the",Space,Str "queen",Space,Str "pleased.\""]]]]]]]
- ,Div ("",[],[])
- [Plain [Str "Beating",Space,Str "oars",Span ("",["lnum"],[]) [Str "280"]]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "stern",Space,Str "was",Space,Str "formed"]]
- ,Div ("",[],[])
- [Plain [Str "A",Space,Str "gilded",Space,Str "shell"]]
- ,Div ("",[],[])
- [Plain [Str "Red",Space,Str "and",Space,Str "gold"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "brisk",Space,Str "swell"]]
- ,Div ("",[],[])
- [Plain [Str "Rippled",Space,Str "both",Space,Str "shores"]]
- ,Div ("",[],[])
- [Plain [Str "Southwest",Space,Str "wind"]]
- ,Div ("",[],[])
- [Plain [Str "Carried",Space,Str "down",Space,Str "stream"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "peal",Space,Str "of",Space,Str "bells"]]
- ,Div ("",[],[])
- [Plain [Str "White",Space,Str "towers"]]
- ,Div ("",["indent"],[])
- [Plain [Str "Weialala",Space,Str "leia",Span ("",["lnum"],[]) [Str "290"]]]
- ,Div ("",["indent"],[])
- [Plain [Str "Wallala",Space,Str "leialala"]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "\"Trams",Space,Str "and",Space,Str "dusty",Space,Str "trees."]]
- ,Div ("wasteland-content.xhtml#ln293",[],[])
- [Plain [Str "Highbury",Space,Str "bore",Space,Str "me.",Space,Str "Richmond",Space,Str "and",Space,Str "Kew",Note [Para [Link ("",[],[]) [Str "293."] ("#wasteland-content.xhtml#ln293",""),Space,Str "Cf.",Space,Str "Purgatorio,",Space,Str "v.",Space,Str "133:"],BlockQuote [Para [Str "\"Ricorditi",Space,Str "di",Space,Str "me,",Space,Str "che",Space,Str "son",Space,Str "la",Space,Str "Pia;",LineBreak,Str "Siena",Space,Str "mi",Space,Str "fe',",Space,Str "disfecemi",SoftBreak,Str "Maremma.\""]]]]]
- ,Div ("",[],[])
- [Plain [Str "Undid",Space,Str "me.",Space,Str "By",Space,Str "Richmond",Space,Str "I",Space,Str "raised",Space,Str "my",Space,Str "knees"]]
- ,Div ("",[],[])
- [Plain [Str "Supine",Space,Str "on",Space,Str "the",Space,Str "floor",Space,Str "of",Space,Str "a",Space,Str "narrow",Space,Str "canoe.\""]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "\"My",Space,Str "feet",Space,Str "are",Space,Str "at",Space,Str "Moorgate,",Space,Str "and",Space,Str "my",Space,Str "heart"]]
- ,Div ("",[],[])
- [Plain [Str "Under",Space,Str "my",Space,Str "feet.",Space,Str "After",Space,Str "the",Space,Str "event"]]
- ,Div ("",[],[])
- [Plain [Str "He",Space,Str "wept.",Space,Str "He",Space,Str "promised",Space,Str "'a",Space,Str "new",Space,Str "start'."]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "made",Space,Str "no",Space,Str "comment.",Space,Str "What",Space,Str "should",Space,Str "I",Space,Str "resent?\""]]
- ,Div ("",[],[])
- [Plain [Str "\"On",Space,Str "Margate",Space,Str "Sands.",Span ("",["lnum"],[]) [Str "300"]]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "can",Space,Str "connect"]]
- ,Div ("",[],[])
- [Plain [Str "Nothing",Space,Str "with",Space,Str "nothing."]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "broken",Space,Str "fingernails",Space,Str "of",Space,Str "dirty",Space,Str "hands."]]
- ,Div ("",[],[])
- [Plain [Str "My",Space,Str "people",Space,Str "humble",Space,Str "people",Space,Str "who",Space,Str "expect"]]
- ,Div ("",[],[])
- [Plain [Str "Nothing.\""]]
- ,Div ("",["indent"],[])
- [Plain [Str "la",Space,Str "la"]]]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln307",[],[])
- [Plain [Str "To",Space,Str "Carthage",Space,Str "then",Space,Str "I",Space,Str "came",Note [Para [Link ("",[],[]) [Str "307."] ("#wasteland-content.xhtml#ln307",""),Space,Str "V.",Space,Str "St.",Space,Str "Augustine's",Space,Str "Confessions:",Space,Str "\"to",Space,Str "Carthage",Space,Str "then",Space,Str "I",Space,Str "came,",Space,Str "where",Space,Str "a",SoftBreak,Str "cauldron",Space,Str "of",Space,Str "unholy",Space,Str "loves",Space,Str "sang",Space,Str "all",Space,Str "about",Space,Str "mine",Space,Str "ears.\""]]]]]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln308",[],[])
- [Plain [Str "Burning",Space,Str "burning",Space,Str "burning",Space,Str "burning",Note [Para [Link ("",[],[]) [Str "308."] ("#wasteland-content.xhtml#ln308",""),Space,Str "The",Space,Str "complete",Space,Str "text",Space,Str "of",Space,Str "the",Space,Str "Buddha's",Space,Str "Fire",Space,Str "Sermon",Space,Str "(which",Space,Str "corresponds",Space,Str "in",SoftBreak,Str "importance",Space,Str "to",Space,Str "the",Space,Str "Sermon",Space,Str "on",Space,Str "the",Space,Str "Mount)",Space,Str "from",Space,Str "which",Space,Str "these",Space,Str "words",Space,Str "are",Space,Str "taken,",SoftBreak,Str "will",Space,Str "be",Space,Str "found",Space,Str "translated",Space,Str "in",Space,Str "the",Space,Str "late",Space,Str "Henry",Space,Str "Clarke",Space,Str "Warren's",Space,Str "Buddhism",Space,Str "in",SoftBreak,Str "Translation",Space,Str "(Harvard",Space,Str "Oriental",Space,Str "Series).",Space,Str "Mr.",Space,Str "Warren",Space,Str "was",Space,Str "one",Space,Str "of",Space,Str "the",Space,Str "great",SoftBreak,Str "pioneers",Space,Str "of",Space,Str "Buddhist",Space,Str "studies",Space,Str "in",Space,Str "the",Space,Str "Occident."]]]]
- ,Div ("wasteland-content.xhtml#ln309",[],[])
- [Plain [Str "O",Space,Str "Lord",Space,Str "Thou",Space,Str "pluckest",Space,Str "me",Space,Str "out",Note [Para [Link ("",[],[]) [Str "309."] ("#wasteland-content.xhtml#ln309",""),Space,Str "From",Space,Str "St.",Space,Str "Augustine's",Space,Str "Confessions",Space,Str "again.",Space,Str "The",Space,Str "collocation",Space,Str "of",Space,Str "these",Space,Str "two",SoftBreak,Str "representatives",Space,Str "of",Space,Str "eastern",Space,Str "and",Space,Str "western",Space,Str "asceticism,",Space,Str "as",Space,Str "the",Space,Str "culmination",Space,Str "of",SoftBreak,Str "this",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "poem,",Space,Str "is",Space,Str "not",Space,Str "an",Space,Str "accident."]]]]
- ,Div ("",[],[])
- [Plain [Str "O",Space,Str "Lord",Space,Str "Thou",Space,Str "pluckest",Span ("",["lnum"],[]) [Str "310"]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "burning"]]]]
- ,Div ("wasteland-content.xhtml#ch4",["section"],[])
- [Header 2 ("",[],[]) [Str "IV.",Space,Str "DEATH",Space,Str "BY",Space,Str "WATER"]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "Phlebas",Space,Str "the",Space,Str "Phoenician,",Space,Str "a",Space,Str "fortnight",Space,Str "dead,"]]
- ,Div ("",[],[])
- [Plain [Str "Forgot",Space,Str "the",Space,Str "cry",Space,Str "of",Space,Str "gulls,",Space,Str "and",Space,Str "the",Space,Str "deep",Space,Str "sea",Space,Str "swell"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "the",Space,Str "profit",Space,Str "and",Space,Str "loss."]]]
- ,Div ("",["linegroup"],[])
- [Div ("",["indent2"],[])
- [Plain [Str "A",Space,Str "current",Space,Str "under",Space,Str "sea"]]
- ,Div ("",[],[])
- [Plain [Str "Picked",Space,Str "his",Space,Str "bones",Space,Str "in",Space,Str "whispers.",Space,Str "As",Space,Str "he",Space,Str "rose",Space,Str "and",Space,Str "fell"]]
- ,Div ("",[],[])
- [Plain [Str "He",Space,Str "passed",Space,Str "the",Space,Str "stages",Space,Str "of",Space,Str "his",Space,Str "age",Space,Str "and",Space,Str "youth"]]
- ,Div ("",[],[])
- [Plain [Str "Entering",Space,Str "the",Space,Str "whirlpool."]]]
- ,Div ("",["linegroup"],[])
- [Div ("",["indent2"],[])
- [Plain [Str "Gentile",Space,Str "or",Space,Str "Jew"]]
- ,Div ("",[],[])
- [Plain [Str "O",Space,Str "you",Space,Str "who",Space,Str "turn",Space,Str "the",Space,Str "wheel",Space,Str "and",Space,Str "look",Space,Str "to",Space,Str "windward,",Span ("",["lnum"],[]) [Str "320"]]]
- ,Div ("",[],[])
- [Plain [Str "Consider",Space,Str "Phlebas,",Space,Str "who",Space,Str "was",Space,Str "once",Space,Str "handsome",Space,Str "and",Space,Str "tall",Space,Str "as",Space,Str "you."]]]]
- ,Div ("wasteland-content.xhtml#ch5",["section"],[])
- [Header 2 ("",[],[]) [Str "V.",Space,Str "WHAT",Space,Str "THE",Space,Str "THUNDER",Space,Str "SAID"]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "After",Space,Str "the",Space,Str "torchlight",Space,Str "red",Space,Str "on",Space,Str "sweaty",Space,Str "faces"]]
- ,Div ("",[],[])
- [Plain [Str "After",Space,Str "the",Space,Str "frosty",Space,Str "silence",Space,Str "in",Space,Str "the",Space,Str "gardens"]]
- ,Div ("",[],[])
- [Plain [Str "After",Space,Str "the",Space,Str "agony",Space,Str "in",Space,Str "stony",Space,Str "places"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "shouting",Space,Str "and",Space,Str "the",Space,Str "crying"]]
- ,Div ("",[],[])
- [Plain [Str "Prison",Space,Str "and",Space,Str "palace",Space,Str "and",Space,Str "reverberation"]]
- ,Div ("",[],[])
- [Plain [Str "Of",Space,Str "thunder",Space,Str "of",Space,Str "spring",Space,Str "over",Space,Str "distant",Space,Str "mountains"]]
- ,Div ("",[],[])
- [Plain [Str "He",Space,Str "who",Space,Str "was",Space,Str "living",Space,Str "is",Space,Str "now",Space,Str "dead"]]
- ,Div ("",[],[])
- [Plain [Str "We",Space,Str "who",Space,Str "were",Space,Str "living",Space,Str "are",Space,Str "now",Space,Str "dying"]]
- ,Div ("",[],[])
- [Plain [Str "With",Space,Str "a",Space,Str "little",Space,Str "patience",Span ("",["lnum"],[]) [Str "330"]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "Here",Space,Str "is",Space,Str "no",Space,Str "water",Space,Str "but",Space,Str "only",Space,Str "rock"]]
- ,Div ("",[],[])
- [Plain [Str "Rock",Space,Str "and",Space,Str "no",Space,Str "water",Space,Str "and",Space,Str "the",Space,Str "sandy",Space,Str "road"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "road",Space,Str "winding",Space,Str "above",Space,Str "among",Space,Str "the",Space,Str "mountains"]]
- ,Div ("",[],[])
- [Plain [Str "Which",Space,Str "are",Space,Str "mountains",Space,Str "of",Space,Str "rock",Space,Str "without",Space,Str "water"]]
- ,Div ("",[],[])
- [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "water",Space,Str "we",Space,Str "should",Space,Str "stop",Space,Str "and",Space,Str "drink"]]
- ,Div ("",[],[])
- [Plain [Str "Amongst",Space,Str "the",Space,Str "rock",Space,Str "one",Space,Str "cannot",Space,Str "stop",Space,Str "or",Space,Str "think"]]
- ,Div ("",[],[])
- [Plain [Str "Sweat",Space,Str "is",Space,Str "dry",Space,Str "and",Space,Str "feet",Space,Str "are",Space,Str "in",Space,Str "the",Space,Str "sand"]]
- ,Div ("",[],[])
- [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "only",Space,Str "water",Space,Str "amongst",Space,Str "the",Space,Str "rock"]]
- ,Div ("",[],[])
- [Plain [Str "Dead",Space,Str "mountain",Space,Str "mouth",Space,Str "of",Space,Str "carious",Space,Str "teeth",Space,Str "that",Space,Str "cannot",Space,Str "spit"]]
- ,Div ("",[],[])
- [Plain [Str "Here",Space,Str "one",Space,Str "can",Space,Str "neither",Space,Str "stand",Space,Str "nor",Space,Str "lie",Space,Str "nor",Space,Str "sit",Span ("",["lnum"],[]) [Str "340"]]]
- ,Div ("",[],[])
- [Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "even",Space,Str "silence",Space,Str "in",Space,Str "the",Space,Str "mountains"]]
- ,Div ("",[],[])
- [Plain [Str "But",Space,Str "dry",Space,Str "sterile",Space,Str "thunder",Space,Str "without",Space,Str "rain"]]
- ,Div ("",[],[])
- [Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "even",Space,Str "solitude",Space,Str "in",Space,Str "the",Space,Str "mountains"]]
- ,Div ("",[],[])
- [Plain [Str "But",Space,Str "red",Space,Str "sullen",Space,Str "faces",Space,Str "sneer",Space,Str "and",Space,Str "snarl"]]
- ,Div ("",[],[])
- [Plain [Str "From",Space,Str "doors",Space,Str "of",Space,Str "mudcracked",Space,Str "houses"]]
- ,Div ("",["linegroup"],[])
- [Div ("",["indent2"],[])
- [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "water"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "no",Space,Str "rock"]]
- ,Div ("",[],[])
- [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "rock"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "also",Space,Str "water"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "water",Span ("",["lnum"],[]) [Str "350"]]]
- ,Div ("",[],[])
- [Plain [Str "A",Space,Str "spring"]]
- ,Div ("",[],[])
- [Plain [Str "A",Space,Str "pool",Space,Str "among",Space,Str "the",Space,Str "rock"]]
- ,Div ("",[],[])
- [Plain [Str "If",Space,Str "there",Space,Str "were",Space,Str "the",Space,Str "sound",Space,Str "of",Space,Str "water",Space,Str "only"]]
- ,Div ("",[],[])
- [Plain [Str "Not",Space,Str "the",Space,Str "cicada"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "dry",Space,Str "grass",Space,Str "singing"]]
- ,Div ("",[],[])
- [Plain [Str "But",Space,Str "sound",Space,Str "of",Space,Str "water",Space,Str "over",Space,Str "a",Space,Str "rock"]]
- ,Div ("wasteland-content.xhtml#ln357",[],[])
- [Plain [Str "Where",Space,Str "the",Space,Str "hermit-thrush",Space,Str "sings",Space,Str "in",Space,Str "the",Space,Str "pine",Space,Str "trees",Note [Para [Link ("",[],[]) [Str "357."] ("#wasteland-content.xhtml#ln357",""),Space,Str "This",Space,Str "is",Space,Str "Turdus",Space,Str "aonalaschkae",Space,Str "pallasii,",Space,Str "the",Space,Str "hermit-thrush",Space,Str "which",Space,Str "I",Space,Str "have",SoftBreak,Str "heard",Space,Str "in",Space,Str "Quebec",Space,Str "County.",Space,Str "Chapman",Space,Str "says",Space,Str "(Handbook",Space,Str "of",Space,Str "Birds",Space,Str "of",Space,Str "Eastern",Space,Str "North",SoftBreak,Str "America)",Space,Str "\"it",Space,Str "is",Space,Str "most",Space,Str "at",Space,Str "home",Space,Str "in",Space,Str "secluded",Space,Str "woodland",Space,Str "and",Space,Str "thickety",Space,Str "retreats.",SoftBreak,Str ".",Space,Str ".",Space,Str ".",Space,Str "Its",Space,Str "notes",Space,Str "are",Space,Str "not",Space,Str "remarkable",Space,Str "for",Space,Str "variety",Space,Str "or",Space,Str "volume,",Space,Str "but",Space,Str "in",Space,Str "purity",SoftBreak,Str "and",Space,Str "sweetness",Space,Str "of",Space,Str "tone",Space,Str "and",Space,Str "exquisite",Space,Str "modulation",Space,Str "they",Space,Str "are",Space,Str "unequalled.\"",Space,Str "Its",SoftBreak,Str "\"water-dripping",Space,Str "song\"",Space,Str "is",Space,Str "justly",Space,Str "celebrated."]]]]
- ,Div ("",[],[])
- [Plain [Str "Drip",Space,Str "drop",Space,Str "drip",Space,Str "drop",Space,Str "drop",Space,Str "drop",Space,Str "drop"]]
- ,Div ("",[],[])
- [Plain [Str "But",Space,Str "there",Space,Str "is",Space,Str "no",Space,Str "water"]]]]
- ,Div ("",["linegroup"],[])
- [Div ("wasteland-content.xhtml#ln360",[],[])
- [Plain [Str "Who",Space,Str "is",Space,Str "the",Space,Str "third",Space,Str "who",Space,Str "walks",Space,Str "always",Space,Str "beside",Space,Str "you?",Note [Para [Link ("",[],[]) [Str "360."] ("#wasteland-content.xhtml#ln360",""),Space,Str "The",Space,Str "following",Space,Str "lines",Space,Str "were",Space,Str "stimulated",Space,Str "by",Space,Str "the",Space,Str "account",Space,Str "of",Space,Str "one",Space,Str "of",Space,Str "the",SoftBreak,Str "Antarctic",Space,Str "expeditions",Space,Str "(I",Space,Str "forget",Space,Str "which,",Space,Str "but",Space,Str "I",Space,Str "think",Space,Str "one",Space,Str "of",Space,Str "Shackleton's):",SoftBreak,Str "it",Space,Str "was",Space,Str "related",Space,Str "that",Space,Str "the",Space,Str "party",Space,Str "of",Space,Str "explorers,",Space,Str "at",Space,Str "the",Space,Str "extremity",Space,Str "of",Space,Str "their",SoftBreak,Str "strength,",Space,Str "had",Space,Str "the",Space,Str "constant",Space,Str "delusion",Space,Str "that",Space,Str "there",Space,Str "was",Space,Str "one",Space,Str "more",Space,Str "member",Space,Str "than",SoftBreak,Str "could",Space,Str "actually",Space,Str "be",Space,Str "counted."]],SoftBreak,Span ("",["lnum"],[]) [Str "360"]]]
- ,Div ("",[],[])
- [Plain [Str "When",Space,Str "I",Space,Str "count,",Space,Str "there",Space,Str "are",Space,Str "only",Space,Str "you",Space,Str "and",Space,Str "I",Space,Str "together"]]
- ,Div ("",[],[])
- [Plain [Str "But",Space,Str "when",Space,Str "I",Space,Str "look",Space,Str "ahead",Space,Str "up",Space,Str "the",Space,Str "white",Space,Str "road"]]
- ,Div ("",[],[])
- [Plain [Str "There",Space,Str "is",Space,Str "always",Space,Str "another",Space,Str "one",Space,Str "walking",Space,Str "beside",Space,Str "you"]]
- ,Div ("",[],[])
- [Plain [Str "Gliding",Space,Str "wrapt",Space,Str "in",Space,Str "a",Space,Str "brown",Space,Str "mantle,",Space,Str "hooded"]]
- ,Div ("",[],[])
- [Plain [Str "I",Space,Str "do",Space,Str "not",Space,Str "know",Space,Str "whether",Space,Str "a",Space,Str "man",Space,Str "or",Space,Str "a",Space,Str "woman"]]
- ,Div ("wasteland-content.xhtml#ln367",[],[])
- [Plain [Str "\8213But",Space,Str "who",Space,Str "is",Space,Str "that",Space,Str "on",Space,Str "the",Space,Str "other",Space,Str "side",Space,Str "of",Space,Str "you?",Note [Para [Link ("",[],[]) [Str "367-77."] ("#wasteland-content.xhtml#ln367",""),Space,Str "Cf.",Space,Str "Hermann",Space,Str "Hesse,",Space,Str "Blick",Space,Str "ins",Space,Str "Chaos:"],BlockQuote [Para [Str "\"Schon",Space,Str "ist",Space,Str "halb",Space,Str "Europa,",Space,Str "schon",Space,Str "ist",Space,Str "zumindest",Space,Str "der",Space,Str "halbe",Space,Str "Osten",Space,Str "Europas",SoftBreak,Str "auf",Space,Str "dem",LineBreak,Str "Wege",Space,Str "zum",Space,Str "Chaos,",Space,Str "fhrt",Space,Str "betrunken",Space,Str "im",Space,Str "heiligem",Space,Str "Wahn",Space,Str "am",SoftBreak,Str "Abgrund",Space,Str "entlang",LineBreak,Str "und",Space,Str "singt",Space,Str "dazu,",Space,Str "singt",Space,Str "betrunken",Space,Str "und",Space,Str "hymnisch",SoftBreak,Str "wie",Space,Str "Dmitri",Space,Str "Karamasoff",Space,Str "sang.",LineBreak,Str "Ueber",Space,Str "diese",Space,Str "Lieder",Space,Str "lacht",Space,Str "der",SoftBreak,Str "Bsrger",Space,Str "beleidigt,",Space,Str "der",Space,Str "Heilige",LineBreak,Str "und",Space,Str "Seher",Space,Str "hrt",Space,Str "sie",Space,Str "mit",SoftBreak,Str "Trvnen.\""]]]]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "What",Space,Str "is",Space,Str "that",Space,Str "sound",Space,Str "high",Space,Str "in",Space,Str "the",Space,Str "air"]]
- ,Div ("",[],[])
- [Plain [Str "Murmur",Space,Str "of",Space,Str "maternal",Space,Str "lamentation"]]
- ,Div ("",[],[])
- [Plain [Str "Who",Space,Str "are",Space,Str "those",Space,Str "hooded",Space,Str "hordes",Space,Str "swarming"]]
- ,Div ("",[],[])
- [Plain [Str "Over",Space,Str "endless",Space,Str "plains,",Space,Str "stumbling",Space,Str "in",Space,Str "cracked",Space,Str "earth",Span ("",["lnum"],[]) [Str "370"]]]
- ,Div ("",[],[])
- [Plain [Str "Ringed",Space,Str "by",Space,Str "the",Space,Str "flat",Space,Str "horizon",Space,Str "only"]]
- ,Div ("",[],[])
- [Plain [Str "What",Space,Str "is",Space,Str "the",Space,Str "city",Space,Str "over",Space,Str "the",Space,Str "mountains"]]
- ,Div ("",[],[])
- [Plain [Str "Cracks",Space,Str "and",Space,Str "reforms",Space,Str "and",Space,Str "bursts",Space,Str "in",Space,Str "the",Space,Str "violet",Space,Str "air"]]
- ,Div ("",[],[])
- [Plain [Str "Falling",Space,Str "towers"]]
- ,Div ("",[],[])
- [Plain [Str "Jerusalem",Space,Str "Athens",Space,Str "Alexandria"]]
- ,Div ("",[],[])
- [Plain [Str "Vienna",Space,Str "London"]]
- ,Div ("",[],[])
- [Plain [Str "Unreal"]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "A",Space,Str "woman",Space,Str "drew",Space,Str "her",Space,Str "long",Space,Str "black",Space,Str "hair",Space,Str "out",Space,Str "tight"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "fiddled",Space,Str "whisper",Space,Str "music",Space,Str "on",Space,Str "those",Space,Str "strings"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "bats",Space,Str "with",Space,Str "baby",Space,Str "faces",Space,Str "in",Space,Str "the",Space,Str "violet",Space,Str "light",Span ("",["lnum"],[]) [Str "380"]]]
- ,Div ("",[],[])
- [Plain [Str "Whistled,",Space,Str "and",Space,Str "beat",Space,Str "their",Space,Str "wings"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "crawled",Space,Str "head",Space,Str "downward",Space,Str "down",Space,Str "a",Space,Str "blackened",Space,Str "wall"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "upside",Space,Str "down",Space,Str "in",Space,Str "air",Space,Str "were",Space,Str "towers"]]
- ,Div ("",[],[])
- [Plain [Str "Tolling",Space,Str "reminiscent",Space,Str "bells,",Space,Str "that",Space,Str "kept",Space,Str "the",Space,Str "hours"]]
- ,Div ("",[],[])
- [Plain [Str "And",Space,Str "voices",Space,Str "singing",Space,Str "out",Space,Str "of",Space,Str "empty",Space,Str "cisterns",Space,Str "and",Space,Str "exhausted",SoftBreak,Str "wells."]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "In",Space,Str "this",Space,Str "decayed",Space,Str "hole",Space,Str "among",Space,Str "the",Space,Str "mountains"]]
- ,Div ("",[],[])
- [Plain [Str "In",Space,Str "the",Space,Str "faint",Space,Str "moonlight,",Space,Str "the",Space,Str "grass",Space,Str "is",Space,Str "singing"]]
- ,Div ("",[],[])
- [Plain [Str "Over",Space,Str "the",Space,Str "tumbled",Space,Str "graves,",Space,Str "about",Space,Str "the",Space,Str "chapel"]]
- ,Div ("",[],[])
- [Plain [Str "There",Space,Str "is",Space,Str "the",Space,Str "empty",Space,Str "chapel,",Space,Str "only",Space,Str "the",Space,Str "wind's",Space,Str "home."]]
- ,Div ("",[],[])
- [Plain [Str "It",Space,Str "has",Space,Str "no",Space,Str "windows,",Space,Str "and",Space,Str "the",Space,Str "door",Space,Str "swings,",Span ("",["lnum"],[]) [Str "390"]]]
- ,Div ("",[],[])
- [Plain [Str "Dry",Space,Str "bones",Space,Str "can",Space,Str "harm",Space,Str "no",Space,Str "one."]]
- ,Div ("",[],[])
- [Plain [Str "Only",Space,Str "a",Space,Str "cock",Space,Str "stood",Space,Str "on",Space,Str "the",Space,Str "rooftree"]]
- ,Div ("",[],[])
- [Plain [Str "Co",Space,Str "co",Space,Str "rico",Space,Str "co",Space,Str "co",Space,Str "rico"]]
- ,Div ("",[],[])
- [Plain [Str "In",Space,Str "a",Space,Str "flash",Space,Str "of",Space,Str "lightning.",Space,Str "Then",Space,Str "a",Space,Str "damp",Space,Str "gust"]]
- ,Div ("",[],[])
- [Plain [Str "Bringing",Space,Str "rain"]]]
- ,Div ("",["linegroup"],[])
- [Div ("",[],[])
- [Plain [Str "Ganga",Space,Str "was",Space,Str "sunken,",Space,Str "and",Space,Str "the",Space,Str "limp",Space,Str "leaves"]]
- ,Div ("",[],[])
- [Plain [Str "Waited",Space,Str "for",Space,Str "rain,",Space,Str "while",Space,Str "the",Space,Str "black",Space,Str "clouds"]]
- ,Div ("",[],[])
- [Plain [Str "Gathered",Space,Str "far",Space,Str "distant,",Space,Str "over",Space,Str "Himavant."]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "jungle",Space,Str "crouched,",Space,Str "humped",Space,Str "in",Space,Str "silence."]]
- ,Div ("",[],[])
- [Plain [Str "Then",Space,Str "spoke",Space,Str "the",Space,Str "thunder",Span ("",["lnum"],[]) [Str "400"]]]
- ,Div ("",[],[])
- [Plain [Str "DA"]]
- ,Div ("wasteland-content.xhtml#ln402",[],[])
- [Plain [Span ("",[],[("lang","sa")]) [Str "Datta"],Str ":",Space,Str "what",Space,Str "have",Space,Str "we",Space,Str "given?",Note [Para [Link ("",[],[]) [Str "402."] ("#wasteland-content.xhtml#ln402",""),Space,Quoted DoubleQuote [Str "\"Datta,",Space,Str "dayadhvam,",Space,Str "damyata\""],Space,Str "(Give,",Space,Str "sympathize,",SoftBreak,Str "control).",Space,Str "The",Space,Str "fable",Space,Str "of",Space,Str "the",Space,Str "meaning",Space,Str "of",Space,Str "the",Space,Str "Thunder",Space,Str "is",Space,Str "found",Space,Str "in",Space,Str "the",SoftBreak,Str "Brihadaranyaka-Upanishad,",Space,Str "5,",Space,Str "1.",Space,Str "A",Space,Str "translation",Space,Str "is",Space,Str "found",Space,Str "in",Space,Str "Deussen's",SoftBreak,Str "Sechzig",Space,Str "Upanishads",Space,Str "des",Space,Str "Veda,",Space,Str "p.",Space,Str "489."]]]]
- ,Div ("",[],[])
- [Plain [Str "My",Space,Str "friend,",Space,Str "blood",Space,Str "shaking",Space,Str "my",Space,Str "heart"]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "awful",Space,Str "daring",Space,Str "of",Space,Str "a",Space,Str "moment's",Space,Str "surrender"]]
- ,Div ("",[],[])
- [Plain [Str "Which",Space,Str "an",Space,Str "age",Space,Str "of",Space,Str "prudence",Space,Str "can",Space,Str "never",Space,Str "retract"]]
- ,Div ("",[],[])
- [Plain [Str "By",Space,Str "this,",Space,Str "and",Space,Str "this",Space,Str "only,",Space,Str "we",Space,Str "have",Space,Str "existed"]]
- ,Div ("",[],[])
- [Plain [Str "Which",Space,Str "is",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "found",Space,Str "in",Space,Str "our",Space,Str "obituaries"]]
- ,Div ("wasteland-content.xhtml#ln408",[],[])
- [Plain [Str "Or",Space,Str "in",Space,Str "memories",Space,Str "draped",Space,Str "by",Space,Str "the",Space,Str "beneficent",Space,Str "spider",Note [Para [Link ("",[],[]) [Str "408."] ("#wasteland-content.xhtml#ln408",""),Space,Str "Cf.",Space,Str "Webster,",Space,Str "The",Space,Str "White",Space,Str "Devil,",Space,Str "v.",Space,Str "vi:"],BlockQuote [Para [Str "\".",Space,Str ".",Space,Str ".",Space,Str "they'll",Space,Str "remarry",LineBreak,Str "Ere",Space,Str "the",Space,Str "worm",Space,Str "pierce",Space,Str "your",Space,Str "winding-sheet,",SoftBreak,Str "ere",Space,Str "the",Space,Str "spider",LineBreak,Str "Make",Space,Str "a",Space,Str "thin",Space,Str "curtain",Space,Str "for",Space,Str "your",Space,Str "epitaphs.\""]]]]]
- ,Div ("",[],[])
- [Plain [Str "Or",Space,Str "under",Space,Str "seals",Space,Str "broken",Space,Str "by",Space,Str "the",Space,Str "lean",Space,Str "solicitor"]]
- ,Div ("",[],[])
- [Plain [Str "In",Space,Str "our",Space,Str "empty",Space,Str "rooms",Span ("",["lnum"],[]) [Str "410"]]]
- ,Div ("",[],[])
- [Plain [Str "DA"]]
- ,Div ("wasteland-content.xhtml#ln412",[],[])
- [Plain [Span ("",[],[("lang","sa")]) [Str "Dayadhvam"],Str ":",Space,Str "I",Space,Str "have",Space,Str "heard",Space,Str "the",Space,Str "key",Note [Para [Link ("",[],[]) [Str "412."] ("#wasteland-content.xhtml#ln412",""),Space,Str "Cf.",Space,Str "Inferno,",Space,Str "xxxiii.",Space,Str "46:"],BlockQuote [Para [Str "\"ed",Space,Str "io",Space,Str "sentii",Space,Str "chiavar",Space,Str "l'uscio",Space,Str "di",Space,Str "sotto",LineBreak,Str "all'orribile",Space,Str "torre.\""]],Para [Str "Also",Space,Str "F.",Space,Str "H.",Space,Str "Bradley,",Space,Str "Appearance",Space,Str "and",Space,Str "Reality,",Space,Str "p.",Space,Str "346:"],BlockQuote [Para [Str "\"My",Space,Str "external",Space,Str "sensations",Space,Str "are",Space,Str "no",Space,Str "less",Space,Str "private",Space,Str "to",Space,Str "myself",Space,Str "than",Space,Str "are",Space,Str "my",SoftBreak,Str "thoughts",Space,Str "or",Space,Str "my",Space,Str "feelings.",Space,Str "In",Space,Str "either",Space,Str "case",Space,Str "my",Space,Str "experience",Space,Str "falls",Space,Str "within",SoftBreak,Str "my",Space,Str "own",Space,Str "circle,",Space,Str "a",Space,Str "circle",Space,Str "closed",Space,Str "on",Space,Str "the",Space,Str "outside;",Space,Str "and,",Space,Str "with",Space,Str "all",Space,Str "its",SoftBreak,Str "elements",Space,Str "alike,",Space,Str "every",Space,Str "sphere",Space,Str "is",Space,Str "opaque",Space,Str "to",Space,Str "the",Space,Str "others",Space,Str "which",Space,Str "surround",SoftBreak,Str "it.",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "In",Space,Str "brief,",Space,Str "regarded",Space,Str "as",Space,Str "an",Space,Str "existence",Space,Str "which",Space,Str "appears",Space,Str "in",Space,Str "a",SoftBreak,Str "soul,",Space,Str "the",Space,Str "whole",Space,Str "world",Space,Str "for",Space,Str "each",Space,Str "is",Space,Str "peculiar",Space,Str "and",Space,Str "private",Space,Str "to",Space,Str "that",SoftBreak,Str "soul.\""]]]]]
- ,Div ("",[],[])
- [Plain [Str "Turn",Space,Str "in",Space,Str "the",Space,Str "door",Space,Str "once",Space,Str "and",Space,Str "turn",Space,Str "once",Space,Str "only"]]
- ,Div ("",[],[])
- [Plain [Str "We",Space,Str "think",Space,Str "of",Space,Str "the",Space,Str "key,",Space,Str "each",Space,Str "in",Space,Str "his",Space,Str "prison"]]
- ,Div ("",[],[])
- [Plain [Str "Thinking",Space,Str "of",Space,Str "the",Space,Str "key,",Space,Str "each",Space,Str "confirms",Space,Str "a",Space,Str "prison"]]
- ,Div ("",[],[])
- [Plain [Str "Only",Space,Str "at",Space,Str "nightfall,",Space,Str "aetherial",Space,Str "rumours"]]
- ,Div ("",[],[])
- [Plain [Str "Revive",Space,Str "for",Space,Str "a",Space,Str "moment",Space,Str "a",Space,Str "broken",Space,Str "Coriolanus"]]
- ,Div ("",[],[])
- [Plain [Str "DA"]]
- ,Div ("",[],[])
- [Plain [Span ("",[],[("lang","sa")]) [Str "Damyata"],Str ":",Space,Str "The",Space,Str "boat",Space,Str "responded"]]
- ,Div ("",[],[])
- [Plain [Str "Gaily,",Space,Str "to",Space,Str "the",Space,Str "hand",Space,Str "expert",Space,Str "with",Space,Str "sail",Space,Str "and",Space,Str "oar",Span ("",["lnum"],[]) [Str "420"]]]
- ,Div ("",[],[])
- [Plain [Str "The",Space,Str "sea",Space,Str "was",Space,Str "calm,",Space,Str "your",Space,Str "heart",Space,Str "would",Space,Str "have",Space,Str "responded"]]
- ,Div ("",[],[])
- [Plain [Str "Gaily,",Space,Str "when",Space,Str "invited,",Space,Str "beating",Space,Str "obedient"]]
- ,Div ("",[],[])
- [Plain [Str "To",Space,Str "controlling",Space,Str "hands"]]]
- ,Div ("",["linegroup"],[])
- [Div ("",["indent"],[])
- [Plain [Str "I",Space,Str "sat",Space,Str "upon",Space,Str "the",Space,Str "shore"]]
- ,Div ("wasteland-content.xhtml#ln425",[],[])
- [Plain [Str "Fishing,",Space,Str "with",Space,Str "the",Space,Str "arid",Space,Str "plain",Space,Str "behind",Space,Str "me",Note [Para [Link ("",[],[]) [Str "425."] ("#wasteland-content.xhtml#ln425",""),Space,Str "V.",Space,Str "Weston,",Space,Str "From",Space,Str "Ritual",Space,Str "to",Space,Str "Romance;",Space,Str "chapter",Space,Str "on",Space,Str "the",Space,Str "Fisher",Space,Str "King."]]]]
- ,Div ("",[],[])
- [Plain [Str "Shall",Space,Str "I",Space,Str "at",Space,Str "least",Space,Str "set",Space,Str "my",Space,Str "lands",Space,Str "in",Space,Str "order?"]]
- ,Div ("",[],[])
- [Plain [Str "London",Space,Str "Bridge",Space,Str "is",Space,Str "falling",Space,Str "down",Space,Str "falling",Space,Str "down",Space,Str "falling",Space,Str "down"]]
- ,Div ("wasteland-content.xhtml#ln428",[],[("lang","it")])
- [Plain [Emph [Str "Poi",Space,Str "s'ascose",Space,Str "nel",Space,Str "foco",Space,Str "che",Space,Str "gli",Space,Str "affina"],SoftBreak,Note [Para [Link ("",[],[]) [Str "428."] ("#wasteland-content.xhtml#ln428",""),Space,Str "V.",Space,Str "Purgatorio,",Space,Str "xxvi.",Space,Str "148."],BlockQuote [Para [Str "\"'Ara",Space,Str "vos",Space,Str "prec",Space,Str "per",Space,Str "aquella",Space,Str "valor",LineBreak,Str "'que",Space,Str "vos",Space,Str "guida",Space,Str "al",Space,Str "som",Space,Str "de",SoftBreak,Str "l'escalina,",LineBreak,Str "'sovegna",Space,Str "vos",Space,Str "a",Space,Str "temps",Space,Str "de",Space,Str "ma",Space,Str "dolor.'",LineBreak,Str "Poi",SoftBreak,Str "s'ascose",Space,Str "nel",Space,Str "foco",Space,Str "che",Space,Str "gli",Space,Str "affina.\""]]]]]
- ,Div ("wasteland-content.xhtml#ln429",[],[])
- [Plain [Span ("",[],[("lang","it")]) [SoftBreak,Emph [Str "Quando",Space,Str "fiam",Space,Str "ceu",Space,Str "chelidon"],SoftBreak],Space,Str "-",Space,Str "O",Space,Str "swallow",Space,Str "swallow",Note [Para [Link ("",[],[]) [Str "429."] ("#wasteland-content.xhtml#ln429",""),Space,Str "V.",Space,Str "Pervigilium",Space,Str "Veneris.",Space,Str "Cf.",Space,Str "Philomela",Space,Str "in",Space,Str "Parts",Space,Str "II",Space,Str "and",Space,Str "III."]]]]
- ,Div ("wasteland-content.xhtml#ln430",[],[("lang","fr")])
- [Plain [Emph [Str "Le",Space,Str "Prince",Space,Str "d'Aquitaine",Space,Str "a",Space,Str "la",Space,Str "tour",Space,Str "abolie"],SoftBreak,Note [Para [Link ("",[],[]) [Str "430."] ("#wasteland-content.xhtml#ln430",""),Space,Str "V.",Space,Str "Gerard",Space,Str "de",Space,Str "Nerval,",Space,Str "Sonnet",Space,Str "El",Space,Str "Desdichado."]],SoftBreak,Span ("",["lnum"],[]) [Str "430"]]]
- ,Div ("",[],[])
- [Plain [Str "These",Space,Str "fragments",Space,Str "I",Space,Str "have",Space,Str "shored",Space,Str "against",Space,Str "my",Space,Str "ruins"]]
- ,Div ("wasteland-content.xhtml#ln432",[],[])
- [Plain [Str "Why",Space,Str "then",Space,Str "Ile",Space,Str "fit",Space,Str "you.",Space,Str "Hieronymo's",Space,Str "mad",Space,Str "againe.",Note [Para [Link ("",[],[]) [Str "432."] ("#wasteland-content.xhtml#ln432",""),Space,Str "V.",Space,Str "Kyd's",Space,Str "Spanish",Space,Str "Tragedy."]]]]
- ,Div ("",[],[("lang","sa")])
- [Plain [Str "Datta.",Space,Str "Dayadhvam.",Space,Str "Damyata."]]
- ,Div ("wasteland-content.xhtml#ln434",["linegroup","indent"],[])
- [Plain [Span ("",[],[("lang","sa")]) [Str "Shantih",Space,Str "shantih",Space,Str "shantih",Note [Para [Link ("",[],[]) [Str "434."] ("#wasteland-content.xhtml#ln434",""),Space,Str "Shantih.",Space,Str "Repeated",Space,Str "as",Space,Str "here,",Space,Str "a",Space,Str "formal",Space,Str "ending",Space,Str "to",Space,Str "an",Space,Str "Upanishad.",Space,Str "'The",SoftBreak,Str "Peace",Space,Str "which",Space,Str "passeth",Space,Str "understanding'",Space,Str "is",Space,Str "a",Space,Str "feeble",Space,Str "translation",Space,Str "of",Space,Str "the",SoftBreak,Str "content",Space,Str "of",Space,Str "this",Space,Str "word."]],SoftBreak]]]]]]
-,Div ("wasteland-content.xhtml#backmatter",["section","backmatter"],[])
- [Div ("wasteland-content.xhtml#rearnotes",["section","rearnotes"],[])
- [Header 2 ("",[],[]) [Str "NOTES",Space,Str "ON",Space,Str "\"THE",Space,Str "WASTE",Space,Str "LAND\""]
- ,Para [Str "Not",Space,Str "only",Space,Str "the",Space,Str "title,",Space,Str "but",Space,Str "the",Space,Str "plan",Space,Str "and",Space,Str "a",Space,Str "good",Space,Str "deal",Space,Str "of",Space,Str "the",Space,Str "incidental",Space,Str "symbolism",Space,Str "of",SoftBreak,Str "the",Space,Str "poem",Space,Str "were",Space,Str "suggested",Space,Str "by",Space,Str "Miss",Space,Str "Jessie",Space,Str "L.",Space,Str "Weston's",Space,Str "book",Space,Str "on",Space,Str "the",Space,Str "Grail",Space,Str "legend:",SoftBreak,Str "From",Space,Str "Ritual",Space,Str "to",Space,Str "Romance"]
- ,Para [Str "Indeed,",Space,Str "so",Space,Str "deeply",Space,Str "am",Space,Str "I",Space,Str "indebted,",Space,Str "Miss",Space,Str "Weston's",Space,Str "book",Space,Str "will",Space,Str "elucidate",Space,Str "the",SoftBreak,Str "difficulties",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "much",Space,Str "better",Space,Str "than",Space,Str "my",Space,Str "notes",Space,Str "can",Space,Str "do;",Space,Str "and",Space,Str "I",Space,Str "recommend",Space,Str "it",SoftBreak,Str "(apart",Space,Str "from",Space,Str "the",Space,Str "great",Space,Str "interest",Space,Str "of",Space,Str "the",Space,Str "book",Space,Str "itself)",Space,Str "to",Space,Str "any",Space,Str "who",Space,Str "think",Space,Str "such",SoftBreak,Str "elucidation",Space,Str "of",Space,Str "the",Space,Str "poem",Space,Str "worth",Space,Str "the",Space,Str "trouble.",Space,Str "To",Space,Str "another",Space,Str "work",Space,Str "of",Space,Str "anthropology",Space,Str "I",Space,Str "am",SoftBreak,Str "indebted",Space,Str "in",Space,Str "general,",Space,Str "one",Space,Str "which",Space,Str "has",Space,Str "influenced",Space,Str "our",Space,Str "generation",Space,Str "profoundly;",Space,Str "I",Space,Str "mean",SoftBreak,Str "The",Space,Str "Golden",Space,Str "Bough;",Space,Str "I",Space,Str "have",Space,Str "used",Space,Str "especially",Space,Str "the",Space,Str "two",Space,Str "volumes",Space,Str "Adonis,",Space,Str "Attis,",Space,Str "Osiris.",SoftBreak,Str "Anyone",Space,Str "who",Space,Str "is",Space,Str "acquainted",Space,Str "with",Space,Str "these",Space,Str "works",Space,Str "will",Space,Str "immediately",Space,Str "recognise",Space,Str "in",Space,Str "the",Space,Str "poem",SoftBreak,Str "certain",Space,Str "references",Space,Str "to",Space,Str "vegetation",Space,Str "ceremonies."]
- ,Div ("",["section"],[])
- [Header 3 ("",[],[]) [Str "I.",Space,Str "THE",Space,Str "BURIAL",Space,Str "OF",Space,Str "THE",Space,Str "DEAD"]]
- ,Div ("",["section"],[])
- [Header 3 ("",[],[]) [Str "II.",Space,Str "A",Space,Str "GAME",Space,Str "OF",Space,Str "CHESS"]]
- ,Div ("",["section"],[])
- [Header 3 ("",[],[]) [Str "III.",Space,Str "THE",Space,Str "FIRE",Space,Str "SERMON"]]
- ,Div ("",["section"],[])
- [Header 3 ("",[],[]) [Str "V.",Space,Str "WHAT",Space,Str "THE",Space,Str "THUNDER",Space,Str "SAID"]
- ,Para [Str "In",Space,Str "the",Space,Str "first",Space,Str "part",Space,Str "of",Space,Str "Part",Space,Str "V",Space,Str "three",Space,Str "themes",Space,Str "are",Space,Str "employed:",Space,Str "the",Space,Str "journey",Space,Str "to",Space,Str "Emmaus,",SoftBreak,Str "the",Space,Str "approach",Space,Str "to",Space,Str "the",Space,Str "Chapel",Space,Str "Perilous",Space,Str "(see",Space,Str "Miss",Space,Str "Weston's",Space,Str "book)",Space,Str "and",Space,Str "the",Space,Str "present",SoftBreak,Str "decay",Space,Str "of",Space,Str "eastern",Space,Str "Europe."]]]]]
+[ Para
+ [ Image ( "" , [] , [] ) [] ( "wasteland-cover.jpg" , "" ) ]
+, Para [ Span ( "wasteland-content.xhtml" , [] , [] ) [] ]
+, Div
+ ( "wasteland-content.xhtml#frontmatter"
+ , [ "section" , "frontmatter" ]
+ , []
+ )
+ []
+, Div
+ ( "wasteland-content.xhtml#bodymatter"
+ , [ "section" , "bodymatter" ]
+ , []
+ )
+ [ Div
+ ( "wasteland-content.xhtml#ch1" , [ "section" ] , [] )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "I."
+ , Space
+ , Str "THE"
+ , Space
+ , Str "BURIAL"
+ , Space
+ , Str "OF"
+ , Space
+ , Str "THE"
+ , Space
+ , Str "DEAD"
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "April"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "cruellest"
+ , Space
+ , Str "month,"
+ , Space
+ , Str "breeding"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Lilacs"
+ , Space
+ , Str "out"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "dead"
+ , Space
+ , Str "land,"
+ , Space
+ , Str "mixing"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Memory"
+ , Space
+ , Str "and"
+ , Space
+ , Str "desire,"
+ , Space
+ , Str "stirring"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Dull"
+ , Space
+ , Str "roots"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spring"
+ , Space
+ , Str "rain."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Winter"
+ , Space
+ , Str "kept"
+ , Space
+ , Str "us"
+ , Space
+ , Str "warm,"
+ , Space
+ , Str "covering"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Earth"
+ , Space
+ , Str "in"
+ , Space
+ , Str "forgetful"
+ , Space
+ , Str "snow,"
+ , Space
+ , Str "feeding"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "A"
+ , Space
+ , Str "little"
+ , Space
+ , Str "life"
+ , Space
+ , Str "with"
+ , Space
+ , Str "dried"
+ , Space
+ , Str "tubers."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Summer"
+ , Space
+ , Str "surprised"
+ , Space
+ , Str "us,"
+ , Space
+ , Str "coming"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Starnbergersee"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "With"
+ , Space
+ , Str "a"
+ , Space
+ , Str "shower"
+ , Space
+ , Str "of"
+ , Space
+ , Str "rain;"
+ , Space
+ , Str "we"
+ , Space
+ , Str "stopped"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "colonnade,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "went"
+ , Space
+ , Str "on"
+ , Space
+ , Str "in"
+ , Space
+ , Str "sunlight,"
+ , Space
+ , Str "into"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Hofgarten,"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "10" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "drank"
+ , Space
+ , Str "coffee,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "talked"
+ , Space
+ , Str "for"
+ , Space
+ , Str "an"
+ , Space
+ , Str "hour."
+ ]
+ ]
+ , Div
+ ( "" , [] , [ ( "lang" , "de" ) ] )
+ [ Plain
+ [ Str "Bin"
+ , Space
+ , Str "gar"
+ , Space
+ , Str "keine"
+ , Space
+ , Str "Russin,"
+ , Space
+ , Str "stamm'"
+ , Space
+ , Str "aus"
+ , Space
+ , Str "Litauen,"
+ , Space
+ , Str "echt"
+ , SoftBreak
+ , Str "deutsch."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "when"
+ , Space
+ , Str "we"
+ , Space
+ , Str "were"
+ , Space
+ , Str "children,"
+ , Space
+ , Str "staying"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "archduke's,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "My"
+ , Space
+ , Str "cousin's,"
+ , Space
+ , Str "he"
+ , Space
+ , Str "took"
+ , Space
+ , Str "me"
+ , Space
+ , Str "out"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , Space
+ , Str "sled,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "I"
+ , Space
+ , Str "was"
+ , Space
+ , Str "frightened."
+ , Space
+ , Str "He"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "Marie,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Marie,"
+ , Space
+ , Str "hold"
+ , Space
+ , Str "on"
+ , Space
+ , Str "tight."
+ , Space
+ , Str "And"
+ , Space
+ , Str "down"
+ , Space
+ , Str "we"
+ , Space
+ , Str "went."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "In"
+ , Space
+ , Str "the"
+ , Space
+ , Str "mountains,"
+ , Space
+ , Str "there"
+ , Space
+ , Str "you"
+ , Space
+ , Str "feel"
+ , Space
+ , Str "free."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "read,"
+ , Space
+ , Str "much"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "night,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "go"
+ , Space
+ , Str "south"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "winter."
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "What"
+ , Space
+ , Str "are"
+ , Space
+ , Str "the"
+ , Space
+ , Str "roots"
+ , Space
+ , Str "that"
+ , Space
+ , Str "clutch,"
+ , Space
+ , Str "what"
+ , Space
+ , Str "branches"
+ , Space
+ , Str "grow"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln20" , [] , [] )
+ [ Plain
+ [ Str "Out"
+ , Space
+ , Str "of"
+ , Space
+ , Str "this"
+ , Space
+ , Str "stony"
+ , Space
+ , Str "rubbish?"
+ , Space
+ , Str "Son"
+ , Space
+ , Str "of"
+ , Space
+ , Str "man,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Line" , Space , Str "20." ]
+ ( "#wasteland-content.xhtml#ln20" , "" )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Ezekiel"
+ , Space
+ , Str "2:1."
+ ]
+ ]
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "20" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "You"
+ , Space
+ , Str "cannot"
+ , Space
+ , Str "say,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "guess,"
+ , Space
+ , Str "for"
+ , Space
+ , Str "you"
+ , Space
+ , Str "know"
+ , Space
+ , Str "only"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "A"
+ , Space
+ , Str "heap"
+ , Space
+ , Str "of"
+ , Space
+ , Str "broken"
+ , Space
+ , Str "images,"
+ , Space
+ , Str "where"
+ , Space
+ , Str "the"
+ , Space
+ , Str "sun"
+ , Space
+ , Str "beats,"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln23" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "the"
+ , Space
+ , Str "dead"
+ , Space
+ , Str "tree"
+ , Space
+ , Str "gives"
+ , Space
+ , Str "no"
+ , Space
+ , Str "shelter,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "cricket"
+ , Space
+ , Str "no"
+ , Space
+ , Str "relief,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "23." ]
+ ( "#wasteland-content.xhtml#ln23" , "" )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Ecclesiastes"
+ , Space
+ , Str "12:5."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "the"
+ , Space
+ , Str "dry"
+ , Space
+ , Str "stone"
+ , Space
+ , Str "no"
+ , Space
+ , Str "sound"
+ , Space
+ , Str "of"
+ , Space
+ , Str "water."
+ , Space
+ , Str "Only"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "There"
+ , Space
+ , Str "is"
+ , Space
+ , Str "shadow"
+ , Space
+ , Str "under"
+ , Space
+ , Str "this"
+ , Space
+ , Str "red"
+ , Space
+ , Str "rock,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "(Come"
+ , Space
+ , Str "in"
+ , Space
+ , Str "under"
+ , Space
+ , Str "the"
+ , Space
+ , Str "shadow"
+ , Space
+ , Str "of"
+ , Space
+ , Str "this"
+ , Space
+ , Str "red"
+ , Space
+ , Str "rock),"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "I"
+ , Space
+ , Str "will"
+ , Space
+ , Str "show"
+ , Space
+ , Str "you"
+ , Space
+ , Str "something"
+ , Space
+ , Str "different"
+ , Space
+ , Str "from"
+ , Space
+ , Str "either"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Your"
+ , Space
+ , Str "shadow"
+ , Space
+ , Str "at"
+ , Space
+ , Str "morning"
+ , Space
+ , Str "striding"
+ , Space
+ , Str "behind"
+ , Space
+ , Str "you"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Or"
+ , Space
+ , Str "your"
+ , Space
+ , Str "shadow"
+ , Space
+ , Str "at"
+ , Space
+ , Str "evening"
+ , Space
+ , Str "rising"
+ , Space
+ , Str "to"
+ , Space
+ , Str "meet"
+ , Space
+ , Str "you;"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "will"
+ , Space
+ , Str "show"
+ , Space
+ , Str "you"
+ , Space
+ , Str "fear"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "handful"
+ , Space
+ , Str "of"
+ , Space
+ , Str "dust."
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "30" ]
+ ]
+ ]
+ , BlockQuote
+ [ Div
+ ( "" , [] , [] )
+ [ Div
+ ( "wasteland-content.xhtml#ln31" , [] , [] )
+ [ Plain
+ [ Str "Frisch"
+ , Space
+ , Str "weht"
+ , Space
+ , Str "der"
+ , Space
+ , Str "Wind"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "31." ]
+ ( "#wasteland-content.xhtml#ln31"
+ , ""
+ )
+ , Space
+ , Str "V."
+ , Space
+ , Str "Tristan"
+ , Space
+ , Str "und"
+ , Space
+ , Str "Isolde,"
+ , Space
+ , Str "i,"
+ , Space
+ , Str "verses"
+ , Space
+ , Str "5-8."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Der"
+ , Space
+ , Str "Heimat"
+ , Space
+ , Str "zu"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Mein"
+ , Space
+ , Str "Irisch"
+ , Space
+ , Str "Kind,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Wo"
+ , Space
+ , Str "weilest"
+ , Space
+ , Str "du?"
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"You"
+ , Space
+ , Str "gave"
+ , Space
+ , Str "me"
+ , Space
+ , Str "hyacinths"
+ , Space
+ , Str "first"
+ , Space
+ , Str "a"
+ , Space
+ , Str "year"
+ , Space
+ , Str "ago;"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"They"
+ , Space
+ , Str "called"
+ , Space
+ , Str "me"
+ , Space
+ , Str "the"
+ , Space
+ , Str "hyacinth"
+ , Space
+ , Str "girl.\""
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\8213Yet"
+ , Space
+ , Str "when"
+ , Space
+ , Str "we"
+ , Space
+ , Str "came"
+ , Space
+ , Str "back,"
+ , Space
+ , Str "late,"
+ , Space
+ , Str "from"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Hyacinth"
+ , SoftBreak
+ , Str "garden,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Your"
+ , Space
+ , Str "arms"
+ , Space
+ , Str "full,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "your"
+ , Space
+ , Str "hair"
+ , Space
+ , Str "wet,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "could"
+ , Space
+ , Str "not"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Speak,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "my"
+ , Space
+ , Str "eyes"
+ , Space
+ , Str "failed,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "was"
+ , Space
+ , Str "neither"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Living"
+ , Space
+ , Str "nor"
+ , Space
+ , Str "dead,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "I"
+ , Space
+ , Str "knew"
+ , Space
+ , Str "nothing,"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "40" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Looking"
+ , Space
+ , Str "into"
+ , Space
+ , Str "the"
+ , Space
+ , Str "heart"
+ , Space
+ , Str "of"
+ , Space
+ , Str "light,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "silence."
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln42"
+ , []
+ , [ ( "lang" , "de" ) ]
+ )
+ [ Plain
+ [ Emph
+ [ Str "Od'"
+ , Space
+ , Str "und"
+ , Space
+ , Str "leer"
+ , Space
+ , Str "das"
+ , Space
+ , Str "Meer"
+ ]
+ , Str "."
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "42." ]
+ ( "#wasteland-content.xhtml#ln42" , "" )
+ , Space
+ , Str "Id."
+ , Space
+ , Str "iii,"
+ , Space
+ , Str "verse"
+ , Space
+ , Str "24."
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Madame"
+ , Space
+ , Str "Sosostris,"
+ , Space
+ , Str "famous"
+ , Space
+ , Str "clairvoyante,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Had"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bad"
+ , Space
+ , Str "cold,"
+ , Space
+ , Str "nevertheless"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Is"
+ , Space
+ , Str "known"
+ , Space
+ , Str "to"
+ , Space
+ , Str "be"
+ , Space
+ , Str "the"
+ , Space
+ , Str "wisest"
+ , Space
+ , Str "woman"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Europe,"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln46" , [] , [] )
+ [ Plain
+ [ Str "With"
+ , Space
+ , Str "a"
+ , Space
+ , Str "wicked"
+ , Space
+ , Str "pack"
+ , Space
+ , Str "of"
+ , Space
+ , Str "cards."
+ , Space
+ , Str "Here,"
+ , Space
+ , Str "said"
+ , Space
+ , Str "she,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "46." ]
+ ( "#wasteland-content.xhtml#ln46" , "" )
+ , Space
+ , Str "I"
+ , Space
+ , Str "am"
+ , Space
+ , Str "not"
+ , Space
+ , Str "familiar"
+ , Space
+ , Str "with"
+ , Space
+ , Str "the"
+ , Space
+ , Str "exact"
+ , Space
+ , Str "constitution"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Tarot"
+ , Space
+ , Str "pack"
+ , Space
+ , Str "of"
+ , SoftBreak
+ , Str "cards,"
+ , Space
+ , Str "from"
+ , Space
+ , Str "which"
+ , Space
+ , Str "I"
+ , Space
+ , Str "have"
+ , Space
+ , Str "obviously"
+ , Space
+ , Str "departed"
+ , Space
+ , Str "to"
+ , Space
+ , Str "suit"
+ , Space
+ , Str "my"
+ , Space
+ , Str "own"
+ , Space
+ , Str "convenience."
+ , SoftBreak
+ , Str "The"
+ , Space
+ , Str "Hanged"
+ , Space
+ , Str "Man,"
+ , Space
+ , Str "a"
+ , Space
+ , Str "member"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "traditional"
+ , Space
+ , Str "pack,"
+ , Space
+ , Str "fits"
+ , Space
+ , Str "my"
+ , Space
+ , Str "purpose"
+ , Space
+ , Str "in"
+ , Space
+ , Str "two"
+ , SoftBreak
+ , Str "ways:"
+ , Space
+ , Str "because"
+ , Space
+ , Str "he"
+ , Space
+ , Str "is"
+ , Space
+ , Str "associated"
+ , Space
+ , Str "in"
+ , Space
+ , Str "my"
+ , Space
+ , Str "mind"
+ , Space
+ , Str "with"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Hanged"
+ , Space
+ , Str "God"
+ , Space
+ , Str "of"
+ , Space
+ , Str "Frazer,"
+ , SoftBreak
+ , Str "and"
+ , Space
+ , Str "because"
+ , Space
+ , Str "I"
+ , Space
+ , Str "associate"
+ , Space
+ , Str "him"
+ , Space
+ , Str "with"
+ , Space
+ , Str "the"
+ , Space
+ , Str "hooded"
+ , Space
+ , Str "figure"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "passage"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "disciples"
+ , Space
+ , Str "to"
+ , Space
+ , Str "Emmaus"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Part"
+ , Space
+ , Str "V."
+ , Space
+ , Str "The"
+ , Space
+ , Str "Phoenician"
+ , Space
+ , Str "Sailor"
+ , Space
+ , Str "and"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Merchant"
+ , SoftBreak
+ , Str "appear"
+ , Space
+ , Str "later;"
+ , Space
+ , Str "also"
+ , Space
+ , Str "the"
+ , Space
+ , Str "\"crowds"
+ , Space
+ , Str "of"
+ , Space
+ , Str "people,\""
+ , Space
+ , Str "and"
+ , Space
+ , Str "Death"
+ , Space
+ , Str "by"
+ , Space
+ , Str "Water"
+ , Space
+ , Str "is"
+ , SoftBreak
+ , Str "executed"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Part"
+ , Space
+ , Str "IV."
+ , Space
+ , Str "The"
+ , Space
+ , Str "Man"
+ , Space
+ , Str "with"
+ , Space
+ , Str "Three"
+ , Space
+ , Str "Staves"
+ , Space
+ , Str "(an"
+ , Space
+ , Str "authentic"
+ , Space
+ , Str "member"
+ , Space
+ , Str "of"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "Tarot"
+ , Space
+ , Str "pack)"
+ , Space
+ , Str "I"
+ , Space
+ , Str "associate,"
+ , Space
+ , Str "quite"
+ , Space
+ , Str "arbitrarily,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Fisher"
+ , Space
+ , Str "King"
+ , SoftBreak
+ , Str "himself."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Is"
+ , Space
+ , Str "your"
+ , Space
+ , Str "card,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "drowned"
+ , Space
+ , Str "Phoenician"
+ , Space
+ , Str "Sailor,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "(Those"
+ , Space
+ , Str "are"
+ , Space
+ , Str "pearls"
+ , Space
+ , Str "that"
+ , Space
+ , Str "were"
+ , Space
+ , Str "his"
+ , Space
+ , Str "eyes."
+ , Space
+ , Str "Look!)"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "Belladonna,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Lady"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Rocks,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "lady"
+ , Space
+ , Str "of"
+ , Space
+ , Str "situations."
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "50" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "man"
+ , Space
+ , Str "with"
+ , Space
+ , Str "three"
+ , Space
+ , Str "staves,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "here"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Wheel,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "one-eyed"
+ , Space
+ , Str "merchant,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "this"
+ , Space
+ , Str "card,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Which"
+ , Space
+ , Str "is"
+ , Space
+ , Str "blank,"
+ , Space
+ , Str "is"
+ , Space
+ , Str "something"
+ , Space
+ , Str "he"
+ , Space
+ , Str "carries"
+ , Space
+ , Str "on"
+ , Space
+ , Str "his"
+ , Space
+ , Str "back,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Which"
+ , Space
+ , Str "I"
+ , Space
+ , Str "am"
+ , Space
+ , Str "forbidden"
+ , Space
+ , Str "to"
+ , Space
+ , Str "see."
+ , Space
+ , Str "I"
+ , Space
+ , Str "do"
+ , Space
+ , Str "not"
+ , Space
+ , Str "find"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "Hanged"
+ , Space
+ , Str "Man."
+ , Space
+ , Str "Fear"
+ , Space
+ , Str "death"
+ , Space
+ , Str "by"
+ , Space
+ , Str "water."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "see"
+ , Space
+ , Str "crowds"
+ , Space
+ , Str "of"
+ , Space
+ , Str "people,"
+ , Space
+ , Str "walking"
+ , Space
+ , Str "round"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "ring."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Thank"
+ , Space
+ , Str "you."
+ , Space
+ , Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "see"
+ , Space
+ , Str "dear"
+ , Space
+ , Str "Mrs."
+ , Space
+ , Str "Equitone,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Tell"
+ , Space
+ , Str "her"
+ , Space
+ , Str "I"
+ , Space
+ , Str "bring"
+ , Space
+ , Str "the"
+ , Space
+ , Str "horoscope"
+ , Space
+ , Str "myself:"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "One"
+ , Space
+ , Str "must"
+ , Space
+ , Str "be"
+ , Space
+ , Str "so"
+ , Space
+ , Str "careful"
+ , Space
+ , Str "these"
+ , Space
+ , Str "days."
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "wasteland-content.xhtml#ln60" , [] , [] )
+ [ Plain
+ [ Str "Unreal"
+ , Space
+ , Str "City,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "60." ]
+ ( "#wasteland-content.xhtml#ln60" , "" )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Baudelaire:"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "\"Fourmillante"
+ , Space
+ , Str "cite;,"
+ , Space
+ , Str "cite;"
+ , Space
+ , Str "pleine"
+ , Space
+ , Str "de"
+ , Space
+ , Str "reves,"
+ , LineBreak
+ , Str "Ou"
+ , Space
+ , Str "le"
+ , Space
+ , Str "spectre"
+ , Space
+ , Str "en"
+ , SoftBreak
+ , Str "plein"
+ , Space
+ , Str "jour"
+ , Space
+ , Str "raccroche"
+ , Space
+ , Str "le"
+ , Space
+ , Str "passant.\""
+ ]
+ ]
+ ]
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "60" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Under"
+ , Space
+ , Str "the"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fog"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "winter"
+ , Space
+ , Str "dawn,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "A"
+ , Space
+ , Str "crowd"
+ , Space
+ , Str "flowed"
+ , Space
+ , Str "over"
+ , Space
+ , Str "London"
+ , Space
+ , Str "Bridge,"
+ , Space
+ , Str "so"
+ , Space
+ , Str "many,"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln63" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "had"
+ , Space
+ , Str "not"
+ , Space
+ , Str "thought"
+ , Space
+ , Str "death"
+ , Space
+ , Str "had"
+ , Space
+ , Str "undone"
+ , Space
+ , Str "so"
+ , Space
+ , Str "many."
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "63." ]
+ ( "#wasteland-content.xhtml#ln63" , "" )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Inferno,"
+ , Space
+ , Str "iii."
+ , Space
+ , Str "55-7."
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "\"si"
+ , Space
+ , Str "lunga"
+ , Space
+ , Str "tratta"
+ , LineBreak
+ , Str "di"
+ , Space
+ , Str "gente,"
+ , Space
+ , Str "ch'io"
+ , Space
+ , Str "non"
+ , Space
+ , Str "avrei"
+ , Space
+ , Str "mai"
+ , Space
+ , Str "creduto"
+ , LineBreak
+ , Str "che"
+ , SoftBreak
+ , Str "morte"
+ , Space
+ , Str "tanta"
+ , Space
+ , Str "n'avesse"
+ , Space
+ , Str "disfatta.\""
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln64" , [] , [] )
+ [ Plain
+ [ Str "Sighs,"
+ , Space
+ , Str "short"
+ , Space
+ , Str "and"
+ , Space
+ , Str "infrequent,"
+ , Space
+ , Str "were"
+ , Space
+ , Str "exhaled,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "64." ]
+ ( "#wasteland-content.xhtml#ln64" , "" )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Inferno,"
+ , Space
+ , Str "iv."
+ , Space
+ , Str "25-7:"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "\"Quivi,"
+ , Space
+ , Str "secondo"
+ , Space
+ , Str "che"
+ , Space
+ , Str "per"
+ , Space
+ , Str "ascoltahre,"
+ , LineBreak
+ , Str "\"non"
+ , Space
+ , Str "avea"
+ , Space
+ , Str "pianto,"
+ , Space
+ , Str "ma'"
+ , Space
+ , Str "che"
+ , Space
+ , Str "di"
+ , SoftBreak
+ , Str "sospiri,"
+ , LineBreak
+ , Str "\"che"
+ , Space
+ , Str "l'aura"
+ , Space
+ , Str "eterna"
+ , Space
+ , Str "facevan"
+ , Space
+ , Str "tremare.\""
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "each"
+ , Space
+ , Str "man"
+ , Space
+ , Str "fixed"
+ , Space
+ , Str "his"
+ , Space
+ , Str "eyes"
+ , Space
+ , Str "before"
+ , Space
+ , Str "his"
+ , Space
+ , Str "feet."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Flowed"
+ , Space
+ , Str "up"
+ , Space
+ , Str "the"
+ , Space
+ , Str "hill"
+ , Space
+ , Str "and"
+ , Space
+ , Str "down"
+ , Space
+ , Str "King"
+ , Space
+ , Str "William"
+ , Space
+ , Str "Street,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "To"
+ , Space
+ , Str "where"
+ , Space
+ , Str "Saint"
+ , Space
+ , Str "Mary"
+ , Space
+ , Str "Woolnoth"
+ , Space
+ , Str "kept"
+ , Space
+ , Str "the"
+ , Space
+ , Str "hours"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln68" , [] , [] )
+ [ Plain
+ [ Str "With"
+ , Space
+ , Str "a"
+ , Space
+ , Str "dead"
+ , Space
+ , Str "sound"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "final"
+ , Space
+ , Str "stroke"
+ , Space
+ , Str "of"
+ , Space
+ , Str "nine."
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "68." ]
+ ( "#wasteland-content.xhtml#ln68" , "" )
+ , Space
+ , Str "A"
+ , Space
+ , Str "phenomenon"
+ , Space
+ , Str "which"
+ , Space
+ , Str "I"
+ , Space
+ , Str "have"
+ , Space
+ , Str "often"
+ , Space
+ , Str "noticed."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "There"
+ , Space
+ , Str "I"
+ , Space
+ , Str "saw"
+ , Space
+ , Str "one"
+ , Space
+ , Str "I"
+ , Space
+ , Str "knew,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "stopped"
+ , Space
+ , Str "him,"
+ , Space
+ , Str "crying"
+ , SoftBreak
+ , Str "\"Stetson!"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"You"
+ , Space
+ , Str "who"
+ , Space
+ , Str "were"
+ , Space
+ , Str "with"
+ , Space
+ , Str "me"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "ships"
+ , Space
+ , Str "at"
+ , Space
+ , Str "Mylae!"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "70" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"That"
+ , Space
+ , Str "corpse"
+ , Space
+ , Str "you"
+ , Space
+ , Str "planted"
+ , Space
+ , Str "last"
+ , Space
+ , Str "year"
+ , Space
+ , Str "in"
+ , Space
+ , Str "your"
+ , Space
+ , Str "garden,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"Has"
+ , Space
+ , Str "it"
+ , Space
+ , Str "begun"
+ , Space
+ , Str "to"
+ , Space
+ , Str "sprout?"
+ , Space
+ , Str "Will"
+ , Space
+ , Str "it"
+ , Space
+ , Str "bloom"
+ , Space
+ , Str "this"
+ , Space
+ , Str "year?"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"Or"
+ , Space
+ , Str "has"
+ , Space
+ , Str "the"
+ , Space
+ , Str "sudden"
+ , Space
+ , Str "frost"
+ , Space
+ , Str "disturbed"
+ , Space
+ , Str "its"
+ , Space
+ , Str "bed?"
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "wasteland-content.xhtml#ln74" , [] , [] )
+ [ Plain
+ [ Str "\"Oh"
+ , Space
+ , Str "keep"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Dog"
+ , Space
+ , Str "far"
+ , Space
+ , Str "hence,"
+ , Space
+ , Str "that's"
+ , Space
+ , Str "friend"
+ , Space
+ , Str "to"
+ , Space
+ , Str "men,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "74." ]
+ ( "#wasteland-content.xhtml#ln74" , "" )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "the"
+ , Space
+ , Str "Dirge"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Webster's"
+ , Space
+ , Str "White"
+ , Space
+ , Str "Devil"
+ , Space
+ , Str "."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"Or"
+ , Space
+ , Str "with"
+ , Space
+ , Str "his"
+ , Space
+ , Str "nails"
+ , Space
+ , Str "he'll"
+ , Space
+ , Str "dig"
+ , Space
+ , Str "it"
+ , Space
+ , Str "up"
+ , Space
+ , Str "again!"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln76" , [] , [] )
+ [ Plain
+ [ Str "\"You!"
+ , Space
+ , Span
+ ( "" , [] , [ ( "lang" , "fr" ) ] )
+ [ Str "hypocrite"
+ , Space
+ , Str "lecteur!"
+ , Space
+ , Str "-"
+ , Space
+ , Str "mon"
+ , Space
+ , Str "semblable,"
+ , Space
+ , Str "-"
+ , SoftBreak
+ , Str "mon"
+ , Space
+ , Str "frere"
+ ]
+ , Space
+ , Str "!\""
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "76." ]
+ ( "#wasteland-content.xhtml#ln76" , "" )
+ , Space
+ , Str "V."
+ , Space
+ , Str "Baudelaire,"
+ , Space
+ , Str "Preface"
+ , Space
+ , Str "to"
+ , Space
+ , Str "Fleurs"
+ , Space
+ , Str "du"
+ , Space
+ , Str "Mal."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ch2" , [ "section" ] , [] )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "II."
+ , Space
+ , Str "A"
+ , Space
+ , Str "GAME"
+ , Space
+ , Str "OF"
+ , Space
+ , Str "CHESS"
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "wasteland-content.xhtml#ln77" , [] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "Chair"
+ , Space
+ , Str "she"
+ , Space
+ , Str "sat"
+ , Space
+ , Str "in,"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "burnished"
+ , Space
+ , Str "throne,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "77." ]
+ ( "#wasteland-content.xhtml#ln77" , "" )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Antony"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Cleopatra,"
+ , Space
+ , Str "II."
+ , Space
+ , Str "ii.,"
+ , Space
+ , Str "l."
+ , Space
+ , Str "190."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Glowed"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "marble,"
+ , Space
+ , Str "where"
+ , Space
+ , Str "the"
+ , Space
+ , Str "glass"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Held"
+ , Space
+ , Str "up"
+ , Space
+ , Str "by"
+ , Space
+ , Str "standards"
+ , Space
+ , Str "wrought"
+ , Space
+ , Str "with"
+ , Space
+ , Str "fruited"
+ , Space
+ , Str "vines"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "From"
+ , Space
+ , Str "which"
+ , Space
+ , Str "a"
+ , Space
+ , Str "golden"
+ , Space
+ , Str "Cupidon"
+ , Space
+ , Str "peeped"
+ , Space
+ , Str "out"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "80" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "(Another"
+ , Space
+ , Str "hid"
+ , Space
+ , Str "his"
+ , Space
+ , Str "eyes"
+ , Space
+ , Str "behind"
+ , Space
+ , Str "his"
+ , Space
+ , Str "wing)"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Doubled"
+ , Space
+ , Str "the"
+ , Space
+ , Str "flames"
+ , Space
+ , Str "of"
+ , Space
+ , Str "sevenbranched"
+ , Space
+ , Str "candelabra"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Reflecting"
+ , Space
+ , Str "light"
+ , Space
+ , Str "upon"
+ , Space
+ , Str "the"
+ , Space
+ , Str "table"
+ , Space
+ , Str "as"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "glitter"
+ , Space
+ , Str "of"
+ , Space
+ , Str "her"
+ , Space
+ , Str "jewels"
+ , Space
+ , Str "rose"
+ , Space
+ , Str "to"
+ , Space
+ , Str "meet"
+ , Space
+ , Str "it,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "From"
+ , Space
+ , Str "satin"
+ , Space
+ , Str "cases"
+ , Space
+ , Str "poured"
+ , Space
+ , Str "in"
+ , Space
+ , Str "rich"
+ , Space
+ , Str "profusion;"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "In"
+ , Space
+ , Str "vials"
+ , Space
+ , Str "of"
+ , Space
+ , Str "ivory"
+ , Space
+ , Str "and"
+ , Space
+ , Str "coloured"
+ , Space
+ , Str "glass"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Unstoppered,"
+ , Space
+ , Str "lurked"
+ , Space
+ , Str "her"
+ , Space
+ , Str "strange"
+ , Space
+ , Str "synthetic"
+ , Space
+ , Str "perfumes,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Unguent,"
+ , Space
+ , Str "powdered,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "liquid"
+ , Space
+ , Str "-"
+ , Space
+ , Str "troubled,"
+ , Space
+ , Str "confused"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "drowned"
+ , Space
+ , Str "the"
+ , Space
+ , Str "sense"
+ , Space
+ , Str "in"
+ , Space
+ , Str "odours;"
+ , Space
+ , Str "stirred"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "air"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "That"
+ , Space
+ , Str "freshened"
+ , Space
+ , Str "from"
+ , Space
+ , Str "the"
+ , Space
+ , Str "window,"
+ , Space
+ , Str "these"
+ , Space
+ , Str "ascended"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "90" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "In"
+ , Space
+ , Str "fattening"
+ , Space
+ , Str "the"
+ , Space
+ , Str "prolonged"
+ , Space
+ , Str "candle-flames,"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln92" , [] , [] )
+ [ Plain
+ [ Str "Flung"
+ , Space
+ , Str "their"
+ , Space
+ , Str "smoke"
+ , Space
+ , Str "into"
+ , Space
+ , Str "the"
+ , Space
+ , Str "laquearia,"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "92." ]
+ ( "#wasteland-content.xhtml#ln92" , "" )
+ , Space
+ , Str "Laquearia."
+ , Space
+ , Str "V."
+ , Space
+ , Str "Aeneid,"
+ , Space
+ , Str "I."
+ , Space
+ , Str "726:"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "dependent"
+ , Space
+ , Str "lychni"
+ , Space
+ , Str "laquearibus"
+ , Space
+ , Str "aureis"
+ , Space
+ , Str "incensi,"
+ , Space
+ , Str "et"
+ , Space
+ , Str "noctem"
+ , SoftBreak
+ , Str "flammis"
+ , LineBreak
+ , Str "funalia"
+ , Space
+ , Str "vincunt."
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Stirring"
+ , Space
+ , Str "the"
+ , Space
+ , Str "pattern"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "coffered"
+ , Space
+ , Str "ceiling."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Huge"
+ , Space
+ , Str "sea-wood"
+ , Space
+ , Str "fed"
+ , Space
+ , Str "with"
+ , Space
+ , Str "copper"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Burned"
+ , Space
+ , Str "green"
+ , Space
+ , Str "and"
+ , Space
+ , Str "orange,"
+ , Space
+ , Str "framed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "coloured"
+ , Space
+ , Str "stone,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "In"
+ , Space
+ , Str "which"
+ , Space
+ , Str "sad"
+ , Space
+ , Str "light"
+ , Space
+ , Str "a"
+ , Space
+ , Str "carved"
+ , Space
+ , Str "dolphin"
+ , Space
+ , Str "swam."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Above"
+ , Space
+ , Str "the"
+ , Space
+ , Str "antique"
+ , Space
+ , Str "mantel"
+ , Space
+ , Str "was"
+ , Space
+ , Str "displayed"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln98" , [] , [] )
+ [ Plain
+ [ Str "As"
+ , Space
+ , Str "though"
+ , Space
+ , Str "a"
+ , Space
+ , Str "window"
+ , Space
+ , Str "gave"
+ , Space
+ , Str "upon"
+ , Space
+ , Str "the"
+ , Space
+ , Str "sylvan"
+ , Space
+ , Str "scene"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "98." ]
+ ( "#wasteland-content.xhtml#ln98" , "" )
+ , Space
+ , Str "Sylvan"
+ , Space
+ , Str "scene."
+ , Space
+ , Str "V."
+ , Space
+ , Str "Milton,"
+ , Space
+ , Str "Paradise"
+ , Space
+ , Str "Lost,"
+ , Space
+ , Str "iv."
+ , Space
+ , Str "140."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln99" , [] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "change"
+ , Space
+ , Str "of"
+ , Space
+ , Str "Philomel,"
+ , Space
+ , Str "by"
+ , Space
+ , Str "the"
+ , Space
+ , Str "barbarous"
+ , Space
+ , Str "king"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "99." ]
+ ( "#wasteland-content.xhtml#ln99" , "" )
+ , Space
+ , Str "V."
+ , Space
+ , Str "Ovid,"
+ , Space
+ , Str "Metamorphoses,"
+ , Space
+ , Str "vi,"
+ , Space
+ , Str "Philomela."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln100" , [] , [] )
+ [ Plain
+ [ Str "So"
+ , Space
+ , Str "rudely"
+ , Space
+ , Str "forced;"
+ , Space
+ , Str "yet"
+ , Space
+ , Str "there"
+ , Space
+ , Str "the"
+ , Space
+ , Str "nightingale"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "100." ]
+ ( "#wasteland-content.xhtml#ln100"
+ , ""
+ )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Part"
+ , Space
+ , Str "III,"
+ , Space
+ , Str "l."
+ , Space
+ , Str "204."
+ ]
+ ]
+ , SoftBreak
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "100" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Filled"
+ , Space
+ , Str "all"
+ , Space
+ , Str "the"
+ , Space
+ , Str "desert"
+ , Space
+ , Str "with"
+ , Space
+ , Str "inviolable"
+ , Space
+ , Str "voice"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "still"
+ , Space
+ , Str "she"
+ , Space
+ , Str "cried,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "still"
+ , Space
+ , Str "the"
+ , Space
+ , Str "world"
+ , Space
+ , Str "pursues,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"Jug"
+ , Space
+ , Str "Jug\""
+ , Space
+ , Str "to"
+ , Space
+ , Str "dirty"
+ , Space
+ , Str "ears."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "other"
+ , Space
+ , Str "withered"
+ , Space
+ , Str "stumps"
+ , Space
+ , Str "of"
+ , Space
+ , Str "time"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Were"
+ , Space
+ , Str "told"
+ , Space
+ , Str "upon"
+ , Space
+ , Str "the"
+ , Space
+ , Str "walls;"
+ , Space
+ , Str "staring"
+ , Space
+ , Str "forms"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Leaned"
+ , Space
+ , Str "out,"
+ , Space
+ , Str "leaning,"
+ , Space
+ , Str "hushing"
+ , Space
+ , Str "the"
+ , Space
+ , Str "room"
+ , Space
+ , Str "enclosed."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Footsteps"
+ , Space
+ , Str "shuffled"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "stair."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Under"
+ , Space
+ , Str "the"
+ , Space
+ , Str "firelight,"
+ , Space
+ , Str "under"
+ , Space
+ , Str "the"
+ , Space
+ , Str "brush,"
+ , Space
+ , Str "her"
+ , Space
+ , Str "hair"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Spread"
+ , Space
+ , Str "out"
+ , Space
+ , Str "in"
+ , Space
+ , Str "fiery"
+ , Space
+ , Str "points"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Glowed"
+ , Space
+ , Str "into"
+ , Space
+ , Str "words,"
+ , Space
+ , Str "then"
+ , Space
+ , Str "would"
+ , Space
+ , Str "be"
+ , Space
+ , Str "savagely"
+ , Space
+ , Str "still."
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "110" ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"My"
+ , Space
+ , Str "nerves"
+ , Space
+ , Str "are"
+ , Space
+ , Str "bad"
+ , Space
+ , Str "to-night."
+ , Space
+ , Str "Yes,"
+ , Space
+ , Str "bad."
+ , Space
+ , Str "Stay"
+ , Space
+ , Str "with"
+ , Space
+ , Str "me."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"Speak"
+ , Space
+ , Str "to"
+ , Space
+ , Str "me."
+ , Space
+ , Str "Why"
+ , Space
+ , Str "do"
+ , Space
+ , Str "you"
+ , Space
+ , Str "never"
+ , Space
+ , Str "speak."
+ , Space
+ , Str "Speak."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"What"
+ , Space
+ , Str "are"
+ , Space
+ , Str "you"
+ , Space
+ , Str "thinking"
+ , Space
+ , Str "of?"
+ , Space
+ , Str "What"
+ , Space
+ , Str "thinking?"
+ , Space
+ , Str "What?"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"I"
+ , Space
+ , Str "never"
+ , Space
+ , Str "know"
+ , Space
+ , Str "what"
+ , Space
+ , Str "you"
+ , Space
+ , Str "are"
+ , Space
+ , Str "thinking."
+ , Space
+ , Str "Think.\""
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "wasteland-content.xhtml#ln115" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "think"
+ , Space
+ , Str "we"
+ , Space
+ , Str "are"
+ , Space
+ , Str "in"
+ , Space
+ , Str "rats'"
+ , Space
+ , Str "alley"
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "115." ]
+ ( "#wasteland-content.xhtml#ln115"
+ , ""
+ )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Part"
+ , Space
+ , Str "III,"
+ , Space
+ , Str "l."
+ , Space
+ , Str "195."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Where"
+ , Space
+ , Str "the"
+ , Space
+ , Str "dead"
+ , Space
+ , Str "men"
+ , Space
+ , Str "lost"
+ , Space
+ , Str "their"
+ , Space
+ , Str "bones."
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"What"
+ , Space
+ , Str "is"
+ , Space
+ , Str "that"
+ , Space
+ , Str "noise?\""
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln118" , [ "indent" ] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "wind"
+ , Space
+ , Str "under"
+ , Space
+ , Str "the"
+ , Space
+ , Str "door."
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "118." ]
+ ( "#wasteland-content.xhtml#ln118"
+ , ""
+ )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Webster:"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "\"Is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "wind"
+ , Space
+ , Str "in"
+ , Space
+ , Str "that"
+ , Space
+ , Str "door"
+ , Space
+ , Str "still?\""
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"What"
+ , Space
+ , Str "is"
+ , Space
+ , Str "that"
+ , Space
+ , Str "noise"
+ , Space
+ , Str "now?"
+ , Space
+ , Str "What"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "wind"
+ , Space
+ , Str "doing?\""
+ ]
+ ]
+ , Div
+ ( "" , [ "indent" ] , [] )
+ [ Plain
+ [ Str "Nothing"
+ , Space
+ , Str "again"
+ , Space
+ , Str "nothing."
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "120" ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div ( "" , [] , [] ) [ Plain [ Str "\"Do" ] ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"You"
+ , Space
+ , Str "know"
+ , Space
+ , Str "nothing?"
+ , Space
+ , Str "Do"
+ , Space
+ , Str "you"
+ , Space
+ , Str "see"
+ , Space
+ , Str "nothing?"
+ , Space
+ , Str "Do"
+ , Space
+ , Str "you"
+ , Space
+ , Str "remember"
+ ]
+ ]
+ , Div ( "" , [] , [] ) [ Plain [ Str "\"Nothing?\"" ] ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Plain [ Str "I" , Space , Str "remember" ] ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Those"
+ , Space
+ , Str "are"
+ , Space
+ , Str "pearls"
+ , Space
+ , Str "that"
+ , Space
+ , Str "were"
+ , Space
+ , Str "his"
+ , Space
+ , Str "eyes."
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln126" , [] , [] )
+ [ Plain
+ [ Str "\"Are"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alive,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "not?"
+ , Space
+ , Str "Is"
+ , Space
+ , Str "there"
+ , Space
+ , Str "nothing"
+ , Space
+ , Str "in"
+ , Space
+ , Str "your"
+ , Space
+ , Str "head?\""
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "126." ]
+ ( "#wasteland-content.xhtml#ln126"
+ , ""
+ )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "Part"
+ , Space
+ , Str "I,"
+ , Space
+ , Str "l."
+ , Space
+ , Str "37,"
+ , Space
+ , Str "48."
+ ]
+ ]
+ ]
+ ]
+ , Div ( "" , [] , [] ) [ Plain [ Str "But" ] ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "O"
+ , Space
+ , Str "O"
+ , Space
+ , Str "O"
+ , Space
+ , Str "O"
+ , Space
+ , Str "that"
+ , Space
+ , Str "Shakespeherian"
+ , Space
+ , Str "Rag\8213"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "It's"
+ , Space
+ , Str "so"
+ , Space
+ , Str "elegant"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "So"
+ , Space
+ , Str "intelligent"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "130" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"What"
+ , Space
+ , Str "shall"
+ , Space
+ , Str "I"
+ , Space
+ , Str "do"
+ , Space
+ , Str "now?"
+ , Space
+ , Str "What"
+ , Space
+ , Str "shall"
+ , Space
+ , Str "I"
+ , Space
+ , Str "do?\""
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "shall"
+ , Space
+ , Str "rush"
+ , Space
+ , Str "out"
+ , Space
+ , Str "as"
+ , Space
+ , Str "I"
+ , Space
+ , Str "am,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "walk"
+ , Space
+ , Str "the"
+ , Space
+ , Str "street"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"With"
+ , Space
+ , Str "my"
+ , Space
+ , Str "hair"
+ , Space
+ , Str "down,"
+ , Space
+ , Str "so."
+ , Space
+ , Str "What"
+ , Space
+ , Str "shall"
+ , Space
+ , Str "we"
+ , Space
+ , Str "do"
+ , Space
+ , Str "to-morrow?"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "\"What"
+ , Space
+ , Str "shall"
+ , Space
+ , Str "we"
+ , Space
+ , Str "ever"
+ , Space
+ , Str "do?\""
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "hot"
+ , Space
+ , Str "water"
+ , Space
+ , Str "at"
+ , Space
+ , Str "ten."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "if"
+ , Space
+ , Str "it"
+ , Space
+ , Str "rains,"
+ , Space
+ , Str "a"
+ , Space
+ , Str "closed"
+ , Space
+ , Str "car"
+ , Space
+ , Str "at"
+ , Space
+ , Str "four."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "we"
+ , Space
+ , Str "shall"
+ , Space
+ , Str "play"
+ , Space
+ , Str "a"
+ , Space
+ , Str "game"
+ , Space
+ , Str "of"
+ , Space
+ , Str "chess,"
+ ]
+ ]
+ , Div
+ ( "wasteland-content.xhtml#ln138" , [] , [] )
+ [ Plain
+ [ Str "Pressing"
+ , Space
+ , Str "lidless"
+ , Space
+ , Str "eyes"
+ , Space
+ , Str "and"
+ , Space
+ , Str "waiting"
+ , Space
+ , Str "for"
+ , Space
+ , Str "a"
+ , Space
+ , Str "knock"
+ , Space
+ , Str "upon"
+ , Space
+ , Str "the"
+ , Space
+ , Str "door."
+ , Note
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "138." ]
+ ( "#wasteland-content.xhtml#ln138"
+ , ""
+ )
+ , Space
+ , Str "Cf."
+ , Space
+ , Str "the"
+ , Space
+ , Str "game"
+ , Space
+ , Str "of"
+ , Space
+ , Str "chess"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Middleton's"
+ , Space
+ , Str "Women"
+ , Space
+ , Str "beware"
+ , Space
+ , Str "Women."
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Div
+ ( "" , [ "linegroup" ] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "When"
+ , Space
+ , Str "Lil's"
+ , Space
+ , Str "husband"
+ , Space
+ , Str "got"
+ , Space
+ , Str "demobbed,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "said"
+ , Space
+ , Str "-"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "didn't"
+ , Space
+ , Str "mince"
+ , Space
+ , Str "my"
+ , Space
+ , Str "words,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "said"
+ , Space
+ , Str "to"
+ , Space
+ , Str "her"
+ , Space
+ , Str "myself,"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "140" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "HURRY"
+ , Space
+ , Str "UP"
+ , Space
+ , Str "PLEASE"
+ , Space
+ , Str "ITS"
+ , Space
+ , Str "TIME"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Now"
+ , Space
+ , Str "Albert's"
+ , Space
+ , Str "coming"
+ , Space
+ , Str "back,"
+ , Space
+ , Str "make"
+ , Space
+ , Str "yourself"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bit"
+ , Space
+ , Str "smart."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "He'll"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "know"
+ , Space
+ , Str "what"
+ , Space
+ , Str "you"
+ , Space
+ , Str "done"
+ , Space
+ , Str "with"
+ , Space
+ , Str "that"
+ , Space
+ , Str "money"
+ , Space
+ , Str "he"
+ , Space
+ , Str "gave"
+ , SoftBreak
+ , Str "you"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "To"
+ , Space
+ , Str "get"
+ , Space
+ , Str "yourself"
+ , Space
+ , Str "some"
+ , Space
+ , Str "teeth."
+ , Space
+ , Str "He"
+ , Space
+ , Str "did,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "was"
+ , Space
+ , Str "there."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "You"
+ , Space
+ , Str "have"
+ , Space
+ , Str "them"
+ , Space
+ , Str "all"
+ , Space
+ , Str "out,"
+ , Space
+ , Str "Lil,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "get"
+ , Space
+ , Str "a"
+ , Space
+ , Str "nice"
+ , Space
+ , Str "set,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "He"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "swear,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "can't"
+ , Space
+ , Str "bear"
+ , Space
+ , Str "to"
+ , Space
+ , Str "look"
+ , Space
+ , Str "at"
+ , Space
+ , Str "you."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "no"
+ , Space
+ , Str "more"
+ , Space
+ , Str "can't"
+ , Space
+ , Str "I,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "think"
+ , Space
+ , Str "of"
+ , Space
+ , Str "poor"
+ , Space
+ , Str "Albert,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "He's"
+ , Space
+ , Str "been"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "army"
+ , Space
+ , Str "four"
+ , Space
+ , Str "years,"
+ , Space
+ , Str "he"
+ , Space
+ , Str "wants"
+ , Space
+ , Str "a"
+ , Space
+ , Str "good"
+ , Space
+ , Str "time,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "if"
+ , Space
+ , Str "you"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "give"
+ , Space
+ , Str "it"
+ , Space
+ , Str "him,"
+ , Space
+ , Str "there's"
+ , Space
+ , Str "others"
+ , Space
+ , Str "will,"
+ , Space
+ , Str "I"
+ , SoftBreak
+ , Str "said."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Oh"
+ , Space
+ , Str "is"
+ , Space
+ , Str "there,"
+ , Space
+ , Str "she"
+ , Space
+ , Str "said."
+ , Space
+ , Str "Something"
+ , Space
+ , Str "o'"
+ , Space
+ , Str "that,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "said."
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "150" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Then"
+ , Space
+ , Str "I'll"
+ , Space
+ , Str "know"
+ , Space
+ , Str "who"
+ , Space
+ , Str "to"
+ , Space
+ , Str "thank,"
+ , Space
+ , Str "she"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "give"
+ , Space
+ , Str "me"
+ , Space
+ , Str "a"
+ , Space
+ , Str "straight"
+ , SoftBreak
+ , Str "look."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "HURRY"
+ , Space
+ , Str "UP"
+ , Space
+ , Str "PLEASE"
+ , Space
+ , Str "ITS"
+ , Space
+ , Str "TIME"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "like"
+ , Space
+ , Str "it"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "get"
+ , Space
+ , Str "on"
+ , Space
+ , Str "with"
+ , Space
+ , Str "it,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "said."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Others"
+ , Space
+ , Str "can"
+ , Space
+ , Str "pick"
+ , Space
+ , Str "and"
+ , Space
+ , Str "choose"
+ , Space
+ , Str "if"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can't."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "But"
+ , Space
+ , Str "if"
+ , Space
+ , Str "Albert"
+ , Space
+ , Str "makes"
+ , Space
+ , Str "off,"
+ , Space
+ , Str "it"
+ , Space
+ , Str "won't"
+ , Space
+ , Str "be"
+ , Space
+ , Str "for"
+ , Space
+ , Str "lack"
+ , Space
+ , Str "of"
+ , SoftBreak
+ , Str "telling."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "You"
+ , Space
+ , Str "ought"
+ , Space
+ , Str "to"
+ , Space
+ , Str "be"
+ , Space
+ , Str "ashamed,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "to"
+ , Space
+ , Str "look"
+ , Space
+ , Str "so"
+ , Space
+ , Str "antique."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "(And"
+ , Space
+ , Str "her"
+ , Space
+ , Str "only"
+ , Space
+ , Str "thirty-one.)"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "I"
+ , Space
+ , Str "can't"
+ , Space
+ , Str "help"
+ , Space
+ , Str "it,"
+ , Space
+ , Str "she"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "pulling"
+ , Space
+ , Str "a"
+ , Space
+ , Str "long"
+ , Space
+ , Str "face,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "It's"
+ , Space
+ , Str "them"
+ , Space
+ , Str "pills"
+ , Space
+ , Str "I"
+ , Space
+ , Str "took,"
+ , Space
+ , Str "to"
+ , Space
+ , Str "bring"
+ , Space
+ , Str "it"
+ , Space
+ , Str "off,"
+ , Space
+ , Str "she"
+ , Space
+ , Str "said."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "(She's"
+ , Space
+ , Str "had"
+ , Space
+ , Str "five"
+ , Space
+ , Str "already,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nearly"
+ , Space
+ , Str "died"
+ , Space
+ , Str "of"
+ , Space
+ , Str "young"
+ , Space
+ , Str "George.)"
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "160" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "The"
+ , Space
+ , Str "chemist"
+ , Space
+ , Str "said"
+ , Space
+ , Str "it"
+ , Space
+ , Str "would"
+ , Space
+ , Str "be"
+ , Space
+ , Str "all"
+ , Space
+ , Str "right,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "I've"
+ , Space
+ , Str "never"
+ , Space
+ , Str "been"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "same."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "You"
+ , Space
+ , Emph [ Str "are" ]
+ , Space
+ , Str "a"
+ , Space
+ , Str "proper"
+ , Space
+ , Str "fool,"
+ , Space
+ , Str "I"
+ , Space
+ , Str "said."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Well,"
+ , Space
+ , Str "if"
+ , Space
+ , Str "Albert"
+ , Space
+ , Str "won't"
+ , Space
+ , Str "leave"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alone,"
+ , Space
+ , Str "there"
+ , Space
+ , Str "it"
+ , Space
+ , Str "is,"
+ , Space
+ , Str "I"
+ , SoftBreak
+ , Str "said,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "What"
+ , Space
+ , Str "you"
+ , Space
+ , Str "get"
+ , Space
+ , Str "married"
+ , Space
+ , Str "for"
+ , Space
+ , Str "if"
+ , Space
+ , Str "you"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "want"
+ , Space
+ , Str "children?"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "HURRY"
+ , Space
+ , Str "UP"
+ , Space
+ , Str "PLEASE"
+ , Space
+ , Str "ITS"
+ , Space
+ , Str "TIME"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Well,"
+ , Space
+ , Str "that"
+ , Space
+ , Str "Sunday"
+ , Space
+ , Str "Albert"
+ , Space
+ , Str "was"
+ , Space
+ , Str "home,"
+ , Space
+ , Str "they"
+ , Space
+ , Str "had"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hot"
+ , SoftBreak
+ , Str "gammon,"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "And"
+ , Space
+ , Str "they"
+ , Space
+ , Str "asked"
+ , Space
+ , Str "me"
+ , Space
+ , Str "in"
+ , Space
+ , Str "to"
+ , Space
+ , Str "dinner,"
+ , Space
+ , Str "to"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "beauty"
+ , Space
+ , Str "of"
+ , Space
+ , Str "it"
+ , SoftBreak
+ , Str "hot\8213"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "HURRY"
+ , Space
+ , Str "UP"
+ , Space
+ , Str "PLEASE"
+ , Space
+ , Str "ITS"
+ , Space
+ , Str "TIME"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "HURRY"
+ , Space
+ , Str "UP"
+ , Space
+ , Str "PLEASE"
+ , Space
+ , Str "ITS"
+ , Space
+ , Str "TIME"
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Goonight"
+ , Space
+ , Str "Bill."
+ , Space
+ , Str "Goonight"
+ , Space
+ , Str "Lou."
+ , Space
+ , Str "Goonight"
+ , Space
+ , Str "May."
+ , Space
+ , Str "Goonight."
+ , Span ( "" , [ "lnum" ] , [] ) [ Str "170" ]
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Ta"
+ , Space
+ , Str "ta."
+ , Space
+ , Str "Goonight."
+ , Space
+ , Str "Goonight."
+ ]
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Plain
+ [ Str "Good"
+ , Space
+ , Str "night,"
+ , Space
+ , Str "ladies,"
+ , Space
+ , Str "good"
+ , Space
+ , Str "night,"
+ , Space
+ , Str "sweet"
+ , Space
+ , Str "ladies,"
+ , Space
+ , Str "good"
+ , Space
+ , Str "night,"
+ , Space
+ , Str "good"
+ , SoftBreak
+ , Str "night."
+ ]
+ ]
+ ]
+ ]
+ ]
+, Div
+ ( "wasteland-content.xhtml#backmatter"
+ , [ "section" , "backmatter" ]
+ , []
+ )
+ [ Div
+ ( "wasteland-content.xhtml#rearnotes"
+ , [ "section" , "rearnotes" ]
+ , []
+ )
+ [ Header
+ 2
+ ( "" , [] , [] )
+ [ Str "NOTES"
+ , Space
+ , Str "ON"
+ , Space
+ , Str "\"THE"
+ , Space
+ , Str "WASTE"
+ , Space
+ , Str "LAND\""
+ ]
+ , Para
+ [ Str "Not"
+ , Space
+ , Str "only"
+ , Space
+ , Str "the"
+ , Space
+ , Str "title,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "the"
+ , Space
+ , Str "plan"
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Str "good"
+ , Space
+ , Str "deal"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "incidental"
+ , Space
+ , Str "symbolism"
+ , Space
+ , Str "of"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "poem"
+ , Space
+ , Str "were"
+ , Space
+ , Str "suggested"
+ , Space
+ , Str "by"
+ , Space
+ , Str "Miss"
+ , Space
+ , Str "Jessie"
+ , Space
+ , Str "L."
+ , Space
+ , Str "Weston's"
+ , Space
+ , Str "book"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Grail"
+ , Space
+ , Str "legend:"
+ , SoftBreak
+ , Str "From"
+ , Space
+ , Str "Ritual"
+ , Space
+ , Str "to"
+ , Space
+ , Str "Romance"
+ ]
+ , Para
+ [ Str "Indeed,"
+ , Space
+ , Str "so"
+ , Space
+ , Str "deeply"
+ , Space
+ , Str "am"
+ , Space
+ , Str "I"
+ , Space
+ , Str "indebted,"
+ , Space
+ , Str "Miss"
+ , Space
+ , Str "Weston's"
+ , Space
+ , Str "book"
+ , Space
+ , Str "will"
+ , Space
+ , Str "elucidate"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "difficulties"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "poem"
+ , Space
+ , Str "much"
+ , Space
+ , Str "better"
+ , Space
+ , Str "than"
+ , Space
+ , Str "my"
+ , Space
+ , Str "notes"
+ , Space
+ , Str "can"
+ , Space
+ , Str "do;"
+ , Space
+ , Str "and"
+ , Space
+ , Str "I"
+ , Space
+ , Str "recommend"
+ , Space
+ , Str "it"
+ , SoftBreak
+ , Str "(apart"
+ , Space
+ , Str "from"
+ , Space
+ , Str "the"
+ , Space
+ , Str "great"
+ , Space
+ , Str "interest"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "book"
+ , Space
+ , Str "itself)"
+ , Space
+ , Str "to"
+ , Space
+ , Str "any"
+ , Space
+ , Str "who"
+ , Space
+ , Str "think"
+ , Space
+ , Str "such"
+ , SoftBreak
+ , Str "elucidation"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "poem"
+ , Space
+ , Str "worth"
+ , Space
+ , Str "the"
+ , Space
+ , Str "trouble."
+ , Space
+ , Str "To"
+ , Space
+ , Str "another"
+ , Space
+ , Str "work"
+ , Space
+ , Str "of"
+ , Space
+ , Str "anthropology"
+ , Space
+ , Str "I"
+ , Space
+ , Str "am"
+ , SoftBreak
+ , Str "indebted"
+ , Space
+ , Str "in"
+ , Space
+ , Str "general,"
+ , Space
+ , Str "one"
+ , Space
+ , Str "which"
+ , Space
+ , Str "has"
+ , Space
+ , Str "influenced"
+ , Space
+ , Str "our"
+ , Space
+ , Str "generation"
+ , Space
+ , Str "profoundly;"
+ , Space
+ , Str "I"
+ , Space
+ , Str "mean"
+ , SoftBreak
+ , Str "The"
+ , Space
+ , Str "Golden"
+ , Space
+ , Str "Bough;"
+ , Space
+ , Str "I"
+ , Space
+ , Str "have"
+ , Space
+ , Str "used"
+ , Space
+ , Str "especially"
+ , Space
+ , Str "the"
+ , Space
+ , Str "two"
+ , Space
+ , Str "volumes"
+ , Space
+ , Str "Adonis,"
+ , Space
+ , Str "Attis,"
+ , Space
+ , Str "Osiris."
+ , SoftBreak
+ , Str "Anyone"
+ , Space
+ , Str "who"
+ , Space
+ , Str "is"
+ , Space
+ , Str "acquainted"
+ , Space
+ , Str "with"
+ , Space
+ , Str "these"
+ , Space
+ , Str "works"
+ , Space
+ , Str "will"
+ , Space
+ , Str "immediately"
+ , Space
+ , Str "recognise"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "poem"
+ , SoftBreak
+ , Str "certain"
+ , Space
+ , Str "references"
+ , Space
+ , Str "to"
+ , Space
+ , Str "vegetation"
+ , Space
+ , Str "ceremonies."
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "I."
+ , Space
+ , Str "THE"
+ , Space
+ , Str "BURIAL"
+ , Space
+ , Str "OF"
+ , Space
+ , Str "THE"
+ , Space
+ , Str "DEAD"
+ ]
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "II."
+ , Space
+ , Str "A"
+ , Space
+ , Str "GAME"
+ , Space
+ , Str "OF"
+ , Space
+ , Str "CHESS"
+ ]
+ ]
+ ]
+ ]
+]
diff --git a/test/fb2/reader/emphasis.native b/test/fb2/reader/emphasis.native
index 422e7bb15..a3f4cdeb6 100644
--- a/test/fb2/reader/emphasis.native
+++ b/test/fb2/reader/emphasis.native
@@ -1,6 +1,35 @@
-Pandoc (Meta {unMeta = fromList []})
-[Div ("",["section"],[])
- [Para [Str "Plain,",Space,Strong [Str "strong"],Str ",",Space,Emph [Str "emphasis"],Str ",",Space,Strong [Emph [Str "strong",Space,Str "emphasis"]],Str ",",Space,Emph [Strong [Str "emphasized",Space,Str "strong"]],Str "."]
- ,Para [Str "Strikethrough:",Space,Strikeout [Str "deleted"]]
- ,Para [Subscript [Str "Subscript"],Space,Str "and",Space,Superscript [Str "superscript"]]
- ,Para [Str "Some",Space,Code ("",[],[]) "code"]]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Div
+ ( "" , [ "section" ] , [] )
+ [ Para
+ [ Str "Plain,"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Emph [ Str "emphasis" ]
+ , Str ","
+ , Space
+ , Strong [ Emph [ Str "strong" , Space , Str "emphasis" ] ]
+ , Str ","
+ , Space
+ , Emph
+ [ Strong [ Str "emphasized" , Space , Str "strong" ] ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Strikethrough:"
+ , Space
+ , Strikeout [ Str "deleted" ]
+ ]
+ , Para
+ [ Subscript [ Str "Subscript" ]
+ , Space
+ , Str "and"
+ , Space
+ , Superscript [ Str "superscript" ]
+ ]
+ , Para [ Str "Some" , Space , Code ( "" , [] , [] ) "code" ]
+ ]
+ ]
diff --git a/test/fb2/reader/epigraph.native b/test/fb2/reader/epigraph.native
index a58a3e05b..eb11c1d79 100644
--- a/test/fb2/reader/epigraph.native
+++ b/test/fb2/reader/epigraph.native
@@ -1,9 +1,18 @@
-Pandoc (Meta {unMeta = fromList []})
-[Div ("",["epigraph"],[])
- [Para [Str "Body",Space,Str "epigraph"]]
-,Div ("",["section"],[])
- [Div ("",["epigraph"],[])
- [Para [Str "Section",Space,Str "epigraph"]]
- ,Div ("",["section"],[])
- [Div ("",["epigraph"],[])
- [Para [Str "Subsection",Space,Str "epigraph"]]]]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Div
+ ( "" , [ "epigraph" ] , [] )
+ [ Para [ Str "Body" , Space , Str "epigraph" ] ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Div
+ ( "" , [ "epigraph" ] , [] )
+ [ Para [ Str "Section" , Space , Str "epigraph" ] ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Div
+ ( "" , [ "epigraph" ] , [] )
+ [ Para [ Str "Subsection" , Space , Str "epigraph" ] ]
+ ]
+ ]
+ ]
diff --git a/test/fb2/reader/meta.native b/test/fb2/reader/meta.native
index 71a8795b6..851250296 100644
--- a/test/fb2/reader/meta.native
+++ b/test/fb2/reader/meta.native
@@ -1,2 +1,48 @@
-Pandoc (Meta {unMeta = fromList [("abstract",MetaBlocks [Para [Str "Book",Space,Str "annotation"],Para [Str "Second",Space,Str "paragraph",Space,Str "of",Space,Str "book",Space,Str "annotation"]]),("author",MetaList [MetaInlines [Str "First",Space,Str "Middle",Space,Str "Last"],MetaInlines [Str "Another",Space,Str "Author"]]),("date",MetaInlines [Str "2018"]),("keywords",MetaList [MetaString "foo",MetaString "bar",MetaString "baz"]),("title",MetaInlines [Str "Book",Space,Str "title"])]})
-[Header 1 ("",[],[]) [Str "Body",Space,Str "title"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "abstract"
+ , MetaBlocks
+ [ Para [ Str "Book" , Space , Str "annotation" ]
+ , Para
+ [ Str "Second"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "of"
+ , Space
+ , Str "book"
+ , Space
+ , Str "annotation"
+ ]
+ ]
+ )
+ , ( "author"
+ , MetaList
+ [ MetaInlines
+ [ Str "First"
+ , Space
+ , Str "Middle"
+ , Space
+ , Str "Last"
+ ]
+ , MetaInlines [ Str "Another" , Space , Str "Author" ]
+ ]
+ )
+ , ( "date" , MetaInlines [ Str "2018" ] )
+ , ( "keywords"
+ , MetaList
+ [ MetaString "foo"
+ , MetaString "bar"
+ , MetaString "baz"
+ ]
+ )
+ , ( "title"
+ , MetaInlines [ Str "Book" , Space , Str "title" ]
+ )
+ ]
+ }
+ [ Header
+ 1 ( "" , [] , [] ) [ Str "Body" , Space , Str "title" ]
+ ]
diff --git a/test/fb2/reader/notes.native b/test/fb2/reader/notes.native
index f229209cd..56fa3873f 100644
--- a/test/fb2/reader/notes.native
+++ b/test/fb2/reader/notes.native
@@ -1,4 +1,28 @@
-Pandoc (Meta {unMeta = fromList []})
-[Div ("",["section"],[])
- [Para [Str "Note",Space,Note [Para [Str "Note",Space,Str "contents"]],Str "."]
- ,Para [Str "Second",Space,Str "note",Space,Note [Para [Str "Second",Space,Str "note",Space,Str "contents."]],Str "."]]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Div
+ ( "" , [ "section" ] , [] )
+ [ Para
+ [ Str "Note"
+ , Space
+ , Note [ Para [ Str "Note" , Space , Str "contents" ] ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Second"
+ , Space
+ , Str "note"
+ , Space
+ , Note
+ [ Para
+ [ Str "Second"
+ , Space
+ , Str "note"
+ , Space
+ , Str "contents."
+ ]
+ ]
+ , Str "."
+ ]
+ ]
+ ]
diff --git a/test/fb2/reader/poem.native b/test/fb2/reader/poem.native
index 67be6a672..2b45347e8 100644
--- a/test/fb2/reader/poem.native
+++ b/test/fb2/reader/poem.native
@@ -1,14 +1,25 @@
-Pandoc (Meta {unMeta = fromList []})
-[Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "Poem",Space,Str "title"]
- ,Div ("",["epigraph"],[])
- [Para [Str "Poem",Space,Str "epigraph"]]
- ,Header 2 ("",["unnumbered"],[]) [Str "Subtitle"]
- ,Header 2 ("",[],[]) [Str "First",Space,Str "stanza",Space,Str "title"]
- ,LineBlock
- [[Str "Verse"]
- ,[Emph [Str "More"],Space,Str "verse"]]
- ,LineBlock
- [[Str "One",Space,Str "more",Space,Str "stanza"]]
- ,Para [Str "Author"]
- ,Para [Str "April",Space,Str "2018"]]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 2 ( "" , [] , [] ) [ Str "Poem" , Space , Str "title" ]
+ , Div
+ ( "" , [ "epigraph" ] , [] )
+ [ Para [ Str "Poem" , Space , Str "epigraph" ] ]
+ , Header 2 ( "" , [ "unnumbered" ] , [] ) [ Str "Subtitle" ]
+ , Header
+ 2
+ ( "" , [] , [] )
+ [ Str "First" , Space , Str "stanza" , Space , Str "title" ]
+ , LineBlock
+ [ [ Str "Verse" ]
+ , [ Emph [ Str "More" ] , Space , Str "verse" ]
+ ]
+ , LineBlock
+ [ [ Str "One" , Space , Str "more" , Space , Str "stanza" ]
+ ]
+ , Para [ Str "Author" ]
+ , Para [ Str "April" , Space , Str "2018" ]
+ ]
+ ]
diff --git a/test/fb2/reader/titles.native b/test/fb2/reader/titles.native
index a6c34f5ea..74669d848 100644
--- a/test/fb2/reader/titles.native
+++ b/test/fb2/reader/titles.native
@@ -1,8 +1,38 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("",[],[]) [Str "Body",Space,Str "title"]
-,Div ("",["section"],[])
- [Header 2 ("",[],[]) [Str "Section",Space,Str "title"]
- ,Div ("",["section"],[])
- [Header 3 ("",[],[]) [Str "Subsection",Space,Str "title",LineBreak,Str "with",Space,Str "multiple",Space,Str "paragraphs"]]
- ,Div ("",["section"],[])
- [Header 3 ("",[],[]) [Str "Another",Space,Str "subsection",Space,Str "title"]]]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header
+ 1 ( "" , [] , [] ) [ Str "Body" , Space , Str "title" ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 2 ( "" , [] , [] ) [ Str "Section" , Space , Str "title" ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Subsection"
+ , Space
+ , Str "title"
+ , LineBreak
+ , Str "with"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "paragraphs"
+ ]
+ ]
+ , Div
+ ( "" , [ "section" ] , [] )
+ [ Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Another"
+ , Space
+ , Str "subsection"
+ , Space
+ , Str "title"
+ ]
+ ]
+ ]
+ ]
diff --git a/test/haddock-reader.native b/test/haddock-reader.native
index 7e36b2f72..619a52fea 100644
--- a/test/haddock-reader.native
+++ b/test/haddock-reader.native
@@ -1,31 +1,401 @@
-Pandoc (Meta {unMeta = fromList []})
-[Para [Str "This",Space,Str "file",Space,Str "tests",Space,Str "the",Space,Str "Pandoc",Space,Str "reader",Space,Str "for",Space,Str "Haddock.",SoftBreak,Str "We've",Space,Str "borrowed",Space,Str "examples",Space,Str "from",Space,Str "Haddock's",Space,Str "documentation:",Space,Link ("",[],[]) [Str "http://www.haskell.org/haddock/doc/html/ch03s08.html"] ("http://www.haskell.org/haddock/doc/html/ch03s08.html","http://www.haskell.org/haddock/doc/html/ch03s08.html"),Str "."]
-,Para [Str "The",Space,Str "following",Space,Str "characters",Space,Str "have",Space,Str "special",Space,Str "meanings",Space,Str "in",Space,Str "Haddock,",Space,Str "/,",Space,Str "',",Space,Str "`,",Space,Str "\",",Space,Str "@,",Space,Str "<,",Space,Str "so",Space,Str "they",Space,Str "must",Space,Str "be",Space,Str "escaped."]
-,Para [Str "*",Space,Str "This",Space,Str "is",Space,Str "a",Space,Str "paragraph,",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str ">",Space,Str "This",Space,Str "sentence",Space,Str "is",Space,Str "not",Space,Str "code.",SoftBreak,Str ">>>",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "an",Space,Str "example."]
-,Para [Str "The",Space,Str "references",Space,Str "\955,",Space,Str "\955",Space,Str "and",Space,Str "\955",Space,Str "all",Space,Str "represent",Space,Str "the",Space,Str "lower-case",Space,Str "letter",Space,Str "lambda."]
-,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "code",Space,Str "block:"]
-,CodeBlock ("",[],[]) "map :: (a -> b) -> [a] -> [b]\nmap _ [] = []\nmap f (x:xs) = f x : map f xs"
-,Para [Str "This",Space,Str "is",Space,Str "another",Space,Str "code",Space,Str "block:"]
-,Para [Code ("",[],[]) "f x = x + x.",LineBreak,Code ("",[],[]) "The @...@ code block ",Emph [Code ("",[],[]) "interprets markup normally"],Code ("",[],[]) ".",Code ("",["haskell","module"],[]) "Module.Foo",Code ("",[],[]) "",LineBreak,Code ("",[],[]) "\"Hello World\""]
-,Para [Str "Haddock",Space,Str "supports",Space,Str "REPL",Space,Str "examples:"]
-,Para [Code ("",["prompt"],[]) ">>>",Space,Code ("",["haskell","expr"],[]) "fib 10",LineBreak,Code ("",["result"],[]) "55"]
-,Para [Code ("",["prompt"],[]) ">>>",Space,Code ("",["haskell","expr"],[]) "putStrLn \"foo\\nbar\"",LineBreak,Code ("",["result"],[]) "foo",LineBreak,Code ("",["result"],[]) "bar"]
-,Para [Str "That",Space,Str "was",Space,Emph [Str "really",Space,Str "cool"],Str "!",SoftBreak,Str "I",Space,Str "had",Space,Str "no",Space,Str "idea",Space,Code ("",[],[]) "fib 10 = 55",Str "."]
-,Para [Str "This",Space,Str "module",Space,Str "defines",Space,Str "the",Space,Str "type",Space,Code ("",["haskell","identifier"],[]) "T",Str ".",SoftBreak,Str "The",Space,Str "identifier",Space,Code ("",["haskell","identifier"],[]) "M.T",Space,Str "is",Space,Str "not",Space,Str "in",Space,Str "scope",SoftBreak,Str "I",Space,Str "don't",Space,Str "have",Space,Str "to",Space,Str "escape",Space,Str "my",Space,Str "apostrophes;",Space,Str "great,",Space,Str "isn't",Space,Str "it?",SoftBreak,Str "This",Space,Str "is",Space,Str "a",Space,Str "reference",Space,Str "to",Space,Str "the",Space,Code ("",["haskell","module"],[]) "Foo",Space,Str "module."]
-,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "bulleted",Space,Str "list:"]
-,BulletList
- [[Para [Str "first",Space,Str "item"]]
- ,[Para [Str "second",Space,Str "item"]]]
-,Para [Str "This",Space,Str "is",Space,Str "an",Space,Str "enumerated",Space,Str "list:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "first",Space,Str "item"]]
- ,[Para [Str "second",Space,Str "item"]]]
-,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "definition",Space,Str "list:"]
-,DefinitionList
- [([Code ("",[],[]) "foo"],
- [[Para [Str "The",Space,Str "description",Space,Str "of",Space,Code ("",[],[]) "foo",Str "."]]])
- ,([Code ("",[],[]) "bar"],
- [[Para [Str "The",Space,Str "description",Space,Str "of",Space,Code ("",[],[]) "bar",Str "."]]])]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "link:",Space,Link ("",[],[]) [Str "http://haskell.org"] ("http://haskell.org","http://haskell.org")]
-,Para [Link ("",[],[]) [Str "Haskell"] ("http://haskell.org","http://haskell.org"),Space,Str "is",Space,Str "a",Space,Str "fun",Space,Str "language!"]
-,Para [Link ("",[],[]) [Str "Click",Space,Str "Here!"] ("http://example.com","http://example.com")]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "file"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Pandoc"
+ , Space
+ , Str "reader"
+ , Space
+ , Str "for"
+ , Space
+ , Str "Haddock."
+ , SoftBreak
+ , Str "We've"
+ , Space
+ , Str "borrowed"
+ , Space
+ , Str "examples"
+ , Space
+ , Str "from"
+ , Space
+ , Str "Haddock's"
+ , Space
+ , Str "documentation:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.haskell.org/haddock/doc/html/ch03s08.html"
+ ]
+ ( "http://www.haskell.org/haddock/doc/html/ch03s08.html"
+ , "http://www.haskell.org/haddock/doc/html/ch03s08.html"
+ )
+ , Str "."
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "following"
+ , Space
+ , Str "characters"
+ , Space
+ , Str "have"
+ , Space
+ , Str "special"
+ , Space
+ , Str "meanings"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Haddock,"
+ , Space
+ , Str "/,"
+ , Space
+ , Str "',"
+ , Space
+ , Str "`,"
+ , Space
+ , Str "\","
+ , Space
+ , Str "@,"
+ , Space
+ , Str "<,"
+ , Space
+ , Str "so"
+ , Space
+ , Str "they"
+ , Space
+ , Str "must"
+ , Space
+ , Str "be"
+ , Space
+ , Str "escaped."
+ ]
+ , Para
+ [ Str "*"
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph,"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ , SoftBreak
+ , Str ">"
+ , Space
+ , Str "This"
+ , Space
+ , Str "sentence"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "code."
+ , SoftBreak
+ , Str ">>>"
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example."
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "references"
+ , Space
+ , Str "\955,"
+ , Space
+ , Str "\955"
+ , Space
+ , Str "and"
+ , Space
+ , Str "\955"
+ , Space
+ , Str "all"
+ , Space
+ , Str "represent"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lower-case"
+ , Space
+ , Str "letter"
+ , Space
+ , Str "lambda."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "code"
+ , Space
+ , Str "block:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "map :: (a -> b) -> [a] -> [b]\nmap _ [] = []\nmap f (x:xs) = f x : map f xs"
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "code"
+ , Space
+ , Str "block:"
+ ]
+ , Para
+ [ Code ( "" , [] , [] ) "f x = x + x."
+ , LineBreak
+ , Code ( "" , [] , [] ) "The @...@ code block "
+ , Emph
+ [ Code ( "" , [] , [] ) "interprets markup normally" ]
+ , Code ( "" , [] , [] ) "."
+ , Code ( "" , [ "haskell" , "module" ] , [] ) "Module.Foo"
+ , Code ( "" , [] , [] ) ""
+ , LineBreak
+ , Code ( "" , [] , [] ) "\"Hello World\""
+ ]
+ , Para
+ [ Str "Haddock"
+ , Space
+ , Str "supports"
+ , Space
+ , Str "REPL"
+ , Space
+ , Str "examples:"
+ ]
+ , Para
+ [ Code ( "" , [ "prompt" ] , [] ) ">>>"
+ , Space
+ , Code ( "" , [ "haskell" , "expr" ] , [] ) "fib 10"
+ , LineBreak
+ , Code ( "" , [ "result" ] , [] ) "55"
+ ]
+ , Para
+ [ Code ( "" , [ "prompt" ] , [] ) ">>>"
+ , Space
+ , Code
+ ( "" , [ "haskell" , "expr" ] , [] )
+ "putStrLn \"foo\\nbar\""
+ , LineBreak
+ , Code ( "" , [ "result" ] , [] ) "foo"
+ , LineBreak
+ , Code ( "" , [ "result" ] , [] ) "bar"
+ ]
+ , Para
+ [ Str "That"
+ , Space
+ , Str "was"
+ , Space
+ , Emph [ Str "really" , Space , Str "cool" ]
+ , Str "!"
+ , SoftBreak
+ , Str "I"
+ , Space
+ , Str "had"
+ , Space
+ , Str "no"
+ , Space
+ , Str "idea"
+ , Space
+ , Code ( "" , [] , [] ) "fib 10 = 55"
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "module"
+ , Space
+ , Str "defines"
+ , Space
+ , Str "the"
+ , Space
+ , Str "type"
+ , Space
+ , Code ( "" , [ "haskell" , "identifier" ] , [] ) "T"
+ , Str "."
+ , SoftBreak
+ , Str "The"
+ , Space
+ , Str "identifier"
+ , Space
+ , Code ( "" , [ "haskell" , "identifier" ] , [] ) "M.T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "in"
+ , Space
+ , Str "scope"
+ , SoftBreak
+ , Str "I"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "have"
+ , Space
+ , Str "to"
+ , Space
+ , Str "escape"
+ , Space
+ , Str "my"
+ , Space
+ , Str "apostrophes;"
+ , Space
+ , Str "great,"
+ , Space
+ , Str "isn't"
+ , Space
+ , Str "it?"
+ , SoftBreak
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "reference"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , Space
+ , Code ( "" , [ "haskell" , "module" ] , [] ) "Foo"
+ , Space
+ , Str "module."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bulleted"
+ , Space
+ , Str "list:"
+ ]
+ , BulletList
+ [ [ Para [ Str "first" , Space , Str "item" ] ]
+ , [ Para [ Str "second" , Space , Str "item" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "enumerated"
+ , Space
+ , Str "list:"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "first" , Space , Str "item" ] ]
+ , [ Para [ Str "second" , Space , Str "item" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "definition"
+ , Space
+ , Str "list:"
+ ]
+ , DefinitionList
+ [ ( [ Code ( "" , [] , [] ) "foo" ]
+ , [ [ Para
+ [ Str "The"
+ , Space
+ , Str "description"
+ , Space
+ , Str "of"
+ , Space
+ , Code ( "" , [] , [] ) "foo"
+ , Str "."
+ ]
+ ]
+ ]
+ )
+ , ( [ Code ( "" , [] , [] ) "bar" ]
+ , [ [ Para
+ [ Str "The"
+ , Space
+ , Str "description"
+ , Space
+ , Str "of"
+ , Space
+ , Code ( "" , [] , [] ) "bar"
+ , Str "."
+ ]
+ ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://haskell.org" ]
+ ( "http://haskell.org" , "http://haskell.org" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Haskell" ]
+ ( "http://haskell.org" , "http://haskell.org" )
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "fun"
+ , Space
+ , Str "language!"
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Click" , Space , Str "Here!" ]
+ ( "http://example.com" , "http://example.com" )
+ ]
+ ]
diff --git a/test/html-reader.native b/test/html-reader.native
index 880561a93..dba1cb85f 100644
--- a/test/html-reader.native
+++ b/test/html-reader.native
@@ -1,837 +1,3284 @@
-Pandoc (Meta {unMeta = fromList [("generator",MetaInlines [Str "pandoc"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
-[Header 1 ("pandoc-test-suite",["title"],[]) [Str "Pandoc",Space,Str "Test",Space,Str "Suite"]
-,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,HorizontalRule
-,Header 1 ("headers",[],[]) [Str "Headers"]
-,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")]
-,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"]
-,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
-,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
-,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,HorizontalRule
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
-,Para [Str "Here's",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
-,HorizontalRule
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "E-mail",Space,Str "style:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,BlockQuote
- [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
- ,Para [Str "A",Space,Str "list:"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "item",Space,Str "one"]]
- ,[Plain [Str "item",Space,Str "two"]]]
- ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
- ,BlockQuote
- [Para [Str "nested"]]
- ,BlockQuote
- [Para [Str "nested"]]]
-,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."]
-,Para [Str "Box-style:"]
-,BlockQuote
- [Para [Str "Example:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"]
-,BlockQuote
- [OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "do",Space,Str "laundry"]]
- ,[Plain [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"]]]]
-,Para [Str "Here's",Space,Str "a",Space,Str "nested",Space,Str "one:"]
-,BlockQuote
- [Para [Str "Joe",Space,Str "said:"]
- ,BlockQuote
- [Para [Str "Don't",Space,Str "quote",Space,Str "me."]]]
-,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
-,HorizontalRule
-,Header 1 ("inline-quotes",[],[]) [Str "Inline",Space,Str "quotes"]
-,Para [Str "Normal",Space,Str "text",Space,Str "but",Space,Str "then",Space,Str "a",Space,Quoted DoubleQuote [Span ("",[],[("cite","https://www.imdb.com/title/tt0062622/quotes/qt0396921")]) [Str "inline",Space,Str "quote"]],Str "."]
-,Para [Quoted DoubleQuote [Str "Missing",Space,Str "a",Space,Str "cite",Space,Str "attribute",Space,Str "means",Space,Str "its",Space,Str "just",Space,Str "normal",Space,Str "text"]]
-,HorizontalRule
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,HorizontalRule
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "asterisk",Space,Str "1"]]
- ,[Plain [Str "asterisk",Space,Str "2"]]
- ,[Plain [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Asterisks",Space,Str "loose:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Plus",Space,Str "1"]]
- ,[Plain [Str "Plus",Space,Str "2"]]
- ,[Plain [Str "Plus",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Minus",Space,Str "1"]]
- ,[Plain [Str "Minus",Space,Str "2"]]
- ,[Plain [Str "Minus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,Para [Str "Tight:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second"]]
- ,[Plain [Str "Third"]]]
-,Para [Str "and:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "One"]]
- ,[Plain [Str "Two"]]
- ,[Plain [Str "Three"]]]
-,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and",Space,Str "using",Space,Str "spaces:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Multiple",Space,Str "paragraphs:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
- ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog's",Space,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Para [Str "List",Space,Str "styles:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- []
-,OrderedList (1,LowerRoman,DefaultDelim)
- []
-,OrderedList (1,LowerRoman,DefaultDelim)
- []
-,OrderedList (1,DefaultStyle,DefaultDelim)
- []
-,OrderedList (1,LowerRoman,DefaultDelim)
- []
-,OrderedList (1,LowerRoman,DefaultDelim)
- []
-,Header 2 ("nested",[],[]) [Str "Nested"]
-,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]]]]]]]
-,Para [Str "Here's",Space,Str "another:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second:"]
- ,BulletList
- [[Plain [Str "Fee"]]
- ,[Plain [Str "Fie"]]
- ,[Plain [Str "Foe"]]]]
- ,[Plain [Str "Third"]]]
-,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Plain [Str "Fee"]]
- ,[Plain [Str "Fie"]]
- ,[Plain [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
-,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]
- ,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]]
-,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
-,OrderedList (2,Decimal,DefaultDelim)
- [[Plain [Str "begins",Space,Str "with",Space,Str "2"]]
- ,[Para [Str "and",Space,Str "now",Space,Str "3"]
- ,Para [Str "with",Space,Str "a",Space,Str "continuation"]
- ,OrderedList (4,LowerRoman,DefaultDelim)
- [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]]
- ,[Plain [Str "more",Space,Str "items"]
- ,OrderedList (1,UpperAlpha,DefaultDelim)
- [[Plain [Str "a",Space,Str "subsublist"]]
- ,[Plain [Str "a",Space,Str "subsublist"]]]]]]]
-,Para [Str "Nesting:"]
-,OrderedList (1,UpperAlpha,DefaultDelim)
- [[Plain [Str "Upper",Space,Str "Alpha"]
- ,OrderedList (1,UpperRoman,DefaultDelim)
- [[Plain [Str "Upper",Space,Str "Roman."]
- ,OrderedList (6,Decimal,DefaultDelim)
- [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
- ,OrderedList (3,LowerAlpha,DefaultDelim)
- [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
-,Para [Str "Autonumbering:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Autonumber."]]
- ,[Plain [Str "More."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Nested."]]]]]
-,HorizontalRule
-,Header 2 ("definition",[],[]) [Str "Definition"]
-,DefinitionList
- [([Str "Violin"],
- [[Plain [Str "Stringed",Space,Str "musical",Space,Str "instrument."]]
- ,[Plain [Str "Torture",Space,Str "device."]]])
- ,([Str "Cello",LineBreak,Str "Violoncello"],
- [[Plain [Str "Low-voiced",Space,Str "stringed",Space,Str "instrument."]]])]
-,HorizontalRule
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
-,Para [Str "Empty",Space,Strong [],Space,Str "and",Space,Emph [],Str "."]
-,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
-,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "small",Space,Str "caps"],Str "."]
-,Para [Str "These",Space,Str "are",Space,Str "all",Space,Str "underlined:",Space,Underline [Str "foo"],Space,Str "and",Space,Underline [Str "bar"],Str "."]
-,Para [Str "These",Space,Str "are",Space,Str "all",Space,Str "strikethrough:",Space,Strikeout [Str "foo"],Str ",",Space,Strikeout [Str "bar"],Str ",",Space,Str "and",Space,Strikeout [Str "baz"],Str "."]
-,HorizontalRule
-,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
-,Para [Str "\"Hello,\"",Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Str "\"'Shelob'",Space,Str "is",Space,Str "my",Space,Str "name.\""]
-,Para [Str "'A',",Space,Str "'B',",Space,Str "and",Space,Str "'C'",Space,Str "are",Space,Str "letters."]
-,Para [Str "'Oak,'",Space,Str "'elm,'",Space,Str "and",Space,Str "'beech'",Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Str "'pine.'"]
-,Para [Str "'He",Space,Str "said,",Space,Str "\"I",Space,Str "want",Space,Str "to",Space,Str "go.\"'",Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70's?"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Str "'",Code ("",[],[]) "code",Str "'",Space,Str "and",Space,Str "a",Space,Str "\"",Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2",""),Str "\"."]
-,Para [Str "Some",Space,Str "dashes:",Space,Str "one---two",Space,Str "---",Space,Str "three--four",Space,Str "--",Space,Str "five."]
-,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5-7,",Space,Str "255-66,",Space,Str "1987-1999."]
-,Para [Str "Ellipses...and.",Space,Str ".",Space,Str ".and",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "."]
-,HorizontalRule
-,Header 1 ("latex",[],[]) [Str "LaTeX"]
-,BulletList
- [[Plain [Str "\\cite[22-23]{smith.1899}"]]
- ,[Plain [Str "\\doublespacing"]]
- ,[Plain [Str "$2+2=4$"]]
- ,[Plain [Str "$x",Space,Str "\\in",Space,Str "y$"]]
- ,[Plain [Str "$\\alpha",Space,Str "\\wedge",Space,Str "\\omega$"]]
- ,[Plain [Str "$223$"]]
- ,[Plain [Str "$p$-Tree"]]
- ,[Plain [Str "$\\frac{d}{dx}f(x)=\\lim_{h\\to",Space,Str "0}\\frac{f(x+h)-f(x)}{h}$"]]
- ,[Plain [Str "Here's",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Str "$\\alpha",Space,Str "+",Space,Str "\\omega",Space,Str "\\times",Space,Str "x^2$."]]]
-,Para [Str "These",Space,Str "shouldn't",Space,Str "be",Space,Str "math:"]
-,BulletList
- [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
- ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",Space,Str "(It",Space,Str "worked",Space,Str "if",Space,Str "\"lot\"",Space,Str "is",Space,Str "emphasized.)"]]
- ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]]
-,Para [Str "Here's",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
-,Para [Str "\\begin{tabular}{|l|l|}\\hline",Space,Str "Animal",Space,Str "&",Space,Str "Number",Space,Str "\\\\",Space,Str "\\hline",Space,Str "Dog",Space,Str "&",Space,Str "2",Space,Str "\\\\",Space,Str "Cat",Space,Str "&",Space,Str "1",Space,Str "\\\\",Space,Str "\\hline",Space,Str "\\end{tabular}"]
-,HorizontalRule
-,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Plain [Str "section:",Space,Str "\167"]]
- ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]]
- ,[Plain [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,HorizontalRule
-,Header 1 ("links",[],[]) [Str "Links"]
-,Header 2 ("explicit",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")]
-,Para [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere.net)"]
-,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
-,Header 2 ("reference",[],[]) [Str "Reference"]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."]
-,Para [Str "This",Space,Str "should",Space,Str "[not]",Space,Str "be",Space,Str "a",Space,Str "link."]
-,CodeBlock ("",[],[]) "[not]: /url"
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."]
-,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
-,Para [Str "Here's",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("http://att.com/","AT&T"),Str "."]
-,Para [Str "Here's",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
-,Para [Str "Here's",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
-,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
-,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
-,BulletList
- [[Plain [Str "In",Space,Str "a",Space,Str "list?"]]
- ,[Plain [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
- ,[Plain [Str "It",Space,Str "should."]]]
-,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere.net"]
-,BlockQuote
- [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
-,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
-,CodeBlock ("",[],[]) "or here: <http://example.com/>"
-,HorizontalRule
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "From",Space,Str "\"Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune\"",Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","Voyage dans la Lune")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."]
-,HorizontalRule
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Link ("",[],[]) [Str "(1)"] ("#note_1",""),Str ",",Space,Str "and",Space,Str "another",Link ("",[],[]) [Str "(longnote)"] ("#note_longnote",""),Str ".",Space,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",Space,Str "a",Space,Str "space^(my",Space,Str "note)."]
-,Para [Link ("",[],[]) [Str "(1)"] ("#ref_1",""),Space,Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."]
-,Para [Link ("",[],[]) [Str "(longnote)"] ("#ref_longnote",""),Space,Str "Here's",Space,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."]
-,Para [Str "Caret",Space,Str "characters",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "indicate",Space,Str "that",Space,Str "the",Space,Str "blocks",Space,Str "all",Space,Str "belong",Space,Str "to",Space,Str "a",Space,Str "single",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "block",Space,Str "quotes)."]
-,CodeBlock ("",[],[]) " { <code> }"
-,Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",Space,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."]
-,Para [Str "text",Space,Emph [Str "Leading",Space,Str "space"]]
-,Para [Emph [Str "Trailing",Space,Str "space"],Space,Str "text"]
-,Para [Str "text",Space,Emph [Str "Leading",Space,Str "spaces"]]
-,Para [Emph [Str "Trailing",Space,Str "spaces"],Space,Str "text"]
-,Header 1 ("tables",[],[]) [Str "Tables"]
-,Header 2 ("tables-with-headers",[],[]) [Str "Tables",Space,Str "with",Space,Str "Headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Para [Str "Row",Space,Str "headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 1)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 1)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]])]
- (TableFoot ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]]
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]]
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]]
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]])
- ,(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]])
- ,(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("tables-without-headers",[],[]) [Str "Tables",Space,Str "without",Space,Str "Headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Para [Str "tbody",Space,Str "tags",Space,Str "omitted"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Para [Str "empty",Space,Str "head"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Para [Str "explicit",Space,Str "body",Space,Str "and",Space,Str "foot"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]])]
- (TableFoot ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])
-,Header 2 ("colspans-and-rowspans",[],[]) [Str "Colspans",Space,Str "and",Space,Str "Rowspans"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 2)
- [Plain [Str "1",Space,Str "and",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 3)
- [Plain [Str "4,",Space,Str "5,",Space,Str "and",Space,Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,HorizontalRule
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 3)
- [Plain [Str "Numbers"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 2) (ColSpan 1)
- [Plain [Str "1",Space,Str "and",Space,Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("attributes",[],[]) [Str "Attributes"]
-,Table ("attrib-test-table",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",["table-head"],[])
- [Row ("",["table-head-row"],[])
- [Cell ("",[],[("abbr","x")]) AlignDefault (RowSpan 1) (ColSpan 3)
- [Plain [Str "Cat",Space,Str "X"]]]])
- [(TableBody ("",["main"],[("part","body")]) (RowHeadColumns 0)
- []
- [Row ("",[],[("part","row")])
- [Cell ("",[],[("part","cell")]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[("valign","bottom")]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[("style","color: #151950")]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]])]
- (TableFoot ("",["summary"],[])
- [Row ("",[],[("bgcolor","#ccc")])
- [Cell ("",[],[("square","true")]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])
-,Header 2 ("tag-omission",[],[]) [Str "Tag",Space,Str "omission"]
-,Para [Str "thead,",Space,Str "tbody,",Space,Str "and",Space,Str "tfoot"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]]])]
- (TableFoot ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]]])
-,Header 2 ("empty-tables",[],[]) [Str "Empty",Space,Str "Tables"]
-,Para [Str "This",Space,Str "section",Space,Str "should",Space,Str "be",Space,Str "empty."]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "generator" , MetaInlines [ Str "pandoc" ] )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Suite"
+ ]
+ )
+ ]
+ }
+ [ Header
+ 1
+ ( "pandoc-test-suite" , [ "title" ] , [] )
+ [ Str "Pandoc" , Space , Str "Test" , Space , Str "Suite" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ , Space
+ , Str "Most"
+ , Space
+ , Str "of"
+ , Space
+ , Str "them"
+ , Space
+ , Str "are"
+ , Space
+ , Str "adapted"
+ , Space
+ , Str "from"
+ , Space
+ , Str "John"
+ , Space
+ , Str "Gruber's"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , HorizontalRule
+ , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 2
+ ( "level-2-with-an-embedded-link" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Header
+ 3
+ ( "level-3-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 4 ( "level-4" , [] , [] ) [ Str "Level" , Space , Str "4" ]
+ , Header
+ 5 ( "level-5" , [] , [] ) [ Str "Level" , Space , Str "5" ]
+ , Header
+ 1 ( "level-1" , [] , [] ) [ Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "level-2-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 3 ( "level-3" , [] , [] ) [ Str "Level" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header
+ 2 ( "level-2" , [] , [] ) [ Str "Level" , Space , Str "2" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , HorizontalRule
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , Space
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ , Space
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "looked"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , Space
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , LineBreak
+ , Str "here."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , Para [ Str "E-mail" , Space , Str "style:" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ , Para [ Str "A" , Space , Str "list:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "item" , Space , Str "one" ] ]
+ , [ Plain [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Para
+ [ Str "Nested"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quotes:"
+ ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ , Space
+ , Str "2"
+ , Space
+ , Str ">"
+ , Space
+ , Str "1."
+ ]
+ , Para [ Str "Box-style:" ]
+ , BlockQuote
+ [ Para [ Str "Example:" ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ ]
+ , BlockQuote
+ [ OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "do" , Space , Str "laundry" ] ]
+ , [ Plain
+ [ Str "take"
+ , Space
+ , Str "out"
+ , Space
+ , Str "the"
+ , Space
+ , Str "trash"
+ ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "one:"
+ ]
+ , BlockQuote
+ [ Para [ Str "Joe" , Space , Str "said:" ]
+ , BlockQuote
+ [ Para
+ [ Str "Don't" , Space , Str "quote" , Space , Str "me." ]
+ ]
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "a"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "inline-quotes" , [] , [] )
+ [ Str "Inline" , Space , Str "quotes" ]
+ , Para
+ [ Str "Normal"
+ , Space
+ , Str "text"
+ , Space
+ , Str "but"
+ , Space
+ , Str "then"
+ , Space
+ , Str "a"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Span
+ ( ""
+ , []
+ , [ ( "cite"
+ , "https://www.imdb.com/title/tt0062622/quotes/qt0396921"
+ )
+ ]
+ )
+ [ Str "inline" , Space , Str "quote" ]
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Quoted
+ DoubleQuote
+ [ Str "Missing"
+ , Space
+ , Str "a"
+ , Space
+ , Str "cite"
+ , Space
+ , Str "attribute"
+ , Space
+ , Str "means"
+ , Space
+ , Str "its"
+ , Space
+ , Str "just"
+ , Space
+ , Str "normal"
+ , Space
+ , Str "text"
+ ]
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , HorizontalRule
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Asterisks" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Plus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Minus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Tight:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second" ] ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para [ Str "and:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "One" ] ]
+ , [ Plain [ Str "Two" ] ]
+ , [ Plain [ Str "Three" ] ]
+ ]
+ , Para
+ [ Str "Loose" , Space , Str "using" , Space , Str "tabs:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "and" , Space , Str "using" , Space , Str "spaces:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para [ Str "Multiple" , Space , Str "paragraphs:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "graf"
+ , Space
+ , Str "one."
+ ]
+ , Para
+ [ Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "graf"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "dog's"
+ , Space
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Para [ Str "List" , Space , Str "styles:" ]
+ , OrderedList ( 1 , DefaultStyle , DefaultDelim ) []
+ , OrderedList ( 1 , LowerRoman , DefaultDelim ) []
+ , OrderedList ( 1 , LowerRoman , DefaultDelim ) []
+ , OrderedList ( 1 , DefaultStyle , DefaultDelim ) []
+ , OrderedList ( 1 , LowerRoman , DefaultDelim ) []
+ , OrderedList ( 1 , LowerRoman , DefaultDelim ) []
+ , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ]
+ , BulletList [ [ Plain [ Str "Tab" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here's" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second:" ]
+ , BulletList
+ [ [ Plain [ Str "Fee" ] ]
+ , [ Plain [ Str "Fie" ] ]
+ , [ Plain [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "Same"
+ , Space
+ , Str "thing"
+ , Space
+ , Str "but"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paragraphs:"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Plain [ Str "Fee" ] ]
+ , [ Plain [ Str "Fie" ] ]
+ , [ Plain [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "tabs-and-spaces" , [] , [] )
+ [ Str "Tabs" , Space , Str "and" , Space , Str "spaces" ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "fancy-list-markers" , [] , [] )
+ [ Str "Fancy" , Space , Str "list" , Space , Str "markers" ]
+ , OrderedList
+ ( 2 , Decimal , DefaultDelim )
+ [ [ Plain
+ [ Str "begins" , Space , Str "with" , Space , Str "2" ]
+ ]
+ , [ Para [ Str "and" , Space , Str "now" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "continuation"
+ ]
+ , OrderedList
+ ( 4 , LowerRoman , DefaultDelim )
+ [ [ Plain
+ [ Str "sublist"
+ , Space
+ , Str "with"
+ , Space
+ , Str "roman"
+ , Space
+ , Str "numerals,"
+ , Space
+ , Str "starting"
+ , Space
+ , Str "with"
+ , Space
+ , Str "4"
+ ]
+ ]
+ , [ Plain [ Str "more" , Space , Str "items" ]
+ , OrderedList
+ ( 1 , UpperAlpha , DefaultDelim )
+ [ [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ , [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Nesting:" ]
+ , OrderedList
+ ( 1 , UpperAlpha , DefaultDelim )
+ [ [ Plain [ Str "Upper" , Space , Str "Alpha" ]
+ , OrderedList
+ ( 1 , UpperRoman , DefaultDelim )
+ [ [ Plain [ Str "Upper" , Space , Str "Roman." ]
+ , OrderedList
+ ( 6 , Decimal , DefaultDelim )
+ [ [ Plain
+ [ Str "Decimal"
+ , Space
+ , Str "start"
+ , Space
+ , Str "with"
+ , Space
+ , Str "6"
+ ]
+ , OrderedList
+ ( 3 , LowerAlpha , DefaultDelim )
+ [ [ Plain
+ [ Str "Lower"
+ , Space
+ , Str "alpha"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paren"
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Autonumbering:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Autonumber." ] ]
+ , [ Plain [ Str "More." ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Nested." ] ] ]
+ ]
+ ]
+ , HorizontalRule
+ , Header 2 ( "definition" , [] , [] ) [ Str "Definition" ]
+ , DefinitionList
+ [ ( [ Str "Violin" ]
+ , [ [ Plain
+ [ Str "Stringed"
+ , Space
+ , Str "musical"
+ , Space
+ , Str "instrument."
+ ]
+ ]
+ , [ Plain [ Str "Torture" , Space , Str "device." ] ]
+ ]
+ )
+ , ( [ Str "Cello" , LineBreak , Str "Violoncello" ]
+ , [ [ Plain
+ [ Str "Low-voiced"
+ , Space
+ , Str "stringed"
+ , Space
+ , Str "instrument."
+ ]
+ ]
+ ]
+ )
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Empty"
+ , Space
+ , Strong []
+ , Space
+ , Str "and"
+ , Space
+ , Emph []
+ , Str "."
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "emphasized" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , SmallCaps [ Str "small" , Space , Str "caps" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "are"
+ , Space
+ , Str "all"
+ , Space
+ , Str "underlined:"
+ , Space
+ , Underline [ Str "foo" ]
+ , Space
+ , Str "and"
+ , Space
+ , Underline [ Str "bar" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "are"
+ , Space
+ , Str "all"
+ , Space
+ , Str "strikethrough:"
+ , Space
+ , Strikeout [ Str "foo" ]
+ , Str ","
+ , Space
+ , Strikeout [ Str "bar" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Strikeout [ Str "baz" ]
+ , Str "."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "smart-quotes-ellipses-dashes" , [] , [] )
+ [ Str "Smart"
+ , Space
+ , Str "quotes,"
+ , Space
+ , Str "ellipses,"
+ , Space
+ , Str "dashes"
+ ]
+ , Para
+ [ Str "\"Hello,\""
+ , Space
+ , Str "said"
+ , Space
+ , Str "the"
+ , Space
+ , Str "spider."
+ , Space
+ , Str "\"'Shelob'"
+ , Space
+ , Str "is"
+ , Space
+ , Str "my"
+ , Space
+ , Str "name.\""
+ ]
+ , Para
+ [ Str "'A',"
+ , Space
+ , Str "'B',"
+ , Space
+ , Str "and"
+ , Space
+ , Str "'C'"
+ , Space
+ , Str "are"
+ , Space
+ , Str "letters."
+ ]
+ , Para
+ [ Str "'Oak,'"
+ , Space
+ , Str "'elm,'"
+ , Space
+ , Str "and"
+ , Space
+ , Str "'beech'"
+ , Space
+ , Str "are"
+ , Space
+ , Str "names"
+ , Space
+ , Str "of"
+ , Space
+ , Str "trees."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Str "'pine.'"
+ ]
+ , Para
+ [ Str "'He"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "\"I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "go.\"'"
+ , Space
+ , Str "Were"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alive"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "70's?"
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "quoted"
+ , Space
+ , Str "'"
+ , Code ( "" , [] , [] ) "code"
+ , Str "'"
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Str "\""
+ , Link
+ ( "" , [] , [] )
+ [ Str "quoted" , Space , Str "link" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "\"."
+ ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "dashes:"
+ , Space
+ , Str "one---two"
+ , Space
+ , Str "---"
+ , Space
+ , Str "three--four"
+ , Space
+ , Str "--"
+ , Space
+ , Str "five."
+ ]
+ , Para
+ [ Str "Dashes"
+ , Space
+ , Str "between"
+ , Space
+ , Str "numbers:"
+ , Space
+ , Str "5-7,"
+ , Space
+ , Str "255-66,"
+ , Space
+ , Str "1987-1999."
+ ]
+ , Para
+ [ Str "Ellipses...and."
+ , Space
+ , Str "."
+ , Space
+ , Str ".and"
+ , Space
+ , Str "."
+ , Space
+ , Str "."
+ , Space
+ , Str "."
+ , Space
+ , Str "."
+ ]
+ , HorizontalRule
+ , Header 1 ( "latex" , [] , [] ) [ Str "LaTeX" ]
+ , BulletList
+ [ [ Plain [ Str "\\cite[22-23]{smith.1899}" ] ]
+ , [ Plain [ Str "\\doublespacing" ] ]
+ , [ Plain [ Str "$2+2=4$" ] ]
+ , [ Plain
+ [ Str "$x" , Space , Str "\\in" , Space , Str "y$" ]
+ ]
+ , [ Plain
+ [ Str "$\\alpha"
+ , Space
+ , Str "\\wedge"
+ , Space
+ , Str "\\omega$"
+ ]
+ ]
+ , [ Plain [ Str "$223$" ] ]
+ , [ Plain [ Str "$p$-Tree" ] ]
+ , [ Plain
+ [ Str "$\\frac{d}{dx}f(x)=\\lim_{h\\to"
+ , Space
+ , Str "0}\\frac{f(x+h)-f(x)}{h}$"
+ ]
+ ]
+ , [ Plain
+ [ Str "Here's"
+ , Space
+ , Str "one"
+ , Space
+ , Str "that"
+ , Space
+ , Str "has"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , Space
+ , Str "in"
+ , Space
+ , Str "it:"
+ , Space
+ , Str "$\\alpha"
+ , Space
+ , Str "+"
+ , Space
+ , Str "\\omega"
+ , Space
+ , Str "\\times"
+ , Space
+ , Str "x^2$."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "shouldn't"
+ , Space
+ , Str "be"
+ , Space
+ , Str "math:"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "To"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "famous"
+ , Space
+ , Str "equation,"
+ , Space
+ , Str "write"
+ , Space
+ , Code ( "" , [] , [] ) "$e = mc^2$"
+ , Str "."
+ ]
+ ]
+ , [ Plain
+ [ Str "$22,000"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Emph [ Str "lot" ]
+ , Space
+ , Str "of"
+ , Space
+ , Str "money."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Str "$34,000."
+ , Space
+ , Str "(It"
+ , Space
+ , Str "worked"
+ , Space
+ , Str "if"
+ , Space
+ , Str "\"lot\""
+ , Space
+ , Str "is"
+ , Space
+ , Str "emphasized.)"
+ ]
+ ]
+ , [ Plain
+ [ Str "Escaped"
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ":"
+ , Space
+ , Str "$73"
+ , Space
+ , Emph
+ [ Str "this"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "emphasized"
+ ]
+ , Space
+ , Str "23$."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "LaTeX"
+ , Space
+ , Str "table:"
+ ]
+ , Para
+ [ Str "\\begin{tabular}{|l|l|}\\hline"
+ , Space
+ , Str "Animal"
+ , Space
+ , Str "&"
+ , Space
+ , Str "Number"
+ , Space
+ , Str "\\\\"
+ , Space
+ , Str "\\hline"
+ , Space
+ , Str "Dog"
+ , Space
+ , Str "&"
+ , Space
+ , Str "2"
+ , Space
+ , Str "\\\\"
+ , Space
+ , Str "Cat"
+ , Space
+ , Str "&"
+ , Space
+ , Str "1"
+ , Space
+ , Str "\\\\"
+ , Space
+ , Str "\\hline"
+ , Space
+ , Str "\\end{tabular}"
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "special-characters" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "I" , Space , Str "hat:" , Space , Str "\206" ]
+ ]
+ , [ Plain
+ [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Plain [ Str "section:" , Space , Str "\167" ] ]
+ , [ Plain
+ [ Str "set"
+ , Space
+ , Str "membership:"
+ , Space
+ , Str "\8712"
+ ]
+ ]
+ , [ Plain [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "way"
+ , Space
+ , Str "to"
+ , Space
+ , Str "write"
+ , Space
+ , Str "it."
+ ]
+ , Para
+ [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para
+ [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para
+ [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para
+ [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para
+ [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para
+ [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para
+ [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , HorizontalRule
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "explicit" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by two spaces" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by a tab" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with \"quotes\" in it" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with single quotes" )
+ ]
+ , Para
+ [ Str "Email"
+ , Space
+ , Str "link"
+ , Space
+ , Str "(nobody"
+ , Space
+ , Str "[at]"
+ , Space
+ , Str "nowhere.net)"
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "Empty" ] ( "" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "reference" , [] , [] ) [ Str "Reference" ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "[brackets]" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
+ , Space
+ , Str "by"
+ , Space
+ , Str "itself"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "thrice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "[not]"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , CodeBlock ( "" , [] , [] ) "[not]: /url"
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "bar" ]
+ ( "/url/" , "Title with \"quotes\" inside" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "biz" ]
+ ( "/url/" , "Title with \"quote\" inside" )
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "with-ampersands" , [] , [] )
+ [ Str "With" , Space , Str "ampersands" ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "amersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "AT&T" ]
+ ( "http://att.com/" , "AT&T" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline" , Space , Str "link" ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline"
+ , Space
+ , Str "link"
+ , Space
+ , Str "in"
+ , Space
+ , Str "pointy"
+ , Space
+ , Str "braces"
+ ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "autolinks" , [] , [] ) [ Str "Autolinks" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "In" , Space , Str "a" , Space , Str "list?" ]
+ ]
+ , [ Plain
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , [ Plain [ Str "It" , Space , Str "should." ] ]
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "e-mail"
+ , Space
+ , Str "address:"
+ , Space
+ , Str "nobody"
+ , Space
+ , Str "[at]"
+ , Space
+ , Str "nowhere.net"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Blockquoted:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , Para
+ [ Str "Auto-links"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "occur"
+ , Space
+ , Str "here:"
+ , Space
+ , Code ( "" , [] , [] ) "<http://example.com/>"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "or here: <http://example.com/>"
+ , HorizontalRule
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Str "\"Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune\""
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "lalune" ]
+ ( "lalune.jpg" , "Voyage dans la Lune" )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , Space
+ , Image
+ ( "" , [] , [] ) [ Str "movie" ] ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ ]
+ , HorizontalRule
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference"
+ , Link ( "" , [] , [] ) [ Str "(1)" ] ( "#note_1" , "" )
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "another"
+ , Link
+ ( "" , [] , [] )
+ [ Str "(longnote)" ]
+ ( "#note_longnote" , "" )
+ , Str "."
+ , Space
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Emph [ Str "not" ]
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "it"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "a"
+ , Space
+ , Str "space^(my"
+ , Space
+ , Str "note)."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "(1)" ] ( "#ref_1" , "" )
+ , Space
+ , Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "anywhere"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document,"
+ , Space
+ , Str "not"
+ , Space
+ , Str "just"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "(longnote)" ]
+ ( "#ref_longnote" , "" )
+ , Space
+ , Str "Here's"
+ , Space
+ , Str "the"
+ , Space
+ , Str "other"
+ , Space
+ , Str "note."
+ , Space
+ , Str "This"
+ , Space
+ , Str "one"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "blocks."
+ ]
+ , Para
+ [ Str "Caret"
+ , Space
+ , Str "characters"
+ , Space
+ , Str "are"
+ , Space
+ , Str "used"
+ , Space
+ , Str "to"
+ , Space
+ , Str "indicate"
+ , Space
+ , Str "that"
+ , Space
+ , Str "the"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "all"
+ , Space
+ , Str "belong"
+ , Space
+ , Str "to"
+ , Space
+ , Str "a"
+ , Space
+ , Str "single"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "(as"
+ , Space
+ , Str "with"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quotes)."
+ ]
+ , CodeBlock ( "" , [] , [] ) " { <code> }"
+ , Para
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "want,"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "use"
+ , Space
+ , Str "a"
+ , Space
+ , Str "caret"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "beginning"
+ , Space
+ , Str "of"
+ , Space
+ , Str "every"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "with"
+ , Space
+ , Str "blockquotes,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "all"
+ , Space
+ , Str "that"
+ , Space
+ , Str "you"
+ , Space
+ , Str "need"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "caret"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "beginning"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "line"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "block"
+ , Space
+ , Str "and"
+ , Space
+ , Str "any"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "lines."
+ ]
+ , Para
+ [ Str "text"
+ , Space
+ , Emph [ Str "Leading" , Space , Str "space" ]
+ ]
+ , Para
+ [ Emph [ Str "Trailing" , Space , Str "space" ]
+ , Space
+ , Str "text"
+ ]
+ , Para
+ [ Str "text"
+ , Space
+ , Emph [ Str "Leading" , Space , Str "spaces" ]
+ ]
+ , Para
+ [ Emph [ Str "Trailing" , Space , Str "spaces" ]
+ , Space
+ , Str "text"
+ ]
+ , Header 1 ( "tables" , [] , [] ) [ Str "Tables" ]
+ , Header
+ 2
+ ( "tables-with-headers" , [] , [] )
+ [ Str "Tables"
+ , Space
+ , Str "with"
+ , Space
+ , Str "Headers"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Para [ Str "Row" , Space , Str "headers" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 1)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 1)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ]
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ]
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ , TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ , TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 2
+ ( "tables-without-headers" , [] , [] )
+ [ Str "Tables"
+ , Space
+ , Str "without"
+ , Space
+ , Str "Headers"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Para
+ [ Str "tbody" , Space , Str "tags" , Space , Str "omitted" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Para [ Str "empty" , Space , Str "head" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Para
+ [ Str "explicit"
+ , Space
+ , Str "body"
+ , Space
+ , Str "and"
+ , Space
+ , Str "foot"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ])
+ , Header
+ 2
+ ( "colspans-and-rowspans" , [] , [] )
+ [ Str "Colspans"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Rowspans"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 2)
+ [ Plain
+ [ Str "1" , Space , Str "and" , Space , Str "2" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 3)
+ [ Plain
+ [ Str "4,"
+ , Space
+ , Str "5,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "6"
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , HorizontalRule
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 3)
+ [ Plain [ Str "Numbers" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 2)
+ (ColSpan 1)
+ [ Plain
+ [ Str "1" , Space , Str "and" , Space , Str "4" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header 2 ( "attributes" , [] , [] ) [ Str "Attributes" ]
+ , Table
+ ( "attrib-test-table" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [ "table-head" ] , [] )
+ [ Row
+ ( "" , [ "table-head-row" ] , [] )
+ [ Cell
+ ( "" , [] , [ ( "abbr" , "x" ) ] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 3)
+ [ Plain [ Str "Cat" , Space , Str "X" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [ "main" ] , [ ( "part" , "body" ) ] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [ ( "part" , "row" ) ] )
+ [ Cell
+ ( "" , [] , [ ( "part" , "cell" ) ] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [ ( "valign" , "bottom" ) ] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [ ( "style" , "color: #151950" ) ] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot
+ ( "" , [ "summary" ] , [] )
+ [ Row
+ ( "" , [] , [ ( "bgcolor" , "#ccc" ) ] )
+ [ Cell
+ ( "" , [] , [ ( "square" , "true" ) ] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ])
+ , Header
+ 2
+ ( "tag-omission" , [] , [] )
+ [ Str "Tag" , Space , Str "omission" ]
+ , Para
+ [ Str "thead,"
+ , Space
+ , Str "tbody,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "tfoot"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ ]
+ ])
+ , Header
+ 2
+ ( "empty-tables" , [] , [] )
+ [ Str "Empty" , Space , Str "Tables" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "empty."
+ ]
+ ]
diff --git a/test/ipynb/mime.ipynb b/test/ipynb/mime.ipynb
new file mode 100644
index 000000000..8789ca857
--- /dev/null
+++ b/test/ipynb/mime.ipynb
@@ -0,0 +1,187 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "0ad1fbe7-107b-4668-ae4d-8ce4ae9a4400",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from __future__ import annotations\n",
+ "\n",
+ "from dataclasses import dataclass"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "c2d3a9f4-dfdb-4ced-bbcd-3dfd1780af80",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "7.29.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import IPython\n",
+ "\n",
+ "print(IPython.__version__)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "21e7a4a1-0cf8-48cc-823c-dca698ae6853",
+ "metadata": {},
+ "source": [
+ "Supported IPython display formatters:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "053cdbc4-b157-4e3e-9c86-8f374770d006",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "text/plain\n",
+ "text/html\n",
+ "text/markdown\n",
+ "image/svg+xml\n",
+ "image/png\n",
+ "application/pdf\n",
+ "image/jpeg\n",
+ "text/latex\n",
+ "application/json\n",
+ "application/javascript\n"
+ ]
+ }
+ ],
+ "source": [
+ "ip = get_ipython()\n",
+ "for mime in ip.display_formatter.formatters:\n",
+ " print(mime)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "d79b063d-ce81-497b-a0ea-5b2e2972e845",
+ "metadata": {},
+ "source": [
+ "Let's write a simple class that will output different mime:"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "c847636c-1c45-432e-9d8d-7310dd7f5637",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "@dataclass\n",
+ "class Mime:\n",
+ " math: str\n",
+ "\n",
+ " def _repr_mimebundle_(\n",
+ " self,\n",
+ " include: Container[str] | None = None,\n",
+ " exclude: Container[str] | None = None,\n",
+ " **kwargs,\n",
+ " ) -> dict[str, str]:\n",
+ " string = self.math\n",
+ " data = {\n",
+ " \"text/plain\": string,\n",
+ " \"text/html\": (latex := f\"\\\\[{string}\\\\]\"),\n",
+ " \"text/markdown\": f\"$${string}$$\",\n",
+ " # \"image/svg+xml\":,\n",
+ " # \"image/png\":,\n",
+ " # \"application/pdf\":,\n",
+ " # \"image/jpeg\":,\n",
+ " \"text/latex\": latex,\n",
+ " # \"application/json\":,\n",
+ " # \"application/javascript\":,\n",
+ " }\n",
+ " if include:\n",
+ " data = {k: v for k, v in data.items() if k in include}\n",
+ " if exclude:\n",
+ " data = {k: v for k, v in data.items() if k not in exclude}\n",
+ " return data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "4fa54f22-0c3a-4809-91f7-ea7101ff1907",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "mime = Mime(\"E = mc^2\")"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "c419e6a6-240c-4af0-a244-5f1526705c30",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\\[E = mc^2\\]"
+ ],
+ "text/latex": [
+ "\\[E = mc^2\\]"
+ ],
+ "text/markdown": [
+ "$$E = mc^2$$"
+ ],
+ "text/plain": [
+ "E = mc^2"
+ ]
+ },
+ "execution_count": 6,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "mime"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "bf140b8e-16ac-4670-9778-f1c1d9486f9d",
+ "metadata": {},
+ "source": [
+ "Note that #7561 made ipynb reader aware of this, and #7563 made ipynb writer aware of this."
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.9.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/test/ipynb/mime.native b/test/ipynb/mime.native
new file mode 100644
index 000000000..21e3444e2
--- /dev/null
+++ b/test/ipynb/mime.native
@@ -0,0 +1,154 @@
+[ Div
+ ( "0ad1fbe7-107b-4668-ae4d-8ce4ae9a4400"
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "1" ) ]
+ )
+ [ CodeBlock
+ ( "" , [ "python" ] , [] )
+ "from __future__ import annotations\n\nfrom dataclasses import dataclass"
+ ]
+, Div
+ ( "c2d3a9f4-dfdb-4ced-bbcd-3dfd1780af80"
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "2" ) ]
+ )
+ [ CodeBlock
+ ( "" , [ "python" ] , [] )
+ "import IPython\n\nprint(IPython.__version__)"
+ , Div
+ ( "" , [ "output" , "stream" , "stdout" ] , [] )
+ [ CodeBlock ( "" , [] , [] ) "7.29.0\n" ]
+ ]
+, Div
+ ( "21e7a4a1-0cf8-48cc-823c-dca698ae6853"
+ , [ "cell" , "markdown" ]
+ , []
+ )
+ [ Para
+ [ Str "Supported"
+ , Space
+ , Str "IPython"
+ , Space
+ , Str "display"
+ , Space
+ , Str "formatters:"
+ ]
+ ]
+, Div
+ ( "053cdbc4-b157-4e3e-9c86-8f374770d006"
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "3" ) ]
+ )
+ [ CodeBlock
+ ( "" , [ "python" ] , [] )
+ "ip = get_ipython()\nfor mime in ip.display_formatter.formatters:\n print(mime)"
+ , Div
+ ( "" , [ "output" , "stream" , "stdout" ] , [] )
+ [ CodeBlock
+ ( "" , [] , [] )
+ "text/plain\ntext/html\ntext/markdown\nimage/svg+xml\nimage/png\napplication/pdf\nimage/jpeg\ntext/latex\napplication/json\napplication/javascript\n"
+ ]
+ ]
+, Div
+ ( "d79b063d-ce81-497b-a0ea-5b2e2972e845"
+ , [ "cell" , "markdown" ]
+ , []
+ )
+ [ Para
+ [ Str "Let's"
+ , Space
+ , Str "write"
+ , Space
+ , Str "a"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "class"
+ , Space
+ , Str "that"
+ , Space
+ , Str "will"
+ , Space
+ , Str "output"
+ , Space
+ , Str "different"
+ , Space
+ , Str "mime:"
+ ]
+ ]
+, Div
+ ( "c847636c-1c45-432e-9d8d-7310dd7f5637"
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "4" ) ]
+ )
+ [ CodeBlock
+ ( "" , [ "python" ] , [] )
+ "@dataclass\nclass Mime:\n math: str\n\n def _repr_mimebundle_(\n self,\n include: Container[str] | None = None,\n exclude: Container[str] | None = None,\n **kwargs,\n ) -> dict[str, str]:\n string = self.math\n data = {\n \"text/plain\": string,\n \"text/html\": (latex := f\"\\\\[{string}\\\\]\"),\n \"text/markdown\": f\"$${string}$$\",\n # \"image/svg+xml\":,\n # \"image/png\":,\n # \"application/pdf\":,\n # \"image/jpeg\":,\n \"text/latex\": latex,\n # \"application/json\":,\n # \"application/javascript\":,\n }\n if include:\n data = {k: v for k, v in data.items() if k in include}\n if exclude:\n data = {k: v for k, v in data.items() if k not in exclude}\n return data"
+ ]
+, Div
+ ( "4fa54f22-0c3a-4809-91f7-ea7101ff1907"
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "5" ) ]
+ )
+ [ CodeBlock
+ ( "" , [ "python" ] , [] ) "mime = Mime(\"E = mc^2\")"
+ ]
+, Div
+ ( "c419e6a6-240c-4af0-a244-5f1526705c30"
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "6" ) ]
+ )
+ [ CodeBlock ( "" , [ "python" ] , [] ) "mime"
+ , Div
+ ( ""
+ , [ "output" , "execute_result" ]
+ , [ ( "execution_count" , "6" ) ]
+ )
+ [ RawBlock (Format "html") "\\[E = mc^2\\]"
+ , RawBlock (Format "latex") "\\[E = mc^2\\]"
+ , RawBlock (Format "markdown") "$$E = mc^2$$"
+ , CodeBlock ( "" , [] , [] ) "E = mc^2"
+ ]
+ ]
+, Div
+ ( "bf140b8e-16ac-4670-9778-f1c1d9486f9d"
+ , [ "cell" , "markdown" ]
+ , []
+ )
+ [ Para
+ [ Str "Note"
+ , Space
+ , Str "that"
+ , Space
+ , Str "#7561"
+ , Space
+ , Str "made"
+ , Space
+ , Str "ipynb"
+ , Space
+ , Str "reader"
+ , Space
+ , Str "aware"
+ , Space
+ , Str "of"
+ , Space
+ , Str "this,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "#7563"
+ , Space
+ , Str "made"
+ , Space
+ , Str "ipynb"
+ , Space
+ , Str "writer"
+ , Space
+ , Str "aware"
+ , Space
+ , Str "of"
+ , Space
+ , Str "this."
+ ]
+ ]
+]
diff --git a/test/ipynb/mime.out.ipynb b/test/ipynb/mime.out.ipynb
new file mode 100644
index 000000000..4cc806a1e
--- /dev/null
+++ b/test/ipynb/mime.out.ipynb
@@ -0,0 +1,169 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "from __future__ import annotations\n",
+ "\n",
+ "from dataclasses import dataclass"
+ ],
+ "id": "0ad1fbe7-107b-4668-ae4d-8ce4ae9a4400"
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "7.29.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import IPython\n",
+ "\n",
+ "print(IPython.__version__)"
+ ],
+ "id": "c2d3a9f4-dfdb-4ced-bbcd-3dfd1780af80"
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Supported IPython display formatters:"
+ ],
+ "id": "21e7a4a1-0cf8-48cc-823c-dca698ae6853"
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "name": "stdout",
+ "text": [
+ "text/plain\n",
+ "text/html\n",
+ "text/markdown\n",
+ "image/svg+xml\n",
+ "image/png\n",
+ "application/pdf\n",
+ "image/jpeg\n",
+ "text/latex\n",
+ "application/json\n",
+ "application/javascript\n"
+ ]
+ }
+ ],
+ "source": [
+ "ip = get_ipython()\n",
+ "for mime in ip.display_formatter.formatters:\n",
+ " print(mime)"
+ ],
+ "id": "053cdbc4-b157-4e3e-9c86-8f374770d006"
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Let's write a simple class that will output different mime:"
+ ],
+ "id": "d79b063d-ce81-497b-a0ea-5b2e2972e845"
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "@dataclass\n",
+ "class Mime:\n",
+ " math: str\n",
+ "\n",
+ " def _repr_mimebundle_(\n",
+ " self,\n",
+ " include: Container[str] | None = None,\n",
+ " exclude: Container[str] | None = None,\n",
+ " **kwargs,\n",
+ " ) -> dict[str, str]:\n",
+ " string = self.math\n",
+ " data = {\n",
+ " \"text/plain\": string,\n",
+ " \"text/html\": (latex := f\"\\\\[{string}\\\\]\"),\n",
+ " \"text/markdown\": f\"$${string}$$\",\n",
+ " # \"image/svg+xml\":,\n",
+ " # \"image/png\":,\n",
+ " # \"application/pdf\":,\n",
+ " # \"image/jpeg\":,\n",
+ " \"text/latex\": latex,\n",
+ " # \"application/json\":,\n",
+ " # \"application/javascript\":,\n",
+ " }\n",
+ " if include:\n",
+ " data = {k: v for k, v in data.items() if k in include}\n",
+ " if exclude:\n",
+ " data = {k: v for k, v in data.items() if k not in exclude}\n",
+ " return data"
+ ],
+ "id": "c847636c-1c45-432e-9d8d-7310dd7f5637"
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "mime = Mime(\"E = mc^2\")"
+ ],
+ "id": "4fa54f22-0c3a-4809-91f7-ea7101ff1907"
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "execute_result",
+ "execution_count": 6,
+ "metadata": {},
+ "data": {
+ "text/html": [
+ "\\[E = mc^2\\]"
+ ],
+ "text/latex": [
+ "\\[E = mc^2\\]"
+ ],
+ "text/markdown": [
+ "$$E = mc^2$$"
+ ],
+ "text/plain": [
+ "E = mc^2"
+ ]
+ }
+ }
+ ],
+ "source": [
+ "mime"
+ ],
+ "id": "c419e6a6-240c-4af0-a244-5f1526705c30"
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Note that #7561 made ipynb reader aware of this, and #7563 made ipynb writer aware of this."
+ ],
+ "id": "bf140b8e-16ac-4670-9778-f1c1d9486f9d"
+ }
+ ],
+ "nbformat": 4,
+ "nbformat_minor": 5,
+ "metadata": {}
+}
diff --git a/test/ipynb/rank.ipynb b/test/ipynb/rank.ipynb
new file mode 100644
index 000000000..c03ed7d99
--- /dev/null
+++ b/test/ipynb/rank.ipynb
@@ -0,0 +1,60 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "5cf8f54d-bf3c-4db2-996d-22662a86ad43",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import matplotlib.pyplot as plt"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "a0228622-9ff8-4392-9ddd-f70a90f0e106",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/html": "<p><em>you should see this when converting from ipynb to html instead of the image below.</em></p>",
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAACdAAAAnQGPcuduAAAASUlEQVR4nGNkYGBgc1HM+/lfkI/hqQ0XAwsDAwPDzSphBi6h/wwlahsgAiJCHxkkBL4zWLA8YGBkYGBgZGBg4GRgYPjDwMDABADgfgxL+wQIRAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<Figure size 4x4 with 1 Axes>"
+ ]
+ },
+ "metadata": {
+ "needs_background": "light"
+ },
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "fig, ax = plt.subplots(figsize=(1, 1), dpi=4)\n",
+ "ax.imshow([[0, 1], [2, 3]]);"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3 (ipykernel)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.10.0"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
diff --git a/test/ipynb/rank.out.html b/test/ipynb/rank.out.html
new file mode 100644
index 000000000..a82fe8bbc
--- /dev/null
+++ b/test/ipynb/rank.out.html
@@ -0,0 +1,14 @@
+<div id="5cf8f54d-bf3c-4db2-996d-22662a86ad43" class="cell code"
+data-execution_count="1">
+<div class="sourceCode" id="cb1"><pre class="sourceCode
+python"><code class="sourceCode python"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="im">import</span> matplotlib.pyplot <span class="im">as</span> plt</span></code></pre></div>
+</div>
+<div id="a0228622-9ff8-4392-9ddd-f70a90f0e106" class="cell code"
+data-execution_count="2">
+<div class="sourceCode" id="cb2"><pre class="sourceCode
+python"><code class="sourceCode python"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>fig, ax <span class="op">=</span> plt.subplots(figsize<span class="op">=</span>(<span class="dv">1</span>, <span class="dv">1</span>), dpi<span class="op">=</span><span class="dv">4</span>)</span>
+<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>ax.imshow([[<span class="dv">0</span>, <span class="dv">1</span>], [<span class="dv">2</span>, <span class="dv">3</span>]])<span class="op">;</span></span></code></pre></div>
+<div class="output display_data">
+<p><em>you should see this when converting from ipynb to html instead of the image below.</em></p>
+</div>
+</div>
diff --git a/test/ipynb/simple.in.native b/test/ipynb/simple.in.native
index cc707877f..8f3d36019 100644
--- a/test/ipynb/simple.in.native
+++ b/test/ipynb/simple.in.native
@@ -1,15 +1,15 @@
Pandoc (Meta {unMeta = fromList [("jupyter",MetaMap (fromList [("nbformat",MetaInlines [Str "4"]),("nbformat_minor",MetaInlines [Str "5"])]))]})
-[Div ("",["cell","markdown"],[])
+[Div ("uid1",["cell","markdown"],[])
[Header 1 ("lorem-ipsum",[],[]) [Str "Lorem",Space,Str "ipsum"]
,Para [Strong [Str "Lorem",Space,Str "ipsum"],Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipiscing",Space,Str "elit.",Space,Str "Nunc",Space,Str "luctus",SoftBreak,Str "bibendum",Space,Str "felis",Space,Str "dictum",Space,Str "sodales."]]
-,Div ("",["cell","code"],[])
+,Div ("uid2",["cell","code"],[])
[CodeBlock ("",["python"],[]) "print(\"hello\")"]
-,Div ("",["cell","markdown"],[])
+,Div ("uid3",["cell","markdown"],[])
[Header 2 ("pyout",[],[]) [Str "Pyout"]]
-,Div ("",["cell","code"],[("execution_count","2")])
+,Div ("uid4",["cell","code"],[("execution_count","2")])
[CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"
- ,Div ("",["output","execute_result"],[("execution_count","2")])
+ ,Div ("uid5",["output","execute_result"],[("execution_count","2")])
[RawBlock (Format "html") "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"]]
-,Div ("",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")])
+,Div ("uid6",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")])
[Header 2 ("image",[],[]) [Str "Image"]
,Para [Str "This",Space,Str "image",Space,Image ("",[],[]) [Str "the",Space,Str "moon"] ("lalune.jpg",""),Space,Str "will",Space,Str "be",Space,Str "included",Space,Str "as",Space,Str "a",Space,Str "cell",SoftBreak,Str "attachment."]]]
diff --git a/test/ipynb/simple.ipynb b/test/ipynb/simple.ipynb
index 26901db57..c2dbe0640 100644
--- a/test/ipynb/simple.ipynb
+++ b/test/ipynb/simple.ipynb
@@ -9,7 +9,8 @@
"\n",
"**Lorem ipsum** dolor sit amet, consectetur adipiscing elit. Nunc luctus\n",
"bibendum felis dictum sodales."
- ]
+ ],
+ "id": "uid1"
},
{
"cell_type": "code",
@@ -18,7 +19,8 @@
"outputs": [],
"source": [
"print(\"hello\")"
- ]
+ ],
+ "id": "uid2"
},
{
"cell_type": "markdown",
@@ -26,7 +28,8 @@
"source": [
"Pyout\n",
"-----"
- ]
+ ],
+ "id": "uid3"
},
{
"cell_type": "code",
@@ -56,7 +59,8 @@
"</script>\n",
"<b>HTML</b>\n",
"\"\"\")"
- ]
+ ],
+ "id": "uid4"
},
{
"cell_type": "markdown",
@@ -77,7 +81,8 @@
"lalune.jpg": {
"image/jpeg": "/9j/4AAQSkZJRgABAQEAeAB4AAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcU\nFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgo\nKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAD6APoDAREA\nAhEBAxEB/8QAHAAAAAcBAQAAAAAAAAAAAAAAAQIDBAUGBwAI/8QAPhAAAgEDAwIEBAQFAgUFAAMA\nAQIDAAQRBRIhBjETIkFRB2FxgRQykaEjQlKxwRXwFjNictEIJEPh8SZTgv/EABcBAQEBAQAAAAAA\nAAAAAAAAAAABAgT/xAAbEQEBAQEAAwEAAAAAAAAAAAAAARECEiExQf/aAAwDAQACEQMRAD8A2t0Y\noQpwT2qVzMV+N3UHgrDY2eoM0y58VEbgfp9K1yMRmnuJ5h40jyYHGSeKrWE8u2QAApOMdqGCsmT8\nh70TAJwMAZx249aKBy4c9vTNUC0zDCgmmmG7Ockjkj1PrUTAjcy5XP0ouCgHae4IomOJHhgIc55P\nHY0Uk5IXLMcUBQ27n96JYO2MYLebHtRBA7BcMx29sdxQJqwZRtIP+BQKpjHHc+xzigNGoAO/k+nP\nAoAYlee5oBiGeWySO9AJCgY5PHagFCADzj2GaA2N2TkjA/U0HMwbPPeiyBLDfkkj04FCl1cBMgn6\nURwYFGySR6D2oAeQDAxnHGKAhU4IbGc+tFwnwDj9aK7f8v2oNu+IHxNvJdXmt9EmKWSqArA/mPvx\nUxMZNe3Ml1dvNcMzSSEsxPOferJhht/OWyAPc0UfdgDcuM8n50AMCykZFARsngcY/egTcbjnJz9O\n9AB2kZGSQOcUCX8x83bntQCMruJ4B7D1oCyOGzxtJ9M80CAdg5UjFE0aFJrghLeNpHY4IRdx/QUN\nWCw6D6q1EZttEvirHAZ4ig/U4qw1b9H+CHVN3Mq6hJaWMJ5ZjJ4hA/7R3P3q3ET+pf8Ap/lWNm03\nXkkkA8qTW+3PHupP9qxopV78G+s7VSV0+OcAn/kzqSfscVvIKzqPTWu6XKE1LSL+Bhz5oDg/cd6l\nEZzGwLrtPqrA8frUCJfcw9gfegUjZsEAffNADyHt78UAjCjzDJxRcO5Pw3gwCGOVJQp8ZncMGOeN\noxwMY96GCbQffFFcUXKjDDt2NEo+N3yyM5z3okKuqJgIzONoJyuMGi4QfGcqSfXBoYHJx659qKIR\nnnsfUGgJn/poJYoTIGLY+eDzQFlQK2G/KCTmgbspfO0qce/agPGcR7nHf9vnQFfBPlOc88Gg7uuc\nc/M0Bd208YJJweKAYrea4kKQICRGW5IUYUZJ570DYqcknt3FE0VuVyDzj1oamOlulda6puvC0a0e\nZVIWSbtGn1Y1NNbX0x8ENH0qL8X1NdtqDoNxiQbIh8u+WpqL70Tc6fcxypouiRadbW8hhLFFXcB7\nEdz+tNFvEZxkmmgShbA9PlUA+Hgg/wBqDgmBkd6ArJuJBGR7VdEdqWgaVqMfh6hp9pcLj/5Ig2Ka\nKJrvwW6S1EFoLaWwmPIe2fAz81ORTRm3UfwI1mzBbRL+K/ReyS/w3x/b+1Wexmev9O6xoE2zWdOu\nbUDszr5T9G7H9auCJj2n3PPrUXTlGBB2kYx96GlQMjJJHuRRXBgDgk8DtRKH8w4OfYA0SUlIMsFX\nJ4oujHH8ufnRRGOSNoJNAeFC77F2jPucfvQFEqgY3nj/AKaCUY58wwq54AoCzOmVMke9QeRnGR7Z\noEIF7pnaTk49KDpSSwQntQJsGKjgggZ9uDQc4OOe1Am2UCkHOR7dqA8t/cSW8MEkrGGEsUTPCk4z\nj9KJT3pzQtS6m1aPT9Jh8SVxlmJwqL/UfYURuuhfArR7f8NLrF1cXciKDJCrbI2b7c4+9NGtaRpt\nrpdqltYW0VtAn5Y41wBUodvGjqUdQyn0YZqAIreOBFSFFRF7BQAKA1xcRwKplcJuOBn1NAR7y2ik\nWMzoZnGVQHJNAuQcD3oBKkD2FBy8jnvQFxnjjmg4rxwKBMqCBtPNA3vbCC+tngvYo54HGGSRQQR9\nDV0Y91n8DNOvFkuOmZmsrk5PgSNuiY98D1X+1XRhWu6DqWgX72er2j2069t/ZvmD2IoGG7jbnj1F\nFlB224PB+VClN4DYJHyAojmPGCck8cetCAxgjPp6UaAGKtx6+9ATAXO7nFBw8HHLN+goJhBuj2Fe\nAcnmgNazW8U0vjweODGyqpYrsYjytx3x3oGa5LEEjH9XvQGlgmjjMmQq4HBPfPYgevagG5nhe3tk\nFuInQHxJQTmQntn0wKBKTlAeDx60DSY+U9zn+mgsnQvROr9Y3W2xi8KxV8SXUnCrjvj1Y/IUR6c6\nA6H03o6wMVgrSXMoBmuX/NIf8Djt/eiLfjJwO9ZBiOfmKDhktzQAzYBLZ8oyaDF+rOptVv8AUjNZ\nL4tjA/lT+kr3wvqTQX/pi3Y+DqFxKXurmFWAaPaVzg4I/b0oHlxqV7penRTXFu93dPLsESYB2k8n\n7CgnradLq1WaIOFI/K42sPkRQCg3Kcd6Dgp3d6AdrGg5VxnjmgKWB8uQGxnFAUgKuSefSghuqNC0\njXbAWGtxQyJKdsYc4YMf6T6GtDzR8S/hnqfSUz3NvuvNILYSZR5o+ezj/Pb6UGfLzyD/AJoFFySQ\nVBHpQDJ5kGByPahAbWxn5+po0OF3D+XPtQJsNwOe+aAuygmMkebgHnHFALHYpJwSeGz2oGpOJWAI\n49BQEZlYAHkg4oARVOMvtBIJJ7AUAX6xxSOsUgmjViFcKRuHviiVfvhT8NZuqpk1LVFeHRkPlHZp\nznsP+n50qPS+mWVppdnFa2cEcFtGu1I41ChR8qyHVxK8cLPDD4kgGVQHBNAa0maaBJGTYzDJXOcU\nCy5JOaA2OMfoaArkheM7vlQNYNOtoWLJCgLHJwo5NApPKLaNpGRQB6j2oGmnRvcyNd3O/DkeErLh\nkWgklIdCyZOCRzxzQEeRxhdpUnncBkD5UCxXjJ7+tAlctMsIMLohz5mcZAH09aBQYdQwyAeaAuA7\nMAQxHH0oG1481nbGVInuWU5Kr+bHrgepoKB1u+o6jqlvBH05NevEBPBK0pQR4I4BHZj+1Bb9IS7l\nsFtNWtYwDGFYB/EXHqpJ7/WtQYx8VfhGbdZtV6Uh8gy81mpyR6koPb5UGKY4YkeYd88fbFAI5AC9\n8c5oQBb+U9+9GnN5RgDgjOPWgAN3yMfWgAqc91/UUD2RSSRg9+49KCR6e0WfX9WS0icRwgb55WOF\nijH5nP0FBYNRi6dSR7HRNPmu0hOW1GaXaZMdwBwAP3oynE0XRYrFtV02wS4ECj8dp1wcsE7eJEf3\n9qlFZ616ZttPu7Kbp9Zbi0vYzNCcgjHqoHuKsEp8LPh7P1PqjXerxywaXaviRSu1pWH8g+XuflQe\nmIIY7S3SK3hVIo12pGoAAA7AClEL1N1RH0/oTalcwx+IACLaSQKx59Ppmshv0D1jH1ZbTubU27xk\nkAnKsuSMg/UUFluLlLaJXETyecKAg554zigXiubeRnSKeJ5FOGVXBIPsaBLULoWkIfw3kYsAqIOS\nTQJMbpm3oqlmwACeF9yfn+1A+Bx34oE5IY5P+YFbnPIzQKAckHuRQCAQOO1AL8r9KDhkZOT9M8UC\ncrxgAyYJzwD70CT3Itxm8kgi3fly+P7/AOKA9pskhEkZysnOfeg6RH8w3tgjAHtQRZ1uystSg0m5\neRJ2UbHceV8fP3oJkBSAVII9xQFdSRwKDDvjN8L/AMSJte6chxcgFrm1QcSf9aj39x61YMH8Q+Ck\nfhqpQncxBDH5H6VRwXJ/Ke1Am2QchuMYOaNFSAVznB9qAm8f10D2RmX8jDHP3oLbebtA6ej0m2Lr\nfX6LcX7IMskf8kf6HcffIoG8yTadZxSTxCK3kRZUwSFfkruIJ78GhiS6Y1OS3160uZJFWO5bwZtx\nzuQ8bcfPNMZXvo2wsLnQ9R0q/maJNNv5Yo3bjCuMAHPzqA2jdUan0lF0/ZXcElxp9zE+5WVd/DE7\n1IPPB7H2po1bSNXsdYthLp1ykyEcj+ZT817ioITrnoux6vs1gv5JYnjz4ckZ/Ln5etA+6N0BemdB\nttMina4WEFfFdQpIJJ7D60E5I4Vo9qnnsQO1A3k0yzeTxhCizZJ3qNpz9RQO449igMSxHGW5NAIw\nBtUAUAMORkfegMhG3jtQD8+fvQGXJz7UAHuRQA5YDI5FB0qCQA5yaCs2/SFit/Jd3AmvJ2bO64ct\nt5zwD2oLMilVAUDgcAelAJLbhgZz3oGN9HPIYmhtrWRw2czjt7Y+dA+h3mJS67W9gc0AvuLYANAD\npkZABHY85oPOnxy+Hx06Z+odGjC2jt/7qBRwjH+cY9D6/OrKMebcceHwfaqCYIyDgZ96GhHOFJI4\n/WjQpXnsaCz9J6fDqGvRC8OLO3Vri5PB/hqMkfc4H3oDT3UupapcXrKS9zISgDdhnAGPbsKC5aLL\nBHq9p01c6bbagPE23kpJYhmz5IySAAMj6nNGdRnT2lu3V9vaQQrJDHfCMFj5kAfufsMUFogu5H0j\nrLUYXK+Lq0aRse/lf/8AOKlFfudagvbnQpNQRmtILydCwPdCQcgMOMZFQanPoeiawBd9M6s9jeKP\nK1vKQp+RFA4septa6fuFtuqbRrmzx5b+BAdo927A+vsflQXfTr2z1O3W5025juIW/mjOR9KAZI91\n4khaRNo4XdwT9KAl3b2+oWpjMoZWbOVfnI9sUCrXUNssUU8w3sQoJH5jQLvwQQC3NAKvuUPtK54w\naDg23v6UA7weBnNAIOBigMr+hoOjdZQdhBx3waAVG0Z7UBWfAOQSflQChyNxBAxQRutarb6bHALi\n9trSW4kEcJnGd7ewFA/j8QEK/IA/MBjmgWDDBB7igj9dupLTTbiaHZ4oQ7A7bQW9ATVgwXSNV6on\nl8azW6t45pWdxHIxWA/zNtz7A8Glg2S1u7fX+nt0J/H2c4MMhmQoW9GBUjj60g8sfEHpebpDqi4s\nHLG2Y77eQ486E8fcdvtVFekGW4UfegKVAAKgnFGhuDzxQXbpDTZF6a13UnUqrCOzQ5wGZmXIJ+lE\n0ppkEK6nJcRWcTW9hA08iKcjcowpye/mxQ0+6VRbC/jvLm48L8LG9y8pIOXxkDnuSTipqHXQMng3\nes9S3fhn8DbvcZI5Mr/lH700dc3Dad8NtPs4nU6jeXD6nMCwBRF5XOfU8YHrTNJFF1X8RawW1jc4\nGxTKNrZB385yPkBTFw1stSu7Ni9tPLGSQfK5Aphi8J8UNUm6fn0u72yvJ5fGbuF/39aYYtGgadp9\n/axXnRetzaXqnhqZI3bEcj4547Ak/X6UxFisPiXe6NMdO65057eQAr+LhUlHHbOPX07UwWXpQ6Bq\nMo1LpgW0sioVI8Qgxk+684qC028M5890Y3kHKbUwF+lA4LDOzu2M4FAOG3DaoI9cntQdJxzQEyR2\n59f/AKoGl5fSQRFo7ZpB/MhYIR9zxQdayyXKb7gqox5Yo2yB9WHc0DPUIWnhWKxkuYFRs5gcKWbP\nY59KBkx6isVeSGW31JNwHhyOUkA+o8v9qCfjkMo/LJFKqBmRvSgc2swnRyFcYODuXGfpQMtRsLK8\nvYJL+wjuGiUtHK6hghz6Z7H6UEmCsig84I9RigiruC9t0DaaVmIIHhTOQMeuGwT9qCJ1ywv9T0U2\n9xFFiaVBJGHz5M5ODgYPY/arKJPTtLW1t44i7SKq48w8x+ZPrTRJoipGFQAAdgKgzX47dMJrXSrX\nkUe6807MykDkp/MP8/aro80FQyZ+tUJ7hvH0x270XQ7KGtXvIk0T4c9P2bIhkvpnvJVfjIxhf7qf\ntRDXpu0/1DpzXltUlkvmWMBI+2zdnn64oYa6yX0XTm0i4jQ3t6wmuV53xov5UPpyeeKyLbpFtZ6X\npmn6TqNq7/ic6pqQRR/DVf8Alq2fTOP0FXBnXU+ox32o3lzeW+JrxlMXHKR9wfbJ/tVWK5f3AnaA\njafCTwwcY4BOM/qKKSjA4Dg8j37UHZKkE5P0olSFlcLDdJPbTNBOigjxOVZu3+80Rbbnrq9l0t9I\n6isRd2rgKpPlZMdyre9An07oupoh1zo2+lea2fMlr+WZFx7ZwwqWDVug/ihDq7R6b1EPwmpMNokP\nlVj8xng1BqEUe1EAJOMDOc5oDSxq6YYeuaAJF4oCBUQ7mJ45zQHYB14wR86AVjBXyjge1AEcRTHl\nA9hQE8kbgEohJ5yQM0ETHNqMOr3IZQ9tIMQyEjKt7D3FBLqywRPJKTuxlj3zQI3Ut14e+yhWRj28\nQ7RjH60EfpF3rU/jLqFrHbS4/hqpJXH19aCRa8jgiVr1xGwXzYyf99qA9tc29/aRXFnKs1vINyOO\n2KByoxwe9AYocHGKBvdwLcWzxSLuR1KuD6gjBoPHXWujt071Nf6YSSkUnkJ4yp5H7f2rQgWAA3Y+\n1An4j/1t+tBrHxKuYS+gx24LRx6ZFtI/lz60FY0+/v8ASphNpd68EpXY5AGNvzFF1YOirZbzVrvX\n9dkNxZWH8eeaY5Lyj8qj7kcVlETqOqXd/HrPUNzcNE16Tbwxf1JkEgD2AA/etBte9R2Oq2cv+p6X\nHJfBFjgmjkMaRgAAEqO5o1FWfbgjsR8+9AlI5CgEggeoNAq0iug8uD7g80KKmCcZ7fPmjJzJfT/h\nWtjJvhOPK/OOe49u9A96X1W90/VrRtNkkSfxQF8I5yScdvX6UGidSLpfVFzcvbRiy6kgZBGysFW7\nB9T7HHNSjU+o9S1iz0e2uNLmX8RYxJ+KgYeVwVGTn5d6gjug/iU3UOt/6TewQpP59skL5B29x/8A\nYoNHPB78Ggb2l3bXO78PKsoyVyvIBHBFAoSkbfyhn4GfWgTnmWFN7ybAvc4Jz9hQRdx1dp0S3Dw+\nJJHbDdPIUZUjX3yRz9Bmrgzbqb4x9Oxho4bB751O5HPkXPsc80wQHT/xrJ1IHUbGKO0kdRiBiAgz\n+YjnsPpTKN/tLy3vLOK5t5klt5F3LKhyCPemAYLuK5XMDEj1OCP71ArGWLMPT0oIbU7h11u2t49O\nllWWNm/FIRsjI4AI/egfQ2ktpbww2XgxoDl9wJ49cUCHUGv2GixM13Mkcm0squwUH5/SrgxDW/jF\ncXOteHb3otrKEEiRISRM3zGc49v1qDT+gfiBpvV7y2unxTxywRhz4ozuHbOR2+9Bmf8A6kNIEWpa\nZqiooEqtBIR6kHI/atfRjDEt3AKjgVQjug9j+lQWh72e/htTOzyeCnhHPomeMYoJvQum7vVD47K9\njpsQBkvZ5NoAHcgUAa7rKamE0Lp9Xh0G1OZZTwZSO8jn9cCsivdS38F9cJDZIY7G2URxKe5x/MT7\nnNaEKrENwAFPPlosFwS2cd/cc0UlIm3JOeKDo2LH+UA0SjgDk98URzPiJ2449e/NAbS7v8PdpKkp\nikQ5WQLkqccGgmYNQmXWLeQLG9wVRQVPlcj+Yn3xQa98OviAjz3WjdXSpFdliEuJCNjDtsJ7enep\nRdel+kdL0rqOTVdIsoYklV1dixO3nunpg9jUCnU3WMeka5b2EUcl3JInmigQs6ZPlJAHY8+vpQP9\nO1m3nthNo0cTwM2JDwoVj6H5gd6CbhtUiVn8TcXO4ktkZ+We1BAf8Z6fZ2uqXWpyxQrbStGseQzM\nB2IA961B59+IHXmodXal+HsPFh04HbHCo25+bY/zQWv4f/CCxvII73qC8iuXYb1tYZeF9txHf6U3\nBatX+DvSl86x6cr2dwjbnEUmcj6Enj6U8hLdJdEX/SmowJp2tTT6Oc+La3HO0442+3NBf1LmRUjj\nQAfmc+nyHvWQockYyQcY3CgaabaPZxGNnaUFi3mPb6f+KA2q3RstNurnBxDE0mPfCk1YPMemaP1L\n8RtYN9fJPc2aMUaVmCKg54H0z6VRYendf6Z6T1W56a6j6fgfwJyguhGJmPzbIzjHtSjTn0zSunbi\n01fSkt9Os5GAmWNCDOGxtXb6HnNZEZ8etOF90DPKFy1rKk3zAzg/3rXI8u7zvOTg4zVoTLDJ81QW\nDTb2SwuvFgcrkbXwM5H0PFGqsjpd6+kcT61Nc2ieb8OikFc/9PA+WfSjKA1nWBzpFlZ/hLWM4KH8\nzsPVj6mghN4IyQRk5NGo5BkFmyAfSgVjChdpGO/FAXYpOHLBe/FAQqoBJbA9sUBGxgtgEj/eaCf6\nDGjt1TZf8RNGumKS7mQZQkDIB+WaMrf8Ub/ovV7V20JIYL62K4khhCLOCcEcAdu9BmCuEQvxvyFU\ng42+v+/rQaj0zax/EXRY9Nns0t9TtM+BqCKAjEclXA98jn+1Si7Cz6u6O0tLjTrxLu2tQJJrDwcK\nE/m2M2SfeoLrpupDV9Mh1OytUS2vIN8m4BZQf6T7+vPpj50GfdK9L6rJqk1y1y0elRDKRqdjHHoy\nDhjx39e9BZr7fagW0j3kul3iETRqHkeF8ZBUjkZIxjtk5rQ86dW6r+O1OcW0UtvaRsY4oWfLKBxz\n7k/5NA46P6X1rqS6WPS7V9v88rAqi/f3oN46X6C1DSotkus+BIwKl8hn2+3PapROXPT2t20bPY6k\nJ5UGYmbIfIHGW5z68VBI6DrzzWSrrAjtrwFUbDja5OBlfuaCbluJLeNwIpLiVF3bVXAP0Pv8qBxL\nO8cYcW7vnuqkAigNFKs8CyxlwG/lcYI+1A31ayF/pt1auSFmiaM/LIxVgwfoO413o3qqfSLyUSwo\ndogAyZVGcbPTPr71aNDvendJ6wtbu7Fi1lezK0bS4VZMjtnFZE0bC5u9Jh0qRAr2yw4uWx59vBI4\n4PegN1tpbap0lqOk2sipLPB4aFsnHbBNOR5A1exFhqFxbeKkngyMhdOxIPcVuhiZFz/zBUEwcKvY\nnP6fWi0+6chjn6h062uATFLcRrIMnzAsO9EehNR+GvTV3GUh0+O2YsGaWHIf9amjIfib0no3S0Vt\nFY3M000zMzLJtLKvvkenyx96oz0rwNjA8cj2osFLbVAbOc9jRQiXOAwxnj3oBlAxwDj37UDY+vHO\nQeTQBIdqjcPMfnQwJclWyBgCjJBFeefw4VaVycBUGST2wAKD0L8H9C1rSIILjWLSCytY1lZASVnl\nL4PI/wD8+vvUo1uwbxI5GkjdVc7isvOBjtj2qBWKFZiQ8CJCB5FHYj5jHFArDbQ20ey3RY1HOAOP\nsKCH1u61CPSLt9MtlXUHUrbCbJBbPdtvYetXR5T1y2udD6lni1ErJdJLvlK4wWOCePvVgsV/8Sr6\n7UW1vA0NiowIonMe4+7FeT9ARQRmodWa9EYpPBhs1Tygw26rk9xknkn70EjonxZ17TXjAeKTkZ3L\n+YZ7N8vpSjX+lOpNM6umgkMG3EgBV1DYbG4kewz2NZGkC43CP8MPFBONysMAD50DaHVH8S6N1a+B\naxMUjd280pA5wPb296DrXWLK9WNoJdtwybxDKPDcAnHIoJBifTBzzmgaz2UFzPFNNbwvLCcxuygl\nT7igdRRKg8qAZ5JAAzQEnuYoHiSWQIZW2ID/ADH2H6UERr12BY6hueIQJaO7SK/nHfnHtx3pyPGW\noN4jynuCfU963RF+DL/UtQWTkjaWY/8ATnHFGql+j1VerdJY8r+KiJz/ANwoy9C/EjqSbpbRY723\nRJC8ojIcZ4IJ/wAVkecer9en1+9FzeLCCq4URjgDP7mtLhteadBY2kMczyHUpcO0YxtiUjgH/q9c\nelAiLy1kjCX1ruyMLNGdrj0+h+lE0+t+kNQltJ7yKS3jgiTxUFw/hySp7qp70NV6YEBgWUNjBoaK\neAODnHrRoVgDnBP0ozpxZ2f4y5trVeGuJFiBPpk4zQep9C0LTembS30fQbWP8ZsDyTugZgf6ix9f\nYZpbgmbXSmXULaa6kMzpltzcjJ//AGpaLCY1CDsF74PrUCgHY0HbSx7Z96BGUfxB2xjtQZ11t0Tb\n6jNfyw2wM18gV5AcBdpzyPnV0Yp1F0o/TEczXjXaTOQYpIk3QlT3B9Rj0zVl0VKbVppImheUSwbs\ngFfXHc0De0tri/ujFYQSSyfmKopPHqaDV/g9p+padr/gkSRTzKu0kZRlPLYPbOPf2pg9GWzRCMJA\nFxH5do4wayKX1z/G0CdzqLWRkiaTxQBLudclQvovbv3oMU/4Z67uwnUAt3u1Zw42yhmx3/Ln8v0o\nN86L1d00i3i1UiGQIocNnEbnkqT2xgiguEbI4DIysp7EHNAZnxQQ/Usksej3EsCl5EUthR5sY52/\nMjigr6Qrp3R15LqEcIlmgdpFGAsY2navPJApyPJtwd8rnGBuJz6Gt0MzGSTyf0qCwSKA5ZsAjnn2\notTXQYj/AOMNIDqCrXUZwf8AuGDRG6fF6Gyfo6+ub0CR4EPgIScLIeAcfc1keatN0661a+S3sYTP\nKzAbV9B7/StLrQ/iXp9pYLp8elWsUM11AzXMqt53I7g7j244oiB6W6Tn6j2TeAy2FspTeB+Z+/8A\nmgtnWlvpdl1Dp1pq07Ja20GFQpuDHHAwPf39KDHriVTKSPOCeBnHHtQGsrG5v5pfwcTOIlMjgEeV\nfck0XRIreS7uUigRpJXOEVe5PtRE/wBJ9HaxqvUcdhNFJp0lviaSWVcMgzxgdySeBipo9T6O8Npp\nUJ1K4iW5KgSvIyqxb5jPH0paJm1NvKivE6Mp7MpyP1FQLRTwy58F0cjuAckfagOTtO3+Y8igMWCI\nWbOPlzQNhNBOWEbq5Q+YKc4+tAD7JEZgQfXj0oI/VtIttXsZLW5hRopByCP/ADVlGRa78Erae63a\nXK1tG3LAncM/Kmh10l8IZdBv4rxtTE0yggJsyoz6/P0po0zSNKEMdo9xGnjxuzkqMAEgjj7Gmial\njWQMgyCRyQcGoITqHT7q/a30+G2jFmwLSzl8GPBGFA9c5NBPRwJDbpHCipEi4CjtigqfWltqCaG8\nWhNbxyzOBIs8W8FcY4+dWQQ/wtuZdIGqadrknhy2u2QyOSEZOeRngY+XvTBZZevOmhC8janbqiZ5\n3Zzj2FMFcs+sh1ZqsFrp8UkGkrlpbh+DNzhVX5Z5NQTfXyWUXSV2t+wW3EZ5I4HHt61eYPI0mA5C\n9snFaoLsPv8AvUEk5JcA8cZG480WnOlXX4PVLO4yQ0cyP244Yf8AiiPUfUump1B0/c2O8xfi4v8A\nmL3UcGpgw/SujNX0Trj8PpckimOMvHO/kEg9Rjs3PpV0aFq/Qqa1ZJ/qcrverEqNOwGM+uMfemiV\ntrKbQdMNjp9rvtkhPht6mU5yT8u1BkvXg1qXUtOvddgRY1R3j2YHiMvZSD27CgzSCyuNQ1KK0giL\n3Mz4VAOc/wDignoNNOnaHeiW8hgkku/Al2+Ziqgn09M0ETp0qpqSmGKOdFcEeLwMfPHag3JLuCRt\nPmQWsDhNphtVAcn1w3BPFSwDdWGpX1/OYdOtbbSrlQ80szHdn0GR24/c1AbWemdatLbTJdGvJIJy\npDQwMV3exwOPatSz9Ei/R+txy2mr3evyHV4miWIDhGwwyGA7nGRS2YNZAUBWYDdjGayEvxMYB3nY\nu4KCfU+woG93c2enWs1xcPFDCp8zEgDPzq4GGgz22saS1zZSZhkdsFePXt86YHWmySeLNDMYikZ4\nYNlvvUD+VARxQJqgwRQHUAAe2O1AWOFRM8mDlgB37fagb6reXFt4ItLZJnZsuWfaI0Hdjwcn2FAz\n0nWX1i4u4xY3VpFbv4eZ1x4vGdy/KgkriN2aMRlQoOW3DOR/5qwYr1P1tp2pdS3WnanKkGh24kRl\n2eaYgcb/AFxnnAqiv9Jno0dRLJPbtdQtkNPIALaMnODsPPpSjbdK0DTbWQXui+Gsco3BU5hPP5gP\nT7VkU74t6PZHpq/1N5ZZbwrtRnmOwDPOFJwPsK1xR5ybudw788VaC5X2WoJRULSBpAe5PA/aiinA\nZnHck4A70THq/Qr23/4Y0u4lmCpLBGA7epxjH60Du+WGOBvFlFuWOFcYyCfbPrUojri6k06xX8PF\nNfBUJ3ltzM3scVBjfVvVXVNit5dapNDZGQGK3shjeAe7YHIwAOT3zVggNTiu+orrR4p7m+upJFR7\nh3TPhggDaoBwRjnPH5hV0af0xotnoD3l5dWdrY2YjGLhwPEHoef996CC6m0HpuPpk3Wny2s9sJPH\nJ3AeI2D39T37UGU9QTDULuGPSLPwIyoVIYk2lj6/X70G2/DPp0hVudRuBLcwxhRGkeEjB9M+p96D\nSLprVHiieaAE+YxHkke4H1qUOIBawL4uAuc8nvj71AwjRtQ1eO78QNp9odyLju/qT8uf70Gb6r8S\npLzryy0vp+4NxYSSCEswI2u2Rn3OOD9qC4dVamen9NlaC7tUaIFvCmnHiy4HJXJxnOeDVwed+rOv\nLnqSyWO4jZSru/kc7ck+30GKosXw2+KmqaDJDY3jR3OmqNoRhtZAP6SP7Ggtmt63qbTJ1XLazJps\nlwBFblypEOAA7L2OWANS+xrnR2vW3UmjJeWp8wJSRf6WHeoJdSPMCRmgMq8DmgBpNsgUIxBGSccD\n70DczmS8MDWoe28MN4+f588rj980CktuJZYpFdlKZ4B4OfegQ1hpIrVjbsRMBhBj8x9qsHnX/hm3\n6y1O/u9V1ddPmS6aD8OkQdyxOSe4OMmqLUvwQsYY4Xjv7m4YEEhwFyMY7fXB5pRbvhp0jqfSMV7b\n6jqZvLGQAwxAEBDk54PuD6VkVb49a5DBpiaNaeF/FIaQDumOwpzMGDEZQZ5+VboR8In1I+9QWDY6\ngFn7jjHpQhtJEFbAGBnijT0P8H7qPVOh47a42yNaymPBOcDupoykep+m73V7g/8Av2itQowvJIx6\nj5/OpRjfUWrax051RPY6LqFy8YACkebO4Z7HjNWCY0ToW2utJbqPreW5na4O4R78cehY9+fQVKLX\n05p1ro97awC4kX8VFmJLeEKdoyfOxJPbHbHYVAz0rqKPWNauri9t1ktJgILYgEiNFJ/Op9STmrBB\ndeaFCo0y3jt444DI3jLE204Y5DD+9UPPhv0NaRtPq99mSLOy22nOfdh75oNC0vT7m1uJGvGiii3A\nW8UDbQAeDu9zUohLlhouqap1VciF4I1FtbxSthtobBIPuTn7VBJ2vUth1TYk2ULi9iALwyKQYz6Z\n9CM0Ft060/DWEcDHe2Mucdye9BFW3SekWt3LPb2cUTsd2UGCG9x7VYMzufhzdX/WmoXj+BPpx3I7\nXZMmXYckc8EVRKaP8I+nXikLQuxOQSTnBzj6UEjonw90XSrq3S3s7dplJcl1EhGDx396lFx1TQ4N\nVjaC7UNCU2lAO/8AvNWDCLp9X+E/WgWImXSp2LRq7eSRT3B9iP8AFSjd9P1+21TRodVsMS2rLmTb\nyUGOePXFQSltcLcW0c1vh4mXcjDswoDLdRm4FvISsgXeTghDzjAPbPyzmgVFxCzuiOC0WN3sM+5o\nDqySJmNg3rx7UFb60tNUubGJdFdEvhIdryflUFSM49TVgyTQenJemOorf/U4H1Fpp1edAh/hOQTu\nQ9375JA4q0bnbPBcxxT20wkjKkqYzlT9ayGWu38um2MbLEJ7iRtoUds+/wAgBzQeW/iHqi6j1Pdz\neL44HkL9txHtWhVUOVyvHNB2F9zQT8hUAhAdp5FCG0mSAzE4HGDRppvwL1bwOpJbEsFiuYyVX3de\nR98Zoy2ZtRgmjkSRZocEp51K7se3vUow/rfpFE124mVpfD4mk2MWdCc4A+VWCH1281/UmFnpklzP\nYRFBEG8uGC4yQfcn9alGgaJo95rRsbi53WaxwrHOm7BjYcHnvz/moJaw07pXSI5IW1K0CQnDhpAW\nB9R796CudY62msTRW+gadI8KnDXMkLLv9MA8HGOKC3dAXF1dRfh75f41moi4G0AdwcfTj7UFhv7R\njqMBV5AJFZHkR8FRjIx6CgpXVNjJ1JqNn07p26CztSJLlpIydyj2J+fGaC+afplrazqLa3SKNIgg\nx3IHYUEsBk4wQc4oK11L1z070/M9rql6wuVA3QopLcjNBDwfFboqeSO2W7kQNxuaEhQfnQLt8Tui\nreVoV1UeXnckTFT9DigHRuv+mbu9ZV1W3Nyc4IRlVl9O47/KgtU+s6baw+JcX1umRkAuM/p3oK/1\nt0rYdX6cqXKESqN8Ug/Mp9P1qwZ702mo9GdUTWJsmOn3EY8CAORGXJAwScjJ5q0bJDNLb6YklxbK\nsgA3wwndg9sDtWQN3aw3ZKTwLLEQOGORn6ehoG1vYAw3FikRt7JSuH3Hc/GSc5P0oHn4aO2uGuYy\niose044wBQIm6F1dwfh5ARs8R8L2BHGfnQHv9PS4PjxrGLtFKxysm4qD3oCxboIIo7e1jhQHzAYU\nJ8wP8VYM56j1ktaal1BMrS2sAaK1OQDD6eUepY9yfQVR5zv7hrmaSaRtzyHJY0DcE4BPIPb5UBwO\nO4oJYzFvzEYHAH9XvQhNZN7AEgDOSDRo/wBA1SXRdVtNQgb/AJUgfBHcZ/8AGaGPVlhPbarZ2t5C\nEeORBKje2RUrI1zYxTBhMinIwcjvUEcugWkO4AMisMEA8N69u3yoERrOhWNxNYy6hapcxAeJHM+D\n8u9ASLStLlm/EWdpZyxy+Z3RQ3I5B44oJKTT4blFWSNBEOeBg5+goFYbOK1TKhIxnIbGMH50Cpcy\no6AMrIcM2OD68Ggb6Lbbllu5Cd88hYBu6rztWglSNkfm4P70Gaat8Rba96w0vp3R2mhufxyi4kO3\nYyDOV9+f8VYMw+P0cP8Ax4JVuEKzW8bEr5tuMj0+lUZ7Y2X4288GK+towRlZXYqv9uKCQi6YmbT2\nu11GzaJWKnYxbBB49KCFnhubdiwL+U8OhP60ElpXUFxY6nDdXQF0qYbZKxwT9vWg3npb42aHcmC1\n1C3uLSQjEkpIdQfr3xUondP6x6e6tv7e101hczRzrNtaFiFC/wAxPYHtUF+lj8bYCTgMG59cUC4O\nBQQOo2eoXepFTeL/AKYQN1sEwWx6Fu+DQLX2kw3Ok3Vjas9qJ48Exd1PHb9KCE6R0G86Ut7mK71K\nK4gklM7TyKRIBjtjtjj96AOreudJsrMJbXksk8jBCbVdzRjONxBHP/3QQ9x1jcWGkERWWqXdpMPC\nt7x4wfFOOWPbA+fAqwZr8TJ9Qbp2ymvEjsrSTEVvawyHz45Lv6E4wPqaoyl8g91OKDlYEc8mgKW5\nPH7UE80f8PPHl7gDFAZkUjawUIQG8w5ouknAUbl9Dg59KK1X4Z9XXFvo8mlRXax3KHfBG8Rk3qe6\njHOc54+dMZO7jr/qK8vWtba4tYu38TwvDOMc8N60wPLbrW10PS7pnvrnUtbAKobgBUUk9jg8f/lM\nC2rydMdRSaRqWoLEbx4UefwxkL2BVvvn9Klgv3Tp0lPxFno6wJ4IVmEOMEHsf2xUD2e4ks7n+NGD\naCMu8q8lCMcEfPNA6tW/EwrMybEYZUHnI9Cf/FAzu7G4LXTWs38SRNqhs4Bz3z9KCO6x07UNT6al\ntNMvEs7xkC7nPlI9R2/egwbrDT+r+kupLCeK9nu3KBYGRy+QvdWFWCU6avtA6h1iKDqLRhpmpvkx\nz2p8JGb3z7k557VRX77TdHteuPBut401CAouyXGcdvmASaC069030brYaay/CwPFwWspRErfUN7U\nGZX2hWSiY6ZrMc0CvhUlBUk/UcGgiLq2mtG8F54yDwfDfIoGkrRsSZXwOB2zmgsvw06XHVfUcFvI\n22xQ753Ze4H8v3OBUo9a6XodjpltHbabDHZIhVsQqBuA9DxznFQTQUe5oDYGMnn7UEbpV3JqDyz+\nBJFbBtsXiDBf/qx6CgDXL42cSRwGM3UzBQrHGFzy32oG2i2kKTSI80lzMow0rqQoyew+3tQO59Kt\nJJRI9rEzgg7igz3z/egZ6paJdGGwW4eBXy7pGeXUdwT6A5qwebPjJrcOr9TvbWZQ2Onr+Gi2nIJH\ncj7+vyqigOuRk+vtxQAqEk4BU0ABj7j96CzzKxYD0GeM0CQG3OMAjkfOgbSZwzE4PJyfWi6caTdz\naffW95akrPFIrLg/tRHpGzs9C6t0W31FrO3Y43MrcbH9c/eloZ6v0JpWoKlrHHBbScSFEHYc5Pz7\n1NDXUoJrK1g0dvw9qsspW3nXaN6KMrHnH5ieSfan0U3Rr1uidaRbiwk8BUSS6naQkjc3ZcHaRnn7\n0wbja6lZX+nw3NvMksM+FXnPJ9DUCeoXj2hSG2t2km7op4U/f/FAvHaNePb3N0jRzRA7VD8Akc9u\n/FAvcxnawZQ3HYtjJoKfDFAdeub6Vo1dSULIBtTbgYOfU8jNWUVvrm5ih0m1urixhlsI5HJliOwR\n5/LkkHHJPamjHdQ0HWdemlutN0+YWBYtC0rHDhjwVz3zWgx1n4e9U6QE8XT5Zd//APR5se9XBXbj\nS9S0zAvbO5tyWKAOhG4/KpQ3ZHXO5JFK98qRUGhfCbph77Uvx91pv463wVjR0LR7s483796WjW7r\nTrXpHWrSW2YK7lmXTbaIFpCRjjHOOSeeBipaNLtXuIre3R43lnkGXYADZnnmoH6Dkbzn6UDGWe9a\n/hKG3jsW8riQMJS3svp86B6zgMQmDtGT8qDNb6XUpOoPx72tzOkjFYowOduDwDjj70Gg6Wsq2KNe\nAJKRuKk52fIn5DvVkENrvW+iaSAsl0txI2Asdud5Yk4A4pgzv4l9ST6JZSXbyyprWpw+FFa5G21g\nz5icfzH3pgwCSQlh688+tUEwjjngZ7UHAHuWAHpn+1AXj5frQWXOGBZcKSe3c/rQIyAtnI27eBj/\nADQIMAuH8vHBB9DQwVpPLjOckEZ/ahi9/Czqj/S9VhtLm6aG1uZFUsT5VOfX5Gpg9GiNJArxsrxs\nv1BHypYGF7pljeG3kvLZSlqzNGGxhSRjP6GoG1yLUWiWc2nSPA4KJGItyYHYHHarop3wu0jWYNUv\nzriNBp8ErraRMANxJ/N7nA7ZqDUHgSQLvAbacjI7H3oOuIFuYzGS68jJRyp4+lA0m0yDwGjiTw3b\nzBwTuDe+TQVbV+mLmW1NtbSok9weZiC2zPLEZ+/FBM6Xo40/TYdL8Jr21G4vJcuCck55HbFWUKQ/\nh4tR/DTz2o8TK21qmMgKOf8AfpmrokljG1i5BHI57D5VNorut9Lab1LA638W6H8sboNrqQckq3pn\ntV0RWsfD6K7SGC3vTFahQJY2iVmkI9d+Mimie0Hp2DQ7AQacio3JZgqjcT3zxk1KHGldPWtnqMup\nS5uNTmGGnk5KjGNqf0r8qgmkhVGcquGblm96BDUZZYLGVrdN8+MIvux7UGKTdXdbaRrFvbaxbWN4\nd58BmwCjHPORycLx2q4LNe9S9TdN6I13qkWmzSXdwBCGlO4hiMKAB2A9ag0WySQwpLLtMjDcQBhV\nz6CgoHxF17XbnUYunulgsUsu4TTvjIUAEhR+x4qwZwtkOi7651PXJobm4tohHbQhdgecjnaPZeOf\neqMy1vWLvWNQlvb+ZpJpWyT2A9gB6Cgjy5AO4A5oAGRgBR39aA7Z8MkFtxPY0AbV9UGfpQWhj5Tk\nBQGxuBoEGG1iQCyHvj1oELgSkK6oRnIBIxzRdJ28Q3+fHiAds96LoH3AF1wCfyijNbF8JviI1rbQ\n6Pq/iSopxFOx5Uf0n3qUbWQk8II2SRyDPuCDUHMpSIiJQSBwDwKAgTxApnEbyIQ+APyn0+9A5B3A\ngfmoEWgcb3VlMpGFYjt+negSs7zxH/C3RWO9UElM8SAHG5fl/agNdXcEbJAZ1WadvDQDJO7Gf7c0\nED1dqWv2enzw6Rb24nZfJd3EwREHqxyMZHzOKBbT7H8PZWTK5uZ9o3Xm1SzEry5PsT7UFF+JnUez\nSZ9LttRs2km2m5KSFWXDZI491AyBzVwK6J8T7CRtPjee0tbaGAtdNISdoXgLEo5JJxyfSmC6aF1f\no2vELZXDJOxwkMybHYe4HtUFiJWJd8rKqjuTQcZV8SNI0dy43BlGVA+ZoBniE0RU7tp77Tg5zQUv\n4hNrU2tdNWOhylPEnaS5UHGYlAzn5cn74oHGt6l0z07k6nJC123HhKPFlbPptGTj9q0Kx0XMvU+t\ny6vqQtpWlZo4LOdGDWsak8Aflycgk+v2qC8a1q8OnaXLPOz2kCIWkZ+CqjgYx6n0xTBkmp9Sabp0\nKdRyI5vJkaGw08MVKIDw8jA557896QY1q2o3eqXr3N7O8skjnlnzgn5e1UMCGV/MOM0BJFOVwfX0\noFtgZTjkg8UBtpOeO1B3hg85FBZXVMM+VJAA2+h96BO4IMJ/p7qvuKBKacmOKB5CYYx5UzgDPfHz\noGwD5OApJHAHrQEAk8NWdNpx+XdkA0AIGhkGWOQcgg8UGw/DP4kmwhi07WCTZqAiSbstGc4+pFKN\nvs5o7q2Sa3kWaJxkOp4NZDOHUh/qL2k8LW78eG7kbZv+0+/yoEZp7fUpX/BXpgvYZTCSRtO7vtwe\n/vQdY6jeyatPp91FEPw8aSNMoYbi2cADt6Z70DS60KW7luJdV1JniJzBtURG2b0KN7+/vQKSWUWn\nLLqN3cSLP4ex5Y8jxiPykr23+nzzigpXUPVOu6Vqmmf8UWttb9OXDqkjRnfI3H849uRkDOKC0axL\nFr+nLB0rrUMM0bqCIGGGX1AH09qsGc9UfBiTV9Vhu9Pu5oPGLNeG6bczN7jHvVEr058Gre3sLeDV\nrmOdo3LmSFNjEH+XdntQXO51XQOl5YrCKGWa8SMYS3tzMyLjjJHb9alDqz1S5ktJ7nVdLmSVDiOO\nNfEMiE4Xy+h9xUDm11CaTxEOn3VmpHFxKFCr9s5GPmKAus6jb9M6RJf3c88yxpjcxL7uM5OO3HrQ\nVTSupoOuYdZMTSpptriNFtXKXDA/Pjhs9h2xQOJ7Xpnpa2S91WK2swqjbGw3ysfcnuxrQsGmapYv\npwvra1FtDL52Mi+Gx49sZoMb+LXV0t+jWl3OYLGTO2zjx4h2nyszHsG4/Sgxt5ZJmEsjl3PB3GgS\nlyXBxkDnNADseB2PsaA8SoXQyFgmQCV70B5R/EIjYmPJxnvigEKcYDfrQF2/X9aCwqC7l2zwfT/F\nAJJ5747E5oGTqZArKOfccftQHZWwmOD23Z4NAEkTEBmwR7g5AoG7KSSE5HyFAMTyQsMHa/cEcEc5\noL58P+v7rppdryPNAXx+GfsQe7Z9D2/Wg3zSdX0fqzT08F433eYwscOpHt9PcVkQPW632mX9vfWd\nrbXiRgrIdu2eHIwGD57+nIoKdc/ELVdC0u5afp27SUtta5vJMMzk+UDjzYHtQWDpj4gxXmif/wAi\ntXZkGZzFGW8MehZO+PmM0Fibr/poWQmF6xXA2xmFg59sKRk0C2nQP1KFvdb0vwIUJNtDKcsVP8zD\n0Jx2oJDTNA0vR5p7qzs44pJOXkUc/SgNfa/pNvbF5L2JgTsCo2WJzjGKA1jcNcxOF/m/I0zbt4+g\nxgenNA5s7CCxWWYQxpNLgyMiY3nt2oHajcuexAoEL1C1uyFkVHO1ixHb17/KgwT4rdXWep6oul2O\npywaTYqVLxDyySDjaM9x6Z+tWDPdB1TW7Wa9sumpGlursqMQRlpXwd3BA4571RcdN0i41G7h/wBS\nmNxqdkwn1O6u5/4cAXlYgcnngE/pQNvih8S211obHRyYbWInfJG/Ex9MD2+tBmNzcTXTtJcSSSSH\nH5jngDAH0oEdxbg5A9wKAzPwO+fegSLfLJoFoR5fUfegXOcHGAT8qAM+XaBzQCCwGDuyPlQWJpV3\n7Q5TIweM7u/f9qA9vNYpFML2KaR8YiaJgAh55PvQRvnYoqA+MThcDnPai4PKWQlH3K6tggjnPaiE\nmz4ZznBPfFAVWG0AZDH1z2HzoE7lhv8AJIHI/mGRQI8AEeuOMGgndN6pu7V4RJLKY4WDLhypXj0o\nNL6d+MMS4ttetDdQgDNwAPEwPRh2NZGkabrvTXVZiexvba5aI+ILWZQG3Y4IDdvtQScvTdjK8cht\nFjkQ+VlYgqPXGKA17daV07apJrV9CsZbELTgbu3YY78UEHf9evJ4K9P6JqGoiR1XxjCUjAJ5OT3N\nBM9YdSWPTenwy3t7bWbSuBunUthfUhRyT+1BA2vXnS/jGdeo9LnIHljeLwSCe5zgmgejrOz1S3kG\nhazoaXYGAJ5Sw3e38uaCsJfX02rPD1XfXtvcCXdBJGjLbOO+EK88Y7nIoLB1H1Bb6WkN1ddSQ29i\no/5MZEjzt7DGTjj2FXNGUfEH4wRaxCtnp2kwGGM7llvBvIOO4XOAe/fNMwZbqusalfLBHfzSvFH+\nSIgKo+igYqiwWfWV30rpp03p6exJnUPJexQnxuR+Ulu2PkKCrT6jcSiTxZnbxCWcFidxPJJ96BBD\nlQ35fbFAbahBHJIGO+KAIwg5YnB455oDkKcbW7UAOowSMjOORQcCVXPp+9AqDkHcDmgMNpHPcUBT\nuzQWCJXcFvKR2Y0CMiqjnz4UcH/6oG8gKluwxyAfSjQ6ylEJBJfv37/OiYQMjbjkZXOSP/FEELAE\nkNn1waBCXdjORnPoc80CZeTb5wQe2BQAm4y7jlhjvQcWO3cW4GB7ZpgGC5a3uUeNyGQ5GCR+45pg\nt+l/EzqLTgxj1O5Zc4CSOXCj70wOE+Jd/Pq0V7qVvb3bISAWUBhnuc+/2pgvkHx0soLaNIdKkEiq\nR5yDg47cYpgresfELSNc1n8VrFtAw2ZBiiywwcgeb14x2xTBYNA13ozUo/GOqWVizDc1nf6crIh/\n7wOf1rOURvVupdE6ncpFeakiSWsZdbjSLfw1Zs+VVyMHA75xWsFDHU0idTJdf65rT28YKpPvHjKp\n9Bk49qYK/rGpXF/qU9zPdyzyyMSJJAAx9ifnVlwNZ7vxYEh8GAEHO8DDH5H5U0IPK8jHxSzFQAMn\nOKgJkFwPT6UBlAII5z3zQCjnA5OKBXeuAT9KABMA208DtxQHRhzgUC3KjJx9z2oAP6/L3NAHC8Hg\n/XNAcNtGe4oEy5yeaCdLk7yx2qQCAO1AmXZSSexHbPNAhJuLJkgjvzRonuAJy2cd8UCbyOi453Dj\n7GiYTZyVPPl74oYLJIyq68EH3Gf3oYTDEjLbiP1FEDHOUOdgOfXIBFAm77j5Mnng/WgLI5UE8Eg9\niO9AnuJbuQx5wOBQFRxuIbOc54PrQK28ws76F722EyI4d4HJUOPb35yKBm8oeQsi4BPbPb71RyYI\nHmPGRg00GRsbsHIPY0Bg52AEEseBUCQJyOPXtQDtcdvvjtQCQ/GBwKAuXU4PrQBvZE5IGeO1Affj\nBJ57UBvEO045HagFWAAzktQKIzBeMg0C5kz5mOG/WgMrDJJ7jmgEnIyOccYoA3cEMRj05oC7/wDe\nBQTduzEoNxwcZGaAJOWfPNAlISVOT60aIQfkj+amgJ3bnnigKeFGPQUCf/x0Smw4V8exogX/AOY3\n+/SgKxKxeU459KAgJOckntQJkkcgkGgAAFFz/XQEmJaY7jnk96BM9yPQelAf/wCX7UBv/jagGP8A\nKB6ZoDf00HMfO/0oAH5TQA/5moECSMDPFAvGASMjPP8AigVX+b60BW7/AHoHEJJD55oDd4snv70C\nsSjCcDmgVAAbgYoGYJ3nk9qBUAYHAoP/2Q==\n"
}
- }
+ },
+ "id": "uid6"
}
],
"nbformat": 4,
diff --git a/test/ipynb/simple.out.native b/test/ipynb/simple.out.native
index 4c060b82f..a17c36a41 100644
--- a/test/ipynb/simple.out.native
+++ b/test/ipynb/simple.out.native
@@ -1,15 +1,103 @@
-Pandoc (Meta {unMeta = fromList [("jupyter",MetaMap (fromList [("nbformat",MetaString "4"),("nbformat_minor",MetaString "5")]))]})
-[Div ("",["cell","markdown"],[])
- [Header 1 ("lorem-ipsum",[],[]) [Str "Lorem",Space,Str "ipsum"]
- ,Para [Strong [Str "Lorem",Space,Str "ipsum"],Space,Str "dolor",Space,Str "sit",Space,Str "amet,",Space,Str "consectetur",Space,Str "adipiscing",Space,Str "elit.",Space,Str "Nunc",Space,Str "luctus",SoftBreak,Str "bibendum",Space,Str "felis",Space,Str "dictum",Space,Str "sodales."]]
-,Div ("",["cell","code"],[])
- [CodeBlock ("",["python"],[]) "print(\"hello\")"]
-,Div ("",["cell","markdown"],[])
- [Header 2 ("pyout",[],[]) [Str "Pyout"]]
-,Div ("",["cell","code"],[("execution_count","2")])
- [CodeBlock ("",["python"],[]) "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"
- ,Div ("",["output","execute_result"],[("execution_count","2")])
- [RawBlock (Format "html") "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"]]
-,Div ("",["cell","markdown"],[("tags","[\"foo\",\"bar\"]")])
- [Header 2 ("image",[],[]) [Str "Image"]
- ,Para [Str "This",Space,Str "image",Space,Image ("",[],[]) [Str "the",Space,Str "moon"] ("lalune.jpg",""),Space,Str "will",Space,Str "be",Space,Str "included",Space,Str "as",Space,Str "a",Space,Str "cell",SoftBreak,Str "attachment."]]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "jupyter"
+ , MetaMap
+ (fromList
+ [ ( "nbformat" , MetaString "4" )
+ , ( "nbformat_minor" , MetaString "5" )
+ ])
+ )
+ ]
+ }
+ [ Div
+ ( "uid1" , [ "cell" , "markdown" ] , [] )
+ [ Header
+ 1
+ ( "lorem-ipsum" , [] , [] )
+ [ Str "Lorem" , Space , Str "ipsum" ]
+ , Para
+ [ Strong [ Str "Lorem" , Space , Str "ipsum" ]
+ , Space
+ , Str "dolor"
+ , Space
+ , Str "sit"
+ , Space
+ , Str "amet,"
+ , Space
+ , Str "consectetur"
+ , Space
+ , Str "adipiscing"
+ , Space
+ , Str "elit."
+ , Space
+ , Str "Nunc"
+ , Space
+ , Str "luctus"
+ , SoftBreak
+ , Str "bibendum"
+ , Space
+ , Str "felis"
+ , Space
+ , Str "dictum"
+ , Space
+ , Str "sodales."
+ ]
+ ]
+ , Div
+ ( "uid2" , [ "cell" , "code" ] , [] )
+ [ CodeBlock ( "" , [ "python" ] , [] ) "print(\"hello\")" ]
+ , Div
+ ( "uid3" , [ "cell" , "markdown" ] , [] )
+ [ Header 2 ( "pyout" , [] , [] ) [ Str "Pyout" ] ]
+ , Div
+ ( "uid4"
+ , [ "cell" , "code" ]
+ , [ ( "execution_count" , "2" ) ]
+ )
+ [ CodeBlock
+ ( "" , [ "python" ] , [] )
+ "from IPython.display import HTML\nHTML(\"\"\"\n<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\n\"\"\")"
+ , Div
+ ( ""
+ , [ "output" , "execute_result" ]
+ , [ ( "execution_count" , "2" ) ]
+ )
+ [ RawBlock
+ (Format "html")
+ "<script>\nconsole.log(\"hello\");\n</script>\n<b>HTML</b>\nhello"
+ ]
+ ]
+ , Div
+ ( "uid6"
+ , [ "cell" , "markdown" ]
+ , [ ( "tags" , "[\"foo\",\"bar\"]" ) ]
+ )
+ [ Header 2 ( "image" , [] , [] ) [ Str "Image" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "image"
+ , Space
+ , Image
+ ( "" , [] , [] )
+ [ Str "the" , Space , Str "moon" ]
+ ( "lalune.jpg" , "" )
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "included"
+ , Space
+ , Str "as"
+ , Space
+ , Str "a"
+ , Space
+ , Str "cell"
+ , SoftBreak
+ , Str "attachment."
+ ]
+ ]
+ ]
diff --git a/test/jats-reader.native b/test/jats-reader.native
index 0715ea8cc..02439ce31 100644
--- a/test/jats-reader.native
+++ b/test/jats-reader.native
@@ -1,671 +1,2810 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",Space,Str "John",Space,Str "Gruber's",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,Header 1 ("headers",[],[]) [Str "Headers"]
-,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",SoftBreak,Link ("",[],[]) [Str "embedded",SoftBreak,Str "link"] ("/url","")]
-,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"]
-,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
-,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
-,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
-,Para [Str "Here's",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "E-mail",Space,Str "style:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,BlockQuote
- [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
- ,Para [Str "A",Space,Str "list:"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "item",Space,Str "one"]]
- ,[Para [Str "item",Space,Str "two"]]]
- ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
- ,BlockQuote
- [Para [Str "nested"]]
- ,BlockQuote
- [Para [Str "nested"]]]
-,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."]
-,Para [Str "Box-style:"]
-,BlockQuote
- [Para [Str "Example:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"]
-,BlockQuote
- [OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "do",Space,Str "laundry"]]
- ,[Para [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"]]]]
-,Para [Str "Here's",Space,Str "a",Space,Str "nested",Space,Str "one:"]
-,BlockQuote
- [Para [Str "Joe",Space,Str "said:"]
- ,BlockQuote
- [Para [Str "Don't",Space,Str "quote",Space,Str "me."]]]
-,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "tight:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Asterisks",Space,Str "loose:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "tight:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "tight:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,Para [Str "Tight:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and",Space,Str "using",Space,Str "spaces:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Multiple",Space,Str "paragraphs:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
- ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",SoftBreak,Str "dog's",Space,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Para [Str "List",Space,Str "styles:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- []
-,OrderedList (1,LowerRoman,DefaultDelim)
- []
-,Header 2 ("nested",[],[]) [Str "Nested"]
-,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]]]]]]]
-,Para [Str "Here's",Space,Str "another:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
-,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]
- ,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]]
-,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
-,Para [Str "Autonumbering:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Autonumber."]]
- ,[Para [Str "More."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Nested."]]]]]
-,Header 2 ("definition",[],[]) [Str "Definition"]
-,DefinitionList
- [([Str "Violin"],
- [[Para [Str "Stringed",Space,Str "musical",Space,Str "instrument."]
- ,Para [Str "Torture",Space,Str "device."]]])
- ,([Str "Cello",LineBreak,Str "Violoncello"],
- [[Para [Str "Low-voiced",Space,Str "stringed",Space,Str "instrument."]]])]
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",SoftBreak,Str "this"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",SoftBreak,Strong [Str "is",Space,Str "this"],Str "."]
-,Para [Str "Empty",Space,Strong [],Space,Str "and",Space,Emph [],Str "."]
-,Para [Str "An",SoftBreak,Emph [Link ("",[],[]) [Str "emphasized",SoftBreak,Str "link"] ("/url","")],Str "."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",SoftBreak,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",SoftBreak,Code ("",[],[]) "<html>",Str "."]
-,Para [Str "This",Space,Str "is",Space,SmallCaps [Str "small",Space,Str "caps"],Str "."]
-,Para [Str "These",Space,Str "are",Space,Str "all",Space,Str "underlined:",Space,Str "foo",Space,Str "and",Space,Str "bar."]
-,Para [Str "These",Space,Str "are",Space,Str "all",Space,Str "strikethrough:",Space,Strikeout [Str "foo"],Str ",",SoftBreak,Strikeout [Str "bar"],Str ",",Space,Str "and",Space,Strikeout [Str "baz"],Str "."]
-,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
-,Para [Str "\"Hello,\"",Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Str "\"'Shelob'",Space,Str "is",Space,Str "my",Space,Str "name.\""]
-,Para [Str "'A',",Space,Str "'B',",Space,Str "and",Space,Str "'C'",Space,Str "are",Space,Str "letters."]
-,Para [Str "'Oak,'",Space,Str "'elm,'",Space,Str "and",Space,Str "'beech'",Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Str "'pine.'"]
-,Para [Str "'He",Space,Str "said,",Space,Str "\"I",Space,Str "want",Space,Str "to",Space,Str "go.\"'",Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70's?"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Str "'",Code ("",[],[]) "code",Str "'",Space,Str "and",Space,Str "a",SoftBreak,Str "\"",Link ("",[],[]) [Str "quoted",SoftBreak,Str "link"] ("http://example.com/?foo=1&bar=2",""),Str "\"."]
-,Para [Str "Some",Space,Str "dashes:",Space,Str "one---two",Space,Str "---",Space,Str "three--four",Space,Str "--",Space,Str "five."]
-,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5-7,",Space,Str "255-66,",Space,Str "1987-1999."]
-,Para [Str "Ellipses...and.",Space,Str ".",Space,Str ".and",Space,Str ".",Space,Str ".",Space,Str ".",Space,Str "."]
-,Header 1 ("latex",[],[]) [Str "LaTeX"]
-,BulletList
- [[Para [Str "\\cite[22-23]{smith.1899}"]]
- ,[Para [Str "\\doublespacing"]]
- ,[Para [Str "$2+2=4$"]]
- ,[Para [Str "$x",Space,Str "\\in",Space,Str "y$"]]
- ,[Para [Str "$\\alpha",Space,Str "\\wedge",Space,Str "\\omega$"]]
- ,[Para [Str "$223$"]]
- ,[Para [Str "$p$-Tree"]]
- ,[Para [Str "$\\frac{d}{dx}f(x)=\\lim_{h\\to",Space,Str "0}\\frac{f(x+h)-f(x)}{h}$"]]
- ,[Para [Str "Here's",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Str "$\\alpha",Space,Str "+",Space,Str "\\omega",Space,Str "\\times",SoftBreak,Str "x^2$."]]]
-,Para [Str "These",Space,Str "shouldn't",Space,Str "be",Space,Str "math:"]
-,BulletList
- [[Para [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",SoftBreak,Code ("",[],[]) "$e = mc^2$",Str "."]]
- ,[Para [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",Space,Str "(It",SoftBreak,Str "worked",Space,Str "if",Space,Str "\"lot\"",Space,Str "is",Space,Str "emphasized.)"]]
- ,[Para [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",SoftBreak,Str "emphasized"],Space,Str "23$."]]]
-,Para [Str "Here's",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
-,Para [Str "\\begin{tabular}{|l|l|}\\hline",Space,Str "Animal",Space,Str "&",Space,Str "Number",Space,Str "\\\\",Space,Str "\\hline",Space,Str "Dog",Space,Str "&",SoftBreak,Str "2",Space,Str "\\\\",Space,Str "Cat",Space,Str "&",Space,Str "1",Space,Str "\\\\",Space,Str "\\hline",Space,Str "\\end{tabular}"]
-,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Para [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Para [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Para [Str "section:",Space,Str "\167"]]
- ,[Para [Str "set",Space,Str "membership:",Space,Str "elem"]]
- ,[Para [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,Header 1 ("links",[],[]) [Str "Links"]
-,Header 2 ("explicit",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",SoftBreak,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",SoftBreak,Str "and",Space,Str "title"] ("/url/","title"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",SoftBreak,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",SoftBreak,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",SoftBreak,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")]
-,Para [Link ("",[],[]) [Str "URL",SoftBreak,Str "and",Space,Str "title"] ("/url/","title with single quotes")]
-,Para [Str "Email",Space,Str "link",Space,Str "(nobody",Space,Str "[at]",Space,Str "nowhere.net)"]
-,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
-,Header 2 ("reference",[],[]) [Str "Reference"]
-,Para [Str "Foo",SoftBreak,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",SoftBreak,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",SoftBreak,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",SoftBreak,Str "[brackets]"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",SoftBreak,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
-,Para [Str "Indented",SoftBreak,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
-,Para [Str "Indented",SoftBreak,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."]
-,Para [Str "Indented",SoftBreak,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."]
-,Para [Str "This",Space,Str "should",Space,Str "[not]",Space,Str "be",Space,Str "a",Space,Str "link."]
-,CodeBlock ("",[],[]) "[not]: /url"
-,Para [Str "Foo",SoftBreak,Link ("",[],[]) [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."]
-,Para [Str "Foo",SoftBreak,Link ("",[],[]) [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."]
-,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
-,Para [Str "Here's",Space,Str "a",SoftBreak,Link ("",[],[]) [Str "link",SoftBreak,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here's",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",SoftBreak,Link ("",[],[]) [Str "AT&T"] ("http://att.com/","AT&T"),Str "."]
-,Para [Str "Here's",Space,Str "an",SoftBreak,Link ("",[],[]) [Str "inline",SoftBreak,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
-,Para [Str "Here's",Space,Str "an",SoftBreak,Link ("",[],[]) [Str "inline",SoftBreak,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
-,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
-,Para [Str "With",Space,Str "an",Space,Str "ampersand:",SoftBreak,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
-,BulletList
- [[Para [Str "In",Space,Str "a",Space,Str "list?"]]
- ,[Para [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
- ,[Para [Str "It",Space,Str "should."]]]
-,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Str "nobody",Space,Str "[at]",Space,Str "nowhere.net"]
-,BlockQuote
- [Para [Str "Blockquoted:",SoftBreak,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
-,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",SoftBreak,Code ("",[],[]) "<http://example.com/>"]
-,CodeBlock ("",[],[]) "or here: <http://example.com/>"
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "From",Space,Str "\"Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune\"",Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [] ("lalune.jpg","Voyage dans la Lune")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",SoftBreak,Image ("",[],[]) [] ("movie.jpg",""),SoftBreak,Str "icon."]
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference",Link ("",[],[]) [Str "(1)"] ("#note_1",""),Str ",",SoftBreak,Str "and",SoftBreak,Str "another",Link ("",[],[]) [Str "(longnote)"] ("#note_longnote",""),Str ".",SoftBreak,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",SoftBreak,Str "contains",Space,Str "a",Space,Str "space^(my",Space,Str "note)."]
-,Para [Link ("",[],[]) [Str "(1)"] ("#ref_1",""),Space,Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",SoftBreak,Str "go",Space,Str "anywhere",Space,Str "in",Space,Str "the",Space,Str "document,",Space,Str "not",Space,Str "just",Space,Str "at",Space,Str "the",Space,Str "end."]
-,Para [Link ("",[],[]) [Str "(longnote)"] ("#ref_longnote",""),Space,Str "Here's",SoftBreak,Str "the",Space,Str "other",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."]
-,Para [Str "Caret",Space,Str "characters",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "indicate",Space,Str "that",Space,Str "the",Space,Str "blocks",Space,Str "all",Space,Str "belong",Space,Str "to",SoftBreak,Str "a",Space,Str "single",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "block",Space,Str "quotes)."]
-,CodeBlock ("",[],[]) " { <code> }"
-,Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",SoftBreak,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",SoftBreak,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."]
-,Para [Str "text",Space,Emph [Str "Leading",Space,Str "space"]]
-,Para [Emph [Str "Trailing",Space,Str "space"],Space,Str "text"]
-,Para [Str "text",Space,Emph [Str "Leading",Space,Str "spaces"]]
-,Para [Emph [Str "Trailing",Space,Str "spaces"],Space,Str "text"]
-,Header 1 ("tables",[],[]) [Str "Tables"]
-,Header 2 ("tables-with-headers",[],[]) [Str "Tables",Space,Str "with",Space,Str "Headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "X"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Y"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Z"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("tables-without-headers",[],[]) [Str "Tables",Space,Str "without",Space,Str "Headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "6"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("empty-tables",[],[]) [Str "Empty",Space,Str "Tables"]
-,Para [Str "This",Space,Str "section",Space,Str "should",Space,Str "be",Space,Str "empty."]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines [ Str "John" , Space , Str "MacFarlane" ]
+ , MetaInlines [ Str "Anonymous" ]
+ ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Suite"
+ ]
+ )
+ ]
+ }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ , Space
+ , Str "Most"
+ , Space
+ , Str "of"
+ , Space
+ , Str "them"
+ , Space
+ , Str "are"
+ , Space
+ , Str "adapted"
+ , Space
+ , Str "from"
+ , Space
+ , Str "John"
+ , Space
+ , Str "Gruber's"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 2
+ ( "level-2-with-an-embedded-link" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , SoftBreak , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Header
+ 3
+ ( "level-3-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 4 ( "level-4" , [] , [] ) [ Str "Level" , Space , Str "4" ]
+ , Header
+ 5 ( "level-5" , [] , [] ) [ Str "Level" , Space , Str "5" ]
+ , Header
+ 1 ( "level-1" , [] , [] ) [ Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "level-2-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 3 ( "level-3" , [] , [] ) [ Str "Level" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header
+ 2 ( "level-2" , [] , [] ) [ Str "Level" , Space , Str "2" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , Space
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ , Space
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "looked"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , Space
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , LineBreak
+ , Str "here."
+ ]
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , Para [ Str "E-mail" , Space , Str "style:" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ , Para [ Str "A" , Space , Str "list:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "item" , Space , Str "one" ] ]
+ , [ Para [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Para
+ [ Str "Nested"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quotes:"
+ ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ , Space
+ , Str "2"
+ , Space
+ , Str ">"
+ , Space
+ , Str "1."
+ ]
+ , Para [ Str "Box-style:" ]
+ , BlockQuote
+ [ Para [ Str "Example:" ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ ]
+ , BlockQuote
+ [ OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "do" , Space , Str "laundry" ] ]
+ , [ Para
+ [ Str "take"
+ , Space
+ , Str "out"
+ , Space
+ , Str "the"
+ , Space
+ , Str "trash"
+ ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "one:"
+ ]
+ , BlockQuote
+ [ Para [ Str "Joe" , Space , Str "said:" ]
+ , BlockQuote
+ [ Para
+ [ Str "Don't" , Space , Str "quote" , Space , Str "me." ]
+ ]
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "a"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Asterisks" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Tight:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para [ Str "and:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para
+ [ Str "Loose" , Space , Str "using" , Space , Str "tabs:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "and" , Space , Str "using" , Space , Str "spaces:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para [ Str "Multiple" , Space , Str "paragraphs:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "graf"
+ , Space
+ , Str "one."
+ ]
+ , Para
+ [ Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "graf"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , SoftBreak
+ , Str "dog's"
+ , Space
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Para [ Str "List" , Space , Str "styles:" ]
+ , OrderedList ( 1 , DefaultStyle , DefaultDelim ) []
+ , OrderedList ( 1 , LowerRoman , DefaultDelim ) []
+ , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList [ [ Para [ Str "Tab" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here's" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "Same"
+ , Space
+ , Str "thing"
+ , Space
+ , Str "but"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paragraphs:"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "tabs-and-spaces" , [] , [] )
+ [ Str "Tabs" , Space , Str "and" , Space , Str "spaces" ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "fancy-list-markers" , [] , [] )
+ [ Str "Fancy" , Space , Str "list" , Space , Str "markers" ]
+ , Para [ Str "Autonumbering:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Autonumber." ] ]
+ , [ Para [ Str "More." ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Nested." ] ] ]
+ ]
+ ]
+ , Header 2 ( "definition" , [] , [] ) [ Str "Definition" ]
+ , DefinitionList
+ [ ( [ Str "Violin" ]
+ , [ [ Para
+ [ Str "Stringed"
+ , Space
+ , Str "musical"
+ , Space
+ , Str "instrument."
+ ]
+ , Para [ Str "Torture" , Space , Str "device." ]
+ ]
+ ]
+ )
+ , ( [ Str "Cello" , LineBreak , Str "Violoncello" ]
+ , [ [ Para
+ [ Str "Low-voiced"
+ , Space
+ , Str "stringed"
+ , Space
+ , Str "instrument."
+ ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , SoftBreak , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , SoftBreak
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Empty"
+ , Space
+ , Strong []
+ , Space
+ , Str "and"
+ , Space
+ , Emph []
+ , Str "."
+ ]
+ , Para
+ [ Str "An"
+ , SoftBreak
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "emphasized" , SoftBreak , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , SoftBreak
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , SoftBreak
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , SmallCaps [ Str "small" , Space , Str "caps" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "are"
+ , Space
+ , Str "all"
+ , Space
+ , Str "underlined:"
+ , Space
+ , Str "foo"
+ , Space
+ , Str "and"
+ , Space
+ , Str "bar."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "are"
+ , Space
+ , Str "all"
+ , Space
+ , Str "strikethrough:"
+ , Space
+ , Strikeout [ Str "foo" ]
+ , Str ","
+ , SoftBreak
+ , Strikeout [ Str "bar" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Strikeout [ Str "baz" ]
+ , Str "."
+ ]
+ , Header
+ 1
+ ( "smart-quotes-ellipses-dashes" , [] , [] )
+ [ Str "Smart"
+ , Space
+ , Str "quotes,"
+ , Space
+ , Str "ellipses,"
+ , Space
+ , Str "dashes"
+ ]
+ , Para
+ [ Str "\"Hello,\""
+ , Space
+ , Str "said"
+ , Space
+ , Str "the"
+ , Space
+ , Str "spider."
+ , Space
+ , Str "\"'Shelob'"
+ , Space
+ , Str "is"
+ , Space
+ , Str "my"
+ , Space
+ , Str "name.\""
+ ]
+ , Para
+ [ Str "'A',"
+ , Space
+ , Str "'B',"
+ , Space
+ , Str "and"
+ , Space
+ , Str "'C'"
+ , Space
+ , Str "are"
+ , Space
+ , Str "letters."
+ ]
+ , Para
+ [ Str "'Oak,'"
+ , Space
+ , Str "'elm,'"
+ , Space
+ , Str "and"
+ , Space
+ , Str "'beech'"
+ , Space
+ , Str "are"
+ , Space
+ , Str "names"
+ , Space
+ , Str "of"
+ , Space
+ , Str "trees."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Str "'pine.'"
+ ]
+ , Para
+ [ Str "'He"
+ , Space
+ , Str "said,"
+ , Space
+ , Str "\"I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "go.\"'"
+ , Space
+ , Str "Were"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alive"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "70's?"
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "quoted"
+ , Space
+ , Str "'"
+ , Code ( "" , [] , [] ) "code"
+ , Str "'"
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "\""
+ , Link
+ ( "" , [] , [] )
+ [ Str "quoted" , SoftBreak , Str "link" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "\"."
+ ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "dashes:"
+ , Space
+ , Str "one---two"
+ , Space
+ , Str "---"
+ , Space
+ , Str "three--four"
+ , Space
+ , Str "--"
+ , Space
+ , Str "five."
+ ]
+ , Para
+ [ Str "Dashes"
+ , Space
+ , Str "between"
+ , Space
+ , Str "numbers:"
+ , Space
+ , Str "5-7,"
+ , Space
+ , Str "255-66,"
+ , Space
+ , Str "1987-1999."
+ ]
+ , Para
+ [ Str "Ellipses...and."
+ , Space
+ , Str "."
+ , Space
+ , Str ".and"
+ , Space
+ , Str "."
+ , Space
+ , Str "."
+ , Space
+ , Str "."
+ , Space
+ , Str "."
+ ]
+ , Header 1 ( "latex" , [] , [] ) [ Str "LaTeX" ]
+ , BulletList
+ [ [ Para [ Str "\\cite[22-23]{smith.1899}" ] ]
+ , [ Para [ Str "\\doublespacing" ] ]
+ , [ Para [ Str "$2+2=4$" ] ]
+ , [ Para
+ [ Str "$x" , Space , Str "\\in" , Space , Str "y$" ]
+ ]
+ , [ Para
+ [ Str "$\\alpha"
+ , Space
+ , Str "\\wedge"
+ , Space
+ , Str "\\omega$"
+ ]
+ ]
+ , [ Para [ Str "$223$" ] ]
+ , [ Para [ Str "$p$-Tree" ] ]
+ , [ Para
+ [ Str "$\\frac{d}{dx}f(x)=\\lim_{h\\to"
+ , Space
+ , Str "0}\\frac{f(x+h)-f(x)}{h}$"
+ ]
+ ]
+ , [ Para
+ [ Str "Here's"
+ , Space
+ , Str "one"
+ , Space
+ , Str "that"
+ , Space
+ , Str "has"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , Space
+ , Str "in"
+ , Space
+ , Str "it:"
+ , Space
+ , Str "$\\alpha"
+ , Space
+ , Str "+"
+ , Space
+ , Str "\\omega"
+ , Space
+ , Str "\\times"
+ , SoftBreak
+ , Str "x^2$."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "shouldn't"
+ , Space
+ , Str "be"
+ , Space
+ , Str "math:"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "To"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "famous"
+ , Space
+ , Str "equation,"
+ , Space
+ , Str "write"
+ , SoftBreak
+ , Code ( "" , [] , [] ) "$e = mc^2$"
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "$22,000"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Emph [ Str "lot" ]
+ , Space
+ , Str "of"
+ , Space
+ , Str "money."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Str "$34,000."
+ , Space
+ , Str "(It"
+ , SoftBreak
+ , Str "worked"
+ , Space
+ , Str "if"
+ , Space
+ , Str "\"lot\""
+ , Space
+ , Str "is"
+ , Space
+ , Str "emphasized.)"
+ ]
+ ]
+ , [ Para
+ [ Str "Escaped"
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ":"
+ , Space
+ , Str "$73"
+ , Space
+ , Emph
+ [ Str "this"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , SoftBreak
+ , Str "emphasized"
+ ]
+ , Space
+ , Str "23$."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "LaTeX"
+ , Space
+ , Str "table:"
+ ]
+ , Para
+ [ Str "\\begin{tabular}{|l|l|}\\hline"
+ , Space
+ , Str "Animal"
+ , Space
+ , Str "&"
+ , Space
+ , Str "Number"
+ , Space
+ , Str "\\\\"
+ , Space
+ , Str "\\hline"
+ , Space
+ , Str "Dog"
+ , Space
+ , Str "&"
+ , SoftBreak
+ , Str "2"
+ , Space
+ , Str "\\\\"
+ , Space
+ , Str "Cat"
+ , Space
+ , Str "&"
+ , Space
+ , Str "1"
+ , Space
+ , Str "\\\\"
+ , Space
+ , Str "\\hline"
+ , Space
+ , Str "\\end{tabular}"
+ ]
+ , Header
+ 1
+ ( "special-characters" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "I" , Space , Str "hat:" , Space , Str "\206" ]
+ ]
+ , [ Para
+ [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Para [ Str "section:" , Space , Str "\167" ] ]
+ , [ Para
+ [ Str "set"
+ , Space
+ , Str "membership:"
+ , Space
+ , Str "elem"
+ ]
+ ]
+ , [ Para [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "way"
+ , Space
+ , Str "to"
+ , Space
+ , Str "write"
+ , Space
+ , Str "it."
+ ]
+ , Para
+ [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para
+ [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para
+ [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para
+ [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para
+ [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para
+ [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para
+ [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "explicit" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by two spaces" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by a tab" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with \"quotes\" in it" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , SoftBreak , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with single quotes" )
+ ]
+ , Para
+ [ Str "Email"
+ , Space
+ , Str "link"
+ , Space
+ , Str "(nobody"
+ , Space
+ , Str "[at]"
+ , Space
+ , Str "nowhere.net)"
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "Empty" ] ( "" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "reference" , [] , [] ) [ Str "Reference" ]
+ , Para
+ [ Str "Foo"
+ , SoftBreak
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , SoftBreak
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , SoftBreak
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , SoftBreak , Str "[brackets]" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
+ , Space
+ , Str "by"
+ , SoftBreak
+ , Str "itself"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , Para
+ [ Str "Indented"
+ , SoftBreak
+ , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , SoftBreak
+ , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , SoftBreak
+ , Link ( "" , [] , [] ) [ Str "thrice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "[not]"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , CodeBlock ( "" , [] , [] ) "[not]: /url"
+ , Para
+ [ Str "Foo"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "bar" ]
+ ( "/url/" , "Title with \"quotes\" inside" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "biz" ]
+ ( "/url/" , "Title with \"quote\" inside" )
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "with-ampersands" , [] , [] )
+ [ Str "With" , Space , Str "ampersands" ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , SoftBreak
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "amersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "AT&T" ]
+ ( "http://att.com/" , "AT&T" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline" , SoftBreak , Str "link" ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline"
+ , SoftBreak
+ , Str "link"
+ , Space
+ , Str "in"
+ , Space
+ , Str "pointy"
+ , Space
+ , Str "braces"
+ ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "autolinks" , [] , [] ) [ Str "Autolinks" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "In" , Space , Str "a" , Space , Str "list?" ]
+ ]
+ , [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , [ Para [ Str "It" , Space , Str "should." ] ]
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "e-mail"
+ , Space
+ , Str "address:"
+ , Space
+ , Str "nobody"
+ , Space
+ , Str "[at]"
+ , Space
+ , Str "nowhere.net"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Blockquoted:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , Para
+ [ Str "Auto-links"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "occur"
+ , Space
+ , Str "here:"
+ , SoftBreak
+ , Code ( "" , [] , [] ) "<http://example.com/>"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "or here: <http://example.com/>"
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Str "\"Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune\""
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] ) [] ( "lalune.jpg" , "Voyage dans la Lune" )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , SoftBreak
+ , Image ( "" , [] , [] ) [] ( "movie.jpg" , "" )
+ , SoftBreak
+ , Str "icon."
+ ]
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference"
+ , Link ( "" , [] , [] ) [ Str "(1)" ] ( "#note_1" , "" )
+ , Str ","
+ , SoftBreak
+ , Str "and"
+ , SoftBreak
+ , Str "another"
+ , Link
+ ( "" , [] , [] )
+ [ Str "(longnote)" ]
+ ( "#note_longnote" , "" )
+ , Str "."
+ , SoftBreak
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Emph [ Str "not" ]
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "it"
+ , SoftBreak
+ , Str "contains"
+ , Space
+ , Str "a"
+ , Space
+ , Str "space^(my"
+ , Space
+ , Str "note)."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "(1)" ] ( "#ref_1" , "" )
+ , Space
+ , Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "can"
+ , SoftBreak
+ , Str "go"
+ , Space
+ , Str "anywhere"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document,"
+ , Space
+ , Str "not"
+ , Space
+ , Str "just"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "(longnote)" ]
+ ( "#ref_longnote" , "" )
+ , Space
+ , Str "Here's"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "other"
+ , Space
+ , Str "note."
+ , Space
+ , Str "This"
+ , Space
+ , Str "one"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "blocks."
+ ]
+ , Para
+ [ Str "Caret"
+ , Space
+ , Str "characters"
+ , Space
+ , Str "are"
+ , Space
+ , Str "used"
+ , Space
+ , Str "to"
+ , Space
+ , Str "indicate"
+ , Space
+ , Str "that"
+ , Space
+ , Str "the"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "all"
+ , Space
+ , Str "belong"
+ , Space
+ , Str "to"
+ , SoftBreak
+ , Str "a"
+ , Space
+ , Str "single"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "(as"
+ , Space
+ , Str "with"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quotes)."
+ ]
+ , CodeBlock ( "" , [] , [] ) " { <code> }"
+ , Para
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "want,"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "use"
+ , Space
+ , Str "a"
+ , Space
+ , Str "caret"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "beginning"
+ , Space
+ , Str "of"
+ , Space
+ , Str "every"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "as"
+ , SoftBreak
+ , Str "with"
+ , Space
+ , Str "blockquotes,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "all"
+ , Space
+ , Str "that"
+ , Space
+ , Str "you"
+ , Space
+ , Str "need"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "caret"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "beginning"
+ , SoftBreak
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "line"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "block"
+ , Space
+ , Str "and"
+ , Space
+ , Str "any"
+ , Space
+ , Str "preceding"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "lines."
+ ]
+ , Para
+ [ Str "text"
+ , Space
+ , Emph [ Str "Leading" , Space , Str "space" ]
+ ]
+ , Para
+ [ Emph [ Str "Trailing" , Space , Str "space" ]
+ , Space
+ , Str "text"
+ ]
+ , Para
+ [ Str "text"
+ , Space
+ , Emph [ Str "Leading" , Space , Str "spaces" ]
+ ]
+ , Para
+ [ Emph [ Str "Trailing" , Space , Str "spaces" ]
+ , Space
+ , Str "text"
+ ]
+ , Header 1 ( "tables" , [] , [] ) [ Str "Tables" ]
+ , Header
+ 2
+ ( "tables-with-headers" , [] , [] )
+ [ Str "Tables"
+ , Space
+ , Str "with"
+ , Space
+ , Str "Headers"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "X" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Y" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Z" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 2
+ ( "tables-without-headers" , [] , [] )
+ [ Str "Tables"
+ , Space
+ , Str "without"
+ , Space
+ , Str "Headers"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 2
+ ( "empty-tables" , [] , [] )
+ [ Str "Empty" , Space , Str "Tables" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "section"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "empty."
+ ]
+ ]
diff --git a/test/jira-reader.native b/test/jira-reader.native
index 12fc88adc..5cb00a929 100644
--- a/test/jira-reader.native
+++ b/test/jira-reader.native
@@ -1,185 +1,947 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("",[],[]) [Span ("headers",[],[]) [],Str "Headers"]
-,Header 2 ("",[],[]) [Span ("level-2-with-an-embedded-link",[],[]) [],Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("https://test.example/url","")]
-,Header 3 ("",[],[]) [Span ("level-3-with-emphasis",[],[]) [],Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 4 ("",[],[]) [Str "Level",Space,Str "4"]
-,Header 5 ("",[],[]) [Str "Level",Space,Str "5"]
-,Header 6 ("",[],[]) [Str "Level",Space,Str "6"]
-,Para [Str "h0.",Space,Str "this",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "header."]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "E-mail",Space,Str "style:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,BlockQuote
- [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",["java"],[]) "sub status {\n print \"working\";\n}\n"
- ,Para [Str "An",Space,Str "enumeration:"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "item",Space,Str "one"]]
- ,[Para [Str "item",Space,Str "two"]]]]
-,Para [Str "A",Space,Str "following",Space,Str "paragraph."]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",["java"],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n"
-,Para [Str "And:"]
-,CodeBlock ("",["java"],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{\n"
-,HorizontalRule
-,Header 1 ("",[],[]) [Span ("lists",[],[]) [],Str "Lists"]
-,Header 2 ("",[],[]) [Span ("unordered",[],[]) [],Str "Unordered"]
-,Para [Str "Asterisks:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Minuses:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Header 2 ("",[],[]) [Str "Ordered"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "Linebreak",Space,Str "in",Space,Str "paragraph:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Item",Space,Str "1,",Space,Str "line",Space,Str "one.",LineBreak,Str "Item",Space,Str "1.",Space,Str "line",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",Space,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Header 2 ("",[],[]) [Str "Nested"]
-,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]]]]]]]
-,Para [Str "Here\8217s",Space,Str "another:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Para [Str "Nested",Space,Str "enumerations:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Essential"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Important"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Relevant"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Insignificant"]]]]]]]]]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Linebreaks",Space,Str "and",Space,Str "Markup",Space,Str "in",Space,Str "Lists"]
-,BulletList
- [[Para [Strong [Str "apple"],LineBreak,Str "red",Space,Str "fruit"]]
- ,[Para [Strong [Str "orange"],LineBreak,Str "orange",Space,Str "fruit"]]
- ,[Para [Strong [Str "banana"],LineBreak,Str "yellow",Space,Str "fruit"]]]
-,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
-,BulletList
- [[Para [Strong [Emph [Str "apple"]],LineBreak,Str "red",Space,Str "fruit",LineBreak,Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]
- ,[Para [Strong [Emph [Str "orange"]],LineBreak,Str "orange",Space,Str "fruit"]
- ,CodeBlock ("",["java"],[]) "{ orange code block }\n"
- ,BlockQuote
- [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Colored",Space,Str "Text",Space,Str "Blocks"]
-,Div ("",[],[("color","red")])
- [Para [LineBreak,Str "This",Space,Str "is",Space,Str "red."]]
-,Header 2 ("",[],[]) [Str "Eiffel",Space,Str "65"]
-,Div ("",[],[("color","blue")])
- [Para [LineBreak,Str "da",Space,Str "ba",Space,Str "dee"]]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
-,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("https://my.example/url","")],Str "."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
-,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
-,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."]
-,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "C",Subscript [Str "6"],Str "H",Subscript [Str "12"],Str "O",Subscript [Str "6"],Str ",",Space,Str "C",Subscript [Str "\160n\160"],Str "H",Subscript [Emph [Str "2n"]],Str "O",Subscript [Str "n"],Str "."]
-,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "markers",Space,Str "used",Space,Str "within",Space,Str "words:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Dashes,",Space,Str "and",Space,Str "emoticons"]
-,Para [Str "Some",Space,Str "dashes:",Space,Str "one",Space,Str "\8211",Space,Str "two",Space,Str "\8212",Space,Str "three."]
-,Para [Str "Sure",Space,Str "\10004",LineBreak,Str "Nope",Space,Str "\10060"]
-,Para [Str "Nice",Space,Str "\128515"]
-,Para [Str "Capital",Space,Str "d:D"]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Math"]
-,BulletList
- [[Para [Str "2\8197+\8197\&2\8196=\8196\&4"]]
- ,[Para [Emph [Str "x"],Str "\8196\8712\8196",Emph [Str "y"]]]
- ,[Para [Emph [Str "\945"],Str "\8197\8743\8197",Emph [Str "\969"]]]
- ,[Para [Emph [Str "p"],Str "-Tree"]]
- ,[Para [Str "Here\8217s",Space,Str "one",Space,Str "more:",Space,Emph [Str "\945"],Str "\8197+\8197",Emph [Str "\969"],Str "\8197\215\8197",Emph [Str "x"],Superscript [Str "2"],Str "."]]]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Para [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Para [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Para [Str "section:",Space,Str "\167"]]
- ,[Para [Str "set",Space,Str "membership:",Space,Str "\8712"]]
- ,[Para [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Links"]
-,Header 2 ("",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("https://example.org/url",""),Str "."]
-,Para [Link ("",[],[]) [Str "File",Space,Str "URL"] ("file://some/file/name/",""),Str "."]
-,Para [Link ("",[],[]) [Str "IRC",Space,Str "link"] ("irc://example.org/pandoc",""),Str "."]
-,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.invalid","")]
-,Para [Str "[Not",Space,Str "a",Space,Str "link|not",Space,Str "a",Space,Str "URL]."]
-,Header 2 ("",[],[]) [Str "Reference"]
-,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("https://example.net/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "https://pandoc.org"] ("https://pandoc.org",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
-,Header 2 ("",[],[]) [Str "With",Space,Str "ampersands"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("http://att.com/",""),Str "."]
-,Header 2 ("",[],[]) [Str "Autolinks"]
-,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
-,BulletList
- [[Para [Str "In",Space,Str "a",Space,Str "list?"]]
- ,[Para [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
- ,[Para [Str "It",Space,Str "should."]]]
-,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",[],[]) [Str "mailto:nobody@nowhere.invalid"] ("mailto:nobody@nowhere.invalid","")]
-,BlockQuote
- [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
-,CodeBlock ("",["java"],[]) "Autolink should not occur here: <http://example.com/>\n"
-,HorizontalRule
-,Header 1 ("",[],[]) [Str "Images"]
-,Para [Str "From",Space,Str "\"Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune\"",Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [] ("lalune.jpg","")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [] ("movie.jpg",""),Space,Str "icon."]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header
+ 1
+ ( "" , [] , [] )
+ [ Span ( "headers" , [] , [] ) [] , Str "Headers" ]
+ , Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "level-2-with-an-embedded-link" , [] , [] ) []
+ , Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "link" ]
+ ( "https://test.example/url" , "" )
+ ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Span ( "level-3-with-emphasis" , [] , [] ) []
+ , Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 4 ( "" , [] , [] ) [ Str "Level" , Space , Str "4" ]
+ , Header
+ 5 ( "" , [] , [] ) [ Str "Level" , Space , Str "5" ]
+ , Header
+ 6 ( "" , [] , [] ) [ Str "Level" , Space , Str "6" ]
+ , Para
+ [ Str "h0."
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header."
+ ]
+ , HorizontalRule
+ , Header 1 ( "" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , Space
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , LineBreak
+ , Str "here."
+ ]
+ , HorizontalRule
+ , Header
+ 1 ( "" , [] , [] ) [ Str "Block" , Space , Str "Quotes" ]
+ , Para [ Str "E-mail" , Space , Str "style:" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [ "java" ] , [] )
+ "sub status {\n print \"working\";\n}\n"
+ , Para [ Str "An" , Space , Str "enumeration:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "item" , Space , Str "one" ] ]
+ , [ Para [ Str "item" , Space , Str "two" ] ]
+ ]
+ ]
+ , Para
+ [ Str "A"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , HorizontalRule
+ , Header
+ 1 ( "" , [] , [] ) [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [ "java" ] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [ "java" ] , [] )
+ " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{\n"
+ , HorizontalRule
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Span ( "lists" , [] , [] ) [] , Str "Lists" ]
+ , Header
+ 2
+ ( "" , [] , [] )
+ [ Span ( "unordered" , [] , [] ) [] , Str "Unordered" ]
+ , Para [ Str "Asterisks:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "" , [] , [] ) [ Str "Ordered" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "Linebreak"
+ , Space
+ , Str "in"
+ , Space
+ , Str "paragraph:"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "line"
+ , Space
+ , Str "one."
+ , LineBreak
+ , Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "line"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "dog\8217s"
+ , Space
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Header 2 ( "" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList [ [ Para [ Str "Tab" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here\8217s" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para [ Str "Nested" , Space , Str "enumerations:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Essential" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Important" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Relevant" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Insignificant" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Linebreaks"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Markup"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Lists"
+ ]
+ , BulletList
+ [ [ Para
+ [ Strong [ Str "apple" ]
+ , LineBreak
+ , Str "red"
+ , Space
+ , Str "fruit"
+ ]
+ ]
+ , [ Para
+ [ Strong [ Str "orange" ]
+ , LineBreak
+ , Str "orange"
+ , Space
+ , Str "fruit"
+ ]
+ ]
+ , [ Para
+ [ Strong [ Str "banana" ]
+ , LineBreak
+ , Str "yellow"
+ , Space
+ , Str "fruit"
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "with"
+ , Space
+ , Str "italics:"
+ ]
+ , BulletList
+ [ [ Para
+ [ Strong [ Emph [ Str "apple" ] ]
+ , LineBreak
+ , Str "red"
+ , Space
+ , Str "fruit"
+ , LineBreak
+ , Str "contains"
+ , Space
+ , Str "seeds,"
+ , Space
+ , Str "crisp,"
+ , Space
+ , Str "pleasant"
+ , Space
+ , Str "to"
+ , Space
+ , Str "taste"
+ ]
+ ]
+ , [ Para
+ [ Strong [ Emph [ Str "orange" ] ]
+ , LineBreak
+ , Str "orange"
+ , Space
+ , Str "fruit"
+ ]
+ , CodeBlock
+ ( "" , [ "java" ] , [] ) "{ orange code block }\n"
+ , BlockQuote
+ [ Para
+ [ Str "orange"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote"
+ ]
+ ]
+ ]
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Colored"
+ , Space
+ , Str "Text"
+ , Space
+ , Str "Blocks"
+ ]
+ , Div
+ ( "" , [] , [ ( "color" , "red" ) ] )
+ [ Para
+ [ LineBreak
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "red."
+ ]
+ ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "Eiffel" , Space , Str "65" ]
+ , Div
+ ( "" , [] , [ ( "color" , "blue" ) ] )
+ [ Para
+ [ LineBreak
+ , Str "da"
+ , Space
+ , Str "ba"
+ , Space
+ , Str "dee"
+ ]
+ ]
+ , HorizontalRule
+ , Header
+ 1 ( "" , [] , [] ) [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "emphasized" , Space , Str "link" ]
+ ( "https://my.example/url" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "strikeout" ]
+ , Str "."
+ ]
+ ]
+ , Para
+ [ Str "Superscripts:"
+ , Space
+ , Str "a"
+ , Superscript [ Str "bc" ]
+ , Str "d"
+ , Space
+ , Str "a"
+ , Superscript [ Emph [ Str "hello" ] ]
+ , Space
+ , Str "a"
+ , Superscript [ Str "hello\160there" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Subscripts:"
+ , Space
+ , Str "H"
+ , Subscript [ Str "2" ]
+ , Str "O,"
+ , Space
+ , Str "C"
+ , Subscript [ Str "6" ]
+ , Str "H"
+ , Subscript [ Str "12" ]
+ , Str "O"
+ , Subscript [ Str "6" ]
+ , Str ","
+ , Space
+ , Str "C"
+ , Subscript [ Str "\160n\160" ]
+ , Str "H"
+ , Subscript [ Emph [ Str "2n" ] ]
+ , Str "O"
+ , Subscript [ Str "n" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "superscripts"
+ , Space
+ , Str "or"
+ , Space
+ , Str "subscripts,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "of"
+ , Space
+ , Str "markers"
+ , Space
+ , Str "used"
+ , Space
+ , Str "within"
+ , Space
+ , Str "words:"
+ , Space
+ , Str "a^b"
+ , Space
+ , Str "c^d,"
+ , Space
+ , Str "a~b"
+ , Space
+ , Str "c~d."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Dashes,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "emoticons"
+ ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "dashes:"
+ , Space
+ , Str "one"
+ , Space
+ , Str "\8211"
+ , Space
+ , Str "two"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "three."
+ ]
+ , Para
+ [ Str "Sure"
+ , Space
+ , Str "\10004"
+ , LineBreak
+ , Str "Nope"
+ , Space
+ , Str "\10060"
+ ]
+ , Para [ Str "Nice" , Space , Str "\128515" ]
+ , Para [ Str "Capital" , Space , Str "d:D" ]
+ , HorizontalRule
+ , Header 1 ( "" , [] , [] ) [ Str "Math" ]
+ , BulletList
+ [ [ Para [ Str "2\8197+\8197\&2\8196=\8196\&4" ] ]
+ , [ Para
+ [ Emph [ Str "x" ]
+ , Str "\8196\8712\8196"
+ , Emph [ Str "y" ]
+ ]
+ ]
+ , [ Para
+ [ Emph [ Str "\945" ]
+ , Str "\8197\8743\8197"
+ , Emph [ Str "\969" ]
+ ]
+ ]
+ , [ Para [ Emph [ Str "p" ] , Str "-Tree" ] ]
+ , [ Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "more:"
+ , Space
+ , Emph [ Str "\945" ]
+ , Str "\8197+\8197"
+ , Emph [ Str "\969" ]
+ , Str "\8197\215\8197"
+ , Emph [ Str "x" ]
+ , Superscript [ Str "2" ]
+ , Str "."
+ ]
+ ]
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "I" , Space , Str "hat:" , Space , Str "\206" ]
+ ]
+ , [ Para
+ [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Para [ Str "section:" , Space , Str "\167" ] ]
+ , [ Para
+ [ Str "set"
+ , Space
+ , Str "membership:"
+ , Space
+ , Str "\8712"
+ ]
+ ]
+ , [ Para [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "way"
+ , Space
+ , Str "to"
+ , Space
+ , Str "write"
+ , Space
+ , Str "it."
+ ]
+ , Para
+ [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para
+ [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para
+ [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para
+ [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para
+ [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para
+ [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para
+ [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , HorizontalRule
+ , Header 1 ( "" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "URL" ]
+ ( "https://example.org/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "File" , Space , Str "URL" ]
+ ( "file://some/file/name/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "IRC" , Space , Str "link" ]
+ ( "irc://example.org/pandoc" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Email" , Space , Str "link" ]
+ ( "mailto:nobody@nowhere.invalid" , "" )
+ ]
+ , Para
+ [ Str "[Not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link|not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "URL]."
+ ]
+ , Header 2 ( "" , [] , [] ) [ Str "Reference" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "[brackets]" ]
+ ( "https://example.net/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "https://pandoc.org" ]
+ ( "https://pandoc.org" , "" )
+ , Space
+ , Str "by"
+ , Space
+ , Str "itself"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "With" , Space , Str "ampersands" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] ) [ Str "AT&T" ] ( "http://att.com/" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "" , [] , [] ) [ Str "Autolinks" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "In" , Space , Str "a" , Space , Str "list?" ]
+ ]
+ , [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , [ Para [ Str "It" , Space , Str "should." ] ]
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "e-mail"
+ , Space
+ , Str "address:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:nobody@nowhere.invalid" ]
+ ( "mailto:nobody@nowhere.invalid" , "" )
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Blockquoted:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , CodeBlock
+ ( "" , [ "java" ] , [] )
+ "Autolink should not occur here: <http://example.com/>\n"
+ , HorizontalRule
+ , Header 1 ( "" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Str "\"Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune\""
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para [ Image ( "" , [] , [] ) [] ( "lalune.jpg" , "" ) ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , Space
+ , Image ( "" , [] , [] ) [] ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ ]
+ ]
diff --git a/test/latex-reader.native b/test/latex-reader.native
index c6bb24182..32ee86899 100644
--- a/test/latex-reader.native
+++ b/test/latex-reader.native
@@ -1,416 +1,2291 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
-[RawBlock (Format "latex") "\\maketitle"
-,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("headers",[],[]) [Str "Headers"]
-,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")]
-,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Para [Str "Level",Space,Str "4"]
-,Para [Str "Level",Space,Str "5"]
-,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
-,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",SoftBreak,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",SoftBreak,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",Space,Str "*",Space,Str "criminey."]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "E-mail",Space,Str "style:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",Space,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,BlockQuote
- [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
- ,Para [Str "A",Space,Str "list:"]
- ,OrderedList (1,Decimal,Period)
- [[Para [Str "item",Space,Str "one"]]
- ,[Para [Str "item",Space,Str "two"]]]
- ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
- ,BlockQuote
- [Para [Str "nested"]]
- ,BlockQuote
- [Para [Str "nested"]]]
-,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",Space,Str ">",Space,Str "1."]
-,Para [Str "Box-style:"]
-,BlockQuote
- [Para [Str "Example:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"]
-,BlockQuote
- [OrderedList (1,Decimal,Period)
- [[Para [Str "do",Space,Str "laundry"]]
- ,[Para [Str "take",Space,Str "out",Space,Str "the",Space,Str "trash"]]]]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "nested",Space,Str "one:"]
-,BlockQuote
- [Para [Str "Joe",Space,Str "said:"]
- ,BlockQuote
- [Para [Str "Don\8217t",Space,Str "quote",Space,Str "me."]]]
-,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,Para [Str "this",Space,Str "has",Space,Emph [Str "two",LineBreak,Str "lines"]]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "tight:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Asterisks",Space,Str "loose:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "tight:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "tight:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,Para [Str "Tight:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and",Space,Str "using",Space,Str "spaces:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Multiple",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
- ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",SoftBreak,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Header 2 ("nested",[],[]) [Str "Nested"]
-,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]]]]]]]
-,Para [Str "Here\8217s",Space,Str "another:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
-,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]
- ,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",Space,Str "indented",Space,Str "with",Space,Str "spaces"]]]]]
-,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
-,OrderedList (2,Decimal,TwoParens)
- [[Para [Str "begins",Space,Str "with",Space,Str "2"]]
- ,[Para [Str "and",Space,Str "now",Space,Str "3"]
- ,Para [Str "with",Space,Str "a",Space,Str "continuation"]
- ,OrderedList (4,LowerRoman,Period)
- [[Para [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]]
- ,[Para [Str "more",Space,Str "items"]
- ,OrderedList (1,UpperAlpha,TwoParens)
- [[Para [Str "a",Space,Str "subsublist"]]
- ,[Para [Str "a",Space,Str "subsublist"]]]]]]]
-,Para [Str "Nesting:"]
-,OrderedList (1,UpperAlpha,Period)
- [[Para [Str "Upper",Space,Str "Alpha"]
- ,OrderedList (1,UpperRoman,Period)
- [[Para [Str "Upper",Space,Str "Roman."]
- ,OrderedList (6,Decimal,TwoParens)
- [[Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
- ,OrderedList (3,LowerAlpha,OneParen)
- [[Para [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
-,Para [Str "Autonumbering:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Autonumber."]]
- ,[Para [Str "More."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Nested."]]]]]
-,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"]
-,Para [Str "M.A.",Space,Str "2007"]
-,Para [Str "B.",Space,Str "Williams"]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"]
-,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Para [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Para [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Loose:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Para [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
-,DefinitionList
- [([Emph [Str "apple"]],
- [[Para [Str "red",Space,Str "fruit"]
- ,Para [Str "contains",Space,Str "seeds,",Space,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]])
- ,([Emph [Str "orange"]],
- [[Para [Str "orange",Space,Str "fruit"]
- ,CodeBlock ("",[],[]) "{ orange code block }"
- ,BlockQuote
- [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])]
-,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"]
-,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
-,Para [Str "foo",SoftBreak,Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"]
-,Para [Str "foo",SoftBreak,Str "bar",SoftBreak,Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],SoftBreak,Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"],SoftBreak,Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"]
-,Para [Str "foo",SoftBreak,Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"]
-,CodeBlock ("",[],[]) "<div>\n foo\n</div>"
-,Para [Str "As",Space,Str "should",Space,Str "this:"]
-,CodeBlock ("",[],[]) "<div>foo</div>"
-,Para [Str "Now,",Space,Str "nested:"]
-,Para [Str "foo",SoftBreak,Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"]
-,Para [Str "Multiline:"]
-,Para [Str "Code",Space,Str "block:"]
-,CodeBlock ("",[],[]) "<!-- Comment -->"
-,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "<hr />"
-,Para [Str "Hr\8217s:"]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
-,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",SoftBreak,Code ("",[],[]) "<html>",Str "."]
-,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
-,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",SoftBreak,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str "."]
-,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",SoftBreak,Str "H",Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."]
-,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",Space,Str "because",Space,Str "of",Space,Str "the",SoftBreak,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a",Math InlineMath "\\sim",Str "b",SoftBreak,Str "c",Math InlineMath "\\sim",Str "d."]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
-,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Str "\8198",Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]]
-,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."]
-,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",Space,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]]
-,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."],Str "\8198"],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",Space,Str "70\8217s?"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",SoftBreak,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."]
-,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two\8212three\8212four\8212five."]
-,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."]
-,Para [Str "Ellipses\8230and\8230and\8230."]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("latex",[],[]) [Str "LaTeX"]
-,BulletList
- [[Para [Cite [Citation {citationId = "smith.1899", citationPrefix = [], citationSuffix = [Str "22-23"], citationMode = NormalCitation, citationNoteNum = 0, citationHash = 0}] [RawInline (Format "latex") "\\cite[22-23]{smith.1899}"]]]
- ,[RawBlock (Format "latex") "\\doublespacing"]
- ,[Para [Math InlineMath "2+2=4"]]
- ,[Para [Math InlineMath "x \\in y"]]
- ,[Para [Math InlineMath "\\alpha \\wedge \\omega"]]
- ,[Para [Math InlineMath "223"]]
- ,[Para [Math InlineMath "p",Str "-Tree"]]
- ,[Para [Math InlineMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
- ,[Para [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",SoftBreak,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
-,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"]
-,BulletList
- [[Para [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
- ,[Para [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",Space,Str "(It",Space,Str "worked",Space,Str "if",SoftBreak,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]]
- ,[Para [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Animal"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Number"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Dog"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cat"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "A",Space,Str "table",Space,Str "with",Space,Str "one",Space,Str "column:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Animal"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Vegetable"]]]])]
- (TableFoot ("",[],[])
- [])
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Para [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Para [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Para [Str "section:",Space,Str "\167"]]
- ,[Para [Str "set",Space,Str "membership:",Space,Str "\8712"]]
- ,[Para [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "\8216"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("links",[],[]) [Str "Links"]
-,Header 2 ("explicit",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","")]
-,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")]
-,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
-,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
-,Header 2 ("reference",[],[]) [Str "Reference"]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."]
-,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."]
-,CodeBlock ("",[],[]) "[not]: /url"
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/",""),Str "."]
-,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
-,Para [Str "Here\8217s",Space,Str "a",SoftBreak,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",SoftBreak,Link ("",[],[]) [Str "AT&T"] ("http://att.com/",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",SoftBreak,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
-,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
-,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
-,BulletList
- [[Para [Str "In",Space,Str "a",Space,Str "list?"]]
- ,[Para [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
- ,[Para [Str "It",Space,Str "should."]]]
-,Para [Str "An",Space,Str "e-mail",Space,Str "address:",SoftBreak,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
-,BlockQuote
- [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]]
-,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
-,CodeBlock ("",[],[]) "or here: <http://example.com/>"
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [Str "image"] ("lalune.jpg","")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "image"] ("movie.jpg",""),Space,Str "icon."]
-,Div ("",["center"],[])
- [HorizontalRule]
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",SoftBreak,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],SoftBreak,Str "and",SoftBreak,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",Space,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",Space,Str "lazy",SoftBreak,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",Space,Str "contains",SoftBreak,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",SoftBreak,Str "note.",Note [Para [Str "This",Space,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]]
-,BlockQuote
- [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]]
-,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",SoftBreak,Str "indented."]
-,Header 1 ("escaped-characters",[],[]) [Str "Escaped",Space,Str "characters"]
-,Para [Str "$",Space,Str "%",Space,Str "&",Space,Str "#",Space,Str "_",Space,Str "{",Space,Str "}"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines [ Str "John" , Space , Str "MacFarlane" ]
+ , MetaInlines [ Str "Anonymous" ]
+ ]
+ )
+ , ( "date"
+ , MetaInlines
+ [ Str "July" , Space , Str "17," , Space , Str "2006" ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Suite"
+ ]
+ )
+ ]
+ }
+ [ RawBlock (Format "latex") "\\maketitle"
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ , Space
+ , Str "Most"
+ , Space
+ , Str "of"
+ , Space
+ , Str "them"
+ , Space
+ , Str "are"
+ , Space
+ , Str "adapted"
+ , Space
+ , Str "from"
+ , SoftBreak
+ , Str "John"
+ , Space
+ , Str "Gruber\8217s"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 2
+ ( "level-2-with-an-embedded-link" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Header
+ 3
+ ( "level-3-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Para [ Str "Level" , Space , Str "4" ]
+ , Para [ Str "Level" , Space , Str "5" ]
+ , Header
+ 1 ( "level-1" , [] , [] ) [ Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "level-2-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 3 ( "level-3" , [] , [] ) [ Str "Level" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header
+ 2 ( "level-2" , [] , [] ) [ Str "Level" , Space , Str "2" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , Space
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "list"
+ , Space
+ , Str "item."
+ , Space
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , SoftBreak
+ , Str "looked"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , Space
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , LineBreak
+ , Str "here."
+ ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , Para [ Str "E-mail" , Space , Str "style:" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ , Para [ Str "A" , Space , Str "list:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "item" , Space , Str "one" ] ]
+ , [ Para [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Para
+ [ Str "Nested"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quotes:"
+ ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ , Space
+ , Str "2"
+ , Space
+ , Str ">"
+ , Space
+ , Str "1."
+ ]
+ , Para [ Str "Box-style:" ]
+ , BlockQuote
+ [ Para [ Str "Example:" ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ ]
+ , BlockQuote
+ [ OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "do" , Space , Str "laundry" ] ]
+ , [ Para
+ [ Str "take"
+ , Space
+ , Str "out"
+ , Space
+ , Str "the"
+ , Space
+ , Str "trash"
+ ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "one:"
+ ]
+ , BlockQuote
+ [ Para [ Str "Joe" , Space , Str "said:" ]
+ , BlockQuote
+ [ Para
+ [ Str "Don\8217t"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "me."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "a"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , Para
+ [ Str "this"
+ , Space
+ , Str "has"
+ , Space
+ , Emph [ Str "two" , LineBreak , Str "lines" ]
+ ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Asterisks" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Tight:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para [ Str "and:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para
+ [ Str "Loose" , Space , Str "using" , Space , Str "tabs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "and" , Space , Str "using" , Space , Str "spaces:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para [ Str "Multiple" , Space , Str "paragraphs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "graf"
+ , Space
+ , Str "one."
+ ]
+ , Para
+ [ Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "graf"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "dog\8217s"
+ , SoftBreak
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList [ [ Para [ Str "Tab" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here\8217s" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "Same"
+ , Space
+ , Str "thing"
+ , Space
+ , Str "but"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paragraphs:"
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "tabs-and-spaces" , [] , [] )
+ [ Str "Tabs" , Space , Str "and" , Space , Str "spaces" ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "fancy-list-markers" , [] , [] )
+ [ Str "Fancy" , Space , Str "list" , Space , Str "markers" ]
+ , OrderedList
+ ( 2 , Decimal , TwoParens )
+ [ [ Para
+ [ Str "begins" , Space , Str "with" , Space , Str "2" ]
+ ]
+ , [ Para [ Str "and" , Space , Str "now" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "continuation"
+ ]
+ , OrderedList
+ ( 4 , LowerRoman , Period )
+ [ [ Para
+ [ Str "sublist"
+ , Space
+ , Str "with"
+ , Space
+ , Str "roman"
+ , Space
+ , Str "numerals,"
+ , Space
+ , Str "starting"
+ , Space
+ , Str "with"
+ , Space
+ , Str "4"
+ ]
+ ]
+ , [ Para [ Str "more" , Space , Str "items" ]
+ , OrderedList
+ ( 1 , UpperAlpha , TwoParens )
+ [ [ Para [ Str "a" , Space , Str "subsublist" ] ]
+ , [ Para [ Str "a" , Space , Str "subsublist" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Nesting:" ]
+ , OrderedList
+ ( 1 , UpperAlpha , Period )
+ [ [ Para [ Str "Upper" , Space , Str "Alpha" ]
+ , OrderedList
+ ( 1 , UpperRoman , Period )
+ [ [ Para [ Str "Upper" , Space , Str "Roman." ]
+ , OrderedList
+ ( 6 , Decimal , TwoParens )
+ [ [ Para
+ [ Str "Decimal"
+ , Space
+ , Str "start"
+ , Space
+ , Str "with"
+ , Space
+ , Str "6"
+ ]
+ , OrderedList
+ ( 3 , LowerAlpha , OneParen )
+ [ [ Para
+ [ Str "Lower"
+ , Space
+ , Str "alpha"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paren"
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Autonumbering:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Autonumber." ] ]
+ , [ Para [ Str "More." ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Nested." ] ] ]
+ ]
+ ]
+ , Para
+ [ Str "Should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item:"
+ ]
+ , Para [ Str "M.A." , Space , Str "2007" ]
+ , Para [ Str "B." , Space , Str "Williams" ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header
+ 1
+ ( "definition-lists" , [] , [] )
+ [ Str "Definition" , Space , Str "Lists" ]
+ , Para
+ [ Str "Tight"
+ , Space
+ , Str "using"
+ , Space
+ , Str "spaces:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Para [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para
+ [ Str "Tight" , Space , Str "using" , Space , Str "tabs:" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Para [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para [ Str "Loose:" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Para [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "with"
+ , Space
+ , Str "italics:"
+ ]
+ , DefinitionList
+ [ ( [ Emph [ Str "apple" ] ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ]
+ , Para
+ [ Str "contains"
+ , Space
+ , Str "seeds,"
+ , Space
+ , Str "crisp,"
+ , Space
+ , Str "pleasant"
+ , Space
+ , Str "to"
+ , Space
+ , Str "taste"
+ ]
+ ]
+ ]
+ )
+ , ( [ Emph [ Str "orange" ] ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ]
+ , CodeBlock ( "" , [] , [] ) "{ orange code block }"
+ , BlockQuote
+ [ Para
+ [ Str "orange"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote"
+ ]
+ ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1
+ ( "html-blocks" , [] , [] )
+ [ Str "HTML" , Space , Str "Blocks" ]
+ , Para
+ [ Str "Simple"
+ , Space
+ , Str "block"
+ , Space
+ , Str "on"
+ , Space
+ , Str "one"
+ , Space
+ , Str "line:"
+ ]
+ , Para
+ [ Str "foo"
+ , SoftBreak
+ , Str "And"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "without"
+ , Space
+ , Str "indentation:"
+ ]
+ , Para
+ [ Str "foo"
+ , SoftBreak
+ , Str "bar"
+ , SoftBreak
+ , Str "Interpreted"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "table:"
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , SoftBreak
+ , Str "And"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , SoftBreak
+ , Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "block:"
+ ]
+ , Para
+ [ Str "foo"
+ , SoftBreak
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "code"
+ , Space
+ , Str "block,"
+ , Space
+ , Str "though:"
+ ]
+ , CodeBlock ( "" , [] , [] ) "<div>\n foo\n</div>"
+ , Para
+ [ Str "As" , Space , Str "should" , Space , Str "this:" ]
+ , CodeBlock ( "" , [] , [] ) "<div>foo</div>"
+ , Para [ Str "Now," , Space , Str "nested:" ]
+ , Para
+ [ Str "foo"
+ , SoftBreak
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "just"
+ , Space
+ , Str "be"
+ , Space
+ , Str "an"
+ , Space
+ , Str "HTML"
+ , Space
+ , Str "comment:"
+ ]
+ , Para [ Str "Multiline:" ]
+ , Para [ Str "Code" , Space , Str "block:" ]
+ , CodeBlock ( "" , [] , [] ) "<!-- Comment -->"
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "plain"
+ , Space
+ , Str "comment,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line:"
+ ]
+ , Para [ Str "Code:" ]
+ , CodeBlock ( "" , [] , [] ) "<hr />"
+ , Para [ Str "Hr\8217s:" ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "emphasized" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , SoftBreak
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "strikeout" ]
+ , Str "."
+ ]
+ ]
+ , Para
+ [ Str "Superscripts:"
+ , Space
+ , Str "a"
+ , Superscript [ Str "bc" ]
+ , Str "d"
+ , SoftBreak
+ , Str "a"
+ , Superscript [ Emph [ Str "hello" ] ]
+ , Space
+ , Str "a"
+ , Superscript [ Str "hello" , Space , Str "there" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Subscripts:"
+ , Space
+ , Str "H"
+ , Subscript [ Str "2" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Subscript [ Str "23" ]
+ , Str "O,"
+ , SoftBreak
+ , Str "H"
+ , Subscript
+ [ Str "many" , Space , Str "of" , Space , Str "them" ]
+ , Str "O."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "superscripts"
+ , Space
+ , Str "or"
+ , Space
+ , Str "subscripts,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "unescaped"
+ , Space
+ , Str "spaces:"
+ , Space
+ , Str "a^b"
+ , Space
+ , Str "c^d,"
+ , Space
+ , Str "a"
+ , Math InlineMath "\\sim"
+ , Str "b"
+ , SoftBreak
+ , Str "c"
+ , Math InlineMath "\\sim"
+ , Str "d."
+ ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header
+ 1
+ ( "smart-quotes-ellipses-dashes" , [] , [] )
+ [ Str "Smart"
+ , Space
+ , Str "quotes,"
+ , Space
+ , Str "ellipses,"
+ , Space
+ , Str "dashes"
+ ]
+ , Para
+ [ Quoted DoubleQuote [ Str "Hello," ]
+ , Space
+ , Str "said"
+ , Space
+ , Str "the"
+ , Space
+ , Str "spider."
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "\8198"
+ , Quoted SingleQuote [ Str "Shelob" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "my"
+ , Space
+ , Str "name."
+ ]
+ ]
+ , Para
+ [ Quoted SingleQuote [ Str "A" ]
+ , Str ","
+ , Space
+ , Quoted SingleQuote [ Str "B" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Quoted SingleQuote [ Str "C" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "letters."
+ ]
+ , Para
+ [ Quoted SingleQuote [ Str "Oak," ]
+ , Space
+ , Quoted SingleQuote [ Str "elm," ]
+ , Space
+ , Str "and"
+ , Space
+ , Quoted SingleQuote [ Str "beech" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "names"
+ , Space
+ , Str "of"
+ , Space
+ , Str "trees."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Quoted SingleQuote [ Str "pine." ]
+ ]
+ , Para
+ [ Quoted
+ SingleQuote
+ [ Str "He"
+ , Space
+ , Str "said,"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "go."
+ ]
+ , Str "\8198"
+ ]
+ , Space
+ , Str "Were"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alive"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "70\8217s?"
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "quoted"
+ , Space
+ , Quoted SingleQuote [ Code ( "" , [] , [] ) "code" ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Quoted
+ DoubleQuote
+ [ Link
+ ( "" , [] , [] )
+ [ Str "quoted" , Space , Str "link" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "dashes:"
+ , Space
+ , Str "one\8212two\8212three\8212four\8212five."
+ ]
+ , Para
+ [ Str "Dashes"
+ , Space
+ , Str "between"
+ , Space
+ , Str "numbers:"
+ , Space
+ , Str "5\8211\&7,"
+ , Space
+ , Str "255\8211\&66,"
+ , Space
+ , Str "1987\8211\&1999."
+ ]
+ , Para [ Str "Ellipses\8230and\8230and\8230." ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header 1 ( "latex" , [] , [] ) [ Str "LaTeX" ]
+ , BulletList
+ [ [ Para
+ [ Cite
+ [ Citation
+ { citationId = "smith.1899"
+ , citationPrefix = []
+ , citationSuffix = [ Str "22-23" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ]
+ [ RawInline (Format "latex") "\\cite[22-23]{smith.1899}"
+ ]
+ ]
+ ]
+ , [ RawBlock (Format "latex") "\\doublespacing" ]
+ , [ Para [ Math InlineMath "2+2=4" ] ]
+ , [ Para [ Math InlineMath "x \\in y" ] ]
+ , [ Para [ Math InlineMath "\\alpha \\wedge \\omega" ] ]
+ , [ Para [ Math InlineMath "223" ] ]
+ , [ Para [ Math InlineMath "p" , Str "-Tree" ] ]
+ , [ Para
+ [ Math
+ InlineMath
+ "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"
+ ]
+ ]
+ , [ Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "that"
+ , Space
+ , Str "has"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , Space
+ , Str "in"
+ , Space
+ , Str "it:"
+ , SoftBreak
+ , Math InlineMath "\\alpha + \\omega \\times x^2"
+ , Str "."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "shouldn\8217t"
+ , Space
+ , Str "be"
+ , Space
+ , Str "math:"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "To"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "famous"
+ , Space
+ , Str "equation,"
+ , Space
+ , Str "write"
+ , Space
+ , Code ( "" , [] , [] ) "$e = mc^2$"
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "$22,000"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Emph [ Str "lot" ]
+ , Space
+ , Str "of"
+ , Space
+ , Str "money."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Str "$34,000."
+ , Space
+ , Str "(It"
+ , Space
+ , Str "worked"
+ , Space
+ , Str "if"
+ , SoftBreak
+ , Quoted DoubleQuote [ Str "lot" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "emphasized.)"
+ ]
+ ]
+ , [ Para
+ [ Str "Escaped"
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ":"
+ , Space
+ , Str "$73"
+ , Space
+ , Emph
+ [ Str "this"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "emphasized"
+ ]
+ , Space
+ , Str "23$."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "LaTeX"
+ , Space
+ , Str "table:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Animal" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Number" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Dog" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cat" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "A"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "one"
+ , Space
+ , Str "column:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault ) ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Animal" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Vegetable" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header
+ 1
+ ( "special-characters" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "I" , Space , Str "hat:" , Space , Str "\206" ]
+ ]
+ , [ Para
+ [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Para [ Str "section:" , Space , Str "\167" ] ]
+ , [ Para
+ [ Str "set"
+ , Space
+ , Str "membership:"
+ , Space
+ , Str "\8712"
+ ]
+ ]
+ , [ Para [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "way"
+ , Space
+ , Str "to"
+ , Space
+ , Str "write"
+ , Space
+ , Str "it."
+ ]
+ , Para
+ [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "\8216" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para
+ [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para
+ [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para
+ [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para
+ [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para
+ [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para
+ [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "explicit" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "with_underscore" ]
+ ( "/url/with_underscore" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Email" , Space , Str "link" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "Empty" ] ( "" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "reference" , [] , [] ) [ Str "Reference" ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "[brackets]" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
+ , Space
+ , Str "by"
+ , Space
+ , Str "itself"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "thrice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "[not][]"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , CodeBlock ( "" , [] , [] ) "[not]: /url"
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "biz" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "with-ampersands" , [] , [] )
+ [ Str "With" , Space , Str "ampersands" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "amersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "AT&T" ] ( "http://att.com/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline" , Space , Str "link" ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline"
+ , Space
+ , Str "link"
+ , Space
+ , Str "in"
+ , Space
+ , Str "pointy"
+ , Space
+ , Str "braces"
+ ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "autolinks" , [] , [] ) [ Str "Autolinks" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand:"
+ , Space
+ , Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "In" , Space , Str "a" , Space , Str "list?" ]
+ ]
+ , [ Para
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , [ Para [ Str "It" , Space , Str "should." ] ]
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "e-mail"
+ , Space
+ , Str "address:"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "nobody@nowhere.net" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Blockquoted:"
+ , Space
+ , Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , Para
+ [ Str "Auto-links"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "occur"
+ , Space
+ , Str "here:"
+ , Space
+ , Code ( "" , [] , [] ) "<http://example.com/>"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "or here: <http://example.com/>"
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune"
+ ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] ) [ Str "image" ] ( "lalune.jpg" , "" )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , Space
+ , Image
+ ( "" , [] , [] ) [ Str "image" ] ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ ]
+ , Div ( "" , [ "center" ] , [] ) [ HorizontalRule ]
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , SoftBreak
+ , Str "reference,"
+ , Note
+ [ Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "anywhere"
+ , Space
+ , Str "after"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote"
+ , SoftBreak
+ , Str "reference."
+ , Space
+ , Str "It"
+ , Space
+ , Str "need"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "placed"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document."
+ ]
+ ]
+ , SoftBreak
+ , Str "and"
+ , SoftBreak
+ , Str "another."
+ , Note
+ [ Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "the"
+ , Space
+ , Str "long"
+ , Space
+ , Str "note."
+ , Space
+ , Str "This"
+ , Space
+ , Str "one"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "blocks."
+ ]
+ , Para
+ [ Str "Subsequent"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "are"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "to"
+ , Space
+ , Str "show"
+ , Space
+ , Str "that"
+ , Space
+ , Str "they"
+ , Space
+ , Str "belong"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "footnote"
+ , Space
+ , Str "(as"
+ , Space
+ , Str "with"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items)."
+ ]
+ , CodeBlock ( "" , [] , [] ) " { <code> }"
+ , Para
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "want,"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "every"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "be"
+ , Space
+ , Str "lazy"
+ , SoftBreak
+ , Str "and"
+ , Space
+ , Str "just"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "line"
+ , Space
+ , Str "of"
+ , Space
+ , Str "each"
+ , Space
+ , Str "block."
+ ]
+ ]
+ , SoftBreak
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Emph [ Str "not" ]
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "it"
+ , Space
+ , Str "contains"
+ , SoftBreak
+ , Str "a"
+ , Space
+ , Str "space.[^my"
+ , Space
+ , Str "note]"
+ , Space
+ , Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "inline"
+ , SoftBreak
+ , Str "note."
+ , Note
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "easier" ]
+ , Space
+ , Str "to"
+ , Space
+ , Str "type."
+ , Space
+ , Str "Inline"
+ , Space
+ , Str "notes"
+ , Space
+ , Str "may"
+ , Space
+ , Str "contain"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "links" ]
+ ( "http://google.com" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "]"
+ , Space
+ , Str "verbatim"
+ , Space
+ , Str "characters,"
+ , SoftBreak
+ , Str "as"
+ , Space
+ , Str "well"
+ , Space
+ , Str "as"
+ , Space
+ , Str "[bracketed"
+ , Space
+ , Str "text]."
+ ]
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Notes"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "in"
+ , Space
+ , Str "quotes."
+ , Note [ Para [ Str "In" , Space , Str "quote." ] ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para
+ [ Str "And"
+ , Space
+ , Str "in"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items."
+ , Note [ Para [ Str "In" , Space , Str "list." ] ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "note,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "it"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , SoftBreak
+ , Str "indented."
+ ]
+ , Header
+ 1
+ ( "escaped-characters" , [] , [] )
+ [ Str "Escaped" , Space , Str "characters" ]
+ , Para
+ [ Str "$"
+ , Space
+ , Str "%"
+ , Space
+ , Str "&"
+ , Space
+ , Str "#"
+ , Space
+ , Str "_"
+ , Space
+ , Str "{"
+ , Space
+ , Str "}"
+ ]
+ ]
diff --git a/test/lhs-test-markdown.native b/test/lhs-test-markdown.native
index 7a423b1ab..42a32697b 100644
--- a/test/lhs-test-markdown.native
+++ b/test/lhs-test-markdown.native
@@ -1,8 +1,124 @@
-[Header 1 ("lhs-test",[],[]) [Str "lhs",Space,Str "test"]
-,Para [Code ("",[],[]) "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",SoftBreak,Str "return",Space,Str "a",Space,Str "single",Space,Str "value:"]
-,CodeBlock ("",["haskell","literate"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry\n -- arr (\\op (x,y) -> x `op` y)"
-,Para [Code ("",[],[]) "(***)",Space,Str "combines",Space,Str "two",Space,Str "arrows",Space,Str "into",Space,Str "a",Space,Str "new",Space,Str "arrow",Space,Str "by",Space,Str "running",Space,Str "the",Space,Str "two",Space,Str "arrows",Space,Str "on",Space,Str "a",SoftBreak,Str "pair",Space,Str "of",Space,Str "values",Space,Str "(one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "first",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair",Space,Str "and",Space,Str "one",Space,Str "arrow",Space,Str "on",Space,Str "the",SoftBreak,Str "second",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair)."]
-,CodeBlock ("",[],[]) "f *** g = first f >>> second g"
-,Para [Str "Block",Space,Str "quote:"]
-,BlockQuote
- [Para [Str "foo",Space,Str "bar"]]]
+[ Header
+ 1
+ ( "lhs-test" , [] , [] )
+ [ Str "lhs" , Space , Str "test" ]
+, Para
+ [ Code ( "" , [] , [] ) "unsplit"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "that"
+ , Space
+ , Str "takes"
+ , Space
+ , Str "a"
+ , Space
+ , Str "pair"
+ , Space
+ , Str "of"
+ , Space
+ , Str "values"
+ , Space
+ , Str "and"
+ , Space
+ , Str "combines"
+ , Space
+ , Str "them"
+ , Space
+ , Str "to"
+ , SoftBreak
+ , Str "return"
+ , Space
+ , Str "a"
+ , Space
+ , Str "single"
+ , Space
+ , Str "value:"
+ ]
+, CodeBlock
+ ( "" , [ "haskell" , "literate" ] , [] )
+ "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry\n -- arr (\\op (x,y) -> x `op` y)"
+, Para
+ [ Code ( "" , [] , [] ) "(***)"
+ , Space
+ , Str "combines"
+ , Space
+ , Str "two"
+ , Space
+ , Str "arrows"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "new"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "by"
+ , Space
+ , Str "running"
+ , Space
+ , Str "the"
+ , Space
+ , Str "two"
+ , Space
+ , Str "arrows"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "pair"
+ , Space
+ , Str "of"
+ , Space
+ , Str "values"
+ , Space
+ , Str "(one"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "item"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "pair"
+ , Space
+ , Str "and"
+ , Space
+ , Str "one"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "second"
+ , Space
+ , Str "item"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "pair)."
+ ]
+, CodeBlock
+ ( "" , [] , [] ) "f *** g = first f >>> second g"
+, Para [ Str "Block" , Space , Str "quote:" ]
+, BlockQuote [ Para [ Str "foo" , Space , Str "bar" ] ]
+]
diff --git a/test/lhs-test.native b/test/lhs-test.native
index 7a423b1ab..42a32697b 100644
--- a/test/lhs-test.native
+++ b/test/lhs-test.native
@@ -1,8 +1,124 @@
-[Header 1 ("lhs-test",[],[]) [Str "lhs",Space,Str "test"]
-,Para [Code ("",[],[]) "unsplit",Space,Str "is",Space,Str "an",Space,Str "arrow",Space,Str "that",Space,Str "takes",Space,Str "a",Space,Str "pair",Space,Str "of",Space,Str "values",Space,Str "and",Space,Str "combines",Space,Str "them",Space,Str "to",SoftBreak,Str "return",Space,Str "a",Space,Str "single",Space,Str "value:"]
-,CodeBlock ("",["haskell","literate"],[]) "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry\n -- arr (\\op (x,y) -> x `op` y)"
-,Para [Code ("",[],[]) "(***)",Space,Str "combines",Space,Str "two",Space,Str "arrows",Space,Str "into",Space,Str "a",Space,Str "new",Space,Str "arrow",Space,Str "by",Space,Str "running",Space,Str "the",Space,Str "two",Space,Str "arrows",Space,Str "on",Space,Str "a",SoftBreak,Str "pair",Space,Str "of",Space,Str "values",Space,Str "(one",Space,Str "arrow",Space,Str "on",Space,Str "the",Space,Str "first",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair",Space,Str "and",Space,Str "one",Space,Str "arrow",Space,Str "on",Space,Str "the",SoftBreak,Str "second",Space,Str "item",Space,Str "of",Space,Str "the",Space,Str "pair)."]
-,CodeBlock ("",[],[]) "f *** g = first f >>> second g"
-,Para [Str "Block",Space,Str "quote:"]
-,BlockQuote
- [Para [Str "foo",Space,Str "bar"]]]
+[ Header
+ 1
+ ( "lhs-test" , [] , [] )
+ [ Str "lhs" , Space , Str "test" ]
+, Para
+ [ Code ( "" , [] , [] ) "unsplit"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "that"
+ , Space
+ , Str "takes"
+ , Space
+ , Str "a"
+ , Space
+ , Str "pair"
+ , Space
+ , Str "of"
+ , Space
+ , Str "values"
+ , Space
+ , Str "and"
+ , Space
+ , Str "combines"
+ , Space
+ , Str "them"
+ , Space
+ , Str "to"
+ , SoftBreak
+ , Str "return"
+ , Space
+ , Str "a"
+ , Space
+ , Str "single"
+ , Space
+ , Str "value:"
+ ]
+, CodeBlock
+ ( "" , [ "haskell" , "literate" ] , [] )
+ "unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d\nunsplit = arr . uncurry\n -- arr (\\op (x,y) -> x `op` y)"
+, Para
+ [ Code ( "" , [] , [] ) "(***)"
+ , Space
+ , Str "combines"
+ , Space
+ , Str "two"
+ , Space
+ , Str "arrows"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "new"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "by"
+ , Space
+ , Str "running"
+ , Space
+ , Str "the"
+ , Space
+ , Str "two"
+ , Space
+ , Str "arrows"
+ , Space
+ , Str "on"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "pair"
+ , Space
+ , Str "of"
+ , Space
+ , Str "values"
+ , Space
+ , Str "(one"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "item"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "pair"
+ , Space
+ , Str "and"
+ , Space
+ , Str "one"
+ , Space
+ , Str "arrow"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "second"
+ , Space
+ , Str "item"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "pair)."
+ ]
+, CodeBlock
+ ( "" , [] , [] ) "f *** g = first f >>> second g"
+, Para [ Str "Block" , Space , Str "quote:" ]
+, BlockQuote [ Para [ Str "foo" , Space , Str "bar" ] ]
+]
diff --git a/test/lua/implicit-doc-filter.lua b/test/lua/implicit-doc-filter.lua
index 253462d1c..f053dc1b2 100644
--- a/test/lua/implicit-doc-filter.lua
+++ b/test/lua/implicit-doc-filter.lua
@@ -1,4 +1,4 @@
-function Doc (doc)
+function Pandoc (doc)
local meta = {}
local hello = { pandoc.Str "Hello,", pandoc.Space(), pandoc.Str "World!" }
local blocks = { pandoc.Para(hello) }
diff --git a/test/lua/module/pandoc-types.lua b/test/lua/module/pandoc-types.lua
index d4e063a5c..d9c9f82ac 100644
--- a/test/lua/module/pandoc-types.lua
+++ b/test/lua/module/pandoc-types.lua
@@ -55,31 +55,6 @@ return {
end),
},
- group 'list-like behavior' {
- test('can access version component numbers', function ()
- local version = Version '2.7.3'
- assert.is_nil(version[0])
- assert.are_equal(version[1], 2)
- assert.are_equal(version[2], 7)
- assert.are_equal(version[3], 3)
- end),
- test('can be iterated over', function ()
- local version_list = {2, 7, 3}
- local final_index = 0
- for i, v in pairs(Version(version_list)) do
- assert.are_equal(v, version_list[i])
- final_index = i
- end
- assert.are_equal(final_index, 3)
- end),
- test('length is the number of components', function ()
- assert.are_equal(#(Version '0'), 1)
- assert.are_equal(#(Version '1.6'), 2)
- assert.are_equal(#(Version '8.7.5'), 3)
- assert.are_equal(#(Version '2.9.1.5'), 4)
- end)
- },
-
group 'conversion to string' {
test('converting from and to string is a noop', function ()
local version_string = '1.19.4'
diff --git a/test/lua/module/pandoc-utils.lua b/test/lua/module/pandoc-utils.lua
index 9bd903f2d..4cf2c84a7 100644
--- a/test/lua/module/pandoc-utils.lua
+++ b/test/lua/module/pandoc-utils.lua
@@ -39,6 +39,46 @@ return {
end)
},
+ group 'equals' {
+ test('compares Pandoc elements', function ()
+ assert.is_truthy(
+ utils.equals(pandoc.Pandoc{'foo'}, pandoc.Pandoc{'foo'})
+ )
+ end),
+ test('compares Block elements', function ()
+ assert.is_truthy(
+ utils.equals(pandoc.Plain{'foo'}, pandoc.Plain{'foo'})
+ )
+ assert.is_falsy(
+ utils.equals(pandoc.Para{'foo'}, pandoc.Plain{'foo'})
+ )
+ end),
+ test('compares Inline elements', function ()
+ assert.is_truthy(
+ utils.equals(pandoc.Emph{'foo'}, pandoc.Emph{'foo'})
+ )
+ assert.is_falsy(
+ utils.equals(pandoc.Emph{'foo'}, pandoc.Strong{'foo'})
+ )
+ end),
+ test('compares Inline with Block elements', function ()
+ assert.is_falsy(
+ utils.equals(pandoc.Emph{'foo'}, pandoc.Plain{'foo'})
+ )
+ assert.is_falsy(
+ utils.equals(pandoc.Para{'foo'}, pandoc.Strong{'foo'})
+ )
+ end),
+ test('compares Pandoc with Block elements', function ()
+ assert.is_falsy(
+ utils.equals(pandoc.Pandoc{'foo'}, pandoc.Plain{'foo'})
+ )
+ assert.is_falsy(
+ utils.equals(pandoc.Para{'foo'}, pandoc.Pandoc{'foo'})
+ )
+ end),
+ },
+
group 'make_sections' {
test('sanity check', function ()
local blks = {
@@ -62,6 +102,31 @@ return {
end),
},
+ group 'references' {
+ test('gets references from doc', function ()
+ local ref = {
+ ['author'] = {
+ {given = 'Max', family = 'Mustermann'}
+ },
+ ['container-title'] = pandoc.Inlines('JOSS'),
+ ['id'] = 'test',
+ ['issued'] = {['date-parts'] = {{2021}}},
+ ['title'] = pandoc.Inlines{
+ pandoc.Quoted('DoubleQuote', 'Interesting'),
+ pandoc.Space(),
+ 'work'
+ },
+ ['type'] = 'article-journal',
+ }
+ local nocite = pandoc.Cite(
+ '@test',
+ {pandoc.Citation('test', 'NormalCitation')}
+ )
+ local doc = pandoc.Pandoc({}, {nocite = nocite, references = {ref}})
+ assert.are_same({ref}, pandoc.utils.references(doc))
+ end)
+ },
+
group 'sha1' {
test('hashing', function ()
local ref_hash = '0a0a9f2a6772942557ab5355d76af442f8f65e01'
@@ -70,7 +135,7 @@ return {
},
group 'stringify' {
- test('inlines', function ()
+ test('Inline', function ()
local inline = pandoc.Emph{
pandoc.Str 'Cogito',
pandoc.Space(),
@@ -79,7 +144,49 @@ return {
pandoc.Str 'sum.',
}
assert.are_equal('Cogito ergo sum.', utils.stringify(inline))
- end)
+ end),
+ test('Block', function ()
+ local block = pandoc.Para{
+ pandoc.Str 'Make',
+ pandoc.Space(),
+ pandoc.Str 'it',
+ pandoc.Space(),
+ pandoc.Str 'so.',
+ }
+ assert.are_equal('Make it so.', utils.stringify(block))
+ end),
+ test('boolean', function ()
+ assert.are_equal('true', utils.stringify(true))
+ assert.are_equal('false', utils.stringify(false))
+ end),
+ test('number', function ()
+ assert.are_equal('5', utils.stringify(5))
+ assert.are_equal('23.23', utils.stringify(23.23))
+ end),
+ test('Attr', function ()
+ local attr = pandoc.Attr('foo', {'bar'}, {a = 'b'})
+ assert.are_equal('', utils.stringify(attr))
+ end),
+ test('List', function ()
+ local list = pandoc.List{pandoc.Str 'a', pandoc.Blocks('b')}
+ assert.are_equal('ab', utils.stringify(list))
+ end),
+ test('Blocks', function ()
+ local blocks = pandoc.Blocks{pandoc.Para 'a', pandoc.Header(1, 'b')}
+ assert.are_equal('ab', utils.stringify(blocks))
+ end),
+ test('Inlines', function ()
+ local inlines = pandoc.Inlines{pandoc.Str 'a', pandoc.Subscript('b')}
+ assert.are_equal('ab', utils.stringify(inlines))
+ end),
+ test('Meta', function ()
+ local meta = pandoc.Meta{
+ a = pandoc.Inlines 'funny and ',
+ b = 'good movie',
+ c = pandoc.List{pandoc.Inlines{pandoc.Str '!'}}
+ }
+ assert.are_equal('funny and good movie!', utils.stringify(meta))
+ end),
},
group 'to_roman_numeral' {
@@ -91,6 +198,46 @@ return {
end)
},
+ group 'type' {
+ test('nil', function ()
+ assert.are_equal(utils.type(nil), 'nil')
+ end),
+ test('boolean', function ()
+ assert.are_equal(utils.type(true), 'boolean')
+ assert.are_equal(utils.type(false), 'boolean')
+ end),
+ test('number', function ()
+ assert.are_equal(utils.type(5), 'number')
+ assert.are_equal(utils.type(-3.02), 'number')
+ end),
+ test('string', function ()
+ assert.are_equal(utils.type(''), 'string')
+ assert.are_equal(utils.type('asdf'), 'string')
+ end),
+ test('plain table', function ()
+ assert.are_equal(utils.type({}), 'table')
+ end),
+ test('List', function ()
+ assert.are_equal(utils.type(pandoc.List{}), 'List')
+ end),
+ test('Inline', function ()
+ assert.are_equal(utils.type(pandoc.Str 'a'), 'Inline')
+ assert.are_equal(utils.type(pandoc.Emph 'emphasized'), 'Inline')
+ end),
+ test('Inlines', function ()
+ assert.are_equal(utils.type(pandoc.Inlines{pandoc.Str 'a'}), 'Inlines')
+ assert.are_equal(utils.type(pandoc.Inlines{pandoc.Emph 'b'}), 'Inlines')
+ end),
+ test('Blocks', function ()
+ assert.are_equal(utils.type(pandoc.Para 'a'), 'Block')
+ assert.are_equal(utils.type(pandoc.CodeBlock 'true'), 'Block')
+ end),
+ test('Inlines', function ()
+ assert.are_equal(utils.type(pandoc.Blocks{'a'}), 'Blocks')
+ assert.are_equal(utils.type(pandoc.Blocks{pandoc.CodeBlock 'b'}), 'Blocks')
+ end),
+ },
+
group 'to_simple_table' {
test('convertes Table', function ()
function simple_cell (blocks)
@@ -106,14 +253,14 @@ return {
{long = {pandoc.Plain {
pandoc.Str "the", pandoc.Space(), pandoc.Str "caption"}}},
{{pandoc.AlignDefault, nil}},
- {pandoc.Attr(), {{pandoc.Attr(), {simple_cell{pandoc.Plain "head1"}}}}},
+ pandoc.TableHead{pandoc.Row{simple_cell{pandoc.Plain "head1"}}},
{{
attr = pandoc.Attr(),
- body = {{pandoc.Attr(), {simple_cell{pandoc.Plain "cell1"}}}},
+ body = {pandoc.Row{simple_cell{pandoc.Plain "cell1"}}},
head = {},
row_head_columns = 0
}},
- {pandoc.Attr(), {}},
+ pandoc.TableFoot(),
pandoc.Attr()
)
local stbl = utils.to_simple_table(tbl)
@@ -155,5 +302,32 @@ return {
-- reversible
assert.are_same(simple_table, utils.to_simple_table(tbl))
end),
+ test('empty caption', function ()
+ local simple_table = pandoc.SimpleTable(
+ {},
+ {pandoc.AlignDefault},
+ {0},
+ {{pandoc.Plain 'a'}},
+ {{{pandoc.Plain 'b'}}}
+ )
+ local tbl = utils.from_simple_table(simple_table)
+ assert.are_equal(
+ pandoc.Blocks{},
+ tbl.caption.long
+ )
+ assert.is_nil(tbl.caption.short)
+ end),
+ test('empty body', function ()
+ local simple_table = pandoc.SimpleTable(
+ pandoc.Inlines('a nice caption'),
+ {pandoc.AlignDefault},
+ {0},
+ {{pandoc.Plain 'a'}},
+ {}
+ )
+ local tbl = utils.from_simple_table(simple_table)
+ tbl.bodies:map(print)
+ assert.are_same(pandoc.List(), tbl.bodies)
+ end),
}
}
diff --git a/test/lua/module/pandoc.lua b/test/lua/module/pandoc.lua
index fa1748c18..892ffee03 100644
--- a/test/lua/module/pandoc.lua
+++ b/test/lua/module/pandoc.lua
@@ -8,126 +8,182 @@ function os_is_windows ()
return package.config:sub(1,1) == '\\'
end
+-- Constructor behavior is tested in the hslua-pandoc-types module, so
+-- we just make sure the functions are present.
return {
- group 'Attr' {
- group 'Constructor' {
- test('returns null-Attr if no arguments are given', function ()
- local attr = pandoc.Attr()
- assert.are_equal(attr.identifier, '')
- assert.are_same(attr.classes, {})
- assert.are_same(attr.attributes, {})
- end),
- test(
- 'accepts string-indexed table or list of pairs as attributes',
- function ()
- local attributes_list = pandoc.List:new {{'one', '1'}, {'two', '2'}}
- local attr_from_list = pandoc.Attr('', {}, attributes_list:clone())
-
- assert.are_same(
- pandoc.List:new(attr_from_list.attributes),
- attributes_list
- )
-
- local attributes_table = {one = '1', two = '2'}
- local attr_from_table = pandoc.Attr('', {}, attributes_table)
-
- local assoc_list_from_table =
- pandoc.List:new(attr_from_table.attributes)
- -- won't work in general, but does in this special case
- table.sort(assoc_list_from_table, function(x, y) return x[1]<y[1] end)
- assert.are_same(
- assoc_list_from_table,
- attributes_list
- )
- end
- )
+ group 'Constructors' {
+ group 'Misc' {
+ test('pandoc.Attr is a function', function ()
+ assert.are_equal(type(pandoc.Attr), 'function')
+ end),
+ test('pandoc.AttributeList is a function', function ()
+ assert.are_equal(type(pandoc.AttributeList), 'function')
+ end),
+ test('pandoc.Blocks is a function', function ()
+ assert.are_equal(type(pandoc.Blocks), 'function')
+ end),
+ test('pandoc.Citation is a function', function ()
+ assert.are_equal(type(pandoc.Citation), 'function')
+ end),
+ test('pandoc.Inlines is a function', function ()
+ assert.are_equal(type(pandoc.Inlines), 'function')
+ end),
+ test('pandoc.SimpleTable is a function', function ()
+ assert.are_equal(type(pandoc.SimpleTable), 'function')
+ end),
+ test('pandoc.Meta is a function', function ()
+ assert.are_equal(type(pandoc.Meta), 'function')
+ end),
+ test('pandoc.Pandoc is a function', function ()
+ assert.are_equal(type(pandoc.Pandoc), 'function')
+ end),
},
- group 'AttributeList' {
- test('allows access via fields', function ()
- local attributes = pandoc.Attr('', {}, {{'a', '1'}, {'b', '2'}}).attributes
- assert.are_equal(attributes.a, '1')
- assert.are_equal(attributes.b, '2')
- end),
- test('allows access to pairs via numerical indexing', function ()
- local attributes = pandoc.Attr('', {}, {{'a', '1'}, {'b', '2'}}).attributes
- assert.are_same(attributes[1], {'a', '1'})
- assert.are_same(attributes[2], {'b', '2'})
- end),
- test('adds entries by field name', function ()
- local attributes = pandoc.Attr('',{}, {{'c', '1'}, {'d', '2'}}).attributes
- attributes.e = '3'
- assert.are_same(
- -- checking the full AttributeList would "duplicate" entries
- setmetatable(attributes, nil),
- {{'c', '1'}, {'d', '2'}, {'e', '3'}}
- )
+ group "Inline elements" {
+ test('pandoc.AttributeList is a function', function ()
+ assert.are_equal(type(pandoc.Cite), 'function')
+ end),
+ test('pandoc.AttributeList is a function', function ()
+ assert.are_equal(type(pandoc.Code), 'function')
+ end),
+ test('pandoc.Emph is a function', function ()
+ assert.are_equal(type(pandoc.Emph), 'function')
+ end),
+ test('pandoc.Image is a function', function ()
+ assert.are_equal(type(pandoc.Image), 'function')
+ end),
+ test('pandoc.Link is a function', function ()
+ assert.are_equal(type(pandoc.Link), 'function')
+ end),
+ test('pandoc.Math is a function', function ()
+ assert.are_equal(type(pandoc.Math), 'function')
+ end),
+ test('pandoc.Note is a function', function ()
+ assert.are_equal(type(pandoc.Note), 'function')
+ end),
+ test('pandoc.Quoted is a function', function ()
+ assert.are_equal(type(pandoc.Quoted), 'function')
+ end),
+ test('pandoc.SmallCaps is a function', function ()
+ assert.are_equal(type(pandoc.SmallCaps), 'function')
+ end),
+ test('pandoc.SoftBreak is a function', function ()
+ assert.are_equal(type(pandoc.SoftBreak), 'function')
+ end),
+ test('pandoc.Span is a function', function ()
+ assert.are_equal(type(pandoc.Span), 'function')
+ end),
+ test('pandoc.Str is a function', function ()
+ assert.are_equal(type(pandoc.Str), 'function')
+ end),
+ test('pandoc.Strikeout is a function', function ()
+ assert.are_equal(type(pandoc.Strikeout), 'function')
+ end),
+ test('pandoc.Strong is a function', function ()
+ assert.are_equal(type(pandoc.Strong), 'function')
+ end),
+ test('pandoc.Subscript is a function', function ()
+ assert.are_equal(type(pandoc.Subscript), 'function')
+ end),
+ test('pandoc.Superscript is a function', function ()
+ assert.are_equal(type(pandoc.Superscript), 'function')
+ end),
+ test('pandoc.Underline is a function', function ()
+ assert.are_equal(type(pandoc.Underline), 'function')
end),
- test('deletes entries by field name', function ()
- local attributes = pandoc.Attr('',{}, {a = '1', b = '2'}).attributes
- attributes.a = nil
- assert.is_nil(attributes.a)
- local assoc_list = setmetatable(attributes, nil)
- assert.are_same(assoc_list, {{'b', '2'}})
- end),
- test('remains unchanged if deleted key did not exist', function ()
- local assoc_list = pandoc.List:new {{'alpha', 'x'}, {'beta', 'y'}}
- local attributes = pandoc.Attr('', {}, assoc_list:clone()).attributes
- attributes.a = nil
- assert.are_same(pandoc.List:new(attributes), assoc_list)
- end),
- test('gives key-value pairs when iterated-over', function ()
- local attributes = {width = '11', height = '22', name = 'test'}
- local attr = pandoc.Attr('', {}, attributes)
- local count = 0
- for k, v in pairs(attr.attributes) do
- assert.are_equal(attributes[k], v)
- count = count + 1
- end
- assert.are_equal(count, 3)
- end)
},
- group 'HTML-like attribute tables' {
- test('in element constructor', function ()
- local html_attributes = {
- id = 'the-id',
- class = 'class1 class2',
- width = '11',
- height = '12'
- }
- local attr = pandoc.Span('test', html_attributes).attr
- assert.are_equal(attr.identifier, 'the-id')
- assert.are_equal(attr.classes[1], 'class1')
- assert.are_equal(attr.classes[2], 'class2')
- assert.are_equal(attr.attributes.width, '11')
- assert.are_equal(attr.attributes.height, '12')
- end),
- test('element attr setter', function ()
- local html_attributes = {
- id = 'the-id',
- class = 'class1 class2',
- width = "11",
- height = "12"
- }
- local span = pandoc.Span 'test'
- span.attr = html_attributes
- assert.are_equal(span.attr.identifier, 'the-id')
- assert.are_equal(span.attr.classes[1], 'class1')
- assert.are_equal(span.attr.classes[2], 'class2')
- assert.are_equal(span.attr.attributes.width, '11')
- assert.are_equal(span.attr.attributes.height, '12')
- end),
- test('element attrbutes setter', function ()
- local attributes = {
- width = "11",
- height = "12"
- }
- local span = pandoc.Span 'test'
- span.attributes = attributes
- assert.are_equal(span.attr.attributes.width, '11')
- assert.are_equal(span.attr.attributes.height, '12')
- end)
+ group "Block elements" {
+ test('pandoc.BlockQuote is a function', function ()
+ assert.are_equal(type(pandoc.BlockQuote), 'function')
+ end),
+ test('pandoc.BulletList is a function', function ()
+ assert.are_equal(type(pandoc.BulletList), 'function')
+ end),
+ test('pandoc.CodeBlock is a function', function ()
+ assert.are_equal(type(pandoc.CodeBlock), 'function')
+ end),
+ test('pandoc.DefinitionList is a function', function ()
+ assert.are_equal(type(pandoc.DefinitionList), 'function')
+ end),
+ test('pandoc.Div is a function', function ()
+ assert.are_equal(type(pandoc.Div), 'function')
+ end),
+ test('pandoc.Header is a function', function ()
+ assert.are_equal(type(pandoc.Header), 'function')
+ end),
+ test('pandoc.LineBlock is a function', function ()
+ assert.are_equal(type(pandoc.LineBlock), 'function')
+ end),
+ test('pandoc.Null is a function', function ()
+ assert.are_equal(type(pandoc.Null), 'function')
+ end),
+ test('pandoc.OrderedList is a function', function ()
+ assert.are_equal(type(pandoc.OrderedList), 'function')
+ end),
+ test('pandoc.Para is a function', function ()
+ assert.are_equal(type(pandoc.Para), 'function')
+ end),
+ test('pandoc.Plain is a function', function ()
+ assert.are_equal(type(pandoc.Plain), 'function')
+ end),
+ test('pandoc.RawBlock is a function', function ()
+ assert.are_equal(type(pandoc.Plain), 'function')
+ end),
+ test('pandoc.Table is a function', function ()
+ assert.are_equal(type(pandoc.Table), 'function')
+ end),
}
},
+ group 'MetaValue elements' {
+ test('MetaList elements behave like lists', function ()
+ local metalist = pandoc.MetaList{}
+ assert.are_equal(type(metalist.insert), 'function')
+ assert.are_equal(type(metalist.remove), 'function')
+ end),
+ test('`tag` is an alias for `t``', function ()
+ assert.are_equal((pandoc.MetaList{}).tag, (pandoc.MetaList{}).t)
+ assert.are_equal((pandoc.MetaMap{}).tag, (pandoc.MetaMap{}).t)
+ assert.are_equal((pandoc.MetaInlines{}).tag, (pandoc.MetaInlines{}).t)
+ assert.are_equal((pandoc.MetaBlocks{}).tag, (pandoc.MetaBlocks{}).t)
+ end),
+ },
+ group 'Meta' {
+ test('inline list is treated as MetaInlines', function ()
+ local meta = pandoc.Pandoc({}, {test = {pandoc.Emph 'check'}}).meta
+ assert.are_same(meta.test, {pandoc.Emph{pandoc.Str 'check'}})
+ end),
+ test('inline element is treated as MetaInlines singleton', function ()
+ local meta = pandoc.Pandoc({}, {test = pandoc.Emph 'check'}).meta
+ assert.are_same(meta.test, {pandoc.Emph{pandoc.Str 'check'}})
+ end),
+ test('block list is treated as MetaBlocks', function ()
+ local meta = pandoc.Pandoc({}, {test = {pandoc.Plain 'check'}}).meta
+ assert.are_same(meta.test, {pandoc.Plain{pandoc.Str 'check'}})
+ end),
+ test('block element is treated as MetaBlocks singleton', function ()
+ local meta = pandoc.Pandoc({}, {test = pandoc.Plain 'check'}).meta
+ assert.are_same(meta.test, {pandoc.Plain{pandoc.Str 'check'}})
+ end),
+ },
+ group 'Other types' {
+ group 'ReaderOptions' {
+ test('returns a userdata value', function ()
+ local opts = pandoc.ReaderOptions {}
+ assert.are_equal(type(opts), 'userdata')
+ end),
+ test('can construct from table', function ()
+ local opts = pandoc.ReaderOptions {columns = 66}
+ assert.are_equal(opts.columns, 66)
+ end),
+ test('can construct from other ReaderOptions value', function ()
+ local orig = pandoc.ReaderOptions{columns = 65}
+ local copy = pandoc.ReaderOptions(orig)
+ for k, v in pairs(orig) do
+ assert.are_same(copy[k], v)
+ end
+ assert.are_equal(copy.columns, 65)
+ end),
+ },
+ },
group 'clone' {
test('clones Attr', function ()
@@ -163,6 +219,8 @@ return {
local cloned = cite:clone()
cite.id = 'newton'
assert.are_same(cloned.id, 'leibniz')
+ assert.are_same(cite.id, 'newton')
+ assert.are_same(cite.mode, cloned.mode)
end),
},
@@ -205,6 +263,22 @@ return {
})
assert.are_same(expected, pandoc.read(valid_markdown))
end),
+ test('unsupported extension', function ()
+ assert.error_matches(
+ function () pandoc.read('foo', 'gfm+empty_paragraphs') end,
+ 'Extension empty_paragraphs not supported for gfm'
+ )
+ end),
+ test('read with other indented code classes', function()
+ local indented_code = ' return true'
+ local expected = pandoc.Pandoc({
+ pandoc.CodeBlock('return true', {class='foo'})
+ })
+ assert.are_same(
+ expected,
+ pandoc.read(indented_code, 'markdown', {indented_code_classes={'foo'}})
+ )
+ end),
test('failing read', function ()
assert.error_matches(
function () pandoc.read('foo', 'nosuchreader') end,
@@ -249,5 +323,26 @@ return {
)
assert.are_equal('1234', table.concat(acc))
end)
+ },
+
+ group 'Marshal' {
+ group 'Inlines' {
+ test('Strings are broken into words', function ()
+ assert.are_equal(
+ pandoc.Emph 'Nice, init?',
+ pandoc.Emph{pandoc.Str 'Nice,', pandoc.Space(), pandoc.Str 'init?'}
+ )
+ end)
+ },
+ group 'Blocks' {
+ test('Strings are broken into words and wrapped in Plain', function ()
+ assert.are_equal(
+ pandoc.Div{
+ pandoc.Plain{pandoc.Str 'Nice,', pandoc.Space(), pandoc.Str 'init?'}
+ },
+ pandoc.Div{'Nice, init?'}
+ )
+ end)
+ }
}
}
diff --git a/test/man-reader.native b/test/man-reader.native
index 2ab088ff1..1fe99ae35 100644
--- a/test/man-reader.native
+++ b/test/man-reader.native
@@ -1,300 +1,951 @@
-Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "Oct",Space,Str "17,",Space,Str "2018"]),("section",MetaInlines []),("title",MetaInlines [Str "Pandoc",Space,Str "Man",Space,Str "tests"])]})
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc."]
-,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
-,Header 1 ("",[],[]) [Str "Headers"]
-,Header 1 ("",[],[]) [Str "Level",Space,Str "1"]
-,Header 2 ("",[],[]) [Str "Level",Space,Str "2"]
-,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
-,Header 1 ("",[],[]) [Str "Paragraphs"]
-,Para [Str "Here's",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "Another",Space,Str "paragraph",Space,Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",Space,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",Space,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",Space,Str "list",Space,Str "item."]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break"]
-,Para [Str "here."]
-,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
-,Header 1 ("",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
-,BlockQuote
- [CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"]
-,Para [Str "A",Space,Str "list:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "item",Space,Str "one"]]
- ,[Para [Str "item",Space,Str "two"]]]
-,Header 1 ("",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) "\tthis code line is indented by one tab"
-,Para [Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]
-,Header 1 ("",[],[]) [Str "Lists"]
-,Header 2 ("",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Header 2 ("",[],[]) [Str "Ordered"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Header 2 ("",[],[]) [Str "Nested"]
-,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]
- ,BulletList
- [[Para [Str "Tab"]]]]]]]
-,Para [Str "Here's",Space,Str "another:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Para [Str "Same",Space,Str "thing:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Para [Str "Fee"]]
- ,[Para [Str "Fie"]]
- ,[Para [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("",[],[]) [Str "different",Space,Str "styles:"]
-,OrderedList (1,UpperAlpha,Period)
- [[Para [Str "Upper",Space,Str "Alpha"]
- ,OrderedList (1,UpperRoman,Period)
- [[Para [Str "Upper",Space,Str "Roman."]
- ,OrderedList (6,Decimal,TwoParens)
- [[Para [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
- ,OrderedList (3,LowerAlpha,OneParen)
- [[Para [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
-,Header 2 ("",[],[]) [Str "Ordered"]
-,Para [Str "Definition",Space,Str "lists"]
-,DefinitionList
- [([Strong [Str "term1"]],
- [[Para [Str "definition",Space,Str "1"]
- ,Para [Str "continued"]]])
- ,([Strong [Str "term2"]],
- [[Para [Str "definition",Space,Str "2",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*",Space,Str "*"]]])]
-,Header 1 ("",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,Header 1 ("",[],[]) [Str "Links"]
-,Para [Link ("",[],[]) [Str "some",Space,Str "randomsite"] ("http://example.com",""),Str "."]
-,Para [Link ("",[],[]) [Str "my",Space,Str "email",Space,Str "address"] ("mailto:me@example.com",""),Str "."]
-,Header 1 ("",[],[]) [Str "Macros"]
-,Para [Strong [Str "Me",Space,Str "Myself"],Space,Str "and",Space,Str "I.",Space,Emph [Str "The",Space,Str "author",Space,Str "is",Space,Str "John",Space,Str "Jones."],Space,Str "It's",Space,Str "The",Space,Strong [Str "Author"],Str "."]
-,Header 1 ("",[],[]) [Str "Tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",Space,Emph [Str "more"]]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Centered",Space,Str "Header"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",Space,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right",Space,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default",Space,Str "aligned"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidth 0.5)
- ,(AlignLeft,ColWidth 0.5)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "one"]
- ,Para [Str "two"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [CodeBlock ("",[],[]) "some\n code"]]])]
- (TableFoot ("",[],[])
- [])]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "date"
+ , MetaInlines
+ [ Str "Oct" , Space , Str "17," , Space , Str "2018" ]
+ )
+ , ( "section" , MetaInlines [] )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc"
+ , Space
+ , Str "Man"
+ , Space
+ , Str "tests"
+ ]
+ )
+ ]
+ }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ ]
+ , Para
+ [ Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ ]
+ , Header 1 ( "" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 1 ( "" , [] , [] ) [ Str "Level" , Space , Str "1" ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "Level" , Space , Str "2" ]
+ , Para
+ [ Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ ]
+ , Header 1 ( "" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here's"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "Another"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , Space
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ , Space
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "looked"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ ]
+ , Para [ Str "here." ]
+ , Para
+ [ Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ ]
+ , Header
+ 1 ( "" , [] , [] ) [ Str "Block" , Space , Str "Quotes" ]
+ , Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , BlockQuote
+ [ CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ ]
+ , Para [ Str "A" , Space , Str "list:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "item" , Space , Str "one" ] ]
+ , [ Para [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Header
+ 1 ( "" , [] , [] ) [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] ) "\tthis code line is indented by one tab"
+ , Para
+ [ Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ ]
+ , Header 1 ( "" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "" , [] , [] ) [ Str "Ordered" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header 2 ( "" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList
+ [ [ Para [ Str "Tab" ]
+ , BulletList [ [ Para [ Str "Tab" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here's" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para [ Str "Same" , Space , Str "thing:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Para [ Str "Fee" ] ]
+ , [ Para [ Str "Fie" ] ]
+ , [ Para [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "" , [] , [] )
+ [ Str "different" , Space , Str "styles:" ]
+ , OrderedList
+ ( 1 , UpperAlpha , Period )
+ [ [ Para [ Str "Upper" , Space , Str "Alpha" ]
+ , OrderedList
+ ( 1 , UpperRoman , Period )
+ [ [ Para [ Str "Upper" , Space , Str "Roman." ]
+ , OrderedList
+ ( 6 , Decimal , TwoParens )
+ [ [ Para
+ [ Str "Decimal"
+ , Space
+ , Str "start"
+ , Space
+ , Str "with"
+ , Space
+ , Str "6"
+ ]
+ , OrderedList
+ ( 3 , LowerAlpha , OneParen )
+ [ [ Para
+ [ Str "Lower"
+ , Space
+ , Str "alpha"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paren"
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header 2 ( "" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Definition" , Space , Str "lists" ]
+ , DefinitionList
+ [ ( [ Strong [ Str "term1" ] ]
+ , [ [ Para [ Str "definition" , Space , Str "1" ]
+ , Para [ Str "continued" ]
+ ]
+ ]
+ )
+ , ( [ Strong [ Str "term2" ] ]
+ , [ [ Para
+ [ Str "definition"
+ , Space
+ , Str "2"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ , Space
+ , Str "*"
+ ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para
+ [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para
+ [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para
+ [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para
+ [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para
+ [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para
+ [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , Header 1 ( "" , [] , [] ) [ Str "Links" ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "some" , Space , Str "randomsite" ]
+ ( "http://example.com" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "my" , Space , Str "email" , Space , Str "address" ]
+ ( "mailto:me@example.com" , "" )
+ , Str "."
+ ]
+ , Header 1 ( "" , [] , [] ) [ Str "Macros" ]
+ , Para
+ [ Strong [ Str "Me" , Space , Str "Myself" ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "I."
+ , Space
+ , Emph
+ [ Str "The"
+ , Space
+ , Str "author"
+ , Space
+ , Str "is"
+ , Space
+ , Str "John"
+ , Space
+ , Str "Jones."
+ ]
+ , Space
+ , Str "It's"
+ , Space
+ , Str "The"
+ , Space
+ , Strong [ Str "Author" ]
+ , Str "."
+ ]
+ , Header 1 ( "" , [] , [] ) [ Str "Tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , Space , Emph [ Str "more" ] ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Centered" , Space , Str "Header" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , Space , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" , Space , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" , Space , Str "aligned" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , Space
+ , Str "spans"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , Space
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "column"
+ , Space
+ , Str "headers:"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidth 0.5 )
+ , ( AlignLeft , ColWidth 0.5 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "one" ] , Para [ Str "two" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ CodeBlock ( "" , [] , [] ) "some\n code" ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
diff --git a/test/markdown-citations.native b/test/markdown-citations.native
index 1d4b1a8b2..f37fd82fb 100644
--- a/test/markdown-citations.native
+++ b/test/markdown-citations.native
@@ -1,17 +1,522 @@
-[Header 1 ("pandoc-with-citeproc-hs",[],[]) [Str "Pandoc",Space,Str "with",Space,Str "citeproc-hs"]
-,BulletList
- [[Para [Cite [Citation {citationId = "nonexistent", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 1, citationHash = 0}] [Str "[@nonexistent]"]]]
- ,[Para [Cite [Citation {citationId = "nonexistent", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 2, citationHash = 0}] [Str "@nonexistent"]]]
- ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 3, citationHash = 0}] [Str "@item1"],Space,Str "says",Space,Str "blah."]]
- ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.\160\&30"], citationMode = AuthorInText, citationNoteNum = 4, citationHash = 0}] [Str "@item1",Space,Str "[p.",Space,Str "30]"],Space,Str "says",Space,Str "blah."]]
- ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Str "p.\160\&30,",Space,Str "with",Space,Str "suffix"], citationMode = AuthorInText, citationNoteNum = 5, citationHash = 0}] [Str "@item1",Space,Str "[p.",Space,Str "30,",Space,Str "with",Space,Str "suffix]"],Space,Str "says",Space,Str "blah."]]
- ,[Para [Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = AuthorInText, citationNoteNum = 6, citationHash = 0},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.\160\&30"], citationMode = SuppressAuthor, citationNoteNum = 6, citationHash = 0},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "see",Space,Str "also"], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 6, citationHash = 0}] [Str "@item1",Space,Str "[-@item2",Space,Str "p.",Space,Str "30;",Space,Str "see",Space,Str "also",Space,Str "@\1087\1091\1085\1082\1090\&3]"],Space,Str "says",Space,Str "blah."]]
- ,[Para [Str "In",Space,Str "a",Space,Str "note.",Note [Para [Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [Str "p.\160\&12"], citationMode = AuthorInText, citationNoteNum = 7, citationHash = 0}] [Str "@\1087\1091\1085\1082\1090\&3",Space,Str "[p.",Space,Str "12]"],Space,Str "and",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "locators",Space,Cite [Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 7, citationHash = 0}] [Str "[@\1087\1091\1085\1082\1090\&3]"],Str "."]]]]
- ,[Para [Str "A",Space,Str "citation",Space,Str "group",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.\160\&3"], citationMode = NormalCitation, citationNoteNum = 8, citationHash = 0},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [Str "also"], citationSuffix = [Space,Str "p.\160\&34-35"], citationMode = NormalCitation, citationNoteNum = 8, citationHash = 0}] [Str "[see",Space,Str "@item1",Space,Str "chap.",Space,Str "3;",Space,Str "also",Space,Str "@\1087\1091\1085\1082\1090\&3",Space,Str "p.",Space,Str "34-35]"],Str "."]]
- ,[Para [Str "Another",Space,Str "one",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "p.\160\&34-35"], citationMode = NormalCitation, citationNoteNum = 9, citationHash = 0}] [Str "[see",Space,Str "@item1",Space,Str "p.",Space,Str "34-35]"],Str "."]]
- ,[Para [Str "And",Space,Str "another",Space,Str "one",Space,Str "in",Space,Str "a",Space,Str "note.",Note [Para [Str "Some",Space,Str "citations",Space,Cite [Citation {citationId = "item1", citationPrefix = [Str "see"], citationSuffix = [Space,Str "chap.\160\&3"], citationMode = NormalCitation, citationNoteNum = 10, citationHash = 0},Citation {citationId = "\1087\1091\1085\1082\1090\&3", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 10, citationHash = 0},Citation {citationId = "item2", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 10, citationHash = 0}] [Str "[see",Space,Str "@item1",Space,Str "chap.",Space,Str "3;",Space,Str "@\1087\1091\1085\1082\1090\&3;",Space,Str "@item2]"],Str "."]]]]
- ,[Para [Str "Citation",Space,Str "with",Space,Str "a",Space,Str "suffix",Space,Str "and",Space,Str "locator",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Space,Str "pp.\160\&33,",Space,Str "35-37,",Space,Str "and",Space,Str "nowhere",Space,Str "else"], citationMode = NormalCitation, citationNoteNum = 11, citationHash = 0}] [Str "[@item1",Space,Str "pp.",Space,Str "33,",Space,Str "35-37,",Space,Str "and",Space,Str "nowhere",Space,Str "else]"],Str "."]]
- ,[Para [Str "Citation",Space,Str "with",Space,Str "suffix",Space,Str "only",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [Space,Str "and",Space,Str "nowhere",Space,Str "else"], citationMode = NormalCitation, citationNoteNum = 12, citationHash = 0}] [Str "[@item1",Space,Str "and",Space,Str "nowhere",Space,Str "else]"],Str "."]]
- ,[Para [Str "Now",Space,Str "some",Space,Str "modifiers.",Note [Para [Str "Like",Space,Str "a",Space,Str "citation",Space,Str "without",Space,Str "author:",Space,Cite [Citation {citationId = "item1", citationPrefix = [], citationSuffix = [], citationMode = SuppressAuthor, citationNoteNum = 13, citationHash = 0}] [Str "[-@item1]"],Str ",",Space,Str "and",Space,Str "now",Space,Str "Doe",Space,Str "with",Space,Str "a",Space,Str "locator",Space,Cite [Citation {citationId = "item2", citationPrefix = [], citationSuffix = [Space,Str "p.\160\&44"], citationMode = SuppressAuthor, citationNoteNum = 13, citationHash = 0}] [Str "[-@item2",Space,Str "p.",Space,Str "44]"],Str "."]]]]
- ,[Para [Str "With",Space,Str "some",Space,Str "markup",Space,Cite [Citation {citationId = "item1", citationPrefix = [Emph [Str "see"]], citationSuffix = [Space,Str "p.\160",Strong [Str "32"]], citationMode = NormalCitation, citationNoteNum = 14, citationHash = 0}] [Str "[*see*",Space,Str "@item1",Space,Str "p.",Space,Str "**32**]"],Str "."]]]
-,Header 1 ("references",[],[]) [Str "References"]]
+[ Header
+ 1
+ ( "pandoc-with-citeproc-hs" , [] , [] )
+ [ Str "Pandoc"
+ , Space
+ , Str "with"
+ , Space
+ , Str "citeproc-hs"
+ ]
+, BulletList
+ [ [ Para
+ [ Cite
+ [ Citation
+ { citationId = "nonexistent"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 1
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@nonexistent]" ]
+ ]
+ ]
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "nonexistent"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 2
+ , citationHash = 0
+ }
+ ]
+ [ Str "@nonexistent" ]
+ ]
+ ]
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 3
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1" ]
+ , Space
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
+ ]
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = [ Str "p.\160\&30" ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 4
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1" , Space , Str "[p." , Space , Str "30]" ]
+ , Space
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
+ ]
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Str "p.\160\&30,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "suffix"
+ ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 5
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1"
+ , Space
+ , Str "[p."
+ , Space
+ , Str "30,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "suffix]"
+ ]
+ , Space
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
+ ]
+ , [ Para
+ [ Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 6
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "item2"
+ , citationPrefix = []
+ , citationSuffix = [ Space , Str "p.\160\&30" ]
+ , citationMode = SuppressAuthor
+ , citationNoteNum = 6
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = [ Str "see" , Space , Str "also" ]
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 6
+ , citationHash = 0
+ }
+ ]
+ [ Str "@item1"
+ , Space
+ , Str "[-@item2"
+ , Space
+ , Str "p."
+ , Space
+ , Str "30;"
+ , Space
+ , Str "see"
+ , Space
+ , Str "also"
+ , Space
+ , Str "@\1087\1091\1085\1082\1090\&3]"
+ ]
+ , Space
+ , Str "says"
+ , Space
+ , Str "blah."
+ ]
+ ]
+ , [ Para
+ [ Str "In"
+ , Space
+ , Str "a"
+ , Space
+ , Str "note."
+ , Note
+ [ Para
+ [ Cite
+ [ Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = []
+ , citationSuffix = [ Str "p.\160\&12" ]
+ , citationMode = AuthorInText
+ , citationNoteNum = 7
+ , citationHash = 0
+ }
+ ]
+ [ Str "@\1087\1091\1085\1082\1090\&3"
+ , Space
+ , Str "[p."
+ , Space
+ , Str "12]"
+ ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Str "citation"
+ , Space
+ , Str "without"
+ , Space
+ , Str "locators"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 7
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@\1087\1091\1085\1082\1090\&3]" ]
+ , Str "."
+ ]
+ ]
+ ]
+ ]
+ , [ Para
+ [ Str "A"
+ , Space
+ , Str "citation"
+ , Space
+ , Str "group"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Str "see" ]
+ , citationSuffix = [ Space , Str "chap.\160\&3" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 8
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = [ Str "also" ]
+ , citationSuffix = [ Space , Str "p.\160\&34-35" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 8
+ , citationHash = 0
+ }
+ ]
+ [ Str "[see"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "chap."
+ , Space
+ , Str "3;"
+ , Space
+ , Str "also"
+ , Space
+ , Str "@\1087\1091\1085\1082\1090\&3"
+ , Space
+ , Str "p."
+ , Space
+ , Str "34-35]"
+ ]
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "Another"
+ , Space
+ , Str "one"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Str "see" ]
+ , citationSuffix = [ Space , Str "p.\160\&34-35" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 9
+ , citationHash = 0
+ }
+ ]
+ [ Str "[see"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "p."
+ , Space
+ , Str "34-35]"
+ ]
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "And"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "note."
+ , Note
+ [ Para
+ [ Str "Some"
+ , Space
+ , Str "citations"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Str "see" ]
+ , citationSuffix =
+ [ Space , Str "chap.\160\&3" ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 10
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "\1087\1091\1085\1082\1090\&3"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 10
+ , citationHash = 0
+ }
+ , Citation
+ { citationId = "item2"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 10
+ , citationHash = 0
+ }
+ ]
+ [ Str "[see"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "chap."
+ , Space
+ , Str "3;"
+ , Space
+ , Str "@\1087\1091\1085\1082\1090\&3;"
+ , Space
+ , Str "@item2]"
+ ]
+ , Str "."
+ ]
+ ]
+ ]
+ ]
+ , [ Para
+ [ Str "Citation"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "suffix"
+ , Space
+ , Str "and"
+ , Space
+ , Str "locator"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Space
+ , Str "pp.\160\&33,"
+ , Space
+ , Str "35-37,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else"
+ ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 11
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@item1"
+ , Space
+ , Str "pp."
+ , Space
+ , Str "33,"
+ , Space
+ , Str "35-37,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else]"
+ ]
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "Citation"
+ , Space
+ , Str "with"
+ , Space
+ , Str "suffix"
+ , Space
+ , Str "only"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else"
+ ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 12
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@item1"
+ , Space
+ , Str "and"
+ , Space
+ , Str "nowhere"
+ , Space
+ , Str "else]"
+ ]
+ , Str "."
+ ]
+ ]
+ , [ Para
+ [ Str "Now"
+ , Space
+ , Str "some"
+ , Space
+ , Str "modifiers."
+ , Note
+ [ Para
+ [ Str "Like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "citation"
+ , Space
+ , Str "without"
+ , Space
+ , Str "author:"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = SuppressAuthor
+ , citationNoteNum = 13
+ , citationHash = 0
+ }
+ ]
+ [ Str "[-@item1]" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "now"
+ , Space
+ , Str "Doe"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "locator"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item2"
+ , citationPrefix = []
+ , citationSuffix =
+ [ Space , Str "p.\160\&44" ]
+ , citationMode = SuppressAuthor
+ , citationNoteNum = 13
+ , citationHash = 0
+ }
+ ]
+ [ Str "[-@item2"
+ , Space
+ , Str "p."
+ , Space
+ , Str "44]"
+ ]
+ , Str "."
+ ]
+ ]
+ ]
+ ]
+ , [ Para
+ [ Str "With"
+ , Space
+ , Str "some"
+ , Space
+ , Str "markup"
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "item1"
+ , citationPrefix = [ Emph [ Str "see" ] ]
+ , citationSuffix =
+ [ Space , Str "p.\160" , Strong [ Str "32" ] ]
+ , citationMode = NormalCitation
+ , citationNoteNum = 14
+ , citationHash = 0
+ }
+ ]
+ [ Str "[*see*"
+ , Space
+ , Str "@item1"
+ , Space
+ , Str "p."
+ , Space
+ , Str "**32**]"
+ ]
+ , Str "."
+ ]
+ ]
+ ]
+, Header 1 ( "references" , [] , [] ) [ Str "References" ]
+]
diff --git a/test/markdown-reader-more.native b/test/markdown-reader-more.native
index b4a16f7cf..7c15f627a 100644
--- a/test/markdown-reader-more.native
+++ b/test/markdown-reader-more.native
@@ -1,311 +1,1344 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Author",Space,Str "One"],MetaInlines [Str "Author",Space,Str "Two"],MetaInlines [Str "Author",Space,Str "Three"],MetaInlines [Str "Author",Space,Str "Four"]]),("title",MetaInlines [Str "Title",SoftBreak,Str "spanning",Space,Str "multiple",Space,Str "lines"])]})
-[Header 1 ("additional-markdown-reader-tests",[],[]) [Str "Additional",Space,Str "markdown",Space,Str "reader",Space,Str "tests"]
-,Header 2 ("blank-line-before-url-in-link-reference",[],[]) [Str "Blank",Space,Str "line",Space,Str "before",Space,Str "URL",Space,Str "in",Space,Str "link",Space,Str "reference"]
-,Para [Link ("",[],[]) [Str "foo"] ("/url",""),Space,Str "and",Space,Link ("",[],[]) [Str "bar"] ("/url","title")]
-,Header 2 ("raw-context-environments",[],[]) [Str "Raw",Space,Str "ConTeXt",Space,Str "environments"]
-,RawBlock (Format "tex") "\\placeformula \\startformula"
-,Para [Str "L_{1}",Space,Str "=",Space,Str "L_{2}",SoftBreak,RawInline (Format "tex") "\\stopformula"]
-,RawBlock (Format "tex") "\\start[a2]\n\\start[a2]\n\\stop[a2]\n\\stop[a2]"
-,Header 2 ("raw-latex-environments",[],[]) [Str "Raw",Space,Str "LaTeX",Space,Str "environments"]
-,RawBlock (Format "tex") "\\begin{center}\n\\begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt]\n\\Tree [.{S} [.NP John\\index{i} ] [.VP [.V likes ] [.NP himself\\index{i,*j} ]]]\n\\end{tikzpicture}\n\\end{center}"
-,Header 2 ("urls-with-spaces-and-punctuation",[],[]) [Str "URLs",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "punctuation"]
-,Para [Link ("",[],[]) [Str "foo"] ("/bar%20and%20baz",""),SoftBreak,Link ("",[],[]) [Str "foo"] ("/bar%20and%20baz",""),SoftBreak,Link ("",[],[]) [Str "foo"] ("/bar%20and%20baz",""),SoftBreak,Link ("",[],[]) [Str "foo"] ("bar%20baz","title")]
-,Para [Link ("",[],[]) [Str "baz"] ("/foo%20foo",""),Space,Link ("",[],[]) [Str "bam"] ("/foo%20fee",""),Space,Link ("",[],[]) [Str "bork"] ("/foo/zee%20zob","title")]
-,Para [Link ("",[],[]) [Str "Ward\8217s",Space,Str "method."] ("http://en.wikipedia.org/wiki/Ward's_method","")]
-,Header 2 ("horizontal-rules-with-spaces-at-end",[],[]) [Str "Horizontal",Space,Str "rules",Space,Str "with",Space,Str "spaces",Space,Str "at",Space,Str "end"]
-,HorizontalRule
-,HorizontalRule
-,Header 2 ("raw-html-before-header",[],[]) [Str "Raw",Space,Str "HTML",Space,Str "before",Space,Str "header"]
-,Para [RawInline (Format "html") "<a>",RawInline (Format "html") "</a>"]
-,Header 3 ("my-header",[],[]) [Str "my",Space,Str "header"]
-,Header 2 ("in-math",[],[]) [Str "$",Space,Str "in",Space,Str "math"]
-,Para [Math InlineMath "\\$2 + \\$3"]
-,Para [Math InlineMath "x = \\text{the $n$th root of $y$}"]
-,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "math:"]
-,Para [Str "$PATH",Space,Str "90",Space,Str "$PATH"]
-,Header 2 ("commented-out-list-item",[],[]) [Str "Commented-out",Space,Str "list",Space,Str "item"]
-,BulletList
- [[Plain [Str "one",SoftBreak,RawInline (Format "html") "<!--\n- two\n-->"]]
- ,[Plain [Str "three"]]]
-,Header 2 ("indented-code-at-beginning-of-list",[],[]) [Str "Indented",Space,Str "code",Space,Str "at",Space,Str "beginning",Space,Str "of",Space,Str "list"]
-,BulletList
- [[CodeBlock ("",[],[]) "code\ncode"
- ,OrderedList (1,Decimal,Period)
- [[CodeBlock ("",[],[]) "code\ncode"]
- ,[CodeBlock ("",[],[]) "code\ncode"]]
- ,BulletList
- [[CodeBlock ("",[],[]) "code\ncode"]
- ,[Plain [Str "no",Space,Str "code"]]]]]
-,Header 2 ("backslash-newline",[],[]) [Str "Backslash",Space,Str "newline"]
-,Para [Str "hi",LineBreak,Str "there"]
-,Header 2 ("code-spans",[],[]) [Str "Code",Space,Str "spans"]
-,Para [Code ("",[],[]) "hi\\"]
-,Para [Code ("",[],[]) "hi there"]
-,Para [Code ("",[],[]) "hi````there"]
-,Para [Str "`hi"]
-,Para [Str "there`"]
-,Header 2 ("multilingual-urls",[],[]) [Str "Multilingual",Space,Str "URLs"]
-,Para [Link ("",["uri"],[]) [Str "http://\27979.com?\27979=\27979"] ("http://\27979.com?\27979=\27979","")]
-,Para [Link ("",[],[]) [Str "foo"] ("/bar/\27979?x=\27979","title")]
-,Para [Link ("",["email"],[]) [Str "\27979@foo.\27979.baz"] ("mailto:\27979@foo.\27979.baz","")]
-,Header 2 ("numbered-examples",[],[]) [Str "Numbered",Space,Str "examples"]
-,OrderedList (1,Example,TwoParens)
- [[Plain [Str "First",Space,Str "example."]]
- ,[Plain [Str "Second",Space,Str "example."]]]
-,Para [Str "Explanation",Space,Str "of",Space,Str "examples",Space,Str "(2)",Space,Str "and",Space,Str "(3)."]
-,OrderedList (3,Example,TwoParens)
- [[Plain [Str "Third",Space,Str "example."]]]
-,Header 2 ("macros",[],[]) [Str "Macros"]
-,RawBlock (Format "tex") "\\newcommand{\\tuple}[1]{\\langle #1 \\rangle}"
-,Para [Math InlineMath "\\langle x,y \\rangle"]
-,Header 2 ("case-insensitive-references",[],[]) [Str "Case-insensitive",Space,Str "references"]
-,Para [Link ("",[],[]) [Str "Fum"] ("/fum","")]
-,Para [Link ("",[],[]) [Str "FUM"] ("/fum","")]
-,Para [Link ("",[],[]) [Str "bat"] ("/bat","")]
-,Header 2 ("curly-smart-quotes",[],[]) [Str "Curly",Space,Str "smart",Space,Str "quotes"]
-,Para [Quoted DoubleQuote [Str "Hi"]]
-,Para [Quoted SingleQuote [Str "Hi"]]
-,Header 2 ("consecutive-lists",[],[]) [Str "Consecutive",Space,Str "lists"]
-,BulletList
- [[Plain [Str "one"]]
- ,[Plain [Str "two"]]]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "one"]]
- ,[Plain [Str "two"]]]
-,OrderedList (1,LowerAlpha,Period)
- [[Plain [Str "one"]]
- ,[Plain [Str "two"]]]
-,Header 2 ("implicit-header-references",[],[]) [Str "Implicit",Space,Str "header",Space,Str "references"]
-,Header 3 ("my-header-1",[],[]) [Str "My",Space,Str "header"]
-,Header 3 ("my-other-header",[],[]) [Str "My",Space,Str "other",Space,Str "header"]
-,Para [Str "A",Space,Str "link",Space,Str "to",Space,Link ("",[],[]) [Str "My",Space,Str "header"] ("#my-header-1",""),Str "."]
-,Para [Str "Another",Space,Str "link",Space,Str "to",Space,Link ("",[],[]) [Str "it"] ("#my-header-1",""),Str "."]
-,Para [Str "Should",Space,Str "be",Space,Link ("",[],[]) [Str "case",Space,Str "insensitive"] ("#my-header-1",""),Str "."]
-,Para [Str "Link",Space,Str "to",Space,Link ("",[],[]) [Str "Explicit",Space,Str "header",Space,Str "attributes"] ("#foobar",""),Str "."]
-,Para [Str "But",Space,Str "this",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "link",Space,Str "to",Space,Link ("",[],[]) [Str "My",Space,Str "other",Space,Str "header"] ("/foo",""),Str ",",Space,Str "since",Space,Str "the",Space,Str "reference",Space,Str "is",Space,Str "defined."]
-,Header 2 ("foobar",["baz"],[("key","val")]) [Str "Explicit",Space,Str "header",Space,Str "attributes"]
-,BlockQuote
- [Header 2 ("foobar",["baz"],[("key","val")]) [Str "Header",Space,Str "attributes",Space,Str "inside",Space,Str "block",Space,Str "quote"]]
-,Header 2 ("line-blocks",[],[]) [Str "Line",Space,Str "blocks"]
-,LineBlock
- [[Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be"]
- ,[Str "\160\160\160\160or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,"]
- ,[Str "\160\160\160\160\160\160\160\160when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,"]
- ,[Str "\160\160\160\160\160\160\160\160\160\160\160\160due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"]
- ,[]
- ,[Str "Continuation",Space,Str "line"]
- ,[Str "\160\160and",Space,Str "another"]]
-,Header 2 ("grid-tables",[],[]) [Str "Grid",Space,Str "Tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2638888888888889)
- ,(AlignDefault,ColWidth 0.16666666666666666)
- ,(AlignDefault,ColWidth 0.18055555555555555)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Headless"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2638888888888889)
- ,(AlignDefault,ColWidth 0.16666666666666666)
- ,(AlignDefault,ColWidth 0.18055555555555555)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "With",Space,Str "alignments"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidth 0.2638888888888889)
- ,(AlignLeft,ColWidth 0.16666666666666666)
- ,(AlignCenter,ColWidth 0.18055555555555555)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Headless",Space,Str "with",Space,Str "alignments"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidth 0.2638888888888889)
- ,(AlignLeft,ColWidth 0.16666666666666666)
- ,(AlignCenter,ColWidth 0.18055555555555555)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Spaces",Space,Str "at",Space,Str "ends",Space,Str "of",Space,Str "lines"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2638888888888889)
- ,(AlignDefault,ColWidth 0.16666666666666666)
- ,(AlignDefault,ColWidth 0.18055555555555555)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiple",Space,Str "blocks",Space,Str "in",Space,Str "a",Space,Str "cell"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2638888888888889)
- ,(AlignDefault,ColWidth 0.16666666666666666)
- ,(AlignDefault,ColWidth 0.18055555555555555)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Header 1 ("col-1",[],[]) [Str "col",Space,Str "1"]
- ,Plain [Str "col",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Header 1 ("col-2",[],[]) [Str "col",Space,Str "2"]
- ,Plain [Str "col",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Header 1 ("col-3",[],[]) [Str "col",Space,Str "3"]
- ,Plain [Str "col",Space,Str "3"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "r1",Space,Str "a"]
- ,Para [Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [BulletList
- [[Plain [Str "b"]]
- ,[Plain [Str "b",Space,Str "2"]]
- ,[Plain [Str "b",Space,Str "2"]]]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2",SoftBreak,Str "c",Space,Str "2"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Empty",Space,Str "cells"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 5.555555555555555e-2)
- ,(AlignDefault,ColWidth 5.555555555555555e-2)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("entities-in-links-and-titles",[],[]) [Str "Entities",Space,Str "in",Space,Str "links",Space,Str "and",Space,Str "titles"]
-,Para [Link ("",[],[]) [Str "link"] ("/\252rl","\246\246!")]
-,Para [Link ("",["uri"],[]) [Str "http://g\246\246gle.com"] ("http://g\246\246gle.com","")]
-,Para [Link ("",["email"],[]) [Str "me@ex\228mple.com"] ("mailto:me@ex\228mple.com","")]
-,Para [Link ("",[],[]) [Str "foobar"] ("/\252rl","\246\246!")]
-,Header 2 ("parentheses-in-urls",[],[]) [Str "Parentheses",Space,Str "in",Space,Str "URLs"]
-,Para [Link ("",[],[]) [Str "link"] ("/hi(there)","")]
-,Para [Link ("",[],[]) [Str "link"] ("/hithere)","")]
-,Para [Link ("",[],[]) [Str "linky"] ("hi_(there_(nested))","")]
-,Header 2 ("backslashes-in-link-references",[],[]) [Str "Backslashes",Space,Str "in",Space,Str "link",Space,Str "references"]
-,Para [Link ("",[],[]) [Str "*",RawInline (Format "tex") "\\a"] ("b","")]
-,Header 2 ("reference-link-fallbacks",[],[]) [Str "Reference",Space,Str "link",Space,Str "fallbacks"]
-,Para [Str "[",Emph [Str "not",Space,Str "a",Space,Str "link"],Str "]",Space,Str "[",Emph [Str "nope"],Str "]\8230"]
-,Header 2 ("reference-link-followed-by-a-citation",[],[]) [Str "Reference",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "citation"]
-,Para [Str "MapReduce",Space,Str "is",Space,Str "a",Space,Str "paradigm",Space,Str "popularized",Space,Str "by",Space,Link ("",[],[]) [Str "Google"] ("http://google.com",""),Space,Cite [Citation {citationId = "mapreduce", citationPrefix = [], citationSuffix = [], citationMode = NormalCitation, citationNoteNum = 2, citationHash = 0}] [Str "[@mapreduce]"],Space,Str "as",Space,Str "its",SoftBreak,Str "most",Space,Str "vocal",Space,Str "proponent."]
-,Header 2 ("empty-reference-links",[],[]) [Str "Empty",Space,Str "reference",Space,Str "links"]
-,Para [Str "bar"]
-,Para [Link ("",[],[]) [Str "foo2"] ("","")]
-,Header 2 ("wrapping-shouldnt-introduce-new-list-items",[],[]) [Str "Wrapping",Space,Str "shouldn\8217t",Space,Str "introduce",Space,Str "new",Space,Str "list",Space,Str "items"]
-,BulletList
- [[Plain [Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "blah",Space,Str "2015."]]]
-,Header 2 ("bracketed-spans",[],[]) [Str "Bracketed",Space,Str "spans"]
-,Para [Span ("id",["class"],[("key","val")]) [Emph [Str "foo"],Space,Str "bar",Space,Str "baz",Space,Link ("",[],[]) [Str "link"] ("url","")]]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines [ Str "Author" , Space , Str "One" ]
+ , MetaInlines [ Str "Author" , Space , Str "Two" ]
+ , MetaInlines [ Str "Author" , Space , Str "Three" ]
+ , MetaInlines [ Str "Author" , Space , Str "Four" ]
+ ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Title"
+ , SoftBreak
+ , Str "spanning"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines"
+ ]
+ )
+ ]
+ }
+ [ Header
+ 1
+ ( "additional-markdown-reader-tests" , [] , [] )
+ [ Str "Additional"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "reader"
+ , Space
+ , Str "tests"
+ ]
+ , Header
+ 2
+ ( "blank-line-before-url-in-link-reference" , [] , [] )
+ [ Str "Blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "before"
+ , Space
+ , Str "URL"
+ , Space
+ , Str "in"
+ , Space
+ , Str "link"
+ , Space
+ , Str "reference"
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "foo" ] ( "/url" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url" , "title" )
+ ]
+ , Header
+ 2
+ ( "raw-context-environments" , [] , [] )
+ [ Str "Raw"
+ , Space
+ , Str "ConTeXt"
+ , Space
+ , Str "environments"
+ ]
+ , RawBlock (Format "tex") "\\placeformula \\startformula"
+ , Para
+ [ Str "L_{1}"
+ , Space
+ , Str "="
+ , Space
+ , Str "L_{2}"
+ , SoftBreak
+ , RawInline (Format "tex") "\\stopformula"
+ ]
+ , RawBlock
+ (Format "tex")
+ "\\start[a2]\n\\start[a2]\n\\stop[a2]\n\\stop[a2]"
+ , Header
+ 2
+ ( "raw-latex-environments" , [] , [] )
+ [ Str "Raw"
+ , Space
+ , Str "LaTeX"
+ , Space
+ , Str "environments"
+ ]
+ , RawBlock
+ (Format "tex")
+ "\\begin{center}\n\\begin{tikzpicture}[baseline={([yshift=+-.5ex]current bounding box.center)}, level distance=24pt]\n\\Tree [.{S} [.NP John\\index{i} ] [.VP [.V likes ] [.NP himself\\index{i,*j} ]]]\n\\end{tikzpicture}\n\\end{center}"
+ , Header
+ 2
+ ( "urls-with-spaces-and-punctuation" , [] , [] )
+ [ Str "URLs"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "and"
+ , Space
+ , Str "punctuation"
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] ) [ Str "foo" ] ( "/bar%20and%20baz" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "foo" ] ( "/bar%20and%20baz" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "foo" ] ( "/bar%20and%20baz" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "foo" ] ( "bar%20baz" , "title" )
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "baz" ] ( "/foo%20foo" , "" )
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bam" ] ( "/foo%20fee" , "" )
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "bork" ]
+ ( "/foo/zee%20zob" , "title" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Ward\8217s" , Space , Str "method." ]
+ ( "http://en.wikipedia.org/wiki/Ward's_method" , "" )
+ ]
+ , Header
+ 2
+ ( "horizontal-rules-with-spaces-at-end" , [] , [] )
+ [ Str "Horizontal"
+ , Space
+ , Str "rules"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "at"
+ , Space
+ , Str "end"
+ ]
+ , HorizontalRule
+ , HorizontalRule
+ , Header
+ 2
+ ( "raw-html-before-header" , [] , [] )
+ [ Str "Raw"
+ , Space
+ , Str "HTML"
+ , Space
+ , Str "before"
+ , Space
+ , Str "header"
+ ]
+ , Para
+ [ RawInline (Format "html") "<a>"
+ , RawInline (Format "html") "</a>"
+ ]
+ , Header
+ 3
+ ( "my-header" , [] , [] )
+ [ Str "my" , Space , Str "header" ]
+ , Header
+ 2
+ ( "in-math" , [] , [] )
+ [ Str "$" , Space , Str "in" , Space , Str "math" ]
+ , Para [ Math InlineMath "\\$2 + \\$3" ]
+ , Para
+ [ Math InlineMath "x = \\text{the $n$th root of $y$}" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "math:"
+ ]
+ , Para
+ [ Str "$PATH" , Space , Str "90" , Space , Str "$PATH" ]
+ , Header
+ 2
+ ( "commented-out-list-item" , [] , [] )
+ [ Str "Commented-out"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "one"
+ , SoftBreak
+ , RawInline (Format "html") "<!--\n- two\n-->"
+ ]
+ ]
+ , [ Plain [ Str "three" ] ]
+ ]
+ , Header
+ 2
+ ( "indented-code-at-beginning-of-list" , [] , [] )
+ [ Str "Indented"
+ , Space
+ , Str "code"
+ , Space
+ , Str "at"
+ , Space
+ , Str "beginning"
+ , Space
+ , Str "of"
+ , Space
+ , Str "list"
+ ]
+ , BulletList
+ [ [ CodeBlock ( "" , [] , [] ) "code\ncode"
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ CodeBlock ( "" , [] , [] ) "code\ncode" ]
+ , [ CodeBlock ( "" , [] , [] ) "code\ncode" ]
+ ]
+ , BulletList
+ [ [ CodeBlock ( "" , [] , [] ) "code\ncode" ]
+ , [ Plain [ Str "no" , Space , Str "code" ] ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "backslash-newline" , [] , [] )
+ [ Str "Backslash" , Space , Str "newline" ]
+ , Para [ Str "hi" , LineBreak , Str "there" ]
+ , Header
+ 2
+ ( "code-spans" , [] , [] )
+ [ Str "Code" , Space , Str "spans" ]
+ , Para [ Code ( "" , [] , [] ) "hi\\" ]
+ , Para [ Code ( "" , [] , [] ) "hi there" ]
+ , Para [ Code ( "" , [] , [] ) "hi````there" ]
+ , Para [ Str "`hi" ]
+ , Para [ Str "there`" ]
+ , Header
+ 2
+ ( "multilingual-urls" , [] , [] )
+ [ Str "Multilingual" , Space , Str "URLs" ]
+ , Para
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://\27979.com?\27979=\27979" ]
+ ( "http://\27979.com?\27979=\27979" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "foo" ]
+ ( "/bar/\27979?x=\27979" , "title" )
+ ]
+ , Para
+ [ Link
+ ( "" , [ "email" ] , [] )
+ [ Str "\27979@foo.\27979.baz" ]
+ ( "mailto:\27979@foo.\27979.baz" , "" )
+ ]
+ , Header
+ 2
+ ( "numbered-examples" , [] , [] )
+ [ Str "Numbered" , Space , Str "examples" ]
+ , OrderedList
+ ( 1 , Example , TwoParens )
+ [ [ Plain [ Str "First" , Space , Str "example." ] ]
+ , [ Plain [ Str "Second" , Space , Str "example." ] ]
+ ]
+ , Para
+ [ Str "Explanation"
+ , Space
+ , Str "of"
+ , Space
+ , Str "examples"
+ , Space
+ , Str "(2)"
+ , Space
+ , Str "and"
+ , Space
+ , Str "(3)."
+ ]
+ , OrderedList
+ ( 3 , Example , TwoParens )
+ [ [ Plain [ Str "Third" , Space , Str "example." ] ] ]
+ , Header 2 ( "macros" , [] , [] ) [ Str "Macros" ]
+ , RawBlock
+ (Format "tex")
+ "\\newcommand{\\tuple}[1]{\\langle #1 \\rangle}"
+ , Para [ Math InlineMath "\\langle x,y \\rangle" ]
+ , Header
+ 2
+ ( "case-insensitive-references" , [] , [] )
+ [ Str "Case-insensitive" , Space , Str "references" ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "Fum" ] ( "/fum" , "" ) ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "FUM" ] ( "/fum" , "" ) ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "bat" ] ( "/bat" , "" ) ]
+ , Header
+ 2
+ ( "curly-smart-quotes" , [] , [] )
+ [ Str "Curly" , Space , Str "smart" , Space , Str "quotes" ]
+ , Para [ Quoted DoubleQuote [ Str "Hi" ] ]
+ , Para [ Quoted SingleQuote [ Str "Hi" ] ]
+ , Header
+ 2
+ ( "consecutive-lists" , [] , [] )
+ [ Str "Consecutive" , Space , Str "lists" ]
+ , BulletList
+ [ [ Plain [ Str "one" ] ] , [ Plain [ Str "two" ] ] ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "one" ] ] , [ Plain [ Str "two" ] ] ]
+ , OrderedList
+ ( 1 , LowerAlpha , Period )
+ [ [ Plain [ Str "one" ] ] , [ Plain [ Str "two" ] ] ]
+ , Header
+ 2
+ ( "implicit-header-references" , [] , [] )
+ [ Str "Implicit"
+ , Space
+ , Str "header"
+ , Space
+ , Str "references"
+ ]
+ , Header
+ 3
+ ( "my-header-1" , [] , [] )
+ [ Str "My" , Space , Str "header" ]
+ , Header
+ 3
+ ( "my-other-header" , [] , [] )
+ [ Str "My" , Space , Str "other" , Space , Str "header" ]
+ , Para
+ [ Str "A"
+ , Space
+ , Str "link"
+ , Space
+ , Str "to"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "My" , Space , Str "header" ]
+ ( "#my-header-1" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Another"
+ , Space
+ , Str "link"
+ , Space
+ , Str "to"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "it" ] ( "#my-header-1" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Should"
+ , Space
+ , Str "be"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "case" , Space , Str "insensitive" ]
+ ( "#my-header-1" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Link"
+ , Space
+ , Str "to"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "Explicit"
+ , Space
+ , Str "header"
+ , Space
+ , Str "attributes"
+ ]
+ ( "#foobar" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "But"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "to"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "My" , Space , Str "other" , Space , Str "header" ]
+ ( "/foo" , "" )
+ , Str ","
+ , Space
+ , Str "since"
+ , Space
+ , Str "the"
+ , Space
+ , Str "reference"
+ , Space
+ , Str "is"
+ , Space
+ , Str "defined."
+ ]
+ , Header
+ 2
+ ( "foobar" , [ "baz" ] , [ ( "key" , "val" ) ] )
+ [ Str "Explicit"
+ , Space
+ , Str "header"
+ , Space
+ , Str "attributes"
+ ]
+ , BlockQuote
+ [ Header
+ 2
+ ( "foobar" , [ "baz" ] , [ ( "key" , "val" ) ] )
+ [ Str "Header"
+ , Space
+ , Str "attributes"
+ , Space
+ , Str "inside"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote"
+ ]
+ ]
+ , Header
+ 2
+ ( "line-blocks" , [] , [] )
+ [ Str "Line" , Space , Str "blocks" ]
+ , LineBlock
+ [ [ Str "But"
+ , Space
+ , Str "can"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bee"
+ , Space
+ , Str "be"
+ , Space
+ , Str "said"
+ , Space
+ , Str "to"
+ , Space
+ , Str "be"
+ ]
+ , [ Str "\160\160\160\160or"
+ , Space
+ , Str "not"
+ , Space
+ , Str "to"
+ , Space
+ , Str "be"
+ , Space
+ , Str "an"
+ , Space
+ , Str "entire"
+ , Space
+ , Str "bee,"
+ ]
+ , [ Str "\160\160\160\160\160\160\160\160when"
+ , Space
+ , Str "half"
+ , Space
+ , Str "the"
+ , Space
+ , Str "bee"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bee,"
+ ]
+ , [ Str
+ "\160\160\160\160\160\160\160\160\160\160\160\160due"
+ , Space
+ , Str "to"
+ , Space
+ , Str "some"
+ , Space
+ , Str "ancient"
+ , Space
+ , Str "injury?"
+ ]
+ , []
+ , [ Str "Continuation" , Space , Str "line" ]
+ , [ Str "\160\160and" , Space , Str "another" ]
+ ]
+ , Header
+ 2
+ ( "grid-tables" , [] , [] )
+ [ Str "Grid" , Space , Str "Tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2638888888888889 )
+ , ( AlignDefault , ColWidth 0.16666666666666666 )
+ , ( AlignDefault , ColWidth 0.18055555555555555 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "3" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "b"
+ , SoftBreak
+ , Str "b"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "c"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para [ Str "Headless" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2638888888888889 )
+ , ( AlignDefault , ColWidth 0.16666666666666666 )
+ , ( AlignDefault , ColWidth 0.18055555555555555 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "b"
+ , SoftBreak
+ , Str "b"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "c"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para [ Str "With" , Space , Str "alignments" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidth 0.2638888888888889 )
+ , ( AlignLeft , ColWidth 0.16666666666666666 )
+ , ( AlignCenter , ColWidth 0.18055555555555555 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "3" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "b"
+ , SoftBreak
+ , Str "b"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "c"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Headless"
+ , Space
+ , Str "with"
+ , Space
+ , Str "alignments"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidth 0.2638888888888889 )
+ , ( AlignLeft , ColWidth 0.16666666666666666 )
+ , ( AlignCenter , ColWidth 0.18055555555555555 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "b"
+ , SoftBreak
+ , Str "b"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "c"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Spaces"
+ , Space
+ , Str "at"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "of"
+ , Space
+ , Str "lines"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2638888888888889 )
+ , ( AlignDefault , ColWidth 0.16666666666666666 )
+ , ( AlignDefault , ColWidth 0.18055555555555555 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "b"
+ , SoftBreak
+ , Str "b"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "c"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "cell"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2638888888888889 )
+ , ( AlignDefault , ColWidth 0.16666666666666666 )
+ , ( AlignDefault , ColWidth 0.18055555555555555 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Header
+ 1
+ ( "col-1" , [] , [] )
+ [ Str "col" , Space , Str "1" ]
+ , Plain [ Str "col" , Space , Str "1" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Header
+ 1
+ ( "col-2" , [] , [] )
+ [ Str "col" , Space , Str "2" ]
+ , Plain [ Str "col" , Space , Str "2" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Header
+ 1
+ ( "col-3" , [] , [] )
+ [ Str "col" , Space , Str "3" ]
+ , Plain [ Str "col" , Space , Str "3" ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "r1" , Space , Str "a" ]
+ , Para [ Str "r1" , Space , Str "bis" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ BulletList
+ [ [ Plain [ Str "b" ] ]
+ , [ Plain [ Str "b" , Space , Str "2" ] ]
+ , [ Plain [ Str "b" , Space , Str "2" ] ]
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "c"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para [ Str "Empty" , Space , Str "cells" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 5.555555555555555e-2 )
+ , ( AlignDefault , ColWidth 5.555555555555555e-2 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 2
+ ( "entities-in-links-and-titles" , [] , [] )
+ [ Str "Entities"
+ , Space
+ , Str "in"
+ , Space
+ , Str "links"
+ , Space
+ , Str "and"
+ , Space
+ , Str "titles"
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] ) [ Str "link" ] ( "/\252rl" , "\246\246!" )
+ ]
+ , Para
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://g\246\246gle.com" ]
+ ( "http://g\246\246gle.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [ "email" ] , [] )
+ [ Str "me@ex\228mple.com" ]
+ ( "mailto:me@ex\228mple.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "foobar" ]
+ ( "/\252rl" , "\246\246!" )
+ ]
+ , Header
+ 2
+ ( "parentheses-in-urls" , [] , [] )
+ [ Str "Parentheses"
+ , Space
+ , Str "in"
+ , Space
+ , Str "URLs"
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "link" ] ( "/hi(there)" , "" )
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "link" ] ( "/hithere)" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "linky" ]
+ ( "hi_(there_(nested))" , "" )
+ ]
+ , Header
+ 2
+ ( "backslashes-in-link-references" , [] , [] )
+ [ Str "Backslashes"
+ , Space
+ , Str "in"
+ , Space
+ , Str "link"
+ , Space
+ , Str "references"
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "*" , RawInline (Format "tex") "\\a" ]
+ ( "b" , "" )
+ ]
+ , Header
+ 2
+ ( "reference-link-fallbacks" , [] , [] )
+ [ Str "Reference"
+ , Space
+ , Str "link"
+ , Space
+ , Str "fallbacks"
+ ]
+ , Para
+ [ Str "["
+ , Emph [ Str "not" , Space , Str "a" , Space , Str "link" ]
+ , Str "]"
+ , Space
+ , Str "["
+ , Emph [ Str "nope" ]
+ , Str "]\8230"
+ ]
+ , Header
+ 2
+ ( "reference-link-followed-by-a-citation" , [] , [] )
+ [ Str "Reference"
+ , Space
+ , Str "link"
+ , Space
+ , Str "followed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "a"
+ , Space
+ , Str "citation"
+ ]
+ , Para
+ [ Str "MapReduce"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paradigm"
+ , Space
+ , Str "popularized"
+ , Space
+ , Str "by"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "Google" ]
+ ( "http://google.com" , "" )
+ , Space
+ , Cite
+ [ Citation
+ { citationId = "mapreduce"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = NormalCitation
+ , citationNoteNum = 2
+ , citationHash = 0
+ }
+ ]
+ [ Str "[@mapreduce]" ]
+ , Space
+ , Str "as"
+ , Space
+ , Str "its"
+ , SoftBreak
+ , Str "most"
+ , Space
+ , Str "vocal"
+ , Space
+ , Str "proponent."
+ ]
+ , Header
+ 2
+ ( "empty-reference-links" , [] , [] )
+ [ Str "Empty"
+ , Space
+ , Str "reference"
+ , Space
+ , Str "links"
+ ]
+ , Para [ Str "bar" ]
+ , Para [ Link ( "" , [] , [] ) [ Str "foo2" ] ( "" , "" ) ]
+ , Header
+ 2
+ ( "wrapping-shouldnt-introduce-new-list-items" , [] , [] )
+ [ Str "Wrapping"
+ , Space
+ , Str "shouldn\8217t"
+ , Space
+ , Str "introduce"
+ , Space
+ , Str "new"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "blah"
+ , Space
+ , Str "2015."
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "bracketed-spans" , [] , [] )
+ [ Str "Bracketed" , Space , Str "spans" ]
+ , Para
+ [ Span
+ ( "id" , [ "class" ] , [ ( "key" , "val" ) ] )
+ [ Emph [ Str "foo" ]
+ , Space
+ , Str "bar"
+ , Space
+ , Str "baz"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "link" ] ( "url" , "" )
+ ]
+ ]
+ ]
diff --git a/test/mediawiki-reader.native b/test/mediawiki-reader.native
index d7ac63215..184809ea6 100644
--- a/test/mediawiki-reader.native
+++ b/test/mediawiki-reader.native
@@ -1,418 +1,1431 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("header",[],[]) [Str "header"]
-,Header 2 ("header_level_two",[],[]) [Str "header",Space,Str "level",Space,Str "two"]
-,Header 3 ("header_level_3",[],[]) [Str "header",Space,Str "level",Space,Str "3"]
-,Header 4 ("header_level_four",[],[]) [Str "header",Space,Emph [Str "level"],Space,Str "four"]
-,Header 5 ("header_level_5",[],[]) [Str "header",Space,Str "level",Space,Str "5"]
-,Header 6 ("header_level_6",[],[]) [Str "header",Space,Str "level",Space,Str "6"]
-,Para [Str "=======",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "========"]
-,Para [Code ("",[],[]) "==\160not\160a\160header\160=="]
-,Header 2 ("emph_and_strong",[],[]) [Str "emph",Space,Str "and",Space,Str "strong"]
-,Para [Emph [Str "emph"],Space,Strong [Str "strong"]]
-,Para [Strong [Emph [Str "strong",Space,Str "and",Space,Str "emph"]]]
-,Para [Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]]
-,Para [Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]]
-,Para [Emph [Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]]
-,Header 2 ("horizontal_rule",[],[]) [Str "horizontal",Space,Str "rule"]
-,Para [Str "top"]
-,HorizontalRule
-,Para [Str "bottom"]
-,HorizontalRule
-,Header 2 ("nowiki",[],[]) [Str "nowiki"]
-,Para [Str "''not",Space,Str "emph''"]
-,Header 2 ("strikeout",[],[]) [Str "strikeout"]
-,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "struck",Space,Str "out"]]]
-,Header 2 ("entities",[],[]) [Str "entities"]
-,Para [Str "hi",Space,Str "&",Space,Str "low"]
-,Para [Str "hi",Space,Str "&",Space,Str "low"]
-,Para [Str "G\246del"]
-,Para [Str "\777\2730"]
-,Header 2 ("comments",[],[]) [Str "comments"]
-,Para [Str "inline",Space,Str "comment"]
-,Para [Str "between",Space,Str "blocks"]
-,Header 2 ("linebreaks",[],[]) [Str "linebreaks"]
-,Para [Str "hi",LineBreak,Str "there"]
-,Para [Str "hi",LineBreak,Str "there"]
-,Header 2 ("indents",[],[]) [Str ":",Space,Str "indents"]
-,Para [Str "hi"]
-,DefinitionList
- [([],
- [[Plain [Str "there"]]])]
-,Para [Str "bud"]
-,Para [Str "hi"]
-,DefinitionList
- [([],
- [[DefinitionList
- [([],
- [[Plain [Str "there"]]])]]])]
-,Para [Str "bud"]
-,Header 2 ("p_tags",[],[]) [Str "p",Space,Str "tags"]
-,Para [Str "hi",Space,Str "there"]
-,Para [Str "bud"]
-,Para [Str "another"]
-,Header 2 ("raw_html",[],[]) [Str "raw",Space,Str "html"]
-,Para [Str "hi",Space,RawInline (Format "html") "<span style=\"color:red\">",Emph [Str "there"],RawInline (Format "html") "</span>",Str "."]
-,Para [RawInline (Format "html") "<ins>",Str "inserted",RawInline (Format "html") "</ins>"]
-,RawBlock (Format "html") "<div class=\"special\">"
-,Para [Str "hi",Space,Emph [Str "there"]]
-,RawBlock (Format "html") "</div>"
-,Header 2 ("sup_sub_del",[],[]) [Str "sup,",Space,Str "sub,",Space,Str "del"]
-,Para [Str "H",Subscript [Str "2"],Str "O",Space,Str "base",Superscript [Emph [Str "exponent"]],SoftBreak,Strikeout [Str "hello"]]
-,Header 2 ("inline_code",[],[]) [Str "inline",Space,Str "code"]
-,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",["haskell"],[]) ">>="]
-,Header 2 ("code_blocks",[],[]) [Str "code",Space,Str "blocks"]
-,CodeBlock ("",[],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
-,CodeBlock ("",["haskell"],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
-,CodeBlock ("",["ruby","numberLines"],[("startFrom","100")]) "widgets.each do |w|\n print w.price\nend"
-,Header 2 ("block_quotes",[],[]) [Str "block",Space,Str "quotes"]
-,Para [Str "Regular",Space,Str "paragraph"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."]
- ,Para [Str "With",Space,Str "two",Space,Str "paragraphs."]]
-,Para [Str "Nother",Space,Str "paragraph."]
-,Header 2 ("external_links",[],[]) [Str "external",Space,Str "links"]
-,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")]
-,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")]
-,Para [Link ("",[],[]) [Str "1"] ("http://google.com",""),Space,Link ("",[],[]) [Str "2"] ("http://yahoo.com","")]
-,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")]
-,Header 2 ("internal_links",[],[]) [Str "internal",Space,Str "links"]
-,Para [Link ("",[],[]) [Str "Help"] ("Help","wikilink")]
-,Para [Link ("",[],[]) [Str "the",Space,Str "help",Space,Str "page"] ("Help","wikilink")]
-,Para [Link ("",[],[]) [Str "Helpers"] ("Help","wikilink")]
-,Para [Link ("",[],[]) [Str "Help"] ("Help","wikilink"),Str "ers"]
-,Para [Link ("",[],[]) [Str "Contents"] ("Help:Contents","wikilink")]
-,Para [Link ("",[],[]) [Str "#My",Space,Str "anchor"] ("#My_anchor","wikilink")]
-,Para [Link ("",[],[]) [Str "and",Space,Str "text"] ("Page#with_anchor","wikilink")]
-,Header 2 ("images",[],[]) [Str "images"]
-,Para [Image ("",[],[]) [Str "caption"] ("example.jpg","fig:caption")]
-,Para [Image ("",[],[]) [Str "the",Space,Emph [Str "caption"],Space,Str "with",Space,Link ("",[],[]) [Str "external",Space,Str "link"] ("http://google.com","")] ("example.jpg","fig:the caption with external link")]
-,Para [Image ("",[],[("width","30"),("height","40")]) [Str "caption"] ("example.jpg","fig:caption")]
-,Para [Image ("",[],[("width","30")]) [Str "caption"] ("example.jpg","fig:caption")]
-,Para [Image ("",[],[("width","30")]) [Str "caption"] ("example.jpg","fig:caption")]
-,Para [Image ("",[],[]) [Str "example.jpg"] ("example.jpg","fig:example.jpg")]
-,Para [Image ("",[],[]) [Str "example_es.jpg"] ("example_es.jpg","fig:example_es.jpg")]
-,Header 2 ("lists",[],[]) [Str "lists"]
-,BulletList
- [[Plain [Str "Start",Space,Str "each",Space,Str "line"]]
- ,[Plain [Str "with",Space,Str "an",Space,Str "asterisk",Space,Str "(*)."]
- ,BulletList
- [[Plain [Str "More",Space,Str "asterisks",Space,Str "gives",Space,Str "deeper"]
- ,BulletList
- [[Plain [Str "and",Space,Str "deeper",Space,Str "levels."]]]]]]
- ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]
- ,BulletList
- [[BulletList
- [[Plain [Str "But",Space,Str "jumping",Space,Str "levels",Space,Str "creates",Space,Str "empty",Space,Str "space."]]]]]]]
-,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "ends",Space,Str "the",Space,Str "list."]
-,BulletList
- [[BulletList
- [[Plain [Str "two"]]]]
- ,[Plain [Str "one"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Start",Space,Str "each",Space,Str "line"]]
- ,[Plain [Str "with",Space,Str "a",Space,Str "number",Space,Str "sign",Space,Str "(#)."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "More",Space,Str "number",Space,Str "signs",Space,Str "gives",Space,Str "deeper"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "and",Space,Str "deeper"]]
- ,[Plain [Str "levels."]]]]]]
- ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "But",Space,Str "jumping",Space,Str "levels",Space,Str "creates",Space,Str "empty",Space,Str "space."]]]]]]
- ,[Plain [Str "Blank",Space,Str "lines"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "end",Space,Str "the",Space,Str "list",Space,Str "and",Space,Str "start",Space,Str "another."]]]
-,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "also",SoftBreak,Str "ends",Space,Str "the",Space,Str "list."]
-,DefinitionList
- [([Str "item",Space,Str "1"],
- [[Plain [Str "definition",Space,Str "1"]]])
- ,([Str "item",Space,Str "2"],
- [[Plain [Str "definition",Space,Str "2-1"]]
- ,[Plain [Str "definition",Space,Str "2-2"]]])]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "one"]]
- ,[Plain [Str "two"]
- ,BulletList
- [[Plain [Str "two",Space,Str "point",Space,Str "one"]]
- ,[Plain [Str "two",Space,Str "point",Space,Str "two"]]]]
- ,[Plain [Str "three"]
- ,DefinitionList
- [([Str "three",Space,Str "item",Space,Str "one"],
- [[Plain [Str "three",Space,Str "def",Space,Str "one"]]])]]
- ,[Plain [Str "four"]
- ,DefinitionList
- [([],
- [[Plain [Str "four",Space,Str "def",Space,Str "one"]]
- ,[Plain [Str "this",Space,Str "looks",Space,Str "like",Space,Str "a",Space,Str "continuation"]]
- ,[Plain [Str "and",Space,Str "is",Space,Str "often",Space,Str "used"]]
- ,[Plain [Str "instead",LineBreak,Str "of",Space,Str "<br/>"]]])]]
- ,[Plain [RawInline (Format "mediawiki") "{{{template\n|author=John\n|title=My Book\n}}}"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "five",Space,Str "sub",Space,Str "1"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1"]]]]
- ,[Plain [Str "five",Space,Str "sub",Space,Str "2"]]]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "list",Space,Str "item",Space,Emph [Str "emph"]]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "list",Space,Str "item",Space,Str "B1"]]
- ,[Plain [Str "list",Space,Str "item",Space,Str "B2"]]]
- ,Para [Str "continuing",Space,Str "list",Space,Str "item",Space,Str "A1"]]
- ,[Plain [Str "list",Space,Str "item",Space,Str "A2"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "abc"]]
- ,[Plain [Str "def"]]
- ,[Plain [Str "ghi"]]]
-,OrderedList (9,DefaultStyle,DefaultDelim)
- [[Plain [Str "Amsterdam"]]
- ,[Plain [Str "Rotterdam"]]
- ,[Plain [Str "The",Space,Str "Hague"]]]
-,Header 2 ("math",[],[]) [Str "math"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Math InlineMath "x=\\frac{y^\\pi}{z}",Str "."]
-,Para [Str "With",Space,Str "spaces:",Space,Math InlineMath "x=\\frac{y^\\pi}{z}",Str "."]
-,Header 2 ("preformatted_blocks",[],[]) [Str "preformatted",Space,Str "blocks"]
-,Para [Code ("",[],[]) "Start\160each\160line\160with\160a\160space.",LineBreak,Code ("",[],[]) "Text\160is\160",Strong [Code ("",[],[]) "preformatted"],Code ("",[],[]) "\160and",LineBreak,Emph [Code ("",[],[]) "markups"],Code ("",[],[]) "\160",Strong [Emph [Code ("",[],[]) "can"]],Code ("",[],[]) "\160be\160done."]
-,Para [Code ("",[],[]) "\160hell\160\160\160\160\160\160yeah"]
-,Para [Code ("",[],[]) "Start\160with\160a\160space\160in\160the\160first\160column,",LineBreak,Code ("",[],[]) "(before\160the\160<nowiki>).",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "Then\160your\160block\160format\160will\160be",LineBreak,Code ("",[],[]) "\160\160\160\160maintained.",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "This\160is\160good\160for\160copying\160in\160code\160blocks:",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "def\160function():",LineBreak,Code ("",[],[]) "\160\160\160\160\"\"\"documentation\160string\"\"\"",LineBreak,Code ("",[],[]) "",LineBreak,Code ("",[],[]) "\160\160\160\160if\160True:",LineBreak,Code ("",[],[]) "\160\160\160\160\160\160\160\160print\160True",LineBreak,Code ("",[],[]) "\160\160\160\160else:",LineBreak,Code ("",[],[]) "\160\160\160\160\160\160\160\160print\160False"]
-,Para [Str "Not"]
-,RawBlock (Format "html") "<hr/>"
-,Para [Str "preformatted"]
-,Para [Str "Don't",Space,Str "need"]
-,Para [Code ("",[],[]) "a\160blank\160line"]
-,Para [Str "around",Space,Str "a",Space,Str "preformatted",Space,Str "block."]
-,Header 2 ("templates",[],[]) [Str "templates"]
-,RawBlock (Format "mediawiki") "{{Welcome}}"
-,RawBlock (Format "mediawiki") "{{Foo:Bar}}"
-,RawBlock (Format "mediawiki") "{{Thankyou|all your effort|Me}}"
-,Para [Str "Written",Space,RawInline (Format "mediawiki") "{{{date}}}",Space,Str "by",Space,RawInline (Format "mediawiki") "{{{name}}}",Str "."]
-,Header 2 ("tables",[],[]) [Str "tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Apple"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Pie"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Butter"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Food",Space,Str "complements"]])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Apple"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Pie"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Butter"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Food",Space,Str "complements"]])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Apple"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Bread"]
- ,Para [Str "and",Space,Str "cheese"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Pie"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "apple"]]
- ,[Plain [Str "carrot"]]]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Apple"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "more"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Pie"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "more"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Butter"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Ice",Space,Str "cream"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "and",Space,Str "more"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidth 0.25)
- ,(AlignRight,ColWidth 0.125)
- ,(AlignCenter,ColWidth 0.125)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Center"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "15.00"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "centered"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "more"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "2.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "more"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Apple"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "fruit"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "topping"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "apple"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Butter"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "Orange"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Paragraph",Space,Str "after",Space,Str "the",Space,Str "table."]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "fruit"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "topping"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "apple"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("notes",[],[]) [Str "notes"]
-,Para [Str "My",Space,Str "note!",Note [Plain [Str "This."]]]
-,Para [Str "URL",Space,Str "note.",Note [Plain [Link ("",[],[]) [Str "http://docs.python.org/library/functions.html#range"] ("http://docs.python.org/library/functions.html#range","")]]]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header 1 ( "header" , [] , [] ) [ Str "header" ]
+ , Header
+ 2
+ ( "header_level_two" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "two" ]
+ , Header
+ 3
+ ( "header_level_3" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "3" ]
+ , Header
+ 4
+ ( "header_level_four" , [] , [] )
+ [ Str "header"
+ , Space
+ , Emph [ Str "level" ]
+ , Space
+ , Str "four"
+ ]
+ , Header
+ 5
+ ( "header_level_5" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "5" ]
+ , Header
+ 6
+ ( "header_level_6" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "6" ]
+ , Para
+ [ Str "======="
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ , Space
+ , Str "========"
+ ]
+ , Para
+ [ Code ( "" , [] , [] ) "==\160not\160a\160header\160==" ]
+ , Header
+ 2
+ ( "emph_and_strong" , [] , [] )
+ [ Str "emph" , Space , Str "and" , Space , Str "strong" ]
+ , Para
+ [ Emph [ Str "emph" ] , Space , Strong [ Str "strong" ] ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "strong" , Space , Str "and" , Space , Str "emph" ]
+ ]
+ ]
+ , Para
+ [ Strong
+ [ Emph [ Str "emph" , Space , Str "inside" ]
+ , Space
+ , Str "strong"
+ ]
+ ]
+ , Para
+ [ Strong
+ [ Str "strong"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emph" ]
+ ]
+ ]
+ , Para
+ [ Emph
+ [ Strong [ Str "strong" , Space , Str "inside" ]
+ , Space
+ , Str "emph"
+ ]
+ ]
+ , Header
+ 2
+ ( "horizontal_rule" , [] , [] )
+ [ Str "horizontal" , Space , Str "rule" ]
+ , Para [ Str "top" ]
+ , HorizontalRule
+ , Para [ Str "bottom" ]
+ , HorizontalRule
+ , Header 2 ( "nowiki" , [] , [] ) [ Str "nowiki" ]
+ , Para [ Str "''not" , Space , Str "emph''" ]
+ , Header 2 ( "strikeout" , [] , [] ) [ Str "strikeout" ]
+ , Para
+ [ Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "struck" , Space , Str "out" ]
+ ]
+ ]
+ , Header 2 ( "entities" , [] , [] ) [ Str "entities" ]
+ , Para [ Str "hi" , Space , Str "&" , Space , Str "low" ]
+ , Para [ Str "hi" , Space , Str "&" , Space , Str "low" ]
+ , Para [ Str "G\246del" ]
+ , Para [ Str "\777\2730" ]
+ , Header 2 ( "comments" , [] , [] ) [ Str "comments" ]
+ , Para [ Str "inline" , Space , Str "comment" ]
+ , Para [ Str "between" , Space , Str "blocks" ]
+ , Header 2 ( "linebreaks" , [] , [] ) [ Str "linebreaks" ]
+ , Para [ Str "hi" , LineBreak , Str "there" ]
+ , Para [ Str "hi" , LineBreak , Str "there" ]
+ , Header
+ 2
+ ( "indents" , [] , [] )
+ [ Str ":" , Space , Str "indents" ]
+ , Para [ Str "hi" ]
+ , DefinitionList [ ( [] , [ [ Plain [ Str "there" ] ] ] ) ]
+ , Para [ Str "bud" ]
+ , Para [ Str "hi" ]
+ , DefinitionList
+ [ ( []
+ , [ [ DefinitionList
+ [ ( [] , [ [ Plain [ Str "there" ] ] ] ) ]
+ ]
+ ]
+ )
+ ]
+ , Para [ Str "bud" ]
+ , Header
+ 2 ( "p_tags" , [] , [] ) [ Str "p" , Space , Str "tags" ]
+ , Para [ Str "hi" , Space , Str "there" ]
+ , Para [ Str "bud" ]
+ , Para [ Str "another" ]
+ , Header
+ 2
+ ( "raw_html" , [] , [] )
+ [ Str "raw" , Space , Str "html" ]
+ , Para
+ [ Str "hi"
+ , Space
+ , RawInline (Format "html") "<span style=\"color:red\">"
+ , Emph [ Str "there" ]
+ , RawInline (Format "html") "</span>"
+ , Str "."
+ ]
+ , Para
+ [ RawInline (Format "html") "<ins>"
+ , Str "inserted"
+ , RawInline (Format "html") "</ins>"
+ ]
+ , RawBlock (Format "html") "<div class=\"special\">"
+ , Para [ Str "hi" , Space , Emph [ Str "there" ] ]
+ , RawBlock (Format "html") "</div>"
+ , Header
+ 2
+ ( "sup_sub_del" , [] , [] )
+ [ Str "sup," , Space , Str "sub," , Space , Str "del" ]
+ , Para
+ [ Str "H"
+ , Subscript [ Str "2" ]
+ , Str "O"
+ , Space
+ , Str "base"
+ , Superscript [ Emph [ Str "exponent" ] ]
+ , SoftBreak
+ , Strikeout [ Str "hello" ]
+ ]
+ , Header
+ 2
+ ( "inline_code" , [] , [] )
+ [ Str "inline" , Space , Str "code" ]
+ , Para
+ [ Code ( "" , [] , [] ) "*\8594*"
+ , Space
+ , Code ( "" , [] , [] ) "typed"
+ , Space
+ , Code ( "" , [ "haskell" ] , [] ) ">>="
+ ]
+ , Header
+ 2
+ ( "code_blocks" , [] , [] )
+ [ Str "code" , Space , Str "blocks" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
+ , CodeBlock
+ ( "" , [ "haskell" ] , [] )
+ "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
+ , CodeBlock
+ ( ""
+ , [ "ruby" , "numberLines" ]
+ , [ ( "startFrom" , "100" ) ]
+ )
+ "widgets.each do |w|\n print w.price\nend"
+ , Header
+ 2
+ ( "block_quotes" , [] , [] )
+ [ Str "block" , Space , Str "quotes" ]
+ , Para [ Str "Regular" , Space , Str "paragraph" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "two"
+ , Space
+ , Str "paragraphs."
+ ]
+ ]
+ , Para [ Str "Nother" , Space , Str "paragraph." ]
+ , Header
+ 2
+ ( "external_links" , [] , [] )
+ [ Str "external" , Space , Str "links" ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Emph [ Str "Google" ]
+ , Space
+ , Str "search"
+ , Space
+ , Str "engine"
+ ]
+ ( "http://google.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://pandoc.org" ]
+ ( "http://pandoc.org" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] ) [ Str "1" ] ( "http://google.com" , "" )
+ , Space
+ , Link
+ ( "" , [] , [] ) [ Str "2" ] ( "http://yahoo.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "email" , Space , Str "me" ]
+ ( "mailto:info@example.org" , "" )
+ ]
+ , Header
+ 2
+ ( "internal_links" , [] , [] )
+ [ Str "internal" , Space , Str "links" ]
+ , Para
+ [ Link
+ ( "" , [] , [] ) [ Str "Help" ] ( "Help" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "the" , Space , Str "help" , Space , Str "page" ]
+ ( "Help" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] ) [ Str "Helpers" ] ( "Help" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] ) [ Str "Help" ] ( "Help" , "wikilink" )
+ , Str "ers"
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Contents" ]
+ ( "Help:Contents" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "#My" , Space , Str "anchor" ]
+ ( "#My_anchor" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "and" , Space , Str "text" ]
+ ( "Page#with_anchor" , "wikilink" )
+ ]
+ , Header 2 ( "images" , [] , [] ) [ Str "images" ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "caption" ]
+ ( "example.jpg" , "fig:caption" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "the"
+ , Space
+ , Emph [ Str "caption" ]
+ , Space
+ , Str "with"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "external" , Space , Str "link" ]
+ ( "http://google.com" , "" )
+ ]
+ ( "example.jpg" , "fig:the caption with external link" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [ ( "width" , "30" ) , ( "height" , "40" ) ] )
+ [ Str "caption" ]
+ ( "example.jpg" , "fig:caption" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [ ( "width" , "30" ) ] )
+ [ Str "caption" ]
+ ( "example.jpg" , "fig:caption" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [ ( "width" , "30" ) ] )
+ [ Str "caption" ]
+ ( "example.jpg" , "fig:caption" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "example.jpg" ]
+ ( "example.jpg" , "fig:example.jpg" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "example_es.jpg" ]
+ ( "example_es.jpg" , "fig:example_es.jpg" )
+ ]
+ , Header 2 ( "lists" , [] , [] ) [ Str "lists" ]
+ , BulletList
+ [ [ Plain
+ [ Str "Start" , Space , Str "each" , Space , Str "line" ]
+ ]
+ , [ Plain
+ [ Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "asterisk"
+ , Space
+ , Str "(*)."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "More"
+ , Space
+ , Str "asterisks"
+ , Space
+ , Str "gives"
+ , Space
+ , Str "deeper"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "and"
+ , Space
+ , Str "deeper"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Line"
+ , Space
+ , Str "breaks"
+ , LineBreak
+ , Str "don't"
+ , Space
+ , Str "break"
+ , Space
+ , Str "levels."
+ ]
+ , BulletList
+ [ [ BulletList
+ [ [ Plain
+ [ Str "But"
+ , Space
+ , Str "jumping"
+ , Space
+ , Str "levels"
+ , Space
+ , Str "creates"
+ , Space
+ , Str "empty"
+ , Space
+ , Str "space."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Any"
+ , Space
+ , Str "other"
+ , Space
+ , Str "start"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list."
+ ]
+ , BulletList
+ [ [ BulletList [ [ Plain [ Str "two" ] ] ] ]
+ , [ Plain [ Str "one" ] ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Start" , Space , Str "each" , Space , Str "line" ]
+ ]
+ , [ Plain
+ [ Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "number"
+ , Space
+ , Str "sign"
+ , Space
+ , Str "(#)."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "More"
+ , Space
+ , Str "number"
+ , Space
+ , Str "signs"
+ , Space
+ , Str "gives"
+ , Space
+ , Str "deeper"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "and" , Space , Str "deeper" ] ]
+ , [ Plain [ Str "levels." ] ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Line"
+ , Space
+ , Str "breaks"
+ , LineBreak
+ , Str "don't"
+ , Space
+ , Str "break"
+ , Space
+ , Str "levels."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "But"
+ , Space
+ , Str "jumping"
+ , Space
+ , Str "levels"
+ , Space
+ , Str "creates"
+ , Space
+ , Str "empty"
+ , Space
+ , Str "space."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Blank" , Space , Str "lines" ] ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "end"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list"
+ , Space
+ , Str "and"
+ , Space
+ , Str "start"
+ , Space
+ , Str "another."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Any"
+ , Space
+ , Str "other"
+ , Space
+ , Str "start"
+ , Space
+ , Str "also"
+ , SoftBreak
+ , Str "ends"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list."
+ ]
+ , DefinitionList
+ [ ( [ Str "item" , Space , Str "1" ]
+ , [ [ Plain [ Str "definition" , Space , Str "1" ] ] ]
+ )
+ , ( [ Str "item" , Space , Str "2" ]
+ , [ [ Plain [ Str "definition" , Space , Str "2-1" ] ]
+ , [ Plain [ Str "definition" , Space , Str "2-2" ] ]
+ ]
+ )
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "one" ] ]
+ , [ Plain [ Str "two" ]
+ , BulletList
+ [ [ Plain
+ [ Str "two"
+ , Space
+ , Str "point"
+ , Space
+ , Str "one"
+ ]
+ ]
+ , [ Plain
+ [ Str "two"
+ , Space
+ , Str "point"
+ , Space
+ , Str "two"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "three" ]
+ , DefinitionList
+ [ ( [ Str "three" , Space , Str "item" , Space , Str "one" ]
+ , [ [ Plain
+ [ Str "three"
+ , Space
+ , Str "def"
+ , Space
+ , Str "one"
+ ]
+ ]
+ ]
+ )
+ ]
+ ]
+ , [ Plain [ Str "four" ]
+ , DefinitionList
+ [ ( []
+ , [ [ Plain
+ [ Str "four"
+ , Space
+ , Str "def"
+ , Space
+ , Str "one"
+ ]
+ ]
+ , [ Plain
+ [ Str "this"
+ , Space
+ , Str "looks"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , Space
+ , Str "continuation"
+ ]
+ ]
+ , [ Plain
+ [ Str "and"
+ , Space
+ , Str "is"
+ , Space
+ , Str "often"
+ , Space
+ , Str "used"
+ ]
+ ]
+ , [ Plain
+ [ Str "instead"
+ , LineBreak
+ , Str "of"
+ , Space
+ , Str "<br/>"
+ ]
+ ]
+ ]
+ )
+ ]
+ ]
+ , [ Plain
+ [ RawInline
+ (Format "mediawiki")
+ "{{{template\n|author=John\n|title=My Book\n}}}"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "five" , Space , Str "sub" , Space , Str "1" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "five"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "1"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "1"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "five" , Space , Str "sub" , Space , Str "2" ]
+ ]
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Emph [ Str "emph" ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "list" , Space , Str "item" , Space , Str "B1" ]
+ ]
+ , [ Plain
+ [ Str "list" , Space , Str "item" , Space , Str "B2" ]
+ ]
+ ]
+ , Para
+ [ Str "continuing"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "A1"
+ ]
+ ]
+ , [ Plain
+ [ Str "list" , Space , Str "item" , Space , Str "A2" ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "abc" ] ]
+ , [ Plain [ Str "def" ] ]
+ , [ Plain [ Str "ghi" ] ]
+ ]
+ , OrderedList
+ ( 9 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Amsterdam" ] ]
+ , [ Plain [ Str "Rotterdam" ] ]
+ , [ Plain [ Str "The" , Space , Str "Hague" ] ]
+ ]
+ , Header 2 ( "math" , [] , [] ) [ Str "math" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Math InlineMath "x=\\frac{y^\\pi}{z}"
+ , Str "."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "spaces:"
+ , Space
+ , Math InlineMath "x=\\frac{y^\\pi}{z}"
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "preformatted_blocks" , [] , [] )
+ [ Str "preformatted" , Space , Str "blocks" ]
+ , Para
+ [ Code
+ ( "" , [] , [] )
+ "Start\160each\160line\160with\160a\160space."
+ , LineBreak
+ , Code ( "" , [] , [] ) "Text\160is\160"
+ , Strong [ Code ( "" , [] , [] ) "preformatted" ]
+ , Code ( "" , [] , [] ) "\160and"
+ , LineBreak
+ , Emph [ Code ( "" , [] , [] ) "markups" ]
+ , Code ( "" , [] , [] ) "\160"
+ , Strong [ Emph [ Code ( "" , [] , [] ) "can" ] ]
+ , Code ( "" , [] , [] ) "\160be\160done."
+ ]
+ , Para
+ [ Code
+ ( "" , [] , [] ) "\160hell\160\160\160\160\160\160yeah"
+ ]
+ , Para
+ [ Code
+ ( "" , [] , [] )
+ "Start\160with\160a\160space\160in\160the\160first\160column,"
+ , LineBreak
+ , Code ( "" , [] , [] ) "(before\160the\160<nowiki>)."
+ , LineBreak
+ , Code ( "" , [] , [] ) ""
+ , LineBreak
+ , Code
+ ( "" , [] , [] )
+ "Then\160your\160block\160format\160will\160be"
+ , LineBreak
+ , Code ( "" , [] , [] ) "\160\160\160\160maintained."
+ , LineBreak
+ , Code ( "" , [] , [] ) ""
+ , LineBreak
+ , Code
+ ( "" , [] , [] )
+ "This\160is\160good\160for\160copying\160in\160code\160blocks:"
+ , LineBreak
+ , Code ( "" , [] , [] ) ""
+ , LineBreak
+ , Code ( "" , [] , [] ) "def\160function():"
+ , LineBreak
+ , Code
+ ( "" , [] , [] )
+ "\160\160\160\160\"\"\"documentation\160string\"\"\""
+ , LineBreak
+ , Code ( "" , [] , [] ) ""
+ , LineBreak
+ , Code ( "" , [] , [] ) "\160\160\160\160if\160True:"
+ , LineBreak
+ , Code
+ ( "" , [] , [] )
+ "\160\160\160\160\160\160\160\160print\160True"
+ , LineBreak
+ , Code ( "" , [] , [] ) "\160\160\160\160else:"
+ , LineBreak
+ , Code
+ ( "" , [] , [] )
+ "\160\160\160\160\160\160\160\160print\160False"
+ ]
+ , Para [ Str "Not" ]
+ , RawBlock (Format "html") "<hr/>"
+ , Para [ Str "preformatted" ]
+ , Para [ Str "Don't" , Space , Str "need" ]
+ , Para [ Code ( "" , [] , [] ) "a\160blank\160line" ]
+ , Para
+ [ Str "around"
+ , Space
+ , Str "a"
+ , Space
+ , Str "preformatted"
+ , Space
+ , Str "block."
+ ]
+ , Header 2 ( "templates" , [] , [] ) [ Str "templates" ]
+ , RawBlock (Format "mediawiki") "{{Welcome}}"
+ , RawBlock (Format "mediawiki") "{{Foo:Bar}}"
+ , RawBlock
+ (Format "mediawiki") "{{Thankyou|all your effort|Me}}"
+ , Para
+ [ Str "Written"
+ , Space
+ , RawInline (Format "mediawiki") "{{{date}}}"
+ , Space
+ , Str "by"
+ , Space
+ , RawInline (Format "mediawiki") "{{{name}}}"
+ , Str "."
+ ]
+ , Header 2 ( "tables" , [] , [] ) [ Str "tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Apple" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Pie" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Butter" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain [ Str "Food" , Space , Str "complements" ] ])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Apple" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Pie" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Butter" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain [ Str "Food" , Space , Str "complements" ] ])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Apple" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Bread" ]
+ , Para [ Str "and" , Space , Str "cheese" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Pie" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "apple" ] ]
+ , [ Plain [ Str "carrot" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Apple" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "more" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Pie" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "more" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Butter" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Ice" , Space , Str "cream" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "and" , Space , Str "more" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidth 0.25 )
+ , ( AlignRight , ColWidth 0.125 )
+ , ( AlignCenter , ColWidth 0.125 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Center" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "15.00" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "centered" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "more" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "2.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "more" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Apple" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "fruit" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "topping" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "apple" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para
+ [ Str "ice"
+ , Space
+ , Str "cream"
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Butter" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault ) ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Orange" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Paragraph"
+ , Space
+ , Str "after"
+ , Space
+ , Str "the"
+ , Space
+ , Str "table."
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "fruit" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "topping" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "apple" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header 2 ( "notes" , [] , [] ) [ Str "notes" ]
+ , Para
+ [ Str "My"
+ , Space
+ , Str "note!"
+ , Note [ Plain [ Str "This." ] ]
+ ]
+ , Para
+ [ Str "URL"
+ , Space
+ , Str "note."
+ , Note
+ [ Plain
+ [ Link
+ ( "" , [] , [] )
+ [ Str
+ "http://docs.python.org/library/functions.html#range"
+ ]
+ ( "http://docs.python.org/library/functions.html#range"
+ , ""
+ )
+ ]
+ ]
+ ]
+ ]
diff --git a/test/opml-reader.native b/test/opml-reader.native
index 0819116ab..29623d1fc 100644
--- a/test/opml-reader.native
+++ b/test/opml-reader.native
@@ -1,66 +1,123 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Dave",Space,Str "Winer"]]),("date",MetaInlines [Str "Thu,",Space,Str "14",Space,Str "Jul",Space,Str "2005",Space,Str "23:41:05",Space,Str "GMT"]),("title",MetaInlines [Str "States"])]})
-[Header 1 ("",[],[]) [Str "United",Space,Str "States"]
-,Header 2 ("",[],[]) [Str "Far",Space,Str "West"]
-,Header 3 ("",[],[]) [Str "Alaska"]
-,Header 3 ("",[],[]) [Str "California"]
-,Header 3 ("",[],[]) [Str "Hawaii"]
-,Header 3 ("",[],[]) [Strong [Str "Nevada"]]
-,Para [Str "I",Space,Str "lived",Space,Str "here",Space,Emph [Str "once"],Str "."]
-,Para [Str "Loved",Space,Str "it."]
-,Header 4 ("",[],[]) [Link ("",[],[]) [Str "Reno"] ("http://www.reno.gov","")]
-,Header 4 ("",[],[]) [Str "Las",Space,Str "Vegas"]
-,Header 4 ("",[],[]) [Str "Ely"]
-,Header 4 ("",[],[]) [Str "Gerlach"]
-,Header 3 ("",[],[]) [Str "Oregon"]
-,Header 3 ("",[],[]) [Str "Washington"]
-,Header 2 ("",[],[]) [Str "Great",Space,Str "Plains"]
-,Header 3 ("",[],[]) [Str "Kansas"]
-,Header 3 ("",[],[]) [Str "Nebraska"]
-,Header 3 ("",[],[]) [Str "North",Space,Str "Dakota"]
-,Header 3 ("",[],[]) [Str "Oklahoma"]
-,Header 3 ("",[],[]) [Str "South",Space,Str "Dakota"]
-,Header 2 ("",[],[]) [Str "Mid-Atlantic"]
-,Header 3 ("",[],[]) [Str "Delaware"]
-,Header 3 ("",[],[]) [Str "Maryland"]
-,Header 3 ("",[],[]) [Str "New",Space,Str "Jersey"]
-,Header 3 ("",[],[]) [Str "New",Space,Str "York"]
-,Header 3 ("",[],[]) [Str "Pennsylvania"]
-,Header 2 ("",[],[]) [Str "Midwest"]
-,Header 3 ("",[],[]) [Str "Illinois"]
-,Header 3 ("",[],[]) [Str "Indiana"]
-,Header 3 ("",[],[]) [Str "Iowa"]
-,Header 3 ("",[],[]) [Str "Kentucky"]
-,Header 3 ("",[],[]) [Str "Michigan"]
-,Header 3 ("",[],[]) [Str "Minnesota"]
-,Header 3 ("",[],[]) [Str "Missouri"]
-,Header 3 ("",[],[]) [Str "Ohio"]
-,Header 3 ("",[],[]) [Str "West",Space,Str "Virginia"]
-,Header 3 ("",[],[]) [Str "Wisconsin"]
-,Header 2 ("",[],[]) [Str "Mountains"]
-,Header 3 ("",[],[]) [Str "Colorado"]
-,Header 3 ("",[],[]) [Str "Idaho"]
-,Header 3 ("",[],[]) [Str "Montana"]
-,Header 3 ("",[],[]) [Str "Utah"]
-,Header 3 ("",[],[]) [Str "Wyoming"]
-,Header 2 ("",[],[]) [Str "New",Space,Str "England"]
-,Header 3 ("",[],[]) [Str "Connecticut"]
-,Header 3 ("",[],[]) [Str "Maine"]
-,Header 3 ("",[],[]) [Str "Massachusetts"]
-,Header 3 ("",[],[]) [Str "New",Space,Str "Hampshire"]
-,Header 3 ("",[],[]) [Str "Rhode",Space,Str "Island"]
-,Header 3 ("",[],[]) [Str "Vermont"]
-,Header 2 ("",[],[]) [Str "South"]
-,Header 3 ("",[],[]) [Str "Alabama"]
-,Header 3 ("",[],[]) [Str "Arkansas"]
-,Header 3 ("",[],[]) [Str "Florida"]
-,Header 3 ("",[],[]) [Str "Georgia"]
-,Header 3 ("",[],[]) [Str "Louisiana"]
-,Header 3 ("",[],[]) [Str "Mississippi"]
-,Header 3 ("",[],[]) [Str "North",Space,Str "Carolina"]
-,Header 3 ("",[],[]) [Str "South",Space,Str "Carolina"]
-,Header 3 ("",[],[]) [Str "Tennessee"]
-,Header 3 ("",[],[]) [Str "Virginia"]
-,Header 2 ("",[],[]) [Str "Southwest"]
-,Header 3 ("",[],[]) [Str "Arizona"]
-,Header 3 ("",[],[]) [Str "New",Space,Str "Mexico"]
-,Header 3 ("",[],[]) [Str "Texas"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines [ Str "Dave" , Space , Str "Winer" ] ]
+ )
+ , ( "date"
+ , MetaInlines
+ [ Str "Thu,"
+ , Space
+ , Str "14"
+ , Space
+ , Str "Jul"
+ , Space
+ , Str "2005"
+ , Space
+ , Str "23:41:05"
+ , Space
+ , Str "GMT"
+ ]
+ )
+ , ( "title" , MetaInlines [ Str "States" ] )
+ ]
+ }
+ [ Header
+ 1 ( "" , [] , [] ) [ Str "United" , Space , Str "States" ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "Far" , Space , Str "West" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Alaska" ]
+ , Header 3 ( "" , [] , [] ) [ Str "California" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Hawaii" ]
+ , Header 3 ( "" , [] , [] ) [ Strong [ Str "Nevada" ] ]
+ , Para
+ [ Str "I"
+ , Space
+ , Str "lived"
+ , Space
+ , Str "here"
+ , Space
+ , Emph [ Str "once" ]
+ , Str "."
+ ]
+ , Para [ Str "Loved" , Space , Str "it." ]
+ , Header
+ 4
+ ( "" , [] , [] )
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Reno" ]
+ ( "http://www.reno.gov" , "" )
+ ]
+ , Header
+ 4 ( "" , [] , [] ) [ Str "Las" , Space , Str "Vegas" ]
+ , Header 4 ( "" , [] , [] ) [ Str "Ely" ]
+ , Header 4 ( "" , [] , [] ) [ Str "Gerlach" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Oregon" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Washington" ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "Great" , Space , Str "Plains" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Kansas" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Nebraska" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "North" , Space , Str "Dakota" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Oklahoma" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "South" , Space , Str "Dakota" ]
+ , Header 2 ( "" , [] , [] ) [ Str "Mid-Atlantic" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Delaware" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Maryland" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "New" , Space , Str "Jersey" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "New" , Space , Str "York" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Pennsylvania" ]
+ , Header 2 ( "" , [] , [] ) [ Str "Midwest" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Illinois" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Indiana" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Iowa" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Kentucky" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Michigan" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Minnesota" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Missouri" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Ohio" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "West" , Space , Str "Virginia" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Wisconsin" ]
+ , Header 2 ( "" , [] , [] ) [ Str "Mountains" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Colorado" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Idaho" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Montana" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Utah" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Wyoming" ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "New" , Space , Str "England" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Connecticut" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Maine" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Massachusetts" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "New" , Space , Str "Hampshire" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "Rhode" , Space , Str "Island" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Vermont" ]
+ , Header 2 ( "" , [] , [] ) [ Str "South" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Alabama" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Arkansas" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Florida" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Georgia" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Louisiana" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Mississippi" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "North" , Space , Str "Carolina" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "South" , Space , Str "Carolina" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Tennessee" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Virginia" ]
+ , Header 2 ( "" , [] , [] ) [ Str "Southwest" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Arizona" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "New" , Space , Str "Mexico" ]
+ , Header 3 ( "" , [] , [] ) [ Str "Texas" ]
+ ]
diff --git a/test/org-select-tags.native b/test/org-select-tags.native
index 5fbfd92d1..9f2d84a9f 100644
--- a/test/org-select-tags.native
+++ b/test/org-select-tags.native
@@ -1,7 +1,103 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("will-appear-because-it-is-the-ancestor-of-something-tagged-yes",[],[]) [Str "Will",Space,Str "appear",Space,Str "because",Space,Str "it",Space,Str "is",Space,Str "the",Space,Str "ancestor",Space,Str "of",Space,Str "something",Space,Str "tagged",Space,Str "\"yes\""]
-,Header 2 ("will-appear",[],[]) [Str "Will",Space,Str "appear",Space,Span ("",["tag"],[("tag-name","yes")]) [SmallCaps [Str "yes"]]]
-,Header 3 ("will-appear-since-the-entire-subtree-of-something-selected-will-appear",[],[]) [Str "Will",Space,Str "appear",Space,Str "since",Space,Str "the",Space,Str "entire",Space,Str "subtree",Space,Str "of",Space,Str "something",Space,Str "selected",Space,Str "will",Space,Str "appear"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Para [Str "Will",Space,Str "appear"]]]
-,Header 2 ("will-appear-because-it-is-the-ancestor-of-something-listed-in-select-tags",[],[]) [Str "Will",Space,Str "appear",Space,Str "because",Space,Str "it",Space,Str "is",Space,Str "the",Space,Str "ancestor",Space,Str "of",Space,Str "something",Space,Str "listed",Space,Str "in",Space,Str "SELECT-TAGS"]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header
+ 1
+ ( "will-appear-because-it-is-the-ancestor-of-something-tagged-yes"
+ , []
+ , []
+ )
+ [ Str "Will"
+ , Space
+ , Str "appear"
+ , Space
+ , Str "because"
+ , Space
+ , Str "it"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "ancestor"
+ , Space
+ , Str "of"
+ , Space
+ , Str "something"
+ , Space
+ , Str "tagged"
+ , Space
+ , Str "\"yes\""
+ ]
+ , Header
+ 2
+ ( "will-appear" , [] , [] )
+ [ Str "Will"
+ , Space
+ , Str "appear"
+ , Space
+ , Span
+ ( "" , [ "tag" ] , [ ( "tag-name" , "yes" ) ] )
+ [ SmallCaps [ Str "yes" ] ]
+ ]
+ , Header
+ 3
+ ( "will-appear-since-the-entire-subtree-of-something-selected-will-appear"
+ , []
+ , []
+ )
+ [ Str "Will"
+ , Space
+ , Str "appear"
+ , Space
+ , Str "since"
+ , Space
+ , Str "the"
+ , Space
+ , Str "entire"
+ , Space
+ , Str "subtree"
+ , Space
+ , Str "of"
+ , Space
+ , Str "something"
+ , Space
+ , Str "selected"
+ , Space
+ , Str "will"
+ , Space
+ , Str "appear"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Para [ Str "Will" , Space , Str "appear" ] ] ]
+ , Header
+ 2
+ ( "will-appear-because-it-is-the-ancestor-of-something-listed-in-select-tags"
+ , []
+ , []
+ )
+ [ Str "Will"
+ , Space
+ , Str "appear"
+ , Space
+ , Str "because"
+ , Space
+ , Str "it"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "ancestor"
+ , Space
+ , Str "of"
+ , Space
+ , Str "something"
+ , Space
+ , Str "listed"
+ , Space
+ , Str "in"
+ , Space
+ , Str "SELECT-TAGS"
+ ]
+ ]
diff --git a/test/pipe-tables.native b/test/pipe-tables.native
index 249eec17e..886a7e343 100644
--- a/test/pipe-tables.native
+++ b/test/pipe-tables.native
@@ -1,326 +1,927 @@
-[Para [Str "Simplest",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Headerless",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Table",Space,Str "without",Space,Str "sides:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Fruit"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Quantity"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "apple"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "17"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "pear"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "302"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "One-column:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "hi"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "lo"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Header-less",Space,Str "one-column:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "hi"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Indented",Space,Str "left",Space,Str "column:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Number",Space,Str "of",Space,Str "siblings"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Salary"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "33"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "44"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Long",Space,Str "pipe",Space,Str "table",Space,Str "with",Space,Str "relative",Space,Str "widths:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.15517241379310345)
- ,(AlignDefault,ColWidth 0.1724137931034483)
- ,(AlignDefault,ColWidth 0.6724137931034483)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "table",Space,Str "cell"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "and",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "really",Space,Str "long",Space,Str "table",Space,Str "cell",Space,Str "that",Space,Str "will",Space,Str "probably",Space,Str "need",Space,Str "wrapping"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Pipe",Space,Str "table",Space,Str "with",Space,Str "no",Space,Str "body:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Header"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Pipe",Space,Str "table",Space,Str "with",Space,Str "tricky",Space,Str "cell",Space,Str "contents",Space,Str "(see",Space,Str "#2765):"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "IP_gene8-_1st"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "IP_gene8+_1st"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "IP_gene8-_1st"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1.0000000"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "0.4357325"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "IP_gene8+_1st"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "0.4357325"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1.0000000"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "foo",Code ("",[],[]) "bar|baz"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "and|escaped"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3.0000000"]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Para
+ [ Str "Simplest"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default3" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Headerless"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Table" , Space , Str "without" , Space , Str "sides:" ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Fruit" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Quantity" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "apple" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "17" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "pear" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "302" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para [ Str "One-column:" ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault ) ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "hi" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "lo" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para [ Str "Header-less" , Space , Str "one-column:" ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault ) ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "hi" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Indented" , Space , Str "left" , Space , Str "column:" ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Number" , Space , Str "of" , Space , Str "siblings" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Salary" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "33" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "44" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Long"
+ , Space
+ , Str "pipe"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "relative"
+ , Space
+ , Str "widths:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.15517241379310345 )
+ , ( AlignDefault , ColWidth 0.1724137931034483 )
+ , ( AlignDefault , ColWidth 0.6724137931034483 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default3" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "table"
+ , Space
+ , Str "cell"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "and"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "really"
+ , Space
+ , Str "long"
+ , Space
+ , Str "table"
+ , Space
+ , Str "cell"
+ , Space
+ , Str "that"
+ , Space
+ , Str "will"
+ , Space
+ , Str "probably"
+ , Space
+ , Str "need"
+ , Space
+ , Str "wrapping"
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Pipe"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "body:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault ) ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Header" ] ]
+ ]
+ ])
+ [ TableBody ( "" , [] , [] ) (RowHeadColumns 0) [] [] ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Pipe"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tricky"
+ , Space
+ , Str "cell"
+ , Space
+ , Str "contents"
+ , Space
+ , Str "(see"
+ , Space
+ , Str "#2765):"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "IP_gene8-_1st" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "IP_gene8+_1st" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "IP_gene8-_1st" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1.0000000" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "0.4357325" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "IP_gene8+_1st" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "0.4357325" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1.0000000" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "foo" , Code ( "" , [] , [] ) "bar|baz" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "and|escaped" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3.0000000" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
diff --git a/test/pptx/background-image/input.native b/test/pptx/background-image/input.native
new file mode 100644
index 000000000..22b089a95
--- /dev/null
+++ b/test/pptx/background-image/input.native
@@ -0,0 +1,17 @@
+[Header 1 ("section-header-with-background-image",[],[("background-image","movie.jpg")]) [Str "Section",Space,Str "Header",Space,Str "(with",Space,Str "background",Space,Str "image)"]
+,Header 2 ("slide-1",[],[("background-image","lalune.jpg")]) [Str "Slide",Space,Str "1"]
+,Para [Str "This",Space,Str "slide",Space,Str "has",Space,Str "a",Space,Str "moon",Space,Str "background."]
+,Header 2 ("slide-2",[],[("background-image","movie.jpg")]) [Str "Slide",Space,Str "2"]
+,Para [Str "This",Space,Str "slide",Space,Str "has",Space,Str "a",Space,Str "movie",Space,Str "background."]
+,Header 2 ("slide-3",[],[("background-image","movie.jpg")]) [Str "Slide",Space,Str "3"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "Background",Space,Str "images",Space,Str "work",Space,Str "in",Space,Str "two-column",Space,Str "layout."]]
+ ,Div ("",["column"],[])
+ [Para [Str "hello"]]]
+,Header 2 ("slide-4",[],[("background-image","movie.jpg")]) [Str "Slide",Space,Str "4"]
+,Para [Str "You",Space,Str "can",Space,Str "have",Space,Str "images",Space,Str "on",Space,Str "slides",Space,Str "that",Space,Str "have",Space,Str "background",Space,Str "images:"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("lalune.jpg","fig:")]
+,Header 2 ("section",[],[("background-image","lalune.jpg")]) []
+,Div ("",["notes"],[])
+ [Para [Str "Blank",Space,Str "slides",Space,Str "can",Space,Str "have",Space,Str "background",Space,Str "images."]]]
diff --git a/test/pptx/background-image/output.pptx b/test/pptx/background-image/output.pptx
new file mode 100644
index 000000000..1e678e0a4
--- /dev/null
+++ b/test/pptx/background-image/output.pptx
Binary files differ
diff --git a/test/pptx/background-image/templated.pptx b/test/pptx/background-image/templated.pptx
new file mode 100644
index 000000000..0f2879022
--- /dev/null
+++ b/test/pptx/background-image/templated.pptx
Binary files differ
diff --git a/test/pptx/blanks/just-speaker-notes/input.native b/test/pptx/blanks/just-speaker-notes/input.native
new file mode 100644
index 000000000..d2e2cfbe2
--- /dev/null
+++ b/test/pptx/blanks/just-speaker-notes/input.native
@@ -0,0 +1,7 @@
+[Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"]
+,Para [Str "Nothing",Space,Str "to",Space,Str "see",Space,Str "here"]
+,Header 1 ("section",[],[]) []
+,Div ("",["notes"],[])
+ [Para [Str "Some",Space,Str "notes",Space,Str "here:",Space,Str "this",Space,Str "first",Space,Str "slide",Space,Str "should",Space,Str "use",Space,Str "the",Space,Str "Blank",Space,Str "template"]]
+,Header 1 ("third-slide",[],[]) [Str "Third",Space,Str "slide"]
+,Para [Str "The",Space,Str "second",Space,Str "slide",Space,Str "should",Space,Str "be",Space,Str "blank"]]
diff --git a/test/pptx/blanks/just-speaker-notes/output.pptx b/test/pptx/blanks/just-speaker-notes/output.pptx
new file mode 100644
index 000000000..9a36ccf1f
--- /dev/null
+++ b/test/pptx/blanks/just-speaker-notes/output.pptx
Binary files differ
diff --git a/test/pptx/blanks/just-speaker-notes/templated.pptx b/test/pptx/blanks/just-speaker-notes/templated.pptx
new file mode 100644
index 000000000..f9eca6f8c
--- /dev/null
+++ b/test/pptx/blanks/just-speaker-notes/templated.pptx
Binary files differ
diff --git a/test/pptx/blanks/nbsp-in-body/input.native b/test/pptx/blanks/nbsp-in-body/input.native
new file mode 100644
index 000000000..56c105fb0
--- /dev/null
+++ b/test/pptx/blanks/nbsp-in-body/input.native
@@ -0,0 +1,6 @@
+[Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"]
+,Para [Str "Uninteresting,",Space,Str "normal"]
+,Header 1 ("section",[],[]) []
+,Para [Str "\160"]
+,Header 1 ("third-slide",[],[]) [Str "Third",Space,Str "slide"]
+,Para [Str "Was",Space,Str "the",Space,Str "previous",Space,Str "one",Space,Str "blank?"]]
diff --git a/test/pptx/code-custom.pptx b/test/pptx/blanks/nbsp-in-body/output.pptx
index 5e9c2c630..08c764feb 100644
--- a/test/pptx/code-custom.pptx
+++ b/test/pptx/blanks/nbsp-in-body/output.pptx
Binary files differ
diff --git a/test/pptx/slide_breaks_slide_level_1_templated.pptx b/test/pptx/blanks/nbsp-in-body/templated.pptx
index e2815159a..758502dd0 100644
--- a/test/pptx/slide_breaks_slide_level_1_templated.pptx
+++ b/test/pptx/blanks/nbsp-in-body/templated.pptx
Binary files differ
diff --git a/test/pptx/blanks/nbsp-in-heading/input.native b/test/pptx/blanks/nbsp-in-heading/input.native
new file mode 100644
index 000000000..a5c7fc1ca
--- /dev/null
+++ b/test/pptx/blanks/nbsp-in-heading/input.native
@@ -0,0 +1,5 @@
+[Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"]
+,Para [Str "Uninteresting,",Space,Str "normal"]
+,Header 1 ("section",[],[]) [Str "\160"]
+,Header 1 ("third-slide",[],[]) [Str "Third",Space,Str "slide"]
+,Para [Str "Was",Space,Str "the",Space,Str "previous",Space,Str "one",Space,Str "blank?"]]
diff --git a/test/pptx/code.pptx b/test/pptx/blanks/nbsp-in-heading/output.pptx
index aab0cc6f5..08c764feb 100644
--- a/test/pptx/code.pptx
+++ b/test/pptx/blanks/nbsp-in-heading/output.pptx
Binary files differ
diff --git a/test/pptx/blanks/nbsp-in-heading/templated.pptx b/test/pptx/blanks/nbsp-in-heading/templated.pptx
new file mode 100644
index 000000000..758502dd0
--- /dev/null
+++ b/test/pptx/blanks/nbsp-in-heading/templated.pptx
Binary files differ
diff --git a/test/pptx/code-custom/output.pptx b/test/pptx/code-custom/output.pptx
new file mode 100644
index 000000000..1e5085e9c
--- /dev/null
+++ b/test/pptx/code-custom/output.pptx
Binary files differ
diff --git a/test/pptx/slide_breaks_templated.pptx b/test/pptx/code-custom/templated.pptx
index 71ba99701..116865c1f 100644
--- a/test/pptx/slide_breaks_templated.pptx
+++ b/test/pptx/code-custom/templated.pptx
Binary files differ
diff --git a/test/pptx/code.native b/test/pptx/code/input.native
index be7f512f7..be7f512f7 100644
--- a/test/pptx/code.native
+++ b/test/pptx/code/input.native
diff --git a/test/pptx/code/output.pptx b/test/pptx/code/output.pptx
new file mode 100644
index 000000000..a3f31dfdc
--- /dev/null
+++ b/test/pptx/code/output.pptx
Binary files differ
diff --git a/test/pptx/code-custom_templated.pptx b/test/pptx/code/templated.pptx
index 0e640f373..0d7db048f 100644
--- a/test/pptx/code-custom_templated.pptx
+++ b/test/pptx/code/templated.pptx
Binary files differ
diff --git a/test/pptx/comparison/both-columns/input.native b/test/pptx/comparison/both-columns/input.native
new file mode 100644
index 000000000..2557880d4
--- /dev/null
+++ b/test/pptx/comparison/both-columns/input.native
@@ -0,0 +1,23 @@
+[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "A",Space,Str "paragraph",Space,Str "here"]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 0.125)
+ ,(AlignDefault,ColWidth 0.125)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "plus"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "a",Space,Str "table"]]]])]
+ (TableFoot ("",[],[])
+ [])
+ ,Para [Str "Then",Space,Str "some",Space,Str "more",Space,Str "text"]]
+ ,Div ("",["column"],[])
+ [Para [Str "A",Space,Str "paragraph",Space,Str "here"]
+ ,Para [Image ("",[],[]) [Str "Plus",Space,Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]]]
diff --git a/test/pptx/comparison/both-columns/output.pptx b/test/pptx/comparison/both-columns/output.pptx
new file mode 100644
index 000000000..efb67f2e7
--- /dev/null
+++ b/test/pptx/comparison/both-columns/output.pptx
Binary files differ
diff --git a/test/pptx/comparison/both-columns/templated.pptx b/test/pptx/comparison/both-columns/templated.pptx
new file mode 100644
index 000000000..945bc6dc4
--- /dev/null
+++ b/test/pptx/comparison/both-columns/templated.pptx
Binary files differ
diff --git a/test/pptx/comparison/extra-image/input.native b/test/pptx/comparison/extra-image/input.native
new file mode 100644
index 000000000..34aeb8f2b
--- /dev/null
+++ b/test/pptx/comparison/extra-image/input.native
@@ -0,0 +1,24 @@
+[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "A",Space,Str "paragraph",Space,Str "here"]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 0.125)
+ ,(AlignDefault,ColWidth 0.125)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "plus"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "a",Space,Str "table"]]]])]
+ (TableFoot ("",[],[])
+ [])
+ ,Para [Str "Then",Space,Str "some",Space,Str "more",Space,Str "text"]]
+ ,Div ("",["column"],[])
+ [Para [Str "A",Space,Str "paragraph",Space,Str "here"]
+ ,Para [Image ("",[],[]) [Str "Plus",Space,Str "an",Space,Str "image"] ("lalune.jpg","fig:")]
+ ,Para [Image ("",[],[]) [Str "And",Space,Str "another",Space,Str "image"] ("lalune.jpg","fig:")]]]]
diff --git a/test/pptx/comparison/extra-image/output.pptx b/test/pptx/comparison/extra-image/output.pptx
new file mode 100644
index 000000000..e26e5b49c
--- /dev/null
+++ b/test/pptx/comparison/extra-image/output.pptx
Binary files differ
diff --git a/test/pptx/comparison/extra-image/templated.pptx b/test/pptx/comparison/extra-image/templated.pptx
new file mode 100644
index 000000000..2e48ffe87
--- /dev/null
+++ b/test/pptx/comparison/extra-image/templated.pptx
Binary files differ
diff --git a/test/pptx/comparison/extra-text/input.native b/test/pptx/comparison/extra-text/input.native
new file mode 100644
index 000000000..2557880d4
--- /dev/null
+++ b/test/pptx/comparison/extra-text/input.native
@@ -0,0 +1,23 @@
+[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "A",Space,Str "paragraph",Space,Str "here"]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 0.125)
+ ,(AlignDefault,ColWidth 0.125)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "plus"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "a",Space,Str "table"]]]])]
+ (TableFoot ("",[],[])
+ [])
+ ,Para [Str "Then",Space,Str "some",Space,Str "more",Space,Str "text"]]
+ ,Div ("",["column"],[])
+ [Para [Str "A",Space,Str "paragraph",Space,Str "here"]
+ ,Para [Image ("",[],[]) [Str "Plus",Space,Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]]]
diff --git a/test/pptx/comparison/extra-text/output.pptx b/test/pptx/comparison/extra-text/output.pptx
new file mode 100644
index 000000000..efb67f2e7
--- /dev/null
+++ b/test/pptx/comparison/extra-text/output.pptx
Binary files differ
diff --git a/test/pptx/comparison/extra-text/templated.pptx b/test/pptx/comparison/extra-text/templated.pptx
new file mode 100644
index 000000000..debb62d52
--- /dev/null
+++ b/test/pptx/comparison/extra-text/templated.pptx
Binary files differ
diff --git a/test/pptx/comparison/non-text-first/input.native b/test/pptx/comparison/non-text-first/input.native
new file mode 100644
index 000000000..a8caad151
--- /dev/null
+++ b/test/pptx/comparison/non-text-first/input.native
@@ -0,0 +1,21 @@
+[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 0.125)
+ ,(AlignDefault,ColWidth 0.125)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "a"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "table"]]]])]
+ (TableFoot ("",[],[])
+ [])
+ ,Para [Str "Plus",Space,Str "a",Space,Str "paragraph",Space,Str "here"]]
+ ,Div ("",["column"],[])
+ [Para [Image ("",[],[]) [Str "Just",Space,Str "an",Space,Str "image",Space,Str "on",Space,Str "this",Space,Str "side"] ("lalune.jpg","fig:")]]]]
diff --git a/test/pptx/comparison/non-text-first/output.pptx b/test/pptx/comparison/non-text-first/output.pptx
new file mode 100644
index 000000000..f36c53ddb
--- /dev/null
+++ b/test/pptx/comparison/non-text-first/output.pptx
Binary files differ
diff --git a/test/pptx/comparison/non-text-first/templated.pptx b/test/pptx/comparison/non-text-first/templated.pptx
new file mode 100644
index 000000000..a19b469b1
--- /dev/null
+++ b/test/pptx/comparison/non-text-first/templated.pptx
Binary files differ
diff --git a/test/pptx/comparison/one-column/input.native b/test/pptx/comparison/one-column/input.native
new file mode 100644
index 000000000..b99740a14
--- /dev/null
+++ b/test/pptx/comparison/one-column/input.native
@@ -0,0 +1,21 @@
+[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "A",Space,Str "paragraph",Space,Str "here"]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 0.125)
+ ,(AlignDefault,ColWidth 0.125)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "plus"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "a",Space,Str "table"]]]])]
+ (TableFoot ("",[],[])
+ [])]
+ ,Div ("",["column"],[])
+ [Para [Str "Only",Space,Str "a",Space,Str "paragraph",Space,Str "here"]]]]
diff --git a/test/pptx/comparison/one-column/output.pptx b/test/pptx/comparison/one-column/output.pptx
new file mode 100644
index 000000000..8d9031ac8
--- /dev/null
+++ b/test/pptx/comparison/one-column/output.pptx
Binary files differ
diff --git a/test/pptx/comparison/one-column/templated.pptx b/test/pptx/comparison/one-column/templated.pptx
new file mode 100644
index 000000000..fa5c2dc87
--- /dev/null
+++ b/test/pptx/comparison/one-column/templated.pptx
Binary files differ
diff --git a/test/pptx/content-with-caption/heading-text-image/input.native b/test/pptx/content-with-caption/heading-text-image/input.native
new file mode 100644
index 000000000..576bc1658
--- /dev/null
+++ b/test/pptx/content-with-caption/heading-text-image/input.native
@@ -0,0 +1,3 @@
+[Header 1 ("a-slide",[],[]) [Str "A",Space,Str "slide"]
+,Para [Str "Some",Space,Str "text",Space,Str "here"]
+,Para [Image ("",[],[]) [Str "Followed",Space,Str "by",Space,Str "a",Space,Str "picture"] ("lalune.jpg","fig:")]]
diff --git a/test/pptx/content-with-caption/heading-text-image/output.pptx b/test/pptx/content-with-caption/heading-text-image/output.pptx
new file mode 100644
index 000000000..6802b7361
--- /dev/null
+++ b/test/pptx/content-with-caption/heading-text-image/output.pptx
Binary files differ
diff --git a/test/pptx/content-with-caption/heading-text-image/templated.pptx b/test/pptx/content-with-caption/heading-text-image/templated.pptx
new file mode 100644
index 000000000..059d4f460
--- /dev/null
+++ b/test/pptx/content-with-caption/heading-text-image/templated.pptx
Binary files differ
diff --git a/test/pptx/content-with-caption/image-text/input.native b/test/pptx/content-with-caption/image-text/input.native
new file mode 100644
index 000000000..2ffbf0888
--- /dev/null
+++ b/test/pptx/content-with-caption/image-text/input.native
@@ -0,0 +1,2 @@
+[Para [Image ("",[],[]) [Str "The",Space,Str "picture",Space,Str "first"] ("lalune.jpg","fig:")]
+,Para [Str "Then",Space,Str "some",Space,Str "text",Space,Str "here"]]
diff --git a/test/pptx/content-with-caption/image-text/output.pptx b/test/pptx/content-with-caption/image-text/output.pptx
new file mode 100644
index 000000000..0bd64e340
--- /dev/null
+++ b/test/pptx/content-with-caption/image-text/output.pptx
Binary files differ
diff --git a/test/pptx/content-with-caption/image-text/templated.pptx b/test/pptx/content-with-caption/image-text/templated.pptx
new file mode 100644
index 000000000..a9c6aa43d
--- /dev/null
+++ b/test/pptx/content-with-caption/image-text/templated.pptx
Binary files differ
diff --git a/test/pptx/content-with-caption/text-image/input.native b/test/pptx/content-with-caption/text-image/input.native
new file mode 100644
index 000000000..762d18426
--- /dev/null
+++ b/test/pptx/content-with-caption/text-image/input.native
@@ -0,0 +1,2 @@
+[Para [Str "Some",Space,Str "text",Space,Str "here"]
+,Para [Image ("",[],[]) [Str "Followed",Space,Str "by",Space,Str "a",Space,Str "picture"] ("lalune.jpg","fig:")]]
diff --git a/test/pptx/content-with-caption/text-image/output.pptx b/test/pptx/content-with-caption/text-image/output.pptx
new file mode 100644
index 000000000..a0d8806c0
--- /dev/null
+++ b/test/pptx/content-with-caption/text-image/output.pptx
Binary files differ
diff --git a/test/pptx/content-with-caption/text-image/templated.pptx b/test/pptx/content-with-caption/text-image/templated.pptx
new file mode 100644
index 000000000..185314bf4
--- /dev/null
+++ b/test/pptx/content-with-caption/text-image/templated.pptx
Binary files differ
diff --git a/test/pptx/document-properties-short-desc.native b/test/pptx/document-properties-short-desc/input.native
index fe3193dc1..fe3193dc1 100644
--- a/test/pptx/document-properties-short-desc.native
+++ b/test/pptx/document-properties-short-desc/input.native
diff --git a/test/pptx/document-properties-short-desc.pptx b/test/pptx/document-properties-short-desc/output.pptx
index de5e68151..418d158ca 100644
--- a/test/pptx/document-properties-short-desc.pptx
+++ b/test/pptx/document-properties-short-desc/output.pptx
Binary files differ
diff --git a/test/pptx/document-properties-short-desc_templated.pptx b/test/pptx/document-properties-short-desc/templated.pptx
index d39dc0c91..4feccdac7 100644
--- a/test/pptx/document-properties-short-desc_templated.pptx
+++ b/test/pptx/document-properties-short-desc/templated.pptx
Binary files differ
diff --git a/test/pptx/document-properties.native b/test/pptx/document-properties/input.native
index 59ca53f4d..59ca53f4d 100644
--- a/test/pptx/document-properties.native
+++ b/test/pptx/document-properties/input.native
diff --git a/test/pptx/document-properties.pptx b/test/pptx/document-properties/output.pptx
index 6bcbd1b9c..55ca48b5d 100644
--- a/test/pptx/document-properties.pptx
+++ b/test/pptx/document-properties/output.pptx
Binary files differ
diff --git a/test/pptx/document-properties_templated.pptx b/test/pptx/document-properties/templated.pptx
index 841ae8c42..df6acb70c 100644
--- a/test/pptx/document-properties_templated.pptx
+++ b/test/pptx/document-properties/templated.pptx
Binary files differ
diff --git a/test/pptx/endnotes_toc.pptx b/test/pptx/endnotes-toc/output.pptx
index a028b346f..a6cc2db24 100644
--- a/test/pptx/endnotes_toc.pptx
+++ b/test/pptx/endnotes-toc/output.pptx
Binary files differ
diff --git a/test/pptx/endnotes_toc_templated.pptx b/test/pptx/endnotes-toc/templated.pptx
index 38a0c437d..63b066f0d 100644
--- a/test/pptx/endnotes_toc_templated.pptx
+++ b/test/pptx/endnotes-toc/templated.pptx
Binary files differ
diff --git a/test/pptx/endnotes.native b/test/pptx/endnotes/input.native
index f6caeb62f..f6caeb62f 100644
--- a/test/pptx/endnotes.native
+++ b/test/pptx/endnotes/input.native
diff --git a/test/pptx/endnotes.pptx b/test/pptx/endnotes/output.pptx
index 9d46036fe..ea29cbcf8 100644
--- a/test/pptx/endnotes.pptx
+++ b/test/pptx/endnotes/output.pptx
Binary files differ
diff --git a/test/pptx/endnotes_templated.pptx b/test/pptx/endnotes/templated.pptx
index 863cc29d4..a97a7eed8 100644
--- a/test/pptx/endnotes_templated.pptx
+++ b/test/pptx/endnotes/templated.pptx
Binary files differ
diff --git a/test/pptx/footer/basic/output.pptx b/test/pptx/footer/basic/output.pptx
new file mode 100644
index 000000000..2af46108c
--- /dev/null
+++ b/test/pptx/footer/basic/output.pptx
Binary files differ
diff --git a/test/pptx/footer/basic/reference.pptx b/test/pptx/footer/basic/reference.pptx
new file mode 100644
index 000000000..61f926fa6
--- /dev/null
+++ b/test/pptx/footer/basic/reference.pptx
Binary files differ
diff --git a/test/pptx/footer/fixed-date/output.pptx b/test/pptx/footer/fixed-date/output.pptx
new file mode 100644
index 000000000..678ecdb87
--- /dev/null
+++ b/test/pptx/footer/fixed-date/output.pptx
Binary files differ
diff --git a/test/pptx/footer/fixed-date/reference.pptx b/test/pptx/footer/fixed-date/reference.pptx
new file mode 100644
index 000000000..78bd3ce0d
--- /dev/null
+++ b/test/pptx/footer/fixed-date/reference.pptx
Binary files differ
diff --git a/test/pptx/footer/higher-slide-number/output.pptx b/test/pptx/footer/higher-slide-number/output.pptx
new file mode 100644
index 000000000..651491107
--- /dev/null
+++ b/test/pptx/footer/higher-slide-number/output.pptx
Binary files differ
diff --git a/test/pptx/footer/higher-slide-number/reference.pptx b/test/pptx/footer/higher-slide-number/reference.pptx
new file mode 100644
index 000000000..6ada45399
--- /dev/null
+++ b/test/pptx/footer/higher-slide-number/reference.pptx
Binary files differ
diff --git a/test/pptx/footer/input.native b/test/pptx/footer/input.native
new file mode 100644
index 000000000..2c0ae5c06
--- /dev/null
+++ b/test/pptx/footer/input.native
@@ -0,0 +1,66 @@
+Pandoc (Meta {unMeta = fromList [("author",MetaInlines [Str "Me"]),("date",MetaInlines [Str "14/09/1995"]),("title",MetaInlines [Str "Slides"])]})
+[Header 2 ("slide-1",[],[]) [Str "Slide",Space,Str "1"]
+,Para [Str "Hello",Space,Str "there"]
+,Header 1 ("layouts",[],[]) [Str "Layouts"]
+,Header 2 ("slide-3",[],[]) [Str "Slide",Space,Str "3"]
+,Para [Str "Does",Space,Str "it",Space,Str "work",Space,Str "on",Space,Str "other",Space,Str "layouts?"]
+,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)
+ ,(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "2"]]]])]
+ (TableFoot ("",[],[])
+ [])
+,Header 2 ("slide-4",[],[]) [Str "Slide",Space,Str "4"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "hello",Space,Str "hello"]]
+ ,Div ("",["column"],[])
+ [Para [Str "goood",Space,Str "bye"]]]
+,Header 2 ("slide-5",[],[]) [Str "Slide",Space,Str "5"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "Hello",Space,Str "there"]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)
+ ,(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "2"]]]])]
+ (TableFoot ("",[],[])
+ [])]
+ ,Div ("",["column"],[])
+ [Para [Str "oh",Space,Str "wait"]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)
+ ,(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]
+ ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "2"]]]])]
+ (TableFoot ("",[],[])
+ [])]]
+,Header 2 ("section",[],[]) []
+,Div ("",["notes"],[])
+ [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "blank",Space,Str "slide:",Space,Str "does",Space,Str "it",Space,Str "have",Space,Str "a",Space,Str "footer?"]]]
diff --git a/test/pptx/footer/no-title-slide/output.pptx b/test/pptx/footer/no-title-slide/output.pptx
new file mode 100644
index 000000000..c470cbb94
--- /dev/null
+++ b/test/pptx/footer/no-title-slide/output.pptx
Binary files differ
diff --git a/test/pptx/footer/no-title-slide/reference.pptx b/test/pptx/footer/no-title-slide/reference.pptx
new file mode 100644
index 000000000..ecd524a9b
--- /dev/null
+++ b/test/pptx/footer/no-title-slide/reference.pptx
Binary files differ
diff --git a/test/pptx/images.native b/test/pptx/images/input.native
index 54827e5cc..54827e5cc 100644
--- a/test/pptx/images.native
+++ b/test/pptx/images/input.native
diff --git a/test/pptx/images.pptx b/test/pptx/images/output.pptx
index 670a825de..098547e87 100644
--- a/test/pptx/images.pptx
+++ b/test/pptx/images/output.pptx
Binary files differ
diff --git a/test/pptx/images_templated.pptx b/test/pptx/images/templated.pptx
index 48ebf66d6..cad0b2f04 100644
--- a/test/pptx/images_templated.pptx
+++ b/test/pptx/images/templated.pptx
Binary files differ
diff --git a/test/pptx/incremental-lists/with-flag/input.native b/test/pptx/incremental-lists/with-flag/input.native
new file mode 100644
index 000000000..b690794dc
--- /dev/null
+++ b/test/pptx/incremental-lists/with-flag/input.native
@@ -0,0 +1,139 @@
+[Header 1 ("slide-1-content",[],[]) [Str "Slide",Space,Str "1",Space,Str "(Content)"]
+,BulletList
+ [[Plain [Str "These"]]
+ ,[Plain [Str "bullets"]]
+ ,[Plain [Str "should"]]
+ ,[Plain [Str "be"]]
+ ,[Plain [Str "incremental"]]]
+,Header 1 ("slide-2-content",[],[]) [Str "Slide",Space,Str "2",Space,Str "(Content)"]
+,BulletList
+ [[Para [Str "as"]]
+ ,[Para [Str "should"]]
+ ,[Para [Str "these"]]]
+,Header 1 ("slide-3-content",[],[]) [Str "Slide",Space,Str "3",Space,Str "(Content)"]
+,Para [Str "Even",Space,Str "with",Space,Str "some",Space,Str "text",Space,Str "first,",Space,Str "these",Space,Str "should:"]
+,BulletList
+ [[Plain [Str "also"]]
+ ,[Plain [Str "be"]]
+ ,[Plain [Str "incremental"]]]
+,Header 1 ("slide-4-content",[],[]) [Str "Slide",Space,Str "4",Space,Str "(Content)"]
+,OrderedList (1,Decimal,Period)
+ [[Plain [Str "These"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "incremental"]]]
+,Para [Str "But",Space,Str "this",Space,Str "text",Space,Str "isn\8217t"]
+,BulletList
+ [[Plain [Str "But"]]
+ ,[Plain [Str "these"]]
+ ,[Plain [Str "are"]]]
+,Header 1 ("slide-5-two-content",[],[]) [Str "Slide",Space,Str "5",Space,Str "(Two",Space,Str "Content)"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "Incremental",Space,Str "on",Space,Str "the",Space,Str "left:"]
+ ,BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "by"]]
+ ,[Plain [Str "one"]]]
+ ,Para [Str "With",Space,Str "something",Space,Str "below"]]
+ ,Div ("",["column"],[])
+ [Para [Str "Incremental",Space,Str "on",Space,Str "the",Space,Str "right:"]
+ ,BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "by"]]
+ ,[Plain [Str "one"]]]
+ ,Para [Str "With",Space,Str "something",Space,Str "else",Space,Str "below"]]]
+,Header 1 ("slide-6-two-content-right",[],[]) [Str "Slide",Space,Str "6",Space,Str "(Two",Space,Str "Content",Space,Str "Right)"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]
+ ,Div ("",["column"],[])
+ [BulletList
+ [[Plain [Str "An"]]
+ ,[Plain [Str "Incremental"]]
+ ,[Plain [Str "List"]]]]]
+,Header 1 ("slide-7-content-with-caption",[],[]) [Str "Slide",Space,Str "7",Space,Str "(Content",Space,Str "with",Space,Str "Caption)"]
+,Para [Str "First,",Space,Str "we",Space,Str "have",Space,Str "some",Space,Str "incremental",Space,Str "bullets:"]
+,BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]
+,Para [Str "Then,",Space,Str "a",Space,Str "picture:"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("./lalune.jpg","fig:")]
+,Header 1 ("slide-8-comparison",[],[]) [Str "Slide",Space,Str "8",Space,Str "(Comparison)"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]
+ ,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("./lalune.jpg","fig:")]]
+ ,Div ("",["column"],[])
+ [OrderedList (1,Decimal,Period)
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]]])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "2"]]]])]
+ (TableFoot ("",[],[])
+ [])]]
+,Header 1 ("slide-9-content",[],[]) [Str "Slide",Space,Str "9",Space,Str "(Content)"]
+,Div ("",["nonincremental"],[])
+ [BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "not"]]
+ ,[Plain [Str "incremental"]]]]
+,BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]]
+,Header 1 ("slide-10-content",[],[]) [Str "Slide",Space,Str "10",Space,Str "(Content)"]
+,Div ("",["incremental","nonincremental"],[])
+ [BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "incremental"]]
+ ,[Plain [Str "(the",Space,Str "incremental",Space,Str "class",Space,Str "wins)"]]]]
+,Header 1 ("slide-11-content",[],[]) [Str "Slide",Space,Str "11",Space,Str "(Content)"]
+,Para [Str "These",Space,Str "bullets",Space,Str "are",Space,Str "not",Space,Str "incremental:"]
+,BlockQuote
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]
+,Para [Str "These",Space,Str "are:"]
+,Div ("",["nonincremental"],[])
+ [BlockQuote
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]]
+,Para [Str "These",Space,Str "are",Space,Str "not:"]
+,BlockQuote
+ [Div ("",["nonincremental"],[])
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]]
+,Header 1 ("slide-12-content",[],[]) [Str "Slide",Space,Str "12",Space,Str "(Content)"]
+,Div ("",["nonincremental"],[])
+ [Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "incremental"]]]]]
+,Div ("",["incremental"],[])
+ [Div ("",["nonincremental"],[])
+ [BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "not"]]]]]]
diff --git a/test/pptx/incremental-lists/with-flag/output.pptx b/test/pptx/incremental-lists/with-flag/output.pptx
new file mode 100644
index 000000000..230d29253
--- /dev/null
+++ b/test/pptx/incremental-lists/with-flag/output.pptx
Binary files differ
diff --git a/test/pptx/incremental-lists/with-flag/templated.pptx b/test/pptx/incremental-lists/with-flag/templated.pptx
new file mode 100644
index 000000000..263d9c355
--- /dev/null
+++ b/test/pptx/incremental-lists/with-flag/templated.pptx
Binary files differ
diff --git a/test/pptx/incremental-lists/without-flag/input.native b/test/pptx/incremental-lists/without-flag/input.native
new file mode 100644
index 000000000..87a4aea7e
--- /dev/null
+++ b/test/pptx/incremental-lists/without-flag/input.native
@@ -0,0 +1,137 @@
+[Header 1 ("slide-1-content",[],[]) [Str "Slide",Space,Str "1",Space,Str "(Content)"]
+,Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "These"]]
+ ,[Plain [Str "bullets"]]
+ ,[Plain [Str "should"]]
+ ,[Plain [Str "be"]]
+ ,[Plain [Str "incremental"]]]]
+,Header 1 ("slide-2-content",[],[]) [Str "Slide",Space,Str "2",Space,Str "(Content)"]
+,BulletList
+ [[Plain [Str "These"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "not"]]]
+,Header 1 ("slide-3-content",[],[]) [Str "Slide",Space,Str "3",Space,Str "(Content)"]
+,Para [Str "Even",Space,Str "with",Space,Str "some",Space,Str "text",Space,Str "first,",Space,Str "these",Space,Str "should:"]
+,Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "also"]]
+ ,[Plain [Str "be"]]
+ ,[Plain [Str "incremental"]]]]
+,Header 1 ("slide-4-content",[],[]) [Str "Slide",Space,Str "4",Space,Str "(Content)"]
+,Div ("",["incremental"],[])
+ [OrderedList (1,Decimal,Period)
+ [[Plain [Str "These"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "incremental"]]]]
+,Para [Str "But",Space,Str "this",Space,Str "text",Space,Str "isn\8217t"]
+,Header 1 ("slide-5-two-content",[],[]) [Str "Slide",Space,Str "5",Space,Str "(Two",Space,Str "Content)"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "Incremental",Space,Str "on",Space,Str "the",Space,Str "left:"]
+ ,Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "by"]]
+ ,[Plain [Str "one"]]]]
+ ,Para [Str "With",Space,Str "something",Space,Str "below"]]
+ ,Div ("",["column"],[])
+ [Para [Str "Incremental",Space,Str "on",Space,Str "the",Space,Str "right:"]
+ ,Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "by"]]
+ ,[Plain [Str "one"]]]]
+ ,BulletList
+ [[Plain [Str "already"]]
+ ,[Plain [Str "here"]]
+ ,[Plain [Str "though"]]]]]
+,Header 1 ("slide-6-two-content-right",[],[]) [Str "Slide",Space,Str "6",Space,Str "(Two",Space,Str "Content",Space,Str "Right)"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]
+ ,Div ("",["column"],[])
+ [Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "An"]]
+ ,[Plain [Str "Incremental"]]
+ ,[Plain [Str "List"]]]]]]
+,Header 1 ("slide-7-content-with-caption",[],[]) [Str "Slide",Space,Str "7",Space,Str "(Content",Space,Str "with",Space,Str "Caption)"]
+,Para [Str "First,",Space,Str "we",Space,Str "have",Space,Str "some",Space,Str "incremental",Space,Str "bullets:"]
+,Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]
+,Para [Str "Then,",Space,Str "a",Space,Str "picture:"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("./lalune.jpg","fig:")]
+,Header 1 ("slide-8-comparison",[],[]) [Str "Slide",Space,Str "8",Space,Str "(Comparison)"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]
+ ,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("./lalune.jpg","fig:")]]
+ ,Div ("",["column"],[])
+ [Div ("",["incremental"],[])
+ [OrderedList (1,Decimal,Period)
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]
+ ,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]]])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "2"]]]])]
+ (TableFoot ("",[],[])
+ [])]]
+,Header 1 ("slide-10-content",[],[]) [Str "Slide",Space,Str "10",Space,Str "(Content)"]
+,Div ("",["incremental","nonincremental"],[])
+ [BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "incremental"]]
+ ,[Plain [Str "(the",Space,Str "incremental",Space,Str "class",Space,Str "wins)"]]]]
+,Header 1 ("slide-11-content",[],[]) [Str "Slide",Space,Str "11",Space,Str "(Content)"]
+,Para [Str "These",Space,Str "bullets",Space,Str "are",Space,Str "incremental:"]
+,BlockQuote
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]
+,Para [Str "These",Space,Str "are",Space,Str "not:"]
+,Div ("",["incremental"],[])
+ [BlockQuote
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]]
+,Para [Str "These",Space,Str "are:"]
+,BlockQuote
+ [Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "one"]]
+ ,[Plain [Str "two"]]
+ ,[Plain [Str "three"]]]]]
+,Header 1 ("slide-12-content",[],[]) [Str "Slide",Space,Str "12",Space,Str "(Content)"]
+,Div ("",["nonincremental"],[])
+ [Div ("",["incremental"],[])
+ [BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "incremental"]]]]]
+,Div ("",["incremental"],[])
+ [Div ("",["nonincremental"],[])
+ [BulletList
+ [[Plain [Str "these"]]
+ ,[Plain [Str "are"]]
+ ,[Plain [Str "not"]]]]]]
diff --git a/test/pptx/incremental-lists/without-flag/output.pptx b/test/pptx/incremental-lists/without-flag/output.pptx
new file mode 100644
index 000000000..450cd16ea
--- /dev/null
+++ b/test/pptx/incremental-lists/without-flag/output.pptx
Binary files differ
diff --git a/test/pptx/incremental-lists/without-flag/templated.pptx b/test/pptx/incremental-lists/without-flag/templated.pptx
new file mode 100644
index 000000000..e7ab48aa0
--- /dev/null
+++ b/test/pptx/incremental-lists/without-flag/templated.pptx
Binary files differ
diff --git a/test/pptx/inline_formatting.native b/test/pptx/inline-formatting/input.native
index 164176af2..164176af2 100644
--- a/test/pptx/inline_formatting.native
+++ b/test/pptx/inline-formatting/input.native
diff --git a/test/pptx/inline_formatting.pptx b/test/pptx/inline-formatting/output.pptx
index 473b9498d..7744b7d2e 100644
--- a/test/pptx/inline_formatting.pptx
+++ b/test/pptx/inline-formatting/output.pptx
Binary files differ
diff --git a/test/pptx/inline_formatting_templated.pptx b/test/pptx/inline-formatting/templated.pptx
index dd778a102..6930b785c 100644
--- a/test/pptx/inline_formatting_templated.pptx
+++ b/test/pptx/inline-formatting/templated.pptx
Binary files differ
diff --git a/test/pptx/layouts/deleted.pptx b/test/pptx/layouts/deleted.pptx
new file mode 100644
index 000000000..f7116b2f4
--- /dev/null
+++ b/test/pptx/layouts/deleted.pptx
Binary files differ
diff --git a/test/pptx/layouts/input.native b/test/pptx/layouts/input.native
new file mode 100644
index 000000000..0cee2d14e
--- /dev/null
+++ b/test/pptx/layouts/input.native
@@ -0,0 +1,23 @@
+Pandoc (Meta {unMeta = fromList [("title",MetaInlines [Str "Testing",Space,Str "Layouts"])]})
+[Header 2 ("slide-1",[],[]) [Str "Slide",Space,Str "1"]
+,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "title",Space,Str "and",Space,Str "content",Space,Str "slide"]
+,Header 2 ("slide-2",[],[]) [Str "Slide",Space,Str "2"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "This"]]
+ ,Div ("",["column"],[])
+ [Para [Str "\8230is",Space,Str "a",Space,Str "two-column",Space,Str "slide"]]]
+,Header 2 ("slide-3",[],[]) [Str "Slide",Space,Str "3"]
+,Para [Str "This",Space,Str "slide",Space,Str "is",Space,Str "a",Space,Str "Content",Space,Str "with",Space,Str "Caption",Space,Str "slide"]
+,Para [Image ("",[],[]) [Str "Content"] ("lalune.jpg","fig:")]
+,Header 2 ("slide-4",[],[]) [Str "Slide",Space,Str "4"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "This",Space,Str "slide",Space,Str "is",Space,Str "a",Space,Str "Comparison",Space,Str "slide:"]
+ ,Para [Image ("",[],[]) [Str "Content"] ("lalune.jpg","fig:")]]
+ ,Div ("",["column"],[])
+ [Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "other",Space,Str "text"]]]
+,Header 1 ("section-header",[],[]) [Str "Section",Space,Str "header"]
+,Header 2 ("section",[],[]) []
+,Div ("",["notes"],[])
+ [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "blank",Space,Str "slide"]]]
diff --git a/test/pptx/layouts/moved.pptx b/test/pptx/layouts/moved.pptx
new file mode 100644
index 000000000..e41465a86
--- /dev/null
+++ b/test/pptx/layouts/moved.pptx
Binary files differ
diff --git a/test/pptx/list-level/input.native b/test/pptx/list-level/input.native
new file mode 100644
index 000000000..e0b36b8e5
--- /dev/null
+++ b/test/pptx/list-level/input.native
@@ -0,0 +1,20 @@
+[Header 1 ("slide",[],[]) [Str "Slide"]
+,BulletList
+ [[Para [Str "Top-level"]
+ ,Para [Str "With",Space,Str "continuation",Space,Str "paragraph"]]
+ ,[Para [Str "Then:"]
+ ,BulletList
+ [[Plain [Str "nested"]]
+ ,[Plain [Str "list"]]
+ ,[Plain [Str "items"]]]]]
+,Header 1 ("slide-1",[],[]) [Str "Slide"]
+,Para [Str "Paragraph."]
+,OrderedList (1,Decimal,Period)
+ [[Para [Str "Top-level"]
+ ,Para [Str "Continuation"]
+ ,OrderedList (1,Decimal,Period)
+ [[Para [Str "Sub-list"]
+ ,Para [Str "With",Space,Str "Continuation"]]
+ ,[Para [Str "(still",Space,Str "sub-list)"]]]]
+ ,[Para [Str "(back",Space,Str "to",Space,Str "top-level)"]]]
+,Para [Str "Paragraph."]]
diff --git a/test/pptx/lists.pptx b/test/pptx/list-level/output.pptx
index ffc2eb9f7..02c609b40 100644
--- a/test/pptx/lists.pptx
+++ b/test/pptx/list-level/output.pptx
Binary files differ
diff --git a/test/pptx/lists_templated.pptx b/test/pptx/list-level/templated.pptx
index 2493e7890..a7b23ccf9 100644
--- a/test/pptx/lists_templated.pptx
+++ b/test/pptx/list-level/templated.pptx
Binary files differ
diff --git a/test/pptx/lists.native b/test/pptx/lists/input.native
index 61249c7fe..61249c7fe 100644
--- a/test/pptx/lists.native
+++ b/test/pptx/lists/input.native
diff --git a/test/pptx/tables.pptx b/test/pptx/lists/output.pptx
index e41219844..857a3e28c 100644
--- a/test/pptx/tables.pptx
+++ b/test/pptx/lists/output.pptx
Binary files differ
diff --git a/test/pptx/tables_templated.pptx b/test/pptx/lists/templated.pptx
index 0a8c3e8d9..5510a7123 100644
--- a/test/pptx/tables_templated.pptx
+++ b/test/pptx/lists/templated.pptx
Binary files differ
diff --git a/test/pptx/pauses/without-incremental/output.pptx b/test/pptx/pauses/without-incremental/output.pptx
new file mode 100644
index 000000000..9085db330
--- /dev/null
+++ b/test/pptx/pauses/without-incremental/output.pptx
Binary files differ
diff --git a/test/pptx/pauses/without-incremental/templated.pptx b/test/pptx/pauses/without-incremental/templated.pptx
new file mode 100644
index 000000000..6662e2451
--- /dev/null
+++ b/test/pptx/pauses/without-incremental/templated.pptx
Binary files differ
diff --git a/test/pptx/raw_ooxml.native b/test/pptx/raw-ooxml/input.native
index ae5bdd140..ae5bdd140 100644
--- a/test/pptx/raw_ooxml.native
+++ b/test/pptx/raw-ooxml/input.native
diff --git a/test/pptx/raw_ooxml.pptx b/test/pptx/raw-ooxml/output.pptx
index 29164af15..1813bbd28 100644
--- a/test/pptx/raw_ooxml.pptx
+++ b/test/pptx/raw-ooxml/output.pptx
Binary files differ
diff --git a/test/pptx/raw_ooxml_templated.pptx b/test/pptx/raw-ooxml/templated.pptx
index 0f20f9826..1dd23da2e 100644
--- a/test/pptx/raw_ooxml_templated.pptx
+++ b/test/pptx/raw-ooxml/templated.pptx
Binary files differ
diff --git a/test/pptx/reference-deleted-layouts.pptx b/test/pptx/reference-deleted-layouts.pptx
new file mode 100644
index 000000000..a9a74ecd5
--- /dev/null
+++ b/test/pptx/reference-deleted-layouts.pptx
Binary files differ
diff --git a/test/pptx/reference_depth.pptx b/test/pptx/reference-depth.pptx
index 97f444788..97f444788 100644
--- a/test/pptx/reference_depth.pptx
+++ b/test/pptx/reference-depth.pptx
Binary files differ
diff --git a/test/pptx/reference-moved-layouts.pptx b/test/pptx/reference-moved-layouts.pptx
new file mode 100644
index 000000000..72c4f3fd7
--- /dev/null
+++ b/test/pptx/reference-moved-layouts.pptx
Binary files differ
diff --git a/test/pptx/remove_empty_slides.native b/test/pptx/remove-empty-slides/input.native
index 51c042281..51c042281 100644
--- a/test/pptx/remove_empty_slides.native
+++ b/test/pptx/remove-empty-slides/input.native
diff --git a/test/pptx/remove-empty-slides/output.pptx b/test/pptx/remove-empty-slides/output.pptx
new file mode 100644
index 000000000..d0d5e824c
--- /dev/null
+++ b/test/pptx/remove-empty-slides/output.pptx
Binary files differ
diff --git a/test/pptx/remove-empty-slides/templated.pptx b/test/pptx/remove-empty-slides/templated.pptx
new file mode 100644
index 000000000..c730b2103
--- /dev/null
+++ b/test/pptx/remove-empty-slides/templated.pptx
Binary files differ
diff --git a/test/pptx/slide_breaks_slide_level_1.pptx b/test/pptx/slide-breaks-slide-level-1/output.pptx
index 449339778..d443bc04e 100644
--- a/test/pptx/slide_breaks_slide_level_1.pptx
+++ b/test/pptx/slide-breaks-slide-level-1/output.pptx
Binary files differ
diff --git a/test/pptx/code_templated.pptx b/test/pptx/slide-breaks-slide-level-1/templated.pptx
index a03109217..ca2e844cc 100644
--- a/test/pptx/code_templated.pptx
+++ b/test/pptx/slide-breaks-slide-level-1/templated.pptx
Binary files differ
diff --git a/test/pptx/slide_breaks_toc.pptx b/test/pptx/slide-breaks-toc/output.pptx
index 9dbfa41a0..e24b45e12 100644
--- a/test/pptx/slide_breaks_toc.pptx
+++ b/test/pptx/slide-breaks-toc/output.pptx
Binary files differ
diff --git a/test/pptx/slide_breaks_toc_templated.pptx b/test/pptx/slide-breaks-toc/templated.pptx
index b83f3f596..0a2bdb857 100644
--- a/test/pptx/slide_breaks_toc_templated.pptx
+++ b/test/pptx/slide-breaks-toc/templated.pptx
Binary files differ
diff --git a/test/pptx/slide_breaks.native b/test/pptx/slide-breaks/input.native
index 084c61737..084c61737 100644
--- a/test/pptx/slide_breaks.native
+++ b/test/pptx/slide-breaks/input.native
diff --git a/test/pptx/slide_breaks.pptx b/test/pptx/slide-breaks/output.pptx
index e06d9079d..a5208ecf8 100644
--- a/test/pptx/slide_breaks.pptx
+++ b/test/pptx/slide-breaks/output.pptx
Binary files differ
diff --git a/test/pptx/slide-breaks/templated.pptx b/test/pptx/slide-breaks/templated.pptx
new file mode 100644
index 000000000..5bf186f4e
--- /dev/null
+++ b/test/pptx/slide-breaks/templated.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0/h1-h2-with-table/input.native b/test/pptx/slide-level-0/h1-h2-with-table/input.native
new file mode 100644
index 000000000..c6e65ecf5
--- /dev/null
+++ b/test/pptx/slide-level-0/h1-h2-with-table/input.native
@@ -0,0 +1,14 @@
+[Header 1 ("hello",[],[]) [Str "Hello"]
+,Header 2 ("there",[],[]) [Str "There"]
+,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]]])]
+ (TableFoot ("",[],[])
+ [])]
diff --git a/test/pptx/slide-level-0/h1-h2-with-table/output.pptx b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx
new file mode 100644
index 000000000..bd772d44e
--- /dev/null
+++ b/test/pptx/slide-level-0/h1-h2-with-table/output.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx b/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx
new file mode 100644
index 000000000..b270d2d4f
--- /dev/null
+++ b/test/pptx/slide-level-0/h1-h2-with-table/templated.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0/h1-with-image/input.native b/test/pptx/slide-level-0/h1-with-image/input.native
new file mode 100644
index 000000000..0f5033b54
--- /dev/null
+++ b/test/pptx/slide-level-0/h1-with-image/input.native
@@ -0,0 +1,2 @@
+[Header 1 ("hello",[],[]) [Str "Hello"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("lalune.jpg","fig:")]]
diff --git a/test/pptx/remove_empty_slides.pptx b/test/pptx/slide-level-0/h1-with-image/output.pptx
index c6df8e18e..1102f549c 100644
--- a/test/pptx/remove_empty_slides.pptx
+++ b/test/pptx/slide-level-0/h1-with-image/output.pptx
Binary files differ
diff --git a/test/pptx/remove_empty_slides_templated.pptx b/test/pptx/slide-level-0/h1-with-image/templated.pptx
index 1df48c5ad..7a023480f 100644
--- a/test/pptx/remove_empty_slides_templated.pptx
+++ b/test/pptx/slide-level-0/h1-with-image/templated.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0/h1-with-table/input.native b/test/pptx/slide-level-0/h1-with-table/input.native
new file mode 100644
index 000000000..b961e900d
--- /dev/null
+++ b/test/pptx/slide-level-0/h1-with-table/input.native
@@ -0,0 +1,13 @@
+[Header 1 ("hello",[],[]) [Str "Hello"]
+,Table ("",[],[]) (Caption Nothing
+ [])
+ [(AlignDefault,ColWidth 5.555555555555555e-2)]
+ (TableHead ("",[],[])
+ [])
+ [(TableBody ("",[],[]) (RowHeadColumns 0)
+ []
+ [Row ("",[],[])
+ [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
+ [Plain [Str "1"]]]])]
+ (TableFoot ("",[],[])
+ [])]
diff --git a/test/pptx/slide-level-0/h1-with-table/output.pptx b/test/pptx/slide-level-0/h1-with-table/output.pptx
new file mode 100644
index 000000000..c0bc6b162
--- /dev/null
+++ b/test/pptx/slide-level-0/h1-with-table/output.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0/h1-with-table/templated.pptx b/test/pptx/slide-level-0/h1-with-table/templated.pptx
new file mode 100644
index 000000000..eb2a78647
--- /dev/null
+++ b/test/pptx/slide-level-0/h1-with-table/templated.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0/h2-with-image/input.native b/test/pptx/slide-level-0/h2-with-image/input.native
new file mode 100644
index 000000000..5def0cb92
--- /dev/null
+++ b/test/pptx/slide-level-0/h2-with-image/input.native
@@ -0,0 +1,2 @@
+[Header 2 ("hello",[],[]) [Str "Hello"]
+,Para [Image ("",[],[]) [Str "An",Space,Str "image"] ("lalune.jpg","fig:")]]
diff --git a/test/pptx/slide-level-0/h2-with-image/output.pptx b/test/pptx/slide-level-0/h2-with-image/output.pptx
new file mode 100644
index 000000000..1102f549c
--- /dev/null
+++ b/test/pptx/slide-level-0/h2-with-image/output.pptx
Binary files differ
diff --git a/test/pptx/slide-level-0/h2-with-image/templated.pptx b/test/pptx/slide-level-0/h2-with-image/templated.pptx
new file mode 100644
index 000000000..7a023480f
--- /dev/null
+++ b/test/pptx/slide-level-0/h2-with-image/templated.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes_after_metadata.native b/test/pptx/speaker-notes-after-metadata/input.native
index 6fda4b1ab..6fda4b1ab 100644
--- a/test/pptx/speaker_notes_after_metadata.native
+++ b/test/pptx/speaker-notes-after-metadata/input.native
diff --git a/test/pptx/speaker_notes_after_metadata.pptx b/test/pptx/speaker-notes-after-metadata/output.pptx
index 6343bffe4..4e5635e0c 100644
--- a/test/pptx/speaker_notes_after_metadata.pptx
+++ b/test/pptx/speaker-notes-after-metadata/output.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes_after_metadata_templated.pptx b/test/pptx/speaker-notes-after-metadata/templated.pptx
index 8d27c4c68..fd95c935e 100644
--- a/test/pptx/speaker_notes_after_metadata_templated.pptx
+++ b/test/pptx/speaker-notes-after-metadata/templated.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes_afterheader.native b/test/pptx/speaker-notes-afterheader/input.native
index 0f7dd95d7..0f7dd95d7 100644
--- a/test/pptx/speaker_notes_afterheader.native
+++ b/test/pptx/speaker-notes-afterheader/input.native
diff --git a/test/pptx/speaker_notes_afterheader.pptx b/test/pptx/speaker-notes-afterheader/output.pptx
index d581681aa..f59b29f6a 100644
--- a/test/pptx/speaker_notes_afterheader.pptx
+++ b/test/pptx/speaker-notes-afterheader/output.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes_afterheader_templated.pptx b/test/pptx/speaker-notes-afterheader/templated.pptx
index d8d8481df..b85f22961 100644
--- a/test/pptx/speaker_notes_afterheader_templated.pptx
+++ b/test/pptx/speaker-notes-afterheader/templated.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes_afterseps.native b/test/pptx/speaker-notes-afterseps/input.native
index 4fd7b1ccb..4fd7b1ccb 100644
--- a/test/pptx/speaker_notes_afterseps.native
+++ b/test/pptx/speaker-notes-afterseps/input.native
diff --git a/test/pptx/speaker_notes_afterseps.pptx b/test/pptx/speaker-notes-afterseps/output.pptx
index 13f564bf0..aad79e3dc 100644
--- a/test/pptx/speaker_notes_afterseps.pptx
+++ b/test/pptx/speaker-notes-afterseps/output.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes_afterseps_templated.pptx b/test/pptx/speaker-notes-afterseps/templated.pptx
index 9c22eaf38..3b272ab1b 100644
--- a/test/pptx/speaker_notes_afterseps_templated.pptx
+++ b/test/pptx/speaker-notes-afterseps/templated.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes.native b/test/pptx/speaker-notes/input.native
index 4eeca2107..4eeca2107 100644
--- a/test/pptx/speaker_notes.native
+++ b/test/pptx/speaker-notes/input.native
diff --git a/test/pptx/speaker_notes.pptx b/test/pptx/speaker-notes/output.pptx
index 0ab1302da..7b44c50c2 100644
--- a/test/pptx/speaker_notes.pptx
+++ b/test/pptx/speaker-notes/output.pptx
Binary files differ
diff --git a/test/pptx/speaker_notes_templated.pptx b/test/pptx/speaker-notes/templated.pptx
index 930377fbf..f35bf5d88 100644
--- a/test/pptx/speaker_notes_templated.pptx
+++ b/test/pptx/speaker-notes/templated.pptx
Binary files differ
diff --git a/test/pptx/start_numbering_at.native b/test/pptx/start-numbering-at/input.native
index ecffbb0ef..ecffbb0ef 100644
--- a/test/pptx/start_numbering_at.native
+++ b/test/pptx/start-numbering-at/input.native
diff --git a/test/pptx/start_numbering_at.pptx b/test/pptx/start-numbering-at/output.pptx
index 4320128b3..e08d300e5 100644
--- a/test/pptx/start_numbering_at.pptx
+++ b/test/pptx/start-numbering-at/output.pptx
Binary files differ
diff --git a/test/pptx/start_numbering_at_templated.pptx b/test/pptx/start-numbering-at/templated.pptx
index efc56ac7a..30a097eb8 100644
--- a/test/pptx/start_numbering_at_templated.pptx
+++ b/test/pptx/start-numbering-at/templated.pptx
Binary files differ
diff --git a/test/pptx/tables.native b/test/pptx/tables/input.native
index 27b843f2b..27b843f2b 100644
--- a/test/pptx/tables.native
+++ b/test/pptx/tables/input.native
diff --git a/test/pptx/tables/output.pptx b/test/pptx/tables/output.pptx
new file mode 100644
index 000000000..407062ca3
--- /dev/null
+++ b/test/pptx/tables/output.pptx
Binary files differ
diff --git a/test/pptx/tables/templated.pptx b/test/pptx/tables/templated.pptx
new file mode 100644
index 000000000..7259e15dd
--- /dev/null
+++ b/test/pptx/tables/templated.pptx
Binary files differ
diff --git a/test/pptx/two_column.native b/test/pptx/two-column/all-text/input.native
index 086f74889..086f74889 100644
--- a/test/pptx/two_column.native
+++ b/test/pptx/two-column/all-text/input.native
diff --git a/test/pptx/two_column.pptx b/test/pptx/two-column/all-text/output.pptx
index 270a7eeac..8a1dce949 100644
--- a/test/pptx/two_column.pptx
+++ b/test/pptx/two-column/all-text/output.pptx
Binary files differ
diff --git a/test/pptx/two_column_templated.pptx b/test/pptx/two-column/all-text/templated.pptx
index 6d9470372..01a3cdb0c 100644
--- a/test/pptx/two_column_templated.pptx
+++ b/test/pptx/two-column/all-text/templated.pptx
Binary files differ
diff --git a/test/pptx/two-column/text-and-image/input.native b/test/pptx/two-column/text-and-image/input.native
new file mode 100644
index 000000000..796c2c7f4
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/input.native
@@ -0,0 +1,12 @@
+[Header 1 ("slide-1",[],[]) [Str "Slide",Space,Str "1"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]
+ ,Div ("",["column"],[])
+ [Para [Str "This",Space,Str "should",Space,Str "use",Space,Str "Two",Space,Str "Content,",Space,Emph [Str "not"],Space,Str "Comparison!"]]]
+,Header 1 ("slide-2",[],[]) [Str "Slide",Space,Str "2"]
+,Div ("",["columns"],[])
+ [Div ("",["column"],[])
+ [Para [Str "This",Space,Str "should",Space,Str "also",Space,Str "use",Space,Str "Two",Space,Str "Content"]]
+ ,Div ("",["column"],[])
+ [Para [Image ("",[],[]) [Str "an",Space,Str "image"] ("lalune.jpg","fig:")]]]]
diff --git a/test/pptx/two-column/text-and-image/output.pptx b/test/pptx/two-column/text-and-image/output.pptx
new file mode 100644
index 000000000..e45bf3d58
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/output.pptx
Binary files differ
diff --git a/test/pptx/two-column/text-and-image/templated.pptx b/test/pptx/two-column/text-and-image/templated.pptx
new file mode 100644
index 000000000..5cae9b43b
--- /dev/null
+++ b/test/pptx/two-column/text-and-image/templated.pptx
Binary files differ
diff --git a/test/rst-reader.native b/test/rst-reader.native
index 9f8d5ab3e..d3e7f6caa 100644
--- a/test/rst-reader.native
+++ b/test/rst-reader.native
@@ -1,443 +1,1725 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("revision",MetaBlocks [Para [Str "3"]]),("subtitle",MetaInlines [Str "Subtitle"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
-[Header 1 ("level-one-header",[],[]) [Str "Level",Space,Str "one",Space,Str "header"]
-,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,Header 2 ("level-two-header",[],[]) [Str "Level",Space,Str "two",Space,Str "header"]
-,Header 3 ("level-three",[],[]) [Str "Level",Space,Str "three"]
-,Header 4 ("level-four-with-emphasis",[],[]) [Str "Level",Space,Str "four",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 5 ("level-five",[],[]) [Str "Level",Space,Str "five"]
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,Str "*",Space,Str "criminey."]
-,Para [Str "Horizontal",Space,Str "rule:"]
-,HorizontalRule
-,Para [Str "Another:"]
-,HorizontalRule
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "block",Space,Str "quote:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,Para [Str "Here\8217s",Space,Str "another,",Space,Str "differently",Space,Str "indented:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It\8217s",Space,Str "indented",Space,Str "with",Space,Str "a",Space,Str "tab."]
- ,Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
- ,Para [Str "List",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,OrderedList (1,Decimal,Period)
- [[Plain [Str "item",Space,Str "one"]]
- ,[Plain [Str "item",Space,Str "two"]]]
- ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
- ,BlockQuote
- [Para [Str "nested"]
- ,BlockQuote
- [Para [Str "nested"]]]]
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}"
-,CodeBlock ("",[],[]) "this code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) "this block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,Para [Str "And:"]
-,CodeBlock ("",["python"],[]) "def my_function(x):\n return x + 1"
-,Para [Str "If",Space,Str "we",Space,Str "use",Space,Str "the",Space,Str "highlight",Space,Str "directive,",Space,Str "we",Space,Str "can",Space,Str "specify",Space,Str "a",Space,Str "default",Space,Str "language",SoftBreak,Str "for",Space,Str "literate",Space,Str "blocks."]
-,CodeBlock ("",["haskell"],[]) "-- this code is in haskell\ndata Tree = Leaf | Node Tree Tree"
-,CodeBlock ("",["haskell"],[]) "-- this code is in haskell too\ndata Nat = Zero | Succ Nat"
-,CodeBlock ("",["javascript"],[]) "-- this code is in javascript\nlet f = (x, y) => x + y"
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "asterisk",Space,Str "1"]]
- ,[Plain [Str "asterisk",Space,Str "2"]]
- ,[Plain [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Asterisks",Space,Str "loose:"]
-,BulletList
- [[Plain [Str "asterisk",Space,Str "1"]]
- ,[Plain [Str "asterisk",Space,Str "2"]]
- ,[Plain [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Plus",Space,Str "1"]]
- ,[Plain [Str "Plus",Space,Str "2"]]
- ,[Plain [Str "Plus",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "loose:"]
-,BulletList
- [[Plain [Str "Plus",Space,Str "1"]]
- ,[Plain [Str "Plus",Space,Str "2"]]
- ,[Plain [Str "Plus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Minus",Space,Str "1"]]
- ,[Plain [Str "Minus",Space,Str "2"]]
- ,[Plain [Str "Minus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "loose:"]
-,BulletList
- [[Plain [Str "Minus",Space,Str "1"]]
- ,[Plain [Str "Minus",Space,Str "2"]]
- ,[Plain [Str "Minus",Space,Str "3"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,Para [Str "Tight:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second"]]
- ,[Plain [Str "Third"]]]
-,Para [Str "and:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "One"]]
- ,[Plain [Str "Two"]]
- ,[Plain [Str "Three"]]]
-,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second"]]
- ,[Plain [Str "Third"]]]
-,Para [Str "and",Space,Str "using",Space,Str "spaces:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "One"]]
- ,[Plain [Str "Two"]]
- ,[Plain [Str "Three"]]]
-,Para [Str "Multiple",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
- ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",SoftBreak,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Para [Str "Nested:"]
-,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]]]]]]]
-,Para [Str "Here\8217s",Space,Str "another:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BlockQuote
- [BulletList
- [[Plain [Str "Fee"]]
- ,[Plain [Str "Fie"]]
- ,[Plain [Str "Foe"]]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
-,OrderedList (2,Decimal,TwoParens)
- [[Para [Str "begins",Space,Str "with",Space,Str "2"]]
- ,[Para [Str "and",Space,Str "now",Space,Str "3"]
- ,Para [Str "with",Space,Str "a",Space,Str "continuation"]
- ,OrderedList (4,LowerRoman,Period)
- [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",Space,Str "starting",Space,Str "with",Space,Str "4"]]
- ,[Plain [Str "more",Space,Str "items"]
- ,OrderedList (1,UpperAlpha,TwoParens)
- [[Plain [Str "a",Space,Str "subsublist"]]
- ,[Plain [Str "a",Space,Str "subsublist"]]]]]]]
-,Para [Str "Nesting:"]
-,OrderedList (1,UpperAlpha,Period)
- [[Plain [Str "Upper",Space,Str "Alpha"]
- ,OrderedList (1,UpperRoman,Period)
- [[Plain [Str "Upper",Space,Str "Roman."]
- ,OrderedList (6,Decimal,TwoParens)
- [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
- ,OrderedList (3,LowerAlpha,OneParen)
- [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
-,Para [Str "Autonumbering:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Autonumber."]]
- ,[Plain [Str "More."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Nested."]]]]]
-,Para [Str "Autonumbering",Space,Str "with",Space,Str "explicit",Space,Str "start:"]
-,OrderedList (4,LowerAlpha,TwoParens)
- [[Plain [Str "item",Space,Str "1"]]
- ,[Plain [Str "item",Space,Str "2"]]]
-,Header 2 ("definition",[],[]) [Str "Definition"]
-,DefinitionList
- [([Str "term",Space,Str "1"],
- [[Para [Str "Definition",Space,Str "1."]]])
- ,([Str "term",Space,Str "2"],
- [[Para [Str "Definition",Space,Str "2,",Space,Str "paragraph",Space,Str "1."]
- ,Para [Str "Definition",Space,Str "2,",Space,Str "paragraph",Space,Str "2."]]])
- ,([Str "term",Space,Str "with",Space,Emph [Str "emphasis"]],
- [[Para [Str "Definition",Space,Str "3."]]])]
-,Header 1 ("field-lists",[],[]) [Str "Field",Space,Str "Lists"]
-,BlockQuote
- [DefinitionList
- [([Str "address"],
- [[Para [Str "61",Space,Str "Main",Space,Str "St."]]])
- ,([Str "city"],
- [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",SoftBreak,Str "USA"]]])
- ,([Str "phone"],
- [[Para [Str "123-4567"]]])]]
-,DefinitionList
- [([Str "address"],
- [[Para [Str "61",Space,Str "Main",Space,Str "St."]]])
- ,([Str "city"],
- [[Para [Emph [Str "Nowhere"],Str ",",Space,Str "MA,",SoftBreak,Str "USA"]]])
- ,([Str "phone"],
- [[Para [Str "123-4567"]]])]
-,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"]
-,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
-,RawBlock (Format "html") "<div>foo</div>"
-,Para [Str "Now,",Space,Str "nested:"]
-,RawBlock (Format "html") "<div>\n <div>\n <div>\n foo\n </div>\n </div>\n</div>"
-,Header 1 ("latex-block",[],[]) [Str "LaTeX",Space,Str "Block"]
-,RawBlock (Format "latex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ".",Space,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
-,Para [Str "This",Space,Str "is",Subscript [Str "subscripted"],Space,Str "and",Space,Str "this",Space,Str "is",Space,Superscript [Str "superscripted"],Str "."]
-,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Plain [Str "section:",Space,Str "\167"]]
- ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]]
- ,[Plain [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,Header 1 ("links",[],[]) [Str "Links"]
-,Para [Str "Explicit:",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."]
-,Para [Str "Explicit",Space,Str "with",Space,Str "no",Space,Str "label:",Space,Link ("",[],[]) [Str "foo"] ("foo",""),Str "."]
-,Para [Str "Two",Space,Str "anonymous",Space,Str "links:",Space,Link ("",[],[]) [Str "the",Space,Str "first"] ("/url1/",""),Space,Str "and",Space,Link ("",[],[]) [Str "the",Space,Str "second"] ("/url2/","")]
-,Para [Str "Reference",Space,Str "links:",Space,Link ("",[],[]) [Str "link1"] ("/url1/",""),Space,Str "and",Space,Link ("",[],[]) [Str "link2"] ("/url2/",""),Space,Str "and",Space,Link ("",[],[]) [Str "link1"] ("/url1/",""),Space,Str "again."]
-,Para [Str "Another",Space,Link ("",[],[]) [Str "style",Space,Str "of",Space,Str "reference",Space,Str "link"] ("/url1/",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("/url/",""),Str "."]
-,Para [Str "Autolinks:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2",""),Space,Str "and",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net",""),Str "."]
-,Para [Str "But",Space,Str "not",Space,Str "here:"]
-,CodeBlock ("",[],[]) "http://example.com/"
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [Str "image"] ("lalune.jpg","")]
-,Para [Image ("",[],[("height","2343px")]) [Str "Voyage dans la Lune"] ("lalune.jpg","")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."]
-,Para [Str "And",Space,Str "an",Space,Link ("",[],[]) [Image ("",[],[]) [Str "A movie"] ("movie.jpg","")] ("/url",""),Str "."]
-,Header 1 ("comments",[],[]) [Str "Comments"]
-,Para [Str "First",Space,Str "paragraph"]
-,Para [Str "Another",Space,Str "paragraph"]
-,Para [Str "A",Space,Str "third",Space,Str "paragraph"]
-,Header 1 ("line-blocks",[],[]) [Str "Line",Space,Str "blocks"]
-,LineBlock
- [[Str "But",Space,Str "can",Space,Str "a",Space,Str "bee",Space,Str "be",Space,Str "said",Space,Str "to",Space,Str "be"]
- ,[Str "\160\160\160\160or",Space,Str "not",Space,Str "to",Space,Str "be",Space,Str "an",Space,Str "entire",Space,Str "bee,"]
- ,[Str "\160\160\160\160\160\160\160\160when",Space,Str "half",Space,Str "the",Space,Str "bee",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "bee,"]
- ,[Str "\160\160\160\160\160\160\160\160\160\160\160\160due",Space,Str "to",Space,Str "some",Space,Str "ancient",Space,Str "injury?"]
- ,[]
- ,[Str "Continuation",Space,Str "line"]
- ,[Str "\160\160and",Space,Str "another"]]
-,Header 1 ("simple-tables",[],[]) [Str "Simple",Space,Str "Tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Headless"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 1 ("grid-tables",[],[]) [Str "Grid",Space,Str "Tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2375)
- ,(AlignDefault,ColWidth 0.15)
- ,(AlignDefault,ColWidth 0.1625)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "col",Space,Str "3"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Headless"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2375)
- ,(AlignDefault,ColWidth 0.15)
- ,(AlignDefault,ColWidth 0.1625)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Spaces",Space,Str "at",Space,Str "ends",Space,Str "of",Space,Str "lines"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2375)
- ,(AlignDefault,ColWidth 0.15)
- ,(AlignDefault,ColWidth 0.1625)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r1",Space,Str "a",SoftBreak,Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b",SoftBreak,Str "b",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "r2",Space,Str "d"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiple",Space,Str "blocks",Space,Str "in",Space,Str "a",Space,Str "cell"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.2375)
- ,(AlignDefault,ColWidth 0.15)
- ,(AlignDefault,ColWidth 0.1625)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Para [Str "r1",Space,Str "a"]
- ,Para [Str "r1",Space,Str "bis"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [BulletList
- [[Plain [Str "b"]]
- ,[Plain [Str "b",Space,Str "2"]]
- ,[Plain [Str "b",Space,Str "2"]]]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c",SoftBreak,Str "c",Space,Str "2",SoftBreak,Str "c",Space,Str "2"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Note [Para [Str "Note",Space,Str "with",Space,Str "one",Space,Str "line."]]]
-,Para [Note [Para [Str "Note",Space,Str "with",SoftBreak,Str "continuation",Space,Str "line."]]]
-,Para [Note [Para [Str "Note",Space,Str "with"],Para [Str "continuation",Space,Str "block."]]]
-,Para [Note [Para [Str "Note",Space,Str "with",SoftBreak,Str "continuation",Space,Str "line"],Para [Str "and",Space,Str "a",Space,Str "second",Space,Str "para."]]]
-,Para [Str "Not",Space,Str "in",Space,Str "note."]
-,Header 1 ("math",[],[]) [Str "Math"]
-,Para [Str "Some",Space,Str "inline",Space,Str "math",Space,Math InlineMath "E=mc^2",Str ".",Space,Str "Now",Space,Str "some",SoftBreak,Str "display",Space,Str "math:"]
-,Para [Math DisplayMath "E=mc^2"]
-,Para [Math DisplayMath "E = mc^2"]
-,Para [Math DisplayMath "E = mc^2",Math DisplayMath "\\alpha = \\beta"]
-,Para [Math DisplayMath "\\begin{aligned}\nE &= mc^2\\\\\nF &= \\pi E\n\\end{aligned}",Math DisplayMath "F &= \\gamma \\alpha^2"]
-,Para [Str "All",Space,Str "done."]
-,Header 1 ("default-role",[],[]) [Str "Default-Role"]
-,Para [Str "Try",Space,Str "changing",Space,Str "the",Space,Str "default",Space,Str "role",Space,Str "to",Space,Str "a",Space,Str "few",Space,Str "different",Space,Str "things."]
-,Header 2 ("doesnt-break-title-parsing",[],[]) [Str "Doesn\8217t",Space,Str "Break",Space,Str "Title",Space,Str "Parsing"]
-,Para [Str "Inline",Space,Str "math:",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Space,Str "or",Space,Math InlineMath "E=mc^2",Str ".",SoftBreak,Str "Other",Space,Str "roles:",Space,Superscript [Str "super"],Str ",",Space,Subscript [Str "sub"],Str "."]
-,Para [Math DisplayMath "\\alpha = beta",Math DisplayMath "E = mc^2"]
-,Para [Str "Some",Space,Superscript [Str "of"],Space,Str "these",Space,Superscript [Str "words"],Space,Str "are",Space,Str "in",Space,Superscript [Str "superscript"],Str "."]
-,Para [Str "Reset",Space,Str "default-role",Space,Str "to",Space,Str "the",Space,Str "default",Space,Str "default."]
-,Para [Str "And",Space,Str "now",Space,Span ("",["title-ref"],[]) [Str "some-invalid-string-3231231"],Space,Str "is",Space,Str "nonsense."]
-,Para [Str "And",Space,Str "now",Space,Str "with",Space,RawInline (Format "html") "<b>inline</b> <span id=\"test\">HTML</span>",Str "."]
-,Para [Str "And",Space,Str "some",Space,Str "inline",Space,Str "haskell",Space,Code ("",["haskell"],[]) "fmap id [1,2..10]",Str "."]
-,Para [Str "Indirect",Space,Str "python",Space,Str "role",Space,Code ("",["py","python","indirect"],[]) "[x*x for x in [1,2,3,4,5]]",Str "."]
-,Para [Str "Different",Space,Str "indirect",Space,Str "C",Space,Code ("",["c","different-indirect"],[]) "int x = 15;",Str "."]
-,Header 2 ("literal-symbols",[],[]) [Str "Literal",Space,Str "symbols"]
-,Para [Str "2*2",Space,Str "=",Space,Str "4*1"]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines [ Str "John" , Space , Str "MacFarlane" ]
+ , MetaInlines [ Str "Anonymous" ]
+ ]
+ )
+ , ( "date"
+ , MetaInlines
+ [ Str "July" , Space , Str "17," , Space , Str "2006" ]
+ )
+ , ( "revision" , MetaBlocks [ Para [ Str "3" ] ] )
+ , ( "subtitle" , MetaInlines [ Str "Subtitle" ] )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc" , Space , Str "Test" , Space , Str "Suite" ]
+ )
+ ]
+ }
+ [ Header
+ 1
+ ( "level-one-header" , [] , [] )
+ [ Str "Level" , Space , Str "one" , Space , Str "header" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ , Space
+ , Str "Most"
+ , Space
+ , Str "of"
+ , Space
+ , Str "them"
+ , Space
+ , Str "are"
+ , Space
+ , Str "adapted"
+ , Space
+ , Str "from"
+ , SoftBreak
+ , Str "John"
+ , Space
+ , Str "Gruber\8217s"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , Header
+ 2
+ ( "level-two-header" , [] , [] )
+ [ Str "Level" , Space , Str "two" , Space , Str "header" ]
+ , Header
+ 3 ( "level-three" , [] , [] ) [ Str "Level" , Space , Str "three" ]
+ , Header
+ 4
+ ( "level-four-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "four"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 5 ( "level-five" , [] , [] ) [ Str "Level" , Space , Str "five" ]
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , SoftBreak
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ , SoftBreak
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "looked"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , SoftBreak
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Para [ Str "Horizontal" , Space , Str "rule:" ]
+ , HorizontalRule
+ , Para [ Str "Another:" ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , SoftBreak
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "another,"
+ , Space
+ , Str "differently"
+ , Space
+ , Str "indented:"
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , SoftBreak
+ , Str "It\8217s"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "tab."
+ ]
+ , Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ , Para
+ [ Str "List"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "item" , Space , Str "one" ] ]
+ , [ Plain [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Para
+ [ Str "Nested" , Space , Str "block" , Space , Str "quotes:" ]
+ , BlockQuote
+ [ Para [ Str "nested" ] , BlockQuote [ Para [ Str "nested" ] ] ]
+ ]
+ , Header
+ 1 ( "code-blocks" , [] , [] ) [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}"
+ , CodeBlock
+ ( "" , [] , [] ) "this code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "this block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [ "python" ] , [] ) "def my_function(x):\n return x + 1"
+ , Para
+ [ Str "If"
+ , Space
+ , Str "we"
+ , Space
+ , Str "use"
+ , Space
+ , Str "the"
+ , Space
+ , Str "highlight"
+ , Space
+ , Str "directive,"
+ , Space
+ , Str "we"
+ , Space
+ , Str "can"
+ , Space
+ , Str "specify"
+ , Space
+ , Str "a"
+ , Space
+ , Str "default"
+ , Space
+ , Str "language"
+ , SoftBreak
+ , Str "for"
+ , Space
+ , Str "literate"
+ , Space
+ , Str "blocks."
+ ]
+ , CodeBlock
+ ( "" , [ "haskell" ] , [] )
+ "-- this code is in haskell\ndata Tree = Leaf | Node Tree Tree"
+ , CodeBlock
+ ( "" , [ "haskell" ] , [] )
+ "-- this code is in haskell too\ndata Nat = Zero | Succ Nat"
+ , CodeBlock
+ ( "" , [ "javascript" ] , [] )
+ "-- this code is in javascript\nlet f = (x, y) => x + y"
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Asterisks" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Plain [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Plus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Plain [ Str "Plus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Minus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Plain [ Str "Minus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Tight:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second" ] ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para [ Str "and:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "One" ] ]
+ , [ Plain [ Str "Two" ] ]
+ , [ Plain [ Str "Three" ] ]
+ ]
+ , Para [ Str "Loose" , Space , Str "using" , Space , Str "tabs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second" ] ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para [ Str "and" , Space , Str "using" , Space , Str "spaces:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "One" ] ]
+ , [ Plain [ Str "Two" ] ]
+ , [ Plain [ Str "Three" ] ]
+ ]
+ , Para [ Str "Multiple" , Space , Str "paragraphs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "graf"
+ , Space
+ , Str "one."
+ ]
+ , Para
+ [ Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "graf"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "dog\8217s"
+ , SoftBreak
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Para [ Str "Nested:" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ] , BulletList [ [ Plain [ Str "Tab" ] ] ] ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here\8217s" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BlockQuote
+ [ BulletList
+ [ [ Plain [ Str "Fee" ] ]
+ , [ Plain [ Str "Fie" ] ]
+ , [ Plain [ Str "Foe" ] ]
+ ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "fancy-list-markers" , [] , [] )
+ [ Str "Fancy" , Space , Str "list" , Space , Str "markers" ]
+ , OrderedList
+ ( 2 , Decimal , TwoParens )
+ [ [ Para [ Str "begins" , Space , Str "with" , Space , Str "2" ] ]
+ , [ Para [ Str "and" , Space , Str "now" , Space , Str "3" ]
+ , Para
+ [ Str "with" , Space , Str "a" , Space , Str "continuation" ]
+ , OrderedList
+ ( 4 , LowerRoman , Period )
+ [ [ Plain
+ [ Str "sublist"
+ , Space
+ , Str "with"
+ , Space
+ , Str "roman"
+ , Space
+ , Str "numerals,"
+ , Space
+ , Str "starting"
+ , Space
+ , Str "with"
+ , Space
+ , Str "4"
+ ]
+ ]
+ , [ Plain [ Str "more" , Space , Str "items" ]
+ , OrderedList
+ ( 1 , UpperAlpha , TwoParens )
+ [ [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ , [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Nesting:" ]
+ , OrderedList
+ ( 1 , UpperAlpha , Period )
+ [ [ Plain [ Str "Upper" , Space , Str "Alpha" ]
+ , OrderedList
+ ( 1 , UpperRoman , Period )
+ [ [ Plain [ Str "Upper" , Space , Str "Roman." ]
+ , OrderedList
+ ( 6 , Decimal , TwoParens )
+ [ [ Plain
+ [ Str "Decimal"
+ , Space
+ , Str "start"
+ , Space
+ , Str "with"
+ , Space
+ , Str "6"
+ ]
+ , OrderedList
+ ( 3 , LowerAlpha , OneParen )
+ [ [ Plain
+ [ Str "Lower"
+ , Space
+ , Str "alpha"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paren"
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Autonumbering:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Autonumber." ] ]
+ , [ Plain [ Str "More." ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim ) [ [ Plain [ Str "Nested." ] ] ]
+ ]
+ ]
+ , Para
+ [ Str "Autonumbering"
+ , Space
+ , Str "with"
+ , Space
+ , Str "explicit"
+ , Space
+ , Str "start:"
+ ]
+ , OrderedList
+ ( 4 , LowerAlpha , TwoParens )
+ [ [ Plain [ Str "item" , Space , Str "1" ] ]
+ , [ Plain [ Str "item" , Space , Str "2" ] ]
+ ]
+ , Header 2 ( "definition" , [] , [] ) [ Str "Definition" ]
+ , DefinitionList
+ [ ( [ Str "term" , Space , Str "1" ]
+ , [ [ Para [ Str "Definition" , Space , Str "1." ] ] ]
+ )
+ , ( [ Str "term" , Space , Str "2" ]
+ , [ [ Para
+ [ Str "Definition"
+ , Space
+ , Str "2,"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "1."
+ ]
+ , Para
+ [ Str "Definition"
+ , Space
+ , Str "2,"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "2."
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "term"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , [ [ Para [ Str "Definition" , Space , Str "3." ] ] ]
+ )
+ ]
+ , Header
+ 1 ( "field-lists" , [] , [] ) [ Str "Field" , Space , Str "Lists" ]
+ , BlockQuote
+ [ DefinitionList
+ [ ( [ Str "address" ]
+ , [ [ Para [ Str "61" , Space , Str "Main" , Space , Str "St." ] ]
+ ]
+ )
+ , ( [ Str "city" ]
+ , [ [ Para
+ [ Emph [ Str "Nowhere" ]
+ , Str ","
+ , Space
+ , Str "MA,"
+ , SoftBreak
+ , Str "USA"
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "phone" ] , [ [ Para [ Str "123-4567" ] ] ] )
+ ]
+ ]
+ , DefinitionList
+ [ ( [ Str "address" ]
+ , [ [ Para [ Str "61" , Space , Str "Main" , Space , Str "St." ] ]
+ ]
+ )
+ , ( [ Str "city" ]
+ , [ [ Para
+ [ Emph [ Str "Nowhere" ]
+ , Str ","
+ , Space
+ , Str "MA,"
+ , SoftBreak
+ , Str "USA"
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "phone" ] , [ [ Para [ Str "123-4567" ] ] ] )
+ ]
+ , Header
+ 1 ( "html-blocks" , [] , [] ) [ Str "HTML" , Space , Str "Blocks" ]
+ , Para
+ [ Str "Simple"
+ , Space
+ , Str "block"
+ , Space
+ , Str "on"
+ , Space
+ , Str "one"
+ , Space
+ , Str "line:"
+ ]
+ , RawBlock (Format "html") "<div>foo</div>"
+ , Para [ Str "Now," , Space , Str "nested:" ]
+ , RawBlock
+ (Format "html")
+ "<div>\n <div>\n <div>\n foo\n </div>\n </div>\n</div>"
+ , Header
+ 1 ( "latex-block" , [] , [] ) [ Str "LaTeX" , Space , Str "Block" ]
+ , RawBlock
+ (Format "latex")
+ "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str "."
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Subscript [ Str "subscripted" ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Superscript [ Str "superscripted" ]
+ , Str "."
+ ]
+ , Header
+ 1
+ ( "special-characters" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Plain [ Str "I" , Space , Str "hat:" , Space , Str "\206" ] ]
+ , [ Plain [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Plain [ Str "section:" , Space , Str "\167" ] ]
+ , [ Plain
+ [ Str "set" , Space , Str "membership:" , Space , Str "\8712" ]
+ ]
+ , [ Plain [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Para
+ [ Str "Explicit:"
+ , Space
+ , Str "a"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Explicit"
+ , Space
+ , Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "label:"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "foo" ] ( "foo" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Two"
+ , Space
+ , Str "anonymous"
+ , Space
+ , Str "links:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "the" , Space , Str "first" ]
+ ( "/url1/" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "the" , Space , Str "second" ]
+ ( "/url2/" , "" )
+ ]
+ , Para
+ [ Str "Reference"
+ , Space
+ , Str "links:"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "link1" ] ( "/url1/" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "link2" ] ( "/url2/" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "link1" ] ( "/url1/" , "" )
+ , Space
+ , Str "again."
+ ]
+ , Para
+ [ Str "Another"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "style"
+ , Space
+ , Str "of"
+ , Space
+ , Str "reference"
+ , Space
+ , Str "link"
+ ]
+ ( "/url1/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "amersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "AT&T" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Autolinks:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "nobody@nowhere.net" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ , Str "."
+ ]
+ , Para [ Str "But" , Space , Str "not" , Space , Str "here:" ]
+ , CodeBlock ( "" , [] , [] ) "http://example.com/"
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune"
+ ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para
+ [ Image ( "" , [] , [] ) [ Str "image" ] ( "lalune.jpg" , "" ) ]
+ , Para
+ [ Image
+ ( "" , [] , [ ( "height" , "2343px" ) ] )
+ [ Str "Voyage dans la Lune" ]
+ ( "lalune.jpg" , "" )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , Space
+ , Image ( "" , [] , [] ) [ Str "movie" ] ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Image ( "" , [] , [] ) [ Str "A movie" ] ( "movie.jpg" , "" ) ]
+ ( "/url" , "" )
+ , Str "."
+ ]
+ , Header 1 ( "comments" , [] , [] ) [ Str "Comments" ]
+ , Para [ Str "First" , Space , Str "paragraph" ]
+ , Para [ Str "Another" , Space , Str "paragraph" ]
+ , Para [ Str "A" , Space , Str "third" , Space , Str "paragraph" ]
+ , Header
+ 1 ( "line-blocks" , [] , [] ) [ Str "Line" , Space , Str "blocks" ]
+ , LineBlock
+ [ [ Str "But"
+ , Space
+ , Str "can"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bee"
+ , Space
+ , Str "be"
+ , Space
+ , Str "said"
+ , Space
+ , Str "to"
+ , Space
+ , Str "be"
+ ]
+ , [ Str "\160\160\160\160or"
+ , Space
+ , Str "not"
+ , Space
+ , Str "to"
+ , Space
+ , Str "be"
+ , Space
+ , Str "an"
+ , Space
+ , Str "entire"
+ , Space
+ , Str "bee,"
+ ]
+ , [ Str "\160\160\160\160\160\160\160\160when"
+ , Space
+ , Str "half"
+ , Space
+ , Str "the"
+ , Space
+ , Str "bee"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bee,"
+ ]
+ , [ Str "\160\160\160\160\160\160\160\160\160\160\160\160due"
+ , Space
+ , Str "to"
+ , Space
+ , Str "some"
+ , Space
+ , Str "ancient"
+ , Space
+ , Str "injury?"
+ ]
+ , []
+ , [ Str "Continuation" , Space , Str "line" ]
+ , [ Str "\160\160and" , Space , Str "another" ]
+ ]
+ , Header
+ 1
+ ( "simple-tables" , [] , [] )
+ [ Str "Simple" , Space , Str "Tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "3" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r1" , Space , Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para [ Str "Headless" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r1" , Space , Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 1 ( "grid-tables" , [] , [] ) [ Str "Grid" , Space , Str "Tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2375 )
+ , ( AlignDefault , ColWidth 0.15 )
+ , ( AlignDefault , ColWidth 0.1625 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "col" , Space , Str "3" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" , SoftBreak , Str "b" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" , SoftBreak , Str "c" , Space , Str "2" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para [ Str "Headless" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2375 )
+ , ( AlignDefault , ColWidth 0.15 )
+ , ( AlignDefault , ColWidth 0.1625 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" , SoftBreak , Str "b" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" , SoftBreak , Str "c" , Space , Str "2" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Spaces"
+ , Space
+ , Str "at"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "of"
+ , Space
+ , Str "lines"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2375 )
+ , ( AlignDefault , ColWidth 0.15 )
+ , ( AlignDefault , ColWidth 0.1625 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "r1"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "r1"
+ , Space
+ , Str "bis"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" , SoftBreak , Str "b" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" , SoftBreak , Str "c" , Space , Str "2" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "r2" , Space , Str "d" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "cell"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.2375 )
+ , ( AlignDefault , ColWidth 0.15 )
+ , ( AlignDefault , ColWidth 0.1625 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "r1" , Space , Str "a" ]
+ , Para [ Str "r1" , Space , Str "bis" ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ BulletList
+ [ [ Plain [ Str "b" ] ]
+ , [ Plain [ Str "b" , Space , Str "2" ] ]
+ , [ Plain [ Str "b" , Space , Str "2" ] ]
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "c"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ , SoftBreak
+ , Str "c"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Note
+ [ Para
+ [ Str "Note"
+ , Space
+ , Str "with"
+ , Space
+ , Str "one"
+ , Space
+ , Str "line."
+ ]
+ ]
+ ]
+ , Para
+ [ Note
+ [ Para
+ [ Str "Note"
+ , Space
+ , Str "with"
+ , SoftBreak
+ , Str "continuation"
+ , Space
+ , Str "line."
+ ]
+ ]
+ ]
+ , Para
+ [ Note
+ [ Para [ Str "Note" , Space , Str "with" ]
+ , Para [ Str "continuation" , Space , Str "block." ]
+ ]
+ ]
+ , Para
+ [ Note
+ [ Para
+ [ Str "Note"
+ , Space
+ , Str "with"
+ , SoftBreak
+ , Str "continuation"
+ , Space
+ , Str "line"
+ ]
+ , Para
+ [ Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Str "second"
+ , Space
+ , Str "para."
+ ]
+ ]
+ ]
+ , Para [ Str "Not" , Space , Str "in" , Space , Str "note." ]
+ , Header 1 ( "math" , [] , [] ) [ Str "Math" ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "inline"
+ , Space
+ , Str "math"
+ , Space
+ , Math InlineMath "E=mc^2"
+ , Str "."
+ , Space
+ , Str "Now"
+ , Space
+ , Str "some"
+ , SoftBreak
+ , Str "display"
+ , Space
+ , Str "math:"
+ ]
+ , Para [ Math DisplayMath "E=mc^2" ]
+ , Para [ Math DisplayMath "E = mc^2" ]
+ , Para
+ [ Math DisplayMath "E = mc^2"
+ , Math DisplayMath "\\alpha = \\beta"
+ ]
+ , Para
+ [ Math
+ DisplayMath
+ "\\begin{aligned}\nE &= mc^2\\\\\nF &= \\pi E\n\\end{aligned}"
+ , Math DisplayMath "F &= \\gamma \\alpha^2"
+ ]
+ , Para [ Str "All" , Space , Str "done." ]
+ , Header 1 ( "default-role" , [] , [] ) [ Str "Default-Role" ]
+ , Para
+ [ Str "Try"
+ , Space
+ , Str "changing"
+ , Space
+ , Str "the"
+ , Space
+ , Str "default"
+ , Space
+ , Str "role"
+ , Space
+ , Str "to"
+ , Space
+ , Str "a"
+ , Space
+ , Str "few"
+ , Space
+ , Str "different"
+ , Space
+ , Str "things."
+ ]
+ , Header
+ 2
+ ( "doesnt-break-title-parsing" , [] , [] )
+ [ Str "Doesn\8217t"
+ , Space
+ , Str "Break"
+ , Space
+ , Str "Title"
+ , Space
+ , Str "Parsing"
+ ]
+ , Para
+ [ Str "Inline"
+ , Space
+ , Str "math:"
+ , Space
+ , Math InlineMath "E=mc^2"
+ , Space
+ , Str "or"
+ , Space
+ , Math InlineMath "E=mc^2"
+ , Space
+ , Str "or"
+ , Space
+ , Math InlineMath "E=mc^2"
+ , Str "."
+ , SoftBreak
+ , Str "Other"
+ , Space
+ , Str "roles:"
+ , Space
+ , Superscript [ Str "super" ]
+ , Str ","
+ , Space
+ , Subscript [ Str "sub" ]
+ , Str "."
+ ]
+ , Para
+ [ Math DisplayMath "\\alpha = beta" , Math DisplayMath "E = mc^2" ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Superscript [ Str "of" ]
+ , Space
+ , Str "these"
+ , Space
+ , Superscript [ Str "words" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "in"
+ , Space
+ , Superscript [ Str "superscript" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Reset"
+ , Space
+ , Str "default-role"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , Space
+ , Str "default"
+ , Space
+ , Str "default."
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "now"
+ , Space
+ , Span
+ ( "" , [ "title-ref" ] , [] ) [ Str "some-invalid-string-3231231" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "nonsense."
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "now"
+ , Space
+ , Str "with"
+ , Space
+ , RawInline
+ (Format "html") "<b>inline</b> <span id=\"test\">HTML</span>"
+ , Str "."
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "some"
+ , Space
+ , Str "inline"
+ , Space
+ , Str "haskell"
+ , Space
+ , Code ( "" , [ "haskell" ] , [] ) "fmap id [1,2..10]"
+ , Str "."
+ ]
+ , Para
+ [ Str "Indirect"
+ , Space
+ , Str "python"
+ , Space
+ , Str "role"
+ , Space
+ , Code
+ ( "" , [ "py" , "python" , "indirect" ] , [] )
+ "[x*x for x in [1,2,3,4,5]]"
+ , Str "."
+ ]
+ , Para
+ [ Str "Different"
+ , Space
+ , Str "indirect"
+ , Space
+ , Str "C"
+ , Space
+ , Code ( "" , [ "c" , "different-indirect" ] , [] ) "int x = 15;"
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "literal-symbols" , [] , [] )
+ [ Str "Literal" , Space , Str "symbols" ]
+ , Para [ Str "2*2" , Space , Str "=" , Space , Str "4*1" ]
+ ]
diff --git a/test/rtf/accent.native b/test/rtf/accent.native
new file mode 100644
index 000000000..115620aff
--- /dev/null
+++ b/test/rtf/accent.native
@@ -0,0 +1,18 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para
+ [ Str "le"
+ , Space
+ , Str "caf\233"
+ , Space
+ , Str "o\249"
+ , Space
+ , Str "on"
+ , Space
+ , Str "ne"
+ , Space
+ , Str "fume"
+ , Space
+ , Str "pas"
+ ]
+ ]
diff --git a/test/rtf/accent.rtf b/test/rtf/accent.rtf
new file mode 100644
index 000000000..8438d46eb
--- /dev/null
+++ b/test/rtf/accent.rtf
@@ -0,0 +1,3 @@
+{\rtf1\ansi
+{ le caf\'e9 o\'f9 on ne fume pas }
+}
diff --git a/test/rtf/bookmark.native b/test/rtf/bookmark.native
new file mode 100644
index 000000000..8f6df567c
--- /dev/null
+++ b/test/rtf/bookmark.native
@@ -0,0 +1,11 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para
+ [ Span ( "bookmark_1" , [] , [] ) [ Str "Bookmark_1" ] ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "click" , Space , Str "me" ]
+ ( "#bookmark_1" , "" )
+ ]
+ ]
diff --git a/test/rtf/bookmark.rtf b/test/rtf/bookmark.rtf
new file mode 100644
index 000000000..6e37ee71a
--- /dev/null
+++ b/test/rtf/bookmark.rtf
@@ -0,0 +1,8 @@
+{\rtf1\ansi
+\pard
+{\*\bkmkstart bookmark_1}Bookmark_1{\*\bkmkend bookmark_1}
+\par
+\pard
+{\field{\*\fldinst { HYPERLINK \\l "bookmark_1" }}{\fldrslt{click me}}}
+\par
+}
diff --git a/test/rtf/footnote.native b/test/rtf/footnote.native
new file mode 100644
index 000000000..70f8453a9
--- /dev/null
+++ b/test/rtf/footnote.native
@@ -0,0 +1,130 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para
+ [ Str "Mead's"
+ , Space
+ , Str "landmark"
+ , Space
+ , Str "study"
+ , Space
+ , Str "has"
+ , Space
+ , Str "been"
+ , Space
+ , Str "amply"
+ , Space
+ , Str "annotated."
+ , Note
+ [ Para
+ [ Str "See"
+ , Space
+ , Str "Sahlins,"
+ , Space
+ , Str "Bateson,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Geertz"
+ , Space
+ , Str "for"
+ , Space
+ , Str "a"
+ , Space
+ , Str "complete"
+ , Space
+ , Str "bibliography."
+ ]
+ ]
+ , Space
+ , Str "It"
+ , Space
+ , Str "was"
+ , Space
+ , Str "her"
+ , Space
+ , Str "work"
+ , Space
+ , Str "in"
+ , Space
+ , Str "America"
+ , Space
+ , Str "during"
+ , Space
+ , Str "the"
+ , Space
+ , Str "Second"
+ , Space
+ , Str "World"
+ , Space
+ , Str "War,"
+ , Space
+ , Str "however,"
+ , Space
+ , Str "that"
+ , Space
+ , Str "forms"
+ , Space
+ , Str "the"
+ , Space
+ , Str "basis"
+ , Space
+ , Str "for"
+ , Space
+ , Str "the"
+ , Space
+ , Str "paper."
+ , Space
+ , Str "As"
+ , Space
+ , Str "others"
+ , Space
+ , Str "have"
+ , Space
+ , Str "noted,"
+ , Note
+ [ Para
+ [ Str "A"
+ , Space
+ , Str "complete"
+ , Space
+ , Str "bibliography"
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "found"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "this"
+ , Space
+ , Str "chapter."
+ ]
+ ]
+ , Space
+ , Str "this"
+ , Space
+ , Str "period"
+ , Space
+ , Str "was"
+ , Space
+ , Str "a"
+ , Space
+ , Str "turning"
+ , Space
+ , Str "point"
+ , Space
+ , Str "for"
+ , Space
+ , Str "Margaret"
+ , Space
+ , Str "Mead."
+ ]
+ ]
diff --git a/test/rtf/footnote.rtf b/test/rtf/footnote.rtf
new file mode 100644
index 000000000..afc119eff
--- /dev/null
+++ b/test/rtf/footnote.rtf
@@ -0,0 +1,11 @@
+{\rtf1\ansi
+\ftnbj\ftnrestart \sectd \linemod0\linex0\endnhere \pard\plain
+\ri1170 \fs20 {\pu6 Mead's landmark study has been amply annotated.\chftn
+{\footnote \pard\plain \s246 \fs20 {\up6\chftn }
+See Sahlins, Bateson, and Geertz for a complete bibliography.} It was
+her work in America during the Second World War, however, that forms
+the basis for the paper. As others have noted,\chftn
+{\footnote \pard\plain \s246 \fs20 {\up6\chftn}
+A complete bibliography will be found at the end of this chapter.}
+this period was a turning point for Margaret Mead.}
+\par}
diff --git a/test/rtf/formatting.native b/test/rtf/formatting.native
new file mode 100644
index 000000000..7035ccb91
--- /dev/null
+++ b/test/rtf/formatting.native
@@ -0,0 +1,45 @@
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "operator"
+ , MetaInlines [ Str "John" , Space , Str "MacFarlane" ]
+ )
+ ]
+ }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "test"
+ , Space
+ , Str "of"
+ , Space
+ , Str "FORMATTING."
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "hidden:"
+ , Space
+ , Str "."
+ ]
+ , Para [ SmallCaps [ Str "Small" , Space , Str "Caps" ] ]
+ , Para [ Strong [ Str "bold" ] ]
+ , Para [ Emph [ Str "italics" ] ]
+ , Para
+ [ Strong
+ [ Str "bold"
+ , Space
+ , Emph [ Str "and" , Space , Str "italics" ]
+ ]
+ ]
+ , Para [ Underline [ Str "underlined" ] ]
+ , Para [ Strikeout [ Str "strikeout" ] ]
+ , Para [ Str "x" , Superscript [ Str "superscript" ] ]
+ , Para [ Str "x" , Subscript [ Str "subscript" ] ]
+ ]
diff --git a/test/rtf/formatting.rtf b/test/rtf/formatting.rtf
new file mode 100644
index 000000000..8e7b597eb
--- /dev/null
+++ b/test/rtf/formatting.rtf
@@ -0,0 +1,201 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f4\fbidi \fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Helvetica;}
+{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}
+{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1068\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f1069\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f1071\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f1072\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f1073\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\f1074\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f1075\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f1076\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f1108\fbidi \fnil\fcharset238\fprq2 Helvetica CE;}
+{\f1109\fbidi \fnil\fcharset204\fprq2 Helvetica Cyr;}{\f1111\fbidi \fnil\fcharset161\fprq2 Helvetica Greek;}{\f1112\fbidi \fnil\fcharset162\fprq2 Helvetica Tur;}{\f1115\fbidi \fnil\fcharset186\fprq2 Helvetica Baltic;}
+{\f1116\fbidi \fnil\fcharset163\fprq2 Helvetica (Vietnamese);}{\f1408\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f1409\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f1411\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}
+{\f1412\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f1415\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f1416\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}
+{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}
+{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}
+{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}
+{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
+{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;}{\*\defchp \fs24\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive \ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033
+\snext11 \ssemihidden \sunhideused Normal Table;}}{\*\rsidtbl \rsid2168431\rsid14113975}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator John MacFarlane}
+{\creatim\yr2021\mo8\dy4\hr17\min1}{\revtim\yr2021\mo8\dy4\hr17\min2}{\version2}{\edmins1}{\nofpages1}{\nofwords21}{\nofchars120}{\nofcharsws140}{\vern6543}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}
+\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120\dghorigin1701
+\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot2168431 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2
+\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe1033\loch\af31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 This is a test of }{\rtlch\fcs1 \af4 \ltrch\fcs0
+\caps\f4\insrsid14113975\charrsid2168431 \hich\af4\dbch\af31505\loch\f4 formatting}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975 .}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid2168431 \hich\af4\dbch\af31505\loch\f4 This is hidden: }{\rtlch\fcs1 \af4
+\ltrch\fcs0 \v\f4\insrsid2168431\charrsid2168431 \hich\af4\dbch\af31505\loch\f4 secret}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid2168431 .}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975
+\par }{\rtlch\fcs1 \af4 \ltrch\fcs0 \scaps\f4\insrsid14113975\charrsid2168431 \hich\af4\dbch\af31505\loch\f4 Small Caps
+\par }{\rtlch\fcs1 \ab\af4 \ltrch\fcs0 \b\f4\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 bold}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975
+\par }{\rtlch\fcs1 \ai\af4 \ltrch\fcs0 \i\f4\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 italics}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975
+\par }{\rtlch\fcs1 \ab\af4 \ltrch\fcs0 \b\f4\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 bold }{\rtlch\fcs1 \ab\ai\af4 \ltrch\fcs0 \b\i\f4\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 and italics}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975
+\par }{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\ul\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 underlined}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975
+\par }{\rtlch\fcs1 \af4 \ltrch\fcs0 \strike\f4\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 strikeout
+\par }{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 x}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\super\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 superscript}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975
+\par \hich\af4\dbch\af31505\loch\f4 x}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\sub\insrsid14113975 \hich\af4\dbch\af31505\loch\f4 subscript}{\rtlch\fcs1 \af4 \ltrch\fcs0 \f4\insrsid14113975
+\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100b6f4679893070000c9200000160000007468656d652f7468656d652f
+7468656d65312e786d6cec59cd8b1bc915bf07f23f347d97f5d5ad8fc1f2a24fcfda33b6b164873dd648a5eef2547789aad28cc56208de532e81c026e49085bd
+ed21842cecc22eb9e48f31d8249b3f22afaa5bdd5552c99e191c3061463074977eefd5afde7bf5de53d5ddcf5e26d4bbc05c1096f6fcfa9d9aefe174ce16248d
+7afeb3d9a4d2f13d2151ba4094a5b8e76fb0f03fbbf7eb5fdd454732c609f6403e1547a8e7c752ae8eaa5531876124eeb0154ee1bb25e30992f0caa3ea82a34b
+d09bd06aa3566b55134452df4b51026a1f2f97648ebd9952e9dfdb2a1f53784da5500373caa74a35b6243476715e5708b11143cabd0b447b3eccb3609733fc52
+fa1e4542c2173dbfa6fffceabdbb5574940b517940d6909be8bf5c2e17589c37f49c3c3a2b260d823068f50bfd1a40e53e6edc1eb7c6ad429f06a0f91c569a71
+b175b61bc320c71aa0ecd1a17bd41e35eb16ded0dfdce3dc0fd5c7c26b50a63fd8c34f2643b0a285d7a00c1feee1c3417730b2f56b50866fede1dbb5fe28685b
+fa3528a6243ddf43d7c25673b85d6d0159327aec8477c360d26ee4ca4b144443115d6a8a254be5a1584bd00bc6270050408a24493db959e1259a43140f112567
+9c7827248a21f056286502866b8ddaa4d684ffea13e827ed5174849121ad780113b137a4f87862cec94af6fc07a0d537206f7ffef9cdeb1fdfbcfee9cd575fbd
+79fdf77c6eadca923b466964cafdf2dd1ffef3cd6fbd7ffff0ed2f5fff319b7a172f4cfcbbbffdeedd3ffef93ef5b0e2d2146ffff4fdbb1fbf7ffbe7dfffebaf
+5f3bb4f7393a33e1339260e13dc297de5396c0021dfcf119bf9ec42c46c494e8a791402952b338f48f656ca11f6d10450edc00db767cce21d5b880f7d72f2cc2
+d398af2571687c182716f094313a60dc6985876a2ec3ccb3751ab927e76b13f714a10bd7dc43945a5e1eaf579063894be530c616cd2714a5124538c5d253dfb1
+738c1dabfb8210cbaea764ce99604be97d41bc01224e93ccc899154da5d03149c02f1b1741f0b7659bd3e7de8051d7aa47f8c246c2de40d4417e86a965c6fb68
+2d51e252394309350d7e8264ec2239ddf0b9891b0b099e8e3065de78818570c93ce6b05ec3e90f21cdb8dd7e4a37898de4929cbb749e20c64ce4889d0f6394ac
+5cd829496313fbb938871045de13265df05366ef10f50e7e40e941773f27d872f787b3c133c8b026a53240d4376beef0e57dccacf89d6ee8126157aae9f3c44a
+b17d4e9cd131584756689f604cd1255a60ec3dfbdcc160c05696cd4bd20f62c82ac7d815580f901dabea3dc5027a25d5dcece7c91322ac909de2881de073bad9
+493c1b9426881fd2fc08bc6eda7c0ca52e7105c0633a3f37818f08f480102f4ea33c16a0c308ee835a9fc4c82a60ea5db8e375c32dff5d658fc1be7c61d1b8c2
+be04197c6d1948eca6cc7b6d3343d49aa00c9819822ec3956e41c4727f29a28aab165b3be596f6a62ddd00dd91d5f42424fd6007b4d3fb84ffbbde073a8cb77f
+f9c6b10f3e4ebfe3566c25ab6b763a8792c9f14e7f7308b7dbd50c195f904fbfa919a175fa04431dd9cf58b73dcd6d4fe3ffdff73487f6f36d2773a8dfb8ed64
+7ce8306e3b99fc70e5e3743265f3027d8d3af0c80e7af4b14f72f0d46749289dca0dc527421ffc08f83db398c0a092d3279eb838055cc5f0a8ca1c4c60e1228e
+b48cc799fc0d91f134462b381daafb4a492472d591f0564cc0a1911e76ea5678ba4e4ed9223becacd7d5c16656590592e5782d2cc6e1a04a66e856bb3cc02bd4
+6bb6913e68dd1250b2d721614c6693683a48b4b783ca48fa58178ce620a157f65158741d2c3a4afdd6557b2c805ae115f8c1edc1cff49e1f06200242701e07cd
+f942f92973f5d6bbda991fd3d3878c69450034d8db08283ddd555c0f2e4fad2e0bb52b78da2261849b4d425b46377822869fc17974aad1abd0b8aeafbba54b2d
+7aca147a3e08ad9246bbf33e1637f535c8ede6069a9a9982a6de65cf6f35430899395af5fc251c1ac363b282d811ea3717a211dcbccc25cf36fc4d32cb8a0b39
+4222ce0cae934e960d122231f728497abe5a7ee1069aea1ca2b9d51b90103e59725d482b9f1a3970baed64bc5ce2b934dd6e8c284b67af90e1b35ce1fc568bdf
+1cac24d91adc3d8d1797de195df3a708422c6cd795011744c0dd413db3e682c0655891c8caf8db294c79da356fa3740c65e388ae62945714339967709dca0b3a
+faadb081f196af190c6a98242f8467912ab0a651ad6a5a548d8cc3c1aafb6121653923699635d3ca2aaa6abab39835c3b60cecd8f26645de60b53531e434b3c2
+67a97b37e576b7b96ea74f28aa0418bcb09fa3ea5ea12018d4cac92c6a8af17e1a56393b1fb56bc776811fa07695226164fdd656ed8edd8a1ae19c0e066f54f9
+416e376a6168b9ed2bb5a5f5adb979b1cdce5e40f2184197bba6526857c2c92e47d0104d754f92a50dd8222f65be35e0c95b73d2f3bfac85fd60d80887955a27
+1c57826650ab74c27eb3d20fc3667d1cd66ba341e31514161927f530bbb19fc00506dde4f7f67a7cefee3ed9ded1dc99b3a4caf4dd7c5513d777f7f5c6e1bb7b
+8f40d2f9b2d598749bdd41abd26df627956034e854bac3d6a0326a0ddba3c9681876ba9357be77a1c141bf390c5ae34ea5551f0e2b41aba6e877ba9576d068f4
+8376bf330efaaff23606569ea58fdc16605ecdebde7f010000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d65
+2f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d36
+3f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e
+3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d985
+0528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000000000
+0000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000
+000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019020000
+7468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d0014000600080000002100b6f4679893070000c92000001600000000000000
+000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027000000
+000000000000000000009d0a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000980b00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;
+\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Table;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Elegant;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Professional;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text;
+\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;
+\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;
+\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision;
+\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;
+\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1;
+\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
+\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;
+\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;
+\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
+\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;
+\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;
+\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
+\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;
+\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
+\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4;
+\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2;
+\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4;
+\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4;
+\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6;
+\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3;
+\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4;
+\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4;
+\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore }} \ No newline at end of file
diff --git a/test/rtf/heading.native b/test/rtf/heading.native
new file mode 100644
index 000000000..5a076424b
--- /dev/null
+++ b/test/rtf/heading.native
@@ -0,0 +1,10 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header
+ 1 ( "" , [] , [] ) [ Str "Heading" , Space , Str "1" ]
+ , Header
+ 2 ( "" , [] , [] ) [ Str "Heading" , Space , Str "2" ]
+ , Header
+ 3 ( "" , [] , [] ) [ Str "Heading" , Space , Str "3" ]
+ , Para [ Str "Paragraph" ]
+ ]
diff --git a/test/rtf/heading.rtf b/test/rtf/heading.rtf
new file mode 100644
index 000000000..5ed4fc229
--- /dev/null
+++ b/test/rtf/heading.rtf
@@ -0,0 +1,223 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff31507\deff0\stshfdbch31506\stshfloch31506\stshfhich31506\stshfbi31507\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}
+{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\f38\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}
+{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}
+{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f44\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f45\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\f47\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f48\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f49\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f50\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\f51\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f52\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f384\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f385\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}
+{\f387\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f388\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f391\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f392\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}
+{\f414\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f415\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\f417\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f418\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
+{\f419\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\f420\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\f421\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\f422\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
+{\f424\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\f425\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}{\f427\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\f428\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}
+{\f429\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\f430\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\f431\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\f432\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}
+{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}
+{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}
+{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}
+{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
+{\fhiminor\f31573\fbidi \fswiss\fcharset177\fprq2 Calibri (Hebrew);}{\fhiminor\f31574\fbidi \fswiss\fcharset178\fprq2 Calibri (Arabic);}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}
+{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;\caccentone\ctint255\cshade191\red47\green84\blue150;
+\caccentone\ctint255\cshade127\red31\green55\blue99;}{\*\defchp \f31506\fs22 }{\*\defpap \ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\sa160\sl259\slmult1
+\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{
+\s1\ql \li0\ri0\sb240\sl259\slmult1\keep\keepn\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31503\afs32\alang1025 \ltrch\fcs0
+\fs32\cf19\lang1033\langfe1033\loch\f31502\hich\af31502\dbch\af31501\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \slink15 \sqformat \spriority9 \styrsid2496039 heading 1;}{\s2\ql \li0\ri0\sb40\sl259\slmult1
+\keep\keepn\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31503\afs26\alang1025 \ltrch\fcs0\b\fs26\cf19\lang1033\langfe1033\loch\f31502\hich\af31502\dbch\af31501\cgrid\langnp1033\langfenp1033
+\sbasedon0 \snext0 \slink16 \sunhideused \sqformat \spriority9 \styrsid2496039 heading 2;}{\s3\ql \li0\ri0\sb40\sl259\slmult1\keep\keepn\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0 \rtlch\fcs1
+\af31503\afs24\alang1025 \ltrch\fcs0 \fs24\cf20\lang1033\langfe1033\loch\f31502\hich\af31502\dbch\af31501\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 \slink17 \sunhideused \sqformat \spriority9 \styrsid2496039 heading 3;}{\*\cs10 \additive
+\ssemihidden \sunhideused \spriority1 Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext11 \ssemihidden \sunhideused
+Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \af31503\afs32 \ltrch\fcs0 \fs32\cf19\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink1 \slocked \spriority9 \styrsid2496039 Heading 1 Char;}{\*\cs16 \additive \rtlch\fcs1 \af31503\afs26 \ltrch\fcs0
+\fs26\cf19\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink2 \slocked \spriority9 \styrsid2496039 Heading 2 Char;}{\*\cs17 \additive \rtlch\fcs1 \af31503\afs24 \ltrch\fcs0 \fs24\cf20\loch\f31502\hich\af31502\dbch\af31501
+\sbasedon10 \slink3 \slocked \spriority9 \styrsid2496039 Heading 3 Char;}}{\*\rsidtbl \rsid1718450\rsid2496039\rsid2631807\rsid4616182\rsid10489260}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1
+\mwrapIndent1440\mintLim0\mnaryLim1}
+{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont1\relyonvml0\donotembedlingdata0\grfdocevents0\validatexml1\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors1\noxlattoyen
+\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1440\dgvorigin1440\dghshow1\dgvshow1
+\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
+\asianbrkrule\rsidroot2496039\newtblstyruls\nogrowautofit\usenormstyforlist\noindnmbrts\felnbrelev\nocxsptable\indrlsweleven\noafcnsttbl\afelev\utinl\hwelev\spltpgpar\notcvasp\notbrkcnstfrctbl\notvatxbx\krnprsnet\cachedcolbal \nouicompat \fet0
+{\*\wgrffmtfilter 2450}\nofeaturethrottle1\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang
+{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang
+{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
+\pard\plain \ltrpar\s1\ql \li0\ri0\sb240\sl259\slmult1\keep\keepn\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel0\adjustright\rin0\lin0\itap0\pararsid2496039 \rtlch\fcs1 \af31503\afs32\alang1025 \ltrch\fcs0
+\fs32\cf19\lang1033\langfe1033\loch\af31502\hich\af31502\dbch\af31501\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af31503 \ltrch\fcs0 \insrsid2496039 \hich\af31502\dbch\af31501\loch\f31502 H\hich\af31502\dbch\af31501\loch\f31502 eading 1}{\rtlch\fcs1
+\af31503 \ltrch\fcs0 \insrsid2631807
+\par }\pard\plain \ltrpar\s2\ql \li0\ri0\sb40\sl259\slmult1\keep\keepn\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel1\adjustright\rin0\lin0\itap0\pararsid2496039 \rtlch\fcs1 \af31503\afs26\alang1025 \ltrch\fcs0
+\fs26\cf19\lang1033\langfe1033\loch\af31502\hich\af31502\dbch\af31501\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af31503 \ltrch\fcs0 \insrsid2496039 \hich\af31502\dbch\af31501\loch\f31502 H\hich\af31502\dbch\af31501\loch\f31502 eading }{\rtlch\fcs1
+\af31503 \ltrch\fcs0 \insrsid2496039 \hich\af31502\dbch\af31501\loch\f31502 2}{\rtlch\fcs1 \af31503 \ltrch\fcs0 \insrsid2496039
+\par }\pard\plain \ltrpar\s3\ql \li0\ri0\sb40\sl259\slmult1\keep\keepn\widctlpar\wrapdefault\aspalpha\aspnum\faauto\outlinelevel2\adjustright\rin0\lin0\itap0\pararsid2496039 \rtlch\fcs1 \af31503\afs24\alang1025 \ltrch\fcs0
+\fs24\cf20\lang1033\langfe1033\loch\af31502\hich\af31502\dbch\af31501\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af31503 \ltrch\fcs0 \insrsid2496039 \hich\af31502\dbch\af31501\loch\f31502 H\hich\af31502\dbch\af31501\loch\f31502 eading }{\rtlch\fcs1
+\af31503 \ltrch\fcs0 \insrsid2496039 \hich\af31502\dbch\af31501\loch\f31502 3}{\rtlch\fcs1 \af31503 \ltrch\fcs0 \insrsid2496039
+\par }\pard\plain \ltrpar\ql \li0\ri0\sa160\sl259\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0 \f31506\fs22\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1
+\af31507 \ltrch\fcs0 \insrsid2496039 Paragraph
+\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100d3130843c40600008b1a0000160000007468656d652f7468656d652f
+7468656d65312e786d6cec595d8bdb46147d2ff43f08bd3bfe92fcb1c41b6cd9ceb6d94d42eca4e4716c8fadc98e344633de8d0981923c160aa569e943037deb
+43691b48a02fe9afd936a54d217fa17746b63c638fbb9b2585a5640d8b343af7ce997bafce1d4997afdc8fa87384134e58dc708b970aae83e3211b9178d2706f
+f7bbb99aeb7081e211a22cc60d778eb97b65f7c30f2ea31d11e2083b601ff31dd4704321a63bf93c1fc230e297d814c7706dcc920809384d26f951828ec16f44
+f3a542a1928f10895d274611b8bd311e932176fad2a5bbbb74dea1701a0b2e078634e949d7d8b050d8d1615122f89c0734718e106db830cf881df7f17de13a14
+7101171a6e41fdb9f9ddcb79b4b330a2628bad66d7557f0bbb85c1e8b0a4e64c26836c52cff3bd4a33f3af00546ce23ad54ea553c9fc29001a0e61a52917d367
+b514780bac064a0f2dbedbd576b968e035ffe50dce4d5ffe0cbc02a5febd0d7cb71b40140dbc02a5787f03efb7eaadb6e95f81527c65035f2d34db5ed5f0af40
+2125f1e106bae057cac172b51964cce89e155ef7bd6eb5b470be42413564d525a718b3586cabb508dd6349170012489120b123e6533c4643a8e20051324888b3
+4f262114de14c58cc370a154e816caf05ffe3c75a4328a7630d2ac252f60c23786241f870f1332150df763f0ea6a90372f7f7cf3f2b973f2e8c5c9a35f4e1e3f
+3e79f473eac8b0da43f144b77afdfd177f3ffdd4f9ebf977af9f7c65c7731dfffb4f9ffdf6eb977620ac741582575f3ffbe3c5b357df7cfee70f4f2cf0668206
+3abc4f22cc9debf8d8b9c52258980a81c91c0f92b7b3e88788e816cd78c2518ce42c16ff1d111ae8eb73449105d7c26604ef24203136e0d5d93d83702f4c6682
+583c5e0b230378c0186db1c41a856b722e2dccfd593cb14f9ecc74dc2d848e6c73072836f2db994d415b89cd65106283e64d8a62812638c6c291d7d821c696d5
+dd25c488eb0119268cb3b170ee12a7858835247d3230aa6965b44722c8cbdc4610f26dc4e6e08ed362d4b6ea363e32917057206a21dfc7d408e355341328b2b9
+eca388ea01df4722b491eccd93a18eeb7001999e60ca9cce08736eb3b991c07ab5a45f0379b1a7fd80ce231399087268f3b98f18d3916d761884289adab03d12
+873af6237e08258a9c9b4cd8e007ccbc43e439e401c55bd37d876023dda7abc16d50569dd2aa40e4955962c9e555cc8cfaedcde91861253520fc869e47243e55
+dcd764ddff6f651d84f4d5b74f2dabbaa882de4c88f58eda5b93f16db875f10e583222175fbbdb6816dfc470bb6c36b0f7d2fd5ebaddffbd746fbb9fdfbd60af
+341ae45b6e15d3adbadab8475bf7ed6342694fcc29dee76aebcea1338dba3028edd4332bce9ee3a6211cca3b192630709304291b2761e21322c25e88a6b0bf2f
+bad2c9842f5c4fb833651cb6fd6ad8ea5be2e92c3a60a3f471b558948fa6a978702456e3053f1b87470d91a22bd5d52358e65eb19da847e5250169fb3624b4c9
+4c12650b89ea725006493d9843d02c24d4cade098bba85454dba5fa66a830550cbb2025b2707365c0dd7f7c0048ce0890a513c92794a53bdccae4ae6bbccf4b6
+601a1500fb886505ac325d975cb72e4fae2e2db53364da20a1959b49424546f5301ea2115e54a71c3d0b8db7cd757d9552839e0c859a0f4a6b45a35afb3716e7
+cd35d8ad6b038d75a5a0b173dc702b651f4a6688a60d770c8ffd70184da176b8dcf2223a8177674391a437fc7994659a70d1463c4c03ae4427558388089c3894
+440d572e3f4b038d9586286ec51208c28525570759b968e420e96692f1788c87424fbb3622239d9e82c2a75a61bdaacccf0f96966c06e9ee85a363674067c92d
+0425e6578b328023c2e1ed4f318de688c0ebcc4cc856f5b7d69816b2abbf4f5435948e233a0dd1a2a3e8629ec295946774d4591603ed6cb16608a8169245231c
+4c6483d5836a74d3ac6ba41cb676ddd38d64e434d15cf54c435564d7b4ab9831c3b20dacc5f27c4d5e63b50c31689adee153e95e97dcfa52ebd6f60959978080
+67f1b374dd3334048dda6a32839a64bc29c352b317a366ef582ef0146a6769129aea57966ed7e296f508eb743078aece0f76eb550b43e3e5be52455a7df7d03f
+4db0c13d108f36bc049e51c1552ae1c343826043d4537b925436e016b92f16b7061c39b38434dc0705bfe905253fc8156a7e27e795bd42aee637cbb9a6ef978b
+1dbf5868b74a0fa1b188302afae937972ebc8aa2f3c5971735bef1f5255abe6dbb3464519ea9af2b79455c7d7d2996b67f7d710888ce834aa95b2fd75b955cbd
+dcece6bc76ab96ab079556ae5d09aaed6e3bf06bf5ee43d7395260af590ebc4aa796ab148320e7550a927ead9eab7aa552d3ab366b1daff970b18d8195a7f2b1
+88058457f1dafd070000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468
+656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969
+bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38
+a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbaba
+c4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f
+54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72
+656c73504b01022d00140006000800000021006b799616830000008a0000001c00000000000000000000000000190200007468656d652f7468656d652f746865
+6d654d616e616765722e786d6c504b01022d0014000600080000002100d3130843c40600008b1a00001600000000000000000000000000d60200007468656d65
+2f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b0100002700000000000000000000000000ce0900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000c90a00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax375\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdunhideused1 \lsdpriority1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;
+\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Table;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Simple 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Classic 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Colorful 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Columns 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Grid 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table List 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table 3D effects 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Contemporary;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Elegant;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Professional;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Subtle 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 1;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 2;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Web 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Table Theme;\lsdsemihidden1 \lsdlocked0 Placeholder Text;
+\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;
+\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;
+\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;\lsdpriority61 \lsdlocked0 Light List Accent 1;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdsemihidden1 \lsdlocked0 Revision;
+\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;
+\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;\lsdpriority72 \lsdlocked0 Colorful List Accent 1;
+\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;
+\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;
+\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;
+\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;
+\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;
+\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;
+\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;
+\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;
+\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;
+\lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
+\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4;
+\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2;
+\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4;
+\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4;
+\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6;
+\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3;
+\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4;
+\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4;
+\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;}}{\*\datastore 010500000200000018000000
+4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000
+d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000b002
+c4a57123d401feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000105000000000000}}
diff --git a/test/rtf/image.native b/test/rtf/image.native
new file mode 100644
index 000000000..1efe9d4aa
--- /dev/null
+++ b/test/rtf/image.native
@@ -0,0 +1,12 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para
+ [ Image
+ ( ""
+ , []
+ , [ ( "width" , "2.0in" ) , ( "height" , "2.0in" ) ]
+ )
+ [ Str "image" ]
+ ( "f9d88c3dbe18f6a7f5670e994a947d51216cdf0e.jpg" , "" )
+ ]
+ ]
diff --git a/test/rtf/image.rtf b/test/rtf/image.rtf
new file mode 100644
index 000000000..4c6237478
--- /dev/null
+++ b/test/rtf/image.rtf
@@ -0,0 +1,6 @@
+{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}}
+{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
+\widowctrl\hyphauto
+
+{\pard \ql \f0 \sa180 \li0 \fi0 {\pict\jpegblip\picw250\pich250\picwgoal2880\pichgoal2880 \bin ffd8ffe000104a46494600010101007800780000ffdb00430006040506050406060506070706080a100a0a09090a140e0f0c1017141818171416161a1d251f1a1b231c1616202c20232627292a29191f2d302d283025282928ffdb0043010707070a080a130a0a13281a161a2828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828ffc000110800fa00fa03011100021101031101ffc4001c0000000701010000000000000000000000010203040506070008ffc4003e100002010303020404040502050500030001020300041105122106311322415107617181143291a1234252b1c115f016336272d1082443e1f1265382ffc40017010101010100000000000000000000000000010204ffc4001b11010101010003010000000000000000000001110212213141ffda000c03010002110311003f00dadd18a10a704f6a95ccc57e37750782b0d8d9ea0cd32e7c5446e07e9f4ad723119a7b89e61e348f260719278aad613cbb640002938c76a182b264fc87bd13009c0c019c76e3d68a072e1cf6f4cd502d330c28269a61bb39c923923d4fad44c08dccb95cfd28b8280769ee08a263891e1808739e4f1d8d149392172cc714050dbb9fde8960ed8c60b79b1ed44103b05c331dbdb1dc5026ac1946d20ff8140aa631c773ec738a0346a003bf93e9cf02801895e7b9a01886796c923bd0090a06393c76a0142003ce3d86680d8dd9392303f5341ccc1b3cf7a2c812c37e4923d381429757013209fa511c18146c9247a0f6a007900c0c671c6280854e086c673eb45c27c038fd68aedff2fda836ef881f136f25d5e6b7d1262964aa02b03f98fbf153131935edcc97576f35c33349212cc4f39f7ab26186dfce5b200f73451f7600dcb8cf27e7400c0b291914046c9e0718fde81371b8e7273f4ef4007691919240e714097f31f376e7b5008caee27807b0f5a02c8e1b3c6d27d33cd0201d839523144d1a149ae084b78da47638211771fd050d582c3a0faab5119b6d12f8ab1c06788a0fd4e2ac356fd1fe08754ddccaba849696309e598c9e2103fed1dcfdeadc44fea5ff00a7f956366d375e492403ca935bedcf1eea4ff6ac68a55efc1beb3b552574f8e7009ff933a927ec715bc82b3a8f4d6bba5ca1352d22fe061cf9a0383f71dea5119cc6c0baed3eaac0f1fad40897dcc3d81f7a052366c1007df3400f21edefc5008c28f30c9c5170ee4fc37830086395250a7c66770c18e78da31c0c63de8609b41f7c515c5172a30c3b76344a3e377cb2339cf7a242aea89808cce368272b8c1a2e107c672a49f5c1a181c9c7ae7da8a2119e7b1f5068099ffa68258a132062d8f9e0f34059502b61bf2824e681bb297ced2a71efda80f19c47b9c77fdbe74057c13e539cf3c1a0eeeb9c73f33405ddb4f18249c1e28062b79ae242902024465b9214614649e7bd0362a7249eddc513456e5720f38f5a1a98e96e95d6baa6ebc2d1ad1e65521649bb469f563534d6d7d31f04347d2a2fc5f535db6a0e83718906c887cbbe5a9a8bef44dce9f731ca9a2e89169d6d6f2184b1455dc07b11dcfeb4d16f119c649a681285b03d3e5500f87820ff006a0e098191de80ac9b8904647b55d11da9681a56a31f87a869f6970b8ffe4883629a289aefc16e92d441682da5b098f21ed9f033f353914d19b751fc08d66cc16d12fe2bf45ec92ff0df1fdbfb559ec667aff4eeb1a04db359d3ae6d40eccebe53f46ec7f5ab82263da7dcf3eb5174e5181076918c7de869503232491ee4515c1803824f03b51287f30e0e7d803449494832c157278a2e8c71fcb9f9d144639236824d01e142efb1768cfb9c7ef40512a818de78ff00a682518e7cc30ab9e00a02cce9953247bd41e467191ed9a04205ee99da4e4e3d283a524b0427b5026c18a8e082067db8341ce0e39ed409b6502907391edda80f2dfdc496f0c124ac6184b144cf0a4e338fd2894f7a7342d4ba9b568f4fd261f12571966270a8bfd47d8511bae85f02b47b7fc34bac5d5c5dc88a0c90ab6c8d9bedce3ef4d1ad691a6dae976a96d616d15b409f9638d70054a1dbc68ea51d4329f4619a8022b78e04548515117b05000a035c5c4702a995c26e3819f534047bcb68a458cce866719540724d02e41c0f7a012a40f6141cbc8e7bd01719e38e6838af1c0a04ca8206d3cd037bdb082fad9e0bd8a39e0718649141047d0d5d18f759fc0cd3af164b8e9999acae4e4f81236e898f7c0f55fed574615aee83a96817ef67abda3db4ebdb7f66f983d88a061bb8db9e3d45165076db83c1f950a53780d8247c80a2398f182724f1c7ad080c608cfa7a51a0062adc7afbd0130173bb9c5070f071cb37e82826106e8f615e01c9e680d6b35bc534be3c1e3831b2aa962bb188f2b71df1de819ae4b1048c7f57bd01a58268e332642ae0704f7cf6207af6a01b99e17b7b6416e227407c494139909ed9f4c0a04a4e501e0f1eb40d263e53dce7fa682c9d0bd13abf58dd6db18bc2b157c4975270ab8ef8f563f21447a73a03a1f4de8eb031582b497328066b97fcd21ff038edfde88b7e32703bd64188e7e6283864b73400cd804b67ca3268317eacea6d56ff005233592f8b6303f953fa4af7c2fa93417fe98b763e0ea171297bab98558068f695ce0e08fdbd281e5c6a57ba5e9d14d716ef7774f2ec112601da4f27ec2827ada74bab559a20e148fcae36b0f91140283729c77a0e0a7777a01dac68395719e39a029607cb901b19c501480ab9279f4a086ea8d0b48d76c0586b7143224a76c61ce1831fe93e86b43cd1f12fe19ea7d2533dcdbeebcd20b612651e68f9ece3fcf6fa5067cbcf20ff009a051724905411e94032799060723da8406d6c67e7ea68d0e1770fe5cfb5026c37039ef9a02eca098c91e6e01e71c500b1d8a49c12786cf6a06a4e256008e3d050119958007920e2801154e32fb4120927b014017eb1c523ac5209a356215c291b87be28957ef853f0d66eaa99352d515e1d190f947669ce7b0ffa7e74a8f4be996569a5d9c56b6704705b46bb5238d42851f2ac875712bc70b3c30f892019540704d01ad2669a0491936330c95ce7140b2e4939a03638c7e8680ae485e33bbe540d60d3ada162c90a02c7270a39340a4f28b68da4645007a8f6a069a746f73235ddcefc391e12b2e1916824948742c99382473c73404791c617695279dc0640f9502c578c9efeb4095cb4cb0830ba21cf999c6401f4f5a05061d430c8079a02e03b3004311c7d281b5e3cd676c65489ee594e4aafe6c7ae07a9a0a075bbea3a8ea96f047d3935ebc404f04ad29411e08e011d98fed416fd212ee5b05b4d5ad6300c615807f1171eaa49eff5ad418c7c55f8466dd66d57a521f20cbcd66a7247a9283dbe5418a63862479877cf1f6c5008e400bdf1ce684016fe53dfbd1a73794600e08ce3d6800377c8c7d6800a9cf75fd4503d91492460f7ee3d28247a7b459f5fd592d22711c206f9e563858a31f99cfd050583518ba75247b1d134f9aed21396d4669769931dc01c003f7a329c4d17458ac5b55d36c12e040a3f1da75c1cb04ede2447f7f6a94567ad7a66db4fbbb29ba7d65b8b4bd8ccd09c8231eaa07b8ab04a7c2cf87b3f53ea8d77abc72c1a5dabe2452bb5a561fc83e5ee7e541e988218ed2dd22b7855228d76a46a00000ec00a510bd4dd511f4fe84da95cc31f880022da4902b1e7d3e99ac86fd03d631f565b4ee6d4dbbc649009cab2e48c83f514165b8b94b6895c44f279c280839e78ce28178ae6de46748a789e453865570483ec6812d42e85a421fc37918b00a883924d024c6e99b7a2a966c0009e17dc9f9fed40f81c77e28139218e4ff9815b9cf23340a01c907b9140201038ed402fcafd28386464e4fd33c50272bc60032609cf00fbd024f722dc66f24822ddf972f8feff00e280f69b24844919cac9ce7de83a447f30ded823007b50459d6ecacb528349b979127651b1dc795f1f3f7a0990148054823dc5015d491c0a0c3be337c2ff00c489b5ee9c87172016b9b541c49ff5a8f7f71eb560c1fc43e0a47e1aa94277310431f91fa551c1727f29ed409b641c86e31839a3454805739c1f6a026f1fd740f64665fc8c31cfde82db79bb40e9e8f49b62eb7d7e8b717ec832c91ff247fa1dc7df2281bcc9369d671493c422b7911654c1215f92bb8827bf068624ba635392df5eb4b9924558ee5bc19b71cee43c6dc7cf34c657be8db0b0b9d0f51d2afe668934dbf9628ddb8c2b8c0073f3a80da37546a7d25174fd95dc125c69f7313ee5655dfc313bd483cf07b1f6a68d5b48d5ec758b612e9d7293211c8fe653f35ee2a084eb9e8bb1eafb3582fe496278f3e1c919fcb9f97ad03ee8dd017a6741b6d3229dae161057c5750a48249ec3eb4139238568f6a9e7b103b5037934cb3793c610a2cd9277a8da73f5140ee38f6280c4b11c65b934023006d50050030e4647de80c846de3b500fcf9fbd0197273ed4007b91400e580c8e45074a82400e72682b36fd2162b7f25ddc09af2766ceeb872db79cf00f6a0b3229550140e07007a50092db860673de818df473c862686dad6470d9cce3b7b63e740fa1de6252ebb5bd81cd00bee2d800d003a6464004763ce683ce9f1cbe1f1d3a67ea1d1a30b68edffba814708c7f9c63d0fafceaca31e6dc71e1f07daa82608c83819f7a1a11ce149238fd68d0a579ec682cfd27a7c3a86bd10bc38b3b756b8b93c1fe1a8c91f7381f7a034f752ea5aa5c5eb292f732128037619c018f6ec282e5a2cb047abda74d5ce9b6da80f136de4a496219b3e48c92000323ea73467519d3da5bb757dbda410ac90c77c23058f99007ee7ec31416882ee47d23acb5185caf8bab4691b1efe57fff0038a9457ee75a82f6e7429350466b482f2742c0f74241c80c38c64541a9cfa1e89ac0177d33ab3d8de28f2b5bca429f91140e2c7a9b5ae9fb85b6ea9b46b9b3c796fe040768f76ec0fafb1f9505df4ebdb3d4edd6e74db98ee216fe68ce47d280648f75e2485a44da385ddc13f4a025ddbdbea16a633286566ce55f9c8f6c502ad750db2c514f30dec428247e6340bbf04100b73402afb943ed2b9e30683836defe9403bc1e06734020e06280cafe8683a375941d841c77c1a0151b467b50159f00e4127e5402872371040c5046eb5aadbe9b1c02e2f6dad25b89047099c677b7b0140fe3f1010afc803f3018e68160c3041ee2823f5dba92d34db89a1d9e2843b03b6d05bd013560c1748d57aa2797c6b35bab78e6959dc47231580ff336dcfb03c1a58364b5bbb7d7fa7b7427f1f673830c8664285bd1815238fad20f2c7c41e979ba43aa2e2c1cb1b663bede438f3a13c7dc76fb5515e9065b851f7a02950002a09c51a1b83cf14176e90d3645e9ad7752752aac23b3439c066665c827e944d29a6410aea725c4567135bd840d3c88a723728c29c9efe6c50d3ee9545b0bf8ef2e6e3c2fc2c6f72f2920e5f19039ee4938a9a875d03278377acf52ddf867f036ef71923932bfe51fbd3475cdc369df0db4fb389d4ea37970fa9cc0b00511795ce7d4f181eb4cd2451755fc45ac16d637381b14ca36b641dfce723e4053170d6cb52bbb362f6d3cb19241f2b9029862f09f143549ba7e7d2eef6caf2797c66ee17fdfd69862d1a069da7dfdac579d17adcda5ea9e1a992376c4723e39e3b024fd7e94c458ac3e25dee8d31d3bae74e7b79002bf8b8549471db38f5f4ed4c165e943a06a328d4ba605b4b22a1523c420c64fbaf38a82d36f0ce7cf7463790729b53017e940e0b0ceceed8ce0500e1b70daa08f5c9ed41d271cd0132476e7d7ff00aa069797d2411168ed9a41fcc858211f73c5075acb25ca6fb82aa31e58a36c81f561dcd033d42169e158ac64b98151b3981c2966cf639f4a064c7a8ac55e4865b7d493701e1c8e52403ea3cbfda827e390ca3f2c914aa81991bd281cdacc2747215c60e0ee5c67e940cb51b0b2bcbd824bfb08ee1a252d1caea1821cfa67b1fa504982b2283ce08f518a08abb82f6dd0369a5662081e14ce40c7ae1b04fda82275cb0bfd4f4536f7114589a5412461f3e4ce4e0e060f63f6ab2893d3b4b5b5b78e22ed22aae3cc3cc7e64fad3449a22a461500007602a0cd7e3b74c26b5d2ad79147baf34eccca40e4a7f30ff3f6aba3cd0543267eb5427b86f1f4c76ef45d0eca1ad5ef224d13e1cf4fd9b22192fa67bc955f8c8c617fba9fb510d7a6ed3fd43a735e5b54964be658c048fb6cdd9e7eb8a186bac97d174e6d22e23437b7ac26b95e77c68bf950fa7279e2b22dba45b59e97a669fa4ea36aeff89cea9a90451fc355ff0096ad9f4ce3f41570675d4fa8c77da8de5cde5be26bc653171ca47dc1f6c9fed5562b97f70276808da7c24f0c1c63804e33fa8a2928c0e0383c8f7ed41d92a41393f4a2548595c2c37493db4cd04e8a08f139566edfef3445b6e7aeaf65d2df48ea2b11776ae02a93e564c772adef409f4ee8ba9a21d73a36fa579ad9f325afe599171ed9c30a960d5ba0fe2843abb47a6f510fc26a4c36890f9558fcc6783506a1147b510024e30339ce680d2c6ae9861eb9a009178a0205443b989e39cd01d8075e3047ce80563057ca381ed4011c4531e503d85013c91b804a21279c903341131cda8c3abdc8650f6d20c4321232adec3dc504bab2c113c9293bb1963df3408dd4b75e1efb2856463dbc43b4631fad047e9177ad4fe32ea16b1db4b8fe1aa92571f5f5a0916bc8e0895af5c46c17cd8c9ff7da80f6d736f7f6915c59cab35bc837238ed8a072a31c1ef4062870718a06f7702dc5b3c522ee4752ae0fa8230683c75d6ba3b74ef535fe984929149e4278ca9e47edfdab42058003763ed409f88ffd6dfad06b1f12ae612fa0c76e0b471e9916d23f973eb4158d3efeff004a984da5debc1295d8e4018dbf3145d583a2ad96f356bbd7f5d90dc59587f1e79a6392f28fcaa3ee47159444ea3aa5ddfc7acf50dcdc344d7a4dbc317f52641200f6000fdeb41b5ef51d8eab672ffa9e971c97c11638268e431a46000012a3b9a351567db823b11f3ef40948e428048207a8340ab48ae83cb83ee0f3428a982719edf3e68c9cc97d3fe15ad8c9be138f2bf38e7b8f6ef40f7a5f55bdd3f56b46d3649127f1405f08e7249c76f5fa50689d48ba5f545cdcbdb462cba9206411b2b055bb07d4fb1c73528d4fa8f52d62cf47b6b8d2e65fc458c49f8a818795c151939f977a823ba0fe253750eb7fe937b04293f9f6c90be41dbdc7ff006283473c1efc1a06f69776d73bbf0f2aca32572bc80470450284a46dfca19f819f5a04e799614def26c0bdce09cfd85045dc75769d12dc3c3e2491db0dd3c85195235f7c91cfd066ae0cdba9be31f4ec61a386c1ef9d4ee473e45cfb1cf34c101d3ff1ac9d481d46c628ed24751881880833f988e7b0fa5328dfed2f2def2ce2b9b79925b791772ca87208f7a60182ee2b95cc0c48f53823fbd40ac658b30f4f4a086d4ee1d75bb6b78f4e965596366fc5211b23238008fde81f43692da5bc30d97831a0397dc09e3d714087506bf61a2c4cd77324726d2caaec141f9fd2ae0c435bf8c57173ad7876f7a2daca10489121244cdf319ce3dbf5a834fe81f881a6f57bcb6ba7c53c72c11873e28cee1db391dbef4199ff00ea4348116a5a66a8a8a04aad04847a90723f6ad7d18c312ddc02a3815423ba0f63fa541687bd9efe1b533b3c9e0a78473e899e318a09bd0ba6eef543e3b2bd8e9b10064bd9e4da001dc81401aeeb29a984d0ba7d5e1d06d4e6594f06523bc8e7f5c0ac8af752dfc17d7090d9218ec6d9447129ee71fcc4fb9cd6842ab10dc0014f3e5a2c1704b671dfdc734525226dc939e283a362c7f940344a380393df144733e2276e38f5efcd01b4bbbfc3dda4a9298a44395902e4a9c70682660d4265d62de40b1bdc1545054f95c8fe627df141af7c3af8808f3dd68dd5d2a45765884b8908d8c3b6c27b7a77a945d7a5fa474bd2ba8e4d5748b28624955d5d8b13b79ee9e983d8d40a753758c7a46b96f6114725dc92279a2810b3a64f94900763cfafa503fd3b59b79ed84da34713c0cd890f0a158fa1f981de826e1b548959fc4dc5cee24b6467e59ed4101ff19e9f676baa5d6a72c50adb4ad1ac790ccc076200f7ad41e7df881d79a87576a5f87b0f161d381db1c2a36e7e6d8ff3416bf87ff082c6f208ef7a82f22b9761bd6d619785f6dc477fa53705ab57f83bd297ceb1e9caf67708db9c4526723e849e3e94f212dd25d117fd29a8c09a76b534fa39cf8b6b71ced38e36fb73417f52e64548e34007e673e9f21ef590a1c918c90718dc281a69b68f67118d9da5058b798f6fa7fe280daadd1b2d36eae70710c4d263df0a4d583cc7a668fd4bf11b5837d7c93dcd9a3146959822a0e781f4cfa55161e9dd7fa67a4f55b9e9aea3e9f81fc09ca0ba118998fcdb2338c7b528d39f4cd2ba76e2d357d292df4eb391809963420ce1b1b576fa1e7359119f1eb4e17dd033ca172d6b2a4df303383fdeb5c8f2eef3bce4e0e335684cb0c9f354160d36f64b0baf16072b91b5f03391f43c51aab23a5debe91c4fad4d73689e6fc3a290573ff4f03e59f4a3280d67581ce916567f84b58ce0a1fccec3d58fa9a084de08c90464e4d1a8e419059b201f4a05630a176918efc50176293872c17bf14042aa0125b03db14046c60b60123fde6827fa0c68edd5365ff11346ba6292ee64194240c807e59a32b7fc51bfe8bd5ed5db424860beb62b89218422ce09c11c01dbbd0660ae110bf1bf2154838dbebfefeb41a8f4cdac7f117458f4d9ecd2df53b4cf81a822808c47255c0f7c8e7fb54a2ec2cfabba3b4b4b8d3af12eedad40926b0f070a13f9b633649f7a82eba6ea4357d321d4ecad512daf20df26e016507fa4fbfaf3e98f9d067dd2bd2faac9aa4d72d72d1e9510ca46a7631c7a320e18f1dfd7bd059afb7da816d23de4ba5de211346a1e4785f190548e4648c63b64e6b43ce9d5baafe3b539c5b452dbda46c638a167cb281c73ee4ff9340e3a3fa5f5aea4ba58f4bb57dbfcf2b02a8bf7f7a0de3a5fa0b50d2a2d92eb3e048c0a97c867dbedcf6a944e5cf4f6b76d1b3d8ea42795066266c87c81c65b9cfaf15048e83af3cd64abac08edaf01546c38dae4e0657ee6826e5b892de3702292e2545ddb55700fd0fbfca81c4b3bc718716eef9eeaa402280d14ab3c0b2c65c06fe571823ed40df56b217fa6dd5ab9216689a33f2c8c558307e83b8d77a37aaa7d22f2512c28768800c9954671b3d33ebef568d0ef7a7749eb0b5bbbb162d657b32b46d2e1564c8ed9c5644d1b0b9bbd261d2a440af6cb0e2e5b1e7dbc1238e0f7a0375b696daa7496a3a4dac8a92cf078685b271db04d391e40d5ec4586a1716de2a49e0c8c85d3b120f715ba1899173ff305413070abd89cfe9f5a2d3ee9c8639fa874eb6b804c52dc46b20c9f302c3bd11e84d47e1af4d5dc6521d3e3b662c19a58721ff5a9a321f89bd27a374b456d158dccd34d333332c9b4b2afbe47a7cb1f7aa33d2bc0d8c0f1c8f6a2c14b6d501b39cf63450897380c319e3de8065031c038f7ed40d8faf1ce41e4d004876a8dc3cc7e743025c956c818028c904579e7f0e15695c9c0541924f6c00283d0bf07f42d6b48820b8d62d20b2b58d656404959e52f83c8ff00fcfafbd4a35bb06f12391a48dd55cee2b2f3818ed8f6a8158a159890f02242079147623e631c502b0db436d1ecb7458d4738038fb0a087d6eeb508f48bb7d32d95750752b6c26c905b3ddb6f61eb574794f5cb6b9d0fa9678b512b25d24bbe52b8c1638278fbd582c57ff12afaed45b5bc0d0d8a8c08a2731ee3eec5793f40450466a1d59af446293c186cd53ca0c36eab93dc649e49fbd048e89f1675ed35e301e293919dcbf9867b37cbe94a35fe94ea4d33aba6824306dc48015750d86c6e247b0cf63591a40b8dc23fc30f14138dcac3000f9d03687547f12e8dd5af816b13148dddbcd29039c0f6f6f7a0eb5d62caf5636825db70c9bc4328f0dc0271c8a090627d3073ce681acf6505ccf14d35bc2f2c2731bb28254fb8a075144a83ca806792400334049ee6281e2496408656d880ff0031f61fa50446bd76058ea1b9e21025a3bb48afe71df9c7b71de9c8f196a0de23ca7b827d4f7add117e0cbfd4b5059392369663ff004e71c51aa97e8f555eadd258f2bf8a889cff00dc28cbd0bf123a926e96d163bdb74490bca2321c678209ff001591e71eafd7a7d7ef45cde2c20aae144638033fb9ad2e1b5e69d058da431ccf21d4a5c3b4631b62523807feaf5c7a50222f2d648c25f5aeec8c2cd19dae3d3e87e944d3eb7e90d425b49ef2292de38224f1505c3f8724a9eeaa7bd0d57a60406059436306868a7803839c7ad1a158039c13f4a33a716767f8cb9b6b55e1ae2458813e9938cd07a9f42d0b4de99b4b7d1f41b58ff19b03c93ba06607fa8b1f5f619a5b8266d74a65d42da6ba90cce996dcdc8c9fff006a5a2c2635083b05ef83eb5028076341db4b1ed9f7a04651fc41db18ed419d75b744dbea335fcb0db0335f2057901c05da73c8f9d5d18a75174a3f4c47335e35da4ce418a489374254f707d463d33565d1529b569a489a17944b06ec8057d71dcd037b4b6b8bfba31584124b27e62a8a4f1ea68357f83da7ea5a76bfe0912453ccabb49194653cb60f6ce3dfda983d196cd108c2401711f9768e306b2297d73fc6d02773a8b591922693c5004bb9d72542fa2f6efde8314ff867aeeec27500b77bb5670e36ca19b1dff2e7f2fd2837ce8bd5dd348b78b552219022870d9c46e792a4f6c608a0b846c8e03232b29ec41cd0199f1410fd4b24b1e8f712c0a5e4452d851e6c639dbf3238a0afa42ba77475e4ba8470896681da45180b18da76af3c9029c8f26dc1df2b9c606e273e86b743331924f27f4a82c12280e59b008e79f6a2d4d74188ff00e30d203a82ad7519c1ff00b860d11ba7c5e86c9fa3afae6f4091e043e021270b21e01c7dcd6479ab4dd3aeb56be4b7b184cf2b301b57d07bfd2b4bad0fe25e9f6960ba7c7a55ac50cd750335ccaade7723b83b8f6e38a2207a5ba4e7ea3d93780cb616ca53781f99fbff009a0b675a5be9765d43a75a6ad3b25adb4185429b831c70303dfdfd2831eb8954ca48f3827819c71ed406b2b1b9bf9a5fc1c4ce2253238047957dc9345d122b792eee522811a495ce1157b93ed444ff0049f476b1aaf51c761345269d25be269259570c833c6077249e062a68f53e8ef0da69509d4ae225b92a04af232ab16f98cf1f4a5a266d4dbca8af13a329ecca723f51502d14f0cb9f05d1c8ee01c91f6a0393b4edfe63c8a031608859b38f97340d84d04e5846eae50f9829ce3eb400fb24466041f5e3d2823f56d22db57b192d6e61468a41c823ff0035651916bbf04ada7badda5cad6d1b72c09dc33f2a6875d25f0865d06fe2bc6d4c4d3282026cca8cfafcfd29a34cd234a10c768f711a78f1bb392a3001208e3ec69a26a58d640c832091c90706a084ea1d3eeafdadf4f86da3166c0b4b397c18f046140f5ce4d04f4702436e91c28a9122e028ed8a0a9f5a5b6a09a1bc5a135bc72cce048b3c5bc15c638f9d59043fc2db997481aa69dae49e1cb6bb643239211939e467818f97bd305965ebce9a10bc8da9dbaa2679dd9ce3d8530572cfac87566ab05ae9f1490692b9696e1f833738555f96793504df5f25945d2576b7ec16dc46792381c7b7ad5e60f234980e42f6c9c56a82ec3eff00bd4124e49700f1c646e3cd169ce9575f83d52cee324347323f6e3861ff008a23d47d4ba6a75074fdcd8ef317e2e2ff0098bdd4706a60c3f4ae8cd5f44eb8fc3e97248a638cbc73bf90483d463b373e9574685abf42a6b5649fea72bbdeac4a8d3b018cfae31f7a6895b6b29b41d30d8e9f6bbed9213e1b7a994e724fcbb5064bd7835a9752d3af75d8116354778f660788cbd9483dbb0a0cd20b2b8d43528ad2088bdcccf854039cff00e2827a0d34e9da1de896f2182492efc0976f998aa827d3d334113a74aa9a9298628e74570478bc0c7cf1da83724bb8246d3e6416b0384da61b5501c9f5c3704f152c037561a95f5fce61d3ad6db4ab950f34b331dd9f4191db8fdcd406d67a675ab4b6d325d1af248272a43430315ddec7038f6ad4b3f448bf47eb71cb69abddebf21d5e26896203846c30c8603b9c6452d9835901405660376319ac84bf13180779d8bb82827d4fb0a06f777367a75acd7170f1430a9f331200cfceae061a0cf6dac692d7365266191db0578f5edf3a6075a6c9278b3433188a467860d96fbd40fe540471409aa0c1140750001ed8ed4058e15133c983960077edf6a06faade5c5b7822d2d926766cb967da2341dd8f0727d85033d27597d62e2ee3163756915bbf8799d71e2f19dcbf2a092b88dd9a311950a0e5b70ce47fe6ac18af53f5b69da9752dd69da9ca906876e24465d9e69881c6ff005c679c0aa2bfd267a347512c93dbb5d42d90d3c800b68c9ce0ec3cfa528db74ad034db5905ee8be1ac728dc153984f3f980f4fb56453be2de8f647a6aff53796596f0aed46798ec033ce149c0fb0ad71479c9bb9dc3bf3c55a0b95f65a825150b481a407b93c0fda8a29c06671dc93803bd131eafd0af6dffe18d2ee25982a4b04603b7a9c631fad03bbe586381bc5945b96385718c827db3eb5288eb8ba934eb15fc3c535f05427796dcccdec7150637d5bd55d5362b7975aa4d0d919018adec8637807bb60723000e4f7cd58203538aefa8aeb478a7b9beba924547b8774cf8608036a80704639cf1f9855d1a7f4c68b67a03de5e5d59dad8d988c62e1c0f107a1e7fdf7a082ea6d07a6e3e99375a7cb6b3db093c727701e2360f7f53dfb50653d4130d42ee18f48b3f0232a15218936963ebf5fbd06dbf0cfa74855b9d46e04b730c6144691e12307d33ea7de8348ba6b5478a279a004f98c479247b81f5a9438805ac0be2e02e73c9ef8fbd40c2346d43578eefc40da7da1dc8b8eefea4fcb9fef419beabf12a4bcebcb2d2fa7ee0dc58492084b30236bb6467dce383f6a0b87556a67a7f4d95a0bbb5468816f0a69c78b2e072572719ce78357079dfab3af2e7a92c963b88d94abbbf91cedc93edf418aa2c5f0dbe2a6a9a0c90d8de34773a6a8da1186d6403fa48fec682d9adeb7a9b4c9d572dacc9a6c9700456e5ca910e000ecbd8e580352fb1ae7476bd6dd49a325e5a9f3025245fe961dea097523cc0919a032af039a006936c81423104649c703ef40dcce64bc3035a87b6f0c378f9fe7cf2b8fdf340a4b6e25962915d94a67807839f7a043586922b5636ec44c061063f31f6ab079d7fe19b7eb2d4efeef55d5d74f992e9a0fc3a441dcb13927b838c9aa2d4bf042c618e178efee6e18104870172318edf5c1e6945bbe1a748ea7d2315edbea3a99bcb190030c401010e4e783ee0fa56455be3d6b90c1a6268d69e17f1486900ee98ec29ccc183119419e7e55ba11f089f523ef5058363a8059fb8e31e9421b491056c01819e28d3d0ff07eea3d53a1e3b6b8db235aca63c139c0eea68ca47a9fa6ef757b83ff00bf68ad428c2f248c7a8f9fcea518df516adac74e7544f63a2ea172f1800291e6cee19ec78cd5826344e85b6bad25ba8fade5b99dae0ee11efc71e858f7e7d054a2d7d39a75ae8f7b6b00b8917f1516624b78429da327cec493db1db1d8540cf4aea28f58d6aeae2f6dd64b498082d880488d149fcea7d4939ab04175e6850a8d32de3b78e380c8de32c4db4e18e430fef543cf86fd0d691b4fabdf6648b3b2db69ce7dd87be68342d2f4fb9b5b891af1a28a2dc05bc5036d001e0eef7352884b961a2ea9aa7555c885e08d45b5bc52b61b686c120fb939fb541276bd4b61d53624d942e2f6200bc32290633e99f4233416dd3ad3f0d611c0c77b632e71dc9ef41156dd27a45addcb3dbd9c513b1dd941821bdc7b558333b9f873757fd69a85e3f813e9c7723b5d93265d872473c11544a68ff08fa75e290b42ec4e4124e70738fa5048e89f0f745d2aeadd2decedda6525c975121183c77f7a945c754d0e0d563682ed43425369403bff00bcd58308ba7d5fe13f5a05889974a9d8b46aede4914f707d88ff001528ddf4fd7edb54d1a1d56c312dab2e64dbc9418e78f5c541296d70b716d1cd6f8789977230ecc280cb7519b816f212b205de4e0843ce300f6cfcb39a0545c42cee88e0b458ddec33ee680eac92266360debc7b5056fad2d354b9b189745744be121daf27e550548ce3d4d58324d07a725e98ea2b7ff5381f5169a7579d021fe13904ee43ddfbe49038ab46e76cf05cc714f6d309232a4a98ce54fd6b2196bb7f2e9b631b2c427b891b6851db3eff002007341e5bf887aa2ea3d4f77378be381e42fdb711ed5a1554395caf1cd07617dcd04fc85402101da791421b49920331381c60d1a69bf02f56f03a925b12c162b98c955f775e47df19a32d99b518268e4491668704a79d4aeec7b7bd4a30feb7e9144d76e265697c3e2693631674273803e556087d76f35fd49859e9925ccf611141106f2e182e3241f727f5a94681a268f79ad1b1b8b9dd66b1c2b1ce9bb06361c1e7bf3fe6a096b0d3ba57488e485b52b40909c386901607d47bf7a0ae758eb69ac4d15be81a748f0a9c35cc90b2eff4c03c1c638a0b77405c5d5d45f87be5fe359a88b81b401dc1c7d38fb50586fed18ea3015790091591e447c1518c8c7a0a0a5754d8c9d49a8d9f4ee9dba0b3b5224b9692327728f627e7c6682f9a7e996b6b3a8b6b748a348820c7720761412c064e3041ce282b5d4bd73d3bd3f33daea97ac2e540dd0a292dc8cd043c1f15ba2a7923b65bb910371b9a12141f9d02edf13ba2ade56857551e5e77244c54fd0e280746ebfe99bbbd655d56dcdc9ce08465565f4ee3bfca82d53eb3a6dac3e25c5f5ba646402e33fa77a0aff5b74ad8757e9ca972844aa37c520fcca7d3f5ab067bd369a8f467544d626c98e9f7118f0200e4465c903049c8c9e6ad1b24334b6fa6249716cab20037c309dd83db03b5640dddac3764a4f02cb1103863919fa7a1a06d6f600c37162911b7b252b87dc773f1927393f4a079f868edae1ae6328a8b1ed38e30050226e85d5dc1f879011b3c47c2f604719f9d01eff4f4b83e3c6b18bb452b1cac9b8a83de80b16e8208a3b7b58e1407cc061427cc0ff1560ce7a8f592d69a97504cad2dac01a2b53900c3e9e51ea58f727d0551e73bfb86b99a49a46dcf21c96340dc13804f20f6f9501c0e3b8a0963316fcc4607007f57bd084d64dec01200ce483468ff0040d525d1755b4d4206ff0095207c11dc67ff0019a18f56584f6daad9dade4211e39104a8ded9152b235cd8c530613229c8c1c8ef50472e81690ee00322b0c100f0debdbb7ca8111ace856371358cba85aa5cc407891ccf83f2ef4048b4ad2e59bf116769672c72f99dd1437239078e2824a4d3e1b94559234110e781839fa0a0561b38ad532a12319c86c6307e740a9732a3a00cac870cd8e0faf0681be8b6db965bb909df3c85806eeabced5a09523647e6e0fef419a6adf116daf7ac34be9dd1da686e7f1ca2e243b76320ce57df9ff1560cc3e3f470ff00c78255b842b35bc6c4af9b6e323d3e95467b6365f8dbcf062beb68c119595d8aaff6e282422e9899b4f6bb5d46cda2562a76316c1078f4a0859e1b9b762c0bf94f0e84feb4125a57505c58ea70dd5d0174a986d92b1c13f6f5a0de7a5be366877260b5d42dee2d2423124a487507ebdf15289dd3fac7a7bab6feded74d61733473acdb5a162142ff00313d81ed505fa58fc6d809380c1b9f5c502e0e05040ea367a85dea454de2ff00a610375b04c16c7a16ef8340b5f6930dce9375636acf6a278f04c5dd4f1dbf4a084e91d06f3a52dee62bbd4a2b882494ced3c8a448063b63b638fde803ab7ae749b2b3096d792c93c8c109b55dcd18ce3710473ffdd043dc758dc5869044565aa5dda4c3c2b7bc78c1f14e3963db03e7c0ab066bf1327d41ba76ca6bc48ecad24c456f6b0c87cf8e4bbfa138c0fa9aa3297c83dd4e28395811cf2680a5b93c7ed413cd1ff0f3c797b8031406645236b0508406f30e68ba49c051b97d0e0e7d28ad57e19f575c5be8f269515dac772877c11bc464dea7ba8c739ce78f9d3193bb8ebfea2bcbd6b5b6b8b58bb7f13c2f0ce31cf0deb4c0f2dbad6d743d2ee99efae752d6c02a86e0054524f6383c7ff94c0b6af274c75149a46a5a82c46f1e1479fc3190bd8156fbe7f4a960bf74e9d253f1167a3ac09e0856610e3041ec7f6c540f67b892cee7f8d18368232ef2af2508c7047cf340ead5bf130accc9b1186541e723d09ffc5033bbb1b82d74d6b37f1244daa1b38073df3f4a08eeb1d3b50d4fa6a5b4d32f12cef1902ee73e523d476fde8306eb0d3fabfa4ba92c278af67bb7281606472f90bdd58558253a6afb40ea1d62283a8b461a66a6f931cf6a7c2466f7cfb939e7b5515fbed3747b5eb8f06eb78d35080a2ec9719c76f98049a0b4ebdd37d1bad869acbf0b03c5c16b29444adf50ded41995f68564a263a66b31cd02be152505493f51c1a088bab69ad1bc179e320f07c37c8a0692b46c4995f0381db39a0b2fc34e971d57d4705bc8db6c50ef9dd97b81fcbf7381528f5ae97a1d8e996d1db69b0c7648855b10a81b80f43c739c54134147b9a036063279fb5046e957726a0f2cfe04915b06db1788305ffeac7a0a00d72f8d9c491c06337533050ac7185cf2df6a06da2da4293488f34973328c34aea428c9ec3eded40ee7d2ad249448f6b133820ee2833df3fde819ea96897461b05b87815f2ee919e5d47704fa039ab079b3e326b70eafd4ef6d6650d8e9ebf868b69c8247723efebf2aa280eb9193ebedc5002a124e015340018fb8fde82cf32b1603d0678cd02406dce3008e47ce81b499c331383c9c9f5a2e9c69377369f7d6f796a4acf148acb83fb511e91b3b3d0bab745b7d45acedd8e3732b71b1fd73f7a5a19eafd09a56a0a96b1c705b49c48510761ce4fcfbd4d0d752826b2b583476fc3daacb295b79d768de8a32b1e71f989e49f6a7d14dd1af5ba275a45b8b093c054492ea769092373765c1da4679fbd306e36ba9595fe9f0dcdbcc92c33e1579cf27d0d409ea178f68521b6b76926ee8a7853f7ff140bc768d78f6f73748d1cd103b543f0091cf6efc502f7319dac194371d8b6326829f0c501d7ae6fa568d5d4942c806d4db81839f53c8cd59456fae6e628749b5bab8b1865b08e4726588ec11e7f2e49071c93da9a31dd4341d675e9a5bad374f9858162d0b4ac70e18f0573df35a0c759f87bd53a404f174f965dfff00f479b1ef570576e34bd4b4cc0bdb3b9b7258a00e846e3f2a94376475cee4914af7ca9150685f09ba61efb52fc7dd69bf8eb7c158d1d0b47bb38f37efde968d6eeb4eb5e91d6ad25b660aee59974db6881690918e31ce39279e062a5a34bb57b88adedd1e379679065d80036679e6a07e8391bce7e940c659ef5afe1286de3b16f2b8903094b7b2fa7ce81eb380c4260ed193f2a0cd6fa5d4a4ea0fc7bdadcce923158a3039db83c038e3ef41a0e96b2ad8a35e009291b8a939d9f227e43bd590436bbd6fa269202c974b7123602c76e779624e00e29833bf897d493e896525dbcb2a6b5a9c3e1456b91b6d60cf989c7f31f7a60c02490961ebcf3eb541308e39e067b507007b96007a67fb50178f97eb4165ce18165c2927b773fad023202d9c8dbb7818ff003408300b87f2f1c107d0d0c15a4f2e339c90467f6a18bdfc2cea8ff4bd561b4b9ba686d6e64552c4f954e7d7e46a60f4688d240af1b2bc6cbf5047ca960617ba658de1b792f2d94a5ab33461b18524633fa1a81b5c8b5168967369d23c0e0a24622dc981d81c76aba29df0bb48d660d52fceb88d069f04aeb69130037127f37b9c0ed9a8350781240bbc06da72323b1f7a0eb8816e633192ebc8c9472a78fa50349b4c83c068e24f0ddbcc1c13b837be4d055b57e98b996d4db5b4a893dc1e6620b6ccf2c467efc504ce97a38d3f4d874bf09af6d46e2f25cb82724e791db15650a43f878b51fc34f3da8f132b6d6a98c80a39ff007e99aba249631b58b9047239ec3e55368aeeb7d2da6f52c0eb7f16e87f2c6e836ba90724ab7a67b55d115ac7c3e8aed2182def4c56a14096368959a423d77e3229a27b41e9d8343b01069c8a8dc9660aa3713df3c64d4a1c695d3d6b67a8cba94b9b8d4e61869e4e4a8c636a7f4afcaa09a485519caae19b966f7a0435196582c656b74df3e308beec7b50629375775b691ac5bdb6b16d6378779f019b00a31cf391c9c2f1daae0b35ef52f5374de88d77aa45a6cd25ddc0108694ee2188c28007603d6a0d16c92430a4b2ed3230dc401855cfa0a0a07c45d7b5db9d462e9ee960b14b2ee134ef8c850012147ec78ab0670b643a2efae753d72686e6e2da211db42176079c8e768f65e39f7aa332d6f58bbd635096f6fe6692695b24f603d801e82823cb900ee00e68006460051dfd680ed9f0c905b713d8d006d5f5419fa505a18f94e40501b1b81a04186d62402c87be3d6810b81290aea8467201231cd1749dbc437f9f1e201db3de8ba07dc0175c027f28a335b17c26f888d6b6d0e8fabf892a29c453b1e547f49f7a946d6424f08236491c833ee0835073294888894120700f0280813c40a6711bc8843e00fca7d3ef40e41dc081f9a811681c6f7565329185623b7e9de812b3bcf11ff0b74563bd50494cf120071b97e5fda80d7577046c9019d5669dbc340324eec67fb734103d5da96bf67a7cf0e916f6e2765f25ddc4c11107ab1c8c647cce2816d3ec7f0f6564cae6e67da375e6d52cc4af2e4fb13ed4145f899d47b3499f4bb6d46cda49b69b92921565c3648e3dd40c81cd5c0ae89f13ec246d3e379ed2d6da180b5d34849da1780b128e49271c9f4a60ba685d5fa36bc42d95c324ec7090cc9b1d87b81ed50588958977cacaaa3b9341c655f12348d1dcb8dc1946540f99a019e2134454eeda7bed3839cd052fe2136b536b5d3563a1ca53c49da4b9507198940ce7e5c9fbe281c6b7a974cf4ee4ea7242d76dc784a3c595b3e9b464e3f6ad0ac745ccbd4fadcbabea42da56959a382ce7460d6b1a93c01f97272093ebf6a82f1ad6af0e9da5cb3cecf6902216919f82aa3818c7a9f4c530649a9f5269ba7429d472239bc991a1b0d3c3152880f0f23039e7bf3de90635ab6a377aa5ebdcdecef2c9239e59f3827e5ed54302195fcc38cd01245395c1f5f4a05b606538e483c501b6939e3b5077860f3914165754c33e549000dbe87de813b820c27fa7baafb8a04a69c98e281e42618c795338033df1f3a06c03e4e029247007ad010093c35674da71f977640340081a190658e41c820f141b0fc33f8926c218b4ed609366a02249bb2d19ce3ea4528dbece68eead926b7916689c643a9e0d643387521fea2f693c2d6efc786ee46d9bfed3eff2a04669edf5295ff057a60bd865309246d3bbbedc1efef41d63a8dec9ab4fa7dd4510fc3c69234ca186e2d9c003b7a67bd034bad0a5bb96e25d575267889cc1b54446d9bd0a37bfbfbd02925945a72cba8dddc48b3f87b1e58f23c623f292bdb7fa7cf38a0a5750f54ebba56a9a67fc516b6d6fd3970ea9234677c8dc7f38f6e4640ce282d1ac4b16bfa72c1d2bad430cd1ba822061865f5007d3daac19cf547c189357d561bbd3eee683c62cd786e9b73337b8c7bd512bd39f06adedec2de0d5ae639da372e6485363107f97767b505cee755d03a5e58ac228659af123184b7b733322e38c91dbf5a943ab3d52e64b49ee755d2e64950e238e35f10c884e17cbe87dc540e6d7509a4f110e9f7566a471712850abf6ce463e6280bacea36fd33a4497f773cf32c698dcc4beee33938edc7ad05534aea683ae61d64c4d2a69b6b88d16d5ca5c303f3e386cf61db140e27b5e99e96b64bdd562b6b30aa36c6c37cac7dc9eec6b42c1a66a962fa70beb6b516d0cbe76322f86c78f6c66831bf8b5d5d2dfa35a5dce60b1933b6ce3c788769f2b331ec1b8fd2831b79649984b239773c1dc68129725c1c640e73400ec781d8fb1a03c4a85d0c8582640257bd01e51fc42236263c9c67be280429c6037eb405dbf5fd682c2a0bb976cf07d3fc5009279ef8ec4e68193a9902b28e7dc71fb501d95b098e0f6dd9e0d0049131019b047b8390281bb292484e47c8500c4f242c3076bf704704739a0be7c3febfbae9a5daf23cd017c7e19fb107bb67d0f6fd6837cd2757d1fab34f4f05e37dde630b1c3a91edf4f7159103d6eb7da65fdbdf59dadb5e2460ac876ed9e1c8c060f9efe9c8a0a75cfc42d5742d2ee5a7e9dbb494b6d6b9bc930cce4f940e3cd81ed4160e98f88315e689fff0022b57664199cc5196f0c7a164ef8f98cd0589baffa68590985eb15c0db1985839f6c2919340b69d03f5285bdd6f4bf021424db4329cb153fccc3d09c76a090d3340d2f479a7bab3b38e2924e5e451cfd280d7dafe936f6c5e4bd89813b02a36589ce318a0358dc35cc4e17f9bf234cdbb78fa0c607a7340e6cec20b1596610c6934b8323226379edda81da8dcb9ec40a042f50b5bb21645473b58b11dbd7bfca8304f8add5d67a9ea8ba5d8ea72c1a4d8a952f10f2c920e368cf71e99fad5833dd0754d6ed66bdb2e9a91a5babb2a310465a57c1ddc1038e7bd5171d3748b8d46ee1ff005298dc6a764c27d4eeaee7fe1c01795881c9e7804fe940dbe287c4b6d75a1b1d1c986d62277c91bf131f4c0f6fad0663737135d3b497124924871f98e7803007d2811dc5b83903dc0a0333f03be7de8122df2c9a05a11e5f51f7a05ce7071804fca8033e5da0734020b0183bb23e5416269577ed0e5323078ceeefdff6a03dbcd62914c2f629a47c622689800879e4fbd046f9d8a2a03e31385c0e73da8b83ca590947dcaead8208e73da8849b3e19ce704f7c5015586d006431f5cf61f3a04ee586ff002481c8fe6191408f0011eb8e30682774dea9bbb5784492ca6385832e1ca95e3d2834be9df8c312e2db5eb4375080337000f1303d18763591a469baef4d755989ec6f6dae5a23e20b599406dd8e080ddbed41272f4dd8caf1c86d163910f9595882a3d718a035edd695d3b6a926b57d0ac65b10b4e06eedd863bf141077fd7af2782bd3fa26a1a8891d57c630948c0279393dcd04cf5875258f4de9f0cb7b7b6d66d2b81ba752d85f5214724fed41036bd79d2fe319d7a8f4b9c81e58de2f04827b9ce09a07a3acecf54b790685ace8697606009e52c377b7f2e682b097d7d36acf0f55df5edbdc0977412468cb6ce3be10af3c63b9c8a0b0751f505be9690dd5d752436f62a3fe4c6448f3b7b0c64e38f615734651f107e3045ac42b67a7693018633b965bc1bc838ee173807bf7cd33065baaeb1a95f2c11dfcd2bc51fe48880aa3e8a062a8b059f595df4ae9a74de9e9ec499d43c97b1427c6e47e525bb63e4282ad3ea3712893c599dbc4259c1627713c927de81043950df97db1406da8411c92063be280230839627078e79a0390a71b5bb5003a8c1232338e4507025573e9fbd02a0e41dc0e680c3691cf714053bb34160895dc16f291d98d02322aa39f3e14707ffaa06f202a5bb0c7201f4a343aca51090497efdfbfce89840c8db8e46573923ff14410b00490d9f5c1a0425dd8ce4673e873cd0265e4dbe7041ed814009b8cbb8e5863bd07163b7716e0607b6698060b96b7b9478dc8643918247ee39a60b7e97f133a8b4e0c63d4ee597380923970a3ef4c0e13e25dfcfab457ba95bdbddb212016501867b9cfbfda982f907c74b282da34874a9048aa479c83838edc62982b7ac7c42d235cd67f15ac5b40c366418a2cb0c1c81e6f5e31db14c160d035de8cd4a3f18ea96562cc37359dfe9cac887fef039fd6b39446f56ea5d13a9dca4579a922496b1975b8d22dfc3566cf9557230703be715ac1431d4d2275325d7fae6b4f6f182a93ef1e32a9f41938f6a60afeb1a95c5fea53dccf772cf2c8c489240031f627e7565c0d67bbf160487c1801073bc0c31f91f953420f2bc8c7c52cc540032738a809905c0f4fa501940208e73df34028e703938a0577ae013f4a001300db4f03b71407461ce0502dca8c9c7dcf6a003fafcbdcd0070bc1e0fd734070db467b8a04cb9c9e68274b93bcb1daa40200ed4099765249ec476cf340849b8b264823bf34689ee009cb671df1409bc8e8b8e770e3ec68984d9c953cf97be2860b248caaebc107dc67f7a184c31232db88fd451031ce50e76039f5c8045026efb8f93279e0fd680b239504f0483d88ef409ee25bb90c79c0e050151c6e21b39ce783eb40adbcc2cefa17bdb61322387781c950e3dbdf9c8a066f28790b22e013db3dbef54726081e63c6460d34191b1bb0720f634060e7600412c781502409c8e3d7b500ed71dbef8ed40243f181c0a02e5d4e0fad006f644e4819e3b501f7e3049e7b501bc43b4e391da80558003392d40a23305e320d02e64cf998e1bf5a032b0c927b8e68049c8c8e71c6280377043118f4e680bbff00de0504ddbb3128371c1c64668024e59f3cd02521254e4fad1a2107e48fe6a6809ddb9e78a029e1463d05027ffc744a6c3857c7b1a205ff00e637fbf4a02b12b1794e39f4a02024e7249ed409924720906800005173fd7404989698ee39e4f7a04cf723d07a501fff0097ed406ffe36a018ff00281e99a037f4d0731f3bfd28007e53400ff99a810248c0cf140bc60123233cff008a0557f9beb4056eff007a07109243e79a03778b27bfbd02b128c27039a054001b818a06609de793da815006070283ffd9}\par}
+}
diff --git a/test/rtf/link.native b/test/rtf/link.native
new file mode 100644
index 000000000..63a0d19ff
--- /dev/null
+++ b/test/rtf/link.native
@@ -0,0 +1,9 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "pandoc" ]
+ ( "http://pandoc.org" , "" )
+ ]
+ ]
diff --git a/test/rtf/link.rtf b/test/rtf/link.rtf
new file mode 100644
index 000000000..7d872abed
--- /dev/null
+++ b/test/rtf/link.rtf
@@ -0,0 +1,7 @@
+{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}}
+{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
+\widowctrl\hyphauto
+
+{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "http://pandoc.org"}}{\fldrslt{pandoc}}}
+\par}
+}
diff --git a/test/rtf/list_complex.native b/test/rtf/list_complex.native
new file mode 100644
index 000000000..9dfd17755
--- /dev/null
+++ b/test/rtf/list_complex.native
@@ -0,0 +1,64 @@
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaInlines [ Str "Cynthia" , Space , Str "Johnson" ]
+ )
+ , ( "operator"
+ , MetaInlines [ Str "John" , Space , Str "MacFarlane" ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Text"
+ , Space
+ , Str "before"
+ , Space
+ , Str "list"
+ ]
+ )
+ ]
+ }
+ [ OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ]
+ , OrderedList
+ ( 1 , LowerAlpha , Period )
+ [ [ Para [ Str "Three" ] ]
+ , [ Para [ Str "Four" ]
+ , OrderedList
+ ( 1 , LowerRoman , Period )
+ [ [ Para [ Str "Five" ] ]
+ , [ Para [ Str "Six" ]
+ , OrderedList
+ ( 1 , UpperAlpha , Period )
+ [ [ Para [ Str "Seven" ] ]
+ , [ Para [ Str "Eight" ]
+ , OrderedList
+ ( 1 , UpperRoman , Period )
+ [ [ Para [ Str "Nine" ] ]
+ , [ Para [ Str "Ten" ]
+ , BulletList
+ [ [ Para [ Str "Eleven" ] ]
+ , [ Para [ Str "Twelve" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Out" , Space , Str "of" , Space , Str "list!" ]
+ , Para [ Str "Start" , Space , Str "with" ]
+ , OrderedList
+ ( 7 , Decimal , Period )
+ [ [ Para [ Str "Seven" , Space , Str "Start" ] ]
+ , [ Para [ Str "Eight" , Space , Str "Continue" ] ]
+ ]
+ ]
diff --git a/test/rtf/list_complex.rtf b/test/rtf/list_complex.rtf
new file mode 100644
index 000000000..3b21efc74
--- /dev/null
+++ b/test/rtf/list_complex.rtf
@@ -0,0 +1,299 @@
+{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff45\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f2\fbidi \fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}
+{\f3\fbidi \fdecor\fcharset2\fprq2{\*\panose 00000000000000000000}Symbol;}{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\f45\fbidi \fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Times;}
+{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fhimajor\f31502\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0302020204030204}Calibri Light;}{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f52\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\f53\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f55\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f56\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f57\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\f58\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f59\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f60\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f72\fbidi \fmodern\fcharset238\fprq1 Courier New CE;}
+{\f73\fbidi \fmodern\fcharset204\fprq1 Courier New Cyr;}{\f75\fbidi \fmodern\fcharset161\fprq1 Courier New Greek;}{\f76\fbidi \fmodern\fcharset162\fprq1 Courier New Tur;}{\f77\fbidi \fmodern\fcharset177\fprq1 Courier New (Hebrew);}
+{\f78\fbidi \fmodern\fcharset178\fprq1 Courier New (Arabic);}{\f79\fbidi \fmodern\fcharset186\fprq1 Courier New Baltic;}{\f80\fbidi \fmodern\fcharset163\fprq1 Courier New (Vietnamese);}{\f392\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}
+{\f393\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;}{\f395\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f396\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f399\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}
+{\f400\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);}{\f502\fbidi \fnil\fcharset238\fprq2 Times CE;}{\f503\fbidi \fnil\fcharset204\fprq2 Times Cyr;}{\f505\fbidi \fnil\fcharset161\fprq2 Times Greek;}
+{\f506\fbidi \fnil\fcharset162\fprq2 Times Tur;}{\f509\fbidi \fnil\fcharset186\fprq2 Times Baltic;}{\f510\fbidi \fnil\fcharset163\fprq2 Times (Vietnamese);}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\fhimajor\f31528\fbidi \fswiss\fcharset238\fprq2 Calibri Light CE;}{\fhimajor\f31529\fbidi \fswiss\fcharset204\fprq2 Calibri Light Cyr;}{\fhimajor\f31531\fbidi \fswiss\fcharset161\fprq2 Calibri Light Greek;}
+{\fhimajor\f31532\fbidi \fswiss\fcharset162\fprq2 Calibri Light Tur;}{\fhimajor\f31533\fbidi \fswiss\fcharset177\fprq2 Calibri Light (Hebrew);}{\fhimajor\f31534\fbidi \fswiss\fcharset178\fprq2 Calibri Light (Arabic);}
+{\fhimajor\f31535\fbidi \fswiss\fcharset186\fprq2 Calibri Light Baltic;}{\fhimajor\f31536\fbidi \fswiss\fcharset163\fprq2 Calibri Light (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}
+{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}
+{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}
+{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}
+{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}
+{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;}{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}
+{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue0;\red0\green0\blue0;}{\*\defchp \fs24\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af45\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe1033\loch\f45\hich\af45\dbch\af31505\cgrid\langnp1033\langfenp1033 \snext0 \sqformat \spriority0 Normal;}{\*\cs10 \additive Default Paragraph Font;}{\*
+\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
+\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1033\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1033\langfenp1033
+\snext11 \ssemihidden \sunhideused Normal Table;}}{\*\listtable{\list\listtemplateid2032649{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 _;}{\levelnumbers;}
+\fs28\cf0\loch\af3\hich\af3\dbch\af0\fbias0\hres0\chhres0 \fi-360\li360\jclisttab\tx360\lin360 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'04\'00.\'01.;}{\levelnumbers\'01\'03;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-432\li792\jclisttab\tx792\lin792 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'06\'00.\'01.\'02.;}{\levelnumbers\'01\'03\'05;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-504\li1224\jclisttab\tx1440\lin1224 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'08\'00.\'01.\'02.\'03.;}{\levelnumbers
+\'01\'03\'05\'07;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-648\li1728\jclisttab\tx2160\lin1728 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'0a\'00.\'01.\'02.\'03.\'04.;}{\levelnumbers\'01\'03\'05\'07\'09;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-792\li2232\jclisttab\tx2520\lin2232 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\'0c\'00.\'01.\'02.\'03.\'04.\'05.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-936\li2736\jclisttab\tx3240\lin2736 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'0e\'00.\'01.\'02.\'03.\'04.\'05.\'06.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-1080\li3240\jclisttab\tx3600\lin3240 }{\listlevel\levelnfc0\levelnfcn0\leveljc0
+\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'10\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-1224\li3744\jclisttab\tx4320\lin3744 }
+{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'12\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\rtlch\fcs1 \af0 \ltrch\fcs0
+\hres0\chhres0 \fi-1440\li4320\jclisttab\tx4680\lin4320 }{\listname ;}\listid161162663}{\list\listtemplateid-1055851588{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
+\hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }
+{\listlevel\levelnfc1\levelnfcn1\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace540\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li3420\lin3420 }{\listlevel\levelnfc23\levelnfcn23
+\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li4500\lin4500 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid180975272}{\list\listtemplateid-1055851588\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext
+\leveltemplateid67698709\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc1\levelnfcn1\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace540\levelindent0{\leveltext
+\leveltemplateid67698707\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li3420\lin3420 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext
+\leveltemplateid67698691\'01o;}{\levelnumbers;}\f2\fbias0\hres0\chhres0 \fi-360\li4500\lin4500 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703
+\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713
+\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715
+\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid581336416}{\list\listtemplateid-1516889114\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\lvltentative
+\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid592708402}{\list\listtemplateid353931476{\listlevel\levelnfc0\levelnfcn0
+\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0
+{\leveltext\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\'02\'03.;}{\levelnumbers
+\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc1\levelnfcn1\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace540\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
+\hres0\chhres0 \fi-180\li3420\lin3420 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }
+{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0
+\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid621182402}{\list\listtemplateid-37037068{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
+\hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }
+{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0
+\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid982349901}{\list\listtemplateid-2094603378{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
+\hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }
+{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0
+\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1
+\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid1082678316}{\list\listtemplateid166376406\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0
+\leveljcn0\levelfollow0\levelstartat7\levelspace0\levelindent0{\leveltext\leveltemplateid-1898031884\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0 \fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698703\'02\'06.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698713\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2
+\levelfollow0\levelstartat1\lvltentative\levelspace0\levelindent0{\leveltext\leveltemplateid67698715\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }{\listname ;}\listid1306352145}
+{\list\listtemplateid2032649{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li360\jclisttab\tx360\lin360 }
+{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'04\'00.\'01.;}{\levelnumbers\'01\'03;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-432\li792\jclisttab\tx792\lin792 }{\listlevel
+\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'06\'00.\'01.\'02.;}{\levelnumbers\'01\'03\'05;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-504\li1224\jclisttab\tx1440\lin1224 }{\listlevel
+\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'08\'00.\'01.\'02.\'03.;}{\levelnumbers\'01\'03\'05\'07;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-648\li1728\jclisttab\tx2160\lin1728 }
+{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0a\'00.\'01.\'02.\'03.\'04.;}{\levelnumbers\'01\'03\'05\'07\'09;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-792\li2232
+\jclisttab\tx2520\lin2232 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0c\'00.\'01.\'02.\'03.\'04.\'05.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b;}\rtlch\fcs1 \af0 \ltrch\fcs0
+\hres0\chhres0 \fi-936\li2736\jclisttab\tx3240\lin2736 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'0e\'00.\'01.\'02.\'03.\'04.\'05.\'06.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-1080\li3240\jclisttab\tx3600\lin3240 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'10\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-1224\li3744\jclisttab\tx4320\lin3744 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'12\'00.\'01.\'02.\'03.\'04.\'05.\'06.\'07.\'08.;}{\levelnumbers\'01\'03\'05\'07\'09\'0b\'0d\'0f\'11;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-1440\li4320\jclisttab\tx4680\lin4320 }{\listname
+;}\listid1517575639}{\list\listtemplateid-2069710980{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \fbias0\hres0\chhres0
+\fi-360\li720\lin720 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'01.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li1440\lin1440 }{\listlevel
+\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li2160\lin2160 }{\listlevel\levelnfc3\levelnfcn3\leveljc0\leveljcn0
+\levelfollow0\levelstartat1\levelspace360\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li2880\lin2880 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li3600\lin3600 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'05.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}
+\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-360\li5040\lin5040 }{\listlevel\levelnfc4\levelnfcn4\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0
+\hres0\chhres0 \fi-360\li5760\lin5760 }{\listlevel\levelnfc2\levelnfcn2\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\rtlch\fcs1 \af0 \ltrch\fcs0 \hres0\chhres0 \fi-180\li6480\lin6480 }
+{\listname ;}\listid1762801537}}{\*\listoverridetable{\listoverride\listid1517575639\listoverridecount0\ls1}{\listoverride\listid161162663\listoverridecount0\ls2}{\listoverride\listid581336416\listoverridecount0\ls3}{\listoverride\listid1082678316
+\listoverridecount0\ls4}{\listoverride\listid1762801537\listoverridecount0\ls5}{\listoverride\listid621182402\listoverridecount0\ls6}{\listoverride\listid592708402\listoverridecount0\ls7}{\listoverride\listid180975272\listoverridecount0\ls8}
+{\listoverride\listid1306352145\listoverridecount0\levelstartat7\ls9}{\listoverride\listid982349901\listoverridecount0\ls10}}{\*\rsidtbl \rsid329053\rsid3617154\rsid3749795\rsid9258424}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0
+\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\title Text before list}{\author Cynthia Johnson}{\operator John MacFarlane}{\creatim\yr2003\mo10\dy13\hr19\min55}{\revtim\yr2021\mo8\dy9\hr10\min28}{\version4}{\edmins6}{\nofpages1}{\nofwords15}
+{\nofchars87}{\nofcharsws101}{\vern4617}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1440\margr1440\margt1440\margb1440\gutter0\ltrsect
+\widowctrl\ftnbj\aenddoc\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\noxlattoyen
+\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow0\dgvshow0
+\jexpand\viewkind1\viewscale154\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\rsidroot3749795 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect
+\linex0\endnhere\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4
+\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}
+{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424
+\hich\af45\dbch\af31505\loch\f45 1.\tab}\pard\plain \ltrpar\ql \fi-360\li720\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls3\adjustright\rin0\lin720\itap0\pararsid9258424 \rtlch\fcs1 \af45\afs24\alang1025 \ltrch\fcs0
+\fs24\lang1033\langfe1033\loch\af45\hich\af45\dbch\af31505\cgrid\langnp1033\langfenp1033 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 One}{\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid329053
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 2.\tab}}{\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 Two
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 a.\tab}}\pard \ltrpar
+\ql \fi-360\li1440\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl1\adjustright\rin0\lin1440\itap0\pararsid9258424 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 Three
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 b.\tab}\hich\af45\dbch\af31505\loch\f45 Four
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 i.\tab}}\pard \ltrpar
+\ql \fi-180\li2160\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl2\adjustright\rin0\lin2160\itap0\pararsid9258424 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 Five
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 ii.\tab}\hich\af45\dbch\af31505\loch\f45 Six
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 A.\tab}}\pard \ltrpar
+\ql \fi-360\li2880\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl3\adjustright\rin0\lin2880\itap0\pararsid9258424 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 Seven
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 B.\tab}\hich\af45\dbch\af31505\loch\f45 Eight
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 I.\tab}}\pard \ltrpar
+\ql \fi-180\li3420\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl4\adjustright\rin0\lin3420\itap0\pararsid9258424 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 Nine
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af0 \ltrch\fcs0 \f45\insrsid9258424 \hich\af45\dbch\af31505\loch\f45 II.\tab}\hich\af45\dbch\af31505\loch\f45 Ten
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af45 \ltrch\fcs0 \f2\insrsid9258424 \hich\af2\dbch\af31505\loch\f2 o\tab}}\pard \ltrpar\ql \fi-360\li4500\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls3\ilvl5\adjustright\rin0\lin4500\itap0\pararsid9258424 {
+\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 Eleven
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af45 \ltrch\fcs0 \f2\insrsid9258424 \hich\af2\dbch\af31505\loch\f2 o\tab}\hich\af45\dbch\af31505\loch\f45 Twelve
+\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid9258424 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424 \hich\af45\dbch\af31505\loch\f45 Out of list!
+\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3617154 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3617154 \hich\af45\dbch\af31505\loch\f45 Start with
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af45 \ltrch\fcs0 \f45\insrsid3617154 \hich\af45\dbch\af31505\loch\f45 7.\tab}}\pard \ltrpar\ql \fi-360\li720\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\ls9\adjustright\rin0\lin720\itap0\pararsid3617154 {
+\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3617154 \hich\af45\dbch\af31505\loch\f45 Seven Start
+\par {\listtext\pard\plain\ltrpar \rtlch\fcs1 \af45 \ltrch\fcs0 \f45\insrsid3617154 \hich\af45\dbch\af31505\loch\f45 8.\tab}\hich\af45\dbch\af31505\loch\f45 Eight Continue
+\par }\pard \ltrpar\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid3617154 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3617154
+\par }\pard \ltrpar\ql \li4140\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin4140\itap0\pararsid9258424 {\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid9258424
+\par }{\rtlch\fcs1 \af45 \ltrch\fcs0 \insrsid3617154
+\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a
+9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad
+5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6
+b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0
+0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6
+a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f
+c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512
+0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462
+a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865
+6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b
+4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b
+4757e8d3f729e245eb2b260a0238fd010000ffff0300504b030414000600080000002100b6f4679893070000c9200000160000007468656d652f7468656d652f
+7468656d65312e786d6cec59cd8b1bc915bf07f23f347d97f5d5ad8fc1f2a24fcfda33b6b164873dd648a5eef2547789aad28cc56208de532e81c026e49085bd
+ed21842cecc22eb9e48f31d8249b3f22afaa5bdd5552c99e191c3061463074977eefd5afde7bf5de53d5ddcf5e26d4bbc05c1096f6fcfa9d9aefe174ce16248d
+7afeb3d9a4d2f13d2151ba4094a5b8e76fb0f03fbbf7eb5fdd454732c609f6403e1547a8e7c752ae8eaa5531876124eeb0154ee1bb25e30992f0caa3ea82a34b
+d09bd06aa3566b55134452df4b51026a1f2f97648ebd9952e9dfdb2a1f53784da5500373caa74a35b6243476715e5708b11143cabd0b447b3eccb3609733fc52
+fa1e4542c2173dbfa6fffceabdbb5574940b517940d6909be8bf5c2e17589c37f49c3c3a2b260d823068f50bfd1a40e53e6edc1eb7c6ad429f06a0f91c569a71
+b175b61bc320c71aa0ecd1a17bd41e35eb16ded0dfdce3dc0fd5c7c26b50a63fd8c34f2643b0a285d7a00c1feee1c3417730b2f56b50866fede1dbb5fe28685b
+fa3528a6243ddf43d7c25673b85d6d0159327aec8477c360d26ee4ca4b144443115d6a8a254be5a1584bd00bc6270050408a24493db959e1259a43140f112567
+9c7827248a21f056286502866b8ddaa4d684ffea13e827ed5174849121ad780113b137a4f87862cec94af6fc07a0d537206f7ffef9cdeb1fdfbcfee9cd575fbd
+79fdf77c6eadca923b466964cafdf2dd1ffef3cd6fbd7ffff0ed2f5fff319b7a172f4cfcbbbffdeedd3ffef93ef5b0e2d2146ffff4fdbb1fbf7ffbe7dfffebaf
+5f3bb4f7393a33e1339260e13dc297de5396c0021dfcf119bf9ec42c46c494e8a791402952b338f48f656ca11f6d10450edc00db767cce21d5b880f7d72f2cc2
+d398af2571687c182716f094313a60dc6985876a2ec3ccb3751ab927e76b13f714a10bd7dc43945a5e1eaf579063894be530c616cd2714a5124538c5d253dfb1
+738c1dabfb8210cbaea764ce99604be97d41bc01224e93ccc899154da5d03149c02f1b1741f0b7659bd3e7de8051d7aa47f8c246c2de40d4417e86a965c6fb68
+2d51e252394309350d7e8264ec2239ddf0b9891b0b099e8e3065de78818570c93ce6b05ec3e90f21cdb8dd7e4a37898de4929cbb749e20c64ce4889d0f6394ac
+5cd829496313fbb938871045de13265df05366ef10f50e7e40e941773f27d872f787b3c133c8b026a53240d4376beef0e57dccacf89d6ee8126157aae9f3c44a
+b17d4e9cd131584756689f604cd1255a60ec3dfbdcc160c05696cd4bd20f62c82ac7d815580f901dabea3dc5027a25d5dcece7c91322ac909de2881de073bad9
+493c1b9426881fd2fc08bc6eda7c0ca52e7105c0633a3f37818f08f480102f4ea33c16a0c308ee835a9fc4c82a60ea5db8e375c32dff5d658fc1be7c61d1b8c2
+be04197c6d1948eca6cc7b6d3343d49aa00c9819822ec3956e41c4727f29a28aab165b3be596f6a62ddd00dd91d5f42424fd6007b4d3fb84ffbbde073a8cb77f
+f9c6b10f3e4ebfe3566c25ab6b763a8792c9f14e7f7308b7dbd50c195f904fbfa919a175fa04431dd9cf58b73dcd6d4fe3ffdff73487f6f36d2773a8dfb8ed64
+7ce8306e3b99fc70e5e3743265f3027d8d3af0c80e7af4b14f72f0d46749289dca0dc527421ffc08f83db398c0a092d3279eb838055cc5f0a8ca1c4c60e1228e
+b48cc799fc0d91f134462b381daafb4a492472d591f0564cc0a1911e76ea5678ba4e4ed9223becacd7d5c16656590592e5782d2cc6e1a04a66e856bb3cc02bd4
+6bb6913e68dd1250b2d721614c6693683a48b4b783ca48fa58178ce620a157f65158741d2c3a4afdd6557b2c805ae115f8c1edc1cff49e1f06200242701e07cd
+f942f92973f5d6bbda991fd3d3878c69450034d8db08283ddd555c0f2e4fad2e0bb52b78da2261849b4d425b46377822869fc17974aad1abd0b8aeafbba54b2d
+7aca147a3e08ad9246bbf33e1637f535c8ede6069a9a9982a6de65cf6f35430899395af5fc251c1ac363b282d811ea3717a211dcbccc25cf36fc4d32cb8a0b39
+4222ce0cae934e960d122231f728497abe5a7ee1069aea1ca2b9d51b90103e59725d482b9f1a3970baed64bc5ce2b934dd6e8c284b67af90e1b35ce1fc568bdf
+1cac24d91adc3d8d1797de195df3a708422c6cd795011744c0dd413db3e682c0655891c8caf8db294c79da356fa3740c65e388ae62945714339967709dca0b3a
+faadb081f196af190c6a98242f8467912ab0a651ad6a5a548d8cc3c1aafb6121653923699635d3ca2aaa6abab39835c3b60cecd8f26645de60b53531e434b3c2
+67a97b37e576b7b96ea74f28aa0418bcb09fa3ea5ea12018d4cac92c6a8af17e1a56393b1fb56bc776811fa07695226164fdd656ed8edd8a1ae19c0e066f54f9
+416e376a6168b9ed2bb5a5f5adb979b1cdce5e40f2184197bba6526857c2c92e47d0104d754f92a50dd8222f65be35e0c95b73d2f3bfac85fd60d80887955a27
+1c57826650ab74c27eb3d20fc3667d1cd66ba341e31514161927f530bbb19fc00506dde4f7f67a7cefee3ed9ded1dc99b3a4caf4dd7c5513d777f7f5c6e1bb7b
+8f40d2f9b2d598749bdd41abd26df627956034e854bac3d6a0326a0ddba3c9681876ba9357be77a1c141bf390c5ae34ea5551f0e2b41aba6e877ba9576d068f4
+8376bf330efaaff23606569ea58fdc16605ecdebde7f010000ffff0300504b0304140006000800000021000dd1909fb60000001b010000270000007468656d65
+2f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f78277086f6fd3ba109126dd88d0add40384e4350d36
+3f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89d93b64b060828e6f37ed1567914b284d262452282e
+3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd5001996509affb3fd381a89672f1f165dfe514173d985
+0528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0fbfff0000001c020000130000000000000000000000
+0000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6a7e7c0000000360100000b00000000000000000000
+000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a0000001c0000000000000000000000000019020000
+7468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d0014000600080000002100b6f4679893070000c92000001600000000000000
+000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d00140006000800000021000dd1909fb60000001b01000027000000
+000000000000000000009d0a00007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000980b00000000}
+{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d
+617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169
+6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363
+656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e}
+{\*\latentstyles\lsdstimax376\lsdlockeddef0\lsdsemihiddendef0\lsdunhideuseddef0\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 2;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 3;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 5;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 7;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 8;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index 9;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 1;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 2;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 4;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 5;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 6;
+\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 7;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 8;\lsdsemihidden1 \lsdunhideused1 \lsdpriority39 \lsdlocked0 toc 9;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 header;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footer;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 index heading;\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of figures;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 envelope return;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 footnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation reference;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 line number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 page number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote reference;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 endnote text;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 table of authorities;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 macro;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 toa heading;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Bullet 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 4;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Number 5;\lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Closing;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Signature;\lsdsemihidden1 \lsdlocked0 Default Paragraph Font;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 4;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 List Continue 5;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Message Header;\lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Salutation;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Date;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text First Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Note Heading;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Body Text Indent 3;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Block Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 FollowedHyperlink;\lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;
+\lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Document Map;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Plain Text;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 E-mail Signature;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Top of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Bottom of Form;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Normal (Web);\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Acronym;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Address;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Cite;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Code;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Definition;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Keyboard;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Preformatted;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Sample;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Typewriter;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 HTML Variable;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 annotation subject;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 No List;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 1;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 2;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Outline List 3;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Balloon Text;\lsdpriority39 \lsdlocked0 Table Grid;
+\lsdsemihidden1 \lsdlocked0 Placeholder Text;\lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing;\lsdpriority60 \lsdlocked0 Light Shading;\lsdpriority61 \lsdlocked0 Light List;\lsdpriority62 \lsdlocked0 Light Grid;
+\lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdpriority65 \lsdlocked0 Medium List 1;\lsdpriority66 \lsdlocked0 Medium List 2;\lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdpriority68 \lsdlocked0 Medium Grid 2;
+\lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdpriority70 \lsdlocked0 Dark List;\lsdpriority71 \lsdlocked0 Colorful Shading;\lsdpriority72 \lsdlocked0 Colorful List;\lsdpriority73 \lsdlocked0 Colorful Grid;\lsdpriority60 \lsdlocked0 Light Shading Accent 1;
+\lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;
+\lsdsemihidden1 \lsdlocked0 Revision;\lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 1;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdpriority60 \lsdlocked0 Light Shading Accent 2;\lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdpriority62 \lsdlocked0 Light Grid Accent 2;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 2;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2;\lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 2;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdpriority61 \lsdlocked0 Light List Accent 3;\lsdpriority62 \lsdlocked0 Light Grid Accent 3;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdpriority70 \lsdlocked0 Dark List Accent 3;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 3;\lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdpriority62 \lsdlocked0 Light Grid Accent 4;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 4;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 4;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdpriority60 \lsdlocked0 Light Shading Accent 5;\lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdpriority62 \lsdlocked0 Light Grid Accent 5;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 5;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5;\lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 5;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdpriority61 \lsdlocked0 Light List Accent 6;\lsdpriority62 \lsdlocked0 Light Grid Accent 6;
+\lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6;\lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;
+\lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6;\lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdpriority70 \lsdlocked0 Dark List Accent 6;\lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;
+\lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdpriority73 \lsdlocked0 Colorful Grid Accent 6;\lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis;
+\lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference;\lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdsemihidden1 \lsdunhideused1 \lsdpriority37 \lsdlocked0 Bibliography;
+\lsdsemihidden1 \lsdunhideused1 \lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;\lsdpriority41 \lsdlocked0 Plain Table 1;\lsdpriority42 \lsdlocked0 Plain Table 2;\lsdpriority43 \lsdlocked0 Plain Table 3;\lsdpriority44 \lsdlocked0 Plain Table 4;
+\lsdpriority45 \lsdlocked0 Plain Table 5;\lsdpriority40 \lsdlocked0 Grid Table Light;\lsdpriority46 \lsdlocked0 Grid Table 1 Light;\lsdpriority47 \lsdlocked0 Grid Table 2;\lsdpriority48 \lsdlocked0 Grid Table 3;\lsdpriority49 \lsdlocked0 Grid Table 4;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 1;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 1;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 1;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 1;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 1;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 2;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 2;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 2;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 2;
+\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 3;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 3;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 3;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 3;
+\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 3;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 4;
+\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 4;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 4;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 4;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 4;
+\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 4;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 5;
+\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 5;\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 5;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 5;
+\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 5;\lsdpriority46 \lsdlocked0 Grid Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 Grid Table 2 Accent 6;\lsdpriority48 \lsdlocked0 Grid Table 3 Accent 6;
+\lsdpriority49 \lsdlocked0 Grid Table 4 Accent 6;\lsdpriority50 \lsdlocked0 Grid Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 Grid Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 Grid Table 7 Colorful Accent 6;
+\lsdpriority46 \lsdlocked0 List Table 1 Light;\lsdpriority47 \lsdlocked0 List Table 2;\lsdpriority48 \lsdlocked0 List Table 3;\lsdpriority49 \lsdlocked0 List Table 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful;\lsdpriority52 \lsdlocked0 List Table 7 Colorful;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 1;\lsdpriority47 \lsdlocked0 List Table 2 Accent 1;\lsdpriority48 \lsdlocked0 List Table 3 Accent 1;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 1;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 1;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 1;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 1;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 2;\lsdpriority47 \lsdlocked0 List Table 2 Accent 2;\lsdpriority48 \lsdlocked0 List Table 3 Accent 2;\lsdpriority49 \lsdlocked0 List Table 4 Accent 2;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 2;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 2;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 2;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 3;
+\lsdpriority47 \lsdlocked0 List Table 2 Accent 3;\lsdpriority48 \lsdlocked0 List Table 3 Accent 3;\lsdpriority49 \lsdlocked0 List Table 4 Accent 3;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 3;
+\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 3;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 3;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 4;\lsdpriority47 \lsdlocked0 List Table 2 Accent 4;
+\lsdpriority48 \lsdlocked0 List Table 3 Accent 4;\lsdpriority49 \lsdlocked0 List Table 4 Accent 4;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 4;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 4;
+\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 4;\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 5;\lsdpriority47 \lsdlocked0 List Table 2 Accent 5;\lsdpriority48 \lsdlocked0 List Table 3 Accent 5;
+\lsdpriority49 \lsdlocked0 List Table 4 Accent 5;\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 5;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 5;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 5;
+\lsdpriority46 \lsdlocked0 List Table 1 Light Accent 6;\lsdpriority47 \lsdlocked0 List Table 2 Accent 6;\lsdpriority48 \lsdlocked0 List Table 3 Accent 6;\lsdpriority49 \lsdlocked0 List Table 4 Accent 6;
+\lsdpriority50 \lsdlocked0 List Table 5 Dark Accent 6;\lsdpriority51 \lsdlocked0 List Table 6 Colorful Accent 6;\lsdpriority52 \lsdlocked0 List Table 7 Colorful Accent 6;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Mention;
+\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Hyperlink;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Hashtag;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Unresolved Mention;\lsdsemihidden1 \lsdunhideused1 \lsdlocked0 Smart Link;}}{\*\datastore }}
diff --git a/test/rtf/list_simple.native b/test/rtf/list_simple.native
new file mode 100644
index 000000000..10d9dede2
--- /dev/null
+++ b/test/rtf/list_simple.native
@@ -0,0 +1,10 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ BulletList
+ [ [ Para [ Str "one" ] ]
+ , [ Para [ Str "two" ]
+ , BulletList [ [ Para [ Str "sub" ] ] ]
+ ]
+ ]
+ , BulletList [ [ Para [ Str "new" , Space , Str "list" ] ] ]
+ ]
diff --git a/test/rtf/list_simple.rtf b/test/rtf/list_simple.rtf
new file mode 100644
index 000000000..8ee557df7
--- /dev/null
+++ b/test/rtf/list_simple.rtf
@@ -0,0 +1,17 @@
+{\rtf1\ansi\ansicpg1252\cocoartf2513
+\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+{\*\expandedcolortbl;;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid2\'01\uc0\u8259 ;}{\levelnumbers;}\fi-360\li1440\lin1440 }{\listname ;}\listid1}
+{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid101\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid2}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}}
+\margl1440\margr1440\vieww11520\viewh8400\viewkind0
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0
+\f0\fs24 \cf0 {\listtext \uc0\u8226 }one\
+{\listtext \uc0\u8226 }two\
+\pard\tx940\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li1440\fi-1440\pardirnatural\partightenfactor0
+\ls1\ilvl1\cf0 {\listtext \uc0\u8259 }sub\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls2\ilvl0\cf0 {\listtext \uc0\u8226 }new list\
+} \ No newline at end of file
diff --git a/test/rtf/table_error_codes.native b/test/rtf/table_error_codes.native
new file mode 100644
index 000000000..33c143933
--- /dev/null
+++ b/test/rtf/table_error_codes.native
@@ -0,0 +1,422 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Code" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "Error" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocFailOnWarningError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocAppError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocTemplateError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "6" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocOptionError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "21" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocUnknownReaderError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "22" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocUnknownWriterError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "23" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocUnsupportedExtensionError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "24" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocCiteprocError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "31" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocEpubSubdirectoryError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "43" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocPDFError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "44" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocXMLError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "47" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocPDFProgramNotFoundError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "61" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocHttpError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "62" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocShouldNeverHappenError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "63" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocSomeError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "64" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocParseError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "65" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocParsecError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "66" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocMakePDFError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "67" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocSyntaxMapError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "83" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocFilterError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "91" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocMacroLoop" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "92" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocUTF8DecodingError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "93" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocIpynbDecodingError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "94" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocUnsupportedCharsetError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "97" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocCouldNotFindDataFileError" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "99" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "PandocResourceNotFound" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
diff --git a/test/rtf/table_error_codes.rtf b/test/rtf/table_error_codes.rtf
new file mode 100644
index 000000000..79ed61e10
--- /dev/null
+++ b/test/rtf/table_error_codes.rtf
@@ -0,0 +1,300 @@
+{\rtf1\ansi
+{
+\trowd \trgaph120
+\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Code\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Error\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 3\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocFailOnWarningError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 4\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocAppError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocTemplateError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 6\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocOptionError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 21\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocUnknownReaderError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 22\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocUnknownWriterError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 23\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocUnsupportedExtensionError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 24\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocCiteprocError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 31\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocEpubSubdirectoryError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 43\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocPDFError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 44\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocXMLError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 47\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocPDFProgramNotFoundError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 61\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocHttpError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 62\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocShouldNeverHappenError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 63\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocSomeError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 64\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocParseError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 65\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocParsecError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 66\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocMakePDFError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 67\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocSyntaxMapError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 83\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocFilterError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 91\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocMacroLoop\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 92\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocUTF8DecodingError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 93\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocIpynbDecodingError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 94\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocUnsupportedCharsetError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 97\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocCouldNotFindDataFileError\par}
+\cell}
+}
+\intbl\row}
+{
+\trowd \trgaph120
+\cellx4320\cellx8640
+\trkeep\intbl
+{
+{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 99\par}
+\cell}
+{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 PandocResourceNotFound\par}
+\cell}
+}
+\intbl\row}
+{\pard \ql \f0 \sa180 \li0 \fi0 \par}
+}
diff --git a/test/rtf/table_simple.native b/test/rtf/table_simple.native
new file mode 100644
index 000000000..dce03cf25
--- /dev/null
+++ b/test/rtf/table_simple.native
@@ -0,0 +1,73 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "A" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "B" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "C" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "D" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "E" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "F" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "G" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Para [ Str "H" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
diff --git a/test/rtf/table_simple.rtf b/test/rtf/table_simple.rtf
new file mode 100644
index 000000000..5d4aca686
--- /dev/null
+++ b/test/rtf/table_simple.rtf
@@ -0,0 +1,19 @@
+{\rtf1\ansi
+\par
+\trowd
+\cellx10836
+\pard \intbl A \cell
+\pard \intbl B \cell
+\pard \intbl C \cell
+\pard \intbl D \cell
+\row
+\trowd
+\cellx10836
+\pard \intbl E \cell
+\pard \intbl F \cell
+\pard \intbl G \cell
+\pard \intbl H \cell
+\row
+\pard
+}
+
diff --git a/test/rtf/unicode.native b/test/rtf/unicode.native
new file mode 100644
index 000000000..ed21b4f47
--- /dev/null
+++ b/test/rtf/unicode.native
@@ -0,0 +1,3 @@
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para [ Str "\8220hi\8221\8216hi\8217\61623\945\228" ] ]
diff --git a/test/rtf/unicode.rtf b/test/rtf/unicode.rtf
new file mode 100644
index 000000000..0cd9749e0
--- /dev/null
+++ b/test/rtf/unicode.rtf
@@ -0,0 +1,9 @@
+{\rtf1\ansi
+\pard
+\'93hi\'94
+\u8216\'93hi\u8217\'94
+\u-3913?
+\u945a
+{\uc2\u228\'E8a}
+\par
+}
diff --git a/test/s5-basic.html b/test/s5-basic.html
index 7440b575b..3a225da83 100644
--- a/test/s5-basic.html
+++ b/test/s5-basic.html
@@ -56,7 +56,8 @@
<div id="math" class="slide section level1">
<h1>Math</h1>
<ul>
-<li><span class="math inline">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
+<li><span class="math inline">$\frac{d}{dx}f(x)=\lim_{h\to
+0}\frac{f(x+h)-f(x)}{h}$</span></li>
</ul>
</div>
</div>
diff --git a/test/s5-fancy.html b/test/s5-fancy.html
index f5c41e561..00b25e80c 100644
--- a/test/s5-fancy.html
+++ b/test/s5-fancy.html
@@ -28,7 +28,9 @@
<link rel="stylesheet" href="s5/default/opera.css" type="text/css" media="projection" id="operaFix" />
<!-- S5 JS -->
<script src="s5/default/slides.js" type="text/javascript"></script>
- <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
+ <script
+ src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"
+ type="text/javascript"></script>
</head>
<body>
<div class="layout">
@@ -56,7 +58,8 @@
<div id="math" class="slide section level1">
<h1>Math</h1>
<ul class="incremental">
-<li><span class="math inline">\(\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\)</span></li>
+<li><span class="math inline">\(\frac{d}{dx}f(x)=\lim_{h\to
+0}\frac{f(x+h)-f(x)}{h}\)</span></li>
</ul>
</div>
</div>
diff --git a/test/s5-fragment.html b/test/s5-fragment.html
index 81c578d25..1a8d4839d 100644
--- a/test/s5-fragment.html
+++ b/test/s5-fragment.html
@@ -5,5 +5,6 @@
</ul>
<h1 id="math">Math</h1>
<ul>
-<li><span class="math inline">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
+<li><span class="math inline">$\frac{d}{dx}f(x)=\lim_{h\to
+0}\frac{f(x+h)-f(x)}{h}$</span></li>
</ul>
diff --git a/test/s5-inserts.html b/test/s5-inserts.html
index 1df9dd018..04dfc134a 100644
--- a/test/s5-inserts.html
+++ b/test/s5-inserts.html
@@ -35,7 +35,8 @@ STUFF INSERTED
</ul>
<h1 id="math">Math</h1>
<ul>
-<li><span class="math inline">$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span></li>
+<li><span class="math inline">$\frac{d}{dx}f(x)=\lim_{h\to
+0}\frac{f(x+h)-f(x)}{h}$</span></li>
</ul>
STUFF INSERTED
</body>
diff --git a/test/tables-rstsubset.native b/test/tables-rstsubset.native
index 2536ff954..ba3fb211a 100644
--- a/test/tables-rstsubset.native
+++ b/test/tables-rstsubset.native
@@ -1,301 +1,973 @@
-[Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Here\8217s",Space,Str "the",Space,Str "caption.",Space,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."]])
- [(AlignDefault,ColWidth 0.1375)
- ,(AlignDefault,ColWidth 0.125)
- ,(AlignDefault,ColWidth 0.15)
- ,(AlignDefault,ColWidth 0.3375)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Centered",SoftBreak,Str "Header"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default",Space,Str "aligned"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.1375)
- ,(AlignDefault,ColWidth 0.125)
- ,(AlignDefault,ColWidth 0.15)
- ,(AlignDefault,ColWidth 0.3375)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Centered",SoftBreak,Str "Header"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default",Space,Str "aligned"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidth 0.1375)
- ,(AlignDefault,ColWidth 0.125)
- ,(AlignDefault,ColWidth 0.15)
- ,(AlignDefault,ColWidth 0.3375)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",SoftBreak,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "two"
+ , Space
+ , Str "spaces:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "the"
+ , Space
+ , Str "caption."
+ , Space
+ , Str "It"
+ , Space
+ , Str "may"
+ , Space
+ , Str "span"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ])
+ [ ( AlignDefault , ColWidth 0.15 )
+ , ( AlignDefault , ColWidth 0.1375 )
+ , ( AlignDefault , ColWidth 0.1625 )
+ , ( AlignDefault , ColWidth 0.35 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Centered" , SoftBreak , Str "Header" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" , Space , Str "aligned" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , SoftBreak
+ , Str "spans"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , SoftBreak
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.15 )
+ , ( AlignDefault , ColWidth 0.1375 )
+ , ( AlignDefault , ColWidth 0.1625 )
+ , ( AlignDefault , ColWidth 0.35 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Centered" , SoftBreak , Str "Header" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" , Space , Str "aligned" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , SoftBreak
+ , Str "spans"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , SoftBreak
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "column"
+ , Space
+ , Str "headers:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "column"
+ , Space
+ , Str "headers:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidth 0.15 )
+ , ( AlignDefault , ColWidth 0.1375 )
+ , ( AlignDefault , ColWidth 0.1625 )
+ , ( AlignDefault , ColWidth 0.35 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , SoftBreak
+ , Str "spans"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , SoftBreak
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
diff --git a/test/tables.haddock b/test/tables.haddock
index fcc26d27e..e6d5c8308 100644
--- a/test/tables.haddock
+++ b/test/tables.haddock
@@ -40,33 +40,33 @@ Demonstration of simple table syntax.
Multiline table with caption:
-+----------+---------+-----------+--------------------------+
-| Centered | Left | Right | Default aligned |
-| Header | Aligned | Aligned | |
-+==========+=========+===========+==========================+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| Centered | Left | Right | Default aligned |
+| Header | Aligned | Aligned | |
++===========+==========+============+===========================+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
Here’s the caption. It may span multiple lines.
Multiline table without caption:
-+----------+---------+-----------+--------------------------+
-| Centered | Left | Right | Default aligned |
-| Header | Aligned | Aligned | |
-+==========+=========+===========+==========================+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| Centered | Left | Right | Default aligned |
+| Header | Aligned | Aligned | |
++===========+==========+============+===========================+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
Table without column headers:
@@ -80,11 +80,11 @@ Table without column headers:
Multiline table without column headers:
-+----------+---------+-----------+--------------------------+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
diff --git a/test/tables.html5 b/test/tables.html5
index 533d2fd25..b3ee0ec79 100644
--- a/test/tables.html5
+++ b/test/tables.html5
@@ -121,7 +121,8 @@
<td style="text-align: center;">Second</td>
<td style="text-align: left;">row</td>
<td style="text-align: right;">5.0</td>
-<td style="text-align: left;">Here’s another one. Note the blank line between rows.</td>
+<td style="text-align: left;">Here’s another one. Note the blank line between
+rows.</td>
</tr>
</tbody>
</table>
@@ -152,7 +153,8 @@
<td style="text-align: center;">Second</td>
<td style="text-align: left;">row</td>
<td style="text-align: right;">5.0</td>
-<td style="text-align: left;">Here’s another one. Note the blank line between rows.</td>
+<td style="text-align: left;">Here’s another one. Note the blank line between
+rows.</td>
</tr>
</tbody>
</table>
diff --git a/test/tables.latex b/test/tables.latex
index 9d111fa7a..eba77c7b9 100644
--- a/test/tables.latex
+++ b/test/tables.latex
@@ -50,10 +50,10 @@ Right & Left & Center & Default \\
Multiline table with caption:
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
- >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
+ >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}}
+ >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}}
\caption{Here's the caption. It may span multiple lines.}\tabularnewline
\toprule
\begin{minipage}[b]{\linewidth}\centering
@@ -87,10 +87,10 @@ Second & row & 5.0 & Here's another one. Note the blank line between rows. \\
Multiline table without caption:
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
- >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
+ >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}}
+ >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}}
\toprule
\begin{minipage}[b]{\linewidth}\centering
Centered Header
@@ -122,10 +122,10 @@ Table without column headers:
Multiline table without column headers:
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.14}}
- >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.16}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}@{}}
+ >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1375}}
+ >{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1625}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}@{}}
\toprule
\endhead
First & row & 12.0 & Example of a row that spans multiple lines. \\
diff --git a/test/tables.markdown b/test/tables.markdown
index 7f89bfc08..97ffd82d7 100644
--- a/test/tables.markdown
+++ b/test/tables.markdown
@@ -28,33 +28,33 @@ Simple table indented two spaces:
Multiline table with caption:
- --------------------------------------------------------------
+ ---------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
- First row 12.0 Example of a row that
- spans multiple lines.
+ ----------- ---------- ------------ ---------------------------
+ First row 12.0 Example of a row that spans
+ multiple lines.
Second row 5.0 Here's another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ ---------------------------------------------------------------
: Here's the caption. It may span multiple lines.
Multiline table without caption:
- --------------------------------------------------------------
+ ---------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
- First row 12.0 Example of a row that
- spans multiple lines.
+ ----------- ---------- ------------ ---------------------------
+ First row 12.0 Example of a row that spans
+ multiple lines.
Second row 5.0 Here's another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ ---------------------------------------------------------------
Table without column headers:
@@ -66,11 +66,11 @@ Table without column headers:
Multiline table without column headers:
- ----------- ---------- ------------ --------------------------
- First row 12.0 Example of a row that
- spans multiple lines.
+ ----------- ---------- ------------ ---------------------------
+ First row 12.0 Example of a row that spans
+ multiple lines.
Second row 5.0 Here's another one. Note
the blank line between
rows.
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ ---------------------------
diff --git a/test/tables.markua b/test/tables.markua
new file mode 100644
index 000000000..b82264fd7
--- /dev/null
+++ b/test/tables.markua
@@ -0,0 +1,58 @@
+Simple table with caption:
+
+| Right | Left | Center | Default |
+|------:|:-----|:------:|---------|
+| 12 | 12 | 12 | 12 |
+| 123 | 123 | 123 | 123 |
+| 1 | 1 | 1 | 1 |
+
+Demonstration of simple table syntax.
+
+Simple table without caption:
+
+| Right | Left | Center | Default |
+|------:|:-----|:------:|---------|
+| 12 | 12 | 12 | 12 |
+| 123 | 123 | 123 | 123 |
+| 1 | 1 | 1 | 1 |
+
+Simple table indented two spaces:
+
+| Right | Left | Center | Default |
+|------:|:-----|:------:|---------|
+| 12 | 12 | 12 | 12 |
+| 123 | 123 | 123 | 123 |
+| 1 | 1 | 1 | 1 |
+
+Demonstration of simple table syntax.
+
+Multiline table with caption:
+
+| Centered Header | Left Aligned | Right Aligned | Default aligned |
+|:---------------:|:-------------|--------------:|:------------------------------------------------------|
+| First | row | 12.0 | Example of a row that spans multiple lines. |
+| Second | row | 5.0 | Here’s another one. Note the blank line between rows. |
+
+Here’s the caption. It may span multiple lines.
+
+Multiline table without caption:
+
+| Centered Header | Left Aligned | Right Aligned | Default aligned |
+|:---------------:|:-------------|--------------:|:------------------------------------------------------|
+| First | row | 12.0 | Example of a row that spans multiple lines. |
+| Second | row | 5.0 | Here’s another one. Note the blank line between rows. |
+
+Table without column headers:
+
+| | | | |
+|----:|:----|:---:|----:|
+| 12 | 12 | 12 | 12 |
+| 123 | 123 | 123 | 123 |
+| 1 | 1 | 1 | 1 |
+
+Multiline table without column headers:
+
+| | | | |
+|:------:|:----|-----:|-------------------------------------------------------|
+| First | row | 12.0 | Example of a row that spans multiple lines. |
+| Second | row | 5.0 | Here’s another one. Note the blank line between rows. |
diff --git a/test/tables.muse b/test/tables.muse
index 98e721cf0..6b3af561d 100644
--- a/test/tables.muse
+++ b/test/tables.muse
@@ -23,24 +23,24 @@ Simple table indented two spaces:
Multiline table with caption:
-+----------+---------+-----------+--------------------------+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
Multiline table without caption:
-+----------+---------+-----------+--------------------------+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
Table without column headers:
12 | 12 | 12 | 12
@@ -49,11 +49,11 @@ Table without column headers:
Multiline table without column headers:
-+----------+---------+-----------+--------------------------+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
diff --git a/test/tables.native b/test/tables.native
index dc74826e0..de46ce368 100644
--- a/test/tables.native
+++ b/test/tables.native
@@ -1,293 +1,964 @@
-[Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."]])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Center"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [Plain [Str "Here\8217s",Space,Str "the",Space,Str "caption.",SoftBreak,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."]])
- [(AlignCenter,ColWidth 0.15)
- ,(AlignLeft,ColWidth 0.1375)
- ,(AlignRight,ColWidth 0.1625)
- ,(AlignLeft,ColWidth 0.35)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Centered",SoftBreak,Str "Header"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default",Space,Str "aligned"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidth 0.15)
- ,(AlignLeft,ColWidth 0.1375)
- ,(AlignRight,ColWidth 0.1625)
- ,(AlignLeft,ColWidth 0.35)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Centered",SoftBreak,Str "Header"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Left",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Right",SoftBreak,Str "Aligned"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Default",Space,Str "aligned"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "123"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidth 0.15)
- ,(AlignLeft,ColWidth 0.1375)
- ,(AlignRight,ColWidth 0.1625)
- ,(AlignDefault,ColWidth 0.35)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "First"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "12.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Second"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "row"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5.0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]])]
- (TableFoot ("",[],[])
- [])]
+[ Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "two"
+ , Space
+ , Str "spaces:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Demonstration"
+ , Space
+ , Str "of"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "table"
+ , Space
+ , Str "syntax."
+ ]
+ ])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Center" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "with"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption
+ Nothing
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "the"
+ , Space
+ , Str "caption."
+ , SoftBreak
+ , Str "It"
+ , Space
+ , Str "may"
+ , Space
+ , Str "span"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ])
+ [ ( AlignCenter , ColWidth 0.15 )
+ , ( AlignLeft , ColWidth 0.1375 )
+ , ( AlignRight , ColWidth 0.1625 )
+ , ( AlignLeft , ColWidth 0.35 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Centered" , SoftBreak , Str "Header" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" , Space , Str "aligned" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , Space
+ , Str "spans"
+ , SoftBreak
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "caption:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidth 0.15 )
+ , ( AlignLeft , ColWidth 0.1375 )
+ , ( AlignRight , ColWidth 0.1625 )
+ , ( AlignLeft , ColWidth 0.35 )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Centered" , SoftBreak , Str "Header" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Left" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Right" , SoftBreak , Str "Aligned" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Default" , Space , Str "aligned" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , Space
+ , Str "spans"
+ , SoftBreak
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "column"
+ , Space
+ , Str "headers:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "123" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+, Para
+ [ Str "Multiline"
+ , Space
+ , Str "table"
+ , Space
+ , Str "without"
+ , Space
+ , Str "column"
+ , Space
+ , Str "headers:"
+ ]
+, Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidth 0.15 )
+ , ( AlignLeft , ColWidth 0.1375 )
+ , ( AlignRight , ColWidth 0.1625 )
+ , ( AlignDefault , ColWidth 0.35 )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "First" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "12.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "row"
+ , Space
+ , Str "that"
+ , Space
+ , Str "spans"
+ , SoftBreak
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Second" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "row" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5.0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "another"
+ , Space
+ , Str "one."
+ , Space
+ , Str "Note"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "rows."
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+]
diff --git a/test/tables.opendocument b/test/tables.opendocument
index cda121dd4..5216dc613 100644
--- a/test/tables.opendocument
+++ b/test/tables.opendocument
@@ -201,8 +201,8 @@ syntax.</text:p>
</table:table>
<text:p text:style-name="First_20_paragraph">Multiline table with
caption:</text:p>
-<text:p text:style-name="TableCaption">Here’s the caption. It may span
-multiple lines.</text:p>
+<text:p text:style-name="TableCaption">Here’s the caption. It may span multiple
+lines.</text:p>
<table:table table:name="Table4" table:style-name="Table4">
<table:table-column table:style-name="Table4.A" />
<table:table-column table:style-name="Table4.B" />
diff --git a/test/tables.plain b/test/tables.plain
index e46317a6f..f1d304cda 100644
--- a/test/tables.plain
+++ b/test/tables.plain
@@ -28,33 +28,33 @@ Simple table indented two spaces:
Multiline table with caption:
- --------------------------------------------------------------
+ ---------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
- First row 12.0 Example of a row that
- spans multiple lines.
+ ----------- ---------- ------------ ---------------------------
+ First row 12.0 Example of a row that spans
+ multiple lines.
Second row 5.0 Here’s another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ ---------------------------------------------------------------
: Here’s the caption. It may span multiple lines.
Multiline table without caption:
- --------------------------------------------------------------
+ ---------------------------------------------------------------
Centered Left Right Default aligned
Header Aligned Aligned
- ----------- ---------- ------------ --------------------------
- First row 12.0 Example of a row that
- spans multiple lines.
+ ----------- ---------- ------------ ---------------------------
+ First row 12.0 Example of a row that spans
+ multiple lines.
Second row 5.0 Here’s another one. Note
the blank line between
rows.
- --------------------------------------------------------------
+ ---------------------------------------------------------------
Table without column headers:
@@ -66,11 +66,11 @@ Table without column headers:
Multiline table without column headers:
- ----------- ---------- ------------ --------------------------
- First row 12.0 Example of a row that
- spans multiple lines.
+ ----------- ---------- ------------ ---------------------------
+ First row 12.0 Example of a row that spans
+ multiple lines.
Second row 5.0 Here’s another one. Note
the blank line between
rows.
- ----------- ---------- ------------ --------------------------
+ ----------- ---------- ------------ ---------------------------
diff --git a/test/tables.rst b/test/tables.rst
index 660df61d4..4b475c0b6 100644
--- a/test/tables.rst
+++ b/test/tables.rst
@@ -36,31 +36,31 @@ Multiline table with caption:
.. table:: Here’s the caption. It may span multiple lines.
- +----------+---------+-----------+--------------------------+
- | Centered | Left | Right | Default aligned |
- | Header | Aligned | Aligned | |
- +==========+=========+===========+==========================+
- | First | row | 12.0 | Example of a row that |
- | | | | spans multiple lines. |
- +----------+---------+-----------+--------------------------+
- | Second | row | 5.0 | Here’s another one. Note |
- | | | | the blank line between |
- | | | | rows. |
- +----------+---------+-----------+--------------------------+
+ +-----------+----------+------------+---------------------------+
+ | Centered | Left | Right | Default aligned |
+ | Header | Aligned | Aligned | |
+ +===========+==========+============+===========================+
+ | First | row | 12.0 | Example of a row that |
+ | | | | spans multiple lines. |
+ +-----------+----------+------------+---------------------------+
+ | Second | row | 5.0 | Here’s another one. Note |
+ | | | | the blank line between |
+ | | | | rows. |
+ +-----------+----------+------------+---------------------------+
Multiline table without caption:
-+----------+---------+-----------+--------------------------+
-| Centered | Left | Right | Default aligned |
-| Header | Aligned | Aligned | |
-+==========+=========+===========+==========================+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| Centered | Left | Right | Default aligned |
+| Header | Aligned | Aligned | |
++===========+==========+============+===========================+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
Table without column headers:
@@ -72,11 +72,11 @@ Table without column headers:
Multiline table without column headers:
-+----------+---------+-----------+--------------------------+
-| First | row | 12.0 | Example of a row that |
-| | | | spans multiple lines. |
-+----------+---------+-----------+--------------------------+
-| Second | row | 5.0 | Here’s another one. Note |
-| | | | the blank line between |
-| | | | rows. |
-+----------+---------+-----------+--------------------------+
++-----------+----------+------------+---------------------------+
+| First | row | 12.0 | Example of a row that |
+| | | | spans multiple lines. |
++-----------+----------+------------+---------------------------+
+| Second | row | 5.0 | Here’s another one. Note |
+| | | | the blank line between |
+| | | | rows. |
++-----------+----------+------------+---------------------------+
diff --git a/test/tables/nordics.latex b/test/tables/nordics.latex
index 6f17a163e..4c10865dc 100644
--- a/test/tables/nordics.latex
+++ b/test/tables/nordics.latex
@@ -1,8 +1,8 @@
\begin{longtable}[]{@{}
- >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.20}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.20}}@{}}
+ >{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3000}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3000}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2000}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2000}}@{}}
\caption{States belonging to the \emph{Nordics.}}\tabularnewline
\toprule
\begin{minipage}[b]{\linewidth}\centering
diff --git a/test/tables/planets.latex b/test/tables/planets.latex
index b22c3adeb..1e703143d 100644
--- a/test/tables/planets.latex
+++ b/test/tables/planets.latex
@@ -18,13 +18,13 @@
& & Earth & 5.97 & 12,756 & 5514 & 9.8 & 24.0 & 149.6 & 15 & 1 & Our world \\
& & Mars & 0.642 & 6,792 & 3933 & 3.7 & 24.7 & 227.9 & -65 & 2 & The red
planet \\
-\multirow{4}{*}{Jovian planets} & \multirow{2}{*}{Gas giants} & Jupiter & 1898
-& 142,984 & 1326 & 23.1 & 9.9 & 778.6 & -110 & 67 & The largest planet \\
+\multirow{4}{*}{Jovian planets} & \multirow{2}{*}{Gas giants} & Jupiter & 1898 &
+142,984 & 1326 & 23.1 & 9.9 & 778.6 & -110 & 67 & The largest planet \\
& & Saturn & 568 & 120,536 & 687 & 9.0 & 10.7 & 1433.5 & -140 & 62 & \\
& \multirow{2}{*}{Ice giants} & Uranus & 86.8 & 51,118 & 1271 & 8.7 & 17.2 &
2872.5 & -195 & 27 & \\
& & Neptune & 102 & 49,528 & 1638 & 11.0 & 16.1 & 4495.1 & -200 & 14 & \\
-\multicolumn{2}{c}{Dwarf planets} & Pluto & 0.0146 & 2,370 & 2095 & 0.7 &
-153.3 & 5906.4 & -225 & 5 & Declassified as a planet in 2006. \\
+\multicolumn{2}{c}{Dwarf planets} & Pluto & 0.0146 & 2,370 & 2095 & 0.7 & 153.3
+& 5906.4 & -225 & 5 & Declassified as a planet in 2006. \\
\bottomrule
\end{longtable}
diff --git a/test/tables/students.latex b/test/tables/students.latex
index 3d4d287d9..b1ea45ac8 100644
--- a/test/tables/students.latex
+++ b/test/tables/students.latex
@@ -1,6 +1,6 @@
\begin{longtable}[]{@{}
- >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.50}}
- >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.50}}@{}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.5000}}
+ >{\raggedright\arraybackslash}p{(\columnwidth - 2\tabcolsep) * \real{0.5000}}@{}}
\caption{List of Students}\tabularnewline
\toprule
\begin{minipage}[b]{\linewidth}\centering
diff --git a/test/test-pandoc.hs b/test/test-pandoc.hs
index abb2f105f..fcb157fb7 100644
--- a/test/test-pandoc.hs
+++ b/test/test-pandoc.hs
@@ -27,6 +27,7 @@ import qualified Tests.Readers.Muse
import qualified Tests.Readers.Odt
import qualified Tests.Readers.Org
import qualified Tests.Readers.RST
+import qualified Tests.Readers.RTF
import qualified Tests.Readers.Txt2Tags
import qualified Tests.Readers.Man
import qualified Tests.Shared
@@ -49,6 +50,7 @@ import qualified Tests.Writers.Powerpoint
import qualified Tests.Writers.RST
import qualified Tests.Writers.AnnotatedTable
import qualified Tests.Writers.TEI
+import qualified Tests.Writers.Markua
import Text.Pandoc.Shared (inDirectory)
tests :: FilePath -> TestTree
@@ -71,6 +73,7 @@ tests pandocPath = testGroup "pandoc tests"
, testGroup "Docx" Tests.Writers.Docx.tests
, testGroup "RST" Tests.Writers.RST.tests
, testGroup "TEI" Tests.Writers.TEI.tests
+ , testGroup "markua" Tests.Writers.Markua.tests
, testGroup "Muse" Tests.Writers.Muse.tests
, testGroup "FB2" Tests.Writers.FB2.tests
, testGroup "PowerPoint" Tests.Writers.Powerpoint.tests
@@ -85,6 +88,7 @@ tests pandocPath = testGroup "pandoc tests"
, testGroup "Jira" Tests.Readers.Jira.tests
, testGroup "Org" Tests.Readers.Org.tests
, testGroup "RST" Tests.Readers.RST.tests
+ , testGroup "RTF" Tests.Readers.RTF.tests
, testGroup "Docx" Tests.Readers.Docx.tests
, testGroup "Odt" Tests.Readers.Odt.tests
, testGroup "Txt2Tags" Tests.Readers.Txt2Tags.tests
diff --git a/test/testsuite.native b/test/testsuite.native
index f9132c797..5f9be452f 100644
--- a/test/testsuite.native
+++ b/test/testsuite.native
@@ -1,409 +1,2234 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,HorizontalRule
-,Header 1 ("headers",[],[]) [Str "Headers"]
-,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")]
-,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"]
-,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
-,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
-,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,HorizontalRule
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,Str "*",Space,Str "criminey."]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
-,HorizontalRule
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "E-mail",Space,Str "style:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,BlockQuote
- [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
- ,Para [Str "A",Space,Str "list:"]
- ,OrderedList (1,Decimal,Period)
- [[Plain [Str "item",Space,Str "one"]]
- ,[Plain [Str "item",Space,Str "two"]]]
- ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
- ,BlockQuote
- [Para [Str "nested"]]
- ,BlockQuote
- [Para [Str "nested"]]]
-,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",SoftBreak,Str ">",Space,Str "1."]
-,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
-,HorizontalRule
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,HorizontalRule
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "asterisk",Space,Str "1"]]
- ,[Plain [Str "asterisk",Space,Str "2"]]
- ,[Plain [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Asterisks",Space,Str "loose:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Plus",Space,Str "1"]]
- ,[Plain [Str "Plus",Space,Str "2"]]
- ,[Plain [Str "Plus",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Minus",Space,Str "1"]]
- ,[Plain [Str "Minus",Space,Str "2"]]
- ,[Plain [Str "Minus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,Para [Str "Tight:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second"]]
- ,[Plain [Str "Third"]]]
-,Para [Str "and:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "One"]]
- ,[Plain [Str "Two"]]
- ,[Plain [Str "Three"]]]
-,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and",Space,Str "using",Space,Str "spaces:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Multiple",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
- ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",SoftBreak,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Header 2 ("nested",[],[]) [Str "Nested"]
-,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]]]]]]]
-,Para [Str "Here\8217s",Space,Str "another:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second:"]
- ,BulletList
- [[Plain [Str "Fee"]]
- ,[Plain [Str "Fie"]]
- ,[Plain [Str "Foe"]]]]
- ,[Plain [Str "Third"]]]
-,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Plain [Str "Fee"]]
- ,[Plain [Str "Fie"]]
- ,[Plain [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
-,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]
- ,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]]]]]
-,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
-,OrderedList (2,Decimal,TwoParens)
- [[Para [Str "begins",Space,Str "with",Space,Str "2"]]
- ,[Para [Str "and",Space,Str "now",Space,Str "3"]
- ,Para [Str "with",Space,Str "a",Space,Str "continuation"]
- ,OrderedList (4,LowerRoman,Period)
- [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",SoftBreak,Str "starting",Space,Str "with",Space,Str "4"]]
- ,[Plain [Str "more",Space,Str "items"]
- ,OrderedList (1,UpperAlpha,TwoParens)
- [[Plain [Str "a",Space,Str "subsublist"]]
- ,[Plain [Str "a",Space,Str "subsublist"]]]]]]]
-,Para [Str "Nesting:"]
-,OrderedList (1,UpperAlpha,Period)
- [[Plain [Str "Upper",Space,Str "Alpha"]
- ,OrderedList (1,UpperRoman,Period)
- [[Plain [Str "Upper",Space,Str "Roman."]
- ,OrderedList (6,Decimal,TwoParens)
- [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
- ,OrderedList (3,LowerAlpha,OneParen)
- [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
-,Para [Str "Autonumbering:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Autonumber."]]
- ,[Plain [Str "More."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Nested."]]]]]
-,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"]
-,Para [Str "M.A.\160\&2007"]
-,Para [Str "B.",Space,Str "Williams"]
-,HorizontalRule
-,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"]
-,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"]
-,DefinitionList
- [([Str "apple"],
- [[Plain [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Plain [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Plain [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"]
-,DefinitionList
- [([Str "apple"],
- [[Plain [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Plain [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Plain [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Loose:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Para [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
-,DefinitionList
- [([Emph [Str "apple"]],
- [[Para [Str "red",Space,Str "fruit"]
- ,Para [Str "contains",Space,Str "seeds,",SoftBreak,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]])
- ,([Emph [Str "orange"]],
- [[Para [Str "orange",Space,Str "fruit"]
- ,CodeBlock ("",[],[]) "{ orange code block }"
- ,BlockQuote
- [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])]
-,Para [Str "Multiple",Space,Str "definitions,",Space,Str "tight:"]
-,DefinitionList
- [([Str "apple"],
- [[Plain [Str "red",Space,Str "fruit"]]
- ,[Plain [Str "computer"]]])
- ,([Str "orange"],
- [[Plain [Str "orange",Space,Str "fruit"]]
- ,[Plain [Str "bank"]]])]
-,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]
- ,[Para [Str "computer"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]
- ,[Para [Str "bank"]]])]
-,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]
- ,[Para [Str "computer"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]
- ,OrderedList (1,Decimal,Period)
- [[Plain [Str "sublist"]]
- ,[Plain [Str "sublist"]]]]])]
-,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"]
-,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
-,Div ("",[],[])
- [Plain [Str "foo"]]
-,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"]
-,Div ("",[],[])
- [Div ("",[],[])
- [Div ("",[],[])
- [Para [Str "foo"]]]
- ,Div ("",[],[])
- [Plain [Str "bar"]]]
-,Para [Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"]
-,RawBlock (Format "html") "<table>"
-,RawBlock (Format "html") "<tr>"
-,RawBlock (Format "html") "<td>"
-,Plain [Str "This",Space,Str "is",Space,Emph [Str "emphasized"]]
-,RawBlock (Format "html") "</td>"
-,RawBlock (Format "html") "<td>"
-,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]]
-,RawBlock (Format "html") "</td>"
-,RawBlock (Format "html") "</tr>"
-,RawBlock (Format "html") "</table>"
-,RawBlock (Format "html") "<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>"
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"]
-,Div ("",[],[])
- [Para [Str "foo"]]
-,Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"]
-,CodeBlock ("",[],[]) "<div>\n foo\n</div>"
-,Para [Str "As",Space,Str "should",Space,Str "this:"]
-,CodeBlock ("",[],[]) "<div>foo</div>"
-,Para [Str "Now,",Space,Str "nested:"]
-,Div ("",[],[])
- [Div ("",[],[])
- [Div ("",[],[])
- [Plain [Str "foo"]]]]
-,Para [Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"]
-,RawBlock (Format "html") "<!-- Comment -->"
-,Para [Str "Multiline:"]
-,RawBlock (Format "html") "<!--\nBlah\nBlah\n-->"
-,RawBlock (Format "html") "<!--\n This is another comment.\n-->"
-,Para [Str "Code",Space,Str "block:"]
-,CodeBlock ("",[],[]) "<!-- Comment -->"
-,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"]
-,RawBlock (Format "html") "<!-- foo -->"
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "<hr />"
-,Para [Str "Hr\8217s:"]
-,RawBlock (Format "html") "<hr>"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr>"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
-,RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
-,RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\">"
-,HorizontalRule
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
-,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
-,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
-,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."]
-,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many\160of\160them"],Str "O."]
-,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",SoftBreak,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."]
-,HorizontalRule
-,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
-,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]]
-,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."]
-,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",SoftBreak,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]]
-,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."]
-,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."]
-,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."]
-,Para [Str "Ellipses\8230and\8230and\8230."]
-,HorizontalRule
-,Header 1 ("latex",[],[]) [Str "LaTeX"]
-,BulletList
- [[Plain [RawInline (Format "tex") "\\cite[22-23]{smith.1899}"]]
- ,[Plain [Math InlineMath "2+2=4"]]
- ,[Plain [Math InlineMath "x \\in y"]]
- ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]]
- ,[Plain [Math InlineMath "223"]]
- ,[Plain [Math InlineMath "p",Str "-Tree"]]
- ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math:",SoftBreak,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
- ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
-,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"]
-,BulletList
- [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
- ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",SoftBreak,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]]
- ,[Plain [Str "Shoes",Space,Str "($20)",Space,Str "and",Space,Str "socks",Space,Str "($5)."]]
- ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
-,RawBlock (Format "tex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
-,HorizontalRule
-,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Plain [Str "section:",Space,Str "\167"]]
- ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]]
- ,[Plain [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,HorizontalRule
-,Header 1 ("links",[],[]) [Str "Links"]
-,Header 2 ("explicit",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")]
-,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")]
-,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
-,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
-,Header 2 ("reference",[],[]) [Str "Reference"]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."]
-,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."]
-,CodeBlock ("",[],[]) "[not]: /url"
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."]
-,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("http://att.com/","AT&T"),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
-,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
-,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",["uri"],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
-,BulletList
- [[Plain [Str "In",Space,Str "a",Space,Str "list?"]]
- ,[Plain [Link ("",["uri"],[]) [Str "http://example.com/"] ("http://example.com/","")]]
- ,[Plain [Str "It",Space,Str "should."]]]
-,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",["email"],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
-,BlockQuote
- [Para [Str "Blockquoted:",Space,Link ("",["uri"],[]) [Str "http://example.com/"] ("http://example.com/","")]]
-,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
-,CodeBlock ("",[],[]) "or here: <http://example.com/>"
-,HorizontalRule
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","fig:Voyage dans la Lune")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."]
-,HorizontalRule
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",SoftBreak,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",SoftBreak,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",SoftBreak,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",SoftBreak,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]]
-,BlockQuote
- [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]]
-,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines [ Str "John" , Space , Str "MacFarlane" ]
+ , MetaInlines [ Str "Anonymous" ]
+ ]
+ )
+ , ( "date"
+ , MetaInlines
+ [ Str "July" , Space , Str "17," , Space , Str "2006" ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc"
+ , Space
+ , Str "Test"
+ , Space
+ , Str "Suite"
+ ]
+ )
+ ]
+ }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ , Space
+ , Str "Most"
+ , Space
+ , Str "of"
+ , Space
+ , Str "them"
+ , Space
+ , Str "are"
+ , Space
+ , Str "adapted"
+ , Space
+ , Str "from"
+ , SoftBreak
+ , Str "John"
+ , Space
+ , Str "Gruber\8217s"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , HorizontalRule
+ , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 2
+ ( "level-2-with-an-embedded-link" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Header
+ 3
+ ( "level-3-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 4 ( "level-4" , [] , [] ) [ Str "Level" , Space , Str "4" ]
+ , Header
+ 5 ( "level-5" , [] , [] ) [ Str "Level" , Space , Str "5" ]
+ , Header
+ 1 ( "level-1" , [] , [] ) [ Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "level-2-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 3 ( "level-3" , [] , [] ) [ Str "Level" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header
+ 2 ( "level-2" , [] , [] ) [ Str "Level" , Space , Str "2" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , HorizontalRule
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , SoftBreak
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ , SoftBreak
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "looked"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , SoftBreak
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , LineBreak
+ , Str "here."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , Para [ Str "E-mail" , Space , Str "style:" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , SoftBreak
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ , Para [ Str "A" , Space , Str "list:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "item" , Space , Str "one" ] ]
+ , [ Plain [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Para
+ [ Str "Nested"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quotes:"
+ ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ , Space
+ , Str "2"
+ , SoftBreak
+ , Str ">"
+ , Space
+ , Str "1."
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "a"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , HorizontalRule
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Asterisks" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Plus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Minus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Tight:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second" ] ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para [ Str "and:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "One" ] ]
+ , [ Plain [ Str "Two" ] ]
+ , [ Plain [ Str "Three" ] ]
+ ]
+ , Para
+ [ Str "Loose" , Space , Str "using" , Space , Str "tabs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "and" , Space , Str "using" , Space , Str "spaces:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para [ Str "Multiple" , Space , Str "paragraphs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "graf"
+ , Space
+ , Str "one."
+ ]
+ , Para
+ [ Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "graf"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "dog\8217s"
+ , SoftBreak
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ]
+ , BulletList [ [ Plain [ Str "Tab" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here\8217s" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second:" ]
+ , BulletList
+ [ [ Plain [ Str "Fee" ] ]
+ , [ Plain [ Str "Fie" ] ]
+ , [ Plain [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "Same"
+ , Space
+ , Str "thing"
+ , Space
+ , Str "but"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paragraphs:"
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Plain [ Str "Fee" ] ]
+ , [ Plain [ Str "Fie" ] ]
+ , [ Plain [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "tabs-and-spaces" , [] , [] )
+ [ Str "Tabs" , Space , Str "and" , Space , Str "spaces" ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "fancy-list-markers" , [] , [] )
+ [ Str "Fancy" , Space , Str "list" , Space , Str "markers" ]
+ , OrderedList
+ ( 2 , Decimal , TwoParens )
+ [ [ Para
+ [ Str "begins" , Space , Str "with" , Space , Str "2" ]
+ ]
+ , [ Para [ Str "and" , Space , Str "now" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "continuation"
+ ]
+ , OrderedList
+ ( 4 , LowerRoman , Period )
+ [ [ Plain
+ [ Str "sublist"
+ , Space
+ , Str "with"
+ , Space
+ , Str "roman"
+ , Space
+ , Str "numerals,"
+ , SoftBreak
+ , Str "starting"
+ , Space
+ , Str "with"
+ , Space
+ , Str "4"
+ ]
+ ]
+ , [ Plain [ Str "more" , Space , Str "items" ]
+ , OrderedList
+ ( 1 , UpperAlpha , TwoParens )
+ [ [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ , [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Nesting:" ]
+ , OrderedList
+ ( 1 , UpperAlpha , Period )
+ [ [ Plain [ Str "Upper" , Space , Str "Alpha" ]
+ , OrderedList
+ ( 1 , UpperRoman , Period )
+ [ [ Plain [ Str "Upper" , Space , Str "Roman." ]
+ , OrderedList
+ ( 6 , Decimal , TwoParens )
+ [ [ Plain
+ [ Str "Decimal"
+ , Space
+ , Str "start"
+ , Space
+ , Str "with"
+ , Space
+ , Str "6"
+ ]
+ , OrderedList
+ ( 3 , LowerAlpha , OneParen )
+ [ [ Plain
+ [ Str "Lower"
+ , Space
+ , Str "alpha"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paren"
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Autonumbering:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Autonumber." ] ]
+ , [ Plain [ Str "More." ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Nested." ] ] ]
+ ]
+ ]
+ , Para
+ [ Str "Should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item:"
+ ]
+ , Para [ Str "M.A.\160\&2007" ]
+ , Para [ Str "B." , Space , Str "Williams" ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "definition-lists" , [] , [] )
+ [ Str "Definition" , Space , Str "Lists" ]
+ , Para
+ [ Str "Tight"
+ , Space
+ , Str "using"
+ , Space
+ , Str "spaces:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Plain [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Plain [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Plain [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para
+ [ Str "Tight" , Space , Str "using" , Space , Str "tabs:" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Plain [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Plain [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Plain [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para [ Str "Loose:" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Para [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "with"
+ , Space
+ , Str "italics:"
+ ]
+ , DefinitionList
+ [ ( [ Emph [ Str "apple" ] ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ]
+ , Para
+ [ Str "contains"
+ , Space
+ , Str "seeds,"
+ , SoftBreak
+ , Str "crisp,"
+ , Space
+ , Str "pleasant"
+ , Space
+ , Str "to"
+ , Space
+ , Str "taste"
+ ]
+ ]
+ ]
+ )
+ , ( [ Emph [ Str "orange" ] ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ]
+ , CodeBlock ( "" , [] , [] ) "{ orange code block }"
+ , BlockQuote
+ [ Para
+ [ Str "orange"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote"
+ ]
+ ]
+ ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "definitions,"
+ , Space
+ , Str "tight:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Plain [ Str "red" , Space , Str "fruit" ] ]
+ , [ Plain [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Plain [ Str "orange" , Space , Str "fruit" ] ]
+ , [ Plain [ Str "bank" ] ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "definitions,"
+ , Space
+ , Str "loose:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ]
+ , [ Para [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ]
+ , [ Para [ Str "bank" ] ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "after"
+ , Space
+ , Str "term,"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "marker,"
+ , Space
+ , Str "alternate"
+ , Space
+ , Str "markers:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ]
+ , [ Para [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "sublist" ] ]
+ , [ Plain [ Str "sublist" ] ]
+ ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1
+ ( "html-blocks" , [] , [] )
+ [ Str "HTML" , Space , Str "Blocks" ]
+ , Para
+ [ Str "Simple"
+ , Space
+ , Str "block"
+ , Space
+ , Str "on"
+ , Space
+ , Str "one"
+ , Space
+ , Str "line:"
+ ]
+ , Div ( "" , [] , [] ) [ Plain [ Str "foo" ] ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "without"
+ , Space
+ , Str "indentation:"
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Div ( "" , [] , [] ) [ Para [ Str "foo" ] ] ]
+ , Div ( "" , [] , [] ) [ Plain [ Str "bar" ] ]
+ ]
+ , Para
+ [ Str "Interpreted"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "table:"
+ ]
+ , RawBlock (Format "html") "<table>"
+ , RawBlock (Format "html") "<tr>"
+ , RawBlock (Format "html") "<td>"
+ , Plain
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ ]
+ , RawBlock (Format "html") "</td>"
+ , RawBlock (Format "html") "<td>"
+ , Plain
+ [ Str "And"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ ]
+ , RawBlock (Format "html") "</td>"
+ , RawBlock (Format "html") "</tr>"
+ , RawBlock (Format "html") "</table>"
+ , RawBlock
+ (Format "html")
+ "<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>"
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "block:"
+ ]
+ , Div ( "" , [] , [] ) [ Para [ Str "foo" ] ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "code"
+ , Space
+ , Str "block,"
+ , Space
+ , Str "though:"
+ ]
+ , CodeBlock ( "" , [] , [] ) "<div>\n foo\n</div>"
+ , Para
+ [ Str "As" , Space , Str "should" , Space , Str "this:" ]
+ , CodeBlock ( "" , [] , [] ) "<div>foo</div>"
+ , Para [ Str "Now," , Space , Str "nested:" ]
+ , Div
+ ( "" , [] , [] )
+ [ Div
+ ( "" , [] , [] )
+ [ Div ( "" , [] , [] ) [ Plain [ Str "foo" ] ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "just"
+ , Space
+ , Str "be"
+ , Space
+ , Str "an"
+ , Space
+ , Str "HTML"
+ , Space
+ , Str "comment:"
+ ]
+ , RawBlock (Format "html") "<!-- Comment -->"
+ , Para [ Str "Multiline:" ]
+ , RawBlock (Format "html") "<!--\nBlah\nBlah\n-->"
+ , RawBlock
+ (Format "html") "<!--\n This is another comment.\n-->"
+ , Para [ Str "Code" , Space , Str "block:" ]
+ , CodeBlock ( "" , [] , [] ) "<!-- Comment -->"
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "plain"
+ , Space
+ , Str "comment,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line:"
+ ]
+ , RawBlock (Format "html") "<!-- foo -->"
+ , Para [ Str "Code:" ]
+ , CodeBlock ( "" , [] , [] ) "<hr />"
+ , Para [ Str "Hr\8217s:" ]
+ , RawBlock (Format "html") "<hr>"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr>"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
+ , RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
+ , RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\">"
+ , HorizontalRule
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "emphasized" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "strikeout" ]
+ , Str "."
+ ]
+ ]
+ , Para
+ [ Str "Superscripts:"
+ , Space
+ , Str "a"
+ , Superscript [ Str "bc" ]
+ , Str "d"
+ , Space
+ , Str "a"
+ , Superscript [ Emph [ Str "hello" ] ]
+ , Space
+ , Str "a"
+ , Superscript [ Str "hello\160there" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Subscripts:"
+ , Space
+ , Str "H"
+ , Subscript [ Str "2" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Subscript [ Str "23" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Subscript [ Str "many\160of\160them" ]
+ , Str "O."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "superscripts"
+ , Space
+ , Str "or"
+ , Space
+ , Str "subscripts,"
+ , SoftBreak
+ , Str "because"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "unescaped"
+ , Space
+ , Str "spaces:"
+ , Space
+ , Str "a^b"
+ , Space
+ , Str "c^d,"
+ , Space
+ , Str "a~b"
+ , Space
+ , Str "c~d."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "smart-quotes-ellipses-dashes" , [] , [] )
+ [ Str "Smart"
+ , Space
+ , Str "quotes,"
+ , Space
+ , Str "ellipses,"
+ , Space
+ , Str "dashes"
+ ]
+ , Para
+ [ Quoted DoubleQuote [ Str "Hello," ]
+ , Space
+ , Str "said"
+ , Space
+ , Str "the"
+ , Space
+ , Str "spider."
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Quoted SingleQuote [ Str "Shelob" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "my"
+ , Space
+ , Str "name."
+ ]
+ ]
+ , Para
+ [ Quoted SingleQuote [ Str "A" ]
+ , Str ","
+ , Space
+ , Quoted SingleQuote [ Str "B" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Quoted SingleQuote [ Str "C" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "letters."
+ ]
+ , Para
+ [ Quoted SingleQuote [ Str "Oak," ]
+ , Space
+ , Quoted SingleQuote [ Str "elm," ]
+ , Space
+ , Str "and"
+ , Space
+ , Quoted SingleQuote [ Str "beech" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "names"
+ , Space
+ , Str "of"
+ , Space
+ , Str "trees."
+ , SoftBreak
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Quoted SingleQuote [ Str "pine." ]
+ ]
+ , Para
+ [ Quoted
+ SingleQuote
+ [ Str "He"
+ , Space
+ , Str "said,"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "go."
+ ]
+ ]
+ , Space
+ , Str "Were"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alive"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "70\8217s?"
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "quoted"
+ , Space
+ , Quoted SingleQuote [ Code ( "" , [] , [] ) "code" ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Link
+ ( "" , [] , [] )
+ [ Str "quoted" , Space , Str "link" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "dashes:"
+ , Space
+ , Str "one\8212two"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "three\8212four"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "five."
+ ]
+ , Para
+ [ Str "Dashes"
+ , Space
+ , Str "between"
+ , Space
+ , Str "numbers:"
+ , Space
+ , Str "5\8211\&7,"
+ , Space
+ , Str "255\8211\&66,"
+ , Space
+ , Str "1987\8211\&1999."
+ ]
+ , Para [ Str "Ellipses\8230and\8230and\8230." ]
+ , HorizontalRule
+ , Header 1 ( "latex" , [] , [] ) [ Str "LaTeX" ]
+ , BulletList
+ [ [ Plain
+ [ RawInline (Format "tex") "\\cite[22-23]{smith.1899}" ]
+ ]
+ , [ Plain [ Math InlineMath "2+2=4" ] ]
+ , [ Plain [ Math InlineMath "x \\in y" ] ]
+ , [ Plain [ Math InlineMath "\\alpha \\wedge \\omega" ] ]
+ , [ Plain [ Math InlineMath "223" ] ]
+ , [ Plain [ Math InlineMath "p" , Str "-Tree" ] ]
+ , [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "some"
+ , Space
+ , Str "display"
+ , Space
+ , Str "math:"
+ , SoftBreak
+ , Math
+ DisplayMath
+ "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"
+ ]
+ ]
+ , [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "that"
+ , Space
+ , Str "has"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , Space
+ , Str "in"
+ , Space
+ , Str "it:"
+ , Space
+ , Math InlineMath "\\alpha + \\omega \\times x^2"
+ , Str "."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "shouldn\8217t"
+ , Space
+ , Str "be"
+ , Space
+ , Str "math:"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "To"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "famous"
+ , Space
+ , Str "equation,"
+ , Space
+ , Str "write"
+ , Space
+ , Code ( "" , [] , [] ) "$e = mc^2$"
+ , Str "."
+ ]
+ ]
+ , [ Plain
+ [ Str "$22,000"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Emph [ Str "lot" ]
+ , Space
+ , Str "of"
+ , Space
+ , Str "money."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Str "$34,000."
+ , SoftBreak
+ , Str "(It"
+ , Space
+ , Str "worked"
+ , Space
+ , Str "if"
+ , Space
+ , Quoted DoubleQuote [ Str "lot" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "emphasized.)"
+ ]
+ ]
+ , [ Plain
+ [ Str "Shoes"
+ , Space
+ , Str "($20)"
+ , Space
+ , Str "and"
+ , Space
+ , Str "socks"
+ , Space
+ , Str "($5)."
+ ]
+ ]
+ , [ Plain
+ [ Str "Escaped"
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ":"
+ , Space
+ , Str "$73"
+ , Space
+ , Emph
+ [ Str "this"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "emphasized"
+ ]
+ , Space
+ , Str "23$."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "LaTeX"
+ , Space
+ , Str "table:"
+ ]
+ , RawBlock
+ (Format "tex")
+ "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
+ , HorizontalRule
+ , Header
+ 1
+ ( "special-characters" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "I" , Space , Str "hat:" , Space , Str "\206" ]
+ ]
+ , [ Plain
+ [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Plain [ Str "section:" , Space , Str "\167" ] ]
+ , [ Plain
+ [ Str "set"
+ , Space
+ , Str "membership:"
+ , Space
+ , Str "\8712"
+ ]
+ ]
+ , [ Plain [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "way"
+ , Space
+ , Str "to"
+ , Space
+ , Str "write"
+ , Space
+ , Str "it."
+ ]
+ , Para
+ [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para
+ [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para
+ [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para
+ [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para
+ [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para
+ [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para
+ [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , HorizontalRule
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "explicit" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by two spaces" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by a tab" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with \"quotes\" in it" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with single quotes" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "with_underscore" ]
+ ( "/url/with_underscore" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Email" , Space , Str "link" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "Empty" ] ( "" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "reference" , [] , [] ) [ Str "Reference" ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "[brackets]" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
+ , Space
+ , Str "by"
+ , Space
+ , Str "itself"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "thrice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "[not][]"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , CodeBlock ( "" , [] , [] ) "[not]: /url"
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "bar" ]
+ ( "/url/" , "Title with \"quotes\" inside" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "biz" ]
+ ( "/url/" , "Title with \"quote\" inside" )
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "with-ampersands" , [] , [] )
+ [ Str "With" , Space , Str "ampersands" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "amersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "AT&T" ]
+ ( "http://att.com/" , "AT&T" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline" , Space , Str "link" ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline"
+ , Space
+ , Str "link"
+ , Space
+ , Str "in"
+ , Space
+ , Str "pointy"
+ , Space
+ , Str "braces"
+ ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "autolinks" , [] , [] ) [ Str "Autolinks" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand:"
+ , Space
+ , Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "In" , Space , Str "a" , Space , Str "list?" ]
+ ]
+ , [ Plain
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , [ Plain [ Str "It" , Space , Str "should." ] ]
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "e-mail"
+ , Space
+ , Str "address:"
+ , Space
+ , Link
+ ( "" , [ "email" ] , [] )
+ [ Str "nobody@nowhere.net" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Blockquoted:"
+ , Space
+ , Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , Para
+ [ Str "Auto-links"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "occur"
+ , Space
+ , Str "here:"
+ , Space
+ , Code ( "" , [] , [] ) "<http://example.com/>"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "or here: <http://example.com/>"
+ , HorizontalRule
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune"
+ ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "lalune" ]
+ ( "lalune.jpg" , "fig:Voyage dans la Lune" )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , Space
+ , Image
+ ( "" , [] , [] ) [ Str "movie" ] ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ ]
+ , HorizontalRule
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Note
+ [ Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "anywhere"
+ , Space
+ , Str "after"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote"
+ , SoftBreak
+ , Str "reference."
+ , Space
+ , Str "It"
+ , Space
+ , Str "need"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "placed"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document."
+ ]
+ ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "another."
+ , Note
+ [ Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "the"
+ , Space
+ , Str "long"
+ , Space
+ , Str "note."
+ , Space
+ , Str "This"
+ , Space
+ , Str "one"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "multiple"
+ , SoftBreak
+ , Str "blocks."
+ ]
+ , Para
+ [ Str "Subsequent"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "are"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "to"
+ , Space
+ , Str "show"
+ , Space
+ , Str "that"
+ , Space
+ , Str "they"
+ , Space
+ , Str "belong"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "footnote"
+ , Space
+ , Str "(as"
+ , Space
+ , Str "with"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items)."
+ ]
+ , CodeBlock ( "" , [] , [] ) " { <code> }"
+ , Para
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "want,"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "every"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "be"
+ , SoftBreak
+ , Str "lazy"
+ , Space
+ , Str "and"
+ , Space
+ , Str "just"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "line"
+ , Space
+ , Str "of"
+ , Space
+ , Str "each"
+ , Space
+ , Str "block."
+ ]
+ ]
+ , SoftBreak
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Emph [ Str "not" ]
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "it"
+ , SoftBreak
+ , Str "contains"
+ , Space
+ , Str "a"
+ , Space
+ , Str "space.[^my"
+ , Space
+ , Str "note]"
+ , Space
+ , Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "inline"
+ , Space
+ , Str "note."
+ , Note
+ [ Para
+ [ Str "This"
+ , SoftBreak
+ , Str "is"
+ , Space
+ , Emph [ Str "easier" ]
+ , Space
+ , Str "to"
+ , Space
+ , Str "type."
+ , Space
+ , Str "Inline"
+ , Space
+ , Str "notes"
+ , Space
+ , Str "may"
+ , Space
+ , Str "contain"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "links" ]
+ ( "http://google.com" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "]"
+ , Space
+ , Str "verbatim"
+ , Space
+ , Str "characters,"
+ , SoftBreak
+ , Str "as"
+ , Space
+ , Str "well"
+ , Space
+ , Str "as"
+ , Space
+ , Str "[bracketed"
+ , Space
+ , Str "text]."
+ ]
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Notes"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "in"
+ , Space
+ , Str "quotes."
+ , Note [ Para [ Str "In" , Space , Str "quote." ] ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain
+ [ Str "And"
+ , Space
+ , Str "in"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items."
+ , Note [ Para [ Str "In" , Space , Str "list." ] ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "note,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "it"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "indented."
+ ]
+ ]
diff --git a/test/textile-reader.native b/test/textile-reader.native
index e691e41fc..a9c78ec8f 100644
--- a/test/textile-reader.native
+++ b/test/textile-reader.native
@@ -1,243 +1,1260 @@
-Pandoc (Meta {unMeta = fromList []})
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader.",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,HorizontalRule
-,Header 1 ("headers",[],[]) [Str "Headers"]
-,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("http://www.example.com","")]
-,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Strong [Str "emphasis"]]
-,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"]
-,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
-,Header 6 ("level-6",[],[]) [Str "Level",Space,Str "6"]
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "Line",Space,Str "breaks",Space,Str "are",Space,Str "preserved",Space,Str "in",Space,Str "textile,",Space,Str "so",Space,Str "you",Space,Str "can",Space,Str "not",Space,Str "wrap",Space,Str "your",Space,Str "very",LineBreak,Str "long",Space,Str "paragraph",Space,Str "with",Space,Str "your",Space,Str "favourite",Space,Str "text",Space,Str "editor",Space,Str "and",Space,Str "have",Space,Str "it",Space,Str "rendered",LineBreak,Str "with",Space,Str "no",Space,Str "break."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet."]
-,BulletList
- [[Plain [Str "criminey."]]]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"]
-,Para [Str "and",Space,Str "here."]
-,Para [Str "pandoc",Space,Str "converts",Space,Str "textile."]
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "famous",Space,Str "quote",Space,Str "from",Space,Str "somebody.",Space,Str "He",Space,Str "had",Space,Str "a",Space,Str "lot",Space,Str "of",Space,Str "things",Space,Str "to",LineBreak,Str "say,",Space,Str "so",Space,Str "the",Space,Str "text",Space,Str "is",Space,Str "really",Space,Str "really",Space,Str "long",Space,Str "and",Space,Str "spans",Space,Str "on",Space,Str "multiple",Space,Str "lines."]]
-,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) " ---- (should be four hyphens)\n\n sub status {\n print \"working\";\n }\n\n this code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @</\\"
-,CodeBlock ("",[],[]) "extended code block\n\n continued"
-,Para [Str "ended",Space,Str "by",Space,Str "paragraph"]
-,Para [Str "Inline",Space,Str "code:",Space,Code ("",[],[]) "<tt>",Str ",",Space,Code ("",[],[]) "@",Str "."]
-,Header 1 ("notextile",[],[]) [Str "Notextile"]
-,Para [Str "A",Space,Str "block",Space,Str "of",Space,Str "text",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "notextile",Space,Str ":"]
-,Para [Str "\nNo *bold* and\n* no bullet\n"]
-,Para [Str "and",Space,Str "inlines",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "double *equals (=)* markup."]
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "asterisk",Space,Str "1"]]
- ,[Plain [Str "asterisk",Space,Str "2"]]
- ,[Plain [Str "asterisk",Space,Str "3"]]]
-,Para [Str "With",Space,Str "line",Space,Str "breaks:"]
-,BulletList
- [[Plain [Str "asterisk",Space,Str "1",LineBreak,Str "newline"]]
- ,[Plain [Str "asterisk",Space,Str "2"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,Para [Str "Tight:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second"]]
- ,[Plain [Str "Third"]]]
-,Header 2 ("nested",[],[]) [Str "Nested"]
-,BulletList
- [[Plain [Str "ui",Space,Str "1"]
- ,BulletList
- [[Plain [Str "ui",Space,Str "1.1"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "oi",Space,Str "1.1.1"]]
- ,[Plain [Str "oi",Space,Str "1.1.2"]]]]
- ,[Plain [Str "ui",Space,Str "1.2"]]]]
- ,[Plain [Str "ui",Space,Str "2"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "oi",Space,Str "2.1"]
- ,BulletList
- [[Plain [Str "ui",Space,Str "2.1.1"]]
- ,[Plain [Str "ui",Space,Str "2.1.2"]]]]]]]
-,Header 2 ("issue-1500",[],[]) [Str "Issue",Space,Str "#1500"]
-,BulletList
- [[Plain [Str "one"]]
- ,[Plain [Str "two",LineBreak,Str "->",Space,Str "and",Space,Str "more"]]]
-,Header 2 ("issue-1513",[],[]) [Str "Issue",Space,Str "#1513"]
-,Para [Str "List:"]
-,BulletList
- [[Plain [Str "one"]]
- ,[Plain [Str "two"]]]
-,Header 2 ("definition-list",[],[]) [Str "Definition",Space,Str "List"]
-,DefinitionList
- [([Str "coffee"],
- [[Plain [Str "Hot",Space,Str "and",Space,Str "black"]]])
- ,([Str "tea"],
- [[Plain [Str "Also",Space,Str "hot,",Space,Str "but",Space,Str "a",Space,Str "little",Space,Str "less",Space,Str "black"]]])
- ,([Str "milk"],
- [[Para [Str "Nourishing",Space,Str "beverage",Space,Str "for",Space,Str "baby",Space,Str "cows."]
- ,Para [Str "Cold",Space,Str "drink",Space,Str "that",Space,Str "goes",Space,Str "great",Space,Str "with",Space,Str "cookies."]]])
- ,([Str "beer"],
- [[Plain [Str "fresh",Space,Str "and",Space,Str "bitter"]]])]
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str ".",LineBreak,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str ".",LineBreak,Str "This",Space,Str "is",Space,Underline [Str "inserted"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "deleted"],Str ".",LineBreak,Str "Hyphenated-words-are-ok,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "strange_underscore_notation.",LineBreak,Str "A",Space,Link ("",[],[]) [Strong [Str "strong",Space,Str "link"]] ("http://www.foobar.com",""),Str "."]
-,Para [Emph [Strong [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]],LineBreak,Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Space,Str "and",Space,Emph [Strong [Str "that",Space,Str "one"]],Str ".",LineBreak,Strikeout [Str "This",Space,Str "is",Space,Str "strikeout",Space,Str "and",Space,Strong [Str "strong"]]]
-,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Space,Superscript [Strong [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str ".",LineBreak,Str "Subscripts:",Space,Subscript [Str "here"],Space,Str "H",Space,Subscript [Str "2"],Str "O,",Space,Str "H",Space,Subscript [Str "23"],Str "O,",Space,Str "H",Space,Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."]
-,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "\8212",Space,Str "automatic",Space,Str "dashes."]
-,Para [Str "Ellipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "\8230",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more."]
-,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Quoted DoubleQuote [Str "I\8217d",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you"],Space,Str "for",Space,Str "example."]
-,Header 1 ("links",[],[]) [Str "Links"]
-,Header 2 ("explicit",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "url"] ("http://www.url.com","")]
-,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
-,Para [Quoted DoubleQuote [Str "not",Space,Str "a",Space,Str "link"],Str ":",Space,Str "foo"]
-,Para [Str "Automatic",Space,Str "linking",Space,Str "to",Space,Link ("",[],[]) [Str "http://www.example.com"] ("http://www.example.com",""),Str "."]
-,Para [Link ("",[],[]) [Str "Example"] ("http://www.example.com/",""),Str ":",Space,Str "Example",Space,Str "of",Space,Str "a",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "colon."]
-,Para [Str "A",Space,Str "link",Link ("",[],[]) [Str "with",Space,Str "brackets"] ("http://www.example.com",""),Str "and",Space,Str "no",Space,Str "spaces."]
-,Header 1 ("tables",[],[]) [Str "Tables"]
-,Para [Str "Textile",Space,Str "allows",Space,Str "tables",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "headers",Space,Str ":"]
-,Header 2 ("without-headers",[],[]) [Str "Without",Space,Str "headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "name"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "age"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "sex"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "joan"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "24"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "archie"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "29"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "m"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "bella"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "45"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "\8230"]
-,Header 2 ("with-headers",[],[]) [Str "With",Space,Str "headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "name"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "age"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "sex"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "joan"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "24"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "archie"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "29"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "m"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "bella"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "45"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "Textile",Space,Str "inline",Space,Str "image",Space,Str "syntax,",Space,Str "like",LineBreak,Str "here",Space,Image ("",[],[]) [Str "this is the alt text"] ("this_is_an_image.png","this is the alt text"),LineBreak,Str "and",Space,Str "here",Space,Image ("",[],[]) [Str ""] ("this_is_an_image.png",""),Str "."]
-,Header 1 ("attributes",[],[]) [Str "Attributes"]
-,Header 2 ("ident",["bar","foo"],[("style","color:red;"),("lang","en")]) [Str "HTML",Space,Str "and",Space,Str "CSS",Space,Str "attributes",Space,Str "are",Space,Str "parsed",Space,Str "in",Space,Str "headers."]
-,Header 2 ("centered",[],[("style","text-align:center;")]) [Str "Centered"]
-,Header 2 ("right",[],[("style","text-align:right;")]) [Str "Right"]
-,Header 2 ("justified",[],[("lang","en"),("style","color:blue;text-align:justify;")]) [Str "Justified"]
-,Para [Str "as",Space,Str "well",Space,Str "as",Space,Strong [Span ("",["foo"],[]) [Str "inline",Space,Str "attributes"]],Space,Str "of",Space,Span ("",[],[("style","color:red;")]) [Str "all",Space,Str "kind"]]
-,Para [Str "and",Space,Str "paragraph",Space,Str "attributes,",Space,Str "and",Space,Str "table",Space,Str "attributes."]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "name"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "age"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "sex"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "joan"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "24"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Emph [Str "(class#id)",Space,Str "emph"]]
-,Para [Emph [Str "(no",Space,Str "class#id)",Space,Str "emph"]]
-,Header 1 ("entities",[],[]) [Str "Entities"]
-,Para [Str "*",LineBreak,Str "&"]
-,Header 1 ("raw-html",[],[]) [Str "Raw",Space,Str "HTML"]
-,Para [Str "However,",Space,RawInline (Format "html") "<strong>",Space,Str "raw",Space,Str "HTML",Space,Str "inlines",Space,RawInline (Format "html") "</strong>",Space,Str "are",Space,Str "accepted,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str ":"]
-,RawBlock (Format "html") "<div class=\"foobar\">"
-,Para [Str "any",Space,Strong [Str "Raw",Space,Str "HTML",Space,Str "Block"],Space,Str "with",Space,Str "bold"]
-,RawBlock (Format "html") "</div>"
-,Para [Str "Html",Space,Str "blocks",Space,Str "can"]
-,RawBlock (Format "html") "<div>"
-,Para [Str "interrupt",Space,Str "paragraphs"]
-,RawBlock (Format "html") "</div>"
-,Para [Str "as",Space,Str "well."]
-,Para [Str "Can",Space,Str "you",Space,Str "prove",Space,Str "that",Space,Str "2",Space,Str "<",Space,Str "3",Space,Str "?"]
-,Header 1 ("acronyms-and-marks",[],[]) [Str "Acronyms",Space,Str "and",Space,Str "marks"]
-,Para [Str "PBS (Public Broadcasting System)"]
-,Para [Str "Hi\8482"]
-,Para [Str "Hi",Space,Str "\8482"]
-,Para [Str "\174",Space,Str "Hi\174"]
-,Para [Str "Hi\169\&2008",Space,Str "\169",Space,Str "2008"]
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Str "A",Space,Str "note.",Note [Para [Str "The",Space,Str "note",LineBreak,Str "is",Space,Str "here!"]],Space,Str "Another",Space,Str "note",Note [Para [Str "Other",Space,Str "note."]],Str "."]
-,Header 1 ("comment-blocks",[],[]) [Str "Comment",Space,Str "blocks"]
-,Para [Str "not",Space,Str "a",Space,Str "comment."]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc"
+ , Space
+ , Str "Textile"
+ , Space
+ , Str "Reader."
+ , Space
+ , Str "Part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "it"
+ , Space
+ , Str "comes"
+ , LineBreak
+ , Str "from"
+ , Space
+ , Str "John"
+ , Space
+ , Str "Gruber\8217s"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , HorizontalRule
+ , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 2
+ ( "level-2-with-an-embedded-link" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "link" ]
+ ( "http://www.example.com" , "" )
+ ]
+ , Header
+ 3
+ ( "level-3-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Strong [ Str "emphasis" ]
+ ]
+ , Header
+ 4 ( "level-4" , [] , [] ) [ Str "Level" , Space , Str "4" ]
+ , Header
+ 5 ( "level-5" , [] , [] ) [ Str "Level" , Space , Str "5" ]
+ , Header
+ 6 ( "level-6" , [] , [] ) [ Str "Level" , Space , Str "6" ]
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "Line"
+ , Space
+ , Str "breaks"
+ , Space
+ , Str "are"
+ , Space
+ , Str "preserved"
+ , Space
+ , Str "in"
+ , Space
+ , Str "textile,"
+ , Space
+ , Str "so"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "not"
+ , Space
+ , Str "wrap"
+ , Space
+ , Str "your"
+ , Space
+ , Str "very"
+ , LineBreak
+ , Str "long"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "with"
+ , Space
+ , Str "your"
+ , Space
+ , Str "favourite"
+ , Space
+ , Str "text"
+ , Space
+ , Str "editor"
+ , Space
+ , Str "and"
+ , Space
+ , Str "have"
+ , Space
+ , Str "it"
+ , Space
+ , Str "rendered"
+ , LineBreak
+ , Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "break."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ ]
+ , BulletList [ [ Plain [ Str "criminey." ] ] ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "break"
+ , Space
+ , Str "between"
+ , Space
+ , Str "here"
+ ]
+ , Para [ Str "and" , Space , Str "here." ]
+ , Para
+ [ Str "pandoc"
+ , Space
+ , Str "converts"
+ , Space
+ , Str "textile."
+ ]
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "famous"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "from"
+ , Space
+ , Str "somebody."
+ , Space
+ , Str "He"
+ , Space
+ , Str "had"
+ , Space
+ , Str "a"
+ , Space
+ , Str "lot"
+ , Space
+ , Str "of"
+ , Space
+ , Str "things"
+ , Space
+ , Str "to"
+ , LineBreak
+ , Str "say,"
+ , Space
+ , Str "so"
+ , Space
+ , Str "the"
+ , Space
+ , Str "text"
+ , Space
+ , Str "is"
+ , Space
+ , Str "really"
+ , Space
+ , Str "really"
+ , Space
+ , Str "long"
+ , Space
+ , Str "and"
+ , Space
+ , Str "spans"
+ , Space
+ , Str "on"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "a"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " ---- (should be four hyphens)\n\n sub status {\n print \"working\";\n }\n\n this code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , CodeBlock
+ ( "" , [] , [] )
+ "Code block with .bc\n continued\n @</\\"
+ , CodeBlock
+ ( "" , [] , [] ) "extended code block\n\n continued"
+ , Para
+ [ Str "ended" , Space , Str "by" , Space , Str "paragraph" ]
+ , Para
+ [ Str "Inline"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) "<tt>"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "@"
+ , Str "."
+ ]
+ , Header 1 ( "notextile" , [] , [] ) [ Str "Notextile" ]
+ , Para
+ [ Str "A"
+ , Space
+ , Str "block"
+ , Space
+ , Str "of"
+ , Space
+ , Str "text"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "protected"
+ , Space
+ , Str "with"
+ , Space
+ , Str "notextile"
+ , Space
+ , Str ":"
+ ]
+ , Para [ Str "\nNo *bold* and\n* no bullet\n" ]
+ , Para
+ [ Str "and"
+ , Space
+ , Str "inlines"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "protected"
+ , Space
+ , Str "with"
+ , Space
+ , Str "double *equals (=)* markup."
+ ]
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para
+ [ Str "With" , Space , Str "line" , Space , Str "breaks:" ]
+ , BulletList
+ [ [ Plain
+ [ Str "asterisk"
+ , Space
+ , Str "1"
+ , LineBreak
+ , Str "newline"
+ ]
+ ]
+ , [ Plain [ Str "asterisk" , Space , Str "2" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Tight:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second" ] ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Plain [ Str "ui" , Space , Str "1" ]
+ , BulletList
+ [ [ Plain [ Str "ui" , Space , Str "1.1" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "oi" , Space , Str "1.1.1" ] ]
+ , [ Plain [ Str "oi" , Space , Str "1.1.2" ] ]
+ ]
+ ]
+ , [ Plain [ Str "ui" , Space , Str "1.2" ] ]
+ ]
+ ]
+ , [ Plain [ Str "ui" , Space , Str "2" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "oi" , Space , Str "2.1" ]
+ , BulletList
+ [ [ Plain [ Str "ui" , Space , Str "2.1.1" ] ]
+ , [ Plain [ Str "ui" , Space , Str "2.1.2" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "issue-1500" , [] , [] )
+ [ Str "Issue" , Space , Str "#1500" ]
+ , BulletList
+ [ [ Plain [ Str "one" ] ]
+ , [ Plain
+ [ Str "two"
+ , LineBreak
+ , Str "->"
+ , Space
+ , Str "and"
+ , Space
+ , Str "more"
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "issue-1513" , [] , [] )
+ [ Str "Issue" , Space , Str "#1513" ]
+ , Para [ Str "List:" ]
+ , BulletList
+ [ [ Plain [ Str "one" ] ] , [ Plain [ Str "two" ] ] ]
+ , Header
+ 2
+ ( "definition-list" , [] , [] )
+ [ Str "Definition" , Space , Str "List" ]
+ , DefinitionList
+ [ ( [ Str "coffee" ]
+ , [ [ Plain
+ [ Str "Hot" , Space , Str "and" , Space , Str "black" ]
+ ]
+ ]
+ )
+ , ( [ Str "tea" ]
+ , [ [ Plain
+ [ Str "Also"
+ , Space
+ , Str "hot,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "a"
+ , Space
+ , Str "little"
+ , Space
+ , Str "less"
+ , Space
+ , Str "black"
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "milk" ]
+ , [ [ Para
+ [ Str "Nourishing"
+ , Space
+ , Str "beverage"
+ , Space
+ , Str "for"
+ , Space
+ , Str "baby"
+ , Space
+ , Str "cows."
+ ]
+ , Para
+ [ Str "Cold"
+ , Space
+ , Str "drink"
+ , Space
+ , Str "that"
+ , Space
+ , Str "goes"
+ , Space
+ , Str "great"
+ , Space
+ , Str "with"
+ , Space
+ , Str "cookies."
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "beer" ]
+ , [ [ Plain
+ [ Str "fresh"
+ , Space
+ , Str "and"
+ , Space
+ , Str "bitter"
+ ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , Space , Str "this" ]
+ , Str "."
+ , LineBreak
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ , LineBreak
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Underline [ Str "inserted" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Strikeout [ Str "deleted" ]
+ , Str "."
+ , LineBreak
+ , Str "Hyphenated-words-are-ok,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "well"
+ , Space
+ , Str "as"
+ , Space
+ , Str "strange_underscore_notation."
+ , LineBreak
+ , Str "A"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Strong [ Str "strong" , Space , Str "link" ] ]
+ ( "http://www.foobar.com" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Emph
+ [ Strong
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ , LineBreak
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word"
+ , Space
+ , Str "and"
+ , Space
+ , Emph [ Strong [ Str "that" , Space , Str "one" ] ]
+ , Str "."
+ , LineBreak
+ , Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strikeout"
+ , Space
+ , Str "and"
+ , Space
+ , Strong [ Str "strong" ]
+ ]
+ ]
+ , Para
+ [ Str "Superscripts:"
+ , Space
+ , Str "a"
+ , Superscript [ Str "bc" ]
+ , Str "d"
+ , Space
+ , Str "a"
+ , Space
+ , Superscript [ Strong [ Str "hello" ] ]
+ , Space
+ , Str "a"
+ , Superscript [ Str "hello" , Space , Str "there" ]
+ , Str "."
+ , LineBreak
+ , Str "Subscripts:"
+ , Space
+ , Subscript [ Str "here" ]
+ , Space
+ , Str "H"
+ , Space
+ , Subscript [ Str "2" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Space
+ , Subscript [ Str "23" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Space
+ , Subscript
+ [ Str "many" , Space , Str "of" , Space , Str "them" ]
+ , Str "O."
+ ]
+ , Para
+ [ Str "Dashes"
+ , Space
+ , Str ":"
+ , Space
+ , Str "How"
+ , Space
+ , Str "cool"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "automatic"
+ , Space
+ , Str "dashes."
+ ]
+ , Para
+ [ Str "Ellipses"
+ , Space
+ , Str ":"
+ , Space
+ , Str "He"
+ , Space
+ , Str "thought"
+ , Space
+ , Str "and"
+ , Space
+ , Str "thought"
+ , Space
+ , Str "\8230"
+ , Space
+ , Str "and"
+ , Space
+ , Str "then"
+ , Space
+ , Str "thought"
+ , Space
+ , Str "some"
+ , Space
+ , Str "more."
+ ]
+ , Para
+ [ Str "Quotes"
+ , Space
+ , Str "and"
+ , Space
+ , Str "apostrophes"
+ , Space
+ , Str ":"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "I\8217d"
+ , Space
+ , Str "like"
+ , Space
+ , Str "to"
+ , Space
+ , Str "thank"
+ , Space
+ , Str "you"
+ ]
+ , Space
+ , Str "for"
+ , Space
+ , Str "example."
+ ]
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "explicit" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] ) [ Str "url" ] ( "http://www.url.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Email" , Space , Str "link" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , Para
+ [ Quoted
+ DoubleQuote
+ [ Str "not" , Space , Str "a" , Space , Str "link" ]
+ , Str ":"
+ , Space
+ , Str "foo"
+ ]
+ , Para
+ [ Str "Automatic"
+ , Space
+ , Str "linking"
+ , Space
+ , Str "to"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.example.com" ]
+ ( "http://www.example.com" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Example" ]
+ ( "http://www.example.com/" , "" )
+ , Str ":"
+ , Space
+ , Str "Example"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "followed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "a"
+ , Space
+ , Str "colon."
+ ]
+ , Para
+ [ Str "A"
+ , Space
+ , Str "link"
+ , Link
+ ( "" , [] , [] )
+ [ Str "with" , Space , Str "brackets" ]
+ ( "http://www.example.com" , "" )
+ , Str "and"
+ , Space
+ , Str "no"
+ , Space
+ , Str "spaces."
+ ]
+ , Header 1 ( "tables" , [] , [] ) [ Str "Tables" ]
+ , Para
+ [ Str "Textile"
+ , Space
+ , Str "allows"
+ , Space
+ , Str "tables"
+ , Space
+ , Str "with"
+ , Space
+ , Str "and"
+ , Space
+ , Str "without"
+ , Space
+ , Str "headers"
+ , Space
+ , Str ":"
+ ]
+ , Header
+ 2
+ ( "without-headers" , [] , [] )
+ [ Str "Without" , Space , Str "headers" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "name" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "age" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "sex" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "joan" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "24" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "archie" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "29" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "m" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "bella" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "45" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "and"
+ , Space
+ , Str "some"
+ , Space
+ , Str "text"
+ , Space
+ , Str "following"
+ , Space
+ , Str "\8230"
+ ]
+ , Header
+ 2
+ ( "with-headers" , [] , [] )
+ [ Str "With" , Space , Str "headers" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "name" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "age" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "sex" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "joan" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "24" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "archie" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "29" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "m" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "bella" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "45" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "Textile"
+ , Space
+ , Str "inline"
+ , Space
+ , Str "image"
+ , Space
+ , Str "syntax,"
+ , Space
+ , Str "like"
+ , LineBreak
+ , Str "here"
+ , Space
+ , Image
+ ( "" , [] , [] )
+ [ Str "this is the alt text" ]
+ ( "this_is_an_image.png" , "this is the alt text" )
+ , LineBreak
+ , Str "and"
+ , Space
+ , Str "here"
+ , Space
+ , Image
+ ( "" , [] , [] ) [ Str "" ] ( "this_is_an_image.png" , "" )
+ , Str "."
+ ]
+ , Header 1 ( "attributes" , [] , [] ) [ Str "Attributes" ]
+ , Header
+ 2
+ ( "ident"
+ , [ "bar" , "foo" ]
+ , [ ( "style" , "color:red;" ) , ( "lang" , "en" ) ]
+ )
+ [ Str "HTML"
+ , Space
+ , Str "and"
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "attributes"
+ , Space
+ , Str "are"
+ , Space
+ , Str "parsed"
+ , Space
+ , Str "in"
+ , Space
+ , Str "headers."
+ ]
+ , Header
+ 2
+ ( "centered" , [] , [ ( "style" , "text-align:center;" ) ] )
+ [ Str "Centered" ]
+ , Header
+ 2
+ ( "right" , [] , [ ( "style" , "text-align:right;" ) ] )
+ [ Str "Right" ]
+ , Header
+ 2
+ ( "justified"
+ , []
+ , [ ( "lang" , "en" )
+ , ( "style" , "color:blue;text-align:justify;" )
+ ]
+ )
+ [ Str "Justified" ]
+ , Para
+ [ Str "as"
+ , Space
+ , Str "well"
+ , Space
+ , Str "as"
+ , Space
+ , Strong
+ [ Span
+ ( "" , [ "foo" ] , [] )
+ [ Str "inline" , Space , Str "attributes" ]
+ ]
+ , Space
+ , Str "of"
+ , Space
+ , Span
+ ( "" , [] , [ ( "style" , "color:red;" ) ] )
+ [ Str "all" , Space , Str "kind" ]
+ ]
+ , Para
+ [ Str "and"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "attributes,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "table"
+ , Space
+ , Str "attributes."
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "name" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "age" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "sex" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "joan" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "24" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para [ Emph [ Str "(class#id)" , Space , Str "emph" ] ]
+ , Para
+ [ Emph
+ [ Str "(no" , Space , Str "class#id)" , Space , Str "emph" ]
+ ]
+ , Header 1 ( "entities" , [] , [] ) [ Str "Entities" ]
+ , Para [ Str "*" , LineBreak , Str "&" ]
+ , Header
+ 1
+ ( "raw-html" , [] , [] )
+ [ Str "Raw" , Space , Str "HTML" ]
+ , Para
+ [ Str "However,"
+ , Space
+ , RawInline (Format "html") "<strong>"
+ , Space
+ , Str "raw"
+ , Space
+ , Str "HTML"
+ , Space
+ , Str "inlines"
+ , Space
+ , RawInline (Format "html") "</strong>"
+ , Space
+ , Str "are"
+ , Space
+ , Str "accepted,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "well"
+ , Space
+ , Str "as"
+ , Space
+ , Str ":"
+ ]
+ , RawBlock (Format "html") "<div class=\"foobar\">"
+ , Para
+ [ Str "any"
+ , Space
+ , Strong
+ [ Str "Raw" , Space , Str "HTML" , Space , Str "Block" ]
+ , Space
+ , Str "with"
+ , Space
+ , Str "bold"
+ ]
+ , RawBlock (Format "html") "</div>"
+ , Para
+ [ Str "Html" , Space , Str "blocks" , Space , Str "can" ]
+ , RawBlock (Format "html") "<div>"
+ , Para [ Str "interrupt" , Space , Str "paragraphs" ]
+ , RawBlock (Format "html") "</div>"
+ , Para [ Str "as" , Space , Str "well." ]
+ , Para
+ [ Str "Can"
+ , Space
+ , Str "you"
+ , Space
+ , Str "prove"
+ , Space
+ , Str "that"
+ , Space
+ , Str "2"
+ , Space
+ , Str "<"
+ , Space
+ , Str "3"
+ , Space
+ , Str "?"
+ ]
+ , Header
+ 1
+ ( "acronyms-and-marks" , [] , [] )
+ [ Str "Acronyms" , Space , Str "and" , Space , Str "marks" ]
+ , Para [ Str "PBS (Public Broadcasting System)" ]
+ , Para [ Str "Hi\8482" ]
+ , Para [ Str "Hi" , Space , Str "\8482" ]
+ , Para [ Str "\174" , Space , Str "Hi\174" ]
+ , Para
+ [ Str "Hi\169\&2008"
+ , Space
+ , Str "\169"
+ , Space
+ , Str "2008"
+ ]
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Str "A"
+ , Space
+ , Str "note."
+ , Note
+ [ Para
+ [ Str "The"
+ , Space
+ , Str "note"
+ , LineBreak
+ , Str "is"
+ , Space
+ , Str "here!"
+ ]
+ ]
+ , Space
+ , Str "Another"
+ , Space
+ , Str "note"
+ , Note [ Para [ Str "Other" , Space , Str "note." ] ]
+ , Str "."
+ ]
+ , Header
+ 1
+ ( "comment-blocks" , [] , [] )
+ [ Str "Comment" , Space , Str "blocks" ]
+ , Para
+ [ Str "not" , Space , Str "a" , Space , Str "comment." ]
+ ]
diff --git a/test/tikiwiki-reader.native b/test/tikiwiki-reader.native
index 0c34f60ce..3a3f1038f 100644
--- a/test/tikiwiki-reader.native
+++ b/test/tikiwiki-reader.native
@@ -1,212 +1,775 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("header",[],[]) [Str "header"]
-,Header 2 ("header-level-two",[],[]) [Str "header",Space,Str "level",Space,Str "two"]
-,Header 3 ("header-level-3",[],[]) [Str "header",Space,Str "level",Space,Str "3"]
-,Header 4 ("header-_level_-four",[],[]) [Str "header",Space,Str "_level_",Space,Str "four"]
-,Header 5 ("header-level-5",[],[]) [Str "header",Space,Str "level",Space,Str "5"]
-,Header 6 ("header-level-6",[],[]) [Str "header",Space,Str "level",Space,Str "6"]
-,Para [Str "!!!!!!!",Space,Str "not",Space,Str "a",Space,Str "header"]
-,Para [Str "--++",Space,Str "not",Space,Str "a",Space,Str "header"]
-,Header 1 ("emph-and-strong",[],[]) [Str "emph",Space,Str "and",Space,Str "strong"]
-,Para [Emph [Str "emph"],Space,Strong [Str "strong"]]
-,Para [Emph [Strong [Str "strong",Space,Str "and",Space,Str "emph",Space,Str "1"]]]
-,Para [Strong [Emph [Str "strong",Space,Str "and",Space,Str "emph",Space,Str "2"]]]
-,Para [Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]]
-,Para [Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]]
-,Para [Emph [Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]]
-,Header 1 ("horizontal-rule",[],[]) [Str "horizontal",Space,Str "rule"]
-,Para [Str "top"]
-,HorizontalRule
-,Para [Str "bottom"]
-,HorizontalRule
-,Header 1 ("nop",[],[]) [Str "nop"]
-,Para [Str "__not emph__"]
-,Header 1 ("entities",[],[]) [Str "entities"]
-,Para [Str "hi",Space,Str "&",Space,Str "low"]
-,Para [Str "hi",Space,Str "&",Space,Str "low"]
-,Para [Str "G\246del"]
-,Para [Str "\777\2730"]
-,Header 1 ("linebreaks",[],[]) [Str "linebreaks"]
-,Para [Str "hi",LineBreak,Str "there"]
-,Para [Str "hi",LineBreak,Str "there"]
-,Header 1 ("inline-code",[],[]) [Str "inline",Space,Str "code"]
-,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",[],[]) ">>="]
-,Header 1 ("code-blocks",[],[]) [Str "code",Space,Str "blocks"]
-,CodeBlock ("",[],[]) "\ncase xs of\n (_:_) -> reverse xs\n [] -> ['*']\n"
-,CodeBlock ("",["haskell"],[("colors","haskell"),("ln","0")]) "\ncase xs of\n (_:_) -> reverse xs\n [] -> ['*']\n"
-,Header 1 ("external-links",[],[]) [Str "external",Space,Str "links"]
-,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")]
-,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")]
-,Para [Link ("",[],[]) [Str "http://google.com"] ("http://google.com",""),Space,Link ("",[],[]) [Str "http://yahoo.com"] ("http://yahoo.com","")]
-,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")]
-,Para [Str "http://google.com"]
-,Para [Str "info@example.org"]
-,Header 1 ("lists",[],[]) [Str "lists"]
-,BulletList
- [[Plain [Str "Start",Space,Str "each",Space,Str "line"]]
- ,[Plain [Str "with",Space,Str "an",Space,Str "asterisk",Space,Str "(*)."]
- ,BulletList
- [[Plain [Str "More",Space,Str "asterisks",Space,Str "gives",Space,Str "deeper"]
- ,BulletList
- [[Plain [Str "and",Space,Str "deeper",Space,Str "levels."]]]]]]
- ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]]
- ,[Plain [Str "Continuations",Space,Str "are",Space,Str "also",Space,Str "possible"]
- ,BulletList
- [[Plain [Str "and",Space,Str "do",Space,Str "not",Space,Str "break",Space,Str "the",Space,Str "list",Space,Str "flow"]]]]
- ,[Plain [Str "Level",Space,Str "one"]]]
-,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "ends",Space,Str "the",Space,Str "list."]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Start",Space,Str "each",Space,Str "line"]]
- ,[Plain [Str "with",Space,Str "a",Space,Str "number",Space,Str "(1.)."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "More",Space,Str "number",Space,Str "signs",Space,Str "gives",Space,Str "deeper"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "and",Space,Str "deeper"]]
- ,[Plain [Str "levels."]]]]]]
- ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]]
- ,[Plain [Str "Blank",Space,Str "lines"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "end",Space,Str "the",Space,Str "list",Space,Str "and",Space,Str "start",Space,Str "another."]]]
-,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "also",Space,Str "ends",Space,Str "the",Space,Str "list."]
-,DefinitionList
- [([Str "item",Space,Str "1"],
- [[Plain [Str "definition",Space,Str "1"]]])
- ,([Str "item",Space,Str "2"],
- [[Plain [Str "definition",Space,Str "2-1",Space,Str "definition",Space,Str "2-2"]]])
- ,([Str "item",Space,Emph [Str "3"]],
- [[Plain [Str "definition",Space,Emph [Str "3"]]]])]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "one"]]
- ,[Plain [Str "two"]
- ,BulletList
- [[Plain [Str "two",Space,Str "point",Space,Str "one"]]
- ,[Plain [Str "two",Space,Str "point",Space,Str "two"]]]]
- ,[Plain [Str "three"]]
- ,[Plain [Str "four"]]
- ,[Plain [Str "five"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "five",Space,Str "sub",Space,Str "1"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1"]]]]
- ,[Plain [Str "five",Space,Str "sub",Space,Str "2"]]]]]
-,Header 1 ("tables",[],[]) [Str "tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Pie"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Butter"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Pie"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Strong [Str "Butter"]]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bread",LineBreak,LineBreak,Str "and",Space,Str "cheese"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Pie",LineBreak,LineBreak,Strong [Str "apple"],Space,Str "and",Space,Emph [Str "carrot"],Space]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ""]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "Orange",Space]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "Apple",Space]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "more"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "Bread",Space]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "Pie",Space]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "more"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "Butter",Space]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "Ice",Space,Str "cream",Space]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Space,Str "and",Space,Str "more",Space]]]])]
- (TableFoot ("",[],[])
- [])]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header 1 ( "header" , [] , [] ) [ Str "header" ]
+ , Header
+ 2
+ ( "header-level-two" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "two" ]
+ , Header
+ 3
+ ( "header-level-3" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "3" ]
+ , Header
+ 4
+ ( "header-_level_-four" , [] , [] )
+ [ Str "header"
+ , Space
+ , Str "_level_"
+ , Space
+ , Str "four"
+ ]
+ , Header
+ 5
+ ( "header-level-5" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "5" ]
+ , Header
+ 6
+ ( "header-level-6" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "6" ]
+ , Para
+ [ Str "!!!!!!!"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ ]
+ , Para
+ [ Str "--++"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ ]
+ , Header
+ 1
+ ( "emph-and-strong" , [] , [] )
+ [ Str "emph" , Space , Str "and" , Space , Str "strong" ]
+ , Para
+ [ Emph [ Str "emph" ] , Space , Strong [ Str "strong" ] ]
+ , Para
+ [ Emph
+ [ Strong
+ [ Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "emph"
+ , Space
+ , Str "1"
+ ]
+ ]
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "emph"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Para
+ [ Strong
+ [ Emph [ Str "emph" , Space , Str "inside" ]
+ , Space
+ , Str "strong"
+ ]
+ ]
+ , Para
+ [ Strong
+ [ Str "strong"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emph" ]
+ ]
+ ]
+ , Para
+ [ Emph
+ [ Strong [ Str "strong" , Space , Str "inside" ]
+ , Space
+ , Str "emph"
+ ]
+ ]
+ , Header
+ 1
+ ( "horizontal-rule" , [] , [] )
+ [ Str "horizontal" , Space , Str "rule" ]
+ , Para [ Str "top" ]
+ , HorizontalRule
+ , Para [ Str "bottom" ]
+ , HorizontalRule
+ , Header 1 ( "nop" , [] , [] ) [ Str "nop" ]
+ , Para [ Str "__not emph__" ]
+ , Header 1 ( "entities" , [] , [] ) [ Str "entities" ]
+ , Para [ Str "hi" , Space , Str "&" , Space , Str "low" ]
+ , Para [ Str "hi" , Space , Str "&" , Space , Str "low" ]
+ , Para [ Str "G\246del" ]
+ , Para [ Str "\777\2730" ]
+ , Header 1 ( "linebreaks" , [] , [] ) [ Str "linebreaks" ]
+ , Para [ Str "hi" , LineBreak , Str "there" ]
+ , Para [ Str "hi" , LineBreak , Str "there" ]
+ , Header
+ 1
+ ( "inline-code" , [] , [] )
+ [ Str "inline" , Space , Str "code" ]
+ , Para
+ [ Code ( "" , [] , [] ) "*\8594*"
+ , Space
+ , Code ( "" , [] , [] ) "typed"
+ , Space
+ , Code ( "" , [] , [] ) ">>="
+ ]
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "code" , Space , Str "blocks" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "\ncase xs of\n (_:_) -> reverse xs\n [] -> ['*']\n"
+ , CodeBlock
+ ( ""
+ , [ "haskell" ]
+ , [ ( "colors" , "haskell" ) , ( "ln" , "0" ) ]
+ )
+ "\ncase xs of\n (_:_) -> reverse xs\n [] -> ['*']\n"
+ , Header
+ 1
+ ( "external-links" , [] , [] )
+ [ Str "external" , Space , Str "links" ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Emph [ Str "Google" ]
+ , Space
+ , Str "search"
+ , Space
+ , Str "engine"
+ ]
+ ( "http://google.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://pandoc.org" ]
+ ( "http://pandoc.org" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://google.com" ]
+ ( "http://google.com" , "" )
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://yahoo.com" ]
+ ( "http://yahoo.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "email" , Space , Str "me" ]
+ ( "mailto:info@example.org" , "" )
+ ]
+ , Para [ Str "http://google.com" ]
+ , Para [ Str "info@example.org" ]
+ , Header 1 ( "lists" , [] , [] ) [ Str "lists" ]
+ , BulletList
+ [ [ Plain
+ [ Str "Start" , Space , Str "each" , Space , Str "line" ]
+ ]
+ , [ Plain
+ [ Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "asterisk"
+ , Space
+ , Str "(*)."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "More"
+ , Space
+ , Str "asterisks"
+ , Space
+ , Str "gives"
+ , Space
+ , Str "deeper"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "and"
+ , Space
+ , Str "deeper"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Line"
+ , Space
+ , Str "breaks"
+ , LineBreak
+ , Str "don't"
+ , Space
+ , Str "break"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ , [ Plain
+ [ Str "Continuations"
+ , Space
+ , Str "are"
+ , Space
+ , Str "also"
+ , Space
+ , Str "possible"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "and"
+ , Space
+ , Str "do"
+ , Space
+ , Str "not"
+ , Space
+ , Str "break"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list"
+ , Space
+ , Str "flow"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Level" , Space , Str "one" ] ]
+ ]
+ , Para
+ [ Str "Any"
+ , Space
+ , Str "other"
+ , Space
+ , Str "start"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Start" , Space , Str "each" , Space , Str "line" ]
+ ]
+ , [ Plain
+ [ Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "number"
+ , Space
+ , Str "(1.)."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "More"
+ , Space
+ , Str "number"
+ , Space
+ , Str "signs"
+ , Space
+ , Str "gives"
+ , Space
+ , Str "deeper"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "and" , Space , Str "deeper" ] ]
+ , [ Plain [ Str "levels." ] ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Line"
+ , Space
+ , Str "breaks"
+ , LineBreak
+ , Str "don't"
+ , Space
+ , Str "break"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ , [ Plain [ Str "Blank" , Space , Str "lines" ] ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "end"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list"
+ , Space
+ , Str "and"
+ , Space
+ , Str "start"
+ , Space
+ , Str "another."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Any"
+ , Space
+ , Str "other"
+ , Space
+ , Str "start"
+ , Space
+ , Str "also"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list."
+ ]
+ , DefinitionList
+ [ ( [ Str "item" , Space , Str "1" ]
+ , [ [ Plain [ Str "definition" , Space , Str "1" ] ] ]
+ )
+ , ( [ Str "item" , Space , Str "2" ]
+ , [ [ Plain
+ [ Str "definition"
+ , Space
+ , Str "2-1"
+ , Space
+ , Str "definition"
+ , Space
+ , Str "2-2"
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "item" , Space , Emph [ Str "3" ] ]
+ , [ [ Plain [ Str "definition" , Space , Emph [ Str "3" ] ]
+ ]
+ ]
+ )
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "one" ] ]
+ , [ Plain [ Str "two" ]
+ , BulletList
+ [ [ Plain
+ [ Str "two"
+ , Space
+ , Str "point"
+ , Space
+ , Str "one"
+ ]
+ ]
+ , [ Plain
+ [ Str "two"
+ , Space
+ , Str "point"
+ , Space
+ , Str "two"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "three" ] ]
+ , [ Plain [ Str "four" ] ]
+ , [ Plain [ Str "five" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "five" , Space , Str "sub" , Space , Str "1" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "five"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "1"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "1"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "five" , Space , Str "sub" , Space , Str "2" ]
+ ]
+ ]
+ ]
+ ]
+ , Header 1 ( "tables" , [] , [] ) [ Str "tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Pie" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Butter" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Pie" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Strong [ Str "Butter" ] ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Bread"
+ , LineBreak
+ , LineBreak
+ , Str "and"
+ , Space
+ , Str "cheese"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Pie"
+ , LineBreak
+ , LineBreak
+ , Strong [ Str "apple" ]
+ , Space
+ , Str "and"
+ , Space
+ , Emph [ Str "carrot" ]
+ , Space
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Space , Str "Orange" , Space ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Space , Str "Apple" , Space ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Space , Str "more" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Space , Str "Bread" , Space ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Space , Str "Pie" , Space ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Space , Str "more" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Space , Str "Butter" , Space ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Space
+ , Str "Ice"
+ , Space
+ , Str "cream"
+ , Space
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Space , Str "and" , Space , Str "more" , Space ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
diff --git a/test/twiki-reader.native b/test/twiki-reader.native
index 704bcbd9a..e41301966 100644
--- a/test/twiki-reader.native
+++ b/test/twiki-reader.native
@@ -1,250 +1,863 @@
-Pandoc (Meta {unMeta = fromList []})
-[Header 1 ("header",[],[]) [Str "header"]
-,Header 2 ("header-level-two",[],[]) [Str "header",Space,Str "level",Space,Str "two"]
-,Header 3 ("header-level-3",[],[]) [Str "header",Space,Str "level",Space,Str "3"]
-,Header 4 ("header-level-four",[],[]) [Str "header",Space,Emph [Str "level"],Space,Str "four"]
-,Header 5 ("header-level-5",[],[]) [Str "header",Space,Str "level",Space,Str "5"]
-,Header 6 ("header-level-6",[],[]) [Str "header",Space,Str "level",Space,Str "6"]
-,Para [Str "---+++++++",Space,Str "not",Space,Str "a",Space,Str "header"]
-,Para [Str "--++",Space,Str "not",Space,Str "a",Space,Str "header"]
-,Header 1 ("emph-and-strong",[],[]) [Str "emph",Space,Str "and",Space,Str "strong"]
-,Para [Emph [Str "emph"],Space,Strong [Str "strong"]]
-,Para [Emph [Strong [Str "strong",Space,Str "and",Space,Str "emph"]]]
-,Para [Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]]
-,Para [Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]]
-,Para [Emph [Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]]
-,Header 1 ("horizontal-rule",[],[]) [Str "horizontal",Space,Str "rule"]
-,Para [Str "top"]
-,HorizontalRule
-,Para [Str "bottom"]
-,HorizontalRule
-,Header 1 ("nop",[],[]) [Str "nop"]
-,Para [Str "_not",Space,Str "emph_"]
-,Header 1 ("entities",[],[]) [Str "entities"]
-,Para [Str "hi",Space,Str "&",Space,Str "low"]
-,Para [Str "hi",Space,Str "&",Space,Str "low"]
-,Para [Str "G\246del"]
-,Para [Str "\777\2730"]
-,Header 1 ("comments",[],[]) [Str "comments"]
-,Para [Str "inline",Space,Str "comment"]
-,Para [Str "between",Space,Str "blocks"]
-,Header 1 ("linebreaks",[],[]) [Str "linebreaks"]
-,Para [Str "hi",LineBreak,Str "there"]
-,Para [Str "hi",LineBreak,Str "there"]
-,Header 1 ("inline-code",[],[]) [Str "inline",Space,Str "code"]
-,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",["haskell"],[]) ">>="]
-,Header 1 ("code-blocks",[],[]) [Str "code",Space,Str "blocks"]
-,CodeBlock ("",[],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
-,CodeBlock ("",["haskell"],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
-,Header 1 ("block-quotes",[],[]) [Str "block",Space,Str "quotes"]
-,Para [Str "Regular",Space,Str "paragraph"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."]
- ,Para [Str "With",Space,Str "two",Space,Str "paragraphs."]]
-,Para [Str "Nother",Space,Str "paragraph."]
-,Header 1 ("external-links",[],[]) [Str "external",Space,Str "links"]
-,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")]
-,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")]
-,Para [Link ("",[],[]) [Str "http://google.com"] ("http://google.com",""),Space,Link ("",[],[]) [Str "http://yahoo.com"] ("http://yahoo.com","")]
-,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")]
-,Para [Str "http://google.com"]
-,Para [Str "http://google.com"]
-,Para [Str "http://google.com"]
-,Para [Str "info@example.org"]
-,Para [Str "info@example.org"]
-,Para [Str "info@example.org"]
-,Header 1 ("lists",[],[]) [Str "lists"]
-,BulletList
- [[Plain [Str "Start",Space,Str "each",Space,Str "line"]]
- ,[Plain [Str "with",Space,Str "an",Space,Str "asterisk",Space,Str "(*)."]
- ,BulletList
- [[Plain [Str "More",Space,Str "asterisks",Space,Str "gives",Space,Str "deeper"]
- ,BulletList
- [[Plain [Str "and",Space,Str "deeper",Space,Str "levels."]]]]]]
- ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]]
- ,[Plain [Str "Continuations",Space,Str "are",Space,Str "also",Space,Str "possible"]
- ,BulletList
- [[Plain [Str "and",Space,Str "do",Space,Str "not",Space,Str "break",Space,Str "the",Space,Str "list",Space,Str "flow"]]]]
- ,[Plain [Str "Level",Space,Str "one"]]]
-,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "ends",Space,Str "the",Space,Str "list."]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Start",Space,Str "each",Space,Str "line"]]
- ,[Plain [Str "with",Space,Str "a",Space,Str "number",Space,Str "(1.)."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "More",Space,Str "number",Space,Str "signs",Space,Str "gives",Space,Str "deeper"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "and",Space,Str "deeper"]]
- ,[Plain [Str "levels."]]]]]]
- ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]]
- ,[Plain [Str "Blank",Space,Str "lines"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "end",Space,Str "the",Space,Str "list",Space,Str "and",Space,Str "start",Space,Str "another."]]]
-,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "also",Space,Str "ends",Space,Str "the",Space,Str "list."]
-,DefinitionList
- [([Str "item",Space,Str "1"],
- [[Plain [Str "definition",Space,Str "1"]]])
- ,([Str "item",Space,Str "2"],
- [[Plain [Str "definition",Space,Str "2-1",Space,Str "definition",Space,Str "2-2"]]])
- ,([Str "item",Space,Emph [Str "3"]],
- [[Plain [Str "definition",Space,Emph [Str "3"]]]])]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "one"]]
- ,[Plain [Str "two"]
- ,BulletList
- [[Plain [Str "two",Space,Str "point",Space,Str "one"]]
- ,[Plain [Str "two",Space,Str "point",Space,Str "two"]]]]
- ,[Plain [Str "three"]
- ,DefinitionList
- [([Str "three",Space,Str "item",Space,Str "one"],
- [[Plain [Str "three",Space,Str "def",Space,Str "one"]]])]]
- ,[Plain [Str "four"]
- ,DefinitionList
- [([Str "four",Space,Str "def",Space,Str "one"],
- [[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "continuation"]]])]]
- ,[Plain [Str "five"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "five",Space,Str "sub",Space,Str "1"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1"]]]]
- ,[Plain [Str "five",Space,Str "sub",Space,Str "2"]]]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "other"]
- ,OrderedList (1,UpperRoman,DefaultDelim)
- [[Plain [Str "list"]]
- ,[Plain [Str "styles"]]]]
- ,[Plain [Str "are"]
- ,OrderedList (1,LowerRoman,DefaultDelim)
- [[Plain [Str "also"]]
- ,[Plain [Str "possible"]]]]
- ,[Plain [Str "all"]
- ,OrderedList (1,LowerAlpha,DefaultDelim)
- [[Plain [Str "the"]]
- ,[Plain [Str "different"]]
- ,[Plain [Str "styles"]]]]
- ,[Plain [Str "are"]
- ,OrderedList (1,UpperAlpha,DefaultDelim)
- [[Plain [Str "implemented"]]
- ,[Plain [Str "and"]]
- ,[Plain [Str "supported"]]]]]
-,Header 1 ("tables",[],[]) [Str "tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Pie"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Butter"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Pie"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Strong [Str "Butter"]]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Ice",Space,Str "cream"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignLeft,ColWidthDefault)
- ,(AlignLeft,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bread",LineBreak,LineBreak,Str "and",Space,Str "cheese"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Pie",LineBreak,LineBreak,Strong [Str "apple"],Space,Str "and",Space,Emph [Str "carrot"]]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Orange"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apple"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "more"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Bread"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Pie"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "more"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Butter"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Ice",Space,Str "cream"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "and",Space,Str "more"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 1 ("macros",[],[]) [Str "macros"]
-,Para [Span ("",["twiki-macro","TEST"],[]) []]
-,Para [Span ("",["twiki-macro","TEST"],[]) [Str ""]]
-,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces"]]
-,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces"]]
-,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test")]) [Str "content with spaces"]]
-,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces ARG1=test"]]
-,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test")]) [Str "content with spaces"]]
-,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str ""]]
-,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str ""]]
-,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str "multiline\ndoes also work"]]]
+Pandoc
+ Meta { unMeta = fromList [] }
+ [ Header 1 ( "header" , [] , [] ) [ Str "header" ]
+ , Header
+ 2
+ ( "header-level-two" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "two" ]
+ , Header
+ 3
+ ( "header-level-3" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "3" ]
+ , Header
+ 4
+ ( "header-level-four" , [] , [] )
+ [ Str "header"
+ , Space
+ , Emph [ Str "level" ]
+ , Space
+ , Str "four"
+ ]
+ , Header
+ 5
+ ( "header-level-5" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "5" ]
+ , Header
+ 6
+ ( "header-level-6" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "6" ]
+ , Para
+ [ Str "---+++++++"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ ]
+ , Para
+ [ Str "--++"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ ]
+ , Header
+ 1
+ ( "emph-and-strong" , [] , [] )
+ [ Str "emph" , Space , Str "and" , Space , Str "strong" ]
+ , Para
+ [ Emph [ Str "emph" ] , Space , Strong [ Str "strong" ] ]
+ , Para
+ [ Emph
+ [ Strong
+ [ Str "strong" , Space , Str "and" , Space , Str "emph" ]
+ ]
+ ]
+ , Para
+ [ Strong
+ [ Emph [ Str "emph" , Space , Str "inside" ]
+ , Space
+ , Str "strong"
+ ]
+ ]
+ , Para
+ [ Strong
+ [ Str "strong"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emph" ]
+ ]
+ ]
+ , Para
+ [ Emph
+ [ Strong [ Str "strong" , Space , Str "inside" ]
+ , Space
+ , Str "emph"
+ ]
+ ]
+ , Header
+ 1
+ ( "horizontal-rule" , [] , [] )
+ [ Str "horizontal" , Space , Str "rule" ]
+ , Para [ Str "top" ]
+ , HorizontalRule
+ , Para [ Str "bottom" ]
+ , HorizontalRule
+ , Header 1 ( "nop" , [] , [] ) [ Str "nop" ]
+ , Para [ Str "_not" , Space , Str "emph_" ]
+ , Header 1 ( "entities" , [] , [] ) [ Str "entities" ]
+ , Para [ Str "hi" , Space , Str "&" , Space , Str "low" ]
+ , Para [ Str "hi" , Space , Str "&" , Space , Str "low" ]
+ , Para [ Str "G\246del" ]
+ , Para [ Str "\777\2730" ]
+ , Header 1 ( "comments" , [] , [] ) [ Str "comments" ]
+ , Para [ Str "inline" , Space , Str "comment" ]
+ , Para [ Str "between" , Space , Str "blocks" ]
+ , Header 1 ( "linebreaks" , [] , [] ) [ Str "linebreaks" ]
+ , Para [ Str "hi" , LineBreak , Str "there" ]
+ , Para [ Str "hi" , LineBreak , Str "there" ]
+ , Header
+ 1
+ ( "inline-code" , [] , [] )
+ [ Str "inline" , Space , Str "code" ]
+ , Para
+ [ Code ( "" , [] , [] ) "*\8594*"
+ , Space
+ , Code ( "" , [] , [] ) "typed"
+ , Space
+ , Code ( "" , [ "haskell" ] , [] ) ">>="
+ ]
+ , Header
+ 1
+ ( "code-blocks" , [] , [] )
+ [ Str "code" , Space , Str "blocks" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
+ , CodeBlock
+ ( "" , [ "haskell" ] , [] )
+ "case xs of\n (_:_) -> reverse xs\n [] -> ['*']"
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "block" , Space , Str "quotes" ]
+ , Para [ Str "Regular" , Space , Str "paragraph" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "two"
+ , Space
+ , Str "paragraphs."
+ ]
+ ]
+ , Para [ Str "Nother" , Space , Str "paragraph." ]
+ , Header
+ 1
+ ( "external-links" , [] , [] )
+ [ Str "external" , Space , Str "links" ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Emph [ Str "Google" ]
+ , Space
+ , Str "search"
+ , Space
+ , Str "engine"
+ ]
+ ( "http://google.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://pandoc.org" ]
+ ( "http://pandoc.org" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://google.com" ]
+ ( "http://google.com" , "" )
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://yahoo.com" ]
+ ( "http://yahoo.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "email" , Space , Str "me" ]
+ ( "mailto:info@example.org" , "" )
+ ]
+ , Para [ Str "http://google.com" ]
+ , Para [ Str "http://google.com" ]
+ , Para [ Str "http://google.com" ]
+ , Para [ Str "info@example.org" ]
+ , Para [ Str "info@example.org" ]
+ , Para [ Str "info@example.org" ]
+ , Header 1 ( "lists" , [] , [] ) [ Str "lists" ]
+ , BulletList
+ [ [ Plain
+ [ Str "Start" , Space , Str "each" , Space , Str "line" ]
+ ]
+ , [ Plain
+ [ Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "asterisk"
+ , Space
+ , Str "(*)."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "More"
+ , Space
+ , Str "asterisks"
+ , Space
+ , Str "gives"
+ , Space
+ , Str "deeper"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "and"
+ , Space
+ , Str "deeper"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Line"
+ , Space
+ , Str "breaks"
+ , LineBreak
+ , Str "don't"
+ , Space
+ , Str "break"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ , [ Plain
+ [ Str "Continuations"
+ , Space
+ , Str "are"
+ , Space
+ , Str "also"
+ , Space
+ , Str "possible"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "and"
+ , Space
+ , Str "do"
+ , Space
+ , Str "not"
+ , Space
+ , Str "break"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list"
+ , Space
+ , Str "flow"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Level" , Space , Str "one" ] ]
+ ]
+ , Para
+ [ Str "Any"
+ , Space
+ , Str "other"
+ , Space
+ , Str "start"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Start" , Space , Str "each" , Space , Str "line" ]
+ ]
+ , [ Plain
+ [ Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "number"
+ , Space
+ , Str "(1.)."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "More"
+ , Space
+ , Str "number"
+ , Space
+ , Str "signs"
+ , Space
+ , Str "gives"
+ , Space
+ , Str "deeper"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "and" , Space , Str "deeper" ] ]
+ , [ Plain [ Str "levels." ] ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Line"
+ , Space
+ , Str "breaks"
+ , LineBreak
+ , Str "don't"
+ , Space
+ , Str "break"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ , [ Plain [ Str "Blank" , Space , Str "lines" ] ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "end"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list"
+ , Space
+ , Str "and"
+ , Space
+ , Str "start"
+ , Space
+ , Str "another."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Any"
+ , Space
+ , Str "other"
+ , Space
+ , Str "start"
+ , Space
+ , Str "also"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list."
+ ]
+ , DefinitionList
+ [ ( [ Str "item" , Space , Str "1" ]
+ , [ [ Plain [ Str "definition" , Space , Str "1" ] ] ]
+ )
+ , ( [ Str "item" , Space , Str "2" ]
+ , [ [ Plain
+ [ Str "definition"
+ , Space
+ , Str "2-1"
+ , Space
+ , Str "definition"
+ , Space
+ , Str "2-2"
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "item" , Space , Emph [ Str "3" ] ]
+ , [ [ Plain [ Str "definition" , Space , Emph [ Str "3" ] ]
+ ]
+ ]
+ )
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "one" ] ]
+ , [ Plain [ Str "two" ]
+ , BulletList
+ [ [ Plain
+ [ Str "two"
+ , Space
+ , Str "point"
+ , Space
+ , Str "one"
+ ]
+ ]
+ , [ Plain
+ [ Str "two"
+ , Space
+ , Str "point"
+ , Space
+ , Str "two"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "three" ]
+ , DefinitionList
+ [ ( [ Str "three" , Space , Str "item" , Space , Str "one" ]
+ , [ [ Plain
+ [ Str "three"
+ , Space
+ , Str "def"
+ , Space
+ , Str "one"
+ ]
+ ]
+ ]
+ )
+ ]
+ ]
+ , [ Plain [ Str "four" ]
+ , DefinitionList
+ [ ( [ Str "four" , Space , Str "def" , Space , Str "one" ]
+ , [ [ Plain
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "continuation"
+ ]
+ ]
+ ]
+ )
+ ]
+ ]
+ , [ Plain [ Str "five" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "five" , Space , Str "sub" , Space , Str "1" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "five"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "1"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "1"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "five" , Space , Str "sub" , Space , Str "2" ]
+ ]
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "other" ]
+ , OrderedList
+ ( 1 , UpperRoman , DefaultDelim )
+ [ [ Plain [ Str "list" ] ] , [ Plain [ Str "styles" ] ] ]
+ ]
+ , [ Plain [ Str "are" ]
+ , OrderedList
+ ( 1 , LowerRoman , DefaultDelim )
+ [ [ Plain [ Str "also" ] ] , [ Plain [ Str "possible" ] ] ]
+ ]
+ , [ Plain [ Str "all" ]
+ , OrderedList
+ ( 1 , LowerAlpha , DefaultDelim )
+ [ [ Plain [ Str "the" ] ]
+ , [ Plain [ Str "different" ] ]
+ , [ Plain [ Str "styles" ] ]
+ ]
+ ]
+ , [ Plain [ Str "are" ]
+ , OrderedList
+ ( 1 , UpperAlpha , DefaultDelim )
+ [ [ Plain [ Str "implemented" ] ]
+ , [ Plain [ Str "and" ] ]
+ , [ Plain [ Str "supported" ] ]
+ ]
+ ]
+ ]
+ , Header 1 ( "tables" , [] , [] ) [ Str "tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Pie" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Butter" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Pie" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Strong [ Str "Butter" ] ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Ice" , Space , Str "cream" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignLeft , ColWidthDefault )
+ , ( AlignLeft , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Bread"
+ , LineBreak
+ , LineBreak
+ , Str "and"
+ , Space
+ , Str "cheese"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "Pie"
+ , LineBreak
+ , LineBreak
+ , Strong [ Str "apple" ]
+ , Space
+ , Str "and"
+ , Space
+ , Emph [ Str "carrot" ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Orange" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apple" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "more" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Bread" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Pie" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "more" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Butter" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Ice" , Space , Str "cream" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "and" , Space , Str "more" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header 1 ( "macros" , [] , [] ) [ Str "macros" ]
+ , Para [ Span ( "" , [ "twiki-macro" , "TEST" ] , [] ) [] ]
+ , Para
+ [ Span ( "" , [ "twiki-macro" , "TEST" ] , [] ) [ Str "" ] ]
+ , Para
+ [ Span
+ ( "" , [ "twiki-macro" , "TEST" ] , [] )
+ [ Str "content with spaces" ]
+ ]
+ , Para
+ [ Span
+ ( "" , [ "twiki-macro" , "TEST" ] , [] )
+ [ Str "content with spaces" ]
+ ]
+ , Para
+ [ Span
+ ( ""
+ , [ "twiki-macro" , "TEST" ]
+ , [ ( "ARG1" , "test" ) ]
+ )
+ [ Str "content with spaces" ]
+ ]
+ , Para
+ [ Span
+ ( "" , [ "twiki-macro" , "TEST" ] , [] )
+ [ Str "content with spaces ARG1=test" ]
+ ]
+ , Para
+ [ Span
+ ( ""
+ , [ "twiki-macro" , "TEST" ]
+ , [ ( "ARG1" , "test" ) ]
+ )
+ [ Str "content with spaces" ]
+ ]
+ , Para
+ [ Span
+ ( ""
+ , [ "twiki-macro" , "TEST" ]
+ , [ ( "ARG1" , "test" ) , ( "ARG2" , "test2" ) ]
+ )
+ [ Str "" ]
+ ]
+ , Para
+ [ Span
+ ( ""
+ , [ "twiki-macro" , "TEST" ]
+ , [ ( "ARG1" , "test" ) , ( "ARG2" , "test2" ) ]
+ )
+ [ Str "" ]
+ ]
+ , Para
+ [ Span
+ ( ""
+ , [ "twiki-macro" , "TEST" ]
+ , [ ( "ARG1" , "test" ) , ( "ARG2" , "test2" ) ]
+ )
+ [ Str "multiline\ndoes also work" ]
+ ]
+ ]
diff --git a/test/txt2tags.native b/test/txt2tags.native
index c52c5929a..5c60fbb4d 100644
--- a/test/txt2tags.native
+++ b/test/txt2tags.native
@@ -1,968 +1,5299 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]),("date",MetaInlines [Str "date"]),("includeconf",MetaString "rules.conf"),("title",MetaInlines [Str "Txt2tags",Space,Str "Markup",Space,Str "Rules"])]})
-[Para [Str "This",Space,Str "document",Space,Str "describes",Space,Str "all",Space,Str "the",Space,Str "details",Space,Str "about",Space,Str "each",Space,Str "txt2tags",Space,Str "mark.",SoftBreak,Str "The",Space,Str "target",Space,Str "audience",Space,Str "are",Space,Strong [Str "experienced"],Space,Str "users.",Space,Str "You",Space,Str "may",Space,Str "find",Space,Str "it",SoftBreak,Str "useful",Space,Str "if",Space,Str "you",Space,Str "want",Space,Str "to",Space,Str "master",Space,Str "the",Space,Str "marks",Space,Str "or",Space,Str "solve",Space,Str "a",Space,Str "specific",Space,Str "problem",SoftBreak,Str "about",Space,Str "a",Space,Str "mark."]
-,Para [Str "If",Space,Str "you",Space,Str "are",Space,Str "new",Space,Str "to",Space,Str "txt2tags",Space,Str "or",Space,Str "just",Space,Str "want",Space,Str "to",Space,Str "know",Space,Str "which",Space,Str "are",Space,Str "the",SoftBreak,Str "available",Space,Str "marks,",Space,Str "please",Space,Str "read",Space,Str "the",Space,Link ("",[],[]) [Str "Markup",Space,Str "Demo"] ("MARKUPDEMO",""),Str "."]
-,Para [Str "Note",Space,Str "1:",Space,Str "This",Space,Str "document",Space,Str "is",Space,Str "generated",Space,Str "directly",Space,Str "from",Space,Str "the",Space,Str "txt2tags",SoftBreak,Str "test-suite.",Space,Str "All",Space,Str "the",Space,Str "rules",Space,Str "mentioned",Space,Str "here",Space,Str "are",Space,Str "100%",Space,Str "in",Space,Str "sync",Space,Str "with",Space,Str "the",SoftBreak,Str "current",Space,Str "program",Space,Str "code."]
-,Para [Str "Note",Space,Str "2:",Space,Str "A",Space,Str "good",Space,Str "practice",Space,Str "is",Space,Str "to",Space,Str "consult",Space,Link ("",[],[]) [Str "the",Space,Str "sources"] ("rules.t2t",""),Space,Str "when",SoftBreak,Str "reading,",Space,Str "to",Space,Str "see",Space,Str "how",Space,Str "the",Space,Str "texts",Space,Str "were",Space,Str "made."]
-,Para [Str "Table",Space,Str "of",Space,Str "Contents:"]
-,HorizontalRule
-,Header 1 ("paragraph",[],[]) [Str "Paragraph"]
-,Para [Str "A",Space,Str "paragraph",Space,Str "is",Space,Str "composed",Space,Str "by",Space,Str "one",Space,Str "or",Space,Str "more",Space,Str "lines.",SoftBreak,Str "A",Space,Str "blank",Space,Str "line",Space,Str "(or",Space,Str "a",Space,Str "table,",Space,Str "or",Space,Str "a",Space,Str "list)",Space,Str "ends",Space,Str "the",SoftBreak,Str "current",Space,Str "paragraph."]
-,Para [Str "Leading",Space,Str "and",Space,Str "trailing",Space,Str "spaces",Space,Str "are",Space,Str "ignored."]
-,Para [Str "A",Space,Str "comment",Space,Str "line",Space,Str "can",Space,Str "be",Space,Str "placed",Space,Str "inside",Space,Str "a",Space,Str "paragraph.",SoftBreak,Str "It",Space,Str "will",Space,Str "not",Space,Str "affect",Space,Str "it."]
-,Para [Str "The",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "closes",Space,Str "the",SoftBreak,Str "currently",Space,Str "open",Space,Str "paragraph."]
-,Header 1 ("comment",[],[]) [Str "Comment"]
-,Para [Str "%",Space,Str "not",Space,Str "on",Space,Str "the",Space,Str "line",Space,Str "beginning",Space,Str "(at",Space,Str "column",Space,Str "2)"]
-,Para [Str "some",Space,Str "text",Space,Str "%",Space,Str "half",Space,Str "line",Space,Str "comments",Space,Str "are",Space,Str "not",Space,Str "allowed"]
-,Header 1 ("line",[],[]) [Str "Line"]
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,HorizontalRule
-,Para [Strikeout [Str "-----"],SoftBreak,Strikeout [Str "-------",Space,Str "--------"]]
-,Para [Strikeout [Str "-------+--------"]]
-,Para [Str "(",Space,Strikeout [Str "----------------"],Space,Str ")"]
-,Header 1 ("inline",[],[]) [Str "Inline"]
-,Para [Str "i)",Space,Strong [Str "b"],Space,Emph [Str "i"],Space,Underline [Str "u"],Space,Strikeout [Str "s"],Space,Code ("",[],[]) "m",Space,Str "r",Space,RawInline (Format "html") "t",SoftBreak,Str "i)",Space,Strong [Str "bo"],Space,Emph [Str "it"],Space,Underline [Str "un"],Space,Strikeout [Str "st"],Space,Code ("",[],[]) "mo",Space,Str "ra",Space,RawInline (Format "html") "tg",SoftBreak,Str "i)",Space,Strong [Str "bold"],Space,Emph [Str "ital"],Space,Underline [Str "undr"],Space,Strikeout [Str "strk"],Space,Code ("",[],[]) "mono",Space,Str "raw",Space,RawInline (Format "html") "tggd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "ld"],Space,Emph [Str "it",Space,Str "al"],Space,Underline [Str "un",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "rk"],Space,Code ("",[],[]) "mo no",Space,Str "r",Space,Str "aw",Space,RawInline (Format "html") "tg gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "*",Space,Str "ld"],Space,Emph [Str "it",Space,Str "/",Space,Str "al"],Space,Underline [Str "un",Space,Str "_",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "-",Space,Str "rk"],Space,Code ("",[],[]) "mo ` no",Space,Str "r",Space,Str "\"",Space,Str "aw",Space,RawInline (Format "html") "tg ' gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "**ld"],Space,Emph [Str "it",Space,Str "//al"],Space,Underline [Str "un",Space,Str "__dr"],Space,Strikeout [Str "st",Space,Str "--rk"],Space,Code ("",[],[]) "mo ``no",Space,Str "r",Space,Str "\"\"aw",Space,RawInline (Format "html") "tg ''gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "**",Space,Str "ld"],Space,Emph [Str "it",Space,Str "//",Space,Str "al"],Space,Underline [Str "un",Space,Str "__",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "--",Space,Str "rk"],Space,Code ("",[],[]) "mo `` no",Space,Str "r",Space,Str "\"\"",Space,Str "aw",Space,RawInline (Format "html") "tg '' gd",SoftBreak,Str "i)",Space,Strong [Str "**bold**"],Space,Emph [Str "//ital//"],Space,Underline [Str "__undr__"],Space,Strikeout [Str "--strk--"],Space,Code ("",[],[]) "``mono``",Space,Str "\"\"raw\"\"",Space,RawInline (Format "html") "''tggd''",SoftBreak,Str "i)",Space,Strong [Str "*bold*"],Space,Emph [Str "/ital/"],Space,Underline [Str "_undr_"],Space,Strikeout [Str "-strk-"],Space,Code ("",[],[]) "`mono`",Space,Str "\"raw\"",Space,RawInline (Format "html") "'tggd'"]
-,Para [Str "i)",Space,Strong [Str "*"],Space,Emph [Str "/"],Space,Underline [Str "_"],Space,Strikeout [Str "-"],Space,Code ("",[],[]) "`",Space,Str "\"",Space,RawInline (Format "html") "'",SoftBreak,Str "i)",Space,Strong [Str "**"],Space,Emph [Str "//"],Space,Underline [Str "__"],Space,Strikeout [Str "--"],Space,Code ("",[],[]) "``",Space,Str "\"\"",Space,RawInline (Format "html") "''",SoftBreak,Str "i)",Space,Strong [Str "***"],Space,Emph [Str "///"],Space,Underline [Str "___"],Space,Strikeout [Str "---"],Space,Code ("",[],[]) "```",Space,Str "\"\"\"",Space,RawInline (Format "html") "'''",SoftBreak,Str "i)",Space,Strong [Str "****"],Space,Emph [Str "////"],Space,Underline [Str "____"],Space,Strikeout [Str "----"],Space,Code ("",[],[]) "````",Space,Str "\"\"\"\"",Space,RawInline (Format "html") "''''",SoftBreak,Str "i)",Space,Strong [Str "*****"],Space,Emph [Str "/////"],Space,Underline [Str "_____"],Space,Strikeout [Str "-----"],Space,Code ("",[],[]) "`````",Space,Str "\"\"\"\"\"",Space,RawInline (Format "html") "'''''",SoftBreak,Str "i)",Space,Strong [Str "******"],Space,Emph [Str "//////"],Space,Underline [Str "______"],Space,Strikeout [Str "------"],Space,Code ("",[],[]) "``````",Space,Str "\"\"\"\"\"\"",Space,RawInline (Format "html") "''''''"]
-,Para [Str "i)",Space,Str "****",Space,Str "////",Space,Str "____",Space,Str "----",Space,Str "````",Space,Str "\"\"\"\"",Space,Str "''''",SoftBreak,Str "i)",Space,Str "**",Space,Str "**",Space,Str "//",Space,Str "//",Space,Str "__",Space,Str "__",Space,Str "--",Space,Str "--",Space,Str "``",Space,Str "``",Space,Str "\"\"",Space,Str "\"\"",Space,Str "''",Space,Str "''"]
-,Para [Str "i)",Space,Str "**",Space,Str "bold**",Space,Str "//",Space,Str "ital//",Space,Str "__",Space,Str "undr__",Space,Str "--",Space,Str "strk--",Space,Str "``",Space,Str "mono``",Space,Str "\"\"",Space,Str "raw\"\"",Space,Str "''",Space,Str "tggd''",SoftBreak,Str "i)",Space,Str "**bold",Space,Str "**",Space,Str "//ital",Space,Str "//",Space,Str "__undr",Space,Str "__",Space,Str "--strk",Space,Str "--",Space,Str "``mono",Space,Str "``",Space,Str "\"\"raw",Space,Str "\"\"",Space,Str "''tggd",Space,Str "''",SoftBreak,Str "i)",Space,Str "**",Space,Str "bold",Space,Str "**",Space,Str "//",Space,Str "ital",Space,Str "//",Space,Str "__",Space,Str "undr",Space,Str "__",Space,Str "--",Space,Str "strk",Space,Str "--",Space,Str "``",Space,Str "mono",Space,Str "``",Space,Str "\"\"",Space,Str "raw",Space,Str "\"\"",Space,Str "''",Space,Str "tggd",Space,Str "''"]
-,Header 1 ("link",[],[]) [Str "Link"]
-,Para [Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),Str ",",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ",",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com?subject=bla&cc=otheruser@domain.com.",""),Str ".",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com"] ("http://www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/"] ("http://www.domain.com/dir/",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir///"] ("http://www.domain.com/dir///",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com,"] ("http://www.domain.com,",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com,"] ("http://www.domain.com,",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/."] ("http://www.domain.com/dir/.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/."] ("http://www.domain.com/dir/.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html."] ("http://www.domain.com/dir/index.html.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html,"] ("http://www.domain.com/dir/index.html,",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor"] ("http://www.domain.com/dir/#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor"] ("http://www.domain.com/dir/index.html#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor."] ("http://www.domain.com/dir/#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor."] ("http://www.domain.com/dir/#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c."] ("http://domain.com?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c,"] ("http://domain.com?a=a@a.a&b=a+b+c,",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c."] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@."] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c.#anchor"] ("http://domain.com?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor"] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.html."] ("http://user:password@domain.com/bla.html.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/dir/."] ("http://user:password@domain.com/dir/.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com."] ("http://user:password@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user:@domain.com."] ("http://user:@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user@domain.com."] ("http://user@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor"] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor",""),SoftBreak,Link ("",[],[]) [Str "label"] ("www.domain.com",""),SoftBreak,Str "[",Space,Str "label",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Str "]",SoftBreak,Link ("",[],[]) [Str "label",Space] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "anchor",Space] ("http://www.domain.com/dir/index.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "login",Space] ("http://user:password@domain.com/bla.html",""),SoftBreak,Link ("",[],[]) [Str "form",Space] ("http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "form",Space,Str "&",Space,Str "anchor"] ("http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "login",Space,Str "&",Space,Str "form",Space] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "up",Space] ("..",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file",Space] ("bla.html",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "anchor",Space] ("#anchor",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file/anchor"] ("bla.html#anchor",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file/anchor"] ("bla.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "img",Space] ("abc.gif",""),SoftBreak,Link ("",[],[]) [Str "www.fake.com"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_",""),Str "-1%.",SoftBreak,Link ("",[],[]) [Str "http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"] ("http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_",""),Str "-1%.",SoftBreak,Link ("",[],[]) [Str "http://L1.com"] ("http://L1.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "mailto:L2@www.com"] ("L2@www.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "L3"] ("www.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "L4"] ("w@ww.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "www.L5.com"] ("www.L5.com",""),SoftBreak,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "www2.domain.com"] ("www2.domain.com",""),SoftBreak,Link ("",[],[]) [Str "ftp.domain.com"] ("ftp.domain.com",""),SoftBreak,Link ("",[],[]) [Str "WWW.DOMAIN.COM"] ("WWW.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "FTP.DOMAIN.COM"] ("FTP.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "label"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "label"] ("ftp.domain.com",""),SoftBreak,Link ("",[],[]) [Str "label"] ("WWW.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "label"] ("FTP.DOMAIN.COM",""),SoftBreak,Str "[label",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Space,Str "]",SoftBreak,Str "[label]",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Str "]"]
-,Header 1 ("image",[],[]) [Str "Image"]
-,Para [Image ("",[],[]) [] ("img.png","")]
-,Para [Link ("",[],[]) [Image ("",[],[]) [] ("img.png","")] ("https://txt2tags.org","")]
-,Para [Image ("",[],[]) [] ("img.png",""),Space,Str "Image",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning."]
-,Para [Str "Image",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "of",Space,Str "the",Space,Str "line."]
-,Para [Str "Image",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "end.",Space,Image ("",[],[]) [] ("img.png","")]
-,Para [Image ("",[],[]) [] ("img.png",""),SoftBreak,Image ("",[],[]) [] ("img.png",""),SoftBreak,Image ("",[],[]) [] ("img.png","")]
-,Para [Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png","")]
-,Para [Str "Images",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "mixed",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "with",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "text."]
-,Para [Str "Images",Space,Str "glued",Space,Str "together:",Space,Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png",""),Str "."]
-,Para [Str "[img.png",Space,Str "]"]
-,Para [Str "[",Space,Str "img.png]"]
-,Para [Str "[",Space,Str "img.png",Space,Str "]"]
-,Header 1 ("numtitle",[],[]) [Str "Numbered",Space,Str "Title"]
-,Header 1 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"]
-,Header 2 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 4 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"]
-,Header 5 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"]
-,Header 1 ("lab_el-1",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"]
-,Header 2 ("lab_el-2",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"]
-,Header 3 ("lab_el-3",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 4 ("lab_el-4",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"]
-,Header 5 ("lab_el-5",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("lab_el-9",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Para [Str "+Not",Space,Str "Title"]
-,Para [Str "++Not",Space,Str "Title+"]
-,Para [Str "+++Not",Space,Str "Title++++",SoftBreak,Str "++++++Not",Space,Str "Title",Space,Str "6++++++"]
-,Para [Str "+++++++Not",Space,Str "Title",Space,Str "7+++++++",SoftBreak,Str "+Not",Space,Str "Title+",Space,Str "[label1]",SoftBreak,Str "+Not",Space,Str "Title+[",Space,Str "label",Space,Str "]",SoftBreak,Str "+Not",Space,Str "Title+[la/bel]"]
-,Header 1 ("title",[],[]) [Str "Title"]
-,Header 1 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"]
-,Header 2 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 4 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"]
-,Header 5 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"]
-,Header 1 ("lab_el-1",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"]
-,Header 2 ("lab_el-2",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"]
-,Header 3 ("lab_el-3",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 4 ("lab_el-4",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"]
-,Header 5 ("lab_el-5",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Header 3 ("lab_el-9",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"]
-,Para [Str "=Not",Space,Str "Title"]
-,Para [Str "==Not",Space,Str "Title="]
-,Para [Str "===Not",Space,Str "Title====",SoftBreak,Str "======Not",Space,Str "Title",Space,Str "6======"]
-,Para [Str "=======Not",Space,Str "Title",Space,Str "7=======",SoftBreak,Str "=Not",Space,Str "Title=",Space,Str "[label1]",SoftBreak,Str "=Not",Space,Str "Title=[",Space,Str "label",Space,Str "]",SoftBreak,Str "=Not",Space,Str "Title=[la/bel]"]
-,Header 1 ("quote",[],[]) [Str "Quote"]
-,BlockQuote
- [Para [Str "To",Space,Str "quote",Space,Str "a",Space,Str "paragraph,",Space,Str "just",Space,Str "prefix",Space,Str "it",Space,Str "by",Space,Str "a",Space,Str "TAB",SoftBreak,Str "character.",Space,Str "All",Space,Str "the",Space,Str "lines",Space,Str "of",Space,Str "the",Space,Str "paragraph",Space,Str "must",SoftBreak,Str "begin",Space,Str "with",Space,Str "a",Space,Str "TAB."]]
-,Para [Str "Any",Space,Str "non-tabbed",Space,Str "line",Space,Str "closes",Space,Str "the",Space,Str "quote",Space,Str "block."]
-,BlockQuote
- [Para [Str "The",Space,Str "number",Space,Str "of",Space,Str "leading",Space,Str "TABs",Space,Str "identifies",Space,Str "the",Space,Str "quote",SoftBreak,Str "block",Space,Str "depth.",Space,Str "This",Space,Str "is",Space,Str "quote",Space,Str "level",Space,Str "1."]
- ,BlockQuote
- [Para [Str "With",Space,Str "two",Space,Str "TABs,",Space,Str "we",Space,Str "are",Space,Str "on",Space,Str "the",Space,Str "quote",SoftBreak,Str "level",Space,Str "2."]
- ,BlockQuote
- [Para [Str "The",Space,Str "more",Space,Str "TABs,",Space,Str "more",Space,Str "deep",Space,Str "is",SoftBreak,Str "the",Space,Str "quote",Space,Str "level."]
- ,BlockQuote
- [Para [Str "There",Space,Str "isn't",Space,Str "a",Space,Str "limit."]]]]]
-,BlockQuote
- [BlockQuote
- [BlockQuote
- [BlockQuote
- [Para [Str "This",Space,Str "quote",Space,Str "starts",Space,Str "at",SoftBreak,Str "level",Space,Str "4."]]
- ,Para [Str "Then",Space,Str "its",Space,Str "depth",Space,Str "is",Space,Str "decreased."]]
- ,Para [Str "Counting",Space,Str "down,",Space,Str "one",Space,Str "by",Space,Str "one."]]
- ,Para [Str "Until",Space,Str "the",Space,Str "level",Space,Str "1."]]
-,BlockQuote
- [BlockQuote
- [BlockQuote
- [Para [Str "Unlike",Space,Str "lists,",Space,Str "any",Space,Str "quote",Space,Str "block",Space,Str "is",SoftBreak,Str "independent,",Space,Str "not",Space,Str "part",Space,Str "of",Space,Str "a",Space,Str "tree."]]]
- ,Para [Str "The",Space,Str "TAB",Space,Str "count",Space,Str "don't",Space,Str "need",Space,Str "to",Space,Str "be",Space,Str "incremental",SoftBreak,Str "by",Space,Str "one."]
- ,BlockQuote
- [BlockQuote
- [BlockQuote
- [Para [Str "The",Space,Str "nesting",Space,Str "don't",Space,Str "need",SoftBreak,Str "to",Space,Str "follow",Space,Str "any",Space,Str "rule."]]]
- ,Para [Str "Quotes",Space,Str "can",Space,Str "be",Space,Str "opened",Space,Str "and",Space,Str "closed",SoftBreak,Str "in",Space,Str "any",Space,Str "way."]
- ,BlockQuote
- [BlockQuote
- [BlockQuote
- [Para [Str "You",Space,Str "choose."]]]]]]
-,BlockQuote
- [Para [Str "Some",Space,Str "targets",Space,Str "(as",Space,Str "sgml)",Space,Str "don't",Space,Str "support",Space,Str "the",SoftBreak,Str "nesting",Space,Str "of",Space,Str "quotes.",Space,Str "There",Space,Str "is",Space,Str "only",Space,Str "one",Space,Str "quote",SoftBreak,Str "level."]
- ,BlockQuote
- [Para [Str "In",Space,Str "this",Space,Str "case,",Space,Str "no",Space,Str "matter",Space,Str "how",Space,Str "much",SoftBreak,Str "TABs",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "define",Space,Str "the",Space,Str "quote",SoftBreak,Str "block,",Space,Str "it",Space,Str "always",Space,Str "will",Space,Str "be",Space,Str "level",Space,Str "1."]]]
-,BlockQuote
- [Para [Str "Spaces",Space,Str "AFTER",Space,Str "the",Space,Str "TAB",Space,Str "character",Space,Str "are",Space,Str "allowed.",SoftBreak,Str "But",Space,Str "be",Space,Str "careful,",Space,Str "it",Space,Str "can",Space,Str "be",Space,Str "confusing."]]
-,Para [Str "Spaces",Space,Str "BEFORE",Space,Str "the",Space,Str "TAB",Space,Str "character",SoftBreak,Str "invalidate",Space,Str "the",Space,Str "mark.",Space,Str "It's",Space,Str "not",Space,Str "quote."]
-,BlockQuote
- [Para [Str "Paragraph",Space,Str "breaks",Space,Str "inside",Space,Str "a",Space,Str "quote",Space,Str "aren't",SoftBreak,Str "possible."]
- ,Para [Str "This",Space,Str "sample",Space,Str "are",Space,Str "two",Space,Str "separated",Space,Str "quoted",SoftBreak,Str "paragraphs,",Space,Str "not",Space,Str "a",Space,Str "quote",Space,Str "block",Space,Str "with",SoftBreak,Str "two",Space,Str "paragraphs",Space,Str "inside."]]
-,BlockQuote
- [Para [Str "The",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "closes",Space,Str "the",SoftBreak,Str "currently",Space,Str "open",Space,Str "quote",Space,Str "block."]]
-,Header 1 ("raw",[],[]) [Str "Raw"]
-,Para [Str "A raw line.\n"]
-,Para [Str " Another raw line, with leading spaces.\n"]
-,Para [Str "A raw area delimited\n by lines with marks.\n"]
-,Para [Str "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n"]
-,Para [Str "\"\"\"Not",Space,Str "a",Space,Str "raw",Space,Str "line,",Space,Str "need",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "mark."]
-,Para [Str "\"\"\"",SoftBreak,Str "Not",Space,Str "a",Space,Str "raw",Space,Str "area.",SoftBreak,Str "The",Space,Str "marks",Space,Str "must",Space,Str "be",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning,",SoftBreak,Str "no",Space,Str "leading",Space,Str "spaces.",SoftBreak,Str "\"\"\""]
-,Para [Str "The end of the file (EOF) closes\nthe currently open raw area.\n"]
-,Header 1 ("verbatim",[],[]) [Str "Verbatim"]
-,CodeBlock ("",[],[]) "A verbatim line.\n"
-,CodeBlock ("",[],[]) " Another verbatim line, with leading spaces.\n"
-,CodeBlock ("",[],[]) "A verbatim area delimited\n by lines with marks.\n"
-,CodeBlock ("",[],[]) "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n"
-,Para [Str "```Not",Space,Str "a",Space,Str "verbatim",Space,Str "line,",Space,Str "need",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "mark."]
-,Para [Str "```",SoftBreak,Str "Not",Space,Str "a",Space,Str "verbatim",Space,Str "area.",SoftBreak,Str "The",Space,Str "marks",Space,Str "must",Space,Str "be",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning,",SoftBreak,Str "no",Space,Str "leading",Space,Str "spaces.",SoftBreak,Str "```"]
-,CodeBlock ("",[],[]) "The end of the file (EOF) closes\nthe currently open verbatim area.\n"
-,Header 1 ("deflist",[],[]) [Str "Definition",Space,Str "List"]
-,DefinitionList
- [([Str "Definition",Space,Str "list"],
- [[Plain [Str "A",Space,Str "list",Space,Str "with",Space,Str "terms"]]])
- ,([Str "Start",Space,Str "term",Space,Str "with",Space,Str "colon"],
- [[Plain [Str "And",Space,Str "its",Space,Str "definition",Space,Str "follows"]]])]
-,Header 1 ("numlist",[],[]) [Str "Numbered",Space,Str "List"]
-,Para [Str "See",Space,Link ("",[],[]) [Str "List"] ("#list",""),Str ",",Space,Str "the",Space,Str "same",Space,Str "rules",Space,Str "apply."]
-,Header 1 ("list",[],[]) [Str "List"]
-,BulletList
- [[Plain [Str "Use",Space,Str "the",Space,Str "hyphen",Space,Str "to",Space,Str "prefix",Space,Str "list",Space,Str "items."]]
- ,[Plain [Str "There",Space,Str "must",Space,Str "be",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "the",Space,Str "hyphen."]]
- ,[Plain [Str "The",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "two",Space,Str "consecutive",Space,Str "blank",Space,Str "lines."]]]
-,BulletList
- [[Plain [Str "The",Space,Str "list",Space,Str "can",Space,Str "be",Space,Str "indented",Space,Str "on",Space,Str "the",Space,Str "source",Space,Str "document."]]
- ,[Plain [Str "You",Space,Str "can",Space,Str "use",Space,Str "any",Space,Str "number",Space,Str "of",Space,Str "spaces."]]
- ,[Plain [Str "The",Space,Str "result",Space,Str "will",Space,Str "be",Space,Str "the",Space,Str "same."]]]
-,BulletList
- [[Para [Str "Let",Space,Str "one",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "the",Space,Str "list",Space,Str "items."]]
- ,[Para [Str "It",Space,Str "will",Space,Str "be",Space,Str "maintained",Space,Str "on",Space,Str "the",Space,Str "conversion."]]
- ,[Para [Str "Some",Space,Str "targets",Space,Str "don't",Space,Str "support",Space,Str "this",Space,Str "behavior."]]
- ,[Para [Str "This",Space,Str "one",Space,Str "was",Space,Str "separated",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "blanks.",SoftBreak,Str "You",Space,Str "can",Space,Str "also",Space,Str "put",Space,Str "a",Space,Str "blank",Space,Str "line",Space,Str "inside"]
- ,Para [Str "the",Space,Str "item",Space,Str "contents",Space,Str "and",Space,Str "it",Space,Str "will",Space,Str "be",Space,Str "preserved."]]]
-,Para [Str "-This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(no",Space,Str "space)"]
-,Para [Str "-",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(more",Space,Str "than",Space,Str "one",Space,Str "space)"]
-,Para [Str "-",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(a",Space,Str "TAB",Space,Str "instead",Space,Str "the",Space,Str "space)"]
-,BulletList
- [[BulletList
- [[Plain [Str "This",Space,Str "is",Space,Str "a",Space,Str "list"]]]]
- ,[OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "This",Space,Str "is",Space,Str "a",Space,Str "list"]]]]
- ,[DefinitionList
- [([Str "This",Space,Str "is",Space,Str "a",Space,Str "list"],
- [[]])]]]
-,BulletList
- [[Plain [Str "This",Space,Str "is",Space,Str "the",Space,Str "\"mother\"",Space,Str "list",Space,Str "first",Space,Str "item."]]
- ,[Plain [Str "Here",Space,Str "is",Space,Str "the",Space,Str "second,",Space,Str "but",Space,Str "inside",Space,Str "this",Space,Str "item,"]
- ,BulletList
- [[Plain [Str "there",Space,Str "is",Space,Str "a",Space,Str "sublist,",Space,Str "with",Space,Str "its",Space,Str "own",Space,Str "items."]]
- ,[Plain [Str "Note",Space,Str "that",Space,Str "the",Space,Str "items",Space,Str "of",Space,Str "the",Space,Str "same",Space,Str "sublist"]]
- ,[Plain [Str "must",Space,Str "have",Space,Str "the",Space,Str "same",Space,Str "indentation."]
- ,BulletList
- [[Plain [Str "And",Space,Str "this",Space,Str "can",Space,Str "go",Space,Str "on,",Space,Str "opening",Space,Str "sublists."]
- ,BulletList
- [[Plain [Str "Just",Space,Str "add",Space,Str "leading",Space,Str "spaces",Space,Str "before",Space,Str "the"]]
- ,[Plain [Str "hyphen",Space,Str "and",Space,Str "sublists",Space,Str "will",Space,Str "be",Space,Str "opened."]]
- ,[Plain [Str "The",Space,Str "two",Space,Str "blank",Space,Str "lines",Space,Str "closes",Space,Str "them",Space,Str "all."]]]]]]]]]
-,BulletList
- [[Plain [Str "When",Space,Str "nesting",Space,Str "lists,",Space,Str "the",Space,Str "additional",Space,Str "spaces",Space,Str "are",Space,Str "free."]]
- ,[Plain [Str "You",Space,Str "can",Space,Str "add",Space,Str "just",Space,Str "one,"]
- ,BulletList
- [[Plain [Str "or",Space,Str "many."]
- ,BulletList
- [[Plain [Str "What",Space,Str "matters",Space,Str "is",Space,Str "to",Space,Str "put",Space,Str "more",Space,Str "than",Space,Str "the",Space,Str "previous."]]
- ,[Plain [Str "But",Space,Str "remember",Space,Str "that",Space,Str "the",Space,Str "other",Space,Str "items",Space,Str "of",Space,Str "the",Space,Str "same",Space,Str "list"]]
- ,[Plain [Str "must",Space,Str "use",Space,Str "the",Space,Str "same",Space,Str "indentation."]]]]]]]
-,BulletList
- [[Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "depth",Space,Str "limit,"]
- ,BulletList
- [[Plain [Str "you",Space,Str "can",Space,Str "go",Space,Str "deeper",Space,Str "and",Space,Str "deeper."]
- ,BulletList
- [[Plain [Str "But",Space,Str "some",Space,Str "targets",Space,Str "may",Space,Str "have",Space,Str "restrictions."]
- ,BulletList
- [[Plain [Str "The",Space,Str "LaTeX",Space,Str "maximum",Space,Str "is",Space,Str "here,",Space,Str "4",Space,Str "levels."]]]]]]]]]
-,BulletList
- [[Plain [Str "Reverse",Space,Str "nesting",Space,Str "doesn't",Space,Str "work."]]
- ,[Plain [Str "Because",Space,Str "a",Space,Str "sublist",Space,Str "*must*",Space,Str "have",Space,Str "a",Space,Str "mother",Space,Str "list."]]
- ,[Plain [Str "It's",Space,Str "the",Space,Str "list",Space,Str "concept,",Space,Str "not",Space,Str "a",Space,Str "txt2tags",Space,Str "limitation."]]
- ,[Plain [Str "All",Space,Str "this",Space,Str "sublists",Space,Str "will",Space,Str "be",Space,Str "bumped",Space,Str "to",Space,Str "mother",Space,Str "lists."]]
- ,[Plain [Str "At",Space,Str "level",Space,Str "1,",Space,Str "like",Space,Str "this",Space,Str "one."]]]
-,BulletList
- [[Plain [Str "Level",Space,Str "1"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "2"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "3"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "4"]]]]
- ,[Plain [Str "Level",Space,Str "3",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "4)"]]]]
- ,[Plain [Str "Level",Space,Str "2",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "3)"]]]]
- ,[Plain [Str "Level",Space,Str "1",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "2)"]]]
-,BulletList
- [[Plain [Str "Level",Space,Str "1"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "2"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "3"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "4"]]]]]]]]
- ,[Plain [Str "Level",Space,Str "1",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "4,",Space,Str "Level",Space,Str "3",Space,Str "and",Space,Str "Level",Space,Str "2)"]]]
-,BulletList
- [[Para [Str "Level",Space,Str "1"]
- ,BulletList
- [[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "and",Space,Str "AFTER",Space,Str "(in)"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "3"]]]]]]]
-,BulletList
- [[Plain [Str "Level",Space,Str "4"]]]
-,BulletList
- [[Para [Str "Level",Space,Str "3"]]
- ,[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "and",Space,Str "AFTER",Space,Str "(out)"]]
- ,[Para [Str "Level",Space,Str "1"]
- ,BulletList
- [[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "(spaces)",Space,Str "and",Space,Str "AFTER",Space,Str "(TAB)"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "3"]]]]]]]
-,BulletList
- [[Plain [Str "Level",Space,Str "1"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "2"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "3"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "4"]]
- ,[Plain [Str "Level",Space,Str "3.5",Space,Str "???"]]]]
- ,[Plain [Str "Level",Space,Str "3"]]
- ,[Plain [Str "Level",Space,Str "2.5",Space,Str "???"]]]]
- ,[Plain [Str "Level",Space,Str "2"]]
- ,[Plain [Str "Level",Space,Str "1.5",Space,Str "???"]]]]
- ,[Plain [Str "Level",Space,Str "1"]]]
-,BulletList
- [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "other",Space,Str "with",Space,Str "TABs"]]]
-,BulletList
- [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "NOT",Space,Str "closed",Space,Str "by",Space,Str "two",Space,Str "comment",Space,Str "lines"]]]
-,BulletList
- [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "TAB,"]]
- ,[Plain [Str "then",Space,Str "a",Space,Str "comment",Space,Str "line,",Space,Str "then",Space,Str "an",Space,Str "empty",Space,Str "line."]]]
-,BulletList
- [[Plain [Str "Level",Space,Str "1"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "2"]
- ,BulletList
- [[Plain [Str "Level",Space,Str "3"]]]
- ,Plain [Str "-",SoftBreak,Str "Level",Space,Str "2"]]]
- ,Plain [Str "-",SoftBreak,Str "Level",Space,Str "1"]]]
-,Para [Str "-"]
-,BulletList
- [[Plain [Str "Empty",Space,Str "item",Space,Str "with",Space,Str "trailing",Space,Str "spaces."]]]
-,Para [Str "-"]
-,BulletList
- [[Plain [Str "Empty",Space,Str "item",Space,Str "with",Space,Str "trailing",Space,Str "TAB."]]]
-,Para [Str "-"]
-,BulletList
- [[Plain [Str "If",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "is",Space,Str "hit,"]
- ,BulletList
- [[Plain [Str "all",Space,Str "the",Space,Str "currently",Space,Str "opened",Space,Str "list",Space,Str "are",Space,Str "closed,"]
- ,BulletList
- [[Plain [Str "just",Space,Str "like",Space,Str "when",Space,Str "using",Space,Str "the",Space,Str "two",Space,Str "blank",Space,Str "lines."]]]]]]]
-,Header 1 ("table",[],[]) [Str "Table"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignRight,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3"]]]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "||",Space,Str "Cell",Space,Str "1",Space,Str "|",Space,Str "Cell",Space,Str "2",Space,Str "|",Space,Str "Cell",Space,Str "3",Space,Str "|"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Cell",Space,Str "3"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Heading"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Heading"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Heading"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "<-"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "--"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "->"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "--"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "--"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "--"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "->"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "--"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "<-"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3+4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1+2+3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2+3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1+2+3+4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "7"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "8"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "A"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "B"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "D"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "E"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "F"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Jan"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Fev"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Mar"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Apr"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "May"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "20%"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "40%"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "60%"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "80%"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "100%"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "/"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "o"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "o"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "."]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "=",Space,Str "=",Space,Str "=",Space,Str "="]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "01"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "02"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "05"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "07"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "11"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "13"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "16"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "17"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "19"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "20"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "23"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "25"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "26"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "29"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "30"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "32"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "35"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "37"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "39"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "40"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)
- ,(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "7"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "8"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "9"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "A"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "B"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "C"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "D"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "E"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "F"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "0"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "3"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "4"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "5"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "6"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "7"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "8"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "9"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "A"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "B"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "C"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "D"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "E"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "F"]]]])]
- (TableFoot ("",[],[])
- [])
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignCenter,ColWidthDefault)]
- (TableHead ("",[],[])
- [])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])]
- (TableFoot ("",[],[])
- [])
-,Para [Str "|this|is|not|a|table|"]
-,Para [Str "|this|",Space,Str "is|",Space,Str "not|",Space,Str "a|",Space,Str "table|"]
-,Para [Str "|this",Space,Str "|is",Space,Str "|not",Space,Str "|a",Space,Str "|table",Space,Str "|"]
-,Para [Str "|",Space,Str "this\t|",Space,Str "is\t|",Space,Str "not\t|",Space,Str "a\t|",Space,Str "table\t|"]
-,HorizontalRule
-,Para [Str "The",Space,Str "End."]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author" , MetaList [ MetaInlines [ Str "author" ] ] )
+ , ( "date" , MetaInlines [ Str "date" ] )
+ , ( "includeconf" , MetaString "rules.conf" )
+ , ( "title"
+ , MetaInlines
+ [ Str "Txt2tags"
+ , Space
+ , Str "Markup"
+ , Space
+ , Str "Rules"
+ ]
+ )
+ ]
+ }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "document"
+ , Space
+ , Str "describes"
+ , Space
+ , Str "all"
+ , Space
+ , Str "the"
+ , Space
+ , Str "details"
+ , Space
+ , Str "about"
+ , Space
+ , Str "each"
+ , Space
+ , Str "txt2tags"
+ , Space
+ , Str "mark."
+ , SoftBreak
+ , Str "The"
+ , Space
+ , Str "target"
+ , Space
+ , Str "audience"
+ , Space
+ , Str "are"
+ , Space
+ , Strong [ Str "experienced" ]
+ , Space
+ , Str "users."
+ , Space
+ , Str "You"
+ , Space
+ , Str "may"
+ , Space
+ , Str "find"
+ , Space
+ , Str "it"
+ , SoftBreak
+ , Str "useful"
+ , Space
+ , Str "if"
+ , Space
+ , Str "you"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "master"
+ , Space
+ , Str "the"
+ , Space
+ , Str "marks"
+ , Space
+ , Str "or"
+ , Space
+ , Str "solve"
+ , Space
+ , Str "a"
+ , Space
+ , Str "specific"
+ , Space
+ , Str "problem"
+ , SoftBreak
+ , Str "about"
+ , Space
+ , Str "a"
+ , Space
+ , Str "mark."
+ ]
+ , Para
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "are"
+ , Space
+ , Str "new"
+ , Space
+ , Str "to"
+ , Space
+ , Str "txt2tags"
+ , Space
+ , Str "or"
+ , Space
+ , Str "just"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "know"
+ , Space
+ , Str "which"
+ , Space
+ , Str "are"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "available"
+ , Space
+ , Str "marks,"
+ , Space
+ , Str "please"
+ , Space
+ , Str "read"
+ , Space
+ , Str "the"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "Markup" , Space , Str "Demo" ]
+ ( "MARKUPDEMO" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Note"
+ , Space
+ , Str "1:"
+ , Space
+ , Str "This"
+ , Space
+ , Str "document"
+ , Space
+ , Str "is"
+ , Space
+ , Str "generated"
+ , Space
+ , Str "directly"
+ , Space
+ , Str "from"
+ , Space
+ , Str "the"
+ , Space
+ , Str "txt2tags"
+ , SoftBreak
+ , Str "test-suite."
+ , Space
+ , Str "All"
+ , Space
+ , Str "the"
+ , Space
+ , Str "rules"
+ , Space
+ , Str "mentioned"
+ , Space
+ , Str "here"
+ , Space
+ , Str "are"
+ , Space
+ , Str "100%"
+ , Space
+ , Str "in"
+ , Space
+ , Str "sync"
+ , Space
+ , Str "with"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "current"
+ , Space
+ , Str "program"
+ , Space
+ , Str "code."
+ ]
+ , Para
+ [ Str "Note"
+ , Space
+ , Str "2:"
+ , Space
+ , Str "A"
+ , Space
+ , Str "good"
+ , Space
+ , Str "practice"
+ , Space
+ , Str "is"
+ , Space
+ , Str "to"
+ , Space
+ , Str "consult"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "the" , Space , Str "sources" ]
+ ( "rules.t2t" , "" )
+ , Space
+ , Str "when"
+ , SoftBreak
+ , Str "reading,"
+ , Space
+ , Str "to"
+ , Space
+ , Str "see"
+ , Space
+ , Str "how"
+ , Space
+ , Str "the"
+ , Space
+ , Str "texts"
+ , Space
+ , Str "were"
+ , Space
+ , Str "made."
+ ]
+ , Para
+ [ Str "Table" , Space , Str "of" , Space , Str "Contents:" ]
+ , HorizontalRule
+ , Header 1 ( "paragraph" , [] , [] ) [ Str "Paragraph" ]
+ , Para
+ [ Str "A"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "is"
+ , Space
+ , Str "composed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "one"
+ , Space
+ , Str "or"
+ , Space
+ , Str "more"
+ , Space
+ , Str "lines."
+ , SoftBreak
+ , Str "A"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "(or"
+ , Space
+ , Str "a"
+ , Space
+ , Str "table,"
+ , Space
+ , Str "or"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list)"
+ , Space
+ , Str "ends"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "current"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "Leading"
+ , Space
+ , Str "and"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "are"
+ , Space
+ , Str "ignored."
+ ]
+ , Para
+ [ Str "A"
+ , Space
+ , Str "comment"
+ , Space
+ , Str "line"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "placed"
+ , Space
+ , Str "inside"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph."
+ , SoftBreak
+ , Str "It"
+ , Space
+ , Str "will"
+ , Space
+ , Str "not"
+ , Space
+ , Str "affect"
+ , Space
+ , Str "it."
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "file"
+ , Space
+ , Str "(EOF)"
+ , Space
+ , Str "closes"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "currently"
+ , Space
+ , Str "open"
+ , Space
+ , Str "paragraph."
+ ]
+ , Header 1 ( "comment" , [] , [] ) [ Str "Comment" ]
+ , Para
+ [ Str "%"
+ , Space
+ , Str "not"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line"
+ , Space
+ , Str "beginning"
+ , Space
+ , Str "(at"
+ , Space
+ , Str "column"
+ , Space
+ , Str "2)"
+ ]
+ , Para
+ [ Str "some"
+ , Space
+ , Str "text"
+ , Space
+ , Str "%"
+ , Space
+ , Str "half"
+ , Space
+ , Str "line"
+ , Space
+ , Str "comments"
+ , Space
+ , Str "are"
+ , Space
+ , Str "not"
+ , Space
+ , Str "allowed"
+ ]
+ , Header 1 ( "line" , [] , [] ) [ Str "Line" ]
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , HorizontalRule
+ , Para
+ [ Strikeout [ Str "-----" ]
+ , SoftBreak
+ , Strikeout [ Str "-------" , Space , Str "--------" ]
+ ]
+ , Para [ Strikeout [ Str "-------+--------" ] ]
+ , Para
+ [ Str "("
+ , Space
+ , Strikeout [ Str "----------------" ]
+ , Space
+ , Str ")"
+ ]
+ , Header 1 ( "inline" , [] , [] ) [ Str "Inline" ]
+ , Para
+ [ Str "i)"
+ , Space
+ , Strong [ Str "b" ]
+ , Space
+ , Emph [ Str "i" ]
+ , Space
+ , Underline [ Str "u" ]
+ , Space
+ , Strikeout [ Str "s" ]
+ , Space
+ , Code ( "" , [] , [] ) "m"
+ , Space
+ , Str "r"
+ , Space
+ , RawInline (Format "html") "t"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "bo" ]
+ , Space
+ , Emph [ Str "it" ]
+ , Space
+ , Underline [ Str "un" ]
+ , Space
+ , Strikeout [ Str "st" ]
+ , Space
+ , Code ( "" , [] , [] ) "mo"
+ , Space
+ , Str "ra"
+ , Space
+ , RawInline (Format "html") "tg"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "bold" ]
+ , Space
+ , Emph [ Str "ital" ]
+ , Space
+ , Underline [ Str "undr" ]
+ , Space
+ , Strikeout [ Str "strk" ]
+ , Space
+ , Code ( "" , [] , [] ) "mono"
+ , Space
+ , Str "raw"
+ , Space
+ , RawInline (Format "html") "tggd"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "bo" , Space , Str "ld" ]
+ , Space
+ , Emph [ Str "it" , Space , Str "al" ]
+ , Space
+ , Underline [ Str "un" , Space , Str "dr" ]
+ , Space
+ , Strikeout [ Str "st" , Space , Str "rk" ]
+ , Space
+ , Code ( "" , [] , [] ) "mo no"
+ , Space
+ , Str "r"
+ , Space
+ , Str "aw"
+ , Space
+ , RawInline (Format "html") "tg gd"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "bo" , Space , Str "*" , Space , Str "ld" ]
+ , Space
+ , Emph [ Str "it" , Space , Str "/" , Space , Str "al" ]
+ , Space
+ , Underline
+ [ Str "un" , Space , Str "_" , Space , Str "dr" ]
+ , Space
+ , Strikeout
+ [ Str "st" , Space , Str "-" , Space , Str "rk" ]
+ , Space
+ , Code ( "" , [] , [] ) "mo ` no"
+ , Space
+ , Str "r"
+ , Space
+ , Str "\""
+ , Space
+ , Str "aw"
+ , Space
+ , RawInline (Format "html") "tg ' gd"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "bo" , Space , Str "**ld" ]
+ , Space
+ , Emph [ Str "it" , Space , Str "//al" ]
+ , Space
+ , Underline [ Str "un" , Space , Str "__dr" ]
+ , Space
+ , Strikeout [ Str "st" , Space , Str "--rk" ]
+ , Space
+ , Code ( "" , [] , [] ) "mo ``no"
+ , Space
+ , Str "r"
+ , Space
+ , Str "\"\"aw"
+ , Space
+ , RawInline (Format "html") "tg ''gd"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "bo" , Space , Str "**" , Space , Str "ld" ]
+ , Space
+ , Emph [ Str "it" , Space , Str "//" , Space , Str "al" ]
+ , Space
+ , Underline
+ [ Str "un" , Space , Str "__" , Space , Str "dr" ]
+ , Space
+ , Strikeout
+ [ Str "st" , Space , Str "--" , Space , Str "rk" ]
+ , Space
+ , Code ( "" , [] , [] ) "mo `` no"
+ , Space
+ , Str "r"
+ , Space
+ , Str "\"\""
+ , Space
+ , Str "aw"
+ , Space
+ , RawInline (Format "html") "tg '' gd"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "**bold**" ]
+ , Space
+ , Emph [ Str "//ital//" ]
+ , Space
+ , Underline [ Str "__undr__" ]
+ , Space
+ , Strikeout [ Str "--strk--" ]
+ , Space
+ , Code ( "" , [] , [] ) "``mono``"
+ , Space
+ , Str "\"\"raw\"\""
+ , Space
+ , RawInline (Format "html") "''tggd''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "*bold*" ]
+ , Space
+ , Emph [ Str "/ital/" ]
+ , Space
+ , Underline [ Str "_undr_" ]
+ , Space
+ , Strikeout [ Str "-strk-" ]
+ , Space
+ , Code ( "" , [] , [] ) "`mono`"
+ , Space
+ , Str "\"raw\""
+ , Space
+ , RawInline (Format "html") "'tggd'"
+ ]
+ , Para
+ [ Str "i)"
+ , Space
+ , Strong [ Str "*" ]
+ , Space
+ , Emph [ Str "/" ]
+ , Space
+ , Underline [ Str "_" ]
+ , Space
+ , Strikeout [ Str "-" ]
+ , Space
+ , Code ( "" , [] , [] ) "`"
+ , Space
+ , Str "\""
+ , Space
+ , RawInline (Format "html") "'"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "**" ]
+ , Space
+ , Emph [ Str "//" ]
+ , Space
+ , Underline [ Str "__" ]
+ , Space
+ , Strikeout [ Str "--" ]
+ , Space
+ , Code ( "" , [] , [] ) "``"
+ , Space
+ , Str "\"\""
+ , Space
+ , RawInline (Format "html") "''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "***" ]
+ , Space
+ , Emph [ Str "///" ]
+ , Space
+ , Underline [ Str "___" ]
+ , Space
+ , Strikeout [ Str "---" ]
+ , Space
+ , Code ( "" , [] , [] ) "```"
+ , Space
+ , Str "\"\"\""
+ , Space
+ , RawInline (Format "html") "'''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "****" ]
+ , Space
+ , Emph [ Str "////" ]
+ , Space
+ , Underline [ Str "____" ]
+ , Space
+ , Strikeout [ Str "----" ]
+ , Space
+ , Code ( "" , [] , [] ) "````"
+ , Space
+ , Str "\"\"\"\""
+ , Space
+ , RawInline (Format "html") "''''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "*****" ]
+ , Space
+ , Emph [ Str "/////" ]
+ , Space
+ , Underline [ Str "_____" ]
+ , Space
+ , Strikeout [ Str "-----" ]
+ , Space
+ , Code ( "" , [] , [] ) "`````"
+ , Space
+ , Str "\"\"\"\"\""
+ , Space
+ , RawInline (Format "html") "'''''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Strong [ Str "******" ]
+ , Space
+ , Emph [ Str "//////" ]
+ , Space
+ , Underline [ Str "______" ]
+ , Space
+ , Strikeout [ Str "------" ]
+ , Space
+ , Code ( "" , [] , [] ) "``````"
+ , Space
+ , Str "\"\"\"\"\"\""
+ , Space
+ , RawInline (Format "html") "''''''"
+ ]
+ , Para
+ [ Str "i)"
+ , Space
+ , Str "****"
+ , Space
+ , Str "////"
+ , Space
+ , Str "____"
+ , Space
+ , Str "----"
+ , Space
+ , Str "````"
+ , Space
+ , Str "\"\"\"\""
+ , Space
+ , Str "''''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Str "**"
+ , Space
+ , Str "**"
+ , Space
+ , Str "//"
+ , Space
+ , Str "//"
+ , Space
+ , Str "__"
+ , Space
+ , Str "__"
+ , Space
+ , Str "--"
+ , Space
+ , Str "--"
+ , Space
+ , Str "``"
+ , Space
+ , Str "``"
+ , Space
+ , Str "\"\""
+ , Space
+ , Str "\"\""
+ , Space
+ , Str "''"
+ , Space
+ , Str "''"
+ ]
+ , Para
+ [ Str "i)"
+ , Space
+ , Str "**"
+ , Space
+ , Str "bold**"
+ , Space
+ , Str "//"
+ , Space
+ , Str "ital//"
+ , Space
+ , Str "__"
+ , Space
+ , Str "undr__"
+ , Space
+ , Str "--"
+ , Space
+ , Str "strk--"
+ , Space
+ , Str "``"
+ , Space
+ , Str "mono``"
+ , Space
+ , Str "\"\""
+ , Space
+ , Str "raw\"\""
+ , Space
+ , Str "''"
+ , Space
+ , Str "tggd''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Str "**bold"
+ , Space
+ , Str "**"
+ , Space
+ , Str "//ital"
+ , Space
+ , Str "//"
+ , Space
+ , Str "__undr"
+ , Space
+ , Str "__"
+ , Space
+ , Str "--strk"
+ , Space
+ , Str "--"
+ , Space
+ , Str "``mono"
+ , Space
+ , Str "``"
+ , Space
+ , Str "\"\"raw"
+ , Space
+ , Str "\"\""
+ , Space
+ , Str "''tggd"
+ , Space
+ , Str "''"
+ , SoftBreak
+ , Str "i)"
+ , Space
+ , Str "**"
+ , Space
+ , Str "bold"
+ , Space
+ , Str "**"
+ , Space
+ , Str "//"
+ , Space
+ , Str "ital"
+ , Space
+ , Str "//"
+ , Space
+ , Str "__"
+ , Space
+ , Str "undr"
+ , Space
+ , Str "__"
+ , Space
+ , Str "--"
+ , Space
+ , Str "strk"
+ , Space
+ , Str "--"
+ , Space
+ , Str "``"
+ , Space
+ , Str "mono"
+ , Space
+ , Str "``"
+ , Space
+ , Str "\"\""
+ , Space
+ , Str "raw"
+ , Space
+ , Str "\"\""
+ , Space
+ , Str "''"
+ , Space
+ , Str "tggd"
+ , Space
+ , Str "''"
+ ]
+ , Header 1 ( "link" , [] , [] ) [ Str "Link" ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "mailto:user@domain.com" ]
+ ( "user@domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:user@domain.com" ]
+ ( "user@domain.com" , "" )
+ , Str "."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:user@domain.com" ]
+ ( "user@domain.com" , "" )
+ , Str "."
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Str "any"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:user@domain.com" ]
+ ( "user@domain.com" , "" )
+ , Str "."
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "label" ] ( "user@domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:user@domain.com?subject=bla" ]
+ ( "user@domain.com?subject=bla" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:user@domain.com?subject=bla" ]
+ ( "user@domain.com?subject=bla" , "" )
+ , Str "."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:user@domain.com?subject=bla" ]
+ ( "user@domain.com?subject=bla" , "" )
+ , Str ","
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"
+ ]
+ ( "user@domain.com?subject=bla&cc=otheruser@domain.com"
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"
+ ]
+ ( "user@domain.com?subject=bla&cc=otheruser@domain.com"
+ , ""
+ )
+ , Str "."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"
+ ]
+ ( "user@domain.com?subject=bla&cc=otheruser@domain.com"
+ , ""
+ )
+ , Str ","
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "label" ]
+ ( "user@domain.com?subject=bla&cc=otheruser@domain.com"
+ , ""
+ )
+ , Str "."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "label" ]
+ ( "user@domain.com?subject=bla&cc=otheruser@domain.com."
+ , ""
+ )
+ , Str "."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com" ]
+ ( "http://www.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/" ]
+ ( "http://www.domain.com/dir/" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir///" ]
+ ( "http://www.domain.com/dir///" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com." ]
+ ( "http://www.domain.com." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com," ]
+ ( "http://www.domain.com," , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com." ]
+ ( "http://www.domain.com." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com," ]
+ ( "http://www.domain.com," , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/." ]
+ ( "http://www.domain.com/dir/." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Str "any"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com." ]
+ ( "http://www.domain.com." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Str "any"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/." ]
+ ( "http://www.domain.com/dir/." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Str "any"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/index.html." ]
+ ( "http://www.domain.com/dir/index.html." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Str "any"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/index.html," ]
+ ( "http://www.domain.com/dir/index.html," , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/#anchor" ]
+ ( "http://www.domain.com/dir/#anchor" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/index.html#anchor" ]
+ ( "http://www.domain.com/dir/index.html#anchor" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/index.html#anchor." ]
+ ( "http://www.domain.com/dir/index.html#anchor." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/#anchor." ]
+ ( "http://www.domain.com/dir/#anchor." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/index.html#anchor." ]
+ ( "http://www.domain.com/dir/index.html#anchor." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Str "any"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/#anchor." ]
+ ( "http://www.domain.com/dir/#anchor." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Str "any"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://www.domain.com/dir/index.html#anchor." ]
+ ( "http://www.domain.com/dir/index.html#anchor." , "" )
+ , Space
+ , Str "any"
+ , Space
+ , Str "text."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com?a=a@a.a&b=a+b+c." ]
+ ( "http://domain.com?a=a@a.a&b=a+b+c." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com?a=a@a.a&b=a+b+c," ]
+ ( "http://domain.com?a=a@a.a&b=a+b+c," , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c." ]
+ ( "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@." ]
+ ( "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com?a=a@a.a&b=a+b+c.#anchor" ]
+ ( "http://domain.com?a=a@a.a&b=a+b+c.#anchor" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor" ]
+ ( "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor" ]
+ ( "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor"
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://user:password@domain.com/bla.html." ]
+ ( "http://user:password@domain.com/bla.html." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://user:password@domain.com/dir/." ]
+ ( "http://user:password@domain.com/dir/." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://user:password@domain.com." ]
+ ( "http://user:password@domain.com." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://user:@domain.com." ]
+ ( "http://user:@domain.com." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://user@domain.com." ]
+ ( "http://user@domain.com." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"
+ ]
+ ( "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor"
+ ]
+ ( "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor"
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "label" ] ( "www.domain.com" , "" )
+ , SoftBreak
+ , Str "["
+ , Space
+ , Str "label"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "www.domain.com" ]
+ ( "www.domain.com" , "" )
+ , Str "]"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "label" , Space ]
+ ( "www.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "anchor" , Space ]
+ ( "http://www.domain.com/dir/index.html#anchor." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "login" , Space ]
+ ( "http://user:password@domain.com/bla.html" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "form" , Space ]
+ ( "http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "form" , Space , Str "&" , Space , Str "anchor" ]
+ ( "http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "login"
+ , Space
+ , Str "&"
+ , Space
+ , Str "form"
+ , Space
+ ]
+ ( "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c."
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "local"
+ , Space
+ , Str "link"
+ , Space
+ , Str "up"
+ , Space
+ ]
+ ( ".." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "local"
+ , Space
+ , Str "link"
+ , Space
+ , Str "file"
+ , Space
+ ]
+ ( "bla.html" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "local"
+ , Space
+ , Str "link"
+ , Space
+ , Str "anchor"
+ , Space
+ ]
+ ( "#anchor" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "local"
+ , Space
+ , Str "link"
+ , Space
+ , Str "file/anchor"
+ ]
+ ( "bla.html#anchor" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "local"
+ , Space
+ , Str "link"
+ , Space
+ , Str "file/anchor"
+ ]
+ ( "bla.html#anchor." , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "local"
+ , Space
+ , Str "link"
+ , Space
+ , Str "img"
+ , Space
+ ]
+ ( "abc.gif" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "www.fake.com" ]
+ ( "www.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm"
+ ]
+ ( "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm"
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-"
+ ]
+ ( "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-"
+ , ""
+ )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"
+ ]
+ ( "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"
+ , ""
+ )
+ , Str "-1%."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str
+ "http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"
+ ]
+ ( "http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"
+ , ""
+ )
+ , Str "-1%."
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "http://L1.com" ]
+ ( "http://L1.com" , "" )
+ , Space
+ , Str "!"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "mailto:L2@www.com" ]
+ ( "L2@www.com" , "" )
+ , Space
+ , Str "!"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "L3" ] ( "www.com" , "" )
+ , Space
+ , Str "!"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "L4" ] ( "w@ww.com" , "" )
+ , Space
+ , Str "!"
+ , Space
+ , Link
+ ( "" , [] , [] ) [ Str "www.L5.com" ] ( "www.L5.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "www.domain.com" ]
+ ( "www.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "www2.domain.com" ]
+ ( "www2.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "ftp.domain.com" ]
+ ( "ftp.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "WWW.DOMAIN.COM" ]
+ ( "WWW.DOMAIN.COM" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "FTP.DOMAIN.COM" ]
+ ( "FTP.DOMAIN.COM" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "label" ] ( "www.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "label" ] ( "ftp.domain.com" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "label" ] ( "WWW.DOMAIN.COM" , "" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "label" ] ( "FTP.DOMAIN.COM" , "" )
+ , SoftBreak
+ , Str "[label"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "www.domain.com" ]
+ ( "www.domain.com" , "" )
+ , Space
+ , Str "]"
+ , SoftBreak
+ , Str "[label]"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "www.domain.com" ]
+ ( "www.domain.com" , "" )
+ , Str "]"
+ ]
+ , Header 1 ( "image" , [] , [] ) [ Str "Image" ]
+ , Para [ Image ( "" , [] , [] ) [] ( "img.png" , "" ) ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Image ( "" , [] , [] ) [] ( "img.png" , "" ) ]
+ ( "https://txt2tags.org" , "" )
+ ]
+ , Para
+ [ Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Space
+ , Str "Image"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line"
+ , Space
+ , Str "beginning."
+ ]
+ , Para
+ [ Str "Image"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "middle"
+ , Space
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line."
+ ]
+ , Para
+ [ Str "Image"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line"
+ , Space
+ , Str "end."
+ , Space
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ ]
+ , Para
+ [ Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , SoftBreak
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , SoftBreak
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ ]
+ , Para
+ [ Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ ]
+ , Para
+ [ Str "Images"
+ , Space
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Space
+ , Str "mixed"
+ , Space
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Space
+ , Str "with"
+ , Space
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Space
+ , Str "text."
+ ]
+ , Para
+ [ Str "Images"
+ , Space
+ , Str "glued"
+ , Space
+ , Str "together:"
+ , Space
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Image ( "" , [] , [] ) [] ( "img.png" , "" )
+ , Str "."
+ ]
+ , Para [ Str "[img.png" , Space , Str "]" ]
+ , Para [ Str "[" , Space , Str "img.png]" ]
+ , Para [ Str "[" , Space , Str "img.png" , Space , Str "]" ]
+ , Header
+ 1
+ ( "numtitle" , [] , [] )
+ [ Str "Numbered" , Space , Str "Title" ]
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "2" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 4
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "4" ]
+ , Header
+ 5
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "5" ]
+ , Header
+ 1
+ ( "lab_el-1" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "lab_el-2" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "2" ]
+ , Header
+ 3
+ ( "lab_el-3" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 4
+ ( "lab_el-4" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "4" ]
+ , Header
+ 5
+ ( "lab_el-5" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "5" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "lab_el-9" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Para [ Str "+Not" , Space , Str "Title" ]
+ , Para [ Str "++Not" , Space , Str "Title+" ]
+ , Para
+ [ Str "+++Not"
+ , Space
+ , Str "Title++++"
+ , SoftBreak
+ , Str "++++++Not"
+ , Space
+ , Str "Title"
+ , Space
+ , Str "6++++++"
+ ]
+ , Para
+ [ Str "+++++++Not"
+ , Space
+ , Str "Title"
+ , Space
+ , Str "7+++++++"
+ , SoftBreak
+ , Str "+Not"
+ , Space
+ , Str "Title+"
+ , Space
+ , Str "[label1]"
+ , SoftBreak
+ , Str "+Not"
+ , Space
+ , Str "Title+["
+ , Space
+ , Str "label"
+ , Space
+ , Str "]"
+ , SoftBreak
+ , Str "+Not"
+ , Space
+ , Str "Title+[la/bel]"
+ ]
+ , Header 1 ( "title" , [] , [] ) [ Str "Title" ]
+ , Header
+ 1
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "2" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 4
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "4" ]
+ , Header
+ 5
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "5" ]
+ , Header
+ 1
+ ( "lab_el-1" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "lab_el-2" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "2" ]
+ , Header
+ 3
+ ( "lab_el-3" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 4
+ ( "lab_el-4" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "4" ]
+ , Header
+ 5
+ ( "lab_el-5" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "5" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Header
+ 3
+ ( "lab_el-9" , [] , [] )
+ [ Str "Title" , Space , Str "Level" , Space , Str "3" ]
+ , Para [ Str "=Not" , Space , Str "Title" ]
+ , Para [ Str "==Not" , Space , Str "Title=" ]
+ , Para
+ [ Str "===Not"
+ , Space
+ , Str "Title===="
+ , SoftBreak
+ , Str "======Not"
+ , Space
+ , Str "Title"
+ , Space
+ , Str "6======"
+ ]
+ , Para
+ [ Str "=======Not"
+ , Space
+ , Str "Title"
+ , Space
+ , Str "7======="
+ , SoftBreak
+ , Str "=Not"
+ , Space
+ , Str "Title="
+ , Space
+ , Str "[label1]"
+ , SoftBreak
+ , Str "=Not"
+ , Space
+ , Str "Title=["
+ , Space
+ , Str "label"
+ , Space
+ , Str "]"
+ , SoftBreak
+ , Str "=Not"
+ , Space
+ , Str "Title=[la/bel]"
+ ]
+ , Header 1 ( "quote" , [] , [] ) [ Str "Quote" ]
+ , BlockQuote
+ [ Para
+ [ Str "To"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph,"
+ , Space
+ , Str "just"
+ , Space
+ , Str "prefix"
+ , Space
+ , Str "it"
+ , Space
+ , Str "by"
+ , Space
+ , Str "a"
+ , Space
+ , Str "TAB"
+ , SoftBreak
+ , Str "character."
+ , Space
+ , Str "All"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lines"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "must"
+ , SoftBreak
+ , Str "begin"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "TAB."
+ ]
+ ]
+ , Para
+ [ Str "Any"
+ , Space
+ , Str "non-tabbed"
+ , Space
+ , Str "line"
+ , Space
+ , Str "closes"
+ , Space
+ , Str "the"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "block."
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "The"
+ , Space
+ , Str "number"
+ , Space
+ , Str "of"
+ , Space
+ , Str "leading"
+ , Space
+ , Str "TABs"
+ , Space
+ , Str "identifies"
+ , Space
+ , Str "the"
+ , Space
+ , Str "quote"
+ , SoftBreak
+ , Str "block"
+ , Space
+ , Str "depth."
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "level"
+ , Space
+ , Str "1."
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "With"
+ , Space
+ , Str "two"
+ , Space
+ , Str "TABs,"
+ , Space
+ , Str "we"
+ , Space
+ , Str "are"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "quote"
+ , SoftBreak
+ , Str "level"
+ , Space
+ , Str "2."
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "The"
+ , Space
+ , Str "more"
+ , Space
+ , Str "TABs,"
+ , Space
+ , Str "more"
+ , Space
+ , Str "deep"
+ , Space
+ , Str "is"
+ , SoftBreak
+ , Str "the"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "level."
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "There"
+ , Space
+ , Str "isn't"
+ , Space
+ , Str "a"
+ , Space
+ , Str "limit."
+ ]
+ ]
+ ]
+ ]
+ ]
+ , BlockQuote
+ [ BlockQuote
+ [ BlockQuote
+ [ BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "starts"
+ , Space
+ , Str "at"
+ , SoftBreak
+ , Str "level"
+ , Space
+ , Str "4."
+ ]
+ ]
+ , Para
+ [ Str "Then"
+ , Space
+ , Str "its"
+ , Space
+ , Str "depth"
+ , Space
+ , Str "is"
+ , Space
+ , Str "decreased."
+ ]
+ ]
+ , Para
+ [ Str "Counting"
+ , Space
+ , Str "down,"
+ , Space
+ , Str "one"
+ , Space
+ , Str "by"
+ , Space
+ , Str "one."
+ ]
+ ]
+ , Para
+ [ Str "Until"
+ , Space
+ , Str "the"
+ , Space
+ , Str "level"
+ , Space
+ , Str "1."
+ ]
+ ]
+ , BlockQuote
+ [ BlockQuote
+ [ BlockQuote
+ [ Para
+ [ Str "Unlike"
+ , Space
+ , Str "lists,"
+ , Space
+ , Str "any"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "block"
+ , Space
+ , Str "is"
+ , SoftBreak
+ , Str "independent,"
+ , Space
+ , Str "not"
+ , Space
+ , Str "part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "tree."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "The"
+ , Space
+ , Str "TAB"
+ , Space
+ , Str "count"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "need"
+ , Space
+ , Str "to"
+ , Space
+ , Str "be"
+ , Space
+ , Str "incremental"
+ , SoftBreak
+ , Str "by"
+ , Space
+ , Str "one."
+ ]
+ , BlockQuote
+ [ BlockQuote
+ [ BlockQuote
+ [ Para
+ [ Str "The"
+ , Space
+ , Str "nesting"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "need"
+ , SoftBreak
+ , Str "to"
+ , Space
+ , Str "follow"
+ , Space
+ , Str "any"
+ , Space
+ , Str "rule."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Quotes"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "opened"
+ , Space
+ , Str "and"
+ , Space
+ , Str "closed"
+ , SoftBreak
+ , Str "in"
+ , Space
+ , Str "any"
+ , Space
+ , Str "way."
+ ]
+ , BlockQuote
+ [ BlockQuote
+ [ BlockQuote
+ [ Para [ Str "You" , Space , Str "choose." ] ]
+ ]
+ ]
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Some"
+ , Space
+ , Str "targets"
+ , Space
+ , Str "(as"
+ , Space
+ , Str "sgml)"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "support"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "nesting"
+ , Space
+ , Str "of"
+ , Space
+ , Str "quotes."
+ , Space
+ , Str "There"
+ , Space
+ , Str "is"
+ , Space
+ , Str "only"
+ , Space
+ , Str "one"
+ , Space
+ , Str "quote"
+ , SoftBreak
+ , Str "level."
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "In"
+ , Space
+ , Str "this"
+ , Space
+ , Str "case,"
+ , Space
+ , Str "no"
+ , Space
+ , Str "matter"
+ , Space
+ , Str "how"
+ , Space
+ , Str "much"
+ , SoftBreak
+ , Str "TABs"
+ , Space
+ , Str "are"
+ , Space
+ , Str "used"
+ , Space
+ , Str "to"
+ , Space
+ , Str "define"
+ , Space
+ , Str "the"
+ , Space
+ , Str "quote"
+ , SoftBreak
+ , Str "block,"
+ , Space
+ , Str "it"
+ , Space
+ , Str "always"
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "level"
+ , Space
+ , Str "1."
+ ]
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Spaces"
+ , Space
+ , Str "AFTER"
+ , Space
+ , Str "the"
+ , Space
+ , Str "TAB"
+ , Space
+ , Str "character"
+ , Space
+ , Str "are"
+ , Space
+ , Str "allowed."
+ , SoftBreak
+ , Str "But"
+ , Space
+ , Str "be"
+ , Space
+ , Str "careful,"
+ , Space
+ , Str "it"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "confusing."
+ ]
+ ]
+ , Para
+ [ Str "Spaces"
+ , Space
+ , Str "BEFORE"
+ , Space
+ , Str "the"
+ , Space
+ , Str "TAB"
+ , Space
+ , Str "character"
+ , SoftBreak
+ , Str "invalidate"
+ , Space
+ , Str "the"
+ , Space
+ , Str "mark."
+ , Space
+ , Str "It's"
+ , Space
+ , Str "not"
+ , Space
+ , Str "quote."
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Paragraph"
+ , Space
+ , Str "breaks"
+ , Space
+ , Str "inside"
+ , Space
+ , Str "a"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "aren't"
+ , SoftBreak
+ , Str "possible."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "sample"
+ , Space
+ , Str "are"
+ , Space
+ , Str "two"
+ , Space
+ , Str "separated"
+ , Space
+ , Str "quoted"
+ , SoftBreak
+ , Str "paragraphs,"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "block"
+ , Space
+ , Str "with"
+ , SoftBreak
+ , Str "two"
+ , Space
+ , Str "paragraphs"
+ , Space
+ , Str "inside."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "The"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "file"
+ , Space
+ , Str "(EOF)"
+ , Space
+ , Str "closes"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "currently"
+ , Space
+ , Str "open"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "block."
+ ]
+ ]
+ , Header 1 ( "raw" , [] , [] ) [ Str "Raw" ]
+ , Para [ Str "A raw line.\n" ]
+ , Para [ Str " Another raw line, with leading spaces.\n" ]
+ , Para
+ [ Str "A raw area delimited\n by lines with marks.\n"
+ ]
+ , Para
+ [ Str
+ "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n"
+ ]
+ , Para
+ [ Str "\"\"\"Not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "raw"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "need"
+ , Space
+ , Str "one"
+ , Space
+ , Str "space"
+ , Space
+ , Str "after"
+ , Space
+ , Str "mark."
+ ]
+ , Para
+ [ Str "\"\"\""
+ , SoftBreak
+ , Str "Not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "raw"
+ , Space
+ , Str "area."
+ , SoftBreak
+ , Str "The"
+ , Space
+ , Str "marks"
+ , Space
+ , Str "must"
+ , Space
+ , Str "be"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line"
+ , Space
+ , Str "beginning,"
+ , SoftBreak
+ , Str "no"
+ , Space
+ , Str "leading"
+ , Space
+ , Str "spaces."
+ , SoftBreak
+ , Str "\"\"\""
+ ]
+ , Para
+ [ Str
+ "The end of the file (EOF) closes\nthe currently open raw area.\n"
+ ]
+ , Header 1 ( "verbatim" , [] , [] ) [ Str "Verbatim" ]
+ , CodeBlock ( "" , [] , [] ) "A verbatim line.\n"
+ , CodeBlock
+ ( "" , [] , [] )
+ " Another verbatim line, with leading spaces.\n"
+ , CodeBlock
+ ( "" , [] , [] )
+ "A verbatim area delimited\n by lines with marks.\n"
+ , CodeBlock
+ ( "" , [] , [] )
+ "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n"
+ , Para
+ [ Str "```Not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "verbatim"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "need"
+ , Space
+ , Str "one"
+ , Space
+ , Str "space"
+ , Space
+ , Str "after"
+ , Space
+ , Str "mark."
+ ]
+ , Para
+ [ Str "```"
+ , SoftBreak
+ , Str "Not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "verbatim"
+ , Space
+ , Str "area."
+ , SoftBreak
+ , Str "The"
+ , Space
+ , Str "marks"
+ , Space
+ , Str "must"
+ , Space
+ , Str "be"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line"
+ , Space
+ , Str "beginning,"
+ , SoftBreak
+ , Str "no"
+ , Space
+ , Str "leading"
+ , Space
+ , Str "spaces."
+ , SoftBreak
+ , Str "```"
+ ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "The end of the file (EOF) closes\nthe currently open verbatim area.\n"
+ , Header
+ 1
+ ( "deflist" , [] , [] )
+ [ Str "Definition" , Space , Str "List" ]
+ , DefinitionList
+ [ ( [ Str "Definition" , Space , Str "list" ]
+ , [ [ Plain
+ [ Str "A"
+ , Space
+ , Str "list"
+ , Space
+ , Str "with"
+ , Space
+ , Str "terms"
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "Start"
+ , Space
+ , Str "term"
+ , Space
+ , Str "with"
+ , Space
+ , Str "colon"
+ ]
+ , [ [ Plain
+ [ Str "And"
+ , Space
+ , Str "its"
+ , Space
+ , Str "definition"
+ , Space
+ , Str "follows"
+ ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1
+ ( "numlist" , [] , [] )
+ [ Str "Numbered" , Space , Str "List" ]
+ , Para
+ [ Str "See"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "List" ] ( "#list" , "" )
+ , Str ","
+ , Space
+ , Str "the"
+ , Space
+ , Str "same"
+ , Space
+ , Str "rules"
+ , Space
+ , Str "apply."
+ ]
+ , Header 1 ( "list" , [] , [] ) [ Str "List" ]
+ , BulletList
+ [ [ Plain
+ [ Str "Use"
+ , Space
+ , Str "the"
+ , Space
+ , Str "hyphen"
+ , Space
+ , Str "to"
+ , Space
+ , Str "prefix"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items."
+ ]
+ ]
+ , [ Plain
+ [ Str "There"
+ , Space
+ , Str "must"
+ , Space
+ , Str "be"
+ , Space
+ , Str "one"
+ , Space
+ , Str "space"
+ , Space
+ , Str "after"
+ , Space
+ , Str "the"
+ , Space
+ , Str "hyphen."
+ ]
+ ]
+ , [ Plain
+ [ Str "The"
+ , Space
+ , Str "list"
+ , Space
+ , Str "is"
+ , Space
+ , Str "closed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "two"
+ , Space
+ , Str "consecutive"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "The"
+ , Space
+ , Str "list"
+ , Space
+ , Str "can"
+ , Space
+ , Str "be"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "source"
+ , Space
+ , Str "document."
+ ]
+ ]
+ , [ Plain
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "use"
+ , Space
+ , Str "any"
+ , Space
+ , Str "number"
+ , Space
+ , Str "of"
+ , Space
+ , Str "spaces."
+ ]
+ ]
+ , [ Plain
+ [ Str "The"
+ , Space
+ , Str "result"
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "the"
+ , Space
+ , Str "same."
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "Let"
+ , Space
+ , Str "one"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "between"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items."
+ ]
+ ]
+ , [ Para
+ [ Str "It"
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "maintained"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "conversion."
+ ]
+ ]
+ , [ Para
+ [ Str "Some"
+ , Space
+ , Str "targets"
+ , Space
+ , Str "don't"
+ , Space
+ , Str "support"
+ , Space
+ , Str "this"
+ , Space
+ , Str "behavior."
+ ]
+ ]
+ , [ Para
+ [ Str "This"
+ , Space
+ , Str "one"
+ , Space
+ , Str "was"
+ , Space
+ , Str "separated"
+ , Space
+ , Str "by"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "with"
+ , Space
+ , Str "blanks."
+ , SoftBreak
+ , Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "put"
+ , Space
+ , Str "a"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "inside"
+ ]
+ , Para
+ [ Str "the"
+ , Space
+ , Str "item"
+ , Space
+ , Str "contents"
+ , Space
+ , Str "and"
+ , Space
+ , Str "it"
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "preserved."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "-This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "(no"
+ , Space
+ , Str "space)"
+ ]
+ , Para
+ [ Str "-"
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "(more"
+ , Space
+ , Str "than"
+ , Space
+ , Str "one"
+ , Space
+ , Str "space)"
+ ]
+ , Para
+ [ Str "-"
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "(a"
+ , Space
+ , Str "TAB"
+ , Space
+ , Str "instead"
+ , Space
+ , Str "the"
+ , Space
+ , Str "space)"
+ ]
+ , BulletList
+ [ [ BulletList
+ [ [ Plain
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ ]
+ ]
+ ]
+ ]
+ , [ OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ ]
+ ]
+ ]
+ ]
+ , [ DefinitionList
+ [ ( [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ ]
+ , [ [] ]
+ )
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "\"mother\""
+ , Space
+ , Str "list"
+ , Space
+ , Str "first"
+ , Space
+ , Str "item."
+ ]
+ ]
+ , [ Plain
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "second,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "inside"
+ , Space
+ , Str "this"
+ , Space
+ , Str "item,"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "there"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "sublist,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "its"
+ , Space
+ , Str "own"
+ , Space
+ , Str "items."
+ ]
+ ]
+ , [ Plain
+ [ Str "Note"
+ , Space
+ , Str "that"
+ , Space
+ , Str "the"
+ , Space
+ , Str "items"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "same"
+ , Space
+ , Str "sublist"
+ ]
+ ]
+ , [ Plain
+ [ Str "must"
+ , Space
+ , Str "have"
+ , Space
+ , Str "the"
+ , Space
+ , Str "same"
+ , Space
+ , Str "indentation."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "And"
+ , Space
+ , Str "this"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "on,"
+ , Space
+ , Str "opening"
+ , Space
+ , Str "sublists."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "Just"
+ , Space
+ , Str "add"
+ , Space
+ , Str "leading"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "before"
+ , Space
+ , Str "the"
+ ]
+ ]
+ , [ Plain
+ [ Str "hyphen"
+ , Space
+ , Str "and"
+ , Space
+ , Str "sublists"
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "opened."
+ ]
+ ]
+ , [ Plain
+ [ Str "The"
+ , Space
+ , Str "two"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "lines"
+ , Space
+ , Str "closes"
+ , Space
+ , Str "them"
+ , Space
+ , Str "all."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "When"
+ , Space
+ , Str "nesting"
+ , Space
+ , Str "lists,"
+ , Space
+ , Str "the"
+ , Space
+ , Str "additional"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "are"
+ , Space
+ , Str "free."
+ ]
+ ]
+ , [ Plain
+ [ Str "You"
+ , Space
+ , Str "can"
+ , Space
+ , Str "add"
+ , Space
+ , Str "just"
+ , Space
+ , Str "one,"
+ ]
+ , BulletList
+ [ [ Plain [ Str "or" , Space , Str "many." ]
+ , BulletList
+ [ [ Plain
+ [ Str "What"
+ , Space
+ , Str "matters"
+ , Space
+ , Str "is"
+ , Space
+ , Str "to"
+ , Space
+ , Str "put"
+ , Space
+ , Str "more"
+ , Space
+ , Str "than"
+ , Space
+ , Str "the"
+ , Space
+ , Str "previous."
+ ]
+ ]
+ , [ Plain
+ [ Str "But"
+ , Space
+ , Str "remember"
+ , Space
+ , Str "that"
+ , Space
+ , Str "the"
+ , Space
+ , Str "other"
+ , Space
+ , Str "items"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "same"
+ , Space
+ , Str "list"
+ ]
+ ]
+ , [ Plain
+ [ Str "must"
+ , Space
+ , Str "use"
+ , Space
+ , Str "the"
+ , Space
+ , Str "same"
+ , Space
+ , Str "indentation."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "There"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "depth"
+ , Space
+ , Str "limit,"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "deeper"
+ , Space
+ , Str "and"
+ , Space
+ , Str "deeper."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "But"
+ , Space
+ , Str "some"
+ , Space
+ , Str "targets"
+ , Space
+ , Str "may"
+ , Space
+ , Str "have"
+ , Space
+ , Str "restrictions."
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "The"
+ , Space
+ , Str "LaTeX"
+ , Space
+ , Str "maximum"
+ , Space
+ , Str "is"
+ , Space
+ , Str "here,"
+ , Space
+ , Str "4"
+ , Space
+ , Str "levels."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "Reverse"
+ , Space
+ , Str "nesting"
+ , Space
+ , Str "doesn't"
+ , Space
+ , Str "work."
+ ]
+ ]
+ , [ Plain
+ [ Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "sublist"
+ , Space
+ , Str "*must*"
+ , Space
+ , Str "have"
+ , Space
+ , Str "a"
+ , Space
+ , Str "mother"
+ , Space
+ , Str "list."
+ ]
+ ]
+ , [ Plain
+ [ Str "It's"
+ , Space
+ , Str "the"
+ , Space
+ , Str "list"
+ , Space
+ , Str "concept,"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "txt2tags"
+ , Space
+ , Str "limitation."
+ ]
+ ]
+ , [ Plain
+ [ Str "All"
+ , Space
+ , Str "this"
+ , Space
+ , Str "sublists"
+ , Space
+ , Str "will"
+ , Space
+ , Str "be"
+ , Space
+ , Str "bumped"
+ , Space
+ , Str "to"
+ , Space
+ , Str "mother"
+ , Space
+ , Str "lists."
+ ]
+ ]
+ , [ Plain
+ [ Str "At"
+ , Space
+ , Str "level"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "like"
+ , Space
+ , Str "this"
+ , Space
+ , Str "one."
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "1" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "2" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "3" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "4" ] ] ]
+ ]
+ , [ Plain
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "--"
+ , Space
+ , Str "(closed"
+ , Space
+ , Str "Level"
+ , Space
+ , Str "4)"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "--"
+ , Space
+ , Str "(closed"
+ , Space
+ , Str "Level"
+ , Space
+ , Str "3)"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Level"
+ , Space
+ , Str "1"
+ , Space
+ , Str "--"
+ , Space
+ , Str "(closed"
+ , Space
+ , Str "Level"
+ , Space
+ , Str "2)"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "1" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "2" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "3" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "4" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Level"
+ , Space
+ , Str "1"
+ , Space
+ , Str "--"
+ , Space
+ , Str "(closed"
+ , Space
+ , Str "Level"
+ , Space
+ , Str "4,"
+ , Space
+ , Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "and"
+ , Space
+ , Str "Level"
+ , Space
+ , Str "2)"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Para [ Str "Level" , Space , Str "1" ]
+ , BulletList
+ [ [ Para
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "--"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "BEFORE"
+ , Space
+ , Str "and"
+ , Space
+ , Str "AFTER"
+ , Space
+ , Str "(in)"
+ ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , BulletList [ [ Plain [ Str "Level" , Space , Str "4" ] ] ]
+ , BulletList
+ [ [ Para [ Str "Level" , Space , Str "3" ] ]
+ , [ Para
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "--"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "BEFORE"
+ , Space
+ , Str "and"
+ , Space
+ , Str "AFTER"
+ , Space
+ , Str "(out)"
+ ]
+ ]
+ , [ Para [ Str "Level" , Space , Str "1" ]
+ , BulletList
+ [ [ Para
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "--"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "BEFORE"
+ , Space
+ , Str "(spaces)"
+ , Space
+ , Str "and"
+ , Space
+ , Str "AFTER"
+ , Space
+ , Str "(TAB)"
+ ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
+ ]
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "1" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "2" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "3" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "4" ] ]
+ , [ Plain
+ [ Str "Level"
+ , Space
+ , Str "3.5"
+ , Space
+ , Str "???"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Level" , Space , Str "3" ] ]
+ , [ Plain
+ [ Str "Level"
+ , Space
+ , Str "2.5"
+ , Space
+ , Str "???"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Level" , Space , Str "2" ] ]
+ , [ Plain
+ [ Str "Level"
+ , Space
+ , Str "1.5"
+ , Space
+ , Str "???"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "Level" , Space , Str "1" ] ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "This"
+ , Space
+ , Str "list"
+ , Space
+ , Str "is"
+ , Space
+ , Str "closed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "and"
+ , Space
+ , Str "other"
+ , Space
+ , Str "with"
+ , Space
+ , Str "TABs"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "This"
+ , Space
+ , Str "list"
+ , Space
+ , Str "is"
+ , Space
+ , Str "NOT"
+ , Space
+ , Str "closed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "two"
+ , Space
+ , Str "comment"
+ , Space
+ , Str "lines"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "This"
+ , Space
+ , Str "list"
+ , Space
+ , Str "is"
+ , Space
+ , Str "closed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "and"
+ , Space
+ , Str "TAB,"
+ ]
+ ]
+ , [ Plain
+ [ Str "then"
+ , Space
+ , Str "a"
+ , Space
+ , Str "comment"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "then"
+ , Space
+ , Str "an"
+ , Space
+ , Str "empty"
+ , Space
+ , Str "line."
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "1" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "2" ]
+ , BulletList
+ [ [ Plain [ Str "Level" , Space , Str "3" ] ] ]
+ , Plain
+ [ Str "-"
+ , SoftBreak
+ , Str "Level"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Plain
+ [ Str "-" , SoftBreak , Str "Level" , Space , Str "1" ]
+ ]
+ ]
+ , Para [ Str "-" ]
+ , BulletList
+ [ [ Plain
+ [ Str "Empty"
+ , Space
+ , Str "item"
+ , Space
+ , Str "with"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "spaces."
+ ]
+ ]
+ ]
+ , Para [ Str "-" ]
+ , BulletList
+ [ [ Plain
+ [ Str "Empty"
+ , Space
+ , Str "item"
+ , Space
+ , Str "with"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "TAB."
+ ]
+ ]
+ ]
+ , Para [ Str "-" ]
+ , BulletList
+ [ [ Plain
+ [ Str "If"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "file"
+ , Space
+ , Str "(EOF)"
+ , Space
+ , Str "is"
+ , Space
+ , Str "hit,"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "all"
+ , Space
+ , Str "the"
+ , Space
+ , Str "currently"
+ , Space
+ , Str "opened"
+ , Space
+ , Str "list"
+ , Space
+ , Str "are"
+ , Space
+ , Str "closed,"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "just"
+ , Space
+ , Str "like"
+ , Space
+ , Str "when"
+ , Space
+ , Str "using"
+ , Space
+ , Str "the"
+ , Space
+ , Str "two"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "lines."
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header 1 ( "table" , [] , [] ) [ Str "Table" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignRight , ColWidthDefault ) ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignRight , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para
+ [ Str "||"
+ , Space
+ , Str "Cell"
+ , Space
+ , Str "1"
+ , Space
+ , Str "|"
+ , Space
+ , Str "Cell"
+ , Space
+ , Str "2"
+ , Space
+ , Str "|"
+ , Space
+ , Str "Cell"
+ , Space
+ , Str "3"
+ , Space
+ , Str "|"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Cell" , Space , Str "3" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Heading" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Heading" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Heading" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "<-" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "--" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "->" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "--" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "--" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "--" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "->" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "--" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "<-" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3+4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1+2+3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2+3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1+2+3+4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "7" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "8" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "A" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "B" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "D" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "E" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "F" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Jan" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Fev" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Mar" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Apr" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "May" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "20%" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "40%" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "60%" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "80%" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "100%" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "/" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ , Space
+ , Str "/"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "o" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "o" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "." ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "="
+ , Space
+ , Str "="
+ , Space
+ , Str "="
+ , Space
+ , Str "="
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "01" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "02" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "05" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "07" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "11" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "13" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "16" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "17" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "19" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "20" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "23" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "25" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "26" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "29" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "30" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "32" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "35" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "37" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "39" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "40" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ , ( AlignCenter , ColWidthDefault )
+ ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "7" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "8" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "9" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "A" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "B" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "C" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "D" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "E" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "F" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "0" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "3" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "4" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "5" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "6" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "7" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "8" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "9" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "A" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "B" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "C" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "D" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "E" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "F" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignCenter , ColWidthDefault ) ]
+ (TableHead ( "" , [] , [] ) [])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Para [ Str "|this|is|not|a|table|" ]
+ , Para
+ [ Str "|this|"
+ , Space
+ , Str "is|"
+ , Space
+ , Str "not|"
+ , Space
+ , Str "a|"
+ , Space
+ , Str "table|"
+ ]
+ , Para
+ [ Str "|this"
+ , Space
+ , Str "|is"
+ , Space
+ , Str "|not"
+ , Space
+ , Str "|a"
+ , Space
+ , Str "|table"
+ , Space
+ , Str "|"
+ ]
+ , Para
+ [ Str "|"
+ , Space
+ , Str "this\t|"
+ , Space
+ , Str "is\t|"
+ , Space
+ , Str "not\t|"
+ , Space
+ , Str "a\t|"
+ , Space
+ , Str "table\t|"
+ ]
+ , HorizontalRule
+ , Para [ Str "The" , Space , Str "End." ]
+ ]
diff --git a/test/vimwiki-reader.native b/test/vimwiki-reader.native
index 9b09d4904..b8f853ce0 100644
--- a/test/vimwiki-reader.native
+++ b/test/vimwiki-reader.native
@@ -1,449 +1,2429 @@
-Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "2017-05-01"]),("title",MetaInlines [Str "title"])]})
-[Header 1 ("implemented",[],[]) [Emph [Span ("implemented",[],[]) [],Strong [Str "implemented"]]]
-,Header 1 ("header",[],[]) [Str "header"]
-,Header 2 ("header level two",[],[]) [Str "header",Space,Str "level",Space,Str "two"]
-,Header 3 ("header level 3",[],[]) [Str "header",Space,Code ("",[],[]) "level",Space,Str "3"]
-,Header 4 ("header level four",[],[]) [Str "header",Space,Strikeout [Str "level"],Space,Str "four"]
-,Header 5 ("header level 5",[],[]) [Str "header",Space,Emph [Span ("level",[],[]) [],Strong [Str "level"],Space,Str "5"]]
-,Header 6 ("header level 6",[],[]) [Str "header",Space,Str "level",Space,Str "6"]
-,Para [Str "=======",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "========"]
-,Para [Str "hi==",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "=="]
-,Para [Str "===",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "=="]
-,Para [Str "===",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "===-"]
-,Para [Str "not",Space,Str "a",Space,Str "header:"]
-,Para [Str "=n="]
-,Para [Str "===",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "===="]
-,Header 2 ("centred header",["justcenter"],[]) [Str "centred",Space,Str "header"]
-,Header 2 ("header with some == in between",[],[]) [Str "header",Space,Str "with",Space,Str "some",Space,Code ("",[],[]) "==",Space,Str "in",Space,Str "between"]
-,Header 2 ("header with some == in between",[],[]) [Str "header",Space,Str "with",Space,Str "some",Space,Str "==",Space,Str "in",Space,Str "between"]
-,Header 2 ("header with some ==in between",[],[]) [Str "header",Space,Str "with",Space,Str "some",Space,Str "==in",Space,Str "between"]
-,Header 2 ("emph strong and strikeout",[],[]) [Str "emph",Space,Str "strong",Space,Str "and",Space,Str "strikeout"]
-,Para [Emph [Str "emph"],Space,Span ("strong",[],[]) [],Strong [Str "strong"]]
-,Para [Span ("strong and emph",[],[]) [],Strong [Emph [Str "strong",Space,Str "and",Space,Str "emph"]]]
-,Para [Emph [Span ("emph and strong",[],[]) [],Strong [Str "emph",Space,Str "and",Space,Str "strong"]]]
-,Para [Span ("emph inside strong",[],[]) [],Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]]
-,Para [Span ("strong with emph",[],[]) [],Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]]
-,Para [Emph [Span ("strong inside",[],[]) [],Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]]
-,Para [Emph [Strikeout [Str "strikeout"],Space,Str "inside",Space,Str "emph"]]
-,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "struck",Space,Str "out"],Space,Str "with",Space,Str "emph"]]
-,Para [Str "*not",SoftBreak,Str "strong*"]
-,Para [Str "just",Space,Str "two",Space,Str "stars:",Space,Str "**"]
-,Para [Str "just",Space,Str "two",Space,Str "underscores:",Space,Str "__"]
-,Para [Str "just",Space,Str "four",Space,Str "~s:",Space,Str "~~~~"]
-,Para [Str "_not",SoftBreak,Str "emph_"]
-,Para [Str "~~not",SoftBreak,Str "strikeout~~"]
-,Header 2 ("horizontal rule",[],[]) [Str "horizontal",Space,Str "rule"]
-,Para [Str "top"]
-,HorizontalRule
-,Para [Str "middle"]
-,HorizontalRule
-,Para [Str "not",Space,Str "a",Space,Str "rule-----"]
-,Para [Str "not",Space,Str "a",Space,Str "rule",Space,Str "(trailing",Space,Str "spaces):",SoftBreak,Str "-----"]
-,Para [Str "not",Space,Str "a",Space,Str "rule",Space,Str "(leading",Space,Str "spaces):",SoftBreak,Str "----"]
-,Header 2 ("comments",[],[]) [Str "comments"]
-,Para [Str "this",SoftBreak,Str "is",Space,Str "%%",Space,Str "not",Space,Str "secret"]
-,Header 2 ("inline code",[],[]) [Str "inline",Space,Str "code"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Code ("",[],[]) "inline code",Str "."]
-,Para [Str "Just",Space,Str "two",Space,Str "backticks:",Space,Str "``"]
-,Header 2 ("preformatted text",[],[]) [Str "preformatted",Space,Str "text"]
-,CodeBlock ("",[],[]) " Tyger! Tyger! burning bright\n In the forests of the night,\n What immortal hand or eye\n Could frame thy fearful symmetry?\n In what distant deeps or skies\n Burnt the fire of thine eyes?\n On what wings dare he aspire?\n What the hand dare sieze the fire?"
-,Header 3 ("preformatted text with attributes",[],[]) [Str "preformatted",Space,Str "text",Space,Str "with",Space,Str "attributes"]
-,CodeBlock ("",[],[("class","python"),("style","color:blue")]) " for i in range(1, 5):\n print(i)"
-,Header 3 ("preformatted text with nested syntax",[],[]) [Str "preformatted",Space,Str "text",Space,Str "with",Space,Str "nested",Space,Str "syntax"]
-,CodeBlock ("",["sql"],[]) "SELECT * FROM table"
-,Header 3 ("empty preformatted text",[],[]) [Str "empty",Space,Str "preformatted",Space,Str "text"]
-,CodeBlock ("",[],[]) ""
-,Header 2 ("block quotes",[],[]) [Str "block",Space,Str "quotes"]
-,BlockQuote
- [Plain [Str "(indentation",Space,Str "4",Space,Str "spaces)",Space,Str "This",Space,Str "would",Space,Str "be",Space,Str "a",Space,Str "blockquote",Space,Str "in",Space,Str "Vimwiki.",Space,Str "It",Space,Str "is",Space,Str "not",Space,Span ("highlighted",[],[]) [],Strong [Str "highlighted"],Space,Str "in",Space,Str "Vim",Space,Str "but",SoftBreak,Str "(indentation",Space,Str "1",Space,Str "space",Space,Str "followed",Space,Str "by",Space,Str "1",Space,Str "tab",Space,Str "of",Space,Str "width",Space,Str "4)",Space,Str "could",Space,Str "be",Space,Str "styled",Space,Str "by",Space,Str "CSS",Space,Str "in",Space,Str "HTML.",Space,Str "Blockquotes",Space,Str "are",Space,Str "usually",Space,Str "used",Space,Str "to",Space,Str "quote",Space,Str "a",SoftBreak,Str "(indentation",Space,Str "1",Space,Str "tab",Space,Str "of",Space,Str "width",Space,Str "4)",Space,Str "long",Space,Str "piece",Space,Str "of",Space,Str "text",Space,Str "from",Space,Str "another",Space,Str "source.",Space,Strikeout [Str "blah",Space,Str "blah"],Space,Span ("-blockquote",[],[]) [Str ""],Span ("blockquote",["tag"],[]) [Str "blockquote"]]]
-,Header 2 ("external links",[],[]) [Str "external",Space,Str "links"]
-,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")]
-,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")]
-,Para [Link ("",[],[]) [Str "ftp://vim.org"] ("ftp://vim.org","")]
-,Para [Link ("",[],[]) [Str "http://google.com"] ("http://google.com","")]
-,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")]
-,Para [Link ("",[],[]) [Str "mailto:hello@bye.com"] ("mailto:hello@bye.com","")]
-,Header 2 ("internal links",[],[]) [Str "internal",Space,Str "links"]
-,Para [Link ("",[],[]) [Str "This is a link"] ("This is a link","wikilink")]
-,Para [Link ("",[],[]) [Str "Description",Space,Str "of",Space,Str "the",Space,Str "link"] ("This is a link source","wikilink")]
-,Para [Link ("",[],[]) [Str "projects/Important Project 1"] ("projects/Important Project 1","wikilink"),SoftBreak,Link ("",[],[]) [Str "../index"] ("../index","wikilink"),SoftBreak,Link ("",[],[]) [Str "Other",Space,Str "files"] ("a subdirectory/","wikilink")]
-,Para [Link ("",[],[]) [Str "try",Space,Str "me",Space,Str "to",Space,Str "test",Space,Str "tag",Space,Str "anchors"] ("#tag-one","wikilink")]
-,Para [Link ("",[],[]) [Str "try",Space,Str "me",Space,Str "to",Space,Str "test",Space,Str "header",Space,Str "anchors"] ("#block quotes","wikilink")]
-,Para [Link ("",[],[]) [Str "try",Space,Str "me",Space,Str "to",Space,Str "test",Space,Str "strong",Space,Str "anchors"] ("#strong","wikilink")]
-,Para [Link ("",[],[]) [Str "Tasks",Space,Str "for",Space,Str "tomorrow"] ("Todo List#Tomorrow","wikilink")]
-,Para [Link ("",[],[]) [Str "diary:2017-05-01"] ("diary/2017-05-01","wikilink")]
-,Para [Link ("",[],[]) [Str "Important",Space,Str "Data"] ("file:../assets/data.csv","")]
-,Header 3 ("links with thumbnails",[],[]) [Str "links",Space,Str "with",Space,Str "thumbnails"]
-,Para [Link ("",[],[]) [Image ("",[],[]) [Str ""] ("./movie.jpg","")] ("http://www.google.com","")]
-,Header 2 ("images",[],[]) [Str "images"]
-,Para [Image ("",[],[]) [Str ""] ("file:./lalune.jpg","")]
-,Para [Image ("",[],[]) [Str "Vimwiki"] ("http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png",""),SoftBreak,Image ("",[],[]) [Str ""] ("file:./movie.jpg","")]
-,Header 3 ("image with attributes",[],[]) [Str "image",Space,Str "with",Space,Str "attributes"]
-,Para [Image ("",[],[("style","width:150px;height:120px;")]) [Emph [Str "cool",Space,Str "stuff"]] ("lalune.jpg","")]
-,Para [Image ("",[],[("style","font-color:red")]) [Span ("Non-existing",[],[]) [],Strong [Str "Non-existing"],Space,Str "image"] ("nonexist.jpg","")]
-,Para [Image ("",[],[("style","width:150px;height:120px;")]) [Emph [Str "cool",Space,Str "stuff"]] ("lalune.jpg","")]
-,Header 2 ("lists",[],[]) [Str "lists"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "ordered",Space,Str "list",Space,Str "item",Space,Str "1,",Space,Str "and",Space,Str "here",Space,Str "is",Space,Str "some",Space,Str "math",Space,Str "belonging",Space,Str "to",Space,Str "list",Space,Str "item",Space,Str "1"]
- ,Para [Math DisplayMath "a^2 + b^2 = c^2"]
- ,Plain [Str "and",Space,Str "some",Space,Str "preformatted",Space,Str "and",Space,Str "tables",Space,Str "belonging",Space,Str "to",Space,Str "item",Space,Str "1",Space,Str "as",Space,Str "well"]
- ,CodeBlock ("",[],[]) "I'm part of item 1."
- ,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "this",Space,Str "table"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "is"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "also",Space,Str "a",Space,Str "part"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "of",Space,Str "item",Space,Str "1"]]]])]
- (TableFoot ("",[],[])
- [])
- ,Plain [Str "and",Space,Str "some",Space,Str "more",Space,Str "text",Space,Str "belonging",Space,Str "to",Space,Str "item",Space,Str "1."]]
- ,[Plain [Str "ordered",Space,Str "list",Space,Str "item",Space,Str "2"]]]
-,BulletList
- [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "2"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "the",Space,Str "#",Space,Str "become",Space,Str "numbers",Space,Str "when",Space,Str "converted",Space,Str "to",Space,Str "HTML"]]]
-,BulletList
- [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "2"]]]
-,BulletList
- [[Plain [Str "Item",Space,Str "1"]]
- ,[Plain [Str "Item",Space,Str "2"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Sub",Space,Str "item",Space,Str "1",Space,Str "(indentation",Space,Str "4",Space,Str "spaces)",SoftBreak,Str "Sub",Space,Str "item",Space,Str "1",Space,Str "continued",Space,Str "line.",SoftBreak,Str "Sub",Space,Str "item",Space,Str "1",Space,Str "next",Space,Str "continued",Space,Str "line."]]
- ,[Plain [Str "Sub",Space,Str "item",Space,Str "2,",Space,Str "as",Space,Str "an",Space,Str "ordered",Space,Str "list",Space,Str "item",Space,Str "even",Space,Str "though",Space,Str "the",Space,Str "identifier",Space,Str "is",Space,Code ("",[],[]) "*",Space,Str "(indentation",Space,Str "2",Space,Str "spaces",Space,Str "followed",Space,Str "by",Space,Str "one",Space,Str "tab",Space,Str "of",Space,Str "width",Space,Str "4)"]]
- ,[Plain [Str "etc.",SoftBreak,Str "Continuation",Space,Str "of",Space,Str "Item",Space,Str "2",SoftBreak,Str "Next",Space,Str "continuation",Space,Str "of",Space,Str "Item",Space,Str "2"]]]]]
-,Para [Str "But",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "new",Space,Str "paragraph."]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "1"]
- ,BulletList
- [[Plain [Code ("",[],[]) "1.1"]]]]
- ,[Plain [Str "2"]
- ,BulletList
- [[Plain [Str "2.1"]]]]]
-,BulletList
- [[Plain [Str "3"]]]
-,Header 3 ("ordered lists with non-# identifiers",[],[]) [Str "ordered",Space,Str "lists",Space,Str "with",Space,Str "non-#",Space,Str "identifiers"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,BulletList
- [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "2"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "more",Space,Str "..."]
- ,BulletList
- [[Plain [Str "and",Space,Str "more",Space,Str "..."]]
- ,[Plain [Str "..."]]]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "item",Space,Str "3"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "sub",Space,Str "item",Space,Str "1"]]
- ,[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "sub",Space,Str "item",Space,Str "2"]]]]
- ,[Plain [Str "etc."]]]]
- ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "3"]]]
-,Header 2 ("todo lists",[],[]) [Str "todo",Space,Str "lists"]
-,BulletList
- [[Plain [Span ("",["done0"],[]) [],Str "task",Space,Str "1"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Span ("",["done1"],[]) [],Str "5"]]]]
- ,[Plain [Span ("",["done2"],[]) [],Str "3"]]
- ,[Plain [Str "[]",Space,Str "not",Space,Str "a",Space,Str "todo",Space,Str "item"]]
- ,[Plain [Str "[",Space,Str "]not",Space,Str "a",Space,Str "todo",Space,Str "item"]]
- ,[Plain [Str "[r]",Space,Str "not",Space,Str "a",Space,Str "todo",Space,Str "item"]]
- ,[Plain [Str "[",Space,Str "]",Space,Str "not",Space,Str "a",Space,Str "todo",Space,Str "item"]]
- ,[Plain [Span ("",["done2"],[]) [],Str "a",Space,Str "tab",Space,Str "in",Space,Str "the",Space,Str "todo",Space,Str "list",Space,Str "marker",Space,Code ("",[],[]) "[ ]"]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Span ("",["done3"],[]) [],Str "4",SoftBreak,Str "5"]]
- ,[Plain [Span ("",["done4"],[]) []]
- ,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]]])]
- (TableFoot ("",[],[])
- [])]]]
- ,[Plain [Span ("",["done4"],[]) [],Str "task",Space,Str "2"]]]
-,Header 2 ("math",[],[]) [Str "math"]
-,Para [Math InlineMath " \\sum_i a_i^2 = 1 "]
-,Para [Math DisplayMath "\\sum_i a_i^2\n=\n1"]
-,Para [Math DisplayMath "\\begin{aligned}\n\\sum_i a_i^2 &= 1 + 1 \\\\\n&= 2.\n\\end{aligned}"]
-,Para [Str "edge",Space,Str "case",Space,Str "(the",Space,Code ("",[],[]) "c^2 + ",Space,Str "after",Space,Str "the",Space,Str "multline",Space,Str "tag",Space,Str "is",Space,Str "in",Space,Str "the",Space,Str "equation):"]
-,Para [Math DisplayMath "\\begin{gathered}\nc^2 + \na^2 + b^2\n\\end{gathered}"]
-,Para [Str "edge",Space,Str "case",Space,Str "(the",Space,Str "tag",Space,Str "is",Space,Code ("",[],[]) "hello%bye",Str ")"]
-,Para [Math DisplayMath "\\begin{hello%bye}\n\\int_a^b f(x) dx\n\\end{hello%bye}"]
-,Para [Str "Just",Space,Str "two",Space,Str "dollar",Space,Str "signs:",Space,Str "$$"]
-,Para [Str "[not",Space,Str "math]",Space,Str "You",Space,Str "have",Space,Str "$1",SoftBreak,Str "and",Space,Str "I",Space,Str "have",Space,Str "$1."]
-,Header 2 ("tags",[],[]) [Str "tags"]
-,Para [Span ("-tag-one",[],[]) [Str ""],Span ("tag-one",["tag"],[]) [Str "tag-one"],Space,Span ("-tag-two",[],[]) [Str ""],Span ("tag-two",["tag"],[]) [Str "tag-two"]]
-,Header 2 ("tables",[],[]) [Str "tables"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Year"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Temperature",Space,Str "(low)"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "Temperature",Space,Str "(high)"]]]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1900"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "-10"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "25"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1910"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "-15"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "30"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1920"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "-10"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "32"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1930"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Emph [Str "N/A"]]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Emph [Str "N/A"]]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "1940"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "-2"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "40"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 3 ("centered headerless tables",[],[]) [Str "centered",Space,Str "headerless",Space,Str "tables"]
-,Div ("",["center"],[])
- [Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "d"]]]])]
- (TableFoot ("",[],[])
- [])]
-,Header 2 ("paragraphs",[],[]) [Str "paragraphs"]
-,Para [Str "This",Space,Str "is",Space,Str "first",Space,Str "paragraph",SoftBreak,Str "with",Space,Str "two",Space,Str "lines."]
-,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "second",Space,Str "paragraph",Space,Str "with",SoftBreak,Str "two",Space,Str "lines",Space,Str "after",Space,Str "many",Space,Str "blank",Space,Str "lines."]
-,Header 2 ("definition list",[],[]) [Str "definition",Space,Str "list"]
-,DefinitionList
- [([Str "Term",Space,Str "1"],
- [[Plain [Str "Definition",Space,Str "1"]]])
- ,([Str "Term",Space,Str "2"],
- [[Plain [Str "Definition",Space,Str "2"]]
- ,[Plain [Str "Definition",Space,Str "3"]]])
- ,([Str "Term",Space,Str "::",Space,Span ("separated",[],[]) [],Strong [Str "separated"],Space,Str "by",Space,Str "::",Space,Emph [Str "double",Space,Str "colons"]],
- [[Plain [Str "Def1"]]
- ,[Plain [Str "Def2"]]])
- ,([Str "Term",Space,Str "with",Space,Str "lots",Space,Str "of",Space,Str "trailing",Space,Str "colons:::::::"],
- [[Plain [Str "Definition"]]])
- ,([Str "::",Space,Str "This",Space,Str "is",Space,Str "::",Space,Str "A",Space,Str "term",Space,Str "(rather",Space,Str "than",Space,Str "a",Space,Str "definition)"],
- [[Plain [Str "and",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "definition"]]])
- ,([Str "Term",Space,Str "Without",Space,Str "definitions"],
- [[]])
- ,([Str "Part",Space,Str "::",Space,Str "of",Space,Str "::",Space,Str "dt"],
- [[Plain [Str "part",Space,Str "of",Space,Str "::dd"]]])]
-,DefinitionList
- [([],
- [[Plain [Str "Definition",Space,Str "1",Space,Str "without",Space,Str "a",Space,Str "term"]]
- ,[Plain [Str "Definition",Space,Str "2",Space,Str "without",Space,Str "a",Space,Str "term"]]])]
-,DefinitionList
- [([Str "T1"],
- [[Plain [Str "D1"]]])]
-,Para [Str "new",Space,Str "paragraph"]
-,DefinitionList
- [([Str "T1"],
- [[Plain [Str "D1"]]])]
-,Para [Str "Not::Definition"]
-,Para [Str "Not",Space,Str "::Definition"]
-,Para [Str "::Not",Space,Str "definition"]
-,BlockQuote
- [Plain [Str "::",Space,Str "blockquote"]]
-,BlockQuote
- [Plain [Str "block",Space,Str "::",Space,Str "quote"]]
-,Header 2 ("metadata placeholders",[],[]) [Str "metadata",Space,Str "placeholders"]
-,Para [Str "%this",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "placeholder"]
-,Para [Str "placeholders",SoftBreak,Str "serves",Space,Str "as",Space,Str "space",Space,Str "/",Space,Str "softbreak",Space,Str "in",Space,Str "paragraphs"]
-,Header 2 ("sup, sub",[],[]) [Str "sup,",Space,Str "sub"]
-,Para [Str "super",Superscript [Str "script"]]
-,Para [Str "sub",Subscript [Str "script"]]
-,Header 2 ("the todo mark",[],[]) [Str "the",Space,Str "todo",Space,Str "mark"]
-,Para [Span ("",["todo"],[]) [Str "TODO:"]]
-,Header 1 ("not implemented yet",[],[]) [Emph [Span ("not implemented yet",[],[]) [],Strong [Str "not",Space,Str "implemented",Space,Str "yet"]]]
-,Header 2 ("tables with spans",[],[]) [Str "tables",Space,Str "with",Space,Str "spans"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "d"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\\/"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "e"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ">"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "f"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\\/"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "\\/"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ">"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "g"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "h"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ">"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ">"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str ">"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("tables with multiple lines of headers",[],[]) [Str "tables",Space,Str "with",Space,Str "multiple",Space,Str "lines",Space,Str "of",Space,Str "headers"]
-,Table ("",[],[]) (Caption Nothing
- [])
- [(AlignDefault,ColWidthDefault)
- ,(AlignDefault,ColWidthDefault)]
- (TableHead ("",[],[])
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- []]])
- [(TableBody ("",[],[]) (RowHeadColumns 0)
- []
- [Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "a"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "b"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "c"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "d"]]]
- ,Row ("",[],[])
- [Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "---"]]
- ,Cell ("",[],[]) AlignDefault (RowSpan 1) (ColSpan 1)
- [Plain [Str "---"]]]])]
- (TableFoot ("",[],[])
- [])
-,Header 2 ("some other placeholders",[],[]) [Str "some",Space,Str "other",Space,Str "placeholders"]
-,Para [Code ("",[],[]) "template",Space,Str "placeholder",Space,Str "is",Space,Str "ignored."]
-,Para [Code ("",[],[]) "nohtml",Space,Str "placeholder",Space,Str "is",Space,Str "ignored."]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "date" , MetaInlines [ Str "2017-05-01" ] )
+ , ( "title" , MetaInlines [ Str "title" ] )
+ ]
+ }
+ [ Header
+ 1
+ ( "implemented" , [] , [] )
+ [ Emph
+ [ Span ( "implemented" , [] , [] ) []
+ , Strong [ Str "implemented" ]
+ ]
+ ]
+ , Header 1 ( "header" , [] , [] ) [ Str "header" ]
+ , Header
+ 2
+ ( "header level two" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "two" ]
+ , Header
+ 3
+ ( "header level 3" , [] , [] )
+ [ Str "header"
+ , Space
+ , Code ( "" , [] , [] ) "level"
+ , Space
+ , Str "3"
+ ]
+ , Header
+ 4
+ ( "header level four" , [] , [] )
+ [ Str "header"
+ , Space
+ , Strikeout [ Str "level" ]
+ , Space
+ , Str "four"
+ ]
+ , Header
+ 5
+ ( "header level 5" , [] , [] )
+ [ Str "header"
+ , Space
+ , Emph
+ [ Span ( "level" , [] , [] ) []
+ , Strong [ Str "level" ]
+ , Space
+ , Str "5"
+ ]
+ ]
+ , Header
+ 6
+ ( "header level 6" , [] , [] )
+ [ Str "header" , Space , Str "level" , Space , Str "6" ]
+ , Para
+ [ Str "======="
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ , Space
+ , Str "========"
+ ]
+ , Para
+ [ Str "hi=="
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ , Space
+ , Str "=="
+ ]
+ , Para
+ [ Str "==="
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ , Space
+ , Str "=="
+ ]
+ , Para
+ [ Str "==="
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ , Space
+ , Str "===-"
+ ]
+ , Para
+ [ Str "not" , Space , Str "a" , Space , Str "header:" ]
+ , Para [ Str "=n=" ]
+ , Para
+ [ Str "==="
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "header"
+ , Space
+ , Str "===="
+ ]
+ , Header
+ 2
+ ( "centred header" , [ "justcenter" ] , [] )
+ [ Str "centred" , Space , Str "header" ]
+ , Header
+ 2
+ ( "header with some == in between" , [] , [] )
+ [ Str "header"
+ , Space
+ , Str "with"
+ , Space
+ , Str "some"
+ , Space
+ , Code ( "" , [] , [] ) "=="
+ , Space
+ , Str "in"
+ , Space
+ , Str "between"
+ ]
+ , Header
+ 2
+ ( "header with some == in between" , [] , [] )
+ [ Str "header"
+ , Space
+ , Str "with"
+ , Space
+ , Str "some"
+ , Space
+ , Str "=="
+ , Space
+ , Str "in"
+ , Space
+ , Str "between"
+ ]
+ , Header
+ 2
+ ( "header with some ==in between" , [] , [] )
+ [ Str "header"
+ , Space
+ , Str "with"
+ , Space
+ , Str "some"
+ , Space
+ , Str "==in"
+ , Space
+ , Str "between"
+ ]
+ , Header
+ 2
+ ( "emph strong and strikeout" , [] , [] )
+ [ Str "emph"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "strikeout"
+ ]
+ , Para
+ [ Emph [ Str "emph" ]
+ , Space
+ , Span ( "strong" , [] , [] ) []
+ , Strong [ Str "strong" ]
+ ]
+ , Para
+ [ Span ( "strong and emph" , [] , [] ) []
+ , Strong
+ [ Emph
+ [ Str "strong" , Space , Str "and" , Space , Str "emph" ]
+ ]
+ ]
+ , Para
+ [ Emph
+ [ Span ( "emph and strong" , [] , [] ) []
+ , Strong
+ [ Str "emph" , Space , Str "and" , Space , Str "strong" ]
+ ]
+ ]
+ , Para
+ [ Span ( "emph inside strong" , [] , [] ) []
+ , Strong
+ [ Emph [ Str "emph" , Space , Str "inside" ]
+ , Space
+ , Str "strong"
+ ]
+ ]
+ , Para
+ [ Span ( "strong with emph" , [] , [] ) []
+ , Strong
+ [ Str "strong"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emph" ]
+ ]
+ ]
+ , Para
+ [ Emph
+ [ Span ( "strong inside" , [] , [] ) []
+ , Strong [ Str "strong" , Space , Str "inside" ]
+ , Space
+ , Str "emph"
+ ]
+ ]
+ , Para
+ [ Emph
+ [ Strikeout [ Str "strikeout" ]
+ , Space
+ , Str "inside"
+ , Space
+ , Str "emph"
+ ]
+ ]
+ , Para
+ [ Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "struck" , Space , Str "out" ]
+ , Space
+ , Str "with"
+ , Space
+ , Str "emph"
+ ]
+ ]
+ , Para [ Str "*not" , SoftBreak , Str "strong*" ]
+ , Para
+ [ Str "just"
+ , Space
+ , Str "two"
+ , Space
+ , Str "stars:"
+ , Space
+ , Str "**"
+ ]
+ , Para
+ [ Str "just"
+ , Space
+ , Str "two"
+ , Space
+ , Str "underscores:"
+ , Space
+ , Str "__"
+ ]
+ , Para
+ [ Str "just"
+ , Space
+ , Str "four"
+ , Space
+ , Str "~s:"
+ , Space
+ , Str "~~~~"
+ ]
+ , Para [ Str "_not" , SoftBreak , Str "emph_" ]
+ , Para [ Str "~~not" , SoftBreak , Str "strikeout~~" ]
+ , Header
+ 2
+ ( "horizontal rule" , [] , [] )
+ [ Str "horizontal" , Space , Str "rule" ]
+ , Para [ Str "top" ]
+ , HorizontalRule
+ , Para [ Str "middle" ]
+ , HorizontalRule
+ , Para
+ [ Str "not" , Space , Str "a" , Space , Str "rule-----" ]
+ , Para
+ [ Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "(trailing"
+ , Space
+ , Str "spaces):"
+ , SoftBreak
+ , Str "-----"
+ ]
+ , Para
+ [ Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "rule"
+ , Space
+ , Str "(leading"
+ , Space
+ , Str "spaces):"
+ , SoftBreak
+ , Str "----"
+ ]
+ , Header 2 ( "comments" , [] , [] ) [ Str "comments" ]
+ , Para
+ [ Str "this"
+ , SoftBreak
+ , Str "is"
+ , Space
+ , Str "%%"
+ , Space
+ , Str "not"
+ , Space
+ , Str "secret"
+ ]
+ , Header
+ 2
+ ( "inline code" , [] , [] )
+ [ Str "inline" , Space , Str "code" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Code ( "" , [] , [] ) "inline code"
+ , Str "."
+ ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "two"
+ , Space
+ , Str "backticks:"
+ , Space
+ , Str "``"
+ ]
+ , Header
+ 2
+ ( "preformatted text" , [] , [] )
+ [ Str "preformatted" , Space , Str "text" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " Tyger! Tyger! burning bright\n In the forests of the night,\n What immortal hand or eye\n Could frame thy fearful symmetry?\n In what distant deeps or skies\n Burnt the fire of thine eyes?\n On what wings dare he aspire?\n What the hand dare sieze the fire?"
+ , Header
+ 3
+ ( "preformatted text with attributes" , [] , [] )
+ [ Str "preformatted"
+ , Space
+ , Str "text"
+ , Space
+ , Str "with"
+ , Space
+ , Str "attributes"
+ ]
+ , CodeBlock
+ ( ""
+ , []
+ , [ ( "class" , "python" ) , ( "style" , "color:blue" ) ]
+ )
+ " for i in range(1, 5):\n print(i)"
+ , Header
+ 3
+ ( "preformatted text with nested syntax" , [] , [] )
+ [ Str "preformatted"
+ , Space
+ , Str "text"
+ , Space
+ , Str "with"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "syntax"
+ ]
+ , CodeBlock ( "" , [ "sql" ] , [] ) "SELECT * FROM table"
+ , Header
+ 3
+ ( "empty preformatted text" , [] , [] )
+ [ Str "empty"
+ , Space
+ , Str "preformatted"
+ , Space
+ , Str "text"
+ ]
+ , CodeBlock ( "" , [] , [] ) ""
+ , Header
+ 2
+ ( "block quotes" , [] , [] )
+ [ Str "block" , Space , Str "quotes" ]
+ , BlockQuote
+ [ Plain
+ [ Str "(indentation"
+ , Space
+ , Str "4"
+ , Space
+ , Str "spaces)"
+ , Space
+ , Str "This"
+ , Space
+ , Str "would"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "blockquote"
+ , Space
+ , Str "in"
+ , Space
+ , Str "Vimwiki."
+ , Space
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Span ( "highlighted" , [] , [] ) []
+ , Strong [ Str "highlighted" ]
+ , Space
+ , Str "in"
+ , Space
+ , Str "Vim"
+ , Space
+ , Str "but"
+ , SoftBreak
+ , Str "(indentation"
+ , Space
+ , Str "1"
+ , Space
+ , Str "space"
+ , Space
+ , Str "followed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "1"
+ , Space
+ , Str "tab"
+ , Space
+ , Str "of"
+ , Space
+ , Str "width"
+ , Space
+ , Str "4)"
+ , Space
+ , Str "could"
+ , Space
+ , Str "be"
+ , Space
+ , Str "styled"
+ , Space
+ , Str "by"
+ , Space
+ , Str "CSS"
+ , Space
+ , Str "in"
+ , Space
+ , Str "HTML."
+ , Space
+ , Str "Blockquotes"
+ , Space
+ , Str "are"
+ , Space
+ , Str "usually"
+ , Space
+ , Str "used"
+ , Space
+ , Str "to"
+ , Space
+ , Str "quote"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "(indentation"
+ , Space
+ , Str "1"
+ , Space
+ , Str "tab"
+ , Space
+ , Str "of"
+ , Space
+ , Str "width"
+ , Space
+ , Str "4)"
+ , Space
+ , Str "long"
+ , Space
+ , Str "piece"
+ , Space
+ , Str "of"
+ , Space
+ , Str "text"
+ , Space
+ , Str "from"
+ , Space
+ , Str "another"
+ , Space
+ , Str "source."
+ , Space
+ , Strikeout [ Str "blah" , Space , Str "blah" ]
+ , Space
+ , Span ( "-blockquote" , [] , [] ) [ Str "" ]
+ , Span
+ ( "blockquote" , [ "tag" ] , [] ) [ Str "blockquote" ]
+ ]
+ ]
+ , Header
+ 2
+ ( "external links" , [] , [] )
+ [ Str "external" , Space , Str "links" ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Emph [ Str "Google" ]
+ , Space
+ , Str "search"
+ , Space
+ , Str "engine"
+ ]
+ ( "http://google.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://pandoc.org" ]
+ ( "http://pandoc.org" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "ftp://vim.org" ]
+ ( "ftp://vim.org" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "http://google.com" ]
+ ( "http://google.com" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "email" , Space , Str "me" ]
+ ( "mailto:info@example.org" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "mailto:hello@bye.com" ]
+ ( "mailto:hello@bye.com" , "" )
+ ]
+ , Header
+ 2
+ ( "internal links" , [] , [] )
+ [ Str "internal" , Space , Str "links" ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "This is a link" ]
+ ( "This is a link" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Description"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ ]
+ ( "This is a link source" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "projects/Important Project 1" ]
+ ( "projects/Important Project 1" , "wikilink" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "../index" ]
+ ( "../index" , "wikilink" )
+ , SoftBreak
+ , Link
+ ( "" , [] , [] )
+ [ Str "Other" , Space , Str "files" ]
+ ( "a subdirectory/" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "try"
+ , Space
+ , Str "me"
+ , Space
+ , Str "to"
+ , Space
+ , Str "test"
+ , Space
+ , Str "tag"
+ , Space
+ , Str "anchors"
+ ]
+ ( "#tag-one" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "try"
+ , Space
+ , Str "me"
+ , Space
+ , Str "to"
+ , Space
+ , Str "test"
+ , Space
+ , Str "header"
+ , Space
+ , Str "anchors"
+ ]
+ ( "#block quotes" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "try"
+ , Space
+ , Str "me"
+ , Space
+ , Str "to"
+ , Space
+ , Str "test"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "anchors"
+ ]
+ ( "#strong" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Tasks" , Space , Str "for" , Space , Str "tomorrow" ]
+ ( "Todo List#Tomorrow" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "diary:2017-05-01" ]
+ ( "diary/2017-05-01" , "wikilink" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Important" , Space , Str "Data" ]
+ ( "file:../assets/data.csv" , "" )
+ ]
+ , Header
+ 3
+ ( "links with thumbnails" , [] , [] )
+ [ Str "links"
+ , Space
+ , Str "with"
+ , Space
+ , Str "thumbnails"
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Image ( "" , [] , [] ) [ Str "" ] ( "./movie.jpg" , "" ) ]
+ ( "http://www.google.com" , "" )
+ ]
+ , Header 2 ( "images" , [] , [] ) [ Str "images" ]
+ , Para
+ [ Image
+ ( "" , [] , [] ) [ Str "" ] ( "file:./lalune.jpg" , "" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "Vimwiki" ]
+ ( "http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png"
+ , ""
+ )
+ , SoftBreak
+ , Image
+ ( "" , [] , [] ) [ Str "" ] ( "file:./movie.jpg" , "" )
+ ]
+ , Header
+ 3
+ ( "image with attributes" , [] , [] )
+ [ Str "image"
+ , Space
+ , Str "with"
+ , Space
+ , Str "attributes"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [ ( "style" , "width:150px;height:120px;" ) ] )
+ [ Emph [ Str "cool" , Space , Str "stuff" ] ]
+ ( "lalune.jpg" , "" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [ ( "style" , "font-color:red" ) ] )
+ [ Span ( "Non-existing" , [] , [] ) []
+ , Strong [ Str "Non-existing" ]
+ , Space
+ , Str "image"
+ ]
+ ( "nonexist.jpg" , "" )
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [ ( "style" , "width:150px;height:120px;" ) ] )
+ [ Emph [ Str "cool" , Space , Str "stuff" ] ]
+ ( "lalune.jpg" , "" )
+ ]
+ , Header 2 ( "lists" , [] , [] ) [ Str "lists" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "ordered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "and"
+ , Space
+ , Str "here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "math"
+ , Space
+ , Str "belonging"
+ , Space
+ , Str "to"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ , Para [ Math DisplayMath "a^2 + b^2 = c^2" ]
+ , Plain
+ [ Str "and"
+ , Space
+ , Str "some"
+ , Space
+ , Str "preformatted"
+ , Space
+ , Str "and"
+ , Space
+ , Str "tables"
+ , Space
+ , Str "belonging"
+ , Space
+ , Str "to"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ , Space
+ , Str "as"
+ , Space
+ , Str "well"
+ ]
+ , CodeBlock ( "" , [] , [] ) "I'm part of item 1."
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "this" , Space , Str "table" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "is" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "also"
+ , Space
+ , Str "a"
+ , Space
+ , Str "part"
+ ]
+ ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain
+ [ Str "of"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Plain
+ [ Str "and"
+ , Space
+ , Str "some"
+ , Space
+ , Str "more"
+ , Space
+ , Str "text"
+ , Space
+ , Str "belonging"
+ , Space
+ , Str "to"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1."
+ ]
+ ]
+ , [ Plain
+ [ Str "ordered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "the"
+ , Space
+ , Str "#"
+ , Space
+ , Str "become"
+ , Space
+ , Str "numbers"
+ , Space
+ , Str "when"
+ , Space
+ , Str "converted"
+ , Space
+ , Str "to"
+ , Space
+ , Str "HTML"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain [ Str "Item" , Space , Str "1" ] ]
+ , [ Plain [ Str "Item" , Space , Str "2" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ , Space
+ , Str "(indentation"
+ , Space
+ , Str "4"
+ , Space
+ , Str "spaces)"
+ , SoftBreak
+ , Str "Sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ , Space
+ , Str "continued"
+ , Space
+ , Str "line."
+ , SoftBreak
+ , Str "Sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ , Space
+ , Str "next"
+ , Space
+ , Str "continued"
+ , Space
+ , Str "line."
+ ]
+ ]
+ , [ Plain
+ [ Str "Sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ordered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "even"
+ , Space
+ , Str "though"
+ , Space
+ , Str "the"
+ , Space
+ , Str "identifier"
+ , Space
+ , Str "is"
+ , Space
+ , Code ( "" , [] , [] ) "*"
+ , Space
+ , Str "(indentation"
+ , Space
+ , Str "2"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "followed"
+ , Space
+ , Str "by"
+ , Space
+ , Str "one"
+ , Space
+ , Str "tab"
+ , Space
+ , Str "of"
+ , Space
+ , Str "width"
+ , Space
+ , Str "4)"
+ ]
+ ]
+ , [ Plain
+ [ Str "etc."
+ , SoftBreak
+ , Str "Continuation"
+ , Space
+ , Str "of"
+ , Space
+ , Str "Item"
+ , Space
+ , Str "2"
+ , SoftBreak
+ , Str "Next"
+ , Space
+ , Str "continuation"
+ , Space
+ , Str "of"
+ , Space
+ , Str "Item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "But"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "new"
+ , Space
+ , Str "paragraph."
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "1" ]
+ , BulletList [ [ Plain [ Code ( "" , [] , [] ) "1.1" ] ] ]
+ ]
+ , [ Plain [ Str "2" ]
+ , BulletList [ [ Plain [ Str "2.1" ] ] ]
+ ]
+ ]
+ , BulletList [ [ Plain [ Str "3" ] ] ]
+ , Header
+ 3
+ ( "ordered lists with non-# identifiers" , [] , [] )
+ [ Str "ordered"
+ , Space
+ , Str "lists"
+ , Space
+ , Str "with"
+ , Space
+ , Str "non-#"
+ , Space
+ , Str "identifiers"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain [ Str "more" , Space , Str "..." ]
+ , BulletList
+ [ [ Plain
+ [ Str "and"
+ , Space
+ , Str "more"
+ , Space
+ , Str "..."
+ ]
+ ]
+ , [ Plain [ Str "..." ] ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "1"
+ ]
+ ]
+ , [ Plain
+ [ Str "Numbered"
+ , Space
+ , Str "list"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "sub"
+ , Space
+ , Str "item"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ ]
+ , [ Plain [ Str "etc." ] ]
+ ]
+ ]
+ , [ Plain
+ [ Str "Bulleted"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , Space
+ , Str "3"
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "todo lists" , [] , [] )
+ [ Str "todo" , Space , Str "lists" ]
+ , BulletList
+ [ [ Plain
+ [ Span ( "" , [ "done0" ] , [] ) []
+ , Str "task"
+ , Space
+ , Str "1"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Span ( "" , [ "done1" ] , [] ) [] , Str "5" ] ]
+ ]
+ ]
+ , [ Plain [ Span ( "" , [ "done2" ] , [] ) [] , Str "3" ] ]
+ , [ Plain
+ [ Str "[]"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "todo"
+ , Space
+ , Str "item"
+ ]
+ ]
+ , [ Plain
+ [ Str "["
+ , Space
+ , Str "]not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "todo"
+ , Space
+ , Str "item"
+ ]
+ ]
+ , [ Plain
+ [ Str "[r]"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "todo"
+ , Space
+ , Str "item"
+ ]
+ ]
+ , [ Plain
+ [ Str "["
+ , Space
+ , Str "]"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "todo"
+ , Space
+ , Str "item"
+ ]
+ ]
+ , [ Plain
+ [ Span ( "" , [ "done2" ] , [] ) []
+ , Str "a"
+ , Space
+ , Str "tab"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "todo"
+ , Space
+ , Str "list"
+ , Space
+ , Str "marker"
+ , Space
+ , Code ( "" , [] , [] ) "[ ]"
+ ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain
+ [ Span ( "" , [ "done3" ] , [] ) []
+ , Str "4"
+ , SoftBreak
+ , Str "5"
+ ]
+ ]
+ , [ Plain [ Span ( "" , [ "done4" ] , [] ) [] ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
+ ]
+ ]
+ , [ Plain
+ [ Span ( "" , [ "done4" ] , [] ) []
+ , Str "task"
+ , Space
+ , Str "2"
+ ]
+ ]
+ ]
+ , Header 2 ( "math" , [] , [] ) [ Str "math" ]
+ , Para [ Math InlineMath " \\sum_i a_i^2 = 1 " ]
+ , Para [ Math DisplayMath "\\sum_i a_i^2\n=\n1" ]
+ , Para
+ [ Math
+ DisplayMath
+ "\\begin{aligned}\n\\sum_i a_i^2 &= 1 + 1 \\\\\n&= 2.\n\\end{aligned}"
+ ]
+ , Para
+ [ Str "edge"
+ , Space
+ , Str "case"
+ , Space
+ , Str "(the"
+ , Space
+ , Code ( "" , [] , [] ) "c^2 + "
+ , Space
+ , Str "after"
+ , Space
+ , Str "the"
+ , Space
+ , Str "multline"
+ , Space
+ , Str "tag"
+ , Space
+ , Str "is"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "equation):"
+ ]
+ , Para
+ [ Math
+ DisplayMath
+ "\\begin{gathered}\nc^2 + \na^2 + b^2\n\\end{gathered}"
+ ]
+ , Para
+ [ Str "edge"
+ , Space
+ , Str "case"
+ , Space
+ , Str "(the"
+ , Space
+ , Str "tag"
+ , Space
+ , Str "is"
+ , Space
+ , Code ( "" , [] , [] ) "hello%bye"
+ , Str ")"
+ ]
+ , Para
+ [ Math
+ DisplayMath
+ "\\begin{hello%bye}\n\\int_a^b f(x) dx\n\\end{hello%bye}"
+ ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "two"
+ , Space
+ , Str "dollar"
+ , Space
+ , Str "signs:"
+ , Space
+ , Str "$$"
+ ]
+ , Para
+ [ Str "[not"
+ , Space
+ , Str "math]"
+ , Space
+ , Str "You"
+ , Space
+ , Str "have"
+ , Space
+ , Str "$1"
+ , SoftBreak
+ , Str "and"
+ , Space
+ , Str "I"
+ , Space
+ , Str "have"
+ , Space
+ , Str "$1."
+ ]
+ , Header 2 ( "tags" , [] , [] ) [ Str "tags" ]
+ , Para
+ [ Span ( "-tag-one" , [] , [] ) [ Str "" ]
+ , Span ( "tag-one" , [ "tag" ] , [] ) [ Str "tag-one" ]
+ , Space
+ , Span ( "-tag-two" , [] , [] ) [ Str "" ]
+ , Span ( "tag-two" , [ "tag" ] , [] ) [ Str "tag-two" ]
+ ]
+ , Header 2 ( "tables" , [] , [] ) [ Str "tables" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Year" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Temperature" , Space , Str "(low)" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "Temperature" , Space , Str "(high)" ] ]
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1900" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "-10" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "25" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1910" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "-15" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "30" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1920" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "-10" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "32" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1930" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Emph [ Str "N/A" ] ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Emph [ Str "N/A" ] ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "1940" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "-2" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "40" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 3
+ ( "centered headerless tables" , [] , [] )
+ [ Str "centered"
+ , Space
+ , Str "headerless"
+ , Space
+ , Str "tables"
+ ]
+ , Div
+ ( "" , [ "center" ] , [] )
+ [ Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "d" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ ]
+ , Header 2 ( "paragraphs" , [] , [] ) [ Str "paragraphs" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "first"
+ , Space
+ , Str "paragraph"
+ , SoftBreak
+ , Str "with"
+ , Space
+ , Str "two"
+ , Space
+ , Str "lines."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "second"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "with"
+ , SoftBreak
+ , Str "two"
+ , Space
+ , Str "lines"
+ , Space
+ , Str "after"
+ , Space
+ , Str "many"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "lines."
+ ]
+ , Header
+ 2
+ ( "definition list" , [] , [] )
+ [ Str "definition" , Space , Str "list" ]
+ , DefinitionList
+ [ ( [ Str "Term" , Space , Str "1" ]
+ , [ [ Plain [ Str "Definition" , Space , Str "1" ] ] ]
+ )
+ , ( [ Str "Term" , Space , Str "2" ]
+ , [ [ Plain [ Str "Definition" , Space , Str "2" ] ]
+ , [ Plain [ Str "Definition" , Space , Str "3" ] ]
+ ]
+ )
+ , ( [ Str "Term"
+ , Space
+ , Str "::"
+ , Space
+ , Span ( "separated" , [] , [] ) []
+ , Strong [ Str "separated" ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "::"
+ , Space
+ , Emph [ Str "double" , Space , Str "colons" ]
+ ]
+ , [ [ Plain [ Str "Def1" ] ] , [ Plain [ Str "Def2" ] ] ]
+ )
+ , ( [ Str "Term"
+ , Space
+ , Str "with"
+ , Space
+ , Str "lots"
+ , Space
+ , Str "of"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "colons:::::::"
+ ]
+ , [ [ Plain [ Str "Definition" ] ] ]
+ )
+ , ( [ Str "::"
+ , Space
+ , Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "::"
+ , Space
+ , Str "A"
+ , Space
+ , Str "term"
+ , Space
+ , Str "(rather"
+ , Space
+ , Str "than"
+ , Space
+ , Str "a"
+ , Space
+ , Str "definition)"
+ ]
+ , [ [ Plain
+ [ Str "and"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "definition"
+ ]
+ ]
+ ]
+ )
+ , ( [ Str "Term"
+ , Space
+ , Str "Without"
+ , Space
+ , Str "definitions"
+ ]
+ , [ [] ]
+ )
+ , ( [ Str "Part"
+ , Space
+ , Str "::"
+ , Space
+ , Str "of"
+ , Space
+ , Str "::"
+ , Space
+ , Str "dt"
+ ]
+ , [ [ Plain
+ [ Str "part" , Space , Str "of" , Space , Str "::dd" ]
+ ]
+ ]
+ )
+ ]
+ , DefinitionList
+ [ ( []
+ , [ [ Plain
+ [ Str "Definition"
+ , Space
+ , Str "1"
+ , Space
+ , Str "without"
+ , Space
+ , Str "a"
+ , Space
+ , Str "term"
+ ]
+ ]
+ , [ Plain
+ [ Str "Definition"
+ , Space
+ , Str "2"
+ , Space
+ , Str "without"
+ , Space
+ , Str "a"
+ , Space
+ , Str "term"
+ ]
+ ]
+ ]
+ )
+ ]
+ , DefinitionList
+ [ ( [ Str "T1" ] , [ [ Plain [ Str "D1" ] ] ] ) ]
+ , Para [ Str "new" , Space , Str "paragraph" ]
+ , DefinitionList
+ [ ( [ Str "T1" ] , [ [ Plain [ Str "D1" ] ] ] ) ]
+ , Para [ Str "Not::Definition" ]
+ , Para [ Str "Not" , Space , Str "::Definition" ]
+ , Para [ Str "::Not" , Space , Str "definition" ]
+ , BlockQuote
+ [ Plain [ Str "::" , Space , Str "blockquote" ] ]
+ , BlockQuote
+ [ Plain
+ [ Str "block" , Space , Str "::" , Space , Str "quote" ]
+ ]
+ , Header
+ 2
+ ( "metadata placeholders" , [] , [] )
+ [ Str "metadata" , Space , Str "placeholders" ]
+ , Para
+ [ Str "%this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "a"
+ , Space
+ , Str "placeholder"
+ ]
+ , Para
+ [ Str "placeholders"
+ , SoftBreak
+ , Str "serves"
+ , Space
+ , Str "as"
+ , Space
+ , Str "space"
+ , Space
+ , Str "/"
+ , Space
+ , Str "softbreak"
+ , Space
+ , Str "in"
+ , Space
+ , Str "paragraphs"
+ ]
+ , Header
+ 2
+ ( "sup, sub" , [] , [] )
+ [ Str "sup," , Space , Str "sub" ]
+ , Para [ Str "super" , Superscript [ Str "script" ] ]
+ , Para [ Str "sub" , Subscript [ Str "script" ] ]
+ , Header
+ 2
+ ( "the todo mark" , [] , [] )
+ [ Str "the" , Space , Str "todo" , Space , Str "mark" ]
+ , Para [ Span ( "" , [ "todo" ] , [] ) [ Str "TODO:" ] ]
+ , Header
+ 1
+ ( "not implemented yet" , [] , [] )
+ [ Emph
+ [ Span ( "not implemented yet" , [] , [] ) []
+ , Strong
+ [ Str "not"
+ , Space
+ , Str "implemented"
+ , Space
+ , Str "yet"
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "tables with spans" , [] , [] )
+ [ Str "tables" , Space , Str "with" , Space , Str "spans" ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "d" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\\/" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "e" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str ">" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "f" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\\/" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "\\/" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str ">" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "g" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "h" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str ">" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str ">" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str ">" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 2
+ ( "tables with multiple lines of headers" , [] , [] )
+ [ Str "tables"
+ , Space
+ , Str "with"
+ , Space
+ , Str "multiple"
+ , Space
+ , Str "lines"
+ , Space
+ , Str "of"
+ , Space
+ , Str "headers"
+ ]
+ , Table
+ ( "" , [] , [] )
+ (Caption Nothing [])
+ [ ( AlignDefault , ColWidthDefault )
+ , ( AlignDefault , ColWidthDefault )
+ ]
+ (TableHead
+ ( "" , [] , [] )
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ []
+ ]
+ ])
+ [ TableBody
+ ( "" , [] , [] )
+ (RowHeadColumns 0)
+ []
+ [ Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "a" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "b" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "c" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "d" ] ]
+ ]
+ , Row
+ ( "" , [] , [] )
+ [ Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "---" ] ]
+ , Cell
+ ( "" , [] , [] )
+ AlignDefault
+ (RowSpan 1)
+ (ColSpan 1)
+ [ Plain [ Str "---" ] ]
+ ]
+ ]
+ ]
+ (TableFoot ( "" , [] , [] ) [])
+ , Header
+ 2
+ ( "some other placeholders" , [] , [] )
+ [ Str "some"
+ , Space
+ , Str "other"
+ , Space
+ , Str "placeholders"
+ ]
+ , Para
+ [ Code ( "" , [] , [] ) "template"
+ , Space
+ , Str "placeholder"
+ , Space
+ , Str "is"
+ , Space
+ , Str "ignored."
+ ]
+ , Para
+ [ Code ( "" , [] , [] ) "nohtml"
+ , Space
+ , Str "placeholder"
+ , Space
+ , Str "is"
+ , Space
+ , Str "ignored."
+ ]
+ ]
diff --git a/test/writer.asciidoc b/test/writer.asciidoc
index 61014ed69..f5fce08f7 100644
--- a/test/writer.asciidoc
+++ b/test/writer.asciidoc
@@ -431,8 +431,8 @@ Superscripts: a^bc^d a^_hello_^ a^hello there^.
Subscripts: H~2~O, H~23~O, H~many of them~O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
'''''
@@ -630,10 +630,10 @@ Here is a movie image:movie.jpg[movie] icon.
== Footnotes
-Here is a footnote reference,footnote:[Here is the footnote. It can go
-anywhere after the footnote reference. It need not be placed at the end of the
-document.] and another.[multiblock footnote omitted] This should _not_ be a
-footnote reference, because it contains a space.[^my note] Here is an inline
+Here is a footnote reference,footnote:[Here is the footnote. It can go anywhere
+after the footnote reference. It need not be placed at the end of the document.]
+and another.[multiblock footnote omitted] This should _not_ be a footnote
+reference, because it contains a space.[^my note] Here is an inline
note.footnote:[This is _easier_ to type. Inline notes may contain
http://google.com[links] and `]` verbatim characters, as well as [bracketed
text].]
diff --git a/test/writer.asciidoctor b/test/writer.asciidoctor
index 6e920990e..21ec18ec6 100644
--- a/test/writer.asciidoctor
+++ b/test/writer.asciidoctor
@@ -432,8 +432,8 @@ Superscripts: a^bc^d a^_hello_^ a^hello there^.
Subscripts: H~2~O, H~23~O, H~many of them~O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
'''''
@@ -447,8 +447,8 @@ spaces: a^b c^d, a~b c~d.
'`He said, "`I want to go.`"`' Were you alive in the 70’s?
-Here is some quoted '``+code+``' and a
-"`http://example.com/?foo=1&bar=2[quoted link]`".
+Here is some quoted '``+code+``' and a "`http://example.com/?foo=1&bar=2[quoted
+link]`".
Some dashes: one—two — three—four — five.
@@ -631,10 +631,10 @@ Here is a movie image:movie.jpg[movie] icon.
== Footnotes
-Here is a footnote reference,footnote:[Here is the footnote. It can go
-anywhere after the footnote reference. It need not be placed at the end of the
-document.] and another.[multiblock footnote omitted] This should _not_ be a
-footnote reference, because it contains a space.[^my note] Here is an inline
+Here is a footnote reference,footnote:[Here is the footnote. It can go anywhere
+after the footnote reference. It need not be placed at the end of the document.]
+and another.[multiblock footnote omitted] This should _not_ be a footnote
+reference, because it contains a space.[^my note] Here is an inline
note.footnote:[This is _easier_ to type. Inline notes may contain
http://google.com[links] and `+]+` verbatim characters, as well as [bracketed
text].]
diff --git a/test/writer.context b/test/writer.context
index 78667813b..ae45d1580 100644
--- a/test/writer.context
+++ b/test/writer.context
@@ -643,8 +643,8 @@ Superscripts: a\high{bc}d a\high{{\em hello}} a\high{hello~there}.
Subscripts: H\low{2}O, H\low{23}O, H\low{many~of~them}O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a\lettertilde{}b c\lettertilde{}d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a\lettertilde{}b c\lettertilde{}d.
\thinrule
@@ -878,10 +878,10 @@ Here is a movie {\externalfigure[movie.jpg]} icon.
\section[title={Footnotes},reference={footnotes}]
-Here is a footnote reference,\footnote{Here is the footnote. It can go
- anywhere after the footnote reference. It need not be placed at the end of
- the document.} and another.\startbuffer Here's the long note. This one
- contains multiple blocks.
+Here is a footnote reference,\footnote{Here is the footnote. It can go anywhere
+ after the footnote reference. It need not be placed at the end of the
+ document.} and another.\startbuffer Here's the long note. This one contains
+ multiple blocks.
Subsequent blocks are indented to show that they belong to the footnote (as
with list items).
diff --git a/test/writer.custom b/test/writer.custom
index 2cb398eb1..ce490f426 100644
--- a/test/writer.custom
+++ b/test/writer.custom
@@ -712,18 +712,18 @@ So is &lsquo;pine.&rsquo;</p>
<h2 id="autolinks">Autolinks</h2>
-<p>With an ampersand: <a href='http://example.com/?foo=1&amp;bar=2' title=''>http://example.com/?foo=1&amp;bar=2</a></p>
+<p>With an ampersand: <a href='http://example.com/?foo=1&amp;bar=2' title='' class="uri">http://example.com/?foo=1&amp;bar=2</a></p>
<ul>
<li>In a list?</li>
-<li><a href='http://example.com/' title=''>http://example.com/</a></li>
+<li><a href='http://example.com/' title='' class="uri">http://example.com/</a></li>
<li>It should.</li>
</ul>
-<p>An e-mail address: <a href='mailto:nobody@nowhere.net' title=''>nobody@nowhere.net</a></p>
+<p>An e-mail address: <a href='mailto:nobody@nowhere.net' title='' class="email">nobody@nowhere.net</a></p>
<blockquote>
-<p>Blockquoted: <a href='http://example.com/' title=''>http://example.com/</a></p>
+<p>Blockquoted: <a href='http://example.com/' title='' class="uri">http://example.com/</a></p>
</blockquote>
<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
@@ -736,10 +736,9 @@ So is &lsquo;pine.&rsquo;</p>
<p>From &ldquo;Voyage dans la Lune&rdquo; by Georges Melies (1902):</p>
-<div class="figure">
-<img src="lalune.jpg" title="fig:Voyage dans la Lune"/>
-<p class="caption">lalune</p>
-</div>
+<figure>
+<img src="lalune.jpg" id="" alt="lalune"/><figcaption>lalune</figcaption>
+</figure>
<p>Here is a movie <img src='movie.jpg' title=''/> icon.</p>
diff --git a/test/writer.docbook4 b/test/writer.docbook4
index 27d91a2f0..baf1937b5 100644
--- a/test/writer.docbook4
+++ b/test/writer.docbook4
@@ -66,8 +66,8 @@
</para>
<para>
In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
- item. Because a hard-wrapped line in the middle of a paragraph looked
- like a list item.
+ item. Because a hard-wrapped line in the middle of a paragraph looked like
+ a list item.
</para>
<para>
Here’s one with a bullet. * criminey.
@@ -1014,19 +1014,19 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<sect1 id="smart-quotes-ellipses-dashes">
<title>Smart quotes, ellipses, dashes</title>
<para>
- <quote>Hello,</quote> said the spider. <quote><quote>Shelob</quote> is
- my name.</quote>
+ <quote>Hello,</quote> said the spider. <quote><quote>Shelob</quote> is my
+ name.</quote>
</para>
<para>
<quote>A</quote>, <quote>B</quote>, and <quote>C</quote> are letters.
</para>
<para>
- <quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote> are
- names of trees. So is <quote>pine.</quote>
+ <quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote> are names
+ of trees. So is <quote>pine.</quote>
</para>
<para>
- <quote>He said, <quote>I want to go.</quote></quote> Were you alive in
- the 70’s?
+ <quote>He said, <quote>I want to go.</quote></quote> Were you alive in the
+ 70’s?
</para>
<para>
Here is some quoted <quote><literal>code</literal></quote> and a
@@ -1366,8 +1366,8 @@ or here: &lt;http://example.com/&gt;
<para>
Here is a footnote reference,<footnote>
<para>
- Here is the footnote. It can go anywhere after the footnote
- reference. It need not be placed at the end of the document.
+ Here is the footnote. It can go anywhere after the footnote reference.
+ It need not be placed at the end of the document.
</para>
</footnote> and another.<footnote>
<para>
@@ -1384,14 +1384,12 @@ or here: &lt;http://example.com/&gt;
If you want, you can indent every line, but you can also be lazy and
just indent the first line of each block.
</para>
- </footnote> This should <emphasis>not</emphasis> be a footnote
- reference, because it contains a space.[^my note] Here is an inline
- note.<footnote>
+ </footnote> This should <emphasis>not</emphasis> be a footnote reference,
+ because it contains a space.[^my note] Here is an inline note.<footnote>
<para>
- This is <emphasis>easier</emphasis> to type. Inline notes may
- contain <ulink url="http://google.com">links</ulink> and
- <literal>]</literal> verbatim characters, as well as [bracketed
- text].
+ This is <emphasis>easier</emphasis> to type. Inline notes may contain
+ <ulink url="http://google.com">links</ulink> and <literal>]</literal>
+ verbatim characters, as well as [bracketed text].
</para>
</footnote>
</para>
diff --git a/test/writer.docbook5 b/test/writer.docbook5
index afee571fa..dd73803aa 100644
--- a/test/writer.docbook5
+++ b/test/writer.docbook5
@@ -68,8 +68,8 @@
</para>
<para>
In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
- item. Because a hard-wrapped line in the middle of a paragraph looked
- like a list item.
+ item. Because a hard-wrapped line in the middle of a paragraph looked like
+ a list item.
</para>
<para>
Here’s one with a bullet. * criminey.
@@ -989,19 +989,19 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<section xml:id="smart-quotes-ellipses-dashes">
<title>Smart quotes, ellipses, dashes</title>
<para>
- <quote>Hello,</quote> said the spider. <quote><quote>Shelob</quote> is
- my name.</quote>
+ <quote>Hello,</quote> said the spider. <quote><quote>Shelob</quote> is my
+ name.</quote>
</para>
<para>
<quote>A</quote>, <quote>B</quote>, and <quote>C</quote> are letters.
</para>
<para>
- <quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote> are
- names of trees. So is <quote>pine.</quote>
+ <quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote> are names
+ of trees. So is <quote>pine.</quote>
</para>
<para>
- <quote>He said, <quote>I want to go.</quote></quote> Were you alive in
- the 70’s?
+ <quote>He said, <quote>I want to go.</quote></quote> Were you alive in the
+ 70’s?
</para>
<para>
Here is some quoted <quote><literal>code</literal></quote> and a
@@ -1266,8 +1266,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<link xlink:href="http://att.com/">AT&amp;T</link>.
</para>
<para>
- Here’s an <link xlink:href="/script?foo=1&amp;bar=2">inline
- link</link>.
+ Here’s an <link xlink:href="/script?foo=1&amp;bar=2">inline link</link>.
</para>
<para>
Here’s an <link xlink:href="/script?foo=1&amp;bar=2">inline link in
@@ -1342,8 +1341,8 @@ or here: &lt;http://example.com/&gt;
<para>
Here is a footnote reference,<footnote>
<para>
- Here is the footnote. It can go anywhere after the footnote
- reference. It need not be placed at the end of the document.
+ Here is the footnote. It can go anywhere after the footnote reference.
+ It need not be placed at the end of the document.
</para>
</footnote> and another.<footnote>
<para>
@@ -1360,14 +1359,12 @@ or here: &lt;http://example.com/&gt;
If you want, you can indent every line, but you can also be lazy and
just indent the first line of each block.
</para>
- </footnote> This should <emphasis>not</emphasis> be a footnote
- reference, because it contains a space.[^my note] Here is an inline
- note.<footnote>
+ </footnote> This should <emphasis>not</emphasis> be a footnote reference,
+ because it contains a space.[^my note] Here is an inline note.<footnote>
<para>
- This is <emphasis>easier</emphasis> to type. Inline notes may
- contain <link xlink:href="http://google.com">links</link> and
- <literal>]</literal> verbatim characters, as well as [bracketed
- text].
+ This is <emphasis>easier</emphasis> to type. Inline notes may contain
+ <link xlink:href="http://google.com">links</link> and
+ <literal>]</literal> verbatim characters, as well as [bracketed text].
</para>
</footnote>
</para>
diff --git a/test/writer.haddock b/test/writer.haddock
index fbe6c257b..82c45f358 100644
--- a/test/writer.haddock
+++ b/test/writer.haddock
@@ -1,7 +1,7 @@
This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
markdown test suite.
-______________________________________________________________________________
+________________________________________________________________________________
= Headers
#headers#
@@ -34,7 +34,7 @@ with no blank line
with no blank line
-______________________________________________________________________________
+________________________________________________________________________________
= Paragraphs
#paragraphs#
@@ -50,7 +50,7 @@ Here’s one with a bullet. * criminey.
There should be a hard line break
here.
-______________________________________________________________________________
+________________________________________________________________________________
= Block Quotes
#block-quotes#
@@ -80,7 +80,7 @@ This should not be a block quote: 2 > 1.
And a following paragraph.
-______________________________________________________________________________
+________________________________________________________________________________
= Code Blocks
#code-blocks#
@@ -101,7 +101,7 @@ And:
>
> These should not be escaped: \$ \\ \> \[ \{
-______________________________________________________________________________
+________________________________________________________________________________
= Lists
#lists#
@@ -265,7 +265,7 @@ M.A. 2007
B. Williams
-______________________________________________________________________________
+________________________________________________________________________________
= Definition Lists
#definition-lists#
@@ -398,7 +398,7 @@ Code:
Hr’s:
-______________________________________________________________________________
+________________________________________________________________________________
= Inline Markup
#inline-markup#
@@ -425,10 +425,10 @@ Superscripts: abcd a/hello/ ahello there.
Subscripts: H2O, H23O, Hmany of themO.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
-______________________________________________________________________________
+________________________________________________________________________________
= Smart quotes, ellipses, dashes
#smart-quotes-ellipses-dashes#
@@ -450,7 +450,7 @@ Dashes between numbers: 5–7, 255–66, 1987–1999.
Ellipses…and…and….
-______________________________________________________________________________
+________________________________________________________________________________
= LaTeX
#latex#
@@ -475,7 +475,7 @@ These shouldn’t be math:
Here’s a LaTeX table:
-______________________________________________________________________________
+________________________________________________________________________________
= Special Characters
#special-characters#
@@ -530,7 +530,7 @@ Plus: +
Minus: -
-______________________________________________________________________________
+________________________________________________________________________________
= Links
#links#
@@ -607,7 +607,7 @@ Auto-links should not occur here: @\<http:\/\/example.com\/>@
> or here: <http://example.com/>
-______________________________________________________________________________
+________________________________________________________________________________
= Images
#images#
@@ -618,14 +618,14 @@ From “Voyage dans la Lune” by Georges Melies (1902):
Here is a movie <<movie.jpg movie>> icon.
-______________________________________________________________________________
+________________________________________________________________________________
= Footnotes
#footnotes#
Here is a footnote reference,<#notes [1]> and another.<#notes [2]> This should
-/not/ be a footnote reference, because it contains a space.[^my note] Here is
-an inline note.<#notes [3]>
+/not/ be a footnote reference, because it contains a space.[^my note] Here is an
+inline note.<#notes [3]>
Notes can go in quotes.<#notes [4]>
@@ -640,17 +640,16 @@ This paragraph should not be part of the note, as it is not indented.
2. Here’s the long note. This one contains multiple blocks.
- Subsequent blocks are indented to show that they belong to the footnote
- (as with list items).
+ Subsequent blocks are indented to show that they belong to the footnote (as
+ with list items).
> { <code> }
If you want, you can indent every line, but you can also be lazy and just
indent the first line of each block.
-3. This is /easier/ to type. Inline notes may contain
- <http://google.com links> and @]@ verbatim characters, as well as
- [bracketed text].
+3. This is /easier/ to type. Inline notes may contain <http://google.com links>
+ and @]@ verbatim characters, as well as [bracketed text].
4. In quote.
diff --git a/test/writer.html4 b/test/writer.html4
index 215a1efb9..1e255fa70 100644
--- a/test/writer.html4
+++ b/test/writer.html4
@@ -156,10 +156,12 @@
<h2 class="author">Anonymous</h2>
<h3 class="date">July 17, 2006</h3>
</div>
-<p>This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.</p>
+<p>This is a set of tests for pandoc. Most of them are adapted from John
+Gruber’s markdown test suite.</p>
<hr />
<h1 id="headers">Headers</h1>
-<h2 id="level-2-with-an-embedded-link">Level 2 with an <a href="/url">embedded link</a></h2>
+<h2 id="level-2-with-an-embedded-link">Level 2 with an <a href="/url">embedded
+link</a></h2>
<h3 id="level-3-with-emphasis">Level 3 with <em>emphasis</em></h3>
<h4 id="level-4">Level 4</h4>
<h5 id="level-5">Level 5</h5>
@@ -172,7 +174,9 @@
<hr />
<h1 id="paragraphs">Paragraphs</h1>
<p>Here’s a regular paragraph.</p>
-<p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.</p>
+<p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
+Because a hard-wrapped line in the middle of a paragraph looked like a list
+item.</p>
<p>Here’s one with a bullet. * criminey.</p>
<p>There should be a hard line break<br />
here.</p>
@@ -283,7 +287,8 @@ These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
<p>Multiple paragraphs:</p>
<ol style="list-style-type: decimal">
<li><p>Item 1, graf one.</p>
-<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.</p></li>
+<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s
+back.</p></li>
<li><p>Item 2.</p></li>
<li><p>Item 3.</p></li>
</ol>
@@ -371,47 +376,58 @@ These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
<p>Tight using spaces:</p>
<dl>
<dt>apple</dt>
-<dd>red fruit
+<dd>
+red fruit
</dd>
<dt>orange</dt>
-<dd>orange fruit
+<dd>
+orange fruit
</dd>
<dt>banana</dt>
-<dd>yellow fruit
+<dd>
+yellow fruit
</dd>
</dl>
<p>Tight using tabs:</p>
<dl>
<dt>apple</dt>
-<dd>red fruit
+<dd>
+red fruit
</dd>
<dt>orange</dt>
-<dd>orange fruit
+<dd>
+orange fruit
</dd>
<dt>banana</dt>
-<dd>yellow fruit
+<dd>
+yellow fruit
</dd>
</dl>
<p>Loose:</p>
<dl>
<dt>apple</dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
</dd>
<dt>orange</dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
</dd>
<dt>banana</dt>
-<dd><p>yellow fruit</p>
+<dd>
+<p>yellow fruit</p>
</dd>
</dl>
<p>Multiple blocks with italics:</p>
<dl>
<dt><em>apple</em></dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
<p>contains seeds, crisp, pleasant to taste</p>
</dd>
<dt><em>orange</em></dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
<pre><code>{ orange code block }</code></pre>
<blockquote>
<p>orange block quote</p>
@@ -421,38 +437,49 @@ These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
<p>Multiple definitions, tight:</p>
<dl>
<dt>apple</dt>
-<dd>red fruit
+<dd>
+red fruit
</dd>
-<dd>computer
+<dd>
+computer
</dd>
<dt>orange</dt>
-<dd>orange fruit
+<dd>
+orange fruit
</dd>
-<dd>bank
+<dd>
+bank
</dd>
</dl>
<p>Multiple definitions, loose:</p>
<dl>
<dt>apple</dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
</dd>
-<dd><p>computer</p>
+<dd>
+<p>computer</p>
</dd>
<dt>orange</dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
</dd>
-<dd><p>bank</p>
+<dd>
+<p>bank</p>
</dd>
</dl>
<p>Blank line after term, indented marker, alternate markers:</p>
<dl>
<dt>apple</dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
</dd>
-<dd><p>computer</p>
+<dd>
+<p>computer</p>
</dd>
<dt>orange</dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
<ol style="list-style-type: decimal">
<li>sublist</li>
<li>sublist</li>
@@ -540,18 +567,22 @@ Blah
<p>So is <strong><em>this</em></strong> word.</p>
<p><strong><em>This is strong and em.</em></strong></p>
<p>So is <strong><em>this</em></strong> word.</p>
-<p>This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html&gt;</code>.</p>
+<p>This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>,
+<code>\$</code>, <code>&lt;html&gt;</code>.</p>
<p><del>This is <em>strikeout</em>.</del></p>
-<p>Superscripts: a<sup>bc</sup>d a<sup><em>hello</em></sup> a<sup>hello there</sup>.</p>
+<p>Superscripts: a<sup>bc</sup>d a<sup><em>hello</em></sup>
+a<sup>hello there</sup>.</p>
<p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.</p>
-<p>These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</p>
+<p>These should not be superscripts or subscripts, because of the unescaped
+spaces: a^b c^d, a~b c~d.</p>
<hr />
<h1 id="smart-quotes-ellipses-dashes">Smart quotes, ellipses, dashes</h1>
<p>“Hello,” said the spider. “‘Shelob’ is my name.”</p>
<p>‘A’, ‘B’, and ‘C’ are letters.</p>
<p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’</p>
<p>‘He said, “I want to go.”’ Were you alive in the 70’s?</p>
-<p>Here is some quoted ‘<code>code</code>’ and a “<a href="http://example.com/?foo=1&amp;bar=2">quoted link</a>”.</p>
+<p>Here is some quoted ‘<code>code</code>’ and a “<a
+href="http://example.com/?foo=1&amp;bar=2">quoted link</a>”.</p>
<p>Some dashes: one—two — three—four — five.</p>
<p>Dashes between numbers: 5–7, 255–66, 1987–1999.</p>
<p>Ellipses…and…and….</p>
@@ -564,13 +595,16 @@ Blah
<li><span class="math inline"><em>α</em> ∧ <em>ω</em></span></li>
<li><span class="math inline">223</span></li>
<li><span class="math inline"><em>p</em></span>-Tree</li>
-<li>Here’s some display math: <span class="math display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span></li>
-<li>Here’s one that has a line break in it: <span class="math inline"><em>α</em> + <em>ω</em> × <em>x</em><sup>2</sup></span>.</li>
+<li>Here’s some display math: <span class="math
+display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span></li>
+<li>Here’s one that has a line break in it: <span class="math
+inline"><em>α</em> + <em>ω</em> × <em>x</em><sup>2</sup></span>.</li>
</ul>
<p>These shouldn’t be math:</p>
<ul>
<li>To get the famous equation, write <code>$e = mc^2$</code>.</li>
-<li>$22,000 is a <em>lot</em> of money. So is $34,000. (It worked if “lot” is emphasized.)</li>
+<li>$22,000 is a <em>lot</em> of money. So is $34,000. (It worked if “lot” is
+emphasized.)</li>
<li>Shoes ($20) and socks ($5).</li>
<li>Escaped <code>$</code>: $73 <em>this should be emphasized</em> 23$.</li>
</ul>
@@ -613,7 +647,8 @@ Blah
<p><a href="/url/" title="title">URL and title</a>.</p>
<p><a href="/url/" title="title preceded by two spaces">URL and title</a>.</p>
<p><a href="/url/" title="title preceded by a tab">URL and title</a>.</p>
-<p><a href="/url/" title="title with &quot;quotes&quot; in it">URL and title</a></p>
+<p><a href="/url/" title="title with &quot;quotes&quot; in it">URL and
+title</a></p>
<p><a href="/url/" title="title with single quotes">URL and title</a></p>
<p><a href="/url/with_underscore">with_underscore</a></p>
<p><a href="mailto:nobody@nowhere.net">Email link</a></p>
@@ -630,22 +665,29 @@ Blah
<p>Foo <a href="/url/" title="Title with &quot;quotes&quot; inside">bar</a>.</p>
<p>Foo <a href="/url/" title="Title with &quot;quote&quot; inside">biz</a>.</p>
<h2 id="with-ampersands">With ampersands</h2>
-<p>Here’s a <a href="http://example.com/?foo=1&amp;bar=2">link with an ampersand in the URL</a>.</p>
-<p>Here’s a link with an amersand in the link text: <a href="http://att.com/" title="AT&amp;T">AT&amp;T</a>.</p>
+<p>Here’s a <a href="http://example.com/?foo=1&amp;bar=2">link with an ampersand
+in the URL</a>.</p>
+<p>Here’s a link with an amersand in the link text: <a href="http://att.com/"
+title="AT&amp;T">AT&amp;T</a>.</p>
<p>Here’s an <a href="/script?foo=1&amp;bar=2">inline link</a>.</p>
-<p>Here’s an <a href="/script?foo=1&amp;bar=2">inline link in pointy braces</a>.</p>
+<p>Here’s an <a href="/script?foo=1&amp;bar=2">inline link in pointy
+braces</a>.</p>
<h2 id="autolinks">Autolinks</h2>
-<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2" class="uri">http://example.com/?foo=1&amp;bar=2</a></p>
+<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2"
+class="uri">http://example.com/?foo=1&amp;bar=2</a></p>
<ul>
<li>In a list?</li>
<li><a href="http://example.com/" class="uri">http://example.com/</a></li>
<li>It should.</li>
</ul>
-<p>An e-mail address: <a href="mailto:nobody@nowhere.net" class="email">nobody@nowhere.net</a></p>
+<p>An e-mail address: <a href="mailto:nobody@nowhere.net"
+class="email">nobody@nowhere.net</a></p>
<blockquote>
-<p>Blockquoted: <a href="http://example.com/" class="uri">http://example.com/</a></p>
+<p>Blockquoted: <a href="http://example.com/"
+class="uri">http://example.com/</a></p>
</blockquote>
-<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
+<p>Auto-links should not occur here:
+<code>&lt;http://example.com/&gt;</code></p>
<pre><code>or here: &lt;http://example.com/&gt;</code></pre>
<hr />
<h1 id="images">Images</h1>
@@ -657,23 +699,36 @@ Blah
<p>Here is a movie <img src="movie.jpg" alt="movie" /> icon.</p>
<hr />
<h1 id="footnotes">Footnotes</h1>
-<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2"><sup>2</sup></a> This should <em>not</em> be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnote-ref" id="fnref3"><sup>3</sup></a></p>
+<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref"
+id="fnref1"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref"
+id="fnref2"><sup>2</sup></a> This should <em>not</em> be a footnote reference,
+because it contains a space.[^my note] Here is an inline note.<a href="#fn3"
+class="footnote-ref" id="fnref3"><sup>3</sup></a></p>
<blockquote>
-<p>Notes can go in quotes.<a href="#fn4" class="footnote-ref" id="fnref4"><sup>4</sup></a></p>
+<p>Notes can go in quotes.<a href="#fn4" class="footnote-ref"
+id="fnref4"><sup>4</sup></a></p>
</blockquote>
<ol style="list-style-type: decimal">
-<li>And in list items.<a href="#fn5" class="footnote-ref" id="fnref5"><sup>5</sup></a></li>
+<li>And in list items.<a href="#fn5" class="footnote-ref"
+id="fnref5"><sup>5</sup></a></li>
</ol>
<p>This paragraph should not be part of the note, as it is not indented.</p>
-<div class="footnotes">
+<div class="footnotes footnotes-end-of-document">
<hr />
<ol>
-<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnote-back">↩︎</a></p></li>
+<li id="fn1"><p>Here is the footnote. It can go anywhere after the footnote
+reference. It need not be placed at the end of the document.<a href="#fnref1"
+class="footnote-back">↩︎</a></p></li>
<li id="fn2"><p>Here’s the long note. This one contains multiple blocks.</p>
-<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
+<p>Subsequent blocks are indented to show that they belong to the footnote (as
+with list items).</p>
<pre><code> { &lt;code&gt; }</code></pre>
-<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnote-back">↩︎</a></p></li>
-<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnote-back">↩︎</a></p></li>
+<p>If you want, you can indent every line, but you can also be lazy and just
+indent the first line of each block.<a href="#fnref2"
+class="footnote-back">↩︎</a></p></li>
+<li id="fn3"><p>This is <em>easier</em> to type. Inline notes may contain <a
+href="http://google.com">links</a> and <code>]</code> verbatim characters, as
+well as [bracketed text].<a href="#fnref3" class="footnote-back">↩︎</a></p></li>
<li id="fn4"><p>In quote.<a href="#fnref4" class="footnote-back">↩︎</a></p></li>
<li id="fn5"><p>In list.<a href="#fnref5" class="footnote-back">↩︎</a></p></li>
</ol>
diff --git a/test/writer.html5 b/test/writer.html5
index 387df4058..d8e89b3e2 100644
--- a/test/writer.html5
+++ b/test/writer.html5
@@ -159,10 +159,12 @@
<p class="author">Anonymous</p>
<p class="date">July 17, 2006</p>
</header>
-<p>This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite.</p>
+<p>This is a set of tests for pandoc. Most of them are adapted from John
+Gruber’s markdown test suite.</p>
<hr />
<h1 id="headers">Headers</h1>
-<h2 id="level-2-with-an-embedded-link">Level 2 with an <a href="/url">embedded link</a></h2>
+<h2 id="level-2-with-an-embedded-link">Level 2 with an <a href="/url">embedded
+link</a></h2>
<h3 id="level-3-with-emphasis">Level 3 with <em>emphasis</em></h3>
<h4 id="level-4">Level 4</h4>
<h5 id="level-5">Level 5</h5>
@@ -175,7 +177,9 @@
<hr />
<h1 id="paragraphs">Paragraphs</h1>
<p>Here’s a regular paragraph.</p>
-<p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.</p>
+<p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
+Because a hard-wrapped line in the middle of a paragraph looked like a list
+item.</p>
<p>Here’s one with a bullet. * criminey.</p>
<p>There should be a hard line break<br />
here.</p>
@@ -286,7 +290,8 @@ These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
<p>Multiple paragraphs:</p>
<ol type="1">
<li><p>Item 1, graf one.</p>
-<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.</p></li>
+<p>Item 1. graf two. The quick brown fox jumped over the lazy dog’s
+back.</p></li>
<li><p>Item 2.</p></li>
<li><p>Item 3.</p></li>
</ol>
@@ -374,47 +379,58 @@ These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
<p>Tight using spaces:</p>
<dl>
<dt>apple</dt>
-<dd>red fruit
+<dd>
+red fruit
</dd>
<dt>orange</dt>
-<dd>orange fruit
+<dd>
+orange fruit
</dd>
<dt>banana</dt>
-<dd>yellow fruit
+<dd>
+yellow fruit
</dd>
</dl>
<p>Tight using tabs:</p>
<dl>
<dt>apple</dt>
-<dd>red fruit
+<dd>
+red fruit
</dd>
<dt>orange</dt>
-<dd>orange fruit
+<dd>
+orange fruit
</dd>
<dt>banana</dt>
-<dd>yellow fruit
+<dd>
+yellow fruit
</dd>
</dl>
<p>Loose:</p>
<dl>
<dt>apple</dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
</dd>
<dt>orange</dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
</dd>
<dt>banana</dt>
-<dd><p>yellow fruit</p>
+<dd>
+<p>yellow fruit</p>
</dd>
</dl>
<p>Multiple blocks with italics:</p>
<dl>
<dt><em>apple</em></dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
<p>contains seeds, crisp, pleasant to taste</p>
</dd>
<dt><em>orange</em></dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
<pre><code>{ orange code block }</code></pre>
<blockquote>
<p>orange block quote</p>
@@ -424,38 +440,49 @@ These should not be escaped: \$ \\ \&gt; \[ \{</code></pre>
<p>Multiple definitions, tight:</p>
<dl>
<dt>apple</dt>
-<dd>red fruit
+<dd>
+red fruit
</dd>
-<dd>computer
+<dd>
+computer
</dd>
<dt>orange</dt>
-<dd>orange fruit
+<dd>
+orange fruit
</dd>
-<dd>bank
+<dd>
+bank
</dd>
</dl>
<p>Multiple definitions, loose:</p>
<dl>
<dt>apple</dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
</dd>
-<dd><p>computer</p>
+<dd>
+<p>computer</p>
</dd>
<dt>orange</dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
</dd>
-<dd><p>bank</p>
+<dd>
+<p>bank</p>
</dd>
</dl>
<p>Blank line after term, indented marker, alternate markers:</p>
<dl>
<dt>apple</dt>
-<dd><p>red fruit</p>
+<dd>
+<p>red fruit</p>
</dd>
-<dd><p>computer</p>
+<dd>
+<p>computer</p>
</dd>
<dt>orange</dt>
-<dd><p>orange fruit</p>
+<dd>
+<p>orange fruit</p>
<ol type="1">
<li>sublist</li>
<li>sublist</li>
@@ -543,18 +570,22 @@ Blah
<p>So is <strong><em>this</em></strong> word.</p>
<p><strong><em>This is strong and em.</em></strong></p>
<p>So is <strong><em>this</em></strong> word.</p>
-<p>This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>, <code>\$</code>, <code>&lt;html&gt;</code>.</p>
+<p>This is code: <code>&gt;</code>, <code>$</code>, <code>\</code>,
+<code>\$</code>, <code>&lt;html&gt;</code>.</p>
<p><del>This is <em>strikeout</em>.</del></p>
-<p>Superscripts: a<sup>bc</sup>d a<sup><em>hello</em></sup> a<sup>hello there</sup>.</p>
+<p>Superscripts: a<sup>bc</sup>d a<sup><em>hello</em></sup>
+a<sup>hello there</sup>.</p>
<p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.</p>
-<p>These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</p>
+<p>These should not be superscripts or subscripts, because of the unescaped
+spaces: a^b c^d, a~b c~d.</p>
<hr />
<h1 id="smart-quotes-ellipses-dashes">Smart quotes, ellipses, dashes</h1>
<p>“Hello,” said the spider. “‘Shelob’ is my name.”</p>
<p>‘A’, ‘B’, and ‘C’ are letters.</p>
<p>‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’</p>
<p>‘He said, “I want to go.”’ Were you alive in the 70’s?</p>
-<p>Here is some quoted ‘<code>code</code>’ and a “<a href="http://example.com/?foo=1&amp;bar=2">quoted link</a>”.</p>
+<p>Here is some quoted ‘<code>code</code>’ and a “<a
+href="http://example.com/?foo=1&amp;bar=2">quoted link</a>”.</p>
<p>Some dashes: one—two — three—four — five.</p>
<p>Dashes between numbers: 5–7, 255–66, 1987–1999.</p>
<p>Ellipses…and…and….</p>
@@ -567,13 +598,16 @@ Blah
<li><span class="math inline"><em>α</em> ∧ <em>ω</em></span></li>
<li><span class="math inline">223</span></li>
<li><span class="math inline"><em>p</em></span>-Tree</li>
-<li>Here’s some display math: <span class="math display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span></li>
-<li>Here’s one that has a line break in it: <span class="math inline"><em>α</em> + <em>ω</em> × <em>x</em><sup>2</sup></span>.</li>
+<li>Here’s some display math: <span class="math
+display">$$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$</span></li>
+<li>Here’s one that has a line break in it: <span class="math
+inline"><em>α</em> + <em>ω</em> × <em>x</em><sup>2</sup></span>.</li>
</ul>
<p>These shouldn’t be math:</p>
<ul>
<li>To get the famous equation, write <code>$e = mc^2$</code>.</li>
-<li>$22,000 is a <em>lot</em> of money. So is $34,000. (It worked if “lot” is emphasized.)</li>
+<li>$22,000 is a <em>lot</em> of money. So is $34,000. (It worked if “lot” is
+emphasized.)</li>
<li>Shoes ($20) and socks ($5).</li>
<li>Escaped <code>$</code>: $73 <em>this should be emphasized</em> 23$.</li>
</ul>
@@ -616,7 +650,8 @@ Blah
<p><a href="/url/" title="title">URL and title</a>.</p>
<p><a href="/url/" title="title preceded by two spaces">URL and title</a>.</p>
<p><a href="/url/" title="title preceded by a tab">URL and title</a>.</p>
-<p><a href="/url/" title="title with &quot;quotes&quot; in it">URL and title</a></p>
+<p><a href="/url/" title="title with &quot;quotes&quot; in it">URL and
+title</a></p>
<p><a href="/url/" title="title with single quotes">URL and title</a></p>
<p><a href="/url/with_underscore">with_underscore</a></p>
<p><a href="mailto:nobody@nowhere.net">Email link</a></p>
@@ -633,51 +668,78 @@ Blah
<p>Foo <a href="/url/" title="Title with &quot;quotes&quot; inside">bar</a>.</p>
<p>Foo <a href="/url/" title="Title with &quot;quote&quot; inside">biz</a>.</p>
<h2 id="with-ampersands">With ampersands</h2>
-<p>Here’s a <a href="http://example.com/?foo=1&amp;bar=2">link with an ampersand in the URL</a>.</p>
-<p>Here’s a link with an amersand in the link text: <a href="http://att.com/" title="AT&amp;T">AT&amp;T</a>.</p>
+<p>Here’s a <a href="http://example.com/?foo=1&amp;bar=2">link with an ampersand
+in the URL</a>.</p>
+<p>Here’s a link with an amersand in the link text: <a href="http://att.com/"
+title="AT&amp;T">AT&amp;T</a>.</p>
<p>Here’s an <a href="/script?foo=1&amp;bar=2">inline link</a>.</p>
-<p>Here’s an <a href="/script?foo=1&amp;bar=2">inline link in pointy braces</a>.</p>
+<p>Here’s an <a href="/script?foo=1&amp;bar=2">inline link in pointy
+braces</a>.</p>
<h2 id="autolinks">Autolinks</h2>
-<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2" class="uri">http://example.com/?foo=1&amp;bar=2</a></p>
+<p>With an ampersand: <a href="http://example.com/?foo=1&amp;bar=2"
+class="uri">http://example.com/?foo=1&amp;bar=2</a></p>
<ul>
<li>In a list?</li>
<li><a href="http://example.com/" class="uri">http://example.com/</a></li>
<li>It should.</li>
</ul>
-<p>An e-mail address: <a href="mailto:nobody@nowhere.net" class="email">nobody@nowhere.net</a></p>
+<p>An e-mail address: <a href="mailto:nobody@nowhere.net"
+class="email">nobody@nowhere.net</a></p>
<blockquote>
-<p>Blockquoted: <a href="http://example.com/" class="uri">http://example.com/</a></p>
+<p>Blockquoted: <a href="http://example.com/"
+class="uri">http://example.com/</a></p>
</blockquote>
-<p>Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code></p>
+<p>Auto-links should not occur here:
+<code>&lt;http://example.com/&gt;</code></p>
<pre><code>or here: &lt;http://example.com/&gt;</code></pre>
<hr />
<h1 id="images">Images</h1>
<p>From “Voyage dans la Lune” by Georges Melies (1902):</p>
<figure>
-<img src="lalune.jpg" title="Voyage dans la Lune" alt="lalune" /><figcaption aria-hidden="true">lalune</figcaption>
+<img src="lalune.jpg" title="Voyage dans la Lune" alt="lalune" />
+<figcaption aria-hidden="true">lalune</figcaption>
</figure>
<p>Here is a movie <img src="movie.jpg" alt="movie" /> icon.</p>
<hr />
<h1 id="footnotes">Footnotes</h1>
-<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a> and another.<a href="#fn2" class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> This should <em>not</em> be a footnote reference, because it contains a space.[^my note] Here is an inline note.<a href="#fn3" class="footnote-ref" id="fnref3" role="doc-noteref"><sup>3</sup></a></p>
+<p>Here is a footnote reference,<a href="#fn1" class="footnote-ref" id="fnref1"
+role="doc-noteref"><sup>1</sup></a> and another.<a href="#fn2"
+class="footnote-ref" id="fnref2" role="doc-noteref"><sup>2</sup></a> This should
+<em>not</em> be a footnote reference, because it contains a space.[^my note]
+Here is an inline note.<a href="#fn3" class="footnote-ref" id="fnref3"
+role="doc-noteref"><sup>3</sup></a></p>
<blockquote>
-<p>Notes can go in quotes.<a href="#fn4" class="footnote-ref" id="fnref4" role="doc-noteref"><sup>4</sup></a></p>
+<p>Notes can go in quotes.<a href="#fn4" class="footnote-ref" id="fnref4"
+role="doc-noteref"><sup>4</sup></a></p>
</blockquote>
<ol type="1">
-<li>And in list items.<a href="#fn5" class="footnote-ref" id="fnref5" role="doc-noteref"><sup>5</sup></a></li>
+<li>And in list items.<a href="#fn5" class="footnote-ref" id="fnref5"
+role="doc-noteref"><sup>5</sup></a></li>
</ol>
<p>This paragraph should not be part of the note, as it is not indented.</p>
-<section class="footnotes" role="doc-endnotes">
+<section class="footnotes footnotes-end-of-document" role="doc-endnotes">
<hr />
<ol>
-<li id="fn1" role="doc-endnote"><p>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn2" role="doc-endnote"><p>Here’s the long note. This one contains multiple blocks.</p>
-<p>Subsequent blocks are indented to show that they belong to the footnote (as with list items).</p>
+<li id="fn1" role="doc-endnote"><p>Here is the footnote. It can go anywhere
+after the footnote reference. It need not be placed at the end of the
+document.<a href="#fnref1" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
+<li id="fn2" role="doc-endnote"><p>Here’s the long note. This one contains
+multiple blocks.</p>
+<p>Subsequent blocks are indented to show that they belong to the footnote (as
+with list items).</p>
<pre><code> { &lt;code&gt; }</code></pre>
-<p>If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.<a href="#fnref2" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn3" role="doc-endnote"><p>This is <em>easier</em> to type. Inline notes may contain <a href="http://google.com">links</a> and <code>]</code> verbatim characters, as well as [bracketed text].<a href="#fnref3" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn4" role="doc-endnote"><p>In quote.<a href="#fnref4" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
-<li id="fn5" role="doc-endnote"><p>In list.<a href="#fnref5" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
+<p>If you want, you can indent every line, but you can also be lazy and just
+indent the first line of each block.<a href="#fnref2" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
+<li id="fn3" role="doc-endnote"><p>This is <em>easier</em> to type. Inline notes
+may contain <a href="http://google.com">links</a> and <code>]</code> verbatim
+characters, as well as [bracketed text].<a href="#fnref3" class="footnote-back"
+role="doc-backlink">↩︎</a></p></li>
+<li id="fn4" role="doc-endnote"><p>In quote.<a href="#fnref4"
+class="footnote-back" role="doc-backlink">↩︎</a></p></li>
+<li id="fn5" role="doc-endnote"><p>In list.<a href="#fnref5"
+class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
</body>
diff --git a/test/writer.jats_archiving b/test/writer.jats_archiving
index 70e15b6b8..cc9cdb323 100644
--- a/test/writer.jats_archiving
+++ b/test/writer.jats_archiving
@@ -68,9 +68,9 @@ Gruber’s markdown test suite.</p>
<sec id="paragraphs">
<title>Paragraphs</title>
<p>Here’s a regular paragraph.</p>
- <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
- item. Because a hard-wrapped line in the middle of a paragraph looked like a
- list item.</p>
+ <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
+ Because a hard-wrapped line in the middle of a paragraph looked like a list
+ item.</p>
<p>Here’s one with a bullet. * criminey.</p>
<p>There should be a hard line break
here.</p>
@@ -634,8 +634,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<p><strike>This is <italic>strikeout</italic>.</strike></p>
<p>Superscripts: a<sup>bc</sup>d a<sup><italic>hello</italic></sup>
a<sup>hello there</sup>.</p>
- <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O,
- H<sub>many of them</sub>O.</p>
+ <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.</p>
<p>These should not be superscripts or subscripts, because of the unescaped
spaces: a^b c^d, a~b c~d.</p>
</sec>
@@ -689,8 +688,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<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:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><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:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></alternatives></disp-formula></p>
</list-item>
<list-item>
- <p>Here’s one that has a line break in it:
- <inline-formula><alternatives>
+ <p>Here’s one that has a line break in it: <inline-formula><alternatives>
<tex-math><![CDATA[\alpha + \omega \times x^2]]></tex-math>
<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>
</list-item>
@@ -780,8 +778,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
</sec>
<sec id="reference">
<title>Reference</title>
- <p>Foo
- <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
+ <p>Foo <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
<p>With <ext-link ext-link-type="uri" xlink:href="/url/">embedded
[brackets]</ext-link>.</p>
<p><ext-link ext-link-type="uri" xlink:href="/url/">b</ext-link> by itself
@@ -853,9 +850,8 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<title>Footnotes</title>
<p>Here is a footnote reference,<xref ref-type="fn" rid="fn1">1</xref> and
another.<xref ref-type="fn" rid="fn2">2</xref> This should
- <italic>not</italic> be a footnote reference, because it contains a
- space.[^my note] Here is an inline
- note.<xref ref-type="fn" rid="fn3">3</xref></p>
+ <italic>not</italic> be a footnote reference, because it contains a space.[^my
+ note] Here is an inline note.<xref ref-type="fn" rid="fn3">3</xref></p>
<disp-quote>
<p>Notes can go in quotes.<xref ref-type="fn" rid="fn4">4</xref></p>
</disp-quote>
@@ -881,12 +877,12 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<p specific-use="wrapper">
<preformat> { &lt;code&gt; }</preformat>
</p>
- <p>If you want, you can indent every line, but you can also be lazy and
- just indent the first line of each block.</p>
+ <p>If you want, you can indent every line, but you can also be lazy and just
+ indent the first line of each block.</p>
</fn>
<fn id="fn3">
- <label>3</label><p>This is <italic>easier</italic> to type. Inline notes
- may contain
+ <label>3</label><p>This is <italic>easier</italic> to type. Inline notes may
+ contain
<ext-link ext-link-type="uri" xlink:href="http://google.com">links</ext-link>
and <monospace>]</monospace> verbatim characters, as well as [bracketed
text].</p>
diff --git a/test/writer.jats_articleauthoring b/test/writer.jats_articleauthoring
index 59485a114..c2bddccb6 100644
--- a/test/writer.jats_articleauthoring
+++ b/test/writer.jats_articleauthoring
@@ -57,9 +57,9 @@ Gruber’s markdown test suite.</p>
<sec id="paragraphs">
<title>Paragraphs</title>
<p>Here’s a regular paragraph.</p>
- <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
- item. Because a hard-wrapped line in the middle of a paragraph looked like a
- list item.</p>
+ <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
+ Because a hard-wrapped line in the middle of a paragraph looked like a list
+ item.</p>
<p>Here’s one with a bullet. * criminey.</p>
<p>There should be a hard line break
here.</p>
@@ -631,8 +631,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<p><strike>This is <italic>strikeout</italic>.</strike></p>
<p>Superscripts: a<sup>bc</sup>d a<sup><italic>hello</italic></sup>
a<sup>hello there</sup>.</p>
- <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O,
- H<sub>many of them</sub>O.</p>
+ <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.</p>
<p>These should not be superscripts or subscripts, because of the unescaped
spaces: a^b c^d, a~b c~d.</p>
</sec>
@@ -764,8 +763,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
</sec>
<sec id="reference">
<title>Reference</title>
- <p>Foo
- <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
+ <p>Foo <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
<p>With <ext-link ext-link-type="uri" xlink:href="/url/">embedded
[brackets]</ext-link>.</p>
<p><ext-link ext-link-type="uri" xlink:href="/url/">b</ext-link> by itself
@@ -836,8 +834,8 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<sec id="footnotes">
<title>Footnotes</title>
<p>Here is a footnote reference,<fn>
- <p>Here is the footnote. It can go anywhere after the footnote reference.
- It need not be placed at the end of the document.</p>
+ <p>Here is the footnote. It can go anywhere after the footnote reference. It
+ need not be placed at the end of the document.</p>
</fn> and another.<fn>
<p>Here’s the long note. This one contains multiple blocks.</p>
<p>Subsequent blocks are indented to show that they belong to the footnote
@@ -845,8 +843,8 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<p specific-use="wrapper">
<preformat> { &lt;code&gt; }</preformat>
</p>
- <p>If you want, you can indent every line, but you can also be lazy and
- just indent the first line of each block.</p>
+ <p>If you want, you can indent every line, but you can also be lazy and just
+ indent the first line of each block.</p>
</fn> This should <italic>not</italic> be a footnote reference, because it
contains a space.[^my note] Here is an inline note.<fn>
<p>This is <italic>easier</italic> to type. Inline notes may contain
diff --git a/test/writer.jats_publishing b/test/writer.jats_publishing
index e6db4172a..3d4f8ddb3 100644
--- a/test/writer.jats_publishing
+++ b/test/writer.jats_publishing
@@ -68,9 +68,9 @@ Gruber’s markdown test suite.</p>
<sec id="paragraphs">
<title>Paragraphs</title>
<p>Here’s a regular paragraph.</p>
- <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
- item. Because a hard-wrapped line in the middle of a paragraph looked like a
- list item.</p>
+ <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
+ Because a hard-wrapped line in the middle of a paragraph looked like a list
+ item.</p>
<p>Here’s one with a bullet. * criminey.</p>
<p>There should be a hard line break
here.</p>
@@ -634,8 +634,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<p><strike>This is <italic>strikeout</italic>.</strike></p>
<p>Superscripts: a<sup>bc</sup>d a<sup><italic>hello</italic></sup>
a<sup>hello there</sup>.</p>
- <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O,
- H<sub>many of them</sub>O.</p>
+ <p>Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.</p>
<p>These should not be superscripts or subscripts, because of the unescaped
spaces: a^b c^d, a~b c~d.</p>
</sec>
@@ -689,8 +688,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<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:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><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:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow><mml:mo>−</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo stretchy="true" form="prefix">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="true" form="postfix">)</mml:mo></mml:mrow></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mrow></mml:math></alternatives></disp-formula></p>
</list-item>
<list-item>
- <p>Here’s one that has a line break in it:
- <inline-formula><alternatives>
+ <p>Here’s one that has a line break in it: <inline-formula><alternatives>
<tex-math><![CDATA[\alpha + \omega \times x^2]]></tex-math>
<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>
</list-item>
@@ -780,8 +778,7 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
</sec>
<sec id="reference">
<title>Reference</title>
- <p>Foo
- <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
+ <p>Foo <ext-link ext-link-type="uri" xlink:href="/url/">bar</ext-link>.</p>
<p>With <ext-link ext-link-type="uri" xlink:href="/url/">embedded
[brackets]</ext-link>.</p>
<p><ext-link ext-link-type="uri" xlink:href="/url/">b</ext-link> by itself
@@ -853,9 +850,8 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<title>Footnotes</title>
<p>Here is a footnote reference,<xref ref-type="fn" rid="fn1">1</xref> and
another.<xref ref-type="fn" rid="fn2">2</xref> This should
- <italic>not</italic> be a footnote reference, because it contains a
- space.[^my note] Here is an inline
- note.<xref ref-type="fn" rid="fn3">3</xref></p>
+ <italic>not</italic> be a footnote reference, because it contains a space.[^my
+ note] Here is an inline note.<xref ref-type="fn" rid="fn3">3</xref></p>
<disp-quote>
<p>Notes can go in quotes.<xref ref-type="fn" rid="fn4">4</xref></p>
</disp-quote>
@@ -881,12 +877,12 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<p specific-use="wrapper">
<preformat> { &lt;code&gt; }</preformat>
</p>
- <p>If you want, you can indent every line, but you can also be lazy and
- just indent the first line of each block.</p>
+ <p>If you want, you can indent every line, but you can also be lazy and just
+ indent the first line of each block.</p>
</fn>
<fn id="fn3">
- <label>3</label><p>This is <italic>easier</italic> to type. Inline notes
- may contain
+ <label>3</label><p>This is <italic>easier</italic> to type. Inline notes may
+ contain
<ext-link ext-link-type="uri" xlink:href="http://google.com">links</ext-link>
and <monospace>]</monospace> verbatim characters, as well as [bracketed
text].</p>
diff --git a/test/writer.latex b/test/writer.latex
index abf772df4..a89078b31 100644
--- a/test/writer.latex
+++ b/test/writer.latex
@@ -711,8 +711,8 @@ a\textsuperscript{hello~there}.
Subscripts: H\textsubscript{2}O, H\textsubscript{23}O,
H\textsubscript{many~of~them}O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a\^{}b c\^{}d, a\textasciitilde b c\textasciitilde d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a\^{}b c\^{}d, a\textasciitilde b c\textasciitilde d.
\begin{center}\rule{0.5\linewidth}{0.5pt}\end{center}
@@ -905,8 +905,7 @@ Foo \href{/url/}{biz}.
Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the
URL}.
-Here's a link with an amersand in the link text:
-\href{http://att.com/}{AT\&T}.
+Here's a link with an amersand in the link text: \href{http://att.com/}{AT\&T}.
Here's an \href{/script?foo=1\&bar=2}{inline link}.
@@ -961,9 +960,9 @@ Here is a movie \includegraphics{movie.jpg} icon.
\hypertarget{footnotes}{%
\section{Footnotes}\label{footnotes}}
-Here is a footnote reference,\footnote{Here is the footnote. It can go
- anywhere after the footnote reference. It need not be placed at the end of
- the document.} and another.\footnote{Here's the long note. This one contains
+Here is a footnote reference,\footnote{Here is the footnote. It can go anywhere
+ after the footnote reference. It need not be placed at the end of the
+ document.} and another.\footnote{Here's the long note. This one contains
multiple blocks.
Subsequent blocks are indented to show that they belong to the footnote (as
@@ -977,8 +976,8 @@ Here is a footnote reference,\footnote{Here is the footnote. It can go
indent the first line of each block.} This should \emph{not} be a footnote
reference, because it contains a space.{[}\^{}my note{]} Here is an inline
note.\footnote{This is \emph{easier} to type. Inline notes may contain
- \href{http://google.com}{links} and \texttt{{]}} verbatim characters, as
- well as {[}bracketed text{]}.}
+ \href{http://google.com}{links} and \texttt{{]}} verbatim characters, as well
+ as {[}bracketed text{]}.}
\begin{quote}
Notes can go in quotes.\footnote{In quote.}
diff --git a/test/writer.man b/test/writer.man
index d3f1dfe14..d1d3cfd33 100644
--- a/test/writer.man
+++ b/test/writer.man
@@ -496,8 +496,8 @@ Superscripts: a^bc^d a^\f[I]hello\f[R]^ a^hello\ there^.
.PP
Subscripts: H~2~O, H~23~O, H~many\ of\ them~O.
.PP
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a\[ha]b c\[ha]d, a\[ti]b c\[ti]d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a\[ha]b c\[ha]d, a\[ti]b c\[ti]d.
.PP
* * * * *
.SH Smart quotes, ellipses, dashes
@@ -706,9 +706,9 @@ Here is a movie [IMAGE: movie] icon.
* * * * *
.SH Footnotes
.PP
-Here is a footnote reference,[1] and another.[2] This should \f[I]not\f[R] be
-a footnote reference, because it contains a space.[\[ha]my note] Here is an
-inline note.[3]
+Here is a footnote reference,[1] and another.[2] This should \f[I]not\f[R] be a
+footnote reference, because it contains a space.[\[ha]my note] Here is an inline
+note.[3]
.RS
.PP
Notes can go in quotes.[4]
@@ -728,8 +728,8 @@ It need not be placed at the end of the document.
Here\[cq]s the long note.
This one contains multiple blocks.
.PP
-Subsequent blocks are indented to show that they belong to the footnote (as
-with list items).
+Subsequent blocks are indented to show that they belong to the footnote (as with
+list items).
.IP
.nf
\f[C]
@@ -737,8 +737,8 @@ with list items).
\f[R]
.fi
.PP
-If you want, you can indent every line, but you can also be lazy and just
-indent the first line of each block.
+If you want, you can indent every line, but you can also be lazy and just indent
+the first line of each block.
.SS [3]
.PP
This is \f[I]easier\f[R] to type.
diff --git a/test/writer.markdown b/test/writer.markdown
index 6a149882c..375e1b864 100644
--- a/test/writer.markdown
+++ b/test/writer.markdown
@@ -9,7 +9,7 @@ title: Pandoc Test Suite
This is a set of tests for pandoc. Most of them are adapted from John Gruber's
markdown test suite.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Headers
@@ -33,7 +33,7 @@ with no blank line
with no blank line
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Paragraphs
@@ -48,7 +48,7 @@ Here's one with a bullet. \* criminey.
There should be a hard line break\
here.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Block Quotes
@@ -77,7 +77,7 @@ This should not be a block quote: 2 \> 1.
And a following paragraph.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Code Blocks
@@ -97,7 +97,7 @@ And:
These should not be escaped: \$ \\ \> \[ \{
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Lists
@@ -254,7 +254,7 @@ M.A. 2007
B. Williams
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Definition Lists
@@ -507,7 +507,7 @@ Hr's:
<hr class="foo" id="bar">
```
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Inline Markup
@@ -533,10 +533,10 @@ Superscripts: a^bc^d a^*hello*^ a^hello there^.
Subscripts: H~2~O, H~23~O, H~many of them~O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a\^b c\^d, a\~b c\~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a\^b c\^d, a\~b c\~d.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Smart quotes, ellipses, dashes
@@ -557,7 +557,7 @@ Dashes between numbers: 5--7, 255--66, 1987--1999.
Ellipses...and...and....
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# LaTeX
@@ -589,7 +589,7 @@ Cat & 1 \\ \hline
\end{tabular}
```
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Special Characters
@@ -643,7 +643,7 @@ Plus: +
Minus: -
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Links
@@ -693,8 +693,7 @@ Foo [biz](/url/ "Title with "quote" inside").
Here's a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2).
-Here's a link with an amersand in the link text:
-[AT&T](http://att.com/ "AT&T").
+Here's a link with an amersand in the link text: [AT&T](http://att.com/ "AT&T").
Here's an [inline link](/script?foo=1&bar=2).
@@ -716,7 +715,7 @@ Auto-links should not occur here: `<http://example.com/>`
or here: <http://example.com/>
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Images
@@ -726,13 +725,13 @@ From "Voyage dans la Lune" by Georges Melies (1902):
Here is a movie ![movie](movie.jpg) icon.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
# Footnotes
Here is a footnote reference,[^1] and another.[^2] This should *not* be a
-footnote reference, because it contains a space.\[\^my note\] Here is an
-inline note.[^3]
+footnote reference, because it contains a space.\[\^my note\] Here is an inline
+note.[^3]
> Notes can go in quotes.[^4]
@@ -740,13 +739,13 @@ inline note.[^3]
This paragraph should not be part of the note, as it is not indented.
-[^1]: Here is the footnote. It can go anywhere after the footnote reference.
- It need not be placed at the end of the document.
+[^1]: Here is the footnote. It can go anywhere after the footnote reference. It
+ need not be placed at the end of the document.
[^2]: Here's the long note. This one contains multiple blocks.
- Subsequent blocks are indented to show that they belong to the footnote
- (as with list items).
+ Subsequent blocks are indented to show that they belong to the footnote (as
+ with list items).
{ <code> }
diff --git a/test/writer.markua b/test/writer.markua
new file mode 100644
index 000000000..1c5b44cc2
--- /dev/null
+++ b/test/writer.markua
@@ -0,0 +1,700 @@
+This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
+markdown test suite.
+
+* * *
+
+{id: headers}
+# Headers
+
+{id: level-2-with-an-embedded-link}
+## Level 2 with an [embedded link](/url)
+
+{id: level-3-with-emphasis}
+### Level 3 with *emphasis*
+
+{id: level-4}
+#### Level 4
+
+{id: level-5}
+##### Level 5
+
+{id: level-1}
+# Level 1
+
+{id: level-2-with-emphasis}
+## Level 2 with *emphasis*
+
+{id: level-3}
+### Level 3
+
+with no blank line
+
+{id: level-2}
+## Level 2
+
+with no blank line
+
+* * *
+
+{id: paragraphs}
+# Paragraphs
+
+Here’s a regular paragraph.
+
+In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
+Because a hard-wrapped line in the middle of a paragraph looked like a list
+item.
+
+Here’s one with a bullet. * criminey.
+
+There should be a hard line break
+here.
+
+* * *
+
+{id: block-quotes}
+# Block Quotes
+
+E-mail style:
+
+> This is a block quote. It is pretty short.
+
+> Code in a block quote:
+>
+> ```
+> sub status {
+> print "working";
+> }
+> ```
+>
+> A list:
+>
+> 1. item one
+> 2. item two
+>
+> Nested block quotes:
+>
+> > nested
+>
+> > nested
+
+This should not be a block quote: 2 > 1.
+
+And a following paragraph.
+
+* * *
+
+{id: code-blocks}
+# Code Blocks
+
+Code:
+
+```
+---- (should be four hyphens)
+
+sub status {
+ print "working";
+}
+
+this code block is indented by one tab
+```
+
+And:
+
+```
+ this code block is indented by two tabs
+
+These should not be escaped: \$ \\ \> \[ \{
+```
+
+* * *
+
+{id: lists}
+# Lists
+
+{id: unordered}
+## Unordered
+
+Asterisks tight:
+
+* asterisk 1
+* asterisk 2
+* asterisk 3
+
+Asterisks loose:
+
+* asterisk 1
+
+* asterisk 2
+
+* asterisk 3
+
+Pluses tight:
+
+* Plus 1
+* Plus 2
+* Plus 3
+
+Pluses loose:
+
+* Plus 1
+
+* Plus 2
+
+* Plus 3
+
+Minuses tight:
+
+* Minus 1
+* Minus 2
+* Minus 3
+
+Minuses loose:
+
+* Minus 1
+
+* Minus 2
+
+* Minus 3
+
+{id: ordered}
+## Ordered
+
+Tight:
+
+1. First
+2. Second
+3. Third
+
+and:
+
+1. One
+2. Two
+3. Three
+
+Loose using tabs:
+
+1. First
+
+2. Second
+
+3. Third
+
+and using spaces:
+
+1. One
+
+2. Two
+
+3. Three
+
+Multiple paragraphs:
+
+1. Item 1, graf one.
+
+ Item 1. graf two. The quick brown fox jumped over the lazy dog’s back.
+
+2. Item 2.
+
+3. Item 3.
+
+{id: nested}
+## Nested
+
+* Tab
+ * Tab
+ * Tab
+
+Here’s another:
+
+1. First
+2. Second:
+ * Fee
+ * Fie
+ * Foe
+3. Third
+
+Same thing but with paragraphs:
+
+1. First
+
+2. Second:
+
+ * Fee
+ * Fie
+ * Foe
+
+3. Third
+
+{id: tabs-and-spaces}
+## Tabs and spaces
+
+* this is a list item indented with tabs
+
+* this is a list item indented with spaces
+
+ * this is an example list item indented with tabs
+
+ * this is an example list item indented with spaces
+
+{id: fancy-list-markers}
+## Fancy list markers
+
+2) begins with 2
+
+3) and now 3
+
+ with a continuation
+
+ iv. sublist with roman numerals, starting with 4
+ v. more items
+ A) a subsublist
+ B) a subsublist
+
+Nesting:
+
+A. Upper Alpha
+ I. Upper Roman.
+ 6) Decimal start with 6
+ c) Lower alpha with paren
+
+Autonumbering:
+
+1. Autonumber.
+2. More.
+ 1. Nested.
+
+Should not be a list item:
+
+M.A. 2007
+
+B. Williams
+
+* * *
+
+{id: definition-lists}
+# Definition Lists
+
+Tight using spaces:
+
+apple
+: red fruit
+
+orange
+: orange fruit
+
+banana
+: yellow fruit
+
+Tight using tabs:
+
+apple
+: red fruit
+
+orange
+: orange fruit
+
+banana
+: yellow fruit
+
+Loose:
+
+apple
+
+: red fruit
+
+orange
+
+: orange fruit
+
+banana
+
+: yellow fruit
+
+Multiple blocks with italics:
+
+*apple*
+
+: red fruit
+
+ contains seeds, crisp, pleasant to taste
+
+*orange*
+
+: orange fruit
+
+ ```
+ { orange code block }
+ ```
+
+ > orange block quote
+
+Multiple definitions, tight:
+
+apple
+: red fruit
+: computer
+
+orange
+: orange fruit
+: bank
+
+Multiple definitions, loose:
+
+apple
+
+: red fruit
+
+: computer
+
+orange
+
+: orange fruit
+
+: bank
+
+Blank line after term, indented marker, alternate markers:
+
+apple
+
+: red fruit
+
+: computer
+
+orange
+
+: orange fruit
+
+ 1. sublist
+ 2. sublist
+
+{id: html-blocks}
+# HTML Blocks
+
+Simple block on one line:
+
+foo
+
+And nested without indentation:
+
+foo
+
+bar
+
+Interpreted markdown in a table:
+
+This is *emphasized*
+And this is **strong**
+Here’s a simple block:
+
+foo
+
+This should be a code block, though:
+
+```
+<div>
+ foo
+</div>
+```
+
+As should this:
+
+```
+<div>foo</div>
+```
+
+Now, nested:
+
+foo
+
+This should just be an HTML comment:
+
+Multiline:
+
+Code block:
+
+```
+<!-- Comment -->
+```
+
+Just plain comment, with trailing spaces on the line:
+
+Code:
+
+```
+<hr />
+```
+
+Hr’s:
+
+* * *
+
+{id: inline-markup}
+# Inline Markup
+
+This is *emphasized*, and so *is this*.
+
+This is **strong**, and so **is this**.
+
+An *[emphasized link](/url)*.
+
+***This is strong and em.***
+
+So is ***this*** word.
+
+***This is strong and em.***
+
+So is ***this*** word.
+
+This is code: `>`, `$`, `\`, `\$`, `<html>`.
+
+~~This is *strikeout*.~~
+
+Superscripts: a^bc^d a^*hello*^ a^hello there^.
+
+Subscripts: H~2~O, H~23~O, H~many of them~O.
+
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
+
+* * *
+
+{id: smart-quotes-ellipses-dashes}
+# Smart quotes, ellipses, dashes
+
+"Hello," said the spider. "'Shelob' is my name."
+
+'A', 'B', and 'C' are letters.
+
+'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
+
+'He said, "I want to go."' Were you alive in the 70’s?
+
+Here is some quoted '`code`' and a "[quoted
+link](http://example.com/?foo=1&bar=2)".
+
+Some dashes: one—two — three—four — five.
+
+Dashes between numbers: 5–7, 255–66, 1987–1999.
+
+Ellipses…and…and….
+
+* * *
+
+{id: latex}
+# LaTeX
+
+*
+* `2+2=4`$
+* `x \in y`$
+* `\alpha \wedge \omega`$
+* `223`$
+* `p`$-Tree
+* Here’s some display math:
+
+ {format: latex}
+ ```
+ \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
+ ```
+* Here’s one that has a line break in it: `\alpha + \omega \times x^2`$.
+
+These shouldn’t be math:
+
+* To get the famous equation, write `$e = mc^2$`.
+* $22,000 is a *lot* of money. So is $34,000. (It worked if "lot" is
+ emphasized.)
+* Shoes ($20) and socks ($5).
+* Escaped `$`: $73 *this should be emphasized* 23$.
+
+Here’s a LaTeX table:
+
+* * *
+
+{id: special-characters}
+# Special Characters
+
+Here is some unicode:
+
+* I hat: Î
+* o umlaut: ö
+* section: §
+* set membership: ∈
+* copyright: ©
+
+AT&T has an ampersand in their name.
+
+AT&T is another way to write it.
+
+This & that.
+
+4 < 5.
+
+6 > 5.
+
+Backslash: \
+
+Backtick: `
+
+Asterisk: *
+
+Underscore: _
+
+Left brace: {
+
+Right brace: }
+
+Left bracket: [
+
+Right bracket: ]
+
+Left paren: (
+
+Right paren: )
+
+Greater-than: >
+
+Hash: #
+
+Period: .
+
+Bang: !
+
+Plus: +
+
+Minus: -
+
+* * *
+
+{id: links}
+# Links
+
+{id: explicit}
+## Explicit
+
+Just a [URL](/url/).
+
+[URL and title](/url/){title: "title"}.
+
+[URL and title](/url/){title: "title preceded by two spaces"}.
+
+[URL and title](/url/){title: "title preceded by a tab"}.
+
+[URL and title](/url/){title: "title with "quotes" in it"}
+
+[URL and title](/url/){title: "title with single quotes"}
+
+[with_underscore](/url/with_underscore)
+
+[Email link](mailto:nobody@nowhere.net)
+
+[Empty]().
+
+{id: reference}
+## Reference
+
+Foo [bar](/url/).
+
+With [embedded [brackets]](/url/).
+
+[b](/url/) by itself should be a link.
+
+Indented [once](/url).
+
+Indented [twice](/url).
+
+Indented [thrice](/url).
+
+This should [not][] be a link.
+
+```
+[not]: /url
+```
+
+Foo [bar](/url/){title: "Title with "quotes" inside"}.
+
+Foo [biz](/url/){title: "Title with "quote" inside"}.
+
+{id: with-ampersands}
+## With ampersands
+
+Here’s a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2).
+
+Here’s a link with an amersand in the link text:
+[AT&T](http://att.com/){title: "AT&T"}.
+
+Here’s an [inline link](/script?foo=1&bar=2).
+
+Here’s an [inline link in pointy braces](/script?foo=1&bar=2).
+
+{id: autolinks}
+## Autolinks
+
+With an ampersand:
+[http:~/~/example.com/?foo=1&bar=2](http://example.com/?foo=1&bar=2){class: uri}
+
+* In a list?
+* [http:~/~/example.com/](http://example.com/){class: uri}
+* It should.
+
+An e-mail address: [nobody@nowhere.net](mailto:nobody@nowhere.net){class: email}
+
+> Blockquoted: [http:~/~/example.com/](http://example.com/){class: uri}
+
+Auto-links should not occur here: `<http://example.com/>`
+
+```
+or here: <http://example.com/>
+```
+
+* * *
+
+{id: images}
+# Images
+
+From "Voyage dans la Lune" by Georges Melies (1902):
+
+{alt: "lalune", title: "Voyage dans la Lune"}
+![](lalune.jpg)
+
+Here is a movie
+{alt: "movie"}
+![](movie.jpg)
+icon.
+
+* * *
+
+{id: footnotes}
+# Footnotes
+
+Here is a footnote reference,[^1] and another.[^2] This should *not* be a
+footnote reference, because it contains a space.[^my note] Here is an inline
+note.[^3]
+
+> Notes can go in quotes.[^4]
+
+1. And in list items.[^5]
+
+This paragraph should not be part of the note, as it is not indented.
+
+[^1]: Here is the footnote. It can go anywhere after the footnote reference. It
+ need not be placed at the end of the document.
+
+[^2]: Here’s the long note. This one contains multiple blocks.
+
+ Subsequent blocks are indented to show that they belong to the footnote (as
+ with list items).
+
+ ```
+ { <code> }
+ ```
+
+ If you want, you can indent every line, but you can also be lazy and just
+ indent the first line of each block.
+
+[^3]: This is *easier* to type. Inline notes may contain
+ [links](http://google.com) and `]` verbatim characters, as well as
+ [bracketed text].
+
+[^4]: In quote.
+
+[^5]: In list.
diff --git a/test/writer.mediawiki b/test/writer.mediawiki
index 79cc1b4e1..23cb78e60 100644
--- a/test/writer.mediawiki
+++ b/test/writer.mediawiki
@@ -3,24 +3,33 @@ This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
-----
+<span id="headers"></span>
= Headers =
+<span id="level-2-with-an-embedded-link"></span>
== Level 2 with an [[url|embedded link]] ==
+<span id="level-3-with-emphasis"></span>
=== Level 3 with ''emphasis'' ===
+<span id="level-4"></span>
==== Level 4 ====
+<span id="level-5"></span>
===== Level 5 =====
+<span id="level-1"></span>
= Level 1 =
+<span id="level-2-with-emphasis"></span>
== Level 2 with ''emphasis'' ==
+<span id="level-3"></span>
=== Level 3 ===
with no blank line
+<span id="level-2"></span>
== Level 2 ==
with no blank line
@@ -28,6 +37,7 @@ with no blank line
-----
+<span id="paragraphs"></span>
= Paragraphs =
Here’s a regular paragraph.
@@ -42,6 +52,7 @@ here.
-----
+<span id="block-quotes"></span>
= Block Quotes =
E-mail style:
@@ -71,6 +82,7 @@ And a following paragraph.
-----
+<span id="code-blocks"></span>
= Code Blocks =
Code:
@@ -90,8 +102,10 @@ These should not be escaped: \$ \\ \&gt; \[ \{</pre>
-----
+<span id="lists"></span>
= Lists =
+<span id="unordered"></span>
== Unordered ==
Asterisks tight:
@@ -130,6 +144,7 @@ Minuses loose:
* Minus 2
* Minus 3
+<span id="ordered"></span>
== Ordered ==
Tight:
@@ -164,6 +179,7 @@ Multiple paragraphs:
<li><p>Item 2.</p></li>
<li><p>Item 3.</p></li></ol>
+<span id="nested"></span>
== Nested ==
* Tab
@@ -188,6 +204,7 @@ Same thing but with paragraphs:
#* Foe
# Third
+<span id="tabs-and-spaces"></span>
== Tabs and spaces ==
* this is a list item indented with tabs
@@ -195,6 +212,7 @@ Same thing but with paragraphs:
** this is an example list item indented with tabs
** this is an example list item indented with spaces
+<span id="fancy-list-markers"></span>
== Fancy list markers ==
<ol start="2" style="list-style-type: decimal;">
@@ -239,6 +257,7 @@ B. Williams
-----
+<span id="definition-lists"></span>
= Definition Lists =
Tight using spaces:
@@ -307,6 +326,7 @@ Blank line after term, indented marker, alternate markers:
;# sublist
;# sublist
+<span id="html-blocks"></span>
= HTML Blocks =
Simple block on one line:
@@ -416,6 +436,7 @@ Hr’s:
-----
+<span id="inline-markup"></span>
= Inline Markup =
This is ''emphasized'', and so ''is this''.
@@ -445,6 +466,7 @@ These should not be superscripts or subscripts, because of the unescaped spaces:
-----
+<span id="smart-quotes-ellipses-dashes"></span>
= Smart quotes, ellipses, dashes =
“Hello,” said the spider. “‘Shelob’ is my name.”
@@ -466,6 +488,7 @@ Ellipses…and…and….
-----
+<span id="latex"></span>
= LaTeX =
*
@@ -490,6 +513,7 @@ Here’s a LaTeX table:
-----
+<span id="special-characters"></span>
= Special Characters =
Here is some unicode:
@@ -545,8 +569,10 @@ Minus: -
-----
+<span id="links"></span>
= Links =
+<span id="explicit"></span>
== Explicit ==
Just a [[url/|URL]].
@@ -567,6 +593,7 @@ Just a [[url/|URL]].
[[|Empty]].
+<span id="reference"></span>
== Reference ==
Foo [[url/|bar]].
@@ -588,6 +615,7 @@ Foo [[url/|bar]].
Foo [[url/|biz]].
+<span id="with-ampersands"></span>
== With ampersands ==
Here’s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL].
@@ -598,6 +626,7 @@ Here’s an [[script?foo=1&bar=2|inline link]].
Here’s an [[script?foo=1&bar=2|inline link in pointy braces]].
+<span id="autolinks"></span>
== Autolinks ==
With an ampersand: http://example.com/?foo=1&bar=2
@@ -616,6 +645,7 @@ Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
-----
+<span id="images"></span>
= Images =
From “Voyage dans la Lune” by Georges Melies (1902):
@@ -627,6 +657,7 @@ Here is a movie [[File:movie.jpg|movie]] icon.
-----
+<span id="footnotes"></span>
= Footnotes =
Here is a footnote reference,<ref>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.</ref> and another.<ref>Here’s the long note. This one contains multiple blocks.
diff --git a/test/writer.ms b/test/writer.ms
index 329c959fc..fc2e66a34 100644
--- a/test/writer.ms
+++ b/test/writer.ms
@@ -653,8 +653,8 @@ Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[R]\*} a\*{hello\ there\*}.
.PP
Subscripts: H\*<2\*>O, H\*<23\*>O, H\*<many\ of\ them\*>O.
.PP
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a\[ha]b c\[ha]d, a\[ti]b c\[ti]d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a\[ha]b c\[ha]d, a\[ti]b c\[ti]d.
.HLINE
.SH 1
Smart quotes, ellipses, dashes
@@ -973,8 +973,8 @@ and another.\**
Here\[cq]s the long note.
This one contains multiple blocks.
.PP
-Subsequent blocks are indented to show that they belong to the footnote (as
-with list items).
+Subsequent blocks are indented to show that they belong to the footnote (as with
+list items).
.IP
.nf
\f[C]
@@ -982,8 +982,8 @@ with list items).
\f[]
.fi
.LP
-If you want, you can indent every line, but you can also be lazy and just
-indent the first line of each block.
+If you want, you can indent every line, but you can also be lazy and just indent
+the first line of each block.
.FE
This should \f[I]not\f[R] be a footnote reference, because it contains a
space.[\[ha]my note] Here is an inline note.\**
diff --git a/test/writer.muse b/test/writer.muse
index d9efdddd5..2c96f6bf2 100644
--- a/test/writer.muse
+++ b/test/writer.muse
@@ -483,8 +483,8 @@ Superscripts: a<sup>bc</sup>d a<sup>*hello*</sup> a<sup>hello there</sup>.
Subscripts: H<sub>2</sub>O, H<sub>23</sub>O, H<sub>many of them</sub>O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
----
@@ -643,8 +643,7 @@ Foo [[/url/][biz]].
** With ampersands
-Here’s a [[http://example.com/?foo=1&bar=2][link with an ampersand in the
-URL]].
+Here’s a [[http://example.com/?foo=1&bar=2][link with an ampersand in the URL]].
Here’s a link with an amersand in the link text: [[http://att.com/][AT&T]].
@@ -686,9 +685,8 @@ Here is a movie [[movie.jpg][movie]] icon.
* Footnotes
-Here is a footnote reference,[1] and another.[2] This should *not* be a
-footnote reference, because it contains a space.[^my note] Here is an inline
-note.[3]
+Here is a footnote reference,[1] and another.[2] This should *not* be a footnote
+reference, because it contains a space.[^my note] Here is an inline note.[3]
<quote>
Notes can go in quotes.[4]
@@ -703,8 +701,8 @@ This paragraph should not be part of the note, as it is not indented.
[2] Here’s the long note. This one contains multiple blocks.
- Subsequent blocks are indented to show that they belong to the footnote
- (as with list items).
+ Subsequent blocks are indented to show that they belong to the footnote (as
+ with list items).
<example>
{ <code> }
diff --git a/test/writer.native b/test/writer.native
index f9132c797..15971bfff 100644
--- a/test/writer.native
+++ b/test/writer.native
@@ -1,409 +1,2166 @@
-Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]})
-[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."]
-,HorizontalRule
-,Header 1 ("headers",[],[]) [Str "Headers"]
-,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")]
-,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"]
-,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"]
-,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"]
-,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]]
-,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"]
-,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"]
-,HorizontalRule
-,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."]
-,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."]
-,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,Str "*",Space,Str "criminey."]
-,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."]
-,HorizontalRule
-,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"]
-,Para [Str "E-mail",Space,Str "style:"]
-,BlockQuote
- [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]]
-,BlockQuote
- [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"]
- ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}"
- ,Para [Str "A",Space,Str "list:"]
- ,OrderedList (1,Decimal,Period)
- [[Plain [Str "item",Space,Str "one"]]
- ,[Plain [Str "item",Space,Str "two"]]]
- ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"]
- ,BlockQuote
- [Para [Str "nested"]]
- ,BlockQuote
- [Para [Str "nested"]]]
-,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",SoftBreak,Str ">",Space,Str "1."]
-,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."]
-,HorizontalRule
-,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"]
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
-,Para [Str "And:"]
-,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
-,HorizontalRule
-,Header 1 ("lists",[],[]) [Str "Lists"]
-,Header 2 ("unordered",[],[]) [Str "Unordered"]
-,Para [Str "Asterisks",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "asterisk",Space,Str "1"]]
- ,[Plain [Str "asterisk",Space,Str "2"]]
- ,[Plain [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Asterisks",Space,Str "loose:"]
-,BulletList
- [[Para [Str "asterisk",Space,Str "1"]]
- ,[Para [Str "asterisk",Space,Str "2"]]
- ,[Para [Str "asterisk",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Plus",Space,Str "1"]]
- ,[Plain [Str "Plus",Space,Str "2"]]
- ,[Plain [Str "Plus",Space,Str "3"]]]
-,Para [Str "Pluses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Plus",Space,Str "1"]]
- ,[Para [Str "Plus",Space,Str "2"]]
- ,[Para [Str "Plus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "tight:"]
-,BulletList
- [[Plain [Str "Minus",Space,Str "1"]]
- ,[Plain [Str "Minus",Space,Str "2"]]
- ,[Plain [Str "Minus",Space,Str "3"]]]
-,Para [Str "Minuses",Space,Str "loose:"]
-,BulletList
- [[Para [Str "Minus",Space,Str "1"]]
- ,[Para [Str "Minus",Space,Str "2"]]
- ,[Para [Str "Minus",Space,Str "3"]]]
-,Header 2 ("ordered",[],[]) [Str "Ordered"]
-,Para [Str "Tight:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second"]]
- ,[Plain [Str "Third"]]]
-,Para [Str "and:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "One"]]
- ,[Plain [Str "Two"]]
- ,[Plain [Str "Three"]]]
-,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second"]]
- ,[Para [Str "Third"]]]
-,Para [Str "and",Space,Str "using",Space,Str "spaces:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "One"]]
- ,[Para [Str "Two"]]
- ,[Para [Str "Three"]]]
-,Para [Str "Multiple",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."]
- ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",SoftBreak,Str "back."]]
- ,[Para [Str "Item",Space,Str "2."]]
- ,[Para [Str "Item",Space,Str "3."]]]
-,Header 2 ("nested",[],[]) [Str "Nested"]
-,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]
- ,BulletList
- [[Plain [Str "Tab"]]]]]]]
-,Para [Str "Here\8217s",Space,Str "another:"]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "First"]]
- ,[Plain [Str "Second:"]
- ,BulletList
- [[Plain [Str "Fee"]]
- ,[Plain [Str "Fie"]]
- ,[Plain [Str "Foe"]]]]
- ,[Plain [Str "Third"]]]
-,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"]
-,OrderedList (1,Decimal,Period)
- [[Para [Str "First"]]
- ,[Para [Str "Second:"]
- ,BulletList
- [[Plain [Str "Fee"]]
- ,[Plain [Str "Fie"]]
- ,[Plain [Str "Foe"]]]]
- ,[Para [Str "Third"]]]
-,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"]
-,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]
- ,BulletList
- [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]]
- ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]]]]]
-,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"]
-,OrderedList (2,Decimal,TwoParens)
- [[Para [Str "begins",Space,Str "with",Space,Str "2"]]
- ,[Para [Str "and",Space,Str "now",Space,Str "3"]
- ,Para [Str "with",Space,Str "a",Space,Str "continuation"]
- ,OrderedList (4,LowerRoman,Period)
- [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",SoftBreak,Str "starting",Space,Str "with",Space,Str "4"]]
- ,[Plain [Str "more",Space,Str "items"]
- ,OrderedList (1,UpperAlpha,TwoParens)
- [[Plain [Str "a",Space,Str "subsublist"]]
- ,[Plain [Str "a",Space,Str "subsublist"]]]]]]]
-,Para [Str "Nesting:"]
-,OrderedList (1,UpperAlpha,Period)
- [[Plain [Str "Upper",Space,Str "Alpha"]
- ,OrderedList (1,UpperRoman,Period)
- [[Plain [Str "Upper",Space,Str "Roman."]
- ,OrderedList (6,Decimal,TwoParens)
- [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"]
- ,OrderedList (3,LowerAlpha,OneParen)
- [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]]
-,Para [Str "Autonumbering:"]
-,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Autonumber."]]
- ,[Plain [Str "More."]
- ,OrderedList (1,DefaultStyle,DefaultDelim)
- [[Plain [Str "Nested."]]]]]
-,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"]
-,Para [Str "M.A.\160\&2007"]
-,Para [Str "B.",Space,Str "Williams"]
-,HorizontalRule
-,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"]
-,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"]
-,DefinitionList
- [([Str "apple"],
- [[Plain [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Plain [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Plain [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"]
-,DefinitionList
- [([Str "apple"],
- [[Plain [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Plain [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Plain [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Loose:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]])
- ,([Str "banana"],
- [[Para [Str "yellow",Space,Str "fruit"]]])]
-,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"]
-,DefinitionList
- [([Emph [Str "apple"]],
- [[Para [Str "red",Space,Str "fruit"]
- ,Para [Str "contains",Space,Str "seeds,",SoftBreak,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]])
- ,([Emph [Str "orange"]],
- [[Para [Str "orange",Space,Str "fruit"]
- ,CodeBlock ("",[],[]) "{ orange code block }"
- ,BlockQuote
- [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])]
-,Para [Str "Multiple",Space,Str "definitions,",Space,Str "tight:"]
-,DefinitionList
- [([Str "apple"],
- [[Plain [Str "red",Space,Str "fruit"]]
- ,[Plain [Str "computer"]]])
- ,([Str "orange"],
- [[Plain [Str "orange",Space,Str "fruit"]]
- ,[Plain [Str "bank"]]])]
-,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]
- ,[Para [Str "computer"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]]
- ,[Para [Str "bank"]]])]
-,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"]
-,DefinitionList
- [([Str "apple"],
- [[Para [Str "red",Space,Str "fruit"]]
- ,[Para [Str "computer"]]])
- ,([Str "orange"],
- [[Para [Str "orange",Space,Str "fruit"]
- ,OrderedList (1,Decimal,Period)
- [[Plain [Str "sublist"]]
- ,[Plain [Str "sublist"]]]]])]
-,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"]
-,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"]
-,Div ("",[],[])
- [Plain [Str "foo"]]
-,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"]
-,Div ("",[],[])
- [Div ("",[],[])
- [Div ("",[],[])
- [Para [Str "foo"]]]
- ,Div ("",[],[])
- [Plain [Str "bar"]]]
-,Para [Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"]
-,RawBlock (Format "html") "<table>"
-,RawBlock (Format "html") "<tr>"
-,RawBlock (Format "html") "<td>"
-,Plain [Str "This",Space,Str "is",Space,Emph [Str "emphasized"]]
-,RawBlock (Format "html") "</td>"
-,RawBlock (Format "html") "<td>"
-,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]]
-,RawBlock (Format "html") "</td>"
-,RawBlock (Format "html") "</tr>"
-,RawBlock (Format "html") "</table>"
-,RawBlock (Format "html") "<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>"
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"]
-,Div ("",[],[])
- [Para [Str "foo"]]
-,Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"]
-,CodeBlock ("",[],[]) "<div>\n foo\n</div>"
-,Para [Str "As",Space,Str "should",Space,Str "this:"]
-,CodeBlock ("",[],[]) "<div>foo</div>"
-,Para [Str "Now,",Space,Str "nested:"]
-,Div ("",[],[])
- [Div ("",[],[])
- [Div ("",[],[])
- [Plain [Str "foo"]]]]
-,Para [Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"]
-,RawBlock (Format "html") "<!-- Comment -->"
-,Para [Str "Multiline:"]
-,RawBlock (Format "html") "<!--\nBlah\nBlah\n-->"
-,RawBlock (Format "html") "<!--\n This is another comment.\n-->"
-,Para [Str "Code",Space,Str "block:"]
-,CodeBlock ("",[],[]) "<!-- Comment -->"
-,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"]
-,RawBlock (Format "html") "<!-- foo -->"
-,Para [Str "Code:"]
-,CodeBlock ("",[],[]) "<hr />"
-,Para [Str "Hr\8217s:"]
-,RawBlock (Format "html") "<hr>"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr>"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr />"
-,RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
-,RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
-,RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\">"
-,HorizontalRule
-,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"]
-,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."]
-,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."]
-,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]]
-,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."]
-,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "<html>",Str "."]
-,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]]
-,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."]
-,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many\160of\160them"],Str "O."]
-,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",SoftBreak,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."]
-,HorizontalRule
-,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"]
-,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]]
-,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."]
-,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",SoftBreak,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]]
-,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."]
-,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."]
-,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."]
-,Para [Str "Ellipses\8230and\8230and\8230."]
-,HorizontalRule
-,Header 1 ("latex",[],[]) [Str "LaTeX"]
-,BulletList
- [[Plain [RawInline (Format "tex") "\\cite[22-23]{smith.1899}"]]
- ,[Plain [Math InlineMath "2+2=4"]]
- ,[Plain [Math InlineMath "x \\in y"]]
- ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]]
- ,[Plain [Math InlineMath "223"]]
- ,[Plain [Math InlineMath "p",Str "-Tree"]]
- ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math:",SoftBreak,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]
- ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]]
-,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"]
-,BulletList
- [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]]
- ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",SoftBreak,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]]
- ,[Plain [Str "Shoes",Space,Str "($20)",Space,Str "and",Space,Str "socks",Space,Str "($5)."]]
- ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"]
-,RawBlock (Format "tex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
-,HorizontalRule
-,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"]
-,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"]
-,BulletList
- [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]]
- ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]]
- ,[Plain [Str "section:",Space,Str "\167"]]
- ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]]
- ,[Plain [Str "copyright:",Space,Str "\169"]]]
-,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."]
-,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."]
-,Para [Str "This",Space,Str "&",Space,Str "that."]
-,Para [Str "4",Space,Str "<",Space,Str "5."]
-,Para [Str "6",Space,Str ">",Space,Str "5."]
-,Para [Str "Backslash:",Space,Str "\\"]
-,Para [Str "Backtick:",Space,Str "`"]
-,Para [Str "Asterisk:",Space,Str "*"]
-,Para [Str "Underscore:",Space,Str "_"]
-,Para [Str "Left",Space,Str "brace:",Space,Str "{"]
-,Para [Str "Right",Space,Str "brace:",Space,Str "}"]
-,Para [Str "Left",Space,Str "bracket:",Space,Str "["]
-,Para [Str "Right",Space,Str "bracket:",Space,Str "]"]
-,Para [Str "Left",Space,Str "paren:",Space,Str "("]
-,Para [Str "Right",Space,Str "paren:",Space,Str ")"]
-,Para [Str "Greater-than:",Space,Str ">"]
-,Para [Str "Hash:",Space,Str "#"]
-,Para [Str "Period:",Space,Str "."]
-,Para [Str "Bang:",Space,Str "!"]
-,Para [Str "Plus:",Space,Str "+"]
-,Para [Str "Minus:",Space,Str "-"]
-,HorizontalRule
-,Header 1 ("links",[],[]) [Str "Links"]
-,Header 2 ("explicit",[],[]) [Str "Explicit"]
-,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")]
-,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")]
-,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")]
-,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")]
-,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."]
-,Header 2 ("reference",[],[]) [Str "Reference"]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."]
-,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."]
-,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."]
-,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."]
-,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."]
-,CodeBlock ("",[],[]) "[not]: /url"
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."]
-,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."]
-,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"]
-,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("http://att.com/","AT&T"),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."]
-,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."]
-,Header 2 ("autolinks",[],[]) [Str "Autolinks"]
-,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",["uri"],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")]
-,BulletList
- [[Plain [Str "In",Space,Str "a",Space,Str "list?"]]
- ,[Plain [Link ("",["uri"],[]) [Str "http://example.com/"] ("http://example.com/","")]]
- ,[Plain [Str "It",Space,Str "should."]]]
-,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",["email"],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")]
-,BlockQuote
- [Para [Str "Blockquoted:",Space,Link ("",["uri"],[]) [Str "http://example.com/"] ("http://example.com/","")]]
-,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) "<http://example.com/>"]
-,CodeBlock ("",[],[]) "or here: <http://example.com/>"
-,HorizontalRule
-,Header 1 ("images",[],[]) [Str "Images"]
-,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"]
-,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","fig:Voyage dans la Lune")]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."]
-,HorizontalRule
-,Header 1 ("footnotes",[],[]) [Str "Footnotes"]
-,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",SoftBreak,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { <code> }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",SoftBreak,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",SoftBreak,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",SoftBreak,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]]
-,BlockQuote
- [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]]
-,OrderedList (1,Decimal,Period)
- [[Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]]
-,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]]
+Pandoc
+ Meta
+ { unMeta =
+ fromList
+ [ ( "author"
+ , MetaList
+ [ MetaInlines [ Str "John" , Space , Str "MacFarlane" ]
+ , MetaInlines [ Str "Anonymous" ]
+ ]
+ )
+ , ( "date"
+ , MetaInlines
+ [ Str "July" , Space , Str "17," , Space , Str "2006" ]
+ )
+ , ( "title"
+ , MetaInlines
+ [ Str "Pandoc" , Space , Str "Test" , Space , Str "Suite" ]
+ )
+ ]
+ }
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "set"
+ , Space
+ , Str "of"
+ , Space
+ , Str "tests"
+ , Space
+ , Str "for"
+ , Space
+ , Str "pandoc."
+ , Space
+ , Str "Most"
+ , Space
+ , Str "of"
+ , Space
+ , Str "them"
+ , Space
+ , Str "are"
+ , Space
+ , Str "adapted"
+ , Space
+ , Str "from"
+ , SoftBreak
+ , Str "John"
+ , Space
+ , Str "Gruber\8217s"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "test"
+ , Space
+ , Str "suite."
+ ]
+ , HorizontalRule
+ , Header 1 ( "headers" , [] , [] ) [ Str "Headers" ]
+ , Header
+ 2
+ ( "level-2-with-an-embedded-link" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Header
+ 3
+ ( "level-3-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "3"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 4 ( "level-4" , [] , [] ) [ Str "Level" , Space , Str "4" ]
+ , Header
+ 5 ( "level-5" , [] , [] ) [ Str "Level" , Space , Str "5" ]
+ , Header
+ 1 ( "level-1" , [] , [] ) [ Str "Level" , Space , Str "1" ]
+ , Header
+ 2
+ ( "level-2-with-emphasis" , [] , [] )
+ [ Str "Level"
+ , Space
+ , Str "2"
+ , Space
+ , Str "with"
+ , Space
+ , Emph [ Str "emphasis" ]
+ ]
+ , Header
+ 3 ( "level-3" , [] , [] ) [ Str "Level" , Space , Str "3" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , Header
+ 2 ( "level-2" , [] , [] ) [ Str "Level" , Space , Str "2" ]
+ , Para
+ [ Str "with"
+ , Space
+ , Str "no"
+ , Space
+ , Str "blank"
+ , Space
+ , Str "line"
+ ]
+ , HorizontalRule
+ , Header 1 ( "paragraphs" , [] , [] ) [ Str "Paragraphs" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "regular"
+ , Space
+ , Str "paragraph."
+ ]
+ , Para
+ [ Str "In"
+ , Space
+ , Str "Markdown"
+ , Space
+ , Str "1.0.0"
+ , Space
+ , Str "and"
+ , Space
+ , Str "earlier."
+ , Space
+ , Str "Version"
+ , SoftBreak
+ , Str "8."
+ , Space
+ , Str "This"
+ , Space
+ , Str "line"
+ , Space
+ , Str "turns"
+ , Space
+ , Str "into"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item."
+ , SoftBreak
+ , Str "Because"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard-wrapped"
+ , Space
+ , Str "line"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "middle"
+ , Space
+ , Str "of"
+ , Space
+ , Str "a"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "looked"
+ , Space
+ , Str "like"
+ , Space
+ , Str "a"
+ , SoftBreak
+ , Str "list"
+ , Space
+ , Str "item."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "with"
+ , Space
+ , Str "a"
+ , Space
+ , Str "bullet."
+ , SoftBreak
+ , Str "*"
+ , Space
+ , Str "criminey."
+ ]
+ , Para
+ [ Str "There"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "hard"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , LineBreak
+ , Str "here."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "block-quotes" , [] , [] )
+ [ Str "Block" , Space , Str "Quotes" ]
+ , Para [ Str "E-mail" , Space , Str "style:" ]
+ , BlockQuote
+ [ Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote."
+ , SoftBreak
+ , Str "It"
+ , Space
+ , Str "is"
+ , Space
+ , Str "pretty"
+ , Space
+ , Str "short."
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Code"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ ]
+ , CodeBlock
+ ( "" , [] , [] ) "sub status {\n print \"working\";\n}"
+ , Para [ Str "A" , Space , Str "list:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "item" , Space , Str "one" ] ]
+ , [ Plain [ Str "item" , Space , Str "two" ] ]
+ ]
+ , Para
+ [ Str "Nested" , Space , Str "block" , Space , Str "quotes:" ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ , BlockQuote [ Para [ Str "nested" ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "block"
+ , Space
+ , Str "quote:"
+ , Space
+ , Str "2"
+ , SoftBreak
+ , Str ">"
+ , Space
+ , Str "1."
+ ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "a"
+ , Space
+ , Str "following"
+ , Space
+ , Str "paragraph."
+ ]
+ , HorizontalRule
+ , Header
+ 1 ( "code-blocks" , [] , [] ) [ Str "Code" , Space , Str "Blocks" ]
+ , Para [ Str "Code:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab"
+ , Para [ Str "And:" ]
+ , CodeBlock
+ ( "" , [] , [] )
+ " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{"
+ , HorizontalRule
+ , Header 1 ( "lists" , [] , [] ) [ Str "Lists" ]
+ , Header 2 ( "unordered" , [] , [] ) [ Str "Unordered" ]
+ , Para [ Str "Asterisks" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Plain [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Asterisks" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "asterisk" , Space , Str "1" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "2" ] ]
+ , [ Para [ Str "asterisk" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Plus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Pluses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Plus" , Space , Str "1" ] ]
+ , [ Para [ Str "Plus" , Space , Str "2" ] ]
+ , [ Para [ Str "Plus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "tight:" ]
+ , BulletList
+ [ [ Plain [ Str "Minus" , Space , Str "1" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "2" ] ]
+ , [ Plain [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Para [ Str "Minuses" , Space , Str "loose:" ]
+ , BulletList
+ [ [ Para [ Str "Minus" , Space , Str "1" ] ]
+ , [ Para [ Str "Minus" , Space , Str "2" ] ]
+ , [ Para [ Str "Minus" , Space , Str "3" ] ]
+ ]
+ , Header 2 ( "ordered" , [] , [] ) [ Str "Ordered" ]
+ , Para [ Str "Tight:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second" ] ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para [ Str "and:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "One" ] ]
+ , [ Plain [ Str "Two" ] ]
+ , [ Plain [ Str "Three" ] ]
+ ]
+ , Para [ Str "Loose" , Space , Str "using" , Space , Str "tabs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second" ] ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Para [ Str "and" , Space , Str "using" , Space , Str "spaces:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "One" ] ]
+ , [ Para [ Str "Two" ] ]
+ , [ Para [ Str "Three" ] ]
+ ]
+ , Para [ Str "Multiple" , Space , Str "paragraphs:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para
+ [ Str "Item"
+ , Space
+ , Str "1,"
+ , Space
+ , Str "graf"
+ , Space
+ , Str "one."
+ ]
+ , Para
+ [ Str "Item"
+ , Space
+ , Str "1."
+ , Space
+ , Str "graf"
+ , Space
+ , Str "two."
+ , Space
+ , Str "The"
+ , Space
+ , Str "quick"
+ , Space
+ , Str "brown"
+ , Space
+ , Str "fox"
+ , Space
+ , Str "jumped"
+ , Space
+ , Str "over"
+ , Space
+ , Str "the"
+ , Space
+ , Str "lazy"
+ , Space
+ , Str "dog\8217s"
+ , SoftBreak
+ , Str "back."
+ ]
+ ]
+ , [ Para [ Str "Item" , Space , Str "2." ] ]
+ , [ Para [ Str "Item" , Space , Str "3." ] ]
+ ]
+ , Header 2 ( "nested" , [] , [] ) [ Str "Nested" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ]
+ , BulletList
+ [ [ Plain [ Str "Tab" ] , BulletList [ [ Plain [ Str "Tab" ] ] ] ]
+ ]
+ ]
+ ]
+ , Para [ Str "Here\8217s" , Space , Str "another:" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "First" ] ]
+ , [ Plain [ Str "Second:" ]
+ , BulletList
+ [ [ Plain [ Str "Fee" ] ]
+ , [ Plain [ Str "Fie" ] ]
+ , [ Plain [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Plain [ Str "Third" ] ]
+ ]
+ , Para
+ [ Str "Same"
+ , Space
+ , Str "thing"
+ , Space
+ , Str "but"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paragraphs:"
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Para [ Str "First" ] ]
+ , [ Para [ Str "Second:" ]
+ , BulletList
+ [ [ Plain [ Str "Fee" ] ]
+ , [ Plain [ Str "Fie" ] ]
+ , [ Plain [ Str "Foe" ] ]
+ ]
+ ]
+ , [ Para [ Str "Third" ] ]
+ ]
+ , Header
+ 2
+ ( "tabs-and-spaces" , [] , [] )
+ [ Str "Tabs" , Space , Str "and" , Space , Str "spaces" ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ , BulletList
+ [ [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "tabs"
+ ]
+ ]
+ , [ Para
+ [ Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "example"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item"
+ , SoftBreak
+ , Str "indented"
+ , Space
+ , Str "with"
+ , Space
+ , Str "spaces"
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Header
+ 2
+ ( "fancy-list-markers" , [] , [] )
+ [ Str "Fancy" , Space , Str "list" , Space , Str "markers" ]
+ , OrderedList
+ ( 2 , Decimal , TwoParens )
+ [ [ Para [ Str "begins" , Space , Str "with" , Space , Str "2" ] ]
+ , [ Para [ Str "and" , Space , Str "now" , Space , Str "3" ]
+ , Para
+ [ Str "with" , Space , Str "a" , Space , Str "continuation" ]
+ , OrderedList
+ ( 4 , LowerRoman , Period )
+ [ [ Plain
+ [ Str "sublist"
+ , Space
+ , Str "with"
+ , Space
+ , Str "roman"
+ , Space
+ , Str "numerals,"
+ , SoftBreak
+ , Str "starting"
+ , Space
+ , Str "with"
+ , Space
+ , Str "4"
+ ]
+ ]
+ , [ Plain [ Str "more" , Space , Str "items" ]
+ , OrderedList
+ ( 1 , UpperAlpha , TwoParens )
+ [ [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ , [ Plain [ Str "a" , Space , Str "subsublist" ] ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Nesting:" ]
+ , OrderedList
+ ( 1 , UpperAlpha , Period )
+ [ [ Plain [ Str "Upper" , Space , Str "Alpha" ]
+ , OrderedList
+ ( 1 , UpperRoman , Period )
+ [ [ Plain [ Str "Upper" , Space , Str "Roman." ]
+ , OrderedList
+ ( 6 , Decimal , TwoParens )
+ [ [ Plain
+ [ Str "Decimal"
+ , Space
+ , Str "start"
+ , Space
+ , Str "with"
+ , Space
+ , Str "6"
+ ]
+ , OrderedList
+ ( 3 , LowerAlpha , OneParen )
+ [ [ Plain
+ [ Str "Lower"
+ , Space
+ , Str "alpha"
+ , Space
+ , Str "with"
+ , Space
+ , Str "paren"
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ , Para [ Str "Autonumbering:" ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim )
+ [ [ Plain [ Str "Autonumber." ] ]
+ , [ Plain [ Str "More." ]
+ , OrderedList
+ ( 1 , DefaultStyle , DefaultDelim ) [ [ Plain [ Str "Nested." ] ] ]
+ ]
+ ]
+ , Para
+ [ Str "Should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "list"
+ , Space
+ , Str "item:"
+ ]
+ , Para [ Str "M.A.\160\&2007" ]
+ , Para [ Str "B." , Space , Str "Williams" ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "definition-lists" , [] , [] )
+ [ Str "Definition" , Space , Str "Lists" ]
+ , Para
+ [ Str "Tight" , Space , Str "using" , Space , Str "spaces:" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Plain [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Plain [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Plain [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para [ Str "Tight" , Space , Str "using" , Space , Str "tabs:" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Plain [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Plain [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Plain [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para [ Str "Loose:" ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ] ]
+ )
+ , ( [ Str "banana" ]
+ , [ [ Para [ Str "yellow" , Space , Str "fruit" ] ] ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "with"
+ , Space
+ , Str "italics:"
+ ]
+ , DefinitionList
+ [ ( [ Emph [ Str "apple" ] ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ]
+ , Para
+ [ Str "contains"
+ , Space
+ , Str "seeds,"
+ , SoftBreak
+ , Str "crisp,"
+ , Space
+ , Str "pleasant"
+ , Space
+ , Str "to"
+ , Space
+ , Str "taste"
+ ]
+ ]
+ ]
+ )
+ , ( [ Emph [ Str "orange" ] ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ]
+ , CodeBlock ( "" , [] , [] ) "{ orange code block }"
+ , BlockQuote
+ [ Para
+ [ Str "orange" , Space , Str "block" , Space , Str "quote" ]
+ ]
+ ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "definitions,"
+ , Space
+ , Str "tight:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Plain [ Str "red" , Space , Str "fruit" ] ]
+ , [ Plain [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Plain [ Str "orange" , Space , Str "fruit" ] ]
+ , [ Plain [ Str "bank" ] ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Multiple"
+ , Space
+ , Str "definitions,"
+ , Space
+ , Str "loose:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ]
+ , [ Para [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ] ]
+ , [ Para [ Str "bank" ] ]
+ ]
+ )
+ ]
+ , Para
+ [ Str "Blank"
+ , Space
+ , Str "line"
+ , Space
+ , Str "after"
+ , Space
+ , Str "term,"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "marker,"
+ , Space
+ , Str "alternate"
+ , Space
+ , Str "markers:"
+ ]
+ , DefinitionList
+ [ ( [ Str "apple" ]
+ , [ [ Para [ Str "red" , Space , Str "fruit" ] ]
+ , [ Para [ Str "computer" ] ]
+ ]
+ )
+ , ( [ Str "orange" ]
+ , [ [ Para [ Str "orange" , Space , Str "fruit" ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain [ Str "sublist" ] ] , [ Plain [ Str "sublist" ] ] ]
+ ]
+ ]
+ )
+ ]
+ , Header
+ 1 ( "html-blocks" , [] , [] ) [ Str "HTML" , Space , Str "Blocks" ]
+ , Para
+ [ Str "Simple"
+ , Space
+ , Str "block"
+ , Space
+ , Str "on"
+ , Space
+ , Str "one"
+ , Space
+ , Str "line:"
+ ]
+ , Div ( "" , [] , [] ) [ Plain [ Str "foo" ] ]
+ , Para
+ [ Str "And"
+ , Space
+ , Str "nested"
+ , Space
+ , Str "without"
+ , Space
+ , Str "indentation:"
+ ]
+ , Div
+ ( "" , [] , [] )
+ [ Div
+ ( "" , [] , [] ) [ Div ( "" , [] , [] ) [ Para [ Str "foo" ] ] ]
+ , Div ( "" , [] , [] ) [ Plain [ Str "bar" ] ]
+ ]
+ , Para
+ [ Str "Interpreted"
+ , Space
+ , Str "markdown"
+ , Space
+ , Str "in"
+ , Space
+ , Str "a"
+ , Space
+ , Str "table:"
+ ]
+ , RawBlock (Format "html") "<table>"
+ , RawBlock (Format "html") "<tr>"
+ , RawBlock (Format "html") "<td>"
+ , Plain
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ ]
+ , RawBlock (Format "html") "</td>"
+ , RawBlock (Format "html") "<td>"
+ , Plain
+ [ Str "And"
+ , Space
+ , Str "this"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ ]
+ , RawBlock (Format "html") "</td>"
+ , RawBlock (Format "html") "</tr>"
+ , RawBlock (Format "html") "</table>"
+ , RawBlock
+ (Format "html")
+ "<script type=\"text/javascript\">document.write('This *should not* be interpreted as markdown');</script>"
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "simple"
+ , Space
+ , Str "block:"
+ ]
+ , Div ( "" , [] , [] ) [ Para [ Str "foo" ] ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "code"
+ , Space
+ , Str "block,"
+ , Space
+ , Str "though:"
+ ]
+ , CodeBlock ( "" , [] , [] ) "<div>\n foo\n</div>"
+ , Para [ Str "As" , Space , Str "should" , Space , Str "this:" ]
+ , CodeBlock ( "" , [] , [] ) "<div>foo</div>"
+ , Para [ Str "Now," , Space , Str "nested:" ]
+ , Div
+ ( "" , [] , [] )
+ [ Div
+ ( "" , [] , [] ) [ Div ( "" , [] , [] ) [ Plain [ Str "foo" ] ] ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "just"
+ , Space
+ , Str "be"
+ , Space
+ , Str "an"
+ , Space
+ , Str "HTML"
+ , Space
+ , Str "comment:"
+ ]
+ , RawBlock (Format "html") "<!-- Comment -->"
+ , Para [ Str "Multiline:" ]
+ , RawBlock (Format "html") "<!--\nBlah\nBlah\n-->"
+ , RawBlock
+ (Format "html") "<!--\n This is another comment.\n-->"
+ , Para [ Str "Code" , Space , Str "block:" ]
+ , CodeBlock ( "" , [] , [] ) "<!-- Comment -->"
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "plain"
+ , Space
+ , Str "comment,"
+ , Space
+ , Str "with"
+ , Space
+ , Str "trailing"
+ , Space
+ , Str "spaces"
+ , Space
+ , Str "on"
+ , Space
+ , Str "the"
+ , Space
+ , Str "line:"
+ ]
+ , RawBlock (Format "html") "<!-- foo -->"
+ , Para [ Str "Code:" ]
+ , CodeBlock ( "" , [] , [] ) "<hr />"
+ , Para [ Str "Hr\8217s:" ]
+ , RawBlock (Format "html") "<hr>"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr>"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr />"
+ , RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
+ , RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\" />"
+ , RawBlock (Format "html") "<hr class=\"foo\" id=\"bar\">"
+ , HorizontalRule
+ , Header
+ 1
+ ( "inline-markup" , [] , [] )
+ [ Str "Inline" , Space , Str "Markup" ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "emphasized" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Emph [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Str "strong" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Str "so"
+ , Space
+ , Strong [ Str "is" , Space , Str "this" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Emph
+ [ Link
+ ( "" , [] , [] )
+ [ Str "emphasized" , Space , Str "link" ]
+ ( "/url" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Strong
+ [ Emph
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "strong"
+ , Space
+ , Str "and"
+ , Space
+ , Str "em."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Strong [ Emph [ Str "this" ] ]
+ , Space
+ , Str "word."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Str "code:"
+ , Space
+ , Code ( "" , [] , [] ) ">"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "\\$"
+ , Str ","
+ , Space
+ , Code ( "" , [] , [] ) "<html>"
+ , Str "."
+ ]
+ , Para
+ [ Strikeout
+ [ Str "This"
+ , Space
+ , Str "is"
+ , Space
+ , Emph [ Str "strikeout" ]
+ , Str "."
+ ]
+ ]
+ , Para
+ [ Str "Superscripts:"
+ , Space
+ , Str "a"
+ , Superscript [ Str "bc" ]
+ , Str "d"
+ , Space
+ , Str "a"
+ , Superscript [ Emph [ Str "hello" ] ]
+ , Space
+ , Str "a"
+ , Superscript [ Str "hello\160there" ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Subscripts:"
+ , Space
+ , Str "H"
+ , Subscript [ Str "2" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Subscript [ Str "23" ]
+ , Str "O,"
+ , Space
+ , Str "H"
+ , Subscript [ Str "many\160of\160them" ]
+ , Str "O."
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "superscripts"
+ , Space
+ , Str "or"
+ , Space
+ , Str "subscripts,"
+ , SoftBreak
+ , Str "because"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "unescaped"
+ , Space
+ , Str "spaces:"
+ , Space
+ , Str "a^b"
+ , Space
+ , Str "c^d,"
+ , Space
+ , Str "a~b"
+ , Space
+ , Str "c~d."
+ ]
+ , HorizontalRule
+ , Header
+ 1
+ ( "smart-quotes-ellipses-dashes" , [] , [] )
+ [ Str "Smart"
+ , Space
+ , Str "quotes,"
+ , Space
+ , Str "ellipses,"
+ , Space
+ , Str "dashes"
+ ]
+ , Para
+ [ Quoted DoubleQuote [ Str "Hello," ]
+ , Space
+ , Str "said"
+ , Space
+ , Str "the"
+ , Space
+ , Str "spider."
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Quoted SingleQuote [ Str "Shelob" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "my"
+ , Space
+ , Str "name."
+ ]
+ ]
+ , Para
+ [ Quoted SingleQuote [ Str "A" ]
+ , Str ","
+ , Space
+ , Quoted SingleQuote [ Str "B" ]
+ , Str ","
+ , Space
+ , Str "and"
+ , Space
+ , Quoted SingleQuote [ Str "C" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "letters."
+ ]
+ , Para
+ [ Quoted SingleQuote [ Str "Oak," ]
+ , Space
+ , Quoted SingleQuote [ Str "elm," ]
+ , Space
+ , Str "and"
+ , Space
+ , Quoted SingleQuote [ Str "beech" ]
+ , Space
+ , Str "are"
+ , Space
+ , Str "names"
+ , Space
+ , Str "of"
+ , Space
+ , Str "trees."
+ , SoftBreak
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Quoted SingleQuote [ Str "pine." ]
+ ]
+ , Para
+ [ Quoted
+ SingleQuote
+ [ Str "He"
+ , Space
+ , Str "said,"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "I"
+ , Space
+ , Str "want"
+ , Space
+ , Str "to"
+ , Space
+ , Str "go."
+ ]
+ ]
+ , Space
+ , Str "Were"
+ , Space
+ , Str "you"
+ , Space
+ , Str "alive"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "70\8217s?"
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "quoted"
+ , Space
+ , Quoted SingleQuote [ Code ( "" , [] , [] ) "code" ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "a"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Link
+ ( "" , [] , [] )
+ [ Str "quoted" , Space , Str "link" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , Str "."
+ ]
+ , Para
+ [ Str "Some"
+ , Space
+ , Str "dashes:"
+ , Space
+ , Str "one\8212two"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "three\8212four"
+ , Space
+ , Str "\8212"
+ , Space
+ , Str "five."
+ ]
+ , Para
+ [ Str "Dashes"
+ , Space
+ , Str "between"
+ , Space
+ , Str "numbers:"
+ , Space
+ , Str "5\8211\&7,"
+ , Space
+ , Str "255\8211\&66,"
+ , Space
+ , Str "1987\8211\&1999."
+ ]
+ , Para [ Str "Ellipses\8230and\8230and\8230." ]
+ , HorizontalRule
+ , Header 1 ( "latex" , [] , [] ) [ Str "LaTeX" ]
+ , BulletList
+ [ [ Plain [ RawInline (Format "tex") "\\cite[22-23]{smith.1899}" ]
+ ]
+ , [ Plain [ Math InlineMath "2+2=4" ] ]
+ , [ Plain [ Math InlineMath "x \\in y" ] ]
+ , [ Plain [ Math InlineMath "\\alpha \\wedge \\omega" ] ]
+ , [ Plain [ Math InlineMath "223" ] ]
+ , [ Plain [ Math InlineMath "p" , Str "-Tree" ] ]
+ , [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "some"
+ , Space
+ , Str "display"
+ , Space
+ , Str "math:"
+ , SoftBreak
+ , Math
+ DisplayMath
+ "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"
+ ]
+ ]
+ , [ Plain
+ [ Str "Here\8217s"
+ , Space
+ , Str "one"
+ , Space
+ , Str "that"
+ , Space
+ , Str "has"
+ , Space
+ , Str "a"
+ , Space
+ , Str "line"
+ , Space
+ , Str "break"
+ , Space
+ , Str "in"
+ , Space
+ , Str "it:"
+ , Space
+ , Math InlineMath "\\alpha + \\omega \\times x^2"
+ , Str "."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "These"
+ , Space
+ , Str "shouldn\8217t"
+ , Space
+ , Str "be"
+ , Space
+ , Str "math:"
+ ]
+ , BulletList
+ [ [ Plain
+ [ Str "To"
+ , Space
+ , Str "get"
+ , Space
+ , Str "the"
+ , Space
+ , Str "famous"
+ , Space
+ , Str "equation,"
+ , Space
+ , Str "write"
+ , Space
+ , Code ( "" , [] , [] ) "$e = mc^2$"
+ , Str "."
+ ]
+ ]
+ , [ Plain
+ [ Str "$22,000"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Emph [ Str "lot" ]
+ , Space
+ , Str "of"
+ , Space
+ , Str "money."
+ , Space
+ , Str "So"
+ , Space
+ , Str "is"
+ , Space
+ , Str "$34,000."
+ , SoftBreak
+ , Str "(It"
+ , Space
+ , Str "worked"
+ , Space
+ , Str "if"
+ , Space
+ , Quoted DoubleQuote [ Str "lot" ]
+ , Space
+ , Str "is"
+ , Space
+ , Str "emphasized.)"
+ ]
+ ]
+ , [ Plain
+ [ Str "Shoes"
+ , Space
+ , Str "($20)"
+ , Space
+ , Str "and"
+ , Space
+ , Str "socks"
+ , Space
+ , Str "($5)."
+ ]
+ ]
+ , [ Plain
+ [ Str "Escaped"
+ , Space
+ , Code ( "" , [] , [] ) "$"
+ , Str ":"
+ , Space
+ , Str "$73"
+ , Space
+ , Emph
+ [ Str "this"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "emphasized"
+ ]
+ , Space
+ , Str "23$."
+ ]
+ ]
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "LaTeX"
+ , Space
+ , Str "table:"
+ ]
+ , RawBlock
+ (Format "tex")
+ "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}"
+ , HorizontalRule
+ , Header
+ 1
+ ( "special-characters" , [] , [] )
+ [ Str "Special" , Space , Str "Characters" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "some"
+ , Space
+ , Str "unicode:"
+ ]
+ , BulletList
+ [ [ Plain [ Str "I" , Space , Str "hat:" , Space , Str "\206" ] ]
+ , [ Plain [ Str "o" , Space , Str "umlaut:" , Space , Str "\246" ]
+ ]
+ , [ Plain [ Str "section:" , Space , Str "\167" ] ]
+ , [ Plain
+ [ Str "set" , Space , Str "membership:" , Space , Str "\8712" ]
+ ]
+ , [ Plain [ Str "copyright:" , Space , Str "\169" ] ]
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "has"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "their"
+ , Space
+ , Str "name."
+ ]
+ , Para
+ [ Str "AT&T"
+ , Space
+ , Str "is"
+ , Space
+ , Str "another"
+ , Space
+ , Str "way"
+ , Space
+ , Str "to"
+ , Space
+ , Str "write"
+ , Space
+ , Str "it."
+ ]
+ , Para [ Str "This" , Space , Str "&" , Space , Str "that." ]
+ , Para [ Str "4" , Space , Str "<" , Space , Str "5." ]
+ , Para [ Str "6" , Space , Str ">" , Space , Str "5." ]
+ , Para [ Str "Backslash:" , Space , Str "\\" ]
+ , Para [ Str "Backtick:" , Space , Str "`" ]
+ , Para [ Str "Asterisk:" , Space , Str "*" ]
+ , Para [ Str "Underscore:" , Space , Str "_" ]
+ , Para [ Str "Left" , Space , Str "brace:" , Space , Str "{" ]
+ , Para [ Str "Right" , Space , Str "brace:" , Space , Str "}" ]
+ , Para [ Str "Left" , Space , Str "bracket:" , Space , Str "[" ]
+ , Para [ Str "Right" , Space , Str "bracket:" , Space , Str "]" ]
+ , Para [ Str "Left" , Space , Str "paren:" , Space , Str "(" ]
+ , Para [ Str "Right" , Space , Str "paren:" , Space , Str ")" ]
+ , Para [ Str "Greater-than:" , Space , Str ">" ]
+ , Para [ Str "Hash:" , Space , Str "#" ]
+ , Para [ Str "Period:" , Space , Str "." ]
+ , Para [ Str "Bang:" , Space , Str "!" ]
+ , Para [ Str "Plus:" , Space , Str "+" ]
+ , Para [ Str "Minus:" , Space , Str "-" ]
+ , HorizontalRule
+ , Header 1 ( "links" , [] , [] ) [ Str "Links" ]
+ , Header 2 ( "explicit" , [] , [] ) [ Str "Explicit" ]
+ , Para
+ [ Str "Just"
+ , Space
+ , Str "a"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "URL" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by two spaces" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title preceded by a tab" )
+ , Str "."
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with \"quotes\" in it" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "URL" , Space , Str "and" , Space , Str "title" ]
+ ( "/url/" , "title with single quotes" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "with_underscore" ]
+ ( "/url/with_underscore" , "" )
+ ]
+ , Para
+ [ Link
+ ( "" , [] , [] )
+ [ Str "Email" , Space , Str "link" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "Empty" ] ( "" , "" ) , Str "." ]
+ , Header 2 ( "reference" , [] , [] ) [ Str "Reference" ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "bar" ] ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "With"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "embedded" , Space , Str "[brackets]" ]
+ ( "/url/" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Link ( "" , [] , [] ) [ Str "b" ] ( "/url/" , "" )
+ , Space
+ , Str "by"
+ , Space
+ , Str "itself"
+ , Space
+ , Str "should"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "once" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "twice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Indented"
+ , Space
+ , Link ( "" , [] , [] ) [ Str "thrice" ] ( "/url" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Str "[not][]"
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link."
+ ]
+ , CodeBlock ( "" , [] , [] ) "[not]: /url"
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "bar" ]
+ ( "/url/" , "Title with \"quotes\" inside" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Foo"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "biz" ]
+ ( "/url/" , "Title with \"quote\" inside" )
+ , Str "."
+ ]
+ , Header
+ 2
+ ( "with-ampersands" , [] , [] )
+ [ Str "With" , Space , Str "ampersands" ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "URL"
+ ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "a"
+ , Space
+ , Str "link"
+ , Space
+ , Str "with"
+ , Space
+ , Str "an"
+ , Space
+ , Str "amersand"
+ , Space
+ , Str "in"
+ , Space
+ , Str "the"
+ , Space
+ , Str "link"
+ , Space
+ , Str "text:"
+ , Space
+ , Link
+ ( "" , [] , [] ) [ Str "AT&T" ] ( "http://att.com/" , "AT&T" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline" , Space , Str "link" ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "an"
+ , Space
+ , Link
+ ( "" , [] , [] )
+ [ Str "inline"
+ , Space
+ , Str "link"
+ , Space
+ , Str "in"
+ , Space
+ , Str "pointy"
+ , Space
+ , Str "braces"
+ ]
+ ( "/script?foo=1&bar=2" , "" )
+ , Str "."
+ ]
+ , Header 2 ( "autolinks" , [] , [] ) [ Str "Autolinks" ]
+ , Para
+ [ Str "With"
+ , Space
+ , Str "an"
+ , Space
+ , Str "ampersand:"
+ , Space
+ , Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/?foo=1&bar=2" ]
+ ( "http://example.com/?foo=1&bar=2" , "" )
+ ]
+ , BulletList
+ [ [ Plain [ Str "In" , Space , Str "a" , Space , Str "list?" ] ]
+ , [ Plain
+ [ Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , [ Plain [ Str "It" , Space , Str "should." ] ]
+ ]
+ , Para
+ [ Str "An"
+ , Space
+ , Str "e-mail"
+ , Space
+ , Str "address:"
+ , Space
+ , Link
+ ( "" , [ "email" ] , [] )
+ [ Str "nobody@nowhere.net" ]
+ ( "mailto:nobody@nowhere.net" , "" )
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Blockquoted:"
+ , Space
+ , Link
+ ( "" , [ "uri" ] , [] )
+ [ Str "http://example.com/" ]
+ ( "http://example.com/" , "" )
+ ]
+ ]
+ , Para
+ [ Str "Auto-links"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "occur"
+ , Space
+ , Str "here:"
+ , Space
+ , Code ( "" , [] , [] ) "<http://example.com/>"
+ ]
+ , CodeBlock ( "" , [] , [] ) "or here: <http://example.com/>"
+ , HorizontalRule
+ , Header 1 ( "images" , [] , [] ) [ Str "Images" ]
+ , Para
+ [ Str "From"
+ , Space
+ , Quoted
+ DoubleQuote
+ [ Str "Voyage"
+ , Space
+ , Str "dans"
+ , Space
+ , Str "la"
+ , Space
+ , Str "Lune"
+ ]
+ , Space
+ , Str "by"
+ , Space
+ , Str "Georges"
+ , Space
+ , Str "Melies"
+ , Space
+ , Str "(1902):"
+ ]
+ , Para
+ [ Image
+ ( "" , [] , [] )
+ [ Str "lalune" ]
+ ( "lalune.jpg" , "fig:Voyage dans la Lune" )
+ ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "movie"
+ , Space
+ , Image ( "" , [] , [] ) [ Str "movie" ] ( "movie.jpg" , "" )
+ , Space
+ , Str "icon."
+ ]
+ , HorizontalRule
+ , Header 1 ( "footnotes" , [] , [] ) [ Str "Footnotes" ]
+ , Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Note
+ [ Para
+ [ Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote."
+ , Space
+ , Str "It"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "anywhere"
+ , Space
+ , Str "after"
+ , Space
+ , Str "the"
+ , Space
+ , Str "footnote"
+ , SoftBreak
+ , Str "reference."
+ , Space
+ , Str "It"
+ , Space
+ , Str "need"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "placed"
+ , Space
+ , Str "at"
+ , Space
+ , Str "the"
+ , Space
+ , Str "end"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "document."
+ ]
+ ]
+ , Space
+ , Str "and"
+ , Space
+ , Str "another."
+ , Note
+ [ Para
+ [ Str "Here\8217s"
+ , Space
+ , Str "the"
+ , Space
+ , Str "long"
+ , Space
+ , Str "note."
+ , Space
+ , Str "This"
+ , Space
+ , Str "one"
+ , Space
+ , Str "contains"
+ , Space
+ , Str "multiple"
+ , SoftBreak
+ , Str "blocks."
+ ]
+ , Para
+ [ Str "Subsequent"
+ , Space
+ , Str "blocks"
+ , Space
+ , Str "are"
+ , Space
+ , Str "indented"
+ , Space
+ , Str "to"
+ , Space
+ , Str "show"
+ , Space
+ , Str "that"
+ , Space
+ , Str "they"
+ , Space
+ , Str "belong"
+ , Space
+ , Str "to"
+ , Space
+ , Str "the"
+ , SoftBreak
+ , Str "footnote"
+ , Space
+ , Str "(as"
+ , Space
+ , Str "with"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items)."
+ ]
+ , CodeBlock ( "" , [] , [] ) " { <code> }"
+ , Para
+ [ Str "If"
+ , Space
+ , Str "you"
+ , Space
+ , Str "want,"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "every"
+ , Space
+ , Str "line,"
+ , Space
+ , Str "but"
+ , Space
+ , Str "you"
+ , Space
+ , Str "can"
+ , Space
+ , Str "also"
+ , Space
+ , Str "be"
+ , SoftBreak
+ , Str "lazy"
+ , Space
+ , Str "and"
+ , Space
+ , Str "just"
+ , Space
+ , Str "indent"
+ , Space
+ , Str "the"
+ , Space
+ , Str "first"
+ , Space
+ , Str "line"
+ , Space
+ , Str "of"
+ , Space
+ , Str "each"
+ , Space
+ , Str "block."
+ ]
+ ]
+ , SoftBreak
+ , Str "This"
+ , Space
+ , Str "should"
+ , Space
+ , Emph [ Str "not" ]
+ , Space
+ , Str "be"
+ , Space
+ , Str "a"
+ , Space
+ , Str "footnote"
+ , Space
+ , Str "reference,"
+ , Space
+ , Str "because"
+ , Space
+ , Str "it"
+ , SoftBreak
+ , Str "contains"
+ , Space
+ , Str "a"
+ , Space
+ , Str "space.[^my"
+ , Space
+ , Str "note]"
+ , Space
+ , Str "Here"
+ , Space
+ , Str "is"
+ , Space
+ , Str "an"
+ , Space
+ , Str "inline"
+ , Space
+ , Str "note."
+ , Note
+ [ Para
+ [ Str "This"
+ , SoftBreak
+ , Str "is"
+ , Space
+ , Emph [ Str "easier" ]
+ , Space
+ , Str "to"
+ , Space
+ , Str "type."
+ , Space
+ , Str "Inline"
+ , Space
+ , Str "notes"
+ , Space
+ , Str "may"
+ , Space
+ , Str "contain"
+ , SoftBreak
+ , Link
+ ( "" , [] , [] ) [ Str "links" ] ( "http://google.com" , "" )
+ , Space
+ , Str "and"
+ , Space
+ , Code ( "" , [] , [] ) "]"
+ , Space
+ , Str "verbatim"
+ , Space
+ , Str "characters,"
+ , SoftBreak
+ , Str "as"
+ , Space
+ , Str "well"
+ , Space
+ , Str "as"
+ , Space
+ , Str "[bracketed"
+ , Space
+ , Str "text]."
+ ]
+ ]
+ ]
+ , BlockQuote
+ [ Para
+ [ Str "Notes"
+ , Space
+ , Str "can"
+ , Space
+ , Str "go"
+ , Space
+ , Str "in"
+ , Space
+ , Str "quotes."
+ , Note [ Para [ Str "In" , Space , Str "quote." ] ]
+ ]
+ ]
+ , OrderedList
+ ( 1 , Decimal , Period )
+ [ [ Plain
+ [ Str "And"
+ , Space
+ , Str "in"
+ , Space
+ , Str "list"
+ , Space
+ , Str "items."
+ , Note [ Para [ Str "In" , Space , Str "list." ] ]
+ ]
+ ]
+ ]
+ , Para
+ [ Str "This"
+ , Space
+ , Str "paragraph"
+ , Space
+ , Str "should"
+ , Space
+ , Str "not"
+ , Space
+ , Str "be"
+ , Space
+ , Str "part"
+ , Space
+ , Str "of"
+ , Space
+ , Str "the"
+ , Space
+ , Str "note,"
+ , Space
+ , Str "as"
+ , Space
+ , Str "it"
+ , Space
+ , Str "is"
+ , Space
+ , Str "not"
+ , Space
+ , Str "indented."
+ ]
+ ]
diff --git a/test/writer.opendocument b/test/writer.opendocument
index fa524eb26..3095cef41 100644
--- a/test/writer.opendocument
+++ b/test/writer.opendocument
@@ -1017,7 +1017,7 @@
<style:style style:name="T6" style:family="text"><style:text-properties style:text-position="super 58%" /></style:style>
<style:style style:name="T7" style:family="text"><style:text-properties fo:font-style="italic" style:font-style-asian="italic" style:font-style-complex="italic" style:text-position="super 58%" /></style:style>
<style:style style:name="T8" style:family="text"><style:text-properties style:text-position="sub 58%" /></style:style>
- <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:wrap="none" /></style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:wrap="none" /></style:style>
<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Formula"><style:graphic-properties style:vertical-pos="middle" style:vertical-rel="text" /></style:style>
<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Quotations">
<style:paragraph-properties fo:margin-left="0.5in" fo:margin-right="0in" fo:text-indent="0in" style:auto-text-indent="false" />
@@ -1207,9 +1207,9 @@ link</text:span></text:a><text:bookmark-end text:name="level-2-with-an-embedded-
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="paragraphs" />Paragraphs<text:bookmark-end text:name="paragraphs" /></text:h>
<text:p text:style-name="First_20_paragraph">Here’s a regular
paragraph.</text:p>
-<text:p text:style-name="Text_20_body">In Markdown 1.0.0 and earlier. Version
-8. This line turns into a list item. Because a hard-wrapped line in the middle
-of a paragraph looked like a list item.</text:p>
+<text:p text:style-name="Text_20_body">In Markdown 1.0.0 and earlier. Version 8.
+This line turns into a list item. Because a hard-wrapped line in the middle of a
+paragraph looked like a list item.</text:p>
<text:p text:style-name="Text_20_body">Here’s one with a bullet. *
criminey.</text:p>
<text:p text:style-name="Text_20_body">There should be a hard line
@@ -1218,8 +1218,7 @@ break<text:line-break />here.</text:p>
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="block-quotes" />Block
Quotes<text:bookmark-end text:name="block-quotes" /></text:h>
<text:p text:style-name="First_20_paragraph">E-mail style:</text:p>
-<text:p text:style-name="P1">This is a block quote. It is pretty
-short.</text:p>
+<text:p text:style-name="P1">This is a block quote. It is pretty short.</text:p>
<text:p text:style-name="P2">Code in a block quote:</text:p>
<text:p text:style-name="P3">sub status {</text:p>
<text:p text:style-name="P4"><text:s text:c="4" />print &quot;working&quot;;</text:p>
@@ -1236,8 +1235,8 @@ short.</text:p>
<text:p text:style-name="P2">Nested block quotes:</text:p>
<text:p text:style-name="P7">nested</text:p>
<text:p text:style-name="P8">nested</text:p>
-<text:p text:style-name="First_20_paragraph">This should not be a block quote:
-2 &gt; 1.</text:p>
+<text:p text:style-name="First_20_paragraph">This should not be a block quote: 2
+&gt; 1.</text:p>
<text:p text:style-name="Text_20_body">And a following paragraph.</text:p>
<text:p text:style-name="Horizontal_20_Line" />
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="code-blocks" />Code
@@ -1464,12 +1463,12 @@ and spaces<text:bookmark-end text:name="tabs-and-spaces" /></text:h>
<text:p text:style-name="P37">this is a list item indented with
spaces</text:p><text:list text:style-name="L21">
<text:list-item>
- <text:p text:style-name="P38">this is an example list item indented
- with tabs</text:p>
+ <text:p text:style-name="P38">this is an example list item indented with
+ tabs</text:p>
</text:list-item>
<text:list-item>
- <text:p text:style-name="P38">this is an example list item indented
- with spaces</text:p>
+ <text:p text:style-name="P38">this is an example list item indented with
+ spaces</text:p>
</text:list-item>
</text:list>
</text:list-item>
@@ -1485,8 +1484,8 @@ list markers<text:bookmark-end text:name="fancy-list-markers" /></text:h>
<text:p text:style-name="P39">with a continuation</text:p>
<text:list>
<text:list-item>
- <text:p text:style-name="P39">sublist with roman numerals, starting
- with 4</text:p>
+ <text:p text:style-name="P39">sublist with roman numerals, starting with
+ 4</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P39">more items</text:p>
@@ -1537,8 +1536,7 @@ list markers<text:bookmark-end text:name="fancy-list-markers" /></text:h>
</text:list>
</text:list-item>
</text:list>
-<text:p text:style-name="First_20_paragraph">Should not be a list
-item:</text:p>
+<text:p text:style-name="First_20_paragraph">Should not be a list item:</text:p>
<text:p text:style-name="Text_20_body">M.A. 2007</text:p>
<text:p text:style-name="Text_20_body">B. Williams</text:p>
<text:p text:style-name="Horizontal_20_Line" />
@@ -1573,8 +1571,8 @@ fruit</text:p>
italics:</text:p>
<text:p text:style-name="Definition_20_Term"><text:span text:style-name="T1">apple</text:span></text:p>
<text:p text:style-name="Definition_20_Definition">red
-fruit</text:p><text:p text:style-name="Definition_20_Definition">contains
-seeds, crisp, pleasant to taste</text:p>
+fruit</text:p><text:p text:style-name="Definition_20_Definition">contains seeds,
+crisp, pleasant to taste</text:p>
<text:p text:style-name="Definition_20_Term"><text:span text:style-name="T1">orange</text:span></text:p>
<text:p text:style-name="Definition_20_Definition">orange
fruit</text:p><text:p text:style-name="P42">{ orange code block }</text:p><text:p text:style-name="P43">orange
@@ -1613,15 +1611,12 @@ fruit</text:p><text:list text:style-name="L25">
</text:list>
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="html-blocks" />HTML
Blocks<text:bookmark-end text:name="html-blocks" /></text:h>
-<text:p text:style-name="First_20_paragraph">Simple block on one
-line:</text:p>
+<text:p text:style-name="First_20_paragraph">Simple block on one line:</text:p>
<text:p text:style-name="Text_20_body">foo</text:p>
-<text:p text:style-name="Text_20_body">And nested without
-indentation:</text:p>
+<text:p text:style-name="Text_20_body">And nested without indentation:</text:p>
<text:p text:style-name="Text_20_body">foo</text:p>
<text:p text:style-name="Text_20_body">bar</text:p>
-<text:p text:style-name="Text_20_body">Interpreted markdown in a
-table:</text:p>
+<text:p text:style-name="Text_20_body">Interpreted markdown in a table:</text:p>
<text:p text:style-name="Text_20_body">This is
<text:span text:style-name="T1">emphasized</text:span></text:p>
<text:p text:style-name="Text_20_body">And this is
@@ -1689,13 +1684,13 @@ subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.</text:p>
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="smart-quotes-ellipses-dashes" />Smart
quotes, ellipses,
dashes<text:bookmark-end text:name="smart-quotes-ellipses-dashes" /></text:h>
-<text:p text:style-name="First_20_paragraph">“Hello,” said the spider.
-“‘Shelob’ is my name.”</text:p>
+<text:p text:style-name="First_20_paragraph">“Hello,” said the spider. “‘Shelob’
+is my name.”</text:p>
<text:p text:style-name="Text_20_body">‘A’, ‘B’, and ‘C’ are letters.</text:p>
<text:p text:style-name="Text_20_body">‘Oak,’ ‘elm,’ and ‘beech’ are names of
trees. So is ‘pine.’</text:p>
-<text:p text:style-name="Text_20_body">‘He said, “I want to go.”’ Were you
-alive in the 70’s?</text:p>
+<text:p text:style-name="Text_20_body">‘He said, “I want to go.”’ Were you alive
+in the 70’s?</text:p>
<text:p text:style-name="Text_20_body">Here is some quoted
‘<text:span text:style-name="Source_Text">code</text:span>’ and a
“<text:a xlink:type="simple" xlink:href="http://example.com/?foo=1&amp;bar=2" office:name=""><text:span text:style-name="Definition">quoted
@@ -1743,8 +1738,8 @@ five.</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P52">$22,000 is a
- <text:span text:style-name="T1">lot</text:span> of money. So is $34,000.
- (It worked if “lot” is emphasized.)</text:p>
+ <text:span text:style-name="T1">lot</text:span> of money. So is $34,000. (It
+ worked if “lot” is emphasized.)</text:p>
</text:list-item>
<text:list-item>
<text:p text:style-name="P52">Shoes ($20) and socks ($5).</text:p>
@@ -1778,8 +1773,8 @@ Characters<text:bookmark-end text:name="special-characters" /></text:h>
<text:p text:style-name="P53">copyright: ©</text:p>
</text:list-item>
</text:list>
-<text:p text:style-name="First_20_paragraph">AT&amp;T has an ampersand in
-their name.</text:p>
+<text:p text:style-name="First_20_paragraph">AT&amp;T has an ampersand in their
+name.</text:p>
<text:p text:style-name="Text_20_body">AT&amp;T is another way to write
it.</text:p>
<text:p text:style-name="Text_20_body">This &amp; that.</text:p>
@@ -1888,25 +1883,23 @@ icon.</text:p>
<text:h text:style-name="Heading_20_1" text:outline-level="1"><text:bookmark-start text:name="footnotes" />Footnotes<text:bookmark-end text:name="footnotes" /></text:h>
<text:p text:style-name="First_20_paragraph">Here is a footnote
reference,<text:note text:id="ftn0" text:note-class="footnote"><text:note-citation>1</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here
-is the footnote. It can go anywhere after the footnote reference. It need not
-be placed at the end of the document.</text:p></text:note-body></text:note>
-and
+is the footnote. It can go anywhere after the footnote reference. It need not be
+placed at the end of the document.</text:p></text:note-body></text:note> and
another.<text:note text:id="ftn1" text:note-class="footnote"><text:note-citation>2</text:note-citation><text:note-body><text:p text:style-name="Footnote">Here’s
the long note. This one contains multiple
blocks.</text:p><text:p text:style-name="Footnote">Subsequent blocks are
indented to show that they belong to the footnote (as with list
items).</text:p><text:p text:style-name="P58"><text:s text:c="2" />{ &lt;code&gt; }</text:p><text:p text:style-name="Footnote">If
you want, you can indent every line, but you can also be lazy and just indent
-the first line of each block.</text:p></text:note-body></text:note> This
-should <text:span text:style-name="T1">not</text:span> be a footnote
-reference, because it contains a space.[^my note] Here is an inline
+the first line of each block.</text:p></text:note-body></text:note> This should
+<text:span text:style-name="T1">not</text:span> be a footnote reference, because
+it contains a space.[^my note] Here is an inline
note.<text:note text:id="ftn2" text:note-class="footnote"><text:note-citation>3</text:note-citation><text:note-body><text:p text:style-name="Footnote">This
-is <text:span text:style-name="T1">easier</text:span> to type. Inline notes
-may contain
+is <text:span text:style-name="T1">easier</text:span> to type. Inline notes may
+contain
<text:a xlink:type="simple" xlink:href="http://google.com" office:name=""><text:span text:style-name="Definition">links</text:span></text:a>
-and <text:span text:style-name="Source_Text">]</text:span> verbatim
-characters, as well as [bracketed
-text].</text:p></text:note-body></text:note></text:p>
+and <text:span text:style-name="Source_Text">]</text:span> verbatim characters,
+as well as [bracketed text].</text:p></text:note-body></text:note></text:p>
<text:p text:style-name="P59">Notes can go in
quotes.<text:note text:id="ftn3" text:note-class="footnote"><text:note-citation>4</text:note-citation><text:note-body><text:p text:style-name="Footnote">In
quote.</text:p></text:note-body></text:note></text:p>
diff --git a/test/writer.opml b/test/writer.opml
index bfe1e5de6..6bdcb882e 100644
--- a/test/writer.opml
+++ b/test/writer.opml
@@ -52,7 +52,7 @@
</outline>
<outline text="LaTeX" _note="- &#10;- 2 + 2 = 4&#10;- *x* ∈ *y*&#10;- *α* ∧ *ω*&#10;- 223&#10;- *p*-Tree&#10;- Here’s some display math:&#10; $$\\frac{d}{dx}f(x)=\\lim\_{h\\to 0}\\frac{f(x+h)-f(x)}{h}$$&#10;- Here’s one that has a line break in it: *α* + *ω* × *x*².&#10;&#10;These shouldn’t be math:&#10;&#10;- To get the famous equation, write `$e = mc^2$`.&#10;- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is&#10; emphasized.)&#10;- Shoes ($20) and socks ($5).&#10;- Escaped `$`: $73 *this should be emphasized* 23$.&#10;&#10;Here’s a LaTeX table:&#10;&#10;------------------------------------------------------------------------">
</outline>
-<outline text="Special Characters" _note="Here is some unicode:&#10;&#10;- I hat: Î&#10;- o umlaut: ö&#10;- section: §&#10;- set membership: ∈&#10;- copyright: ©&#10;&#10;AT&amp;T has an ampersand in their name.&#10;&#10;AT&amp;T is another way to write it.&#10;&#10;This &amp; that.&#10;&#10;4 &amp;lt; 5.&#10;&#10;6 &amp;gt; 5.&#10;&#10;Backslash: \\&#10;&#10;Backtick: \`&#10;&#10;Asterisk: \*&#10;&#10;Underscore: \_&#10;&#10;Left brace: {&#10;&#10;Right brace: }&#10;&#10;Left bracket: \[&#10;&#10;Right bracket: \]&#10;&#10;Left paren: (&#10;&#10;Right paren: )&#10;&#10;Greater-than: &amp;gt;&#10;&#10;Hash: #&#10;&#10;Period: .&#10;&#10;Bang: !&#10;&#10;Plus: +&#10;&#10;Minus: -&#10;&#10;------------------------------------------------------------------------">
+<outline text="Special Characters" _note="Here is some unicode:&#10;&#10;- I hat: Î&#10;- o umlaut: ö&#10;- section: §&#10;- set membership: ∈&#10;- copyright: ©&#10;&#10;AT&amp;T has an ampersand in their name.&#10;&#10;AT&amp;T is another way to write it.&#10;&#10;This &amp; that.&#10;&#10;4 &amp;lt; 5.&#10;&#10;6 &amp;gt; 5.&#10;&#10;Backslash: \\&#10;&#10;Backtick: \`&#10;&#10;Asterisk: \*&#10;&#10;Underscore: \_&#10;&#10;Left brace: {&#10;&#10;Right brace: }&#10;&#10;Left bracket: \[&#10;&#10;Right bracket: \]&#10;&#10;Left paren: (&#10;&#10;Right paren: )&#10;&#10;Greater-than: &amp;gt;&#10;&#10;Hash: \#&#10;&#10;Period: .&#10;&#10;Bang: !&#10;&#10;Plus: +&#10;&#10;Minus: -&#10;&#10;------------------------------------------------------------------------">
</outline>
<outline text="Links">
<outline text="Explicit" _note="Just a [URL](/url/).&#10;&#10;[URL and title](/url/ &quot;title&quot;).&#10;&#10;[URL and title](/url/ &quot;title preceded by two spaces&quot;).&#10;&#10;[URL and title](/url/ &quot;title preceded by a tab&quot;).&#10;&#10;[URL and title](/url/ &quot;title with &quot;quotes&quot; in it&quot;)&#10;&#10;[URL and title](/url/ &quot;title with single quotes&quot;)&#10;&#10;[with\_underscore](/url/with_underscore)&#10;&#10;[Email link](mailto:nobody@nowhere.net)&#10;&#10;[Empty]().">
diff --git a/test/writer.org b/test/writer.org
index df9d2b3a5..604aca21d 100644
--- a/test/writer.org
+++ b/test/writer.org
@@ -81,9 +81,9 @@ E-mail style:
Code in a block quote:
#+begin_example
- sub status {
- print "working";
- }
+ sub status {
+ print "working";
+ }
#+end_example
A list:
@@ -115,21 +115,21 @@ And a following paragraph.
Code:
#+begin_example
- ---- (should be four hyphens)
+---- (should be four hyphens)
- sub status {
- print "working";
- }
+sub status {
+ print "working";
+}
- this code block is indented by one tab
+this code block is indented by one tab
#+end_example
And:
#+begin_example
- this code block is indented by two tabs
+ this code block is indented by two tabs
- These should not be escaped: \$ \\ \> \[ \{
+These should not be escaped: \$ \\ \> \[ \{
#+end_example
--------------
@@ -348,7 +348,7 @@ Multiple blocks with italics:
- /orange/ :: orange fruit
#+begin_example
- { orange code block }
+ { orange code block }
#+end_example
#+begin_quote
@@ -446,15 +446,15 @@ foo
This should be a code block, though:
#+begin_example
- <div>
- foo
- </div>
+<div>
+ foo
+</div>
#+end_example
As should this:
#+begin_example
- <div>foo</div>
+<div>foo</div>
#+end_example
Now, nested:
@@ -485,7 +485,7 @@ Multiline:
Code block:
#+begin_example
- <!-- Comment -->
+<!-- Comment -->
#+end_example
Just plain comment, with trailing spaces on the line:
@@ -497,7 +497,7 @@ Just plain comment, with trailing spaces on the line:
Code:
#+begin_example
- <hr />
+<hr />
#+end_example
Hr's:
@@ -566,8 +566,8 @@ Superscripts: a^{bc}d a^{/hello/} a^{hello there}.
Subscripts: H_{2}O, H_{23}O, H_{many of them}O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
--------------
@@ -728,7 +728,7 @@ Indented [[/url][thrice]].
This should [not][] be a link.
#+begin_example
- [not]: /url
+[not]: /url
#+end_example
Foo [[/url/][bar]].
@@ -739,8 +739,7 @@ Foo [[/url/][biz]].
:PROPERTIES:
:CUSTOM_ID: with-ampersands
:END:
-Here's a [[http://example.com/?foo=1&bar=2][link with an ampersand in the
-URL]].
+Here's a [[http://example.com/?foo=1&bar=2][link with an ampersand in the URL]].
Here's a link with an amersand in the link text: [[http://att.com/][AT&T]].
@@ -767,7 +766,7 @@ An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]]
Auto-links should not occur here: =<http://example.com/>=
#+begin_example
- or here: <http://example.com/>
+or here: <http://example.com/>
#+end_example
--------------
@@ -801,8 +800,8 @@ note.[fn:3]
This paragraph should not be part of the note, as it is not indented.
-[fn:1] Here is the footnote. It can go anywhere after the footnote reference.
- It need not be placed at the end of the document.
+[fn:1] Here is the footnote. It can go anywhere after the footnote reference. It
+ need not be placed at the end of the document.
[fn:2] Here's the long note. This one contains multiple blocks.
@@ -810,11 +809,11 @@ This paragraph should not be part of the note, as it is not indented.
(as with list items).
#+begin_example
- { <code> }
+ { <code> }
#+end_example
- If you want, you can indent every line, but you can also be lazy and
- just indent the first line of each block.
+ If you want, you can indent every line, but you can also be lazy and just
+ indent the first line of each block.
[fn:3] This is /easier/ to type. Inline notes may contain
[[http://google.com][links]] and =]= verbatim characters, as well as
diff --git a/test/writer.plain b/test/writer.plain
index b8767957f..b9425f9c0 100644
--- a/test/writer.plain
+++ b/test/writer.plain
@@ -5,7 +5,7 @@ July 17, 2006
This is a set of tests for pandoc. Most of them are adapted from John Gruber’s
markdown test suite.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Headers
@@ -29,7 +29,7 @@ Level 2
with no blank line
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Paragraphs
@@ -44,7 +44,7 @@ Here’s one with a bullet. * criminey.
There should be a hard line break
here.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Block Quotes
@@ -73,7 +73,7 @@ This should not be a block quote: 2 > 1.
And a following paragraph.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Code Blocks
@@ -93,7 +93,7 @@ And:
These should not be escaped: \$ \\ \> \[ \{
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Lists
@@ -250,7 +250,7 @@ M.A. 2007
B. Williams
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Definition Lists
@@ -395,7 +395,7 @@ Code:
Hr’s:
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Inline Markup
@@ -421,10 +421,10 @@ Superscripts: a^(bc)d a^(hello) a^(hello there).
Subscripts: H₂O, H₂₃O, H_(many of them)O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Smart quotes, ellipses, dashes
@@ -444,7 +444,7 @@ Dashes between numbers: 5–7, 255–66, 1987–1999.
Ellipses…and…and….
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
LaTeX
@@ -468,7 +468,7 @@ These shouldn’t be math:
Here’s a LaTeX table:
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Special Characters
@@ -522,7 +522,7 @@ Plus: +
Minus: -
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Links
@@ -594,7 +594,7 @@ Auto-links should not occur here: <http://example.com/>
or here: <http://example.com/>
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Images
@@ -604,7 +604,7 @@ From “Voyage dans la Lune” by Georges Melies (1902):
Here is a movie [movie] icon.
-------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
Footnotes
@@ -622,13 +622,13 @@ need not be placed at the end of the document.
[2] Here’s the long note. This one contains multiple blocks.
-Subsequent blocks are indented to show that they belong to the footnote (as
-with list items).
+Subsequent blocks are indented to show that they belong to the footnote (as with
+list items).
{ <code> }
-If you want, you can indent every line, but you can also be lazy and just
-indent the first line of each block.
+If you want, you can indent every line, but you can also be lazy and just indent
+the first line of each block.
[3] This is easier to type. Inline notes may contain links and ] verbatim
characters, as well as [bracketed text].
diff --git a/test/writer.rst b/test/writer.rst
index 8d68f7ed5..0baaa670c 100644
--- a/test/writer.rst
+++ b/test/writer.rst
@@ -580,8 +580,8 @@ Superscripts: a\ :sup:`bc`\ d a\ :sup:`hello` a\ :sup:`hello there`.
Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O, H\ :sub:`many of them`\ O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
--------------
diff --git a/test/writer.rtf b/test/writer.rtf
index 4f3751b36..6b8c5a0c3 100644
--- a/test/writer.rtf
+++ b/test/writer.rtf
@@ -1,4 +1,4 @@
-{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}}
+{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}}
{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
\widowctrl\hyphauto
@@ -9,28 +9,28 @@
{\pard \ql \f0 \sa180 \li0 \fi0 \par}
{\pard \ql \f0 \sa180 \li0 \fi0 This is a set of tests for pandoc. Most of them are adapted from John Gruber\u8217's markdown test suite.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Headers\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2 with an {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Headers\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2 with an {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul
embedded link
}}}
\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs28 Level 3 with {\i emphasis}\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs24 Level 4\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs20 Level 5\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Level 1\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2 with {\i emphasis}\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs28 Level 3\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel2 \b \fs28 Level 3 with {\i emphasis}\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel3 \b \fs24 Level 4\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel4 \b \fs20 Level 5\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Level 1\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2 with {\i emphasis}\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel2 \b \fs28 Level 3\par}
{\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Level 2\par}
{\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Paragraphs\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Paragraphs\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a regular paragraph.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's one with a bullet. * criminey.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 There should be a hard line break\line here.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Block Quotes\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Block Quotes\par}
{\pard \ql \f0 \sa180 \li0 \fi0 E-mail style:\par}
{\pard \ql \f0 \sa180 \li720 \fi0 This is a block quote. It is pretty short.\par}
{\pard \ql \f0 \sa180 \li720 \fi0 Code in a block quote:\par}
@@ -46,7 +46,7 @@ embedded link
{\pard \ql \f0 \sa180 \li0 \fi0 This should not be a block quote: 2 > 1.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 And a following paragraph.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Code Blocks\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Code Blocks\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Code:\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \f1 ---- (should be four hyphens)\line
\line
@@ -60,8 +60,8 @@ this code block is indented by one tab\par}
\line
These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Lists\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Unordered\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Lists\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Unordered\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Asterisks tight:\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 1\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 2\par}
@@ -86,7 +86,7 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 1\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 2\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 3\sa180\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Ordered\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Ordered\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Tight:\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab First\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Second\par}
@@ -108,7 +108,7 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \ql \f0 \sa180 \li360 \fi0 Item 1. graf two. The quick brown fox jumped over the lazy dog\u8217's back.\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Item 2.\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Item 3.\sa180\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Nested\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Nested\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Tab\par}
{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Tab\par}
{\pard \ql \f0 \sa0 \li1080 \fi-360 \bullet \tx360\tab Tab\sa180\sa180\sa180\par}
@@ -126,12 +126,12 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fie\par}
{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Foe\sa180\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Third\sa180\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Tabs and spaces\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Tabs and spaces\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with tabs\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with spaces\par}
{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with tabs\par}
{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with spaces\sa180\sa180\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Fancy list markers\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Fancy list markers\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 (2)\tx360\tab begins with 2\par}
{\pard \ql \f0 \sa180 \li360 \fi-360 (3)\tx360\tab and now 3\par}
{\pard \ql \f0 \sa180 \li360 \fi0 with a continuation\par}
@@ -152,7 +152,7 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \ql \f0 \sa180 \li0 \fi0 M.A.\u160?2007\par}
{\pard \ql \f0 \sa180 \li0 \fi0 B. Williams\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Definition Lists\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Definition Lists\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Tight using spaces:\par}
{\pard \ql \f0 \sa0 \li0 \fi0 apple\par}
{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par}
@@ -204,7 +204,7 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par}
{\pard \ql \f0 \sa0 \li720 \fi-360 1.\tx360\tab sublist\par}
{\pard \ql \f0 \sa0 \li720 \fi-360 2.\tx360\tab sublist\sa180\sa180\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 HTML Blocks\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 HTML Blocks\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Simple block on one line:\par}
{\pard \ql \f0 \sa0 \li0 \fi0 foo\par}
{\pard \ql \f0 \sa180 \li0 \fi0 And nested without indentation:\par}
@@ -232,7 +232,7 @@ These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \f1 <hr />\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Hr\u8217's:\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Inline Markup\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Inline Markup\par}
{\pard \ql \f0 \sa180 \li0 \fi0 This is {\i emphasized}, and so {\i is this}.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 This is {\b strong}, and so {\b is this}.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 An {\i {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul
@@ -249,7 +249,7 @@ emphasized link
{\pard \ql \f0 \sa180 \li0 \fi0 Subscripts: H{\sub 2}O, H{\sub 23}O, H{\sub many\u160?of\u160?them}O.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Smart quotes, ellipses, dashes\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Smart quotes, ellipses, dashes\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \u8220"Hello,\u8221" said the spider. \u8220"\u8216'Shelob\u8217' is my name.\u8221"\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'A\u8217', \u8216'B\u8217', and \u8216'C\u8217' are letters.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'Oak,\u8217' \u8216'elm,\u8217' and \u8216'beech\u8217' are names of trees. So is \u8216'pine.\u8217'\par}
@@ -262,7 +262,7 @@ quoted link
{\pard \ql \f0 \sa180 \li0 \fi0 Dashes between numbers: 5\u8211-7, 255\u8211-66, 1987\u8211-1999.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Ellipses\u8230?and\u8230?and\u8230?.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 LaTeX\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 LaTeX\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab \par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab 2\u8197?+\u8197?2\u8196?=\u8196?4\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i x}\u8196?\u8712?\u8196?{\i y}\par}
@@ -278,7 +278,7 @@ quoted link
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Escaped {\f1 $}: $73 {\i this should be emphasized} 23$.\sa180\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a LaTeX table:\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Special Characters\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Special Characters\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Here is some unicode:\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab I hat: \u206?\par}
{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab o umlaut: \u246?\par}
@@ -307,8 +307,8 @@ quoted link
{\pard \ql \f0 \sa180 \li0 \fi0 Plus: +\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Minus: -\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Links\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Explicit\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Links\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Explicit\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Just a {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul
URL
}}}
@@ -345,7 +345,7 @@ Email link
Empty
}}}
.\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Reference\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Reference\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul
bar
}}}
@@ -380,7 +380,7 @@ bar
biz
}}}
.\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 With ampersands\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 With ampersands\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul
link with an ampersand in the URL
}}}
@@ -397,7 +397,7 @@ inline link
inline link in pointy braces
}}}
.\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Autolinks\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Autolinks\par}
{\pard \ql \f0 \sa180 \li0 \fi0 With an ampersand: {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul
http://example.com/?foo=1&bar=2
}}}
@@ -419,12 +419,12 @@ http://example.com/
{\pard \ql \f0 \sa180 \li0 \fi0 Auto-links should not occur here: {\f1 <http://example.com/>}\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \f1 or here: <http://example.com/>\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Images\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Images\par}
{\pard \ql \f0 \sa180 \li0 \fi0 From \u8220"Voyage dans la Lune\u8221" by Georges Melies (1902):\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 {\pict\jpegblip\picw250\pich250\picwgoal3000\pichgoal3000\bin ffd8ffe000104a46494600010101007800780000ffdb00430006040506050406060506070706080a100a0a09090a140e0f0c1017141818171416161a1d251f1a1b231c1616202c20232627292a29191f2d302d283025282928ffdb0043010707070a080a130a0a13281a161a2828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828ffc000110800fa00fa03011100021101031101ffc4001c0000000701010000000000000000000000010203040506070008ffc4003e100002010303020404040502050500030001020300041105122106311322415107617181143291a1234252b1c115f016336272d1082443e1f1265382ffc40017010101010100000000000000000000000000010204ffc4001b11010101010003010000000000000000000001110212213141ffda000c03010002110311003f00dadd18a10a704f6a95ccc57e37750782b0d8d9ea0cd32e7c5446e07e9f4ad723119a7b89e61e348f260719278aad613cbb640002938c76a182b264fc87bd13009c0c019c76e3d68a072e1cf6f4cd502d330c28269a61bb39c923923d4fad44c08dccb95cfd28b8280769ee08a263891e1808739e4f1d8d149392172cc714050dbb9fde8960ed8c60b79b1ed44103b05c331dbdb1dc5026ac1946d20ff8140aa631c773ec738a0346a003bf93e9cf02801895e7b9a01886796c923bd0090a06393c76a0142003ce3d86680d8dd9392303f5341ccc1b3cf7a2c812c37e4923d381429757013209fa511c18146c9247a0f6a007900c0c671c6280854e086c673eb45c27c038fd68aedff2fda836ef881f136f25d5e6b7d1262964aa02b03f98fbf153131935edcc97576f35c33349212cc4f39f7ab26186dfce5b200f73451f7600dcb8cf27e7400c0b291914046c9e0718fde81371b8e7273f4ef4007691919240e714097f31f376e7b5008caee27807b0f5a02c8e1b3c6d27d33cd0201d839523144d1a149ae084b78da47638211771fd050d582c3a0faab5119b6d12f8ab1c06788a0fd4e2ac356fd1fe08754ddccaba849696309e598c9e2103fed1dcfdeadc44fea5ff00a7f956366d375e492403ca935bedcf1eea4ff6ac68a55efc1beb3b552574f8e7009ff933a927ec715bc82b3a8f4d6bba5ca1352d22fe061cf9a0383f71dea5119cc6c0baed3eaac0f1fad40897dcc3d81f7a052366c1007df3400f21edefc5008c28f30c9c5170ee4fc37830086395250a7c66770c18e78da31c0c63de8609b41f7c515c5172a30c3b76344a3e377cb2339cf7a242aea89808cce368272b8c1a2e107c672a49f5c1a181c9c7ae7da8a2119e7b1f5068099ffa68258a132062d8f9e0f34059502b61bf2824e681bb297ced2a71efda80f19c47b9c77fdbe74057c13e539cf3c1a0eeeb9c73f33405ddb4f18249c1e28062b79ae242902024465b9214614649e7bd0362a7249eddc513456e5720f38f5a1a98e96e95d6baa6ebc2d1ad1e65521649bb469f563534d6d7d31f04347d2a2fc5f535db6a0e83718906c887cbbe5a9a8bef44dce9f731ca9a2e89169d6d6f2184b1455dc07b11dcfeb4d16f119c649a681285b03d3e5500f87820ff006a0e098191de80ac9b8904647b55d11da9681a56a31f87a869f6970b8ffe4883629a289aefc16e92d441682da5b098f21ed9f033f353914d19b751fc08d66cc16d12fe2bf45ec92ff0df1fdbfb559ec667aff4eeb1a04db359d3ae6d40eccebe53f46ec7f5ab82263da7dcf3eb5174e5181076918c7de869503232491ee4515c1803824f03b51287f30e0e7d803449494832c157278a2e8c71fcb9f9d144639236824d01e142efb1768cfb9c7ef40512a818de78ff00a682518e7cc30ab9e00a02cce9953247bd41e467191ed9a04205ee99da4e4e3d283a524b0427b5026c18a8e082067db8341ce0e39ed409b6502907391edda80f2dfdc496f0c124ac6184b144cf0a4e338fd2894f7a7342d4ba9b568f4fd261f12571966270a8bfd47d8511bae85f02b47b7fc34bac5d5c5dc88a0c90ab6c8d9bedce3ef4d1ad691a6dae976a96d616d15b409f9638d70054a1dbc68ea51d4329f4619a8022b78e04548515117b05000a035c5c4702a995c26e3819f534047bcb68a458cce866719540724d02e41c0f7a012a40f6141cbc8e7bd01719e38e6838af1c0a04ca8206d3cd037bdb082fad9e0bd8a39e0718649141047d0d5d18f759fc0cd3af164b8e9999acae4e4f81236e898f7c0f55fed574615aee83a96817ef67abda3db4ebdb7f66f983d88a061bb8db9e3d45165076db83c1f950a53780d8247c80a2398f182724f1c7ad080c608cfa7a51a0062adc7afbd0130173bb9c5070f071cb37e82826106e8f615e01c9e680d6b35bc534be3c1e3831b2aa962bb188f2b71df1de819ae4b1048c7f57bd01a58268e332642ae0704f7cf6207af6a01b99e17b7b6416e227407c494139909ed9f4c0a04a4e501e0f1eb40d263e53dce7fa682c9d0bd13abf58dd6db18bc2b157c4975270ab8ef8f563f21447a73a03a1f4de8eb031582b497328066b97fcd21ff038edfde88b7e32703bd64188e7e6283864b73400cd804b67ca3268317eacea6d56ff005233592f8b6303f953fa4af7c2fa93417fe98b763e0ea171297bab98558068f695ce0e08fdbd281e5c6a57ba5e9d14d716ef7774f2ec112601da4f27ec2827ada74bab559a20e148fcae36b0f91140283729c77a0e0a7777a01dac68395719e39a029607cb901b19c501480ab9279f4a086ea8d0b48d76c0586b7143224a76c61ce1831fe93e86b43cd1f12fe19ea7d2533dcdbeebcd20b612651e68f9ece3fcf6fa5067cbcf20ff009a051724905411e94032799060723da8406d6c67e7ea68d0e1770fe5cfb5026c37039ef9a02eca098c91e6e01e71c500b1d8a49c12786cf6a06a4e256008e3d050119958007920e2801154e32fb4120927b014017eb1c523ac5209a356215c291b87be28957ef853f0d66eaa99352d515e1d190f947669ce7b0ffa7e74a8f4be996569a5d9c56b6704705b46bb5238d42851f2ac875712bc70b3c30f892019540704d01ad2669a0491936330c95ce7140b2e4939a03638c7e8680ae485e33bbe540d60d3ada162c90a02c7270a39340a4f28b68da4645007a8f6a069a746f73235ddcefc391e12b2e1916824948742c99382473c73404791c617695279dc0640f9502c578c9efeb4095cb4cb0830ba21cf999c6401f4f5a05061d430c8079a02e03b3004311c7d281b5e3cd676c65489ee594e4aafe6c7ae07a9a0a075bbea3a8ea96f047d3935ebc404f04ad29411e08e011d98fed416fd212ee5b05b4d5ad6300c615807f1171eaa49eff5ad418c7c55f8466dd66d57a521f20cbcd66a7247a9283dbe5418a63862479877cf1f6c5008e400bdf1ce684016fe53dfbd1a73794600e08ce3d6800377c8c7d6800a9cf75fd4503d91492460f7ee3d28247a7b459f5fd592d22711c206f9e563858a31f99cfd050583518ba75247b1d134f9aed21396d4669769931dc01c003f7a329c4d17458ac5b55d36c12e040a3f1da75c1cb04ede2447f7f6a94567ad7a66db4fbbb29ba7d65b8b4bd8ccd09c8231eaa07b8ab04a7c2cf87b3f53ea8d77abc72c1a5dabe2452bb5a561fc83e5ee7e541e988218ed2dd22b7855228d76a46a00000ec00a510bd4dd511f4fe84da95cc31f880022da4902b1e7d3e99ac86fd03d631f565b4ee6d4dbbc649009cab2e48c83f514165b8b94b6895c44f279c280839e78ce28178ae6de46748a789e453865570483ec6812d42e85a421fc37918b00a883924d024c6e99b7a2a966c0009e17dc9f9fed40f81c77e28139218e4ff9815b9cf23340a01c907b9140201038ed402fcafd28386464e4fd33c50272bc60032609cf00fbd024f722dc66f24822ddf972f8feff00e280f69b24844919cac9ce7de83a447f30ded823007b50459d6ecacb528349b979127651b1dc795f1f3f7a0990148054823dc5015d491c0a0c3be337c2ff00c489b5ee9c87172016b9b541c49ff5a8f7f71eb560c1fc43e0a47e1aa94277310431f91fa551c1727f29ed409b641c86e31839a3454805739c1f6a026f1fd740f64665fc8c31cfde82db79bb40e9e8f49b62eb7d7e8b717ec832c91ff247fa1dc7df2281bcc9369d671493c422b7911654c1215f92bb8827bf068624ba635392df5eb4b9924558ee5bc19b71cee43c6dc7cf34c657be8db0b0b9d0f51d2afe668934dbf9628ddb8c2b8c0073f3a80da37546a7d25174fd95dc125c69f7313ee5655dfc313bd483cf07b1f6a68d5b48d5ec758b612e9d7293211c8fe653f35ee2a084eb9e8bb1eafb3582fe496278f3e1c919fcb9f97ad03ee8dd017a6741b6d3229dae161057c5750a48249ec3eb4139238568f6a9e7b103b5037934cb3793c610a2cd9277a8da73f5140ee38f6280c4b11c65b934023006d50050030e4647de80c846de3b500fcf9fbd0197273ed4007b91400e580c8e45074a82400e72682b36fd2162b7f25ddc09af2766ceeb872db79cf00f6a0b3229550140e07007a50092db860673de818df473c862686dad6470d9cce3b7b63e740fa1de6252ebb5bd81cd00bee2d800d003a6464004763ce683ce9f1cbe1f1d3a67ea1d1a30b68edffba814708c7f9c63d0fafceaca31e6dc71e1f07daa82608c83819f7a1a11ce149238fd68d0a579ec682cfd27a7c3a86bd10bc38b3b756b8b93c1fe1a8c91f7381f7a034f752ea5aa5c5eb292f732128037619c018f6ec282e5a2cb047abda74d5ce9b6da80f136de4a496219b3e48c92000323ea73467519d3da5bb757dbda410ac90c77c23058f99007ee7ec31416882ee47d23acb5185caf8bab4691b1efe57fff0038a9457ee75a82f6e7429350466b482f2742c0f74241c80c38c64541a9cfa1e89ac0177d33ab3d8de28f2b5bca429f91140e2c7a9b5ae9fb85b6ea9b46b9b3c796fe040768f76ec0fafb1f9505df4ebdb3d4edd6e74db98ee216fe68ce47d280648f75e2485a44da385ddc13f4a025ddbdbea16a633286566ce55f9c8f6c502ad750db2c514f30dec428247e6340bbf04100b73402afb943ed2b9e30683836defe9403bc1e06734020e06280cafe8683a375941d841c77c1a0151b467b50159f00e4127e5402872371040c5046eb5aadbe9b1c02e2f6dad25b89047099c677b7b0140fe3f1010afc803f3018e68160c3041ee2823f5dba92d34db89a1d9e2843b03b6d05bd013560c1748d57aa2797c6b35bab78e6959dc47231580ff336dcfb03c1a58364b5bbb7d7fa7b7427f1f673830c8664285bd1815238fad20f2c7c41e979ba43aa2e2c1cb1b663bede438f3a13c7dc76fb5515e9065b851f7a02950002a09c51a1b83cf14176e90d3645e9ad7752752aac23b3439c066665c827e944d29a6410aea725c4567135bd840d3c88a723728c29c9efe6c50d3ee9545b0bf8ef2e6e3c2fc2c6f72f2920e5f19039ee4938a9a875d03278377acf52ddf867f036ef71923932bfe51fbd3475cdc369df0db4fb389d4ea37970fa9cc0b00511795ce7d4f181eb4cd2451755fc45ac16d637381b14ca36b641dfce723e4053170d6cb52bbb362f6d3cb19241f2b9029862f09f143549ba7e7d2eef6caf2797c66ee17fdfd69862d1a069da7dfdac579d17adcda5ea9e1a992376c4723e39e3b024fd7e94c458ac3e25dee8d31d3bae74e7b79002bf8b8549471db38f5f4ed4c165e943a06a328d4ba605b4b22a1523c420c64fbaf38a82d36f0ce7cf7463790729b53017e940e0b0ceceed8ce0500e1b70daa08f5c9ed41d271cd0132476e7d7ff00aa069797d2411168ed9a41fcc858211f73c5075acb25ca6fb82aa31e58a36c81f561dcd033d42169e158ac64b98151b3981c2966cf639f4a064c7a8ac55e4865b7d493701e1c8e52403ea3cbfda827e390ca3f2c914aa81991bd281cdacc2747215c60e0ee5c67e940cb51b0b2bcbd824bfb08ee1a252d1caea1821cfa67b1fa504982b2283ce08f518a08abb82f6dd0369a5662081e14ce40c7ae1b04fda82275cb0bfd4f4536f7114589a5412461f3e4ce4e0e060f63f6ab2893d3b4b5b5b78e22ed22aae3cc3cc7e64fad3449a22a461500007602a0cd7e3b74c26b5d2ad79147baf34eccca40e4a7f30ff3f6aba3cd0543267eb5427b86f1f4c76ef45d0eca1ad5ef224d13e1cf4fd9b22192fa67bc955f8c8c617fba9fb510d7a6ed3fd43a735e5b54964be658c048fb6cdd9e7eb8a186bac97d174e6d22e23437b7ac26b95e77c68bf950fa7279e2b22dba45b59e97a669fa4ea36aeff89cea9a90451fc355ff0096ad9f4ce3f41570675d4fa8c77da8de5cde5be26bc653171ca47dc1f6c9fed5562b97f70276808da7c24f0c1c63804e33fa8a2928c0e0383c8f7ed41d92a41393f4a2548595c2c37493db4cd04e8a08f139566edfef3445b6e7aeaf65d2df48ea2b11776ae02a93e564c772adef409f4ee8ba9a21d73a36fa579ad9f325afe599171ed9c30a960d5ba0fe2843abb47a6f510fc26a4c36890f9558fcc6783506a1147b510024e30339ce680d2c6ae9861eb9a009178a0205443b989e39cd01d8075e3047ce80563057ca381ed4011c4531e503d85013c91b804a21279c903341131cda8c3abdc8650f6d20c4321232adec3dc504bab2c113c9293bb1963df3408dd4b75e1efb2856463dbc43b4631fad047e9177ad4fe32ea16b1db4b8fe1aa92571f5f5a0916bc8e0895af5c46c17cd8c9ff7da80f6d736f7f6915c59cab35bc837238ed8a072a31c1ef4062870718a06f7702dc5b3c522ee4752ae0fa8230683c75d6ba3b74ef535fe984929149e4278ca9e47edfdab42058003763ed409f88ffd6dfad06b1f12ae612fa0c76e0b471e9916d23f973eb4158d3efeff004a984da5debc1295d8e4018dbf3145d583a2ad96f356bbd7f5d90dc59587f1e79a6392f28fcaa3ee47159444ea3aa5ddfc7acf50dcdc344d7a4dbc317f52641200f6000fdeb41b5ef51d8eab672ffa9e971c97c11638268e431a46000012a3b9a351567db823b11f3ef40948e428048207a8340ab48ae83cb83ee0f3428a982719edf3e68c9cc97d3fe15ad8c9be138f2bf38e7b8f6ef40f7a5f55bdd3f56b46d3649127f1405f08e7249c76f5fa50689d48ba5f545cdcbdb462cba9206411b2b055bb07d4fb1c73528d4fa8f52d62cf47b6b8d2e65fc458c49f8a818795c151939f977a823ba0fe253750eb7fe937b04293f9f6c90be41dbdc7ff006283473c1efc1a06f69776d73bbf0f2aca32572bc80470450284a46dfca19f819f5a04e799614def26c0bdce09cfd85045dc75769d12dc3c3e2491db0dd3c85195235f7c91cfd066ae0cdba9be31f4ec61a386c1ef9d4ee473e45cfb1cf34c101d3ff1ac9d481d46c628ed24751881880833f988e7b0fa5328dfed2f2def2ce2b9b79925b791772ca87208f7a60182ee2b95cc0c48f53823fbd40ac658b30f4f4a086d4ee1d75bb6b78f4e965596366fc5211b23238008fde81f43692da5bc30d97831a0397dc09e3d714087506bf61a2c4cd77324726d2caaec141f9fd2ae0c435bf8c57173ad7876f7a2daca10489121244cdf319ce3dbf5a834fe81f881a6f57bcb6ba7c53c72c11873e28cee1db391dbef4199ff00ea4348116a5a66a8a8a04aad04847a90723f6ad7d18c312ddc02a3815423ba0f63fa541687bd9efe1b533b3c9e0a78473e899e318a09bd0ba6eef543e3b2bd8e9b10064bd9e4da001dc81401aeeb29a984d0ba7d5e1d06d4e6594f06523bc8e7f5c0ac8af752dfc17d7090d9218ec6d9447129ee71fcc4fb9cd6842ab10dc0014f3e5a2c1704b671dfdc734525226dc939e283a362c7f940344a380393df144733e2276e38f5efcd01b4bbbfc3dda4a9298a44395902e4a9c70682660d4265d62de40b1bdc1545054f95c8fe627df141af7c3af8808f3dd68dd5d2a45765884b8908d8c3b6c27b7a77a945d7a5fa474bd2ba8e4d5748b28624955d5d8b13b79ee9e983d8d40a753758c7a46b96f6114725dc92279a2810b3a64f94900763cfafa503fd3b59b79ed84da34713c0cd890f0a158fa1f981de826e1b548959fc4dc5cee24b6467e59ed4101ff19e9f676baa5d6a72c50adb4ad1ac790ccc076200f7ad41e7df881d79a87576a5f87b0f161d381db1c2a36e7e6d8ff3416bf87ff082c6f208ef7a82f22b9761bd6d619785f6dc477fa53705ab57f83bd297ceb1e9caf67708db9c4526723e849e3e94f212dd25d117fd29a8c09a76b534fa39cf8b6b71ced38e36fb73417f52e64548e34007e673e9f21ef590a1c918c90718dc281a69b68f67118d9da5058b798f6fa7fe280daadd1b2d36eae70710c4d263df0a4d583cc7a668fd4bf11b5837d7c93dcd9a3146959822a0e781f4cfa55161e9dd7fa67a4f55b9e9aea3e9f81fc09ca0ba118998fcdb2338c7b528d39f4cd2ba76e2d357d292df4eb391809963420ce1b1b576fa1e7359119f1eb4e17dd033ca172d6b2a4df303383fdeb5c8f2eef3bce4e0e335684cb0c9f354160d36f64b0baf16072b91b5f03391f43c51aab23a5debe91c4fad4d73689e6fc3a290573ff4f03e59f4a3280d67581ce916567f84b58ce0a1fccec3d58fa9a084de08c90464e4d1a8e419059b201f4a05630a176918efc50176293872c17bf14042aa0125b03db14046c60b60123fde6827fa0c68edd5365ff11346ba6292ee64194240c807e59a32b7fc51bfe8bd5ed5db424860beb62b89218422ce09c11c01dbbd0660ae110bf1bf2154838dbebfefeb41a8f4cdac7f117458f4d9ecd2df53b4cf81a822808c47255c0f7c8e7fb54a2ec2cfabba3b4b4b8d3af12eedad40926b0f070a13f9b633649f7a82eba6ea4357d321d4ecad512daf20df26e016507fa4fbfaf3e98f9d067dd2bd2faac9aa4d72d72d1e9510ca46a7631c7a320e18f1dfd7bd059afb7da816d23de4ba5de211346a1e4785f190548e4648c63b64e6b43ce9d5baafe3b539c5b452dbda46c638a167cb281c73ee4ff9340e3a3fa5f5aea4ba58f4bb57dbfcf2b02a8bf7f7a0de3a5fa0b50d2a2d92eb3e048c0a97c867dbedcf6a944e5cf4f6b76d1b3d8ea42795066266c87c81c65b9cfaf15048e83af3cd64abac08edaf01546c38dae4e0657ee6826e5b892de3702292e2545ddb55700fd0fbfca81c4b3bc718716eef9eeaa402280d14ab3c0b2c65c06fe571823ed40df56b217fa6dd5ab9216689a33f2c8c558307e83b8d77a37aaa7d22f2512c28768800c9954671b3d33ebef568d0ef7a7749eb0b5bbbb162d657b32b46d2e1564c8ed9c5644d1b0b9bbd261d2a440af6cb0e2e5b1e7dbc1238e0f7a0375b696daa7496a3a4dac8a92cf078685b271db04d391e40d5ec4586a1716de2a49e0c8c85d3b120f715ba1899173ff305413070abd89cfe9f5a2d3ee9c8639fa874eb6b804c52dc46b20c9f302c3bd11e84d47e1af4d5dc6521d3e3b662c19a58721ff5a9a321f89bd27a374b456d158dccd34d333332c9b4b2afbe47a7cb1f7aa33d2bc0d8c0f1c8f6a2c14b6d501b39cf63450897380c319e3de8065031c038f7ed40d8faf1ce41e4d004876a8dc3cc7e743025c956c818028c904579e7f0e15695c9c0541924f6c00283d0bf07f42d6b48820b8d62d20b2b58d656404959e52f83c8ff00fcfafbd4a35bb06f12391a48dd55cee2b2f3818ed8f6a8158a159890f02242079147623e631c502b0db436d1ecb7458d4738038fb0a087d6eeb508f48bb7d32d95750752b6c26c905b3ddb6f61eb574794f5cb6b9d0fa9678b512b25d24bbe52b8c1638278fbd582c57ff12afaed45b5bc0d0d8a8c08a2731ee3eec5793f40450466a1d59af446293c186cd53ca0c36eab93dc649e49fbd048e89f1675ed35e301e293919dcbf9867b37cbe94a35fe94ea4d33aba6824306dc48015750d86c6e247b0cf63591a40b8dc23fc30f14138dcac3000f9d03687547f12e8dd5af816b13148dddbcd29039c0f6f6f7a0eb5d62caf5636825db70c9bc4328f0dc0271c8a090627d3073ce681acf6505ccf14d35bc2f2c2731bb28254fb8a075144a83ca806792400334049ee6281e2496408656d880ff0031f61fa50446bd76058ea1b9e21025a3bb48afe71df9c7b71de9c8f196a0de23ca7b827d4f7add117e0cbfd4b5059392369663ff004e71c51aa97e8f555eadd258f2bf8a889cff00dc28cbd0bf123a926e96d163bdb74490bca2321c678209ff001591e71eafd7a7d7ef45cde2c20aae144638033fb9ad2e1b5e69d058da431ccf21d4a5c3b4631b62523807feaf5c7a50222f2d648c25f5aeec8c2cd19dae3d3e87e944d3eb7e90d425b49ef2292de38224f1505c3f8724a9eeaa7bd0d57a60406059436306868a7803839c7ad1a158039c13f4a33a716767f8cb9b6b55e1ae2458813e9938cd07a9f42d0b4de99b4b7d1f41b58ff19b03c93ba06607fa8b1f5f619a5b8266d74a65d42da6ba90cce996dcdc8c9fff006a5a2c2635083b05ef83eb5028076341db4b1ed9f7a04651fc41db18ed419d75b744dbea335fcb0db0335f2057901c05da73c8f9d5d18a75174a3f4c47335e35da4ce418a489374254f707d463d33565d1529b569a489a17944b06ec8057d71dcd037b4b6b8bfba31584124b27e62a8a4f1ea68357f83da7ea5a76bfe0912453ccabb49194653cb60f6ce3dfda983d196cd108c2401711f9768e306b2297d73fc6d02773a8b591922693c5004bb9d72542fa2f6efde8314ff867aeeec27500b77bb5670e36ca19b1dff2e7f2fd2837ce8bd5dd348b78b552219022870d9c46e792a4f6c608a0b846c8e03232b29ec41cd0199f1410fd4b24b1e8f712c0a5e4452d851e6c639dbf3238a0afa42ba77475e4ba8470896681da45180b18da76af3c9029c8f26dc1df2b9c606e273e86b743331924f27f4a82c12280e59b008e79f6a2d4d74188ff00e30d203a82ad7519c1ff00b860d11ba7c5e86c9fa3afae6f4091e043e021270b21e01c7dcd6479ab4dd3aeb56be4b7b184cf2b301b57d07bfd2b4bad0fe25e9f6960ba7c7a55ac50cd750335ccaade7723b83b8f6e38a2207a5ba4e7ea3d93780cb616ca53781f99fbff009a0b675a5be9765d43a75a6ad3b25adb4185429b831c70303dfdfd2831eb8954ca48f3827819c71ed406b2b1b9bf9a5fc1c4ce2253238047957dc9345d122b792eee522811a495ce1157b93ed444ff0049f476b1aaf51c761345269d25be269259570c833c6077249e062a68f53e8ef0da69509d4ae225b92a04af232ab16f98cf1f4a5a266d4dbca8af13a329ecca723f51502d14f0cb9f05d1c8ee01c91f6a0393b4edfe63c8a031608859b38f97340d84d04e5846eae50f9829ce3eb400fb24466041f5e3d2823f56d22db57b192d6e61468a41c823ff0035651916bbf04ada7badda5cad6d1b72c09dc33f2a6875d25f0865d06fe2bc6d4c4d3282026cca8cfafcfd29a34cd234a10c768f711a78f1bb392a3001208e3ec69a26a58d640c832091c90706a084ea1d3eeafdadf4f86da3166c0b4b397c18f046140f5ce4d04f4702436e91c28a9122e028ed8a0a9f5a5b6a09a1bc5a135bc72cce048b3c5bc15c638f9d59043fc2db997481aa69dae49e1cb6bb643239211939e467818f97bd305965ebce9a10bc8da9dbaa2679dd9ce3d8530572cfac87566ab05ae9f1490692b9696e1f833738555f96793504df5f25945d2576b7ec16dc46792381c7b7ad5e60f234980e42f6c9c56a82ec3eff00bd4124e49700f1c646e3cd169ce9575f83d52cee324347323f6e3861ff008a23d47d4ba6a75074fdcd8ef317e2e2ff0098bdd4706a60c3f4ae8cd5f44eb8fc3e97248a638cbc73bf90483d463b373e9574685abf42a6b5649fea72bbdeac4a8d3b018cfae31f7a6895b6b29b41d30d8e9f6bbed9213e1b7a994e724fcbb5064bd7835a9752d3af75d8116354778f660788cbd9483dbb0a0cd20b2b8d43528ad2088bdcccf854039cff00e2827a0d34e9da1de896f2182492efc0976f998aa827d3d334113a74aa9a9298628e74570478bc0c7cf1da83724bb8246d3e6416b0384da61b5501c9f5c3704f152c037561a95f5fce61d3ad6db4ab950f34b331dd9f4191db8fdcd406d67a675ab4b6d325d1af248272a43430315ddec7038f6ad4b3f448bf47eb71cb69abddebf21d5e26896203846c30c8603b9c6452d9835901405660376319ac84bf13180779d8bb82827d4fb0a06f777367a75acd7170f1430a9f331200cfceae061a0cf6dac692d7365266191db0578f5edf3a6075a6c9278b3433188a467860d96fbd40fe540471409aa0c1140750001ed8ed4058e15133c983960077edf6a06faade5c5b7822d2d926766cb967da2341dd8f0727d85033d27597d62e2ee3163756915bbf8799d71e2f19dcbf2a092b88dd9a311950a0e5b70ce47fe6ac18af53f5b69da9752dd69da9ca906876e24465d9e69881c6ff005c679c0aa2bfd267a347512c93dbb5d42d90d3c800b68c9ce0ec3cfa528db74ad034db5905ee8be1ac728dc153984f3f980f4fb56453be2de8f647a6aff53796596f0aed46798ec033ce149c0fb0ad71479c9bb9dc3bf3c55a0b95f65a825150b481a407b93c0fda8a29c06671dc93803bd131eafd0af6dffe18d2ee25982a4b04603b7a9c631fad03bbe586381bc5945b96385718c827db3eb5288eb8ba934eb15fc3c535f05427796dcccdec7150637d5bd55d5362b7975aa4d0d919018adec8637807bb60723000e4f7cd58203538aefa8aeb478a7b9beba924547b8774cf8608036a80704639cf1f9855d1a7f4c68b67a03de5e5d59dad8d988c62e1c0f107a1e7fdf7a082ea6d07a6e3e99375a7cb6b3db093c727701e2360f7f53dfb50653d4130d42ee18f48b3f0232a15218936963ebf5fbd06dbf0cfa74855b9d46e04b730c6144691e12307d33ea7de8348ba6b5478a279a004f98c479247b81f5a9438805ac0be2e02e73c9ef8fbd40c2346d43578eefc40da7da1dc8b8eefea4fcb9fef419beabf12a4bcebcb2d2fa7ee0dc58492084b30236bb6467dce383f6a0b87556a67a7f4d95a0bbb5468816f0a69c78b2e072572719ce78357079dfab3af2e7a92c963b88d94abbbf91cedc93edf418aa2c5f0dbe2a6a9a0c90d8de34773a6a8da1186d6403fa48fec682d9adeb7a9b4c9d572dacc9a6c9700456e5ca910e000ecbd8e580352fb1ae7476bd6dd49a325e5a9f3025245fe961dea097523cc0919a032af039a006936c81423104649c703ef40dcce64bc3035a87b6f0c378f9fe7cf2b8fdf340a4b6e25962915d94a67807839f7a043586922b5636ec44c061063f31f6ab079d7fe19b7eb2d4efeef55d5d74f992e9a0fc3a441dcb13927b838c9aa2d4bf042c618e178efee6e18104870172318edf5c1e6945bbe1a748ea7d2315edbea3a99bcb190030c401010e4e783ee0fa56455be3d6b90c1a6268d69e17f1486900ee98ec29ccc183119419e7e55ba11f089f523ef5058363a8059fb8e31e9421b491056c01819e28d3d0ff07eea3d53a1e3b6b8db235aca63c139c0eea68ca47a9fa6ef757b83ff00bf68ad428c2f248c7a8f9fcea518df516adac74e7544f63a2ea172f1800291e6cee19ec78cd5826344e85b6bad25ba8fade5b99dae0ee11efc71e858f7e7d054a2d7d39a75ae8f7b6b00b8917f1516624b78429da327cec493db1db1d8540cf4aea28f58d6aeae2f6dd64b498082d880488d149fcea7d4939ab04175e6850a8d32de3b78e380c8de32c4db4e18e430fef543cf86fd0d691b4fabdf6648b3b2db69ce7dd87be68342d2f4fb9b5b891af1a28a2dc05bc5036d001e0eef7352884b961a2ea9aa7555c885e08d45b5bc52b61b686c120fb939fb541276bd4b61d53624d942e2f6200bc32290633e99f4233416dd3ad3f0d611c0c77b632e71dc9ef41156dd27a45addcb3dbd9c513b1dd941821bdc7b558333b9f873757fd69a85e3f813e9c7723b5d93265d872473c11544a68ff08fa75e290b42ec4e4124e70738fa5048e89f0f745d2aeadd2decedda6525c975121183c77f7a945c754d0e0d563682ed43425369403bff00bcd58308ba7d5fe13f5a05889974a9d8b46aede4914f707d88ff001528ddf4fd7edb54d1a1d56c312dab2e64dbc9418e78f5c541296d70b716d1cd6f8789977230ecc280cb7519b816f212b205de4e0843ce300f6cfcb39a0545c42cee88e0b458ddec33ee680eac92266360debc7b5056fad2d354b9b189745744be121daf27e550548ce3d4d58324d07a725e98ea2b7ff5381f5169a7579d021fe13904ee43ddfbe49038ab46e76cf05cc714f6d309232a4a98ce54fd6b2196bb7f2e9b631b2c427b891b6851db3eff002007341e5bf887aa2ea3d4f77378be381e42fdb711ed5a1554395caf1cd07617dcd04fc85402101da791421b49920331381c60d1a69bf02f56f03a925b12c162b98c955f775e47df19a32d99b518268e4491668704a79d4aeec7b7bd4a30feb7e9144d76e265697c3e2693631674273803e556087d76f35fd49859e9925ccf611141106f2e182e3241f727f5a94681a268f79ad1b1b8b9dd66b1c2b1ce9bb06361c1e7bf3fe6a096b0d3ba57488e485b52b40909c386901607d47bf7a0ae758eb69ac4d15be81a748f0a9c35cc90b2eff4c03c1c638a0b77405c5d5d45f87be5fe359a88b81b401dc1c7d38fb50586fed18ea3015790091591e447c1518c8c7a0a0a5754d8c9d49a8d9f4ee9dba0b3b5224b9692327728f627e7c6682f9a7e996b6b3a8b6b748a348820c7720761412c064e3041ce282b5d4bd73d3bd3f33daea97ac2e540dd0a292dc8cd043c1f15ba2a7923b65bb910371b9a12141f9d02edf13ba2ade56857551e5e77244c54fd0e280746ebfe99bbbd655d56dcdc9ce08465565f4ee3bfca82d53eb3a6dac3e25c5f5ba646402e33fa77a0aff5b74ad8757e9ca972844aa37c520fcca7d3f5ab067bd369a8f467544d626c98e9f7118f0200e4465c903049c8c9e6ad1b24334b6fa6249716cab20037c309dd83db03b5640dddac3764a4f02cb1103863919fa7a1a06d6f600c37162911b7b252b87dc773f1927393f4a079f868edae1ae6328a8b1ed38e30050226e85d5dc1f879011b3c47c2f604719f9d01eff4f4b83e3c6b18bb452b1cac9b8a83de80b16e8208a3b7b58e1407cc061427cc0ff1560ce7a8f592d69a97504cad2dac01a2b53900c3e9e51ea58f727d0551e73bfb86b99a49a46dcf21c96340dc13804f20f6f9501c0e3b8a0963316fcc4607007f57bd084d64dec01200ce483468ff0040d525d1755b4d4206ff0095207c11dc67ff0019a18f56584f6daad9dade4211e39104a8ded9152b235cd8c530613229c8c1c8ef50472e81690ee00322b0c100f0debdbb7ca8111ace856371358cba85aa5cc407891ccf83f2ef4048b4ad2e59bf116769672c72f99dd1437239078e2824a4d3e1b94559234110e781839fa0a0561b38ad532a12319c86c6307e740a9732a3a00cac870cd8e0faf0681be8b6db965bb909df3c85806eeabced5a09523647e6e0fef419a6adf116daf7ac34be9dd1da686e7f1ca2e243b76320ce57df9ff1560cc3e3f470ff00c78255b842b35bc6c4af9b6e323d3e95467b6365f8dbcf062beb68c119595d8aaff6e282422e9899b4f6bb5d46cda2562a76316c1078f4a0859e1b9b762c0bf94f0e84feb4125a57505c58ea70dd5d0174a986d92b1c13f6f5a0de7a5be366877260b5d42dee2d2423124a487507ebdf15289dd3fac7a7bab6feded74d61733473acdb5a162142ff00313d81ed505fa58fc6d809380c1b9f5c502e0e05040ea367a85dea454de2ff00a610375b04c16c7a16ef8340b5f6930dce9375636acf6a278f04c5dd4f1dbf4a084e91d06f3a52dee62bbd4a2b882494ced3c8a448063b63b638fde803ab7ae749b2b3096d792c93c8c109b55dcd18ce3710473ffdd043dc758dc5869044565aa5dda4c3c2b7bc78c1f14e3963db03e7c0ab066bf1327d41ba76ca6bc48ecad24c456f6b0c87cf8e4bbfa138c0fa9aa3297c83dd4e28395811cf2680a5b93c7ed413cd1ff0f3c797b8031406645236b0508406f30e68ba49c051b97d0e0e7d28ad57e19f575c5be8f269515dac772877c11bc464dea7ba8c739ce78f9d3193bb8ebfea2bcbd6b5b6b8b58bb7f13c2f0ce31cf0deb4c0f2dbad6d743d2ee99efae752d6c02a86e0054524f6383c7ff94c0b6af274c75149a46a5a82c46f1e1479fc3190bd8156fbe7f4a960bf74e9d253f1167a3ac09e0856610e3041ec7f6c540f67b892cee7f8d18368232ef2af2508c7047cf340ead5bf130accc9b1186541e723d09ffc5033bbb1b82d74d6b37f1244daa1b38073df3f4a08eeb1d3b50d4fa6a5b4d32f12cef1902ee73e523d476fde8306eb0d3fabfa4ba92c278af67bb7281606472f90bdd58558253a6afb40ea1d62283a8b461a66a6f931cf6a7c2466f7cfb939e7b5515fbed3747b5eb8f06eb78d35080a2ec9719c76f98049a0b4ebdd37d1bad869acbf0b03c5c16b29444adf50ded41995f68564a263a66b31cd02be152505493f51c1a088bab69ad1bc179e320f07c37c8a0692b46c4995f0381db39a0b2fc34e971d57d4705bc8db6c50ef9dd97b81fcbf7381528f5ae97a1d8e996d1db69b0c7648855b10a81b80f43c739c54134147b9a036063279fb5046e957726a0f2cfe04915b06db1788305ffeac7a0a00d72f8d9c491c06337533050ac7185cf2df6a06da2da4293488f34973328c34aea428c9ec3eded40ee7d2ad249448f6b133820ee2833df3fde819ea96897461b05b87815f2ee919e5d47704fa039ab079b3e326b70eafd4ef6d6650d8e9ebf868b69c8247723efebf2aa280eb9193ebedc5002a124e015340018fb8fde82cf32b1603d0678cd02406dce3008e47ce81b499c331383c9c9f5a2e9c69377369f7d6f796a4acf148acb83fb511e91b3b3d0bab745b7d45acedd8e3732b71b1fd73f7a5a19eafd09a56a0a96b1c705b49c48510761ce4fcfbd4d0d752826b2b583476fc3daacb295b79d768de8a32b1e71f989e49f6a7d14dd1af5ba275a45b8b093c054492ea769092373765c1da4679fbd306e36ba9595fe9f0dcdbcc92c33e1579cf27d0d409ea178f68521b6b76926ee8a7853f7ff140bc768d78f6f73748d1cd103b543f0091cf6efc502f7319dac194371d8b6326829f0c501d7ae6fa568d5d4942c806d4db81839f53c8cd59456fae6e628749b5bab8b1865b08e4726588ec11e7f2e49071c93da9a31dd4341d675e9a5bad374f9858162d0b4ac70e18f0573df35a0c759f87bd53a404f174f965dfff00f479b1ef570576e34bd4b4cc0bdb3b9b7258a00e846e3f2a94376475cee4914af7ca9150685f09ba61efb52fc7dd69bf8eb7c158d1d0b47bb38f37efde968d6eeb4eb5e91d6ad25b660aee59974db6881690918e31ce39279e062a5a34bb57b88adedd1e379679065d80036679e6a07e8391bce7e940c659ef5afe1286de3b16f2b8903094b7b2fa7ce81eb380c4260ed193f2a0cd6fa5d4a4ea0fc7bdadcce923158a3039db83c038e3ef41a0e96b2ad8a35e009291b8a939d9f227e43bd590436bbd6fa269202c974b7123602c76e779624e00e29833bf897d493e896525dbcb2a6b5a9c3e1456b91b6d60cf989c7f31f7a60c02490961ebcf3eb541308e39e067b507007b96007a67fb50178f97eb4165ce18165c2927b773fad023202d9c8dbb7818ff003408300b87f2f1c107d0d0c15a4f2e339c90467f6a18bdfc2cea8ff4bd561b4b9ba686d6e64552c4f954e7d7e46a60f4688d240af1b2bc6cbf5047ca960617ba658de1b792f2d94a5ab33461b18524633fa1a81b5c8b5168967369d23c0e0a24622dc981d81c76aba29df0bb48d660d52fceb88d069f04aeb69130037127f37b9c0ed9a8350781240bbc06da72323b1f7a0eb8816e633192ebc8c9472a78fa50349b4c83c068e24f0ddbcc1c13b837be4d055b57e98b996d4db5b4a893dc1e6620b6ccf2c467efc504ce97a38d3f4d874bf09af6d46e2f25cb82724e791db15650a43f878b51fc34f3da8f132b6d6a98c80a39ff007e99aba249631b58b9047239ec3e55368aeeb7d2da6f52c0eb7f16e87f2c6e836ba90724ab7a67b55d115ac7c3e8aed2182def4c56a14096368959a423d77e3229a27b41e9d8343b01069c8a8dc9660aa3713df3c64d4a1c695d3d6b67a8cba94b9b8d4e61869e4e4a8c636a7f4afcaa09a485519caae19b966f7a0435196582c656b74df3e308beec7b50629375775b691ac5bdb6b16d6378779f019b00a31cf391c9c2f1daae0b35ef52f5374de88d77aa45a6cd25ddc0108694ee2188c28007603d6a0d16c92430a4b2ed3230dc401855cfa0a0a07c45d7b5db9d462e9ee960b14b2ee134ef8c850012147ec78ab0670b643a2efae753d72686e6e2da211db42176079c8e768f65e39f7aa332d6f58bbd635096f6fe6692695b24f603d801e82823cb900ee00e68006460051dfd680ed9f0c905b713d8d006d5f5419fa505a18f94e40501b1b81a04186d62402c87be3d6810b81290aea8467201231cd1749dbc437f9f1e201db3de8ba07dc0175c027f28a335b17c26f888d6b6d0e8fabf892a29c453b1e547f49f7a946d6424f08236491c833ee0835073294888894120700f0280813c40a6711bc8843e00fca7d3ef40e41dc081f9a811681c6f7565329185623b7e9de812b3bcf11ff0b74563bd50494cf120071b97e5fda80d7577046c9019d5669dbc340324eec67fb734103d5da96bf67a7cf0e916f6e2765f25ddc4c11107ab1c8c647cce2816d3ec7f0f6564cae6e67da375e6d52cc4af2e4fb13ed4145f899d47b3499f4bb6d46cda49b69b92921565c3648e3dd40c81cd5c0ae89f13ec246d3e379ed2d6da180b5d34849da1780b128e49271c9f4a60ba685d5fa36bc42d95c324ec7090cc9b1d87b81ed50588958977cacaaa3b9341c655f12348d1dcb8dc1946540f99a019e2134454eeda7bed3839cd052fe2136b536b5d3563a1ca53c49da4b9507198940ce7e5c9fbe281c6b7a974cf4ee4ea7242d76dc784a3c595b3e9b464e3f6ad0ac745ccbd4fadcbabea42da56959a382ce7460d6b1a93c01f97272093ebf6a82f1ad6af0e9da5cb3cecf6902216919f82aa3818c7a9f4c530649a9f5269ba7429d472239bc991a1b0d3c3152880f0f23039e7bf3de90635ab6a377aa5ebdcdecef2c9239e59f3827e5ed54302195fcc38cd01245395c1f5f4a05b606538e483c501b6939e3b5077860f3914165754c33e549000dbe87de813b820c27fa7baafb8a04a69c98e281e42618c795338033df1f3a06c03e4e029247007ad010093c35674da71f977640340081a190658e41c820f141b0fc33f8926c218b4ed609366a02249bb2d19ce3ea4528dbece68eead926b7916689c643a9e0d643387521fea2f693c2d6efc786ee46d9bfed3eff2a04669edf5295ff057a60bd865309246d3bbbedc1efef41d63a8dec9ab4fa7dd4510fc3c69234ca186e2d9c003b7a67bd034bad0a5bb96e25d575267889cc1b54446d9bd0a37bfbfbd02925945a72cba8dddc48b3f87b1e58f23c623f292bdb7fa7cf38a0a5750f54ebba56a9a67fc516b6d6fd3970ea9234677c8dc7f38f6e4640ce282d1ac4b16bfa72c1d2bad430cd1ba822061865f5007d3daac19cf547c189357d561bbd3eee683c62cd786e9b73337b8c7bd512bd39f06adedec2de0d5ae639da372e6485363107f97767b505cee755d03a5e58ac228659af123184b7b733322e38c91dbf5a943ab3d52e64b49ee755d2e64950e238e35f10c884e17cbe87dc540e6d7509a4f110e9f7566a471712850abf6ce463e6280bacea36fd33a4497f773cf32c698dcc4beee33938edc7ad05534aea683ae61d64c4d2a69b6b88d16d5ca5c303f3e386cf61db140e27b5e99e96b64bdd562b6b30aa36c6c37cac7dc9eec6b42c1a66a962fa70beb6b516d0cbe76322f86c78f6c66831bf8b5d5d2dfa35a5dce60b1933b6ce3c788769f2b331ec1b8fd2831b79649984b239773c1dc68129725c1c640e73400ec781d8fb1a03c4a85d0c8582640257bd01e51fc42236263c9c67be280429c6037eb405dbf5fd682c2a0bb976cf07d3fc5009279ef8ec4e68193a9902b28e7dc71fb501d95b098e0f6dd9e0d0049131019b047b8390281bb292484e47c8500c4f242c3076bf704704739a0be7c3febfbae9a5daf23cd017c7e19fb107bb67d0f6fd6837cd2757d1fab34f4f05e37dde630b1c3a91edf4f7159103d6eb7da65fdbdf59dadb5e2460ac876ed9e1c8c060f9efe9c8a0a75cfc42d5742d2ee5a7e9dbb494b6d6b9bc930cce4f940e3cd81ed4160e98f88315e689fff0022b57664199cc5196f0c7a164ef8f98cd0589baffa68590985eb15c0db1985839f6c2919340b69d03f5285bdd6f4bf021424db4329cb153fccc3d09c76a090d3340d2f479a7bab3b38e2924e5e451cfd280d7dafe936f6c5e4bd89813b02a36589ce318a0358dc35cc4e17f9bf234cdbb78fa0c607a7340e6cec20b1596610c6934b8323226379edda81da8dcb9ec40a042f50b5bb21645473b58b11dbd7bfca8304f8add5d67a9ea8ba5d8ea72c1a4d8a952f10f2c920e368cf71e99fad5833dd0754d6ed66bdb2e9a91a5babb2a310465a57c1ddc1038e7bd5171d3748b8d46ee1ff005298dc6a764c27d4eeaee7fe1c01795881c9e7804fe940dbe287c4b6d75a1b1d1c986d62277c91bf131f4c0f6fad0663737135d3b497124924871f98e7803007d2811dc5b83903dc0a0333f03be7de8122df2c9a05a11e5f51f7a05ce7071804fca8033e5da0734020b0183bb23e5416269577ed0e5323078ceeefdff6a03dbcd62914c2f629a47c622689800879e4fbd046f9d8a2a03e31385c0e73da8b83ca590947dcaead8208e73da8849b3e19ce704f7c5015586d006431f5cf61f3a04ee586ff002481c8fe6191408f0011eb8e30682774dea9bbb5784492ca6385832e1ca95e3d2834be9df8c312e2db5eb4375080337000f1303d18763591a469baef4d755989ec6f6dae5a23e20b599406dd8e080ddbed41272f4dd8caf1c86d163910f9595882a3d718a035edd695d3b6a926b57d0ac65b10b4e06eedd863bf141077fd7af2782bd3fa26a1a8891d57c630948c0279393dcd04cf5875258f4de9f0cb7b7b6d66d2b81ba752d85f5214724fed41036bd79d2fe319d7a8f4b9c81e58de2f04827b9ce09a07a3acecf54b790685ace8697606009e52c377b7f2e682b097d7d36acf0f55df5edbdc0977412468cb6ce3be10af3c63b9c8a0b0751f505be9690dd5d752436f62a3fe4c6448f3b7b0c64e38f615734651f107e3045ac42b67a7693018633b965bc1bc838ee173807bf7cd33065baaeb1a95f2c11dfcd2bc51fe48880aa3e8a062a8b059f595df4ae9a74de9e9ec499d43c97b1427c6e47e525bb63e4282ad3ea3712893c599dbc4259c1627713c927de81043950df97db1406da8411c92063be280230839627078e79a0390a71b5bb5003a8c1232338e4507025573e9fbd02a0e41dc0e680c3691cf714053bb34160895dc16f291d98d02322aa39f3e14707ffaa06f202a5bb0c7201f4a343aca51090497efdfbfce89840c8db8e46573923ff14410b00490d9f5c1a0425dd8ce4673e873cd0265e4dbe7041ed814009b8cbb8e5863bd07163b7716e0607b6698060b96b7b9478dc8643918247ee39a60b7e97f133a8b4e0c63d4ee597380923970a3ef4c0e13e25dfcfab457ba95bdbddb212016501867b9cfbfda982f907c74b282da34874a9048aa479c83838edc62982b7ac7c42d235cd67f15ac5b40c366418a2cb0c1c81e6f5e31db14c160d035de8cd4a3f18ea96562cc37359dfe9cac887fef039fd6b39446f56ea5d13a9dca4579a922496b1975b8d22dfc3566cf9557230703be715ac1431d4d2275325d7fae6b4f6f182a93ef1e32a9f41938f6a60afeb1a95c5fea53dccf772cf2c8c489240031f627e7565c0d67bbf160487c1801073bc0c31f91f953420f2bc8c7c52cc540032738a809905c0f4fa501940208e73df34028e703938a0577ae013f4a001300db4f03b71407461ce0502dca8c9c7dcf6a003fafcbdcd0070bc1e0fd734070db467b8a04cb9c9e68274b93bcb1daa40200ed4099765249ec476cf340849b8b264823bf34689ee009cb671df1409bc8e8b8e770e3ec68984d9c953cf97be2860b248caaebc107dc67f7a184c31232db88fd451031ce50e76039f5c8045026efb8f93279e0fd680b239504f0483d88ef409ee25bb90c79c0e050151c6e21b39ce783eb40adbcc2cefa17bdb61322387781c950e3dbdf9c8a066f28790b22e013db3dbef54726081e63c6460d34191b1bb0720f634060e7600412c781502409c8e3d7b500ed71dbef8ed40243f181c0a02e5d4e0fad006f644e4819e3b501f7e3049e7b501bc43b4e391da80558003392d40a23305e320d02e64cf998e1bf5a032b0c927b8e68049c8c8e71c6280377043118f4e680bbff00de0504ddbb3128371c1c64668024e59f3cd02521254e4fad1a2107e48fe6a6809ddb9e78a029e1463d05027ffc744a6c3857c7b1a205ff00e637fbf4a02b12b1794e39f4a02024e7249ed409924720906800005173fd7404989698ee39e4f7a04cf723d07a501fff0097ed406ffe36a018ff00281e99a037f4d0731f3bfd28007e53400ff99a810248c0cf140bc60123233cff008a0557f9beb4056eff007a07109243e79a03778b27bfbd02b128c27039a054001b818a06609de793da815006070283ffd9}\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 Here is a movie {\pict\jpegblip\picw20\pich22\picwgoal400\pichgoal440\bin ffd8ffe000104a46494600010101004800480000fffe0050546869732061727420697320696e20746865207075626c696320646f6d61696e2e204b6576696e204875676865732c206b6576696e68406569742e636f6d2c2053657074656d6265722031393935ffdb00430001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffdb00430101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffc00011080016001403012200021101031101ffc4001a000100020301000000000000000000000000080905060a07ffc400231000010501000300010500000000000000060304050708020001090a11153976b7ffc400160101010100000000000000000000000000060800ffc400261101000102050109000000000000000000010200030405061121b33134365154717475b4ffda000c03010002110311003f00a90cf388f366a62aa720ed6ae07f96901f3831d973452b8cf36fe3570fc908e46d466433e5dd954f2e96992d9e498c7753faa44916e016ca91cc7d88b38fe60a5b97737defcbcc539c98d336a57f4fc2ca9a486bf07ab575ad9a3af4df221d8215e36df86c4504ff0024574551b3d687ee0575757b3ad64e311ee62bd94158d37e24198c43973099f1fc0c41614d950246513a081abf76cfe7061f6863281e6352fd1670949c148dd6dfb0d25f5b3689b1d5c965b0eacbf4e0932ad28e22ab9ae945633f4744bd3c8cee0a7fdf085b9000f449c5f7afa30b83e0b6fd7b0c8429c9467ff9715347c891e25fa24a205861aa715e6a09bd0488237dc2723414d9891381524e8ca7c0894664f835653631ab55ee7e3de433e4ff001b30949124e4c10c8b6ad0a479b3f9c937b2cf5bc0095ad600a0a41a0e9faee174a1c605e161c6c7a313539650b0113190f1a8368e60d5b24f30ff008ea7f0bf867fa6595feeb6978f1fe0f9c26177f4d63a51a9235184750e7d18811339cd000000c75f000e00380380ae390c350def826ed42ad051fa6f501c50f9b699c3b69cbeb76476d202bf3ac985b6e0e968be66572893e6a744540bd9722e5c87956848629bc2559306bd113e8653d3b6aff651dfad7a3ac8b02958cba02a93ccf525757039bae6cff090e1d90688e8aa233ee86a4c4a3e0586d6b2340522e47dcb7d0046d8a5acb05a123ee25d2b230b2ada6e2e2f9ede3c05202520ec2487b0d56562529d8b3393bca76adca4ec1bca508abb001babc007915d84fe3dd14e207e3c62f8379da2a3b861fb6629d28dba53b6ea388ebfed866bf6dfb553455e91ed547ae92e9445253a4fdf3efb4f8ebdfbe7d3c78f1ee0bb9e13e358e942a4ed49e22cff00eeb35fdd7ebfffd9} icon.\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 {\pict\jpegblip\picw250\pich250\picwgoal3000\pichgoal3000 ffd8ffe000104a46494600010101007800780000ffdb00430006040506050406060506070706080a100a0a09090a140e0f0c1017141818171416161a1d251f1a1b231c1616202c20232627292a29191f2d302d283025282928ffdb0043010707070a080a130a0a13281a161a2828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828ffc000110800fa00fa03011100021101031101ffc4001c0000000701010000000000000000000000010203040506070008ffc4003e100002010303020404040502050500030001020300041105122106311322415107617181143291a1234252b1c115f016336272d1082443e1f1265382ffc40017010101010100000000000000000000000000010204ffc4001b11010101010003010000000000000000000001110212213141ffda000c03010002110311003f00dadd18a10a704f6a95ccc57e37750782b0d8d9ea0cd32e7c5446e07e9f4ad723119a7b89e61e348f260719278aad613cbb640002938c76a182b264fc87bd13009c0c019c76e3d68a072e1cf6f4cd502d330c28269a61bb39c923923d4fad44c08dccb95cfd28b8280769ee08a263891e1808739e4f1d8d149392172cc714050dbb9fde8960ed8c60b79b1ed44103b05c331dbdb1dc5026ac1946d20ff8140aa631c773ec738a0346a003bf93e9cf02801895e7b9a01886796c923bd0090a06393c76a0142003ce3d86680d8dd9392303f5341ccc1b3cf7a2c812c37e4923d381429757013209fa511c18146c9247a0f6a007900c0c671c6280854e086c673eb45c27c038fd68aedff2fda836ef881f136f25d5e6b7d1262964aa02b03f98fbf153131935edcc97576f35c33349212cc4f39f7ab26186dfce5b200f73451f7600dcb8cf27e7400c0b291914046c9e0718fde81371b8e7273f4ef4007691919240e714097f31f376e7b5008caee27807b0f5a02c8e1b3c6d27d33cd0201d839523144d1a149ae084b78da47638211771fd050d582c3a0faab5119b6d12f8ab1c06788a0fd4e2ac356fd1fe08754ddccaba849696309e598c9e2103fed1dcfdeadc44fea5ff00a7f956366d375e492403ca935bedcf1eea4ff6ac68a55efc1beb3b552574f8e7009ff933a927ec715bc82b3a8f4d6bba5ca1352d22fe061cf9a0383f71dea5119cc6c0baed3eaac0f1fad40897dcc3d81f7a052366c1007df3400f21edefc5008c28f30c9c5170ee4fc37830086395250a7c66770c18e78da31c0c63de8609b41f7c515c5172a30c3b76344a3e377cb2339cf7a242aea89808cce368272b8c1a2e107c672a49f5c1a181c9c7ae7da8a2119e7b1f5068099ffa68258a132062d8f9e0f34059502b61bf2824e681bb297ced2a71efda80f19c47b9c77fdbe74057c13e539cf3c1a0eeeb9c73f33405ddb4f18249c1e28062b79ae242902024465b9214614649e7bd0362a7249eddc513456e5720f38f5a1a98e96e95d6baa6ebc2d1ad1e65521649bb469f563534d6d7d31f04347d2a2fc5f535db6a0e83718906c887cbbe5a9a8bef44dce9f731ca9a2e89169d6d6f2184b1455dc07b11dcfeb4d16f119c649a681285b03d3e5500f87820ff006a0e098191de80ac9b8904647b55d11da9681a56a31f87a869f6970b8ffe4883629a289aefc16e92d441682da5b098f21ed9f033f353914d19b751fc08d66cc16d12fe2bf45ec92ff0df1fdbfb559ec667aff4eeb1a04db359d3ae6d40eccebe53f46ec7f5ab82263da7dcf3eb5174e5181076918c7de869503232491ee4515c1803824f03b51287f30e0e7d803449494832c157278a2e8c71fcb9f9d144639236824d01e142efb1768cfb9c7ef40512a818de78ff00a682518e7cc30ab9e00a02cce9953247bd41e467191ed9a04205ee99da4e4e3d283a524b0427b5026c18a8e082067db8341ce0e39ed409b6502907391edda80f2dfdc496f0c124ac6184b144cf0a4e338fd2894f7a7342d4ba9b568f4fd261f12571966270a8bfd47d8511bae85f02b47b7fc34bac5d5c5dc88a0c90ab6c8d9bedce3ef4d1ad691a6dae976a96d616d15b409f9638d70054a1dbc68ea51d4329f4619a8022b78e04548515117b05000a035c5c4702a995c26e3819f534047bcb68a458cce866719540724d02e41c0f7a012a40f6141cbc8e7bd01719e38e6838af1c0a04ca8206d3cd037bdb082fad9e0bd8a39e0718649141047d0d5d18f759fc0cd3af164b8e9999acae4e4f81236e898f7c0f55fed574615aee83a96817ef67abda3db4ebdb7f66f983d88a061bb8db9e3d45165076db83c1f950a53780d8247c80a2398f182724f1c7ad080c608cfa7a51a0062adc7afbd0130173bb9c5070f071cb37e82826106e8f615e01c9e680d6b35bc534be3c1e3831b2aa962bb188f2b71df1de819ae4b1048c7f57bd01a58268e332642ae0704f7cf6207af6a01b99e17b7b6416e227407c494139909ed9f4c0a04a4e501e0f1eb40d263e53dce7fa682c9d0bd13abf58dd6db18bc2b157c4975270ab8ef8f563f21447a73a03a1f4de8eb031582b497328066b97fcd21ff038edfde88b7e32703bd64188e7e6283864b73400cd804b67ca3268317eacea6d56ff005233592f8b6303f953fa4af7c2fa93417fe98b763e0ea171297bab98558068f695ce0e08fdbd281e5c6a57ba5e9d14d716ef7774f2ec112601da4f27ec2827ada74bab559a20e148fcae36b0f91140283729c77a0e0a7777a01dac68395719e39a029607cb901b19c501480ab9279f4a086ea8d0b48d76c0586b7143224a76c61ce1831fe93e86b43cd1f12fe19ea7d2533dcdbeebcd20b612651e68f9ece3fcf6fa5067cbcf20ff009a051724905411e94032799060723da8406d6c67e7ea68d0e1770fe5cfb5026c37039ef9a02eca098c91e6e01e71c500b1d8a49c12786cf6a06a4e256008e3d050119958007920e2801154e32fb4120927b014017eb1c523ac5209a356215c291b87be28957ef853f0d66eaa99352d515e1d190f947669ce7b0ffa7e74a8f4be996569a5d9c56b6704705b46bb5238d42851f2ac875712bc70b3c30f892019540704d01ad2669a0491936330c95ce7140b2e4939a03638c7e8680ae485e33bbe540d60d3ada162c90a02c7270a39340a4f28b68da4645007a8f6a069a746f73235ddcefc391e12b2e1916824948742c99382473c73404791c617695279dc0640f9502c578c9efeb4095cb4cb0830ba21cf999c6401f4f5a05061d430c8079a02e03b3004311c7d281b5e3cd676c65489ee594e4aafe6c7ae07a9a0a075bbea3a8ea96f047d3935ebc404f04ad29411e08e011d98fed416fd212ee5b05b4d5ad6300c615807f1171eaa49eff5ad418c7c55f8466dd66d57a521f20cbcd66a7247a9283dbe5418a63862479877cf1f6c5008e400bdf1ce684016fe53dfbd1a73794600e08ce3d6800377c8c7d6800a9cf75fd4503d91492460f7ee3d28247a7b459f5fd592d22711c206f9e563858a31f99cfd050583518ba75247b1d134f9aed21396d4669769931dc01c003f7a329c4d17458ac5b55d36c12e040a3f1da75c1cb04ede2447f7f6a94567ad7a66db4fbbb29ba7d65b8b4bd8ccd09c8231eaa07b8ab04a7c2cf87b3f53ea8d77abc72c1a5dabe2452bb5a561fc83e5ee7e541e988218ed2dd22b7855228d76a46a00000ec00a510bd4dd511f4fe84da95cc31f880022da4902b1e7d3e99ac86fd03d631f565b4ee6d4dbbc649009cab2e48c83f514165b8b94b6895c44f279c280839e78ce28178ae6de46748a789e453865570483ec6812d42e85a421fc37918b00a883924d024c6e99b7a2a966c0009e17dc9f9fed40f81c77e28139218e4ff9815b9cf23340a01c907b9140201038ed402fcafd28386464e4fd33c50272bc60032609cf00fbd024f722dc66f24822ddf972f8feff00e280f69b24844919cac9ce7de83a447f30ded823007b50459d6ecacb528349b979127651b1dc795f1f3f7a0990148054823dc5015d491c0a0c3be337c2ff00c489b5ee9c87172016b9b541c49ff5a8f7f71eb560c1fc43e0a47e1aa94277310431f91fa551c1727f29ed409b641c86e31839a3454805739c1f6a026f1fd740f64665fc8c31cfde82db79bb40e9e8f49b62eb7d7e8b717ec832c91ff247fa1dc7df2281bcc9369d671493c422b7911654c1215f92bb8827bf068624ba635392df5eb4b9924558ee5bc19b71cee43c6dc7cf34c657be8db0b0b9d0f51d2afe668934dbf9628ddb8c2b8c0073f3a80da37546a7d25174fd95dc125c69f7313ee5655dfc313bd483cf07b1f6a68d5b48d5ec758b612e9d7293211c8fe653f35ee2a084eb9e8bb1eafb3582fe496278f3e1c919fcb9f97ad03ee8dd017a6741b6d3229dae161057c5750a48249ec3eb4139238568f6a9e7b103b5037934cb3793c610a2cd9277a8da73f5140ee38f6280c4b11c65b934023006d50050030e4647de80c846de3b500fcf9fbd0197273ed4007b91400e580c8e45074a82400e72682b36fd2162b7f25ddc09af2766ceeb872db79cf00f6a0b3229550140e07007a50092db860673de818df473c862686dad6470d9cce3b7b63e740fa1de6252ebb5bd81cd00bee2d800d003a6464004763ce683ce9f1cbe1f1d3a67ea1d1a30b68edffba814708c7f9c63d0fafceaca31e6dc71e1f07daa82608c83819f7a1a11ce149238fd68d0a579ec682cfd27a7c3a86bd10bc38b3b756b8b93c1fe1a8c91f7381f7a034f752ea5aa5c5eb292f732128037619c018f6ec282e5a2cb047abda74d5ce9b6da80f136de4a496219b3e48c92000323ea73467519d3da5bb757dbda410ac90c77c23058f99007ee7ec31416882ee47d23acb5185caf8bab4691b1efe57fff0038a9457ee75a82f6e7429350466b482f2742c0f74241c80c38c64541a9cfa1e89ac0177d33ab3d8de28f2b5bca429f91140e2c7a9b5ae9fb85b6ea9b46b9b3c796fe040768f76ec0fafb1f9505df4ebdb3d4edd6e74db98ee216fe68ce47d280648f75e2485a44da385ddc13f4a025ddbdbea16a633286566ce55f9c8f6c502ad750db2c514f30dec428247e6340bbf04100b73402afb943ed2b9e30683836defe9403bc1e06734020e06280cafe8683a375941d841c77c1a0151b467b50159f00e4127e5402872371040c5046eb5aadbe9b1c02e2f6dad25b89047099c677b7b0140fe3f1010afc803f3018e68160c3041ee2823f5dba92d34db89a1d9e2843b03b6d05bd013560c1748d57aa2797c6b35bab78e6959dc47231580ff336dcfb03c1a58364b5bbb7d7fa7b7427f1f673830c8664285bd1815238fad20f2c7c41e979ba43aa2e2c1cb1b663bede438f3a13c7dc76fb5515e9065b851f7a02950002a09c51a1b83cf14176e90d3645e9ad7752752aac23b3439c066665c827e944d29a6410aea725c4567135bd840d3c88a723728c29c9efe6c50d3ee9545b0bf8ef2e6e3c2fc2c6f72f2920e5f19039ee4938a9a875d03278377acf52ddf867f036ef71923932bfe51fbd3475cdc369df0db4fb389d4ea37970fa9cc0b00511795ce7d4f181eb4cd2451755fc45ac16d637381b14ca36b641dfce723e4053170d6cb52bbb362f6d3cb19241f2b9029862f09f143549ba7e7d2eef6caf2797c66ee17fdfd69862d1a069da7dfdac579d17adcda5ea9e1a992376c4723e39e3b024fd7e94c458ac3e25dee8d31d3bae74e7b79002bf8b8549471db38f5f4ed4c165e943a06a328d4ba605b4b22a1523c420c64fbaf38a82d36f0ce7cf7463790729b53017e940e0b0ceceed8ce0500e1b70daa08f5c9ed41d271cd0132476e7d7ff00aa069797d2411168ed9a41fcc858211f73c5075acb25ca6fb82aa31e58a36c81f561dcd033d42169e158ac64b98151b3981c2966cf639f4a064c7a8ac55e4865b7d493701e1c8e52403ea3cbfda827e390ca3f2c914aa81991bd281cdacc2747215c60e0ee5c67e940cb51b0b2bcbd824bfb08ee1a252d1caea1821cfa67b1fa504982b2283ce08f518a08abb82f6dd0369a5662081e14ce40c7ae1b04fda82275cb0bfd4f4536f7114589a5412461f3e4ce4e0e060f63f6ab2893d3b4b5b5b78e22ed22aae3cc3cc7e64fad3449a22a461500007602a0cd7e3b74c26b5d2ad79147baf34eccca40e4a7f30ff3f6aba3cd0543267eb5427b86f1f4c76ef45d0eca1ad5ef224d13e1cf4fd9b22192fa67bc955f8c8c617fba9fb510d7a6ed3fd43a735e5b54964be658c048fb6cdd9e7eb8a186bac97d174e6d22e23437b7ac26b95e77c68bf950fa7279e2b22dba45b59e97a669fa4ea36aeff89cea9a90451fc355ff0096ad9f4ce3f41570675d4fa8c77da8de5cde5be26bc653171ca47dc1f6c9fed5562b97f70276808da7c24f0c1c63804e33fa8a2928c0e0383c8f7ed41d92a41393f4a2548595c2c37493db4cd04e8a08f139566edfef3445b6e7aeaf65d2df48ea2b11776ae02a93e564c772adef409f4ee8ba9a21d73a36fa579ad9f325afe599171ed9c30a960d5ba0fe2843abb47a6f510fc26a4c36890f9558fcc6783506a1147b510024e30339ce680d2c6ae9861eb9a009178a0205443b989e39cd01d8075e3047ce80563057ca381ed4011c4531e503d85013c91b804a21279c903341131cda8c3abdc8650f6d20c4321232adec3dc504bab2c113c9293bb1963df3408dd4b75e1efb2856463dbc43b4631fad047e9177ad4fe32ea16b1db4b8fe1aa92571f5f5a0916bc8e0895af5c46c17cd8c9ff7da80f6d736f7f6915c59cab35bc837238ed8a072a31c1ef4062870718a06f7702dc5b3c522ee4752ae0fa8230683c75d6ba3b74ef535fe984929149e4278ca9e47edfdab42058003763ed409f88ffd6dfad06b1f12ae612fa0c76e0b471e9916d23f973eb4158d3efeff004a984da5debc1295d8e4018dbf3145d583a2ad96f356bbd7f5d90dc59587f1e79a6392f28fcaa3ee47159444ea3aa5ddfc7acf50dcdc344d7a4dbc317f52641200f6000fdeb41b5ef51d8eab672ffa9e971c97c11638268e431a46000012a3b9a351567db823b11f3ef40948e428048207a8340ab48ae83cb83ee0f3428a982719edf3e68c9cc97d3fe15ad8c9be138f2bf38e7b8f6ef40f7a5f55bdd3f56b46d3649127f1405f08e7249c76f5fa50689d48ba5f545cdcbdb462cba9206411b2b055bb07d4fb1c73528d4fa8f52d62cf47b6b8d2e65fc458c49f8a818795c151939f977a823ba0fe253750eb7fe937b04293f9f6c90be41dbdc7ff006283473c1efc1a06f69776d73bbf0f2aca32572bc80470450284a46dfca19f819f5a04e799614def26c0bdce09cfd85045dc75769d12dc3c3e2491db0dd3c85195235f7c91cfd066ae0cdba9be31f4ec61a386c1ef9d4ee473e45cfb1cf34c101d3ff1ac9d481d46c628ed24751881880833f988e7b0fa5328dfed2f2def2ce2b9b79925b791772ca87208f7a60182ee2b95cc0c48f53823fbd40ac658b30f4f4a086d4ee1d75bb6b78f4e965596366fc5211b23238008fde81f43692da5bc30d97831a0397dc09e3d714087506bf61a2c4cd77324726d2caaec141f9fd2ae0c435bf8c57173ad7876f7a2daca10489121244cdf319ce3dbf5a834fe81f881a6f57bcb6ba7c53c72c11873e28cee1db391dbef4199ff00ea4348116a5a66a8a8a04aad04847a90723f6ad7d18c312ddc02a3815423ba0f63fa541687bd9efe1b533b3c9e0a78473e899e318a09bd0ba6eef543e3b2bd8e9b10064bd9e4da001dc81401aeeb29a984d0ba7d5e1d06d4e6594f06523bc8e7f5c0ac8af752dfc17d7090d9218ec6d9447129ee71fcc4fb9cd6842ab10dc0014f3e5a2c1704b671dfdc734525226dc939e283a362c7f940344a380393df144733e2276e38f5efcd01b4bbbfc3dda4a9298a44395902e4a9c70682660d4265d62de40b1bdc1545054f95c8fe627df141af7c3af8808f3dd68dd5d2a45765884b8908d8c3b6c27b7a77a945d7a5fa474bd2ba8e4d5748b28624955d5d8b13b79ee9e983d8d40a753758c7a46b96f6114725dc92279a2810b3a64f94900763cfafa503fd3b59b79ed84da34713c0cd890f0a158fa1f981de826e1b548959fc4dc5cee24b6467e59ed4101ff19e9f676baa5d6a72c50adb4ad1ac790ccc076200f7ad41e7df881d79a87576a5f87b0f161d381db1c2a36e7e6d8ff3416bf87ff082c6f208ef7a82f22b9761bd6d619785f6dc477fa53705ab57f83bd297ceb1e9caf67708db9c4526723e849e3e94f212dd25d117fd29a8c09a76b534fa39cf8b6b71ced38e36fb73417f52e64548e34007e673e9f21ef590a1c918c90718dc281a69b68f67118d9da5058b798f6fa7fe280daadd1b2d36eae70710c4d263df0a4d583cc7a668fd4bf11b5837d7c93dcd9a3146959822a0e781f4cfa55161e9dd7fa67a4f55b9e9aea3e9f81fc09ca0ba118998fcdb2338c7b528d39f4cd2ba76e2d357d292df4eb391809963420ce1b1b576fa1e7359119f1eb4e17dd033ca172d6b2a4df303383fdeb5c8f2eef3bce4e0e335684cb0c9f354160d36f64b0baf16072b91b5f03391f43c51aab23a5debe91c4fad4d73689e6fc3a290573ff4f03e59f4a3280d67581ce916567f84b58ce0a1fccec3d58fa9a084de08c90464e4d1a8e419059b201f4a05630a176918efc50176293872c17bf14042aa0125b03db14046c60b60123fde6827fa0c68edd5365ff11346ba6292ee64194240c807e59a32b7fc51bfe8bd5ed5db424860beb62b89218422ce09c11c01dbbd0660ae110bf1bf2154838dbebfefeb41a8f4cdac7f117458f4d9ecd2df53b4cf81a822808c47255c0f7c8e7fb54a2ec2cfabba3b4b4b8d3af12eedad40926b0f070a13f9b633649f7a82eba6ea4357d321d4ecad512daf20df26e016507fa4fbfaf3e98f9d067dd2bd2faac9aa4d72d72d1e9510ca46a7631c7a320e18f1dfd7bd059afb7da816d23de4ba5de211346a1e4785f190548e4648c63b64e6b43ce9d5baafe3b539c5b452dbda46c638a167cb281c73ee4ff9340e3a3fa5f5aea4ba58f4bb57dbfcf2b02a8bf7f7a0de3a5fa0b50d2a2d92eb3e048c0a97c867dbedcf6a944e5cf4f6b76d1b3d8ea42795066266c87c81c65b9cfaf15048e83af3cd64abac08edaf01546c38dae4e0657ee6826e5b892de3702292e2545ddb55700fd0fbfca81c4b3bc718716eef9eeaa402280d14ab3c0b2c65c06fe571823ed40df56b217fa6dd5ab9216689a33f2c8c558307e83b8d77a37aaa7d22f2512c28768800c9954671b3d33ebef568d0ef7a7749eb0b5bbbb162d657b32b46d2e1564c8ed9c5644d1b0b9bbd261d2a440af6cb0e2e5b1e7dbc1238e0f7a0375b696daa7496a3a4dac8a92cf078685b271db04d391e40d5ec4586a1716de2a49e0c8c85d3b120f715ba1899173ff305413070abd89cfe9f5a2d3ee9c8639fa874eb6b804c52dc46b20c9f302c3bd11e84d47e1af4d5dc6521d3e3b662c19a58721ff5a9a321f89bd27a374b456d158dccd34d333332c9b4b2afbe47a7cb1f7aa33d2bc0d8c0f1c8f6a2c14b6d501b39cf63450897380c319e3de8065031c038f7ed40d8faf1ce41e4d004876a8dc3cc7e743025c956c818028c904579e7f0e15695c9c0541924f6c00283d0bf07f42d6b48820b8d62d20b2b58d656404959e52f83c8ff00fcfafbd4a35bb06f12391a48dd55cee2b2f3818ed8f6a8158a159890f02242079147623e631c502b0db436d1ecb7458d4738038fb0a087d6eeb508f48bb7d32d95750752b6c26c905b3ddb6f61eb574794f5cb6b9d0fa9678b512b25d24bbe52b8c1638278fbd582c57ff12afaed45b5bc0d0d8a8c08a2731ee3eec5793f40450466a1d59af446293c186cd53ca0c36eab93dc649e49fbd048e89f1675ed35e301e293919dcbf9867b37cbe94a35fe94ea4d33aba6824306dc48015750d86c6e247b0cf63591a40b8dc23fc30f14138dcac3000f9d03687547f12e8dd5af816b13148dddbcd29039c0f6f6f7a0eb5d62caf5636825db70c9bc4328f0dc0271c8a090627d3073ce681acf6505ccf14d35bc2f2c2731bb28254fb8a075144a83ca806792400334049ee6281e2496408656d880ff0031f61fa50446bd76058ea1b9e21025a3bb48afe71df9c7b71de9c8f196a0de23ca7b827d4f7add117e0cbfd4b5059392369663ff004e71c51aa97e8f555eadd258f2bf8a889cff00dc28cbd0bf123a926e96d163bdb74490bca2321c678209ff001591e71eafd7a7d7ef45cde2c20aae144638033fb9ad2e1b5e69d058da431ccf21d4a5c3b4631b62523807feaf5c7a50222f2d648c25f5aeec8c2cd19dae3d3e87e944d3eb7e90d425b49ef2292de38224f1505c3f8724a9eeaa7bd0d57a60406059436306868a7803839c7ad1a158039c13f4a33a716767f8cb9b6b55e1ae2458813e9938cd07a9f42d0b4de99b4b7d1f41b58ff19b03c93ba06607fa8b1f5f619a5b8266d74a65d42da6ba90cce996dcdc8c9fff006a5a2c2635083b05ef83eb5028076341db4b1ed9f7a04651fc41db18ed419d75b744dbea335fcb0db0335f2057901c05da73c8f9d5d18a75174a3f4c47335e35da4ce418a489374254f707d463d33565d1529b569a489a17944b06ec8057d71dcd037b4b6b8bfba31584124b27e62a8a4f1ea68357f83da7ea5a76bfe0912453ccabb49194653cb60f6ce3dfda983d196cd108c2401711f9768e306b2297d73fc6d02773a8b591922693c5004bb9d72542fa2f6efde8314ff867aeeec27500b77bb5670e36ca19b1dff2e7f2fd2837ce8bd5dd348b78b552219022870d9c46e792a4f6c608a0b846c8e03232b29ec41cd0199f1410fd4b24b1e8f712c0a5e4452d851e6c639dbf3238a0afa42ba77475e4ba8470896681da45180b18da76af3c9029c8f26dc1df2b9c606e273e86b743331924f27f4a82c12280e59b008e79f6a2d4d74188ff00e30d203a82ad7519c1ff00b860d11ba7c5e86c9fa3afae6f4091e043e021270b21e01c7dcd6479ab4dd3aeb56be4b7b184cf2b301b57d07bfd2b4bad0fe25e9f6960ba7c7a55ac50cd750335ccaade7723b83b8f6e38a2207a5ba4e7ea3d93780cb616ca53781f99fbff009a0b675a5be9765d43a75a6ad3b25adb4185429b831c70303dfdfd2831eb8954ca48f3827819c71ed406b2b1b9bf9a5fc1c4ce2253238047957dc9345d122b792eee522811a495ce1157b93ed444ff0049f476b1aaf51c761345269d25be269259570c833c6077249e062a68f53e8ef0da69509d4ae225b92a04af232ab16f98cf1f4a5a266d4dbca8af13a329ecca723f51502d14f0cb9f05d1c8ee01c91f6a0393b4edfe63c8a031608859b38f97340d84d04e5846eae50f9829ce3eb400fb24466041f5e3d2823f56d22db57b192d6e61468a41c823ff0035651916bbf04ada7badda5cad6d1b72c09dc33f2a6875d25f0865d06fe2bc6d4c4d3282026cca8cfafcfd29a34cd234a10c768f711a78f1bb392a3001208e3ec69a26a58d640c832091c90706a084ea1d3eeafdadf4f86da3166c0b4b397c18f046140f5ce4d04f4702436e91c28a9122e028ed8a0a9f5a5b6a09a1bc5a135bc72cce048b3c5bc15c638f9d59043fc2db997481aa69dae49e1cb6bb643239211939e467818f97bd305965ebce9a10bc8da9dbaa2679dd9ce3d8530572cfac87566ab05ae9f1490692b9696e1f833738555f96793504df5f25945d2576b7ec16dc46792381c7b7ad5e60f234980e42f6c9c56a82ec3eff00bd4124e49700f1c646e3cd169ce9575f83d52cee324347323f6e3861ff008a23d47d4ba6a75074fdcd8ef317e2e2ff0098bdd4706a60c3f4ae8cd5f44eb8fc3e97248a638cbc73bf90483d463b373e9574685abf42a6b5649fea72bbdeac4a8d3b018cfae31f7a6895b6b29b41d30d8e9f6bbed9213e1b7a994e724fcbb5064bd7835a9752d3af75d8116354778f660788cbd9483dbb0a0cd20b2b8d43528ad2088bdcccf854039cff00e2827a0d34e9da1de896f2182492efc0976f998aa827d3d334113a74aa9a9298628e74570478bc0c7cf1da83724bb8246d3e6416b0384da61b5501c9f5c3704f152c037561a95f5fce61d3ad6db4ab950f34b331dd9f4191db8fdcd406d67a675ab4b6d325d1af248272a43430315ddec7038f6ad4b3f448bf47eb71cb69abddebf21d5e26896203846c30c8603b9c6452d9835901405660376319ac84bf13180779d8bb82827d4fb0a06f777367a75acd7170f1430a9f331200cfceae061a0cf6dac692d7365266191db0578f5edf3a6075a6c9278b3433188a467860d96fbd40fe540471409aa0c1140750001ed8ed4058e15133c983960077edf6a06faade5c5b7822d2d926766cb967da2341dd8f0727d85033d27597d62e2ee3163756915bbf8799d71e2f19dcbf2a092b88dd9a311950a0e5b70ce47fe6ac18af53f5b69da9752dd69da9ca906876e24465d9e69881c6ff005c679c0aa2bfd267a347512c93dbb5d42d90d3c800b68c9ce0ec3cfa528db74ad034db5905ee8be1ac728dc153984f3f980f4fb56453be2de8f647a6aff53796596f0aed46798ec033ce149c0fb0ad71479c9bb9dc3bf3c55a0b95f65a825150b481a407b93c0fda8a29c06671dc93803bd131eafd0af6dffe18d2ee25982a4b04603b7a9c631fad03bbe586381bc5945b96385718c827db3eb5288eb8ba934eb15fc3c535f05427796dcccdec7150637d5bd55d5362b7975aa4d0d919018adec8637807bb60723000e4f7cd58203538aefa8aeb478a7b9beba924547b8774cf8608036a80704639cf1f9855d1a7f4c68b67a03de5e5d59dad8d988c62e1c0f107a1e7fdf7a082ea6d07a6e3e99375a7cb6b3db093c727701e2360f7f53dfb50653d4130d42ee18f48b3f0232a15218936963ebf5fbd06dbf0cfa74855b9d46e04b730c6144691e12307d33ea7de8348ba6b5478a279a004f98c479247b81f5a9438805ac0be2e02e73c9ef8fbd40c2346d43578eefc40da7da1dc8b8eefea4fcb9fef419beabf12a4bcebcb2d2fa7ee0dc58492084b30236bb6467dce383f6a0b87556a67a7f4d95a0bbb5468816f0a69c78b2e072572719ce78357079dfab3af2e7a92c963b88d94abbbf91cedc93edf418aa2c5f0dbe2a6a9a0c90d8de34773a6a8da1186d6403fa48fec682d9adeb7a9b4c9d572dacc9a6c9700456e5ca910e000ecbd8e580352fb1ae7476bd6dd49a325e5a9f3025245fe961dea097523cc0919a032af039a006936c81423104649c703ef40dcce64bc3035a87b6f0c378f9fe7cf2b8fdf340a4b6e25962915d94a67807839f7a043586922b5636ec44c061063f31f6ab079d7fe19b7eb2d4efeef55d5d74f992e9a0fc3a441dcb13927b838c9aa2d4bf042c618e178efee6e18104870172318edf5c1e6945bbe1a748ea7d2315edbea3a99bcb190030c401010e4e783ee0fa56455be3d6b90c1a6268d69e17f1486900ee98ec29ccc183119419e7e55ba11f089f523ef5058363a8059fb8e31e9421b491056c01819e28d3d0ff07eea3d53a1e3b6b8db235aca63c139c0eea68ca47a9fa6ef757b83ff00bf68ad428c2f248c7a8f9fcea518df516adac74e7544f63a2ea172f1800291e6cee19ec78cd5826344e85b6bad25ba8fade5b99dae0ee11efc71e858f7e7d054a2d7d39a75ae8f7b6b00b8917f1516624b78429da327cec493db1db1d8540cf4aea28f58d6aeae2f6dd64b498082d880488d149fcea7d4939ab04175e6850a8d32de3b78e380c8de32c4db4e18e430fef543cf86fd0d691b4fabdf6648b3b2db69ce7dd87be68342d2f4fb9b5b891af1a28a2dc05bc5036d001e0eef7352884b961a2ea9aa7555c885e08d45b5bc52b61b686c120fb939fb541276bd4b61d53624d942e2f6200bc32290633e99f4233416dd3ad3f0d611c0c77b632e71dc9ef41156dd27a45addcb3dbd9c513b1dd941821bdc7b558333b9f873757fd69a85e3f813e9c7723b5d93265d872473c11544a68ff08fa75e290b42ec4e4124e70738fa5048e89f0f745d2aeadd2decedda6525c975121183c77f7a945c754d0e0d563682ed43425369403bff00bcd58308ba7d5fe13f5a05889974a9d8b46aede4914f707d88ff001528ddf4fd7edb54d1a1d56c312dab2e64dbc9418e78f5c541296d70b716d1cd6f8789977230ecc280cb7519b816f212b205de4e0843ce300f6cfcb39a0545c42cee88e0b458ddec33ee680eac92266360debc7b5056fad2d354b9b189745744be121daf27e550548ce3d4d58324d07a725e98ea2b7ff5381f5169a7579d021fe13904ee43ddfbe49038ab46e76cf05cc714f6d309232a4a98ce54fd6b2196bb7f2e9b631b2c427b891b6851db3eff002007341e5bf887aa2ea3d4f77378be381e42fdb711ed5a1554395caf1cd07617dcd04fc85402101da791421b49920331381c60d1a69bf02f56f03a925b12c162b98c955f775e47df19a32d99b518268e4491668704a79d4aeec7b7bd4a30feb7e9144d76e265697c3e2693631674273803e556087d76f35fd49859e9925ccf611141106f2e182e3241f727f5a94681a268f79ad1b1b8b9dd66b1c2b1ce9bb06361c1e7bf3fe6a096b0d3ba57488e485b52b40909c386901607d47bf7a0ae758eb69ac4d15be81a748f0a9c35cc90b2eff4c03c1c638a0b77405c5d5d45f87be5fe359a88b81b401dc1c7d38fb50586fed18ea3015790091591e447c1518c8c7a0a0a5754d8c9d49a8d9f4ee9dba0b3b5224b9692327728f627e7c6682f9a7e996b6b3a8b6b748a348820c7720761412c064e3041ce282b5d4bd73d3bd3f33daea97ac2e540dd0a292dc8cd043c1f15ba2a7923b65bb910371b9a12141f9d02edf13ba2ade56857551e5e77244c54fd0e280746ebfe99bbbd655d56dcdc9ce08465565f4ee3bfca82d53eb3a6dac3e25c5f5ba646402e33fa77a0aff5b74ad8757e9ca972844aa37c520fcca7d3f5ab067bd369a8f467544d626c98e9f7118f0200e4465c903049c8c9e6ad1b24334b6fa6249716cab20037c309dd83db03b5640dddac3764a4f02cb1103863919fa7a1a06d6f600c37162911b7b252b87dc773f1927393f4a079f868edae1ae6328a8b1ed38e30050226e85d5dc1f879011b3c47c2f604719f9d01eff4f4b83e3c6b18bb452b1cac9b8a83de80b16e8208a3b7b58e1407cc061427cc0ff1560ce7a8f592d69a97504cad2dac01a2b53900c3e9e51ea58f727d0551e73bfb86b99a49a46dcf21c96340dc13804f20f6f9501c0e3b8a0963316fcc4607007f57bd084d64dec01200ce483468ff0040d525d1755b4d4206ff0095207c11dc67ff0019a18f56584f6daad9dade4211e39104a8ded9152b235cd8c530613229c8c1c8ef50472e81690ee00322b0c100f0debdbb7ca8111ace856371358cba85aa5cc407891ccf83f2ef4048b4ad2e59bf116769672c72f99dd1437239078e2824a4d3e1b94559234110e781839fa0a0561b38ad532a12319c86c6307e740a9732a3a00cac870cd8e0faf0681be8b6db965bb909df3c85806eeabced5a09523647e6e0fef419a6adf116daf7ac34be9dd1da686e7f1ca2e243b76320ce57df9ff1560cc3e3f470ff00c78255b842b35bc6c4af9b6e323d3e95467b6365f8dbcf062beb68c119595d8aaff6e282422e9899b4f6bb5d46cda2562a76316c1078f4a0859e1b9b762c0bf94f0e84feb4125a57505c58ea70dd5d0174a986d92b1c13f6f5a0de7a5be366877260b5d42dee2d2423124a487507ebdf15289dd3fac7a7bab6feded74d61733473acdb5a162142ff00313d81ed505fa58fc6d809380c1b9f5c502e0e05040ea367a85dea454de2ff00a610375b04c16c7a16ef8340b5f6930dce9375636acf6a278f04c5dd4f1dbf4a084e91d06f3a52dee62bbd4a2b882494ced3c8a448063b63b638fde803ab7ae749b2b3096d792c93c8c109b55dcd18ce3710473ffdd043dc758dc5869044565aa5dda4c3c2b7bc78c1f14e3963db03e7c0ab066bf1327d41ba76ca6bc48ecad24c456f6b0c87cf8e4bbfa138c0fa9aa3297c83dd4e28395811cf2680a5b93c7ed413cd1ff0f3c797b8031406645236b0508406f30e68ba49c051b97d0e0e7d28ad57e19f575c5be8f269515dac772877c11bc464dea7ba8c739ce78f9d3193bb8ebfea2bcbd6b5b6b8b58bb7f13c2f0ce31cf0deb4c0f2dbad6d743d2ee99efae752d6c02a86e0054524f6383c7ff94c0b6af274c75149a46a5a82c46f1e1479fc3190bd8156fbe7f4a960bf74e9d253f1167a3ac09e0856610e3041ec7f6c540f67b892cee7f8d18368232ef2af2508c7047cf340ead5bf130accc9b1186541e723d09ffc5033bbb1b82d74d6b37f1244daa1b38073df3f4a08eeb1d3b50d4fa6a5b4d32f12cef1902ee73e523d476fde8306eb0d3fabfa4ba92c278af67bb7281606472f90bdd58558253a6afb40ea1d62283a8b461a66a6f931cf6a7c2466f7cfb939e7b5515fbed3747b5eb8f06eb78d35080a2ec9719c76f98049a0b4ebdd37d1bad869acbf0b03c5c16b29444adf50ded41995f68564a263a66b31cd02be152505493f51c1a088bab69ad1bc179e320f07c37c8a0692b46c4995f0381db39a0b2fc34e971d57d4705bc8db6c50ef9dd97b81fcbf7381528f5ae97a1d8e996d1db69b0c7648855b10a81b80f43c739c54134147b9a036063279fb5046e957726a0f2cfe04915b06db1788305ffeac7a0a00d72f8d9c491c06337533050ac7185cf2df6a06da2da4293488f34973328c34aea428c9ec3eded40ee7d2ad249448f6b133820ee2833df3fde819ea96897461b05b87815f2ee919e5d47704fa039ab079b3e326b70eafd4ef6d6650d8e9ebf868b69c8247723efebf2aa280eb9193ebedc5002a124e015340018fb8fde82cf32b1603d0678cd02406dce3008e47ce81b499c331383c9c9f5a2e9c69377369f7d6f796a4acf148acb83fb511e91b3b3d0bab745b7d45acedd8e3732b71b1fd73f7a5a19eafd09a56a0a96b1c705b49c48510761ce4fcfbd4d0d752826b2b583476fc3daacb295b79d768de8a32b1e71f989e49f6a7d14dd1af5ba275a45b8b093c054492ea769092373765c1da4679fbd306e36ba9595fe9f0dcdbcc92c33e1579cf27d0d409ea178f68521b6b76926ee8a7853f7ff140bc768d78f6f73748d1cd103b543f0091cf6efc502f7319dac194371d8b6326829f0c501d7ae6fa568d5d4942c806d4db81839f53c8cd59456fae6e628749b5bab8b1865b08e4726588ec11e7f2e49071c93da9a31dd4341d675e9a5bad374f9858162d0b4ac70e18f0573df35a0c759f87bd53a404f174f965dfff00f479b1ef570576e34bd4b4cc0bdb3b9b7258a00e846e3f2a94376475cee4914af7ca9150685f09ba61efb52fc7dd69bf8eb7c158d1d0b47bb38f37efde968d6eeb4eb5e91d6ad25b660aee59974db6881690918e31ce39279e062a5a34bb57b88adedd1e379679065d80036679e6a07e8391bce7e940c659ef5afe1286de3b16f2b8903094b7b2fa7ce81eb380c4260ed193f2a0cd6fa5d4a4ea0fc7bdadcce923158a3039db83c038e3ef41a0e96b2ad8a35e009291b8a939d9f227e43bd590436bbd6fa269202c974b7123602c76e779624e00e29833bf897d493e896525dbcb2a6b5a9c3e1456b91b6d60cf989c7f31f7a60c02490961ebcf3eb541308e39e067b507007b96007a67fb50178f97eb4165ce18165c2927b773fad023202d9c8dbb7818ff003408300b87f2f1c107d0d0c15a4f2e339c90467f6a18bdfc2cea8ff4bd561b4b9ba686d6e64552c4f954e7d7e46a60f4688d240af1b2bc6cbf5047ca960617ba658de1b792f2d94a5ab33461b18524633fa1a81b5c8b5168967369d23c0e0a24622dc981d81c76aba29df0bb48d660d52fceb88d069f04aeb69130037127f37b9c0ed9a8350781240bbc06da72323b1f7a0eb8816e633192ebc8c9472a78fa50349b4c83c068e24f0ddbcc1c13b837be4d055b57e98b996d4db5b4a893dc1e6620b6ccf2c467efc504ce97a38d3f4d874bf09af6d46e2f25cb82724e791db15650a43f878b51fc34f3da8f132b6d6a98c80a39ff007e99aba249631b58b9047239ec3e55368aeeb7d2da6f52c0eb7f16e87f2c6e836ba90724ab7a67b55d115ac7c3e8aed2182def4c56a14096368959a423d77e3229a27b41e9d8343b01069c8a8dc9660aa3713df3c64d4a1c695d3d6b67a8cba94b9b8d4e61869e4e4a8c636a7f4afcaa09a485519caae19b966f7a0435196582c656b74df3e308beec7b50629375775b691ac5bdb6b16d6378779f019b00a31cf391c9c2f1daae0b35ef52f5374de88d77aa45a6cd25ddc0108694ee2188c28007603d6a0d16c92430a4b2ed3230dc401855cfa0a0a07c45d7b5db9d462e9ee960b14b2ee134ef8c850012147ec78ab0670b643a2efae753d72686e6e2da211db42176079c8e768f65e39f7aa332d6f58bbd635096f6fe6692695b24f603d801e82823cb900ee00e68006460051dfd680ed9f0c905b713d8d006d5f5419fa505a18f94e40501b1b81a04186d62402c87be3d6810b81290aea8467201231cd1749dbc437f9f1e201db3de8ba07dc0175c027f28a335b17c26f888d6b6d0e8fabf892a29c453b1e547f49f7a946d6424f08236491c833ee0835073294888894120700f0280813c40a6711bc8843e00fca7d3ef40e41dc081f9a811681c6f7565329185623b7e9de812b3bcf11ff0b74563bd50494cf120071b97e5fda80d7577046c9019d5669dbc340324eec67fb734103d5da96bf67a7cf0e916f6e2765f25ddc4c11107ab1c8c647cce2816d3ec7f0f6564cae6e67da375e6d52cc4af2e4fb13ed4145f899d47b3499f4bb6d46cda49b69b92921565c3648e3dd40c81cd5c0ae89f13ec246d3e379ed2d6da180b5d34849da1780b128e49271c9f4a60ba685d5fa36bc42d95c324ec7090cc9b1d87b81ed50588958977cacaaa3b9341c655f12348d1dcb8dc1946540f99a019e2134454eeda7bed3839cd052fe2136b536b5d3563a1ca53c49da4b9507198940ce7e5c9fbe281c6b7a974cf4ee4ea7242d76dc784a3c595b3e9b464e3f6ad0ac745ccbd4fadcbabea42da56959a382ce7460d6b1a93c01f97272093ebf6a82f1ad6af0e9da5cb3cecf6902216919f82aa3818c7a9f4c530649a9f5269ba7429d472239bc991a1b0d3c3152880f0f23039e7bf3de90635ab6a377aa5ebdcdecef2c9239e59f3827e5ed54302195fcc38cd01245395c1f5f4a05b606538e483c501b6939e3b5077860f3914165754c33e549000dbe87de813b820c27fa7baafb8a04a69c98e281e42618c795338033df1f3a06c03e4e029247007ad010093c35674da71f977640340081a190658e41c820f141b0fc33f8926c218b4ed609366a02249bb2d19ce3ea4528dbece68eead926b7916689c643a9e0d643387521fea2f693c2d6efc786ee46d9bfed3eff2a04669edf5295ff057a60bd865309246d3bbbedc1efef41d63a8dec9ab4fa7dd4510fc3c69234ca186e2d9c003b7a67bd034bad0a5bb96e25d575267889cc1b54446d9bd0a37bfbfbd02925945a72cba8dddc48b3f87b1e58f23c623f292bdb7fa7cf38a0a5750f54ebba56a9a67fc516b6d6fd3970ea9234677c8dc7f38f6e4640ce282d1ac4b16bfa72c1d2bad430cd1ba822061865f5007d3daac19cf547c189357d561bbd3eee683c62cd786e9b73337b8c7bd512bd39f06adedec2de0d5ae639da372e6485363107f97767b505cee755d03a5e58ac228659af123184b7b733322e38c91dbf5a943ab3d52e64b49ee755d2e64950e238e35f10c884e17cbe87dc540e6d7509a4f110e9f7566a471712850abf6ce463e6280bacea36fd33a4497f773cf32c698dcc4beee33938edc7ad05534aea683ae61d64c4d2a69b6b88d16d5ca5c303f3e386cf61db140e27b5e99e96b64bdd562b6b30aa36c6c37cac7dc9eec6b42c1a66a962fa70beb6b516d0cbe76322f86c78f6c66831bf8b5d5d2dfa35a5dce60b1933b6ce3c788769f2b331ec1b8fd2831b79649984b239773c1dc68129725c1c640e73400ec781d8fb1a03c4a85d0c8582640257bd01e51fc42236263c9c67be280429c6037eb405dbf5fd682c2a0bb976cf07d3fc5009279ef8ec4e68193a9902b28e7dc71fb501d95b098e0f6dd9e0d0049131019b047b8390281bb292484e47c8500c4f242c3076bf704704739a0be7c3febfbae9a5daf23cd017c7e19fb107bb67d0f6fd6837cd2757d1fab34f4f05e37dde630b1c3a91edf4f7159103d6eb7da65fdbdf59dadb5e2460ac876ed9e1c8c060f9efe9c8a0a75cfc42d5742d2ee5a7e9dbb494b6d6b9bc930cce4f940e3cd81ed4160e98f88315e689fff0022b57664199cc5196f0c7a164ef8f98cd0589baffa68590985eb15c0db1985839f6c2919340b69d03f5285bdd6f4bf021424db4329cb153fccc3d09c76a090d3340d2f479a7bab3b38e2924e5e451cfd280d7dafe936f6c5e4bd89813b02a36589ce318a0358dc35cc4e17f9bf234cdbb78fa0c607a7340e6cec20b1596610c6934b8323226379edda81da8dcb9ec40a042f50b5bb21645473b58b11dbd7bfca8304f8add5d67a9ea8ba5d8ea72c1a4d8a952f10f2c920e368cf71e99fad5833dd0754d6ed66bdb2e9a91a5babb2a310465a57c1ddc1038e7bd5171d3748b8d46ee1ff005298dc6a764c27d4eeaee7fe1c01795881c9e7804fe940dbe287c4b6d75a1b1d1c986d62277c91bf131f4c0f6fad0663737135d3b497124924871f98e7803007d2811dc5b83903dc0a0333f03be7de8122df2c9a05a11e5f51f7a05ce7071804fca8033e5da0734020b0183bb23e5416269577ed0e5323078ceeefdff6a03dbcd62914c2f629a47c622689800879e4fbd046f9d8a2a03e31385c0e73da8b83ca590947dcaead8208e73da8849b3e19ce704f7c5015586d006431f5cf61f3a04ee586ff002481c8fe6191408f0011eb8e30682774dea9bbb5784492ca6385832e1ca95e3d2834be9df8c312e2db5eb4375080337000f1303d18763591a469baef4d755989ec6f6dae5a23e20b599406dd8e080ddbed41272f4dd8caf1c86d163910f9595882a3d718a035edd695d3b6a926b57d0ac65b10b4e06eedd863bf141077fd7af2782bd3fa26a1a8891d57c630948c0279393dcd04cf5875258f4de9f0cb7b7b6d66d2b81ba752d85f5214724fed41036bd79d2fe319d7a8f4b9c81e58de2f04827b9ce09a07a3acecf54b790685ace8697606009e52c377b7f2e682b097d7d36acf0f55df5edbdc0977412468cb6ce3be10af3c63b9c8a0b0751f505be9690dd5d752436f62a3fe4c6448f3b7b0c64e38f615734651f107e3045ac42b67a7693018633b965bc1bc838ee173807bf7cd33065baaeb1a95f2c11dfcd2bc51fe48880aa3e8a062a8b059f595df4ae9a74de9e9ec499d43c97b1427c6e47e525bb63e4282ad3ea3712893c599dbc4259c1627713c927de81043950df97db1406da8411c92063be280230839627078e79a0390a71b5bb5003a8c1232338e4507025573e9fbd02a0e41dc0e680c3691cf714053bb34160895dc16f291d98d02322aa39f3e14707ffaa06f202a5bb0c7201f4a343aca51090497efdfbfce89840c8db8e46573923ff14410b00490d9f5c1a0425dd8ce4673e873cd0265e4dbe7041ed814009b8cbb8e5863bd07163b7716e0607b6698060b96b7b9478dc8643918247ee39a60b7e97f133a8b4e0c63d4ee597380923970a3ef4c0e13e25dfcfab457ba95bdbddb212016501867b9cfbfda982f907c74b282da34874a9048aa479c83838edc62982b7ac7c42d235cd67f15ac5b40c366418a2cb0c1c81e6f5e31db14c160d035de8cd4a3f18ea96562cc37359dfe9cac887fef039fd6b39446f56ea5d13a9dca4579a922496b1975b8d22dfc3566cf9557230703be715ac1431d4d2275325d7fae6b4f6f182a93ef1e32a9f41938f6a60afeb1a95c5fea53dccf772cf2c8c489240031f627e7565c0d67bbf160487c1801073bc0c31f91f953420f2bc8c7c52cc540032738a809905c0f4fa501940208e73df34028e703938a0577ae013f4a001300db4f03b71407461ce0502dca8c9c7dcf6a003fafcbdcd0070bc1e0fd734070db467b8a04cb9c9e68274b93bcb1daa40200ed4099765249ec476cf340849b8b264823bf34689ee009cb671df1409bc8e8b8e770e3ec68984d9c953cf97be2860b248caaebc107dc67f7a184c31232db88fd451031ce50e76039f5c8045026efb8f93279e0fd680b239504f0483d88ef409ee25bb90c79c0e050151c6e21b39ce783eb40adbcc2cefa17bdb61322387781c950e3dbdf9c8a066f28790b22e013db3dbef54726081e63c6460d34191b1bb0720f634060e7600412c781502409c8e3d7b500ed71dbef8ed40243f181c0a02e5d4e0fad006f644e4819e3b501f7e3049e7b501bc43b4e391da80558003392d40a23305e320d02e64cf998e1bf5a032b0c927b8e68049c8c8e71c6280377043118f4e680bbff00de0504ddbb3128371c1c64668024e59f3cd02521254e4fad1a2107e48fe6a6809ddb9e78a029e1463d05027ffc744a6c3857c7b1a205ff00e637fbf4a02b12b1794e39f4a02024e7249ed409924720906800005173fd7404989698ee39e4f7a04cf723d07a501fff0097ed406ffe36a018ff00281e99a037f4d0731f3bfd28007e53400ff99a810248c0cf140bc60123233cff008a0557f9beb4056eff007a07109243e79a03778b27bfbd02b128c27039a054001b818a06609de793da815006070283ffd9}\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 Here is a movie {\pict\jpegblip\picw20\pich22\picwgoal400\pichgoal440 ffd8ffe000104a46494600010101004800480000fffe0050546869732061727420697320696e20746865207075626c696320646f6d61696e2e204b6576696e204875676865732c206b6576696e68406569742e636f6d2c2053657074656d6265722031393935ffdb00430001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffdb00430101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffc00011080016001403012200021101031101ffc4001a000100020301000000000000000000000000080905060a07ffc400231000010501000300010500000000000000060304050708020001090a11153976b7ffc400160101010100000000000000000000000000060800ffc400261101000102050109000000000000000000010200030405061121b33134365154717475b4ffda000c03010002110311003f00a90cf388f366a62aa720ed6ae07f96901f3831d973452b8cf36fe3570fc908e46d466433e5dd954f2e96992d9e498c7753faa44916e016ca91cc7d88b38fe60a5b97737defcbcc539c98d336a57f4fc2ca9a486bf07ab575ad9a3af4df221d8215e36df86c4504ff0024574551b3d687ee0575757b3ad64e311ee62bd94158d37e24198c43973099f1fc0c41614d950246513a081abf76cfe7061f6863281e6352fd1670949c148dd6dfb0d25f5b3689b1d5c965b0eacbf4e0932ad28e22ab9ae945633f4744bd3c8cee0a7fdf085b9000f449c5f7afa30b83e0b6fd7b0c8429c9467ff9715347c891e25fa24a205861aa715e6a09bd0488237dc2723414d9891381524e8ca7c0894664f835653631ab55ee7e3de433e4ff001b30949124e4c10c8b6ad0a479b3f9c937b2cf5bc0095ad600a0a41a0e9faee174a1c605e161c6c7a313539650b0113190f1a8368e60d5b24f30ff008ea7f0bf867fa6595feeb6978f1fe0f9c26177f4d63a51a9235184750e7d18811339cd000000c75f000e00380380ae390c350def826ed42ad051fa6f501c50f9b699c3b69cbeb76476d202bf3ac985b6e0e968be66572893e6a744540bd9722e5c87956848629bc2559306bd113e8653d3b6aff651dfad7a3ac8b02958cba02a93ccf525757039bae6cff090e1d90688e8aa233ee86a4c4a3e0586d6b2340522e47dcb7d0046d8a5acb05a123ee25d2b230b2ada6e2e2f9ede3c05202520ec2487b0d56562529d8b3393bca76adca4ec1bca508abb001babc007915d84fe3dd14e207e3c62f8379da2a3b861fb6629d28dba53b6ea388ebfed866bf6dfb553455e91ed547ae92e9445253a4fdf3efb4f8ebdfbe7d3c78f1ee0bb9e13e358e942a4ed49e22cff00eeb35fdd7ebfffd9} icon.\par}
{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par}
-{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Footnotes\par}
+{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Footnotes\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Here is a footnote reference,{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.\par}
} and another.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's the long note. This one contains multiple blocks.\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Subsequent blocks are indented to show that they belong to the footnote (as with list items).\par}
diff --git a/test/writer.tei b/test/writer.tei
index 587a6fcca..1ded37956 100644
--- a/test/writer.tei
+++ b/test/writer.tei
@@ -54,9 +54,9 @@ Gruber’s markdown test suite.</p>
<div type="level1" xml:id="paragraphs">
<head>Paragraphs</head>
<p>Here’s a regular paragraph.</p>
- <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list
- item. Because a hard-wrapped line in the middle of a paragraph looked like a
- list item.</p>
+ <p>In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item.
+ Because a hard-wrapped line in the middle of a paragraph looked like a list
+ item.</p>
<p>Here’s one with a bullet. * criminey.</p>
<p>There should be a hard line break<lb />here.</p>
<milestone unit="undefined" type="separator" rendition="line" />
@@ -630,10 +630,10 @@ These should not be escaped: \$ \\ \&gt; \[ \{
<p><quote>Hello,</quote> said the spider. <quote><quote>Shelob</quote> is my
name.</quote></p>
<p><quote>A</quote>, <quote>B</quote>, and <quote>C</quote> are letters.</p>
- <p><quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote> are
- names of trees. So is <quote>pine.</quote></p>
- <p><quote>He said, <quote>I want to go.</quote></quote> Were you alive in
- the 70’s?</p>
+ <p><quote>Oak,</quote> <quote>elm,</quote> and <quote>beech</quote> are names
+ of trees. So is <quote>pine.</quote></p>
+ <p><quote>He said, <quote>I want to go.</quote></quote> Were you alive in the
+ 70’s?</p>
<p>Here is some quoted <quote><seg type="code">code</seg></quote> and a
<quote><ref target="http://example.com/?foo=1&amp;bar=2">quoted
link</ref></quote>.</p>
@@ -821,8 +821,8 @@ or here: &lt;http://example.com/&gt;
<div type="level1" xml:id="footnotes">
<head>Footnotes</head>
<p>Here is a footnote reference,<note>
- <p>Here is the footnote. It can go anywhere after the footnote reference.
- It need not be placed at the end of the document.</p>
+ <p>Here is the footnote. It can go anywhere after the footnote reference. It
+ need not be placed at the end of the document.</p>
</note> and another.<note>
<p>Here’s the long note. This one contains multiple blocks.</p>
<p>Subsequent blocks are indented to show that they belong to the footnote
@@ -830,8 +830,8 @@ or here: &lt;http://example.com/&gt;
<ab type='codeblock '>
{ &lt;code&gt; }
</ab>
- <p>If you want, you can indent every line, but you can also be lazy and
- just indent the first line of each block.</p>
+ <p>If you want, you can indent every line, but you can also be lazy and just
+ indent the first line of each block.</p>
</note> This should <hi rendition="simple:italic">not</hi> be a footnote
reference, because it contains a space.[^my note] Here is an inline
note.<note>
diff --git a/test/writer.texinfo b/test/writer.texinfo
index 53a25d515..ca80f3245 100644
--- a/test/writer.texinfo
+++ b/test/writer.texinfo
@@ -732,8 +732,8 @@ Superscripts: a@sup{bc}d a@sup{@emph{hello}} a@sup{hello@ there}.
Subscripts: H@sub{2}O, H@sub{23}O, H@sub{many@ of@ them}O.
-These should not be superscripts or subscripts, because of the unescaped
-spaces: a^b c^d, a~b c~d.
+These should not be superscripts or subscripts, because of the unescaped spaces:
+a^b c^d, a~b c~d.
@iftex
@bigskip@hrule@bigskip
@@ -1014,24 +1014,22 @@ Here is a movie @image{movie,,,movie,jpg} icon.
@node Footnotes
@chapter Footnotes
@anchor{#footnotes}
-Here is a footnote reference,@footnote{Here is the footnote. It can go
-anywhere after the footnote reference. It need not be placed at the end of the
-document.} and another.@footnote{Here's the long note. This one contains
-multiple blocks.
+Here is a footnote reference,@footnote{Here is the footnote. It can go anywhere
+after the footnote reference. It need not be placed at the end of the document.}
+and another.@footnote{Here's the long note. This one contains multiple blocks.
-Subsequent blocks are indented to show that they belong to the footnote (as
-with list items).
+Subsequent blocks are indented to show that they belong to the footnote (as with
+list items).
@verbatim
{ <code> }
@end verbatim
-If you want, you can indent every line, but you can also be lazy and just
-indent the first line of each block.} This should @emph{not} be a footnote
-reference, because it contains a space.[^my note] Here is an inline
-note.@footnote{This is @emph{easier} to type. Inline notes may contain
-@uref{http://google.com,links} and @code{]} verbatim characters, as well as
-[bracketed text].}
+If you want, you can indent every line, but you can also be lazy and just indent
+the first line of each block.} This should @emph{not} be a footnote reference,
+because it contains a space.[^my note] Here is an inline note.@footnote{This is
+@emph{easier} to type. Inline notes may contain @uref{http://google.com,links}
+and @code{]} verbatim characters, as well as [bracketed text].}
@quotation
Notes can go in quotes.@footnote{In quote.}
diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex
index d91f77325..1f7ce262b 100644
--- a/test/writers-lang-and-dir.latex
+++ b/test/writers-lang-and-dir.latex
@@ -3,7 +3,6 @@
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
- english,
]{article}
\usepackage{amsmath,amssymb}
\usepackage{lmodern}
@@ -45,37 +44,23 @@
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
-\ifXeTeX
- % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
- \usepackage{polyglossia}
- \setmainlanguage[]{english}
- \setotherlanguage[]{german}
- \setotherlanguage[variant=british]{english}
- \setotherlanguage[variant=swiss]{german}
- \setotherlanguage[]{spanish}
- \setotherlanguage[]{french}
+\ifLuaTeX
+\usepackage[bidi=basic]{babel}
\else
- \usepackage[ngerman,british,nswissgerman,spanish,french,main=english]{babel}
+\usepackage[bidi=default]{babel}
+\fi
+\babelprovide[main,import]{english}
+\babelprovide[import]{ngerman}
+\babelprovide[import]{british}
+\babelprovide[import]{nswissgerman}
+\babelprovide[import]{spanish}
+\babelprovide[import]{french}
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
- \newcommand{\textgerman}[2][]{\foreignlanguage{ngerman}{#2}}
- \newenvironment{german}[2][]{\begin{otherlanguage}{ngerman}}{\end{otherlanguage}}
- \newcommand{\textenglish}[2][]{\foreignlanguage{british}{#2}}
- \newenvironment{english}[2][]{\begin{otherlanguage}{british}}{\end{otherlanguage}}
- \let\oritextspanish\textspanish
- \AddBabelHook{spanish}{beforeextras}{\renewcommand{\textspanish}{\oritextspanish}}
- \AddBabelHook{spanish}{afterextras}{\renewcommand{\textspanish}[2][]{\foreignlanguage{spanish}{##2}}}
- \newcommand{\textfrench}[2][]{\foreignlanguage{french}{#2}}
- \newenvironment{french}[2][]{\begin{otherlanguage}{french}}{\end{otherlanguage}}
-\fi
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
-\ifXeTeX
- % Load bidi as late as possible as it modifies e.g. graphicx
- \usepackage{bidi}
-\fi
\ifPDFTeX
\TeXXeTstate=1
\newcommand{\RL}[1]{\beginR #1\endR}
@@ -123,18 +108,19 @@ word-that-includesa\LR{ltrspan}right?
Some text and
-\begin{german}
+\begin{otherlanguage}{ngerman}
German div contents
-\end{german}
+\end{otherlanguage}
and more text.
-Next paragraph with a \textenglish[variant=british]{British span} and a
-word-that-includesa\textgerman[variant=swiss]{Swiss German span}right?
+Next paragraph with a \foreignlanguage{british}{British span} and a
+word-that-includesa\foreignlanguage{nswissgerman}{Swiss German
+span}right?
-Some \textspanish{Spanish text}.
+Some \foreignlanguage{spanish}{Spanish text}.
\hypertarget{combined}{%
\section{Combined}\label{combined}}
@@ -142,17 +128,17 @@ Some \textspanish{Spanish text}.
Some text and
\begin{RTL}
-\begin{french}
+\begin{otherlanguage}{french}
French rtl div contents
-\end{french}
+\end{otherlanguage}
\end{RTL}
and more text.
-Next paragraph with a \LR{\textenglish[variant=british]{British ltr
-span}} and a word-that-includesa\LR{\textgerman[variant=swiss]{Swiss
-German ltr span}}right?
+Next paragraph with a \LR{\foreignlanguage{british}{British ltr span}}
+and a word-that-includesa\LR{\foreignlanguage{nswissgerman}{Swiss German
+ltr span}}right?
\end{document}
diff --git a/trypandoc/trypandoc.hs b/trypandoc/trypandoc.hs
index f2cc499c3..5a3432ffe 100644
--- a/trypandoc/trypandoc.hs
+++ b/trypandoc/trypandoc.hs
@@ -52,12 +52,12 @@ app req respond = do
let result = case runPure $ reader (tabFilter 4 text) >>= writer of
Right s -> s
Left err -> error (show err)
- let output = encode $ object [ T.pack "html" .= result
- , T.pack "name" .=
+ let output = encode $ object [ "html" .= result
+ , "name" .=
if fromFormat == "markdown_strict"
then T.pack "pandoc (strict)"
else T.pack "pandoc"
- , T.pack "version" .= pandocVersion]
+ , "version" .= pandocVersion]
respond $ responseLBS status200 [(hContentType,"text/json; charset=UTF-8")] output
checkLength :: Text -> IO Text