summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-04-24 10:48:39 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-04-24 10:48:39 -0700
commitde5ee82ed0e287ada3a5b272d8365a04fe8e9f95 (patch)
tree126c941f08f4d1e2775a694d4fd7f7c859b4b81b
parentabcbe3005117f90babc225ce958766845cf59d2b (diff)
parent5e6879dbf98eb5528c7f417b349118aadca40d71 (diff)
New upstream version 2.1.2~dfsg
-rw-r--r--AUTHORS.md197
-rw-r--r--CONTRIBUTING.md125
-rw-r--r--COPYRIGHT105
-rw-r--r--INSTALL.md147
-rw-r--r--MANUAL.txt2024
-rw-r--r--README.md273
-rw-r--r--Setup.hs55
-rw-r--r--benchmark/benchmark-pandoc.hs77
-rw-r--r--benchmark/weigh-pandoc.hs19
-rw-r--r--changelog3340
-rw-r--r--data/abbreviations50
-rw-r--r--data/bash_completion.tpl4
-rw-r--r--data/docx/[Content_Types].xml2
-rw-r--r--data/docx/docProps/core.xml2
-rw-r--r--data/docx/word/_rels/document.xml.rels2
-rw-r--r--data/docx/word/_rels/footnotes.xml.rels2
-rw-r--r--data/docx/word/comments.xml2
-rw-r--r--data/docx/word/document.xml400
-rw-r--r--data/docx/word/footnotes.xml33
-rw-r--r--data/docx/word/numbering.xml2
-rw-r--r--data/docx/word/settings.xml2
-rw-r--r--data/docx/word/styles.xml72
-rw-r--r--data/epub.css2
-rw-r--r--data/init.lua7
-rw-r--r--data/jats.csl205
-rw-r--r--data/pandoc.List.lua120
-rw-r--r--data/pandoc.lua945
-rw-r--r--data/pptx/[Content_Types].xml2
-rw-r--r--data/pptx/_rels/.rels2
-rw-r--r--data/pptx/docProps/app.xml2
-rw-r--r--data/pptx/docProps/core.xml2
-rw-r--r--data/pptx/docProps/thumbnail.jpegbin0 -> 5709 bytes
-rw-r--r--data/pptx/ppt/_rels/presentation.xml.rels2
-rw-r--r--data/pptx/ppt/notesMasters/_rels/notesMaster1.xml.rels2
-rw-r--r--data/pptx/ppt/notesMasters/notesMaster1.xml2
-rw-r--r--data/pptx/ppt/notesSlides/_rels/notesSlide1.xml.rels2
-rw-r--r--data/pptx/ppt/notesSlides/_rels/notesSlide2.xml.rels2
-rw-r--r--data/pptx/ppt/notesSlides/notesSlide1.xml2
-rw-r--r--data/pptx/ppt/notesSlides/notesSlide2.xml2
-rw-r--r--data/pptx/ppt/presProps.xml2
-rw-r--r--data/pptx/ppt/presentation.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout1.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout10.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout11.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout2.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout3.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout4.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout5.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout6.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout7.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout8.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/_rels/slideLayout9.xml.rels2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout1.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout10.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout11.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout2.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout3.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout4.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout5.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout6.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout7.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout8.xml2
-rw-r--r--data/pptx/ppt/slideLayouts/slideLayout9.xml2
-rw-r--r--data/pptx/ppt/slideMasters/_rels/slideMaster1.xml.rels2
-rw-r--r--data/pptx/ppt/slideMasters/slideMaster1.xml2
-rw-r--r--data/pptx/ppt/slides/_rels/slide1.xml.rels2
-rw-r--r--data/pptx/ppt/slides/_rels/slide2.xml.rels2
-rw-r--r--data/pptx/ppt/slides/slide1.xml2
-rw-r--r--data/pptx/ppt/slides/slide2.xml2
-rw-r--r--data/pptx/ppt/tableStyles.xml2
-rw-r--r--data/pptx/ppt/theme/theme1.xml2
-rw-r--r--data/pptx/ppt/theme/theme2.xml2
-rw-r--r--data/pptx/ppt/viewProps.xml2
-rw-r--r--data/sample.lua10
-rw-r--r--data/templates/default.beamer278
-rw-r--r--data/templates/default.commonmark2
-rw-r--r--data/templates/default.context30
-rw-r--r--data/templates/default.docbook4 (renamed from data/templates/default.docbook)0
-rw-r--r--data/templates/default.docbook56
-rw-r--r--data/templates/default.dzslides13
-rw-r--r--data/templates/default.epub59
-rw-r--r--data/templates/default.epub268
-rw-r--r--data/templates/default.epub310
-rw-r--r--data/templates/default.html64
-rw-r--r--data/templates/default.html469
-rw-r--r--data/templates/default.html525
-rw-r--r--data/templates/default.jats203
-rw-r--r--data/templates/default.latex247
-rw-r--r--data/templates/default.markdown2
-rw-r--r--data/templates/default.ms112
-rw-r--r--data/templates/default.muse44
-rw-r--r--data/templates/default.opendocument129
-rw-r--r--data/templates/default.plain2
-rw-r--r--data/templates/default.revealjs42
-rw-r--r--data/templates/default.rst6
-rw-r--r--data/templates/default.rtf2
-rw-r--r--data/templates/default.s517
-rw-r--r--data/templates/default.slideous11
-rw-r--r--data/templates/default.slidy11
-rw-r--r--data/translations/am.yaml20
-rw-r--r--data/translations/ar.yaml20
-rw-r--r--data/translations/bg.yaml19
-rw-r--r--data/translations/bn.yaml21
-rw-r--r--data/translations/ca.yaml21
-rw-r--r--data/translations/cs.yaml21
-rw-r--r--data/translations/da.yaml21
-rw-r--r--data/translations/de.yaml21
-rw-r--r--data/translations/el.yaml21
-rw-r--r--data/translations/en.yaml22
-rw-r--r--data/translations/eo.yaml20
-rw-r--r--data/translations/es.yaml21
-rw-r--r--data/translations/et.yaml20
-rw-r--r--data/translations/eu.yaml21
-rw-r--r--data/translations/fa.yaml21
-rw-r--r--data/translations/fi.yaml21
-rw-r--r--data/translations/fr.yaml20
-rw-r--r--data/translations/he.yaml22
-rw-r--r--data/translations/hi.yaml20
-rw-r--r--data/translations/hr.yaml21
-rw-r--r--data/translations/hu.yaml21
-rw-r--r--data/translations/is.yaml21
-rw-r--r--data/translations/it.yaml21
-rw-r--r--data/translations/km.yaml21
-rw-r--r--data/translations/ko.yaml17
-rw-r--r--data/translations/lo.yaml21
-rw-r--r--data/translations/lt.yaml21
-rw-r--r--data/translations/lv.yaml20
-rw-r--r--data/translations/nl.yaml21
-rw-r--r--data/translations/no.yaml21
-rw-r--r--data/translations/pl.yaml21
-rw-r--r--data/translations/pt.yaml21
-rw-r--r--data/translations/rm.yaml21
-rw-r--r--data/translations/ro.yaml21
-rw-r--r--data/translations/ru.yaml21
-rw-r--r--data/translations/sk.yaml21
-rw-r--r--data/translations/sl.yaml21
-rw-r--r--data/translations/sq.yaml18
-rw-r--r--data/translations/sr-cyrl.yaml21
-rw-r--r--data/translations/sr.yaml21
-rw-r--r--data/translations/sv.yaml21
-rw-r--r--data/translations/th.yaml20
-rw-r--r--data/translations/tr.yaml22
-rw-r--r--data/translations/uk.yaml22
-rw-r--r--data/translations/ur.yaml22
-rw-r--r--data/translations/vi.yaml21
-rw-r--r--man/capitalizeHeaders.hs20
-rw-r--r--man/manfilter.lua22
-rw-r--r--man/pandoc.12359
-rw-r--r--man/removeLinks.hs9
-rw-r--r--man/removeNotes.hs9
-rw-r--r--pandoc.cabal715
-rw-r--r--pandoc.hs1490
-rw-r--r--prelude/Prelude.hs26
-rw-r--r--src/Text/Pandoc.hs356
-rw-r--r--src/Text/Pandoc/App.hs1636
-rw-r--r--src/Text/Pandoc/Asciify.hs6
-rw-r--r--src/Text/Pandoc/BCP47.hs125
-rw-r--r--src/Text/Pandoc/CSS.hs8
-rw-r--r--src/Text/Pandoc/CSV.hs102
-rw-r--r--src/Text/Pandoc/Class.hs1082
-rw-r--r--src/Text/Pandoc/Data.hs22
-rw-r--r--src/Text/Pandoc/Data.hsb15
-rw-r--r--src/Text/Pandoc/Emoji.hs1
-rw-r--r--src/Text/Pandoc/Error.hs97
-rw-r--r--src/Text/Pandoc/Extensions.hs378
-rw-r--r--src/Text/Pandoc/Filter.hs60
-rw-r--r--src/Text/Pandoc/Filter/JSON.hs97
-rw-r--r--src/Text/Pandoc/Filter/Lua.hs53
-rw-r--r--src/Text/Pandoc/Filter/Path.hs53
-rw-r--r--src/Text/Pandoc/Highlighting.hs63
-rw-r--r--src/Text/Pandoc/ImageSize.hs232
-rw-r--r--src/Text/Pandoc/Logging.hs342
-rw-r--r--src/Text/Pandoc/Lua.hs83
-rw-r--r--src/Text/Pandoc/Lua/Filter.hs170
-rw-r--r--src/Text/Pandoc/Lua/Init.hs117
-rw-r--r--src/Text/Pandoc/Lua/Module/MediaBag.hs108
-rw-r--r--src/Text/Pandoc/Lua/Module/Pandoc.hs134
-rw-r--r--src/Text/Pandoc/Lua/Module/Utils.hs126
-rw-r--r--src/Text/Pandoc/Lua/Packages.hs115
-rw-r--r--src/Text/Pandoc/Lua/StackInstances.hs376
-rw-r--r--src/Text/Pandoc/Lua/Util.hs187
-rw-r--r--src/Text/Pandoc/MIME.hs15
-rw-r--r--src/Text/Pandoc/MediaBag.hs52
-rw-r--r--src/Text/Pandoc/Options.hs389
-rw-r--r--src/Text/Pandoc/PDF.hs351
-rw-r--r--src/Text/Pandoc/Parsing.hs714
-rw-r--r--src/Text/Pandoc/Pretty.hs120
-rw-r--r--src/Text/Pandoc/Process.hs34
-rw-r--r--src/Text/Pandoc/Readers.hs160
-rw-r--r--src/Text/Pandoc/Readers/CommonMark.hs228
-rw-r--r--src/Text/Pandoc/Readers/Creole.hs320
-rw-r--r--src/Text/Pandoc/Readers/DocBook.hs117
-rw-r--r--src/Text/Pandoc/Readers/Docx.hs631
-rw-r--r--src/Text/Pandoc/Readers/Docx/Combine.hs55
-rw-r--r--src/Text/Pandoc/Readers/Docx/Fields.hs89
-rw-r--r--src/Text/Pandoc/Readers/Docx/Lists.hs98
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse.hs526
-rw-r--r--src/Text/Pandoc/Readers/Docx/StyleMap.hs12
-rw-r--r--src/Text/Pandoc/Readers/Docx/Util.hs27
-rw-r--r--src/Text/Pandoc/Readers/EPUB.hs140
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs944
-rw-r--r--src/Text/Pandoc/Readers/Haddock.hs45
-rw-r--r--src/Text/Pandoc/Readers/JATS.hs496
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs3403
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Types.hs51
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs1449
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs308
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs924
-rw-r--r--src/Text/Pandoc/Readers/Native.hs36
-rw-r--r--src/Text/Pandoc/Readers/OPML.hs71
-rw-r--r--src/Text/Pandoc/Readers/Odt.hs54
-rw-r--r--src/Text/Pandoc/Readers/Odt/Arrows/State.hs116
-rw-r--r--src/Text/Pandoc/Readers/Odt/Arrows/Utils.hs282
-rw-r--r--src/Text/Pandoc/Readers/Odt/Base.hs7
-rw-r--r--src/Text/Pandoc/Readers/Odt/ContentReader.hs83
-rw-r--r--src/Text/Pandoc/Readers/Odt/Generic/Fallible.hs140
-rw-r--r--src/Text/Pandoc/Readers/Odt/Generic/Utils.hs21
-rw-r--r--src/Text/Pandoc/Readers/Odt/Generic/XMLConverter.hs323
-rw-r--r--src/Text/Pandoc/Readers/Odt/Namespaces.hs10
-rw-r--r--src/Text/Pandoc/Readers/Odt/StyleReader.hs187
-rw-r--r--src/Text/Pandoc/Readers/Org.hs43
-rw-r--r--src/Text/Pandoc/Readers/Org/BlockStarts.hs84
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs732
-rw-r--r--src/Text/Pandoc/Readers/Org/DocumentTree.hs304
-rw-r--r--src/Text/Pandoc/Readers/Org/ExportSettings.hs53
-rw-r--r--src/Text/Pandoc/Readers/Org/Inlines.hs443
-rw-r--r--src/Text/Pandoc/Readers/Org/Meta.hs145
-rw-r--r--src/Text/Pandoc/Readers/Org/ParserState.hs156
-rw-r--r--src/Text/Pandoc/Readers/Org/Parsing.hs54
-rw-r--r--src/Text/Pandoc/Readers/Org/Shared.hs38
-rw-r--r--src/Text/Pandoc/Readers/RST.hs1041
-rw-r--r--src/Text/Pandoc/Readers/TWiki.hs215
-rw-r--r--src/Text/Pandoc/Readers/TeXMath.hs48
-rw-r--r--src/Text/Pandoc/Readers/Textile.hs279
-rw-r--r--src/Text/Pandoc/Readers/TikiWiki.hs654
-rw-r--r--src/Text/Pandoc/Readers/Txt2Tags.hs159
-rw-r--r--src/Text/Pandoc/Readers/Vimwiki.hs673
-rw-r--r--src/Text/Pandoc/SelfContained.hs270
-rw-r--r--src/Text/Pandoc/Shared.hs865
-rw-r--r--src/Text/Pandoc/Slides.hs10
-rw-r--r--src/Text/Pandoc/Templates.hs82
-rw-r--r--src/Text/Pandoc/Translations.hs112
-rw-r--r--src/Text/Pandoc/UTF8.hs109
-rw-r--r--src/Text/Pandoc/UUID.hs30
-rw-r--r--src/Text/Pandoc/Writers.hs195
-rw-r--r--src/Text/Pandoc/Writers/AsciiDoc.hs159
-rw-r--r--src/Text/Pandoc/Writers/CommonMark.hs366
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs375
-rw-r--r--src/Text/Pandoc/Writers/Custom.hs384
-rw-r--r--src/Text/Pandoc/Writers/Docbook.hs410
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs923
-rw-r--r--src/Text/Pandoc/Writers/DokuWiki.hs169
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs683
-rw-r--r--src/Text/Pandoc/Writers/FB2.hs442
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs1134
-rw-r--r--src/Text/Pandoc/Writers/Haddock.hs170
-rw-r--r--src/Text/Pandoc/Writers/ICML.hs189
-rw-r--r--src/Text/Pandoc/Writers/JATS.hs455
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs920
-rw-r--r--src/Text/Pandoc/Writers/Man.hs227
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs774
-rw-r--r--src/Text/Pandoc/Writers/Math.hs56
-rw-r--r--src/Text/Pandoc/Writers/MediaWiki.hs781
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs639
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs408
-rw-r--r--src/Text/Pandoc/Writers/Native.hs23
-rw-r--r--src/Text/Pandoc/Writers/ODT.hs218
-rw-r--r--src/Text/Pandoc/Writers/OOXML.hs108
-rw-r--r--src/Text/Pandoc/Writers/OPML.hs88
-rw-r--r--src/Text/Pandoc/Writers/OpenDocument.hs313
-rw-r--r--src/Text/Pandoc/Writers/Org.hs242
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint.hs63
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint/Output.hs1834
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint/Presentation.hs987
-rw-r--r--src/Text/Pandoc/Writers/RST.hs330
-rw-r--r--src/Text/Pandoc/Writers/RTF.hs408
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs226
-rw-r--r--src/Text/Pandoc/Writers/TEI.hs330
-rw-r--r--src/Text/Pandoc/Writers/Texinfo.hs191
-rw-r--r--src/Text/Pandoc/Writers/Textile.hs151
-rw-r--r--src/Text/Pandoc/Writers/ZimWiki.hs219
-rw-r--r--src/Text/Pandoc/XML.hs33
-rw-r--r--stack.yaml23
-rw-r--r--test/Tests/Command.hs95
-rw-r--r--test/Tests/Helpers.hs138
-rw-r--r--test/Tests/Lua.hs196
-rw-r--r--test/Tests/Old.hs289
-rw-r--r--test/Tests/Readers/Creole.hs286
-rw-r--r--test/Tests/Readers/Docx.hs401
-rw-r--r--test/Tests/Readers/EPUB.hs40
-rw-r--r--test/Tests/Readers/HTML.hs54
-rw-r--r--test/Tests/Readers/JATS.hs116
-rw-r--r--test/Tests/Readers/LaTeX.hs341
-rw-r--r--test/Tests/Readers/Markdown.hs462
-rw-r--r--test/Tests/Readers/Muse.hs1224
-rw-r--r--test/Tests/Readers/Odt.hs170
-rw-r--r--test/Tests/Readers/Org.hs16
-rw-r--r--test/Tests/Readers/Org/Block.hs192
-rw-r--r--test/Tests/Readers/Org/Block/CodeBlock.hs194
-rw-r--r--test/Tests/Readers/Org/Block/Figure.hs57
-rw-r--r--test/Tests/Readers/Org/Block/Header.hs182
-rw-r--r--test/Tests/Readers/Org/Block/List.hs244
-rw-r--r--test/Tests/Readers/Org/Block/Table.hs150
-rw-r--r--test/Tests/Readers/Org/Directive.hs199
-rw-r--r--test/Tests/Readers/Org/Inline.hs352
-rw-r--r--test/Tests/Readers/Org/Inline/Citation.hs179
-rw-r--r--test/Tests/Readers/Org/Inline/Note.hs86
-rw-r--r--test/Tests/Readers/Org/Inline/Smart.hs46
-rw-r--r--test/Tests/Readers/Org/Meta.hs191
-rw-r--r--test/Tests/Readers/Org/Shared.hs29
-rw-r--r--test/Tests/Readers/RST.hs189
-rw-r--r--test/Tests/Readers/Txt2Tags.hs437
-rw-r--r--test/Tests/Shared.hs39
-rw-r--r--test/Tests/Writers/AsciiDoc.hs56
-rw-r--r--test/Tests/Writers/ConTeXt.hs149
-rw-r--r--test/Tests/Writers/Docbook.hs303
-rw-r--r--test/Tests/Writers/Docx.hs157
-rw-r--r--test/Tests/Writers/FB2.hs34
-rw-r--r--test/Tests/Writers/HTML.hs44
-rw-r--r--test/Tests/Writers/JATS.hs122
-rw-r--r--test/Tests/Writers/LaTeX.hs176
-rw-r--r--test/Tests/Writers/Markdown.hs267
-rw-r--r--test/Tests/Writers/Muse.hs385
-rw-r--r--test/Tests/Writers/Native.hs22
-rw-r--r--test/Tests/Writers/OOXML.hs184
-rw-r--r--test/Tests/Writers/Org.hs25
-rw-r--r--test/Tests/Writers/Plain.hs21
-rw-r--r--test/Tests/Writers/Powerpoint.hs93
-rw-r--r--test/Tests/Writers/RST.hs117
-rw-r--r--test/Tests/Writers/TEI.hs43
-rw-r--r--test/bodybg.gif (renamed from tests/bodybg.gif)bin10119 -> 10119 bytes
-rw-r--r--test/command/1166.md48
-rw-r--r--test/command/1279.md19
-rw-r--r--test/command/1390.md20
-rw-r--r--test/command/1592.md49
-rw-r--r--test/command/1629.md10
-rw-r--r--test/command/168.md43
-rw-r--r--test/command/1710.md89
-rw-r--r--test/command/1718.md11
-rw-r--r--test/command/1745.md13
-rw-r--r--test/command/1773.md6
-rw-r--r--test/command/1841.md42
-rw-r--r--test/command/1881.md55
-rw-r--r--test/command/1905.md30
-rw-r--r--test/command/2118.md11
-rw-r--r--test/command/2228.md6
-rw-r--r--test/command/2378.md27
-rw-r--r--test/command/2397.md9
-rw-r--r--test/command/2434.md59
-rw-r--r--test/command/2549.md38
-rw-r--r--test/command/2552.md14
-rw-r--r--test/command/256.md12
-rw-r--r--test/command/2602.md18
-rw-r--r--test/command/2606.md58
-rw-r--r--test/command/262.md26
-rw-r--r--test/command/2649.md106
-rw-r--r--test/command/2662.md11
-rw-r--r--test/command/2834.md29
-rw-r--r--test/command/2874.md14
-rw-r--r--test/command/2994.md10
-rw-r--r--test/command/3113.md13
-rw-r--r--test/command/3236.md9
-rw-r--r--test/command/3257.md13
-rw-r--r--test/command/3309.md52
-rw-r--r--test/command/3314.md34
-rw-r--r--test/command/3337.md13
-rw-r--r--test/command/3348.md17
-rw-r--r--test/command/3401.md19
-rw-r--r--test/command/3407.md13
-rw-r--r--test/command/3422.md9
-rw-r--r--test/command/3432.md289
-rw-r--r--test/command/3432a.md19
-rw-r--r--test/command/3450.md12
-rw-r--r--test/command/3475.md45
-rw-r--r--test/command/3487.md11
-rw-r--r--test/command/3494.md40
-rw-r--r--test/command/3497.md51
-rw-r--r--test/command/3499.md18
-rw-r--r--test/command/3510-export.latex1
-rw-r--r--test/command/3510-src.hs1
-rw-r--r--test/command/3510-subdoc.org5
-rw-r--r--test/command/3510.md20
-rw-r--r--test/command/3511.md46
-rw-r--r--test/command/3512.md13
-rw-r--r--test/command/3516.md51
-rw-r--r--test/command/3518.md6
-rw-r--r--test/command/3526.md14
-rw-r--r--test/command/3529.md15
-rw-r--r--test/command/3530.md22
-rw-r--r--test/command/3531.md21
-rw-r--r--test/command/3533-rst-csv-tables.csv4
-rw-r--r--test/command/3533-rst-csv-tables.md56
-rw-r--r--test/command/3534.md23
-rw-r--r--test/command/3537.md28
-rw-r--r--test/command/3539.md45
-rw-r--r--test/command/3558.md12
-rw-r--r--test/command/3568.md15
-rw-r--r--test/command/3570.md6
-rw-r--r--test/command/3577.md37
-rw-r--r--test/command/3585.md16
-rw-r--r--test/command/3587.md21
-rw-r--r--test/command/3596.md59
-rw-r--r--test/command/3615.md18
-rw-r--r--test/command/3619.md28
-rw-r--r--test/command/3630.md8
-rw-r--r--test/command/3667.md13
-rw-r--r--test/command/3674.md39
-rw-r--r--test/command/3675.md15
-rw-r--r--test/command/3681.md27
-rw-r--r--test/command/3690.md8
-rw-r--r--test/command/3701.md60
-rw-r--r--test/command/3706.md44
-rw-r--r--test/command/3708.md15
-rw-r--r--test/command/3715.md15
-rw-r--r--test/command/3716.md6
-rw-r--r--test/command/3730.md21
-rw-r--r--test/command/3733.md13
-rw-r--r--test/command/3734.md50
-rw-r--r--test/command/3736.md25
-rw-r--r--test/command/3755.md23
-rw-r--r--test/command/3771.md14
-rw-r--r--test/command/3773.md14
-rw-r--r--test/command/3779.md28
-rw-r--r--test/command/3792.md13
-rw-r--r--test/command/3794.md7
-rw-r--r--test/command/3803.md10
-rw-r--r--test/command/3804.md6
-rw-r--r--test/command/3816.md32
-rw-r--r--test/command/3824.md14
-rw-r--r--test/command/3840.md15
-rw-r--r--test/command/3853.md26
-rw-r--r--test/command/3880.md6
-rw-r--r--test/command/3880.txt1
-rw-r--r--test/command/3916.md11
-rw-r--r--test/command/3937.md13
-rw-r--r--test/command/3947.md11
-rw-r--r--test/command/3958.md20
-rw-r--r--test/command/3968.md10
-rw-r--r--test/command/3971.md9
-rw-r--r--test/command/3971b.tex2
-rw-r--r--test/command/3974.md6
-rw-r--r--test/command/3978.md6
-rw-r--r--test/command/3983.md29
-rw-r--r--test/command/3989.md7
-rw-r--r--test/command/4007.md23
-rw-r--r--test/command/4012.md8
-rw-r--r--test/command/4016.md47
-rw-r--r--test/command/4019.md8
-rw-r--r--test/command/4038.md6
-rw-r--r--test/command/4054.md14
-rw-r--r--test/command/4056.md24
-rw-r--r--test/command/4061.md14
-rw-r--r--test/command/4062.md6
-rw-r--r--test/command/4068.md9
-rw-r--r--test/command/4091.md6
-rw-r--r--test/command/4113.md12
-rw-r--r--test/command/4119.md18
-rw-r--r--test/command/4125.md6
-rw-r--r--test/command/4134.md25
-rw-r--r--test/command/4156.md10
-rw-r--r--test/command/4159.md8
-rw-r--r--test/command/4162.md10
-rw-r--r--test/command/4164.md35
-rw-r--r--test/command/4171.md34
-rw-r--r--test/command/4172.md29
-rw-r--r--test/command/4183.md32
-rw-r--r--test/command/4193.md10
-rw-r--r--test/command/4199.md6
-rw-r--r--test/command/4208.md18
-rw-r--r--test/command/4235.md12
-rw-r--r--test/command/4240.md33
-rw-r--r--test/command/4253.md8
-rw-r--r--test/command/4254.md12
-rw-r--r--test/command/4280.md7
-rw-r--r--test/command/4281.md18
-rw-r--r--test/command/4374.md7
-rw-r--r--test/command/4424.md10
-rw-r--r--test/command/512.md42
-rw-r--r--test/command/645.md12
-rw-r--r--test/command/853.md18
-rw-r--r--test/command/934.md12
-rw-r--r--test/command/982.md11
-rw-r--r--test/command/987.md12
-rw-r--r--test/command/SVG_logo-without-xml-declaration.svg32
-rw-r--r--test/command/SVG_logo.svg33
-rw-r--r--test/command/abbrevs2
-rw-r--r--test/command/adjacent_latex_blocks.md9
-rw-r--r--test/command/cite-in-inline-note.md6
-rw-r--r--test/command/corrupt.svg5
-rw-r--r--test/command/dots.md12
-rw-r--r--test/command/empty_paragraphs.md95
-rw-r--r--test/command/gfm.md103
-rw-r--r--test/command/hspace.md56
-rw-r--r--test/command/html-read-figure.md45
-rw-r--r--test/command/hyphenat.md49
-rw-r--r--test/command/ifstrequal.md10
-rw-r--r--test/command/indented-fences.md20
-rw-r--r--test/command/inkscape-cube.svg119
-rw-r--r--test/command/latex-color.md127
-rw-r--r--test/command/latex-command-comment.md7
-rw-r--r--test/command/latex-fontawesome.md13
-rw-r--r--test/command/latex-tabular-column-specs.md24
-rw-r--r--test/command/lettrine.md9
-rw-r--r--test/command/lstlisting.md25
-rw-r--r--test/command/macros.md103
-rw-r--r--test/command/md-abbrevs.md31
-rw-r--r--test/command/multiple-metadata-blocks.md15
-rw-r--r--test/command/parse-raw.md27
-rw-r--r--test/command/refs.md54
-rw-r--r--test/command/rst-links.md18
-rw-r--r--test/command/smart.md45
-rw-r--r--test/command/sub-file-chapter-1.tex8
-rw-r--r--test/command/sub-file-chapter-2.tex8
-rw-r--r--test/command/svg.md132
-rw-r--r--test/command/tabularx.md110
-rw-r--r--test/command/translations.md29
-rw-r--r--test/command/vars-and-metadata.md15
-rw-r--r--test/command/write18.md14
-rw-r--r--test/command/yaml-with-chomp.md12
-rw-r--r--test/creole-reader.native95
-rw-r--r--test/creole-reader.txt137
-rw-r--r--test/docbook-reader.docbook (renamed from tests/docbook-reader.docbook)0
-rw-r--r--test/docbook-reader.native (renamed from tests/docbook-reader.native)0
-rw-r--r--test/docbook-xref.docbook (renamed from tests/docbook-xref.docbook)0
-rw-r--r--test/docbook-xref.native (renamed from tests/docbook-xref.native)0
-rw-r--r--test/docx/0_level_headers.docxbin0 -> 35146 bytes
-rw-r--r--test/docx/0_level_headers.native25
-rw-r--r--test/docx/already_auto_ident.docx (renamed from tests/docx/already_auto_ident.docx)bin8463 -> 8463 bytes
-rw-r--r--test/docx/already_auto_ident.native (renamed from tests/docx/already_auto_ident.native)0
-rw-r--r--test/docx/block_quotes.docxbin0 -> 41855 bytes
-rw-r--r--test/docx/block_quotes_parse_indent.native (renamed from tests/docx/block_quotes_parse_indent.native)0
-rw-r--r--test/docx/char_styles.docxbin0 -> 30134 bytes
-rw-r--r--test/docx/char_styles.native (renamed from tests/docx/char_styles.native)0
-rw-r--r--test/docx/codeblock.docx (renamed from tests/docx/codeblock.docx)bin8465 -> 8465 bytes
-rw-r--r--test/docx/codeblock.native (renamed from tests/docx/codeblock.native)0
-rw-r--r--test/docx/comments.docx (renamed from tests/docx/comments.docx)bin17109 -> 17109 bytes
-rw-r--r--test/docx/comments.native (renamed from tests/docx/comments.native)0
-rw-r--r--test/docx/comments_no_comments.native (renamed from tests/docx/comments_no_comments.native)0
-rw-r--r--test/docx/comments_warning.docx (renamed from tests/docx/comments_warning.docx)bin17078 -> 17078 bytes
-rw-r--r--test/docx/custom-style-no-styles.native4
-rw-r--r--test/docx/custom-style-reference.docx (renamed from tests/docx/custom-style-reference.docx)bin14846 -> 14846 bytes
-rw-r--r--test/docx/custom-style-roundtrip-end.native (renamed from tests/docx/custom-style-roundtrip-end.native)0
-rw-r--r--test/docx/custom-style-with-styles.native7
-rw-r--r--test/docx/custom_style.native (renamed from tests/docx/custom-style-roundtrip-start.native)0
-rw-r--r--test/docx/deep_normalize.docxbin0 -> 29246 bytes
-rw-r--r--test/docx/deep_normalize.native (renamed from tests/docx/deep_normalize.native)0
-rw-r--r--test/docx/definition_list.docx (renamed from tests/docx/definition_list.docx)bin8455 -> 8455 bytes
-rw-r--r--test/docx/definition_list.native (renamed from tests/docx/definition_list.native)0
-rw-r--r--test/docx/drop_cap.docxbin0 -> 26931 bytes
-rw-r--r--test/docx/drop_cap.native (renamed from tests/docx/drop_cap.native)0
-rw-r--r--test/docx/dummy_item_after_list_item.docx (renamed from tests/docx/dummy_item_after_list_item.docx)bin70197 -> 70197 bytes
-rw-r--r--test/docx/dummy_item_after_list_item.native (renamed from tests/docx/dummy_item_after_list_item.native)0
-rw-r--r--test/docx/dummy_item_after_paragraph.docx (renamed from tests/docx/dummy_item_after_paragraph.docx)bin70234 -> 70234 bytes
-rw-r--r--test/docx/dummy_item_after_paragraph.native (renamed from tests/docx/dummy_item_after_paragraph.native)0
-rw-r--r--test/docx/enumerated_headings.docx (renamed from tests/docx/enumerated_headings.docx)bin12539 -> 12539 bytes
-rw-r--r--test/docx/enumerated_headings.native (renamed from tests/docx/enumerated_headings.native)0
-rw-r--r--test/docx/german_styled_lists.docx (renamed from tests/docx/german_styled_lists.docx)bin43957 -> 43957 bytes
-rw-r--r--test/docx/german_styled_lists.native (renamed from tests/docx/german_styled_lists.native)0
-rw-r--r--test/docx/golden/block_quotes.docxbin0 -> 9778 bytes
-rw-r--r--test/docx/golden/codeblock.docxbin0 -> 9638 bytes
-rw-r--r--test/docx/golden/comments.docxbin0 -> 9960 bytes
-rw-r--r--test/docx/golden/custom_style_no_reference.docxbin0 -> 9724 bytes
-rw-r--r--test/docx/golden/custom_style_reference.docxbin0 -> 12118 bytes
-rw-r--r--test/docx/golden/definition_list.docxbin0 -> 9617 bytes
-rw-r--r--test/docx/golden/headers.docxbin0 -> 9765 bytes
-rw-r--r--test/docx/golden/image.docxbin0 -> 26452 bytes
-rw-r--r--test/docx/golden/inline_code.docxbin0 -> 9560 bytes
-rw-r--r--test/docx/golden/inline_formatting.docxbin0 -> 9737 bytes
-rw-r--r--test/docx/golden/inline_images.docxbin0 -> 26506 bytes
-rw-r--r--test/docx/golden/link_in_notes.docxbin0 -> 9781 bytes
-rw-r--r--test/docx/golden/links.docxbin0 -> 9960 bytes
-rw-r--r--test/docx/golden/lists.docxbin0 -> 10031 bytes
-rw-r--r--test/docx/golden/lists_continuing.docxbin0 -> 9830 bytes
-rw-r--r--test/docx/golden/lists_restarting.docxbin0 -> 9830 bytes
-rw-r--r--test/docx/golden/nested_anchors_in_header.docxbin0 -> 9882 bytes
-rw-r--r--test/docx/golden/notes.docxbin0 -> 9731 bytes
-rw-r--r--test/docx/golden/table_one_row.docxbin0 -> 9581 bytes
-rw-r--r--test/docx/golden/table_with_list_cell.docxbin0 -> 9948 bytes
-rw-r--r--test/docx/golden/tables.docxbin0 -> 9963 bytes
-rw-r--r--test/docx/golden/track_changes_deletion.docxbin0 -> 9604 bytes
-rw-r--r--test/docx/golden/track_changes_insertion.docxbin0 -> 9587 bytes
-rw-r--r--test/docx/golden/track_changes_move.docxbin0 -> 9621 bytes
-rw-r--r--test/docx/golden/unicode.docxbin0 -> 9545 bytes
-rw-r--r--test/docx/golden/verbatim_subsuper.docxbin0 -> 9593 bytes
-rw-r--r--test/docx/hanging_indent.docxbin0 -> 29924 bytes
-rw-r--r--test/docx/hanging_indent.native (renamed from tests/docx/hanging_indent.native)0
-rw-r--r--test/docx/headers.docxbin0 -> 29659 bytes
-rw-r--r--test/docx/headers.native (renamed from tests/docx/headers.native)0
-rw-r--r--test/docx/i18n_blocks.docx (renamed from tests/docx/i18n_blocks.docx)bin13680 -> 13680 bytes
-rw-r--r--test/docx/i18n_blocks.native (renamed from tests/docx/i18n_blocks.native)0
-rw-r--r--test/docx/image.docx (renamed from tests/docx/image.docx)bin35407 -> 35407 bytes
-rw-r--r--test/docx/image_no_embed.native (renamed from tests/docx/image_no_embed.native)0
-rw-r--r--test/docx/image_no_embed_writer.native (renamed from tests/docx/image_no_embed_writer.native)0
-rw-r--r--test/docx/image_vml.docx (renamed from tests/docx/image_vml.docx)bin23559 -> 23559 bytes
-rw-r--r--test/docx/image_vml.native (renamed from tests/docx/image_vml.native)0
-rw-r--r--test/docx/image_writer_test.native8
-rw-r--r--test/docx/inline_code.docx (renamed from tests/docx/inline_code.docx)bin8379 -> 8379 bytes
-rw-r--r--test/docx/inline_code.native (renamed from tests/docx/inline_code.native)0
-rw-r--r--test/docx/inline_formatting.docxbin0 -> 32322 bytes
-rw-r--r--test/docx/inline_formatting.native5
-rw-r--r--test/docx/inline_formatting_writer.native (renamed from tests/docx/inline_formatting_writer.native)0
-rw-r--r--test/docx/inline_images.docxbin0 -> 15875 bytes
-rw-r--r--test/docx/inline_images.native (renamed from tests/docx/inline_images.native)0
-rw-r--r--test/docx/inline_images_writer.native (renamed from tests/docx/inline_images_writer.native)0
-rw-r--r--test/docx/inline_images_writer_test.native2
-rw-r--r--test/docx/instrText_hyperlink.docxbin0 -> 13628 bytes
-rw-r--r--test/docx/instrText_hyperlink.native1
-rw-r--r--test/docx/link_in_notes.docxbin0 -> 27357 bytes
-rw-r--r--test/docx/link_in_notes.native (renamed from tests/docx/link_in_notes.native)0
-rw-r--r--test/docx/links.docxbin0 -> 45115 bytes
-rw-r--r--test/docx/links.native (renamed from tests/docx/links.native)0
-rw-r--r--test/docx/links_writer.native (renamed from tests/docx/links_writer.native)0
-rw-r--r--test/docx/lists.docxbin0 -> 31775 bytes
-rw-r--r--test/docx/lists.native (renamed from tests/docx/lists.native)0
-rw-r--r--test/docx/lists_continuing.docxbin0 -> 17717 bytes
-rw-r--r--test/docx/lists_continuing.native7
-rw-r--r--test/docx/lists_restarting.docxbin0 -> 18189 bytes
-rw-r--r--test/docx/lists_restarting.native8
-rw-r--r--test/docx/lists_writer.native (renamed from tests/docx/lists_writer.native)0
-rw-r--r--test/docx/metadata.docxbin0 -> 39538 bytes
-rw-r--r--test/docx/metadata.native (renamed from tests/docx/metadata.native)0
-rw-r--r--test/docx/metadata_after_normal.docxbin0 -> 56276 bytes
-rw-r--r--test/docx/metadata_after_normal.native (renamed from tests/docx/metadata_after_normal.native)0
-rw-r--r--test/docx/nested_anchors_in_header.docx (renamed from tests/docx/nested_anchors_in_header.docx)bin17535 -> 17535 bytes
-rw-r--r--test/docx/nested_anchors_in_header.native15
-rw-r--r--test/docx/nested_sdt.docxbin0 -> 11694 bytes
-rw-r--r--test/docx/nested_sdt.native3
-rw-r--r--test/docx/normalize.docxbin0 -> 25791 bytes
-rw-r--r--test/docx/normalize.native (renamed from tests/docx/normalize.native)0
-rw-r--r--test/docx/notes.docxbin0 -> 30734 bytes
-rw-r--r--test/docx/notes.native (renamed from tests/docx/notes.native)0
-rw-r--r--test/docx/numbered_header.docxbin0 -> 26129 bytes
-rw-r--r--test/docx/numbered_header.native (renamed from tests/docx/numbered_header.native)0
-rw-r--r--test/docx/overlapping_targets.docxbin0 -> 13747 bytes
-rw-r--r--test/docx/overlapping_targets.native3
-rw-r--r--test/docx/paragraph_insertion_deletion.docxbin0 -> 12066 bytes
-rw-r--r--test/docx/paragraph_insertion_deletion_accept.native2
-rw-r--r--test/docx/paragraph_insertion_deletion_all.native3
-rw-r--r--test/docx/paragraph_insertion_deletion_reject.native2
-rw-r--r--test/docx/sdt_elements.docxbin0 -> 29409 bytes
-rw-r--r--test/docx/sdt_elements.native10
-rw-r--r--test/docx/special_punctuation.docx (renamed from tests/docx/special_punctuation.docx)bin8408 -> 8408 bytes
-rw-r--r--test/docx/special_punctuation.native (renamed from tests/docx/special_punctuation.native)0
-rw-r--r--test/docx/table_one_row.docx (renamed from tests/docx/table_one_row.docx)bin25251 -> 25251 bytes
-rw-r--r--test/docx/table_one_row.native (renamed from tests/docx/table_one_row.native)0
-rw-r--r--test/docx/table_variable_width.docxbin0 -> 10006 bytes
-rw-r--r--test/docx/table_variable_width.native13
-rw-r--r--test/docx/table_with_list_cell.docxbin0 -> 32615 bytes
-rw-r--r--test/docx/table_with_list_cell.native (renamed from tests/docx/table_with_list_cell.native)0
-rw-r--r--test/docx/tables.docxbin0 -> 49780 bytes
-rw-r--r--test/docx/tables.native (renamed from tests/docx/tables.native)0
-rw-r--r--test/docx/tabs.docx (renamed from tests/docx/tabs.docx)bin12919 -> 12919 bytes
-rw-r--r--test/docx/tabs.native (renamed from tests/docx/tabs.native)0
-rw-r--r--test/docx/track_changes_deletion.docx (renamed from tests/docx/track_changes_deletion.docx)bin13350 -> 13350 bytes
-rw-r--r--test/docx/track_changes_deletion_accept.native (renamed from tests/docx/track_changes_deletion_accept.native)0
-rw-r--r--test/docx/track_changes_deletion_all.native (renamed from tests/docx/track_changes_deletion_all.native)0
-rw-r--r--test/docx/track_changes_deletion_reject.native (renamed from tests/docx/track_changes_deletion_reject.native)0
-rw-r--r--test/docx/track_changes_insertion.docx (renamed from tests/docx/track_changes_insertion.docx)bin12956 -> 12956 bytes
-rw-r--r--test/docx/track_changes_insertion_accept.native (renamed from tests/docx/track_changes_insertion_accept.native)0
-rw-r--r--test/docx/track_changes_insertion_all.native (renamed from tests/docx/track_changes_insertion_all.native)0
-rw-r--r--test/docx/track_changes_insertion_reject.native (renamed from tests/docx/track_changes_insertion_reject.native)0
-rw-r--r--test/docx/track_changes_move.docx (renamed from tests/docx/track_changes_move.docx)bin26151 -> 26151 bytes
-rw-r--r--test/docx/track_changes_move_accept.native (renamed from tests/docx/track_changes_move_accept.native)0
-rw-r--r--test/docx/track_changes_move_all.native (renamed from tests/docx/track_changes_move_all.native)0
-rw-r--r--test/docx/track_changes_move_reject.native (renamed from tests/docx/track_changes_move_reject.native)0
-rw-r--r--test/docx/trailing_spaces_in_formatting.docx (renamed from tests/docx/trailing_spaces_in_formatting.docx)bin12916 -> 12916 bytes
-rw-r--r--test/docx/trailing_spaces_in_formatting.native (renamed from tests/docx/trailing_spaces_in_formatting.native)0
-rw-r--r--test/docx/unicode.docx (renamed from tests/docx/unicode.docx)bin11506 -> 11506 bytes
-rw-r--r--test/docx/unicode.native (renamed from tests/docx/unicode.native)0
-rw-r--r--test/docx/unused_anchors.docxbin0 -> 13276 bytes
-rw-r--r--test/docx/unused_anchors.native3
-rw-r--r--test/docx/verbatim_subsuper.docx (renamed from tests/docx/verbatim_subsuper.docx)bin10353 -> 10353 bytes
-rw-r--r--test/docx/verbatim_subsuper.native (renamed from tests/docx/verbatim_subsuper.native)0
-rw-r--r--test/dokuwiki_external_images.dokuwiki (renamed from tests/dokuwiki_external_images.dokuwiki)0
-rw-r--r--test/dokuwiki_external_images.native (renamed from tests/dokuwiki_external_images.native)0
-rw-r--r--test/dokuwiki_inline_formatting.dokuwiki (renamed from tests/dokuwiki_inline_formatting.dokuwiki)0
-rw-r--r--test/dokuwiki_inline_formatting.native (renamed from tests/dokuwiki_inline_formatting.native)0
-rw-r--r--test/dokuwiki_multiblock_table.dokuwiki (renamed from tests/dokuwiki_multiblock_table.dokuwiki)0
-rw-r--r--test/dokuwiki_multiblock_table.native (renamed from tests/dokuwiki_multiblock_table.native)0
-rw-r--r--test/epub/features.epub (renamed from tests/epub/features.epub)bin66370 -> 66370 bytes
-rw-r--r--test/epub/features.native93
-rw-r--r--test/epub/formatting.epub (renamed from tests/epub/formatting.epub)bin13460 -> 13460 bytes
-rw-r--r--test/epub/formatting.native (renamed from tests/epub/formatting.native)0
-rw-r--r--test/epub/img.epub (renamed from tests/epub/img.epub)bin61768 -> 61768 bytes
-rw-r--r--test/epub/wasteland.epub (renamed from tests/epub/wasteland.epub)bin101870 -> 101870 bytes
-rw-r--r--test/epub/wasteland.native (renamed from tests/epub/wasteland.native)0
-rw-r--r--test/fb2/basic.fb23
-rw-r--r--test/fb2/basic.markdown (renamed from tests/fb2/basic.markdown)0
-rw-r--r--test/fb2/images-embedded.fb22
-rw-r--r--test/fb2/images-embedded.html (renamed from tests/fb2/images-embedded.html)0
-rw-r--r--test/fb2/images.fb22
-rw-r--r--test/fb2/images.markdown (renamed from tests/fb2/images.markdown)0
-rw-r--r--test/fb2/math.fb22
-rw-r--r--test/fb2/math.markdown (renamed from tests/fb2/math.markdown)0
-rw-r--r--test/fb2/test-small.png (renamed from tests/fb2/test-small.png)bin4090 -> 4090 bytes
-rw-r--r--test/fb2/test.jpg (renamed from tests/fb2/test.jpg)bin153610 -> 153610 bytes
-rw-r--r--test/fb2/titles.fb23
-rw-r--r--test/fb2/titles.markdown6
-rw-r--r--test/haddock-reader.haddock (renamed from tests/haddock-reader.haddock)0
-rw-r--r--test/haddock-reader.native (renamed from tests/haddock-reader.native)0
-rw-r--r--test/html-reader.html710
-rw-r--r--test/html-reader.native473
-rw-r--r--test/insert (renamed from tests/insert)0
-rw-r--r--test/jats-reader.native422
-rw-r--r--test/jats-reader.xml1785
-rw-r--r--test/lalune.jpg (renamed from tests/lalune.jpg)bin16270 -> 16270 bytes
-rw-r--r--test/latex-reader.latex847
-rw-r--r--test/latex-reader.native375
-rw-r--r--test/lhs-test-markdown.native (renamed from tests/lhs-test-markdown.native)0
-rw-r--r--test/lhs-test.fragment.html+lhs (renamed from tests/lhs-test.fragment.html+lhs)0
-rw-r--r--test/lhs-test.html99
-rw-r--r--test/lhs-test.html+lhs99
-rw-r--r--test/lhs-test.latex125
-rw-r--r--test/lhs-test.latex+lhs88
-rw-r--r--test/lhs-test.markdown (renamed from tests/lhs-test.markdown)0
-rw-r--r--test/lhs-test.markdown+lhs (renamed from tests/lhs-test.markdown+lhs)0
-rw-r--r--test/lhs-test.native (renamed from tests/lhs-test.native)0
-rw-r--r--test/lhs-test.rst (renamed from tests/lhs-test.rst)0
-rw-r--r--test/lhs-test.rst+lhs (renamed from tests/lhs-test.rst+lhs)0
-rw-r--r--test/lua/attr-test.lua6
-rw-r--r--test/lua/block-count.lua11
-rw-r--r--test/lua/hello-world-doc.lua10
-rw-r--r--test/lua/implicit-doc-filter.lua6
-rw-r--r--test/lua/markdown-reader.lua12
-rw-r--r--test/lua/metatable-catch-all.lua20
-rw-r--r--test/lua/plain-to-para.lua6
-rw-r--r--test/lua/script-name.lua3
-rw-r--r--test/lua/single-to-double-quoted.lua10
-rw-r--r--test/lua/smallcaps-title.lua12
-rw-r--r--test/lua/strmacro.lua11
-rw-r--r--test/lua/test-pandoc-utils.lua115
-rw-r--r--test/lua/undiv.lua3
-rw-r--r--test/lua/uppercase-header.lua9
-rw-r--r--test/markdown-citations.native17
-rw-r--r--test/markdown-citations.txt (renamed from tests/markdown-citations.txt)0
-rw-r--r--test/markdown-reader-more.native198
-rw-r--r--test/markdown-reader-more.txt320
-rw-r--r--test/media/rId25.jpg (renamed from tests/media/rId25.jpg)bin1332 -> 1332 bytes
-rw-r--r--test/media/rId26.jpg (renamed from tests/media/rId26.jpg)bin1332 -> 1332 bytes
-rw-r--r--test/media/rId27.jpg (renamed from tests/media/rId27.jpg)bin1332 -> 1332 bytes
-rw-r--r--test/mediawiki-reader.native (renamed from tests/mediawiki-reader.native)0
-rw-r--r--test/mediawiki-reader.wiki (renamed from tests/mediawiki-reader.wiki)0
-rw-r--r--test/movie.jpg (renamed from tests/movie.jpg)bin1046 -> 1046 bytes
-rw-r--r--test/odt/markdown/bold.md (renamed from tests/odt/markdown/bold.md)0
-rw-r--r--test/odt/markdown/citation.md (renamed from tests/odt/markdown/citation.md)0
-rw-r--r--test/odt/markdown/endnote.md (renamed from tests/odt/markdown/endnote.md)0
-rw-r--r--test/odt/markdown/externalLink.md (renamed from tests/odt/markdown/externalLink.md)0
-rw-r--r--test/odt/markdown/footnote.md (renamed from tests/odt/markdown/footnote.md)0
-rw-r--r--test/odt/markdown/headers.md (renamed from tests/odt/markdown/headers.md)0
-rw-r--r--test/odt/markdown/horizontalRule.md (renamed from tests/odt/markdown/horizontalRule.md)0
-rw-r--r--test/odt/markdown/image.md (renamed from tests/odt/markdown/image.md)0
-rw-r--r--test/odt/markdown/imageIndex.md (renamed from tests/odt/markdown/imageIndex.md)0
-rw-r--r--test/odt/markdown/imageWithCaption.md (renamed from tests/odt/markdown/imageWithCaption.md)0
-rw-r--r--test/odt/markdown/italic.md (renamed from tests/odt/markdown/italic.md)0
-rw-r--r--test/odt/markdown/listBlocks.md (renamed from tests/odt/markdown/listBlocks.md)0
-rw-r--r--test/odt/markdown/paragraph.md (renamed from tests/odt/markdown/paragraph.md)0
-rw-r--r--test/odt/markdown/strikeout.md (renamed from tests/odt/markdown/strikeout.md)0
-rw-r--r--test/odt/markdown/trackedChanges.md (renamed from tests/odt/markdown/trackedChanges.md)0
-rw-r--r--test/odt/markdown/underlined.md (renamed from tests/odt/markdown/underlined.md)0
-rw-r--r--test/odt/native/blockquote.native (renamed from tests/odt/native/blockquote.native)0
-rw-r--r--test/odt/native/image.native (renamed from tests/odt/native/image.native)0
-rw-r--r--test/odt/native/imageIndex.native (renamed from tests/odt/native/imageIndex.native)0
-rw-r--r--test/odt/native/imageWithCaption.native (renamed from tests/odt/native/imageWithCaption.native)0
-rw-r--r--test/odt/native/inlinedCode.native (renamed from tests/odt/native/inlinedCode.native)0
-rw-r--r--test/odt/native/orderedListMixed.native (renamed from tests/odt/native/orderedListMixed.native)0
-rw-r--r--test/odt/native/orderedListRoman.native (renamed from tests/odt/native/orderedListRoman.native)0
-rw-r--r--test/odt/native/orderedListSimple.native (renamed from tests/odt/native/orderedListSimple.native)0
-rw-r--r--test/odt/native/referenceToChapter.native (renamed from tests/odt/native/referenceToChapter.native)0
-rw-r--r--test/odt/native/referenceToListItem.native (renamed from tests/odt/native/referenceToListItem.native)0
-rw-r--r--test/odt/native/referenceToText.native (renamed from tests/odt/native/referenceToText.native)0
-rw-r--r--test/odt/native/simpleTable.native (renamed from tests/odt/native/simpleTable.native)0
-rw-r--r--test/odt/native/simpleTableWithCaption.native (renamed from tests/odt/native/simpleTableWithCaption.native)0
-rw-r--r--test/odt/native/tableWithContents.native (renamed from tests/odt/native/tableWithContents.native)0
-rw-r--r--test/odt/native/textMixedStyles.native (renamed from tests/odt/native/textMixedStyles.native)0
-rw-r--r--test/odt/native/unicode.native (renamed from tests/odt/native/unicode.native)0
-rw-r--r--test/odt/native/unorderedList.native (renamed from tests/odt/native/unorderedList.native)0
-rw-r--r--test/odt/odt/blockquote.odt (renamed from tests/odt/odt/blockquote.odt)bin8594 -> 8594 bytes
-rw-r--r--test/odt/odt/bold.odt (renamed from tests/odt/odt/bold.odt)bin10377 -> 10377 bytes
-rw-r--r--test/odt/odt/citation.odt (renamed from tests/odt/odt/citation.odt)bin10842 -> 10842 bytes
-rw-r--r--test/odt/odt/endnote.odt (renamed from tests/odt/odt/endnote.odt)bin10950 -> 10950 bytes
-rw-r--r--test/odt/odt/expression.odt (renamed from tests/odt/odt/expression.odt)bin10916 -> 10916 bytes
-rw-r--r--test/odt/odt/expressionUnevaluated.odt (renamed from tests/odt/odt/expressionUnevaluated.odt)bin10829 -> 10829 bytes
-rw-r--r--test/odt/odt/externalLink.odt (renamed from tests/odt/odt/externalLink.odt)bin10735 -> 10735 bytes
-rw-r--r--test/odt/odt/footnote.odt (renamed from tests/odt/odt/footnote.odt)bin10843 -> 10843 bytes
-rw-r--r--test/odt/odt/formula.odt (renamed from tests/odt/odt/formula.odt)bin14252 -> 14252 bytes
-rw-r--r--test/odt/odt/headers.odt (renamed from tests/odt/odt/headers.odt)bin10515 -> 10515 bytes
-rw-r--r--test/odt/odt/hiddenTextByStyle.odt (renamed from tests/odt/odt/hiddenTextByStyle.odt)bin10798 -> 10798 bytes
-rw-r--r--test/odt/odt/hiddenTextByVariable.odt (renamed from tests/odt/odt/hiddenTextByVariable.odt)bin10788 -> 10788 bytes
-rw-r--r--test/odt/odt/horizontalRule.odt (renamed from tests/odt/odt/horizontalRule.odt)bin10130 -> 10130 bytes
-rw-r--r--test/odt/odt/image.odt (renamed from tests/odt/odt/image.odt)bin33360 -> 33360 bytes
-rw-r--r--test/odt/odt/imageIndex.odt (renamed from tests/odt/odt/imageIndex.odt)bin34417 -> 34417 bytes
-rw-r--r--test/odt/odt/imageWithCaption.odt (renamed from tests/odt/odt/imageWithCaption.odt)bin33811 -> 33811 bytes
-rw-r--r--test/odt/odt/inlinedCode.odt (renamed from tests/odt/odt/inlinedCode.odt)bin10141 -> 10141 bytes
-rw-r--r--test/odt/odt/italic.odt (renamed from tests/odt/odt/italic.odt)bin10426 -> 10426 bytes
-rw-r--r--test/odt/odt/listBlocks.odt (renamed from tests/odt/odt/listBlocks.odt)bin10565 -> 10565 bytes
-rw-r--r--test/odt/odt/orderedListMixed.odt (renamed from tests/odt/odt/orderedListMixed.odt)bin11970 -> 11970 bytes
-rw-r--r--test/odt/odt/orderedListRoman.odt (renamed from tests/odt/odt/orderedListRoman.odt)bin11730 -> 11730 bytes
-rw-r--r--test/odt/odt/orderedListSimple.odt (renamed from tests/odt/odt/orderedListSimple.odt)bin11817 -> 11817 bytes
-rw-r--r--test/odt/odt/paragraph.odt (renamed from tests/odt/odt/paragraph.odt)bin8538 -> 8538 bytes
-rw-r--r--test/odt/odt/referenceAllInOne.odt (renamed from tests/odt/odt/referenceAllInOne.odt)bin10878 -> 10878 bytes
-rw-r--r--test/odt/odt/referenceToChapter.odt (renamed from tests/odt/odt/referenceToChapter.odt)bin10487 -> 10487 bytes
-rw-r--r--test/odt/odt/referenceToListItem.odt (renamed from tests/odt/odt/referenceToListItem.odt)bin10855 -> 10855 bytes
-rw-r--r--test/odt/odt/referenceToText.odt (renamed from tests/odt/odt/referenceToText.odt)bin10208 -> 10208 bytes
-rw-r--r--test/odt/odt/simpleTable.odt (renamed from tests/odt/odt/simpleTable.odt)bin10705 -> 10705 bytes
-rw-r--r--test/odt/odt/simpleTableWithCaption.odt (renamed from tests/odt/odt/simpleTableWithCaption.odt)bin10396 -> 10396 bytes
-rw-r--r--test/odt/odt/strikeout.odt (renamed from tests/odt/odt/strikeout.odt)bin10582 -> 10582 bytes
-rw-r--r--test/odt/odt/table.odt (renamed from tests/odt/odt/table.odt)bin10763 -> 10763 bytes
-rw-r--r--test/odt/odt/tableWithCaption.odt (renamed from tests/odt/odt/tableWithCaption.odt)bin10623 -> 10623 bytes
-rw-r--r--test/odt/odt/tableWithContents.odt (renamed from tests/odt/odt/tableWithContents.odt)bin8817 -> 8817 bytes
-rw-r--r--test/odt/odt/textMixedStyles.odt (renamed from tests/odt/odt/textMixedStyles.odt)bin10571 -> 10571 bytes
-rw-r--r--test/odt/odt/trackedChanges.odt (renamed from tests/odt/odt/trackedChanges.odt)bin11135 -> 11135 bytes
-rw-r--r--test/odt/odt/underlined.odt (renamed from tests/odt/odt/underlined.odt)bin10513 -> 10513 bytes
-rw-r--r--test/odt/odt/unicode.odt (renamed from tests/odt/odt/unicode.odt)bin11787 -> 11787 bytes
-rw-r--r--test/odt/odt/unorderedList.odt (renamed from tests/odt/odt/unorderedList.odt)bin9505 -> 9505 bytes
-rw-r--r--test/odt/odt/variable.odt (renamed from tests/odt/odt/variable.odt)bin10851 -> 10851 bytes
-rw-r--r--test/opml-reader.native (renamed from tests/opml-reader.native)0
-rw-r--r--test/opml-reader.opml (renamed from tests/opml-reader.opml)0
-rw-r--r--test/pipe-tables.native115
-rw-r--r--test/pipe-tables.txt (renamed from tests/pipe-tables.txt)0
-rw-r--r--test/pptx/endnotes.native2
-rw-r--r--test/pptx/endnotes.pptxbin0 -> 26678 bytes
-rw-r--r--test/pptx/endnotes_templated.pptxbin0 -> 394003 bytes
-rw-r--r--test/pptx/endnotes_toc.pptxbin0 -> 27602 bytes
-rw-r--r--test/pptx/endnotes_toc_templated.pptxbin0 -> 394926 bytes
-rw-r--r--test/pptx/images.native5
-rw-r--r--test/pptx/images.pptxbin0 -> 44338 bytes
-rw-r--r--test/pptx/images_templated.pptxbin0 -> 411657 bytes
-rw-r--r--test/pptx/inline_formatting.native5
-rw-r--r--test/pptx/inline_formatting.pptxbin0 -> 25842 bytes
-rw-r--r--test/pptx/inline_formatting_templated.pptxbin0 -> 393163 bytes
-rw-r--r--test/pptx/lists.native18
-rw-r--r--test/pptx/lists.pptxbin0 -> 26765 bytes
-rw-r--r--test/pptx/lists_templated.pptxbin0 -> 394091 bytes
-rw-r--r--test/pptx/reference_depth.pptxbin0 -> 397502 bytes
-rw-r--r--test/pptx/remove_empty_slides.native5
-rw-r--r--test/pptx/remove_empty_slides.pptxbin0 -> 43784 bytes
-rw-r--r--test/pptx/remove_empty_slides_templated.pptxbin0 -> 411101 bytes
-rw-r--r--test/pptx/slide_breaks.native7
-rw-r--r--test/pptx/slide_breaks.pptxbin0 -> 28290 bytes
-rw-r--r--test/pptx/slide_breaks_slide_level_1.pptxbin0 -> 27461 bytes
-rw-r--r--test/pptx/slide_breaks_slide_level_1_templated.pptxbin0 -> 394785 bytes
-rw-r--r--test/pptx/slide_breaks_templated.pptxbin0 -> 395614 bytes
-rw-r--r--test/pptx/slide_breaks_toc.pptxbin0 -> 29248 bytes
-rw-r--r--test/pptx/slide_breaks_toc_templated.pptxbin0 -> 396572 bytes
-rw-r--r--test/pptx/speaker_notes.native17
-rw-r--r--test/pptx/speaker_notes.pptxbin0 -> 35156 bytes
-rw-r--r--test/pptx/speaker_notes_templated.pptxbin0 -> 402475 bytes
-rw-r--r--test/pptx/tables.native35
-rw-r--r--test/pptx/tables.pptxbin0 -> 27282 bytes
-rw-r--r--test/pptx/tables_templated.pptxbin0 -> 394610 bytes
-rw-r--r--test/pptx/two_column.native9
-rw-r--r--test/pptx/two_column.pptxbin0 -> 25785 bytes
-rw-r--r--test/pptx/two_column_templated.pptxbin0 -> 393106 bytes
-rw-r--r--test/rst-reader.native335
-rw-r--r--test/rst-reader.rst (renamed from tests/rst-reader.rst)0
-rw-r--r--test/s5-basic.html61
-rw-r--r--test/s5-fancy.html262
-rw-r--r--test/s5-fragment.html (renamed from tests/s5-fragment.html)0
-rw-r--r--test/s5-inserts.html39
-rw-r--r--test/s5.native (renamed from tests/s5.native)0
-rw-r--r--test/tables-rstsubset.native114
-rw-r--r--test/tables.asciidoc67
-rw-r--r--test/tables.context230
-rw-r--r--test/tables.custom201
-rw-r--r--test/tables.docbook4432
-rw-r--r--test/tables.docbook5432
-rw-r--r--test/tables.dokuwiki47
-rw-r--r--test/tables.fb23
-rw-r--r--test/tables.haddock76
-rw-r--r--test/tables.html4204
-rw-r--r--test/tables.html5204
-rw-r--r--test/tables.icml757
-rw-r--r--test/tables.jats430
-rw-r--r--test/tables.latex170
-rw-r--r--test/tables.man267
-rw-r--r--test/tables.markdown76
-rw-r--r--test/tables.mediawiki146
-rw-r--r--test/tables.ms267
-rw-r--r--test/tables.muse46
-rw-r--r--test/tables.native114
-rw-r--r--test/tables.opendocument397
-rw-r--r--test/tables.org (renamed from tests/tables.org)0
-rw-r--r--test/tables.plain76
-rw-r--r--test/tables.rst90
-rw-r--r--test/tables.rtf360
-rw-r--r--test/tables.tei171
-rw-r--r--test/tables.texinfo (renamed from tests/tables.texinfo)0
-rw-r--r--test/tables.textile (renamed from tests/tables.textile)0
-rw-r--r--test/tables.txt (renamed from tests/tables.txt)0
-rw-r--r--test/tables.zimwiki56
-rw-r--r--test/test-pandoc.hs83
-rw-r--r--test/testsuite.native409
-rw-r--r--test/testsuite.txt725
-rw-r--r--test/textile-reader.native180
-rw-r--r--test/textile-reader.textile279
-rw-r--r--test/tikiwiki-reader.native130
-rw-r--r--test/tikiwiki-reader.tikiwiki148
-rw-r--r--test/twiki-reader.native (renamed from tests/twiki-reader.native)0
-rw-r--r--test/twiki-reader.twiki (renamed from tests/twiki-reader.twiki)0
-rw-r--r--test/txt2tags.native611
-rw-r--r--test/txt2tags.t2t (renamed from tests/txt2tags.t2t)0
-rw-r--r--test/vimwiki-reader.native309
-rw-r--r--test/vimwiki-reader.wiki424
-rw-r--r--test/writer.asciidoc658
-rw-r--r--test/writer.context901
-rw-r--r--test/writer.custom783
-rw-r--r--test/writer.docbook41416
-rw-r--r--test/writer.docbook51391
-rw-r--r--test/writer.dokuwiki638
-rw-r--r--test/writer.fb21015
-rw-r--r--test/writer.haddock656
-rw-r--r--test/writer.html4549
-rw-r--r--test/writer.html5551
-rw-r--r--test/writer.icml3275
-rw-r--r--test/writer.jats1448
-rw-r--r--test/writer.latex997
-rw-r--r--test/writer.man791
-rw-r--r--test/writer.markdown742
-rw-r--r--test/writer.mediawiki645
-rw-r--r--test/writer.ms1005
-rw-r--r--test/writer.muse725
-rw-r--r--test/writer.native409
-rw-r--r--test/writer.opendocument1537
-rw-r--r--test/writer.opml72
-rw-r--r--test/writer.org851
-rw-r--r--test/writer.plain691
-rw-r--r--test/writer.rst890
-rw-r--r--test/writer.rtf443
-rw-r--r--test/writer.tei859
-rw-r--r--test/writer.texinfo1057
-rw-r--r--test/writer.textile719
-rw-r--r--test/writer.zimwiki619
-rw-r--r--test/writers-lang-and-dir.context123
-rw-r--r--test/writers-lang-and-dir.latex157
-rw-r--r--test/writers-lang-and-dir.native (renamed from tests/writers-lang-and-dir.native)0
-rw-r--r--tests/Tests/Helpers.hs85
-rw-r--r--tests/Tests/Old.hs290
-rw-r--r--tests/Tests/Readers/Docx.hs343
-rw-r--r--tests/Tests/Readers/EPUB.hs37
-rw-r--r--tests/Tests/Readers/HTML.hs33
-rw-r--r--tests/Tests/Readers/LaTeX.hs225
-rw-r--r--tests/Tests/Readers/Markdown.hs459
-rw-r--r--tests/Tests/Readers/Odt.hs166
-rw-r--r--tests/Tests/Readers/Org.hs1723
-rw-r--r--tests/Tests/Readers/RST.hs174
-rw-r--r--tests/Tests/Readers/Txt2Tags.hs429
-rw-r--r--tests/Tests/Shared.hs60
-rw-r--r--tests/Tests/Walk.hs46
-rw-r--r--tests/Tests/Writers/AsciiDoc.hs55
-rw-r--r--tests/Tests/Writers/ConTeXt.hs70
-rw-r--r--tests/Tests/Writers/Docbook.hs302
-rw-r--r--tests/Tests/Writers/Docx.hs149
-rw-r--r--tests/Tests/Writers/HTML.hs43
-rw-r--r--tests/Tests/Writers/LaTeX.hs173
-rw-r--r--tests/Tests/Writers/Markdown.hs263
-rw-r--r--tests/Tests/Writers/Native.hs21
-rw-r--r--tests/Tests/Writers/Plain.hs21
-rw-r--r--tests/Tests/Writers/RST.hs107
-rw-r--r--tests/Tests/Writers/TEI.hs43
-rw-r--r--tests/docx/adjacent_links.docxbin8538 -> 0 bytes
-rw-r--r--tests/docx/adjacent_links.native1
-rw-r--r--tests/docx/inline_formatting.native5
-rw-r--r--tests/docx/nested_anchors_in_header.native10
-rw-r--r--tests/epub/features.native93
-rw-r--r--tests/fb2/basic.fb22
-rw-r--r--tests/fb2/images-embedded.fb22
-rw-r--r--tests/fb2/images.fb22
-rw-r--r--tests/fb2/math.fb22
-rw-r--r--tests/fb2/titles.fb22
-rw-r--r--tests/fb2/titles.markdown10
-rw-r--r--tests/html-reader.html708
-rw-r--r--tests/html-reader.native463
-rw-r--r--tests/latex-reader.latex848
-rw-r--r--tests/latex-reader.native375
-rw-r--r--tests/lhs-test.html63
-rw-r--r--tests/lhs-test.html+lhs63
-rw-r--r--tests/lhs-test.latex125
-rw-r--r--tests/lhs-test.latex+lhs87
-rw-r--r--tests/markdown-citations.native17
-rw-r--r--tests/markdown-reader-more.native198
-rw-r--r--tests/markdown-reader-more.txt320
-rw-r--r--tests/pipe-tables.native115
-rw-r--r--tests/rst-reader.native341
-rw-r--r--tests/s5-basic.html56
-rw-r--r--tests/s5-inserts.html34
-rw-r--r--tests/tables-rstsubset.native117
-rw-r--r--tests/tables.asciidoc67
-rw-r--r--tests/tables.context175
-rw-r--r--tests/tables.docbook432
-rw-r--r--tests/tables.docbook5432
-rw-r--r--tests/tables.dokuwiki47
-rw-r--r--tests/tables.fb22
-rw-r--r--tests/tables.haddock76
-rw-r--r--tests/tables.html204
-rw-r--r--tests/tables.icml757
-rw-r--r--tests/tables.latex168
-rw-r--r--tests/tables.man267
-rw-r--r--tests/tables.markdown78
-rw-r--r--tests/tables.mediawiki146
-rw-r--r--tests/tables.native114
-rw-r--r--tests/tables.opendocument397
-rw-r--r--tests/tables.plain78
-rw-r--r--tests/tables.rst90
-rw-r--r--tests/tables.rtf359
-rw-r--r--tests/tables.tei171
-rw-r--r--tests/tables.zimwiki56
-rw-r--r--tests/test-pandoc.hs67
-rw-r--r--tests/testsuite.native411
-rw-r--r--tests/testsuite.txt730
-rw-r--r--tests/textile-reader.native176
-rw-r--r--tests/textile-reader.textile278
-rw-r--r--tests/txt2tags.native552
-rw-r--r--tests/writer.asciidoc693
-rw-r--r--tests/writer.context888
-rw-r--r--tests/writer.docbook1422
-rw-r--r--tests/writer.docbook51397
-rw-r--r--tests/writer.dokuwiki642
-rw-r--r--tests/writer.fb22
-rw-r--r--tests/writer.haddock660
-rw-r--r--tests/writer.html546
-rw-r--r--tests/writer.icml3317
-rw-r--r--tests/writer.latex971
-rw-r--r--tests/writer.man795
-rw-r--r--tests/writer.markdown746
-rw-r--r--tests/writer.mediawiki653
-rw-r--r--tests/writer.native411
-rw-r--r--tests/writer.opendocument1539
-rw-r--r--tests/writer.opml72
-rw-r--r--tests/writer.org855
-rw-r--r--tests/writer.plain695
-rw-r--r--tests/writer.rst892
-rw-r--r--tests/writer.rtf451
-rw-r--r--tests/writer.tei861
-rw-r--r--tests/writer.texinfo1061
-rw-r--r--tests/writer.textile723
-rw-r--r--tests/writer.zimwiki627
-rw-r--r--tests/writers-lang-and-dir.context109
-rw-r--r--tests/writers-lang-and-dir.latex153
-rw-r--r--trypandoc/Makefile4
-rw-r--r--trypandoc/index.html48
-rw-r--r--trypandoc/trypandoc.hs77
1041 files changed, 96611 insertions, 53388 deletions
diff --git a/AUTHORS.md b/AUTHORS.md
new file mode 100644
index 000000000..a2c66d1e9
--- /dev/null
+++ b/AUTHORS.md
@@ -0,0 +1,197 @@
+# Contributors
+
+- Arata Mizuki
+- Aaron Wolen
+- Albert Krewinkel
+- Alex Ivkin
+- Alex Vong
+- Alexander Kondratskiy
+- Alexander Krotov
+- Alexander Sulfrian
+- Alexander V Vershilov
+- Alfred Wechselberger
+- Andreas Lööw
+- Andrew Dunning
+- Antoine Latter
+- Arata Mizuki
+- Arlo O'Keeffe
+- Artyom Kazak
+- Agustín Martín Barbero
+- B. Scott Michel
+- Ben Firshman
+- Ben Gamari
+- Beni Cherniavsky-Paskin
+- Benoit Schweblin
+- Bjorn Buckwalter
+- Bradley Kuhn
+- Brent Yorgey
+- Bryan O'Sullivan
+- Caleb McDaniel
+- Calvin Beck
+- Carlos Sosa
+- Chris Black
+- Christian Conkle
+- Christoffer Ackelman
+- Christoffer Sawicki
+- Clare Macrae
+- Clint Adams
+- Conal Elliott
+- Craig S. Bosma
+- Daniel Bergey
+- Daniel T. Staal
+- Daniele D'Orazio
+- David A Roberts
+- David Lazar
+- David Röthlisberger
+- Denis Laxalde
+- Douglas Calvert
+- Emanuel Evans
+- Emily Eisenberg
+- Eric Kow
+- Eric Seidel
+- Felix Yan
+- Florian Eitel
+- François Gannaz
+- Freiric Barral
+- Freirich Raabe
+- Frerich Raabe
+- Fyodor Sheremetyev
+- Gabor Pali
+- Gavin Beatty
+- Gottfried Haider
+- Greg Maslov
+- Greg Rundlett
+- Grégory Bataille
+- Gwern Branwen
+- Hamish Mackenzie
+- Hans-Peter Deifel
+- Henrik Tramberend
+- Henry de Valence
+- Hubert Plociniczak
+- Ilya V. Portnov
+- Ivo Clarysse
+- J. Lewis Muir
+- Jaime Marquínez Ferrándiz
+- Jakob Voß
+- James Aspnes
+- Jamie F. Olson
+- Jan Larres
+- Jan Schulz
+- Jason Ronallo
+- Jeff Arnold
+- Jeff Runningen
+- Jens Getreu
+- Jens Petersen
+- Jesse Rosenthal
+- Joe Hillenbrand
+- John MacFarlane
+- John Muccigrosso
+- John Luke Bentley
+- Jonas Smedegaard
+- Jonathan Daugherty
+- Jose Luis Duran
+- Josef Svenningsson
+- Julien Cretel
+- Juliusz Gonera
+- Justin Bogner
+- Jérémy Bobbio
+- Keiichiro Shikano
+- Kelsey Hightower
+- Kolen Cheung
+- Konstantin Zudov
+- Kristof Bastiaensen
+- Herwig Stuetz
+- Lars-Dominik Braun
+- Luke Plant
+- Marc Schreiber
+- Mark Szepieniec
+- Mark Wright
+- Martin Linn
+- Masayoshi Takahashi
+- Matej Kollar
+- Mathias Schenner
+- Mathieu Duponchelle
+- Matthew Eddey
+- Matthew Pickering
+- Matthias C. M. Troffaes
+- Mauro Bieg
+- Max Bolingbroke
+- Max Rydahl Andersen
+- Merijn Verstraaten
+- Michael Beaumont
+- Michael Chladek
+- Michael Snoyman
+- Michael Thompson
+- MinRK
+- Morton Fox
+- Nathan Gass
+- Neil Mayhew
+- Nick Bart
+- Nicolas Kaiser
+- Nikolay Yakimov
+- Oliver Matthews
+- Ophir Lifshitz
+- Or Neeman
+- Pablo Rodríguez
+- Paul Rivier
+- Paulo Tanimoto
+- Peter Wang
+- Philippe Ombredanne
+- Phillip Alday
+- Prayag Verma
+- Puneeth Chaganti
+- Ralf Stephan
+- Raniere Silva
+- Recai Oktaş
+- Roland Hieber
+- RyanGlScott
+- Sascha Wilde
+- Scott Morrison
+- Sebastian Talmon
+- Sergei Trofimovich
+- Sergey Astanin
+- Shahbaz Youssefi
+- Shaun Attfield
+- Sidarth Kapur
+- Sidharth Kapur
+- Simon Hengel
+- Stefan Dresselhaus
+- Sumit Sahrawat
+- Thenaesh Elango
+- Thomas Hodgson
+- Thomas Weißschuh
+- Tim Lin
+- Timm Albers
+- Timothy Humphries
+- Tiziano Müller
+- Todd Sifleet
+- Tom Leese
+- Uli Köhler
+- Václav Zeman
+- Viktor Kronvall
+- Vincent
+- Václav Haisman
+- Václav Zeman
+- Wandmalfarbe
+- Waldir Pimenta
+- Wikiwide
+- Xavier Olive
+- Yuchen Pei
+- bucklereed
+- bumper314
+- csforste
+- d-dorazio
+- iandol
+- infinity0x
+- lwolfsonkin
+- nkalvi
+- oltolm
+- qerub
+- robabla
+- roblabla
+- rodja.trappe
+- rski
+- shreevatsa.public
+- takahashim
+- tgkokk
+- thsutton
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d9c95702e..1145dd835 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,18 +1,24 @@
Contributing to pandoc
======================
+Have a question?
+----------------
+
+Ask on [pandoc-discuss].
+
+
Found a bug?
------------
Bug reports are welcome! Please report all bugs on pandoc's github
[issue tracker].
-Before you submit a bug report, search the (open *and* closed) issues to make
-sure the issue hasn't come up before. Also, check the [User's Guide] and [FAQs]
-for anything relevant.
+Before you submit a bug report, search the [open issues] *and* [closed issues]
+to make sure the issue hasn't come up before. Also, check the [User's Guide] and
+[FAQs] for anything relevant.
-Make sure you can reproduce the bug with the latest released version of pandoc
-(or, even better, the development version).
+Make sure you can reproduce the bug with the [latest released version] of pandoc
+(or, even better, the [development version]).
Your report should give detailed, *reproducible* instructions, including
@@ -31,25 +37,25 @@ Out of scope?
A less than perfect conversion does not necessarily mean there's
a bug in pandoc. Quoting from the MANUAL:
-> Because Pandoc's intermediate representation of a document is less
+> Because pandoc's intermediate representation of a document is less
> expressive than many of the formats it converts between, one should
> not expect perfect conversions between every format and every other.
> Pandoc attempts to preserve the structural elements of a document, but
> not formatting details such as margin size. And some document elements,
-> such as complex tables, may not fit into Pandoc's simple document
-> model. While conversions from Pandoc's Markdown to all formats aspire
-> to be perfect, conversions from formats more expressive than Pandoc's
+> such as complex tables, may not fit into pandoc's simple document
+> model. While conversions from pandoc's Markdown to all formats aspire
+> to be perfect, conversions from formats more expressive than pandoc's
> Markdown can be expected to be lossy.
-For example, both docx and odt can represent margin size, but because
-pandoc's internal document model does not contain a representation of
+For example, both `docx` and `odt` formats can represent margin size, but
+because pandoc's internal document model does not contain a representation of
margin size, this information will be lost on converting from docx
-to odt. (You can, however, customize margin size using `--reference-odt`.)
+to `odt`. (You can, however, customize margin size using `--reference-doc`.)
So before submitting a bug report, consider whether it might be
-"out of scope." If it concerns a feature of documents that isn't
+"out of scope." If it concerns a feature of documents that isn't
representable in pandoc's Markdown, then it very likely is.
-(If in doubt, you can always ask on pandoc-discuss.)
+(If in doubt, you can always ask on [pandoc-discuss].)
Fixing bugs from the issue tracker
----------------------------------
@@ -57,9 +63,9 @@ Fixing bugs from the issue tracker
Almost all the bugs on the issue tracker have one or more associated
tags. These are used to indicate the *complexity* and *nature* of a
bug. There is not yet a way to indicate priority. An up to date
-summary of issues can be found [here](https://github.com/jgm/pandoc/labels).
+summary of issues can be found on [GitHub labels].
-* [beginner-friendly] — The perfect starting point for new contributors. The
+* [good first issue] — The perfect starting point for new contributors. The
issue is generic and can be resolved without deep knowledge of the code
base.
* [enhancement] — A feature which would be desirable. We recommend
@@ -71,7 +77,7 @@ summary of issues can be found [here](https://github.com/jgm/pandoc/labels).
knowledge of the code base.
* [new:reader] — A request to add a new input format.
* [new:writer] — A request to add a new output format.
-* [docs] — A discrepency, or ambiguity in the documentation.
+* [docs] — A discrepancy, or ambiguity in the documentation.
* [status:in-progress] — Someone is actively working on or planning to work on the
ticket.
* [status:more-discussion-needed] — It is unclear what the correct approach
@@ -86,8 +92,8 @@ or bug reports related to Markdown are labelled with [format:markdown].
Have an idea for a new feature?
-------------------------------
-First, search [pandoc-discuss] and the issue tracker (both open and closed
-issues) to make sure that the idea has not been discussed before.
+First, search [pandoc-discuss] and the issue tracker (both [open issues] *and*
+[closed issues]) to make sure that the idea has not been discussed before.
Explain the rationale for the feature you're requesting. Why would this
feature be useful? Consider also any possible drawbacks, including backwards
@@ -130,7 +136,7 @@ Please follow these guidelines:
below under [Tests](#tests).) If you are adding a new writer or reader,
you must include tests.
-7. If you are adding a new feature, include updates to MANUAL.txt.
+7. If you are adding a new feature, include updates to `MANUAL.txt`.
8. All code must be released under the general license governing pandoc
(GPL v2).
@@ -140,7 +146,7 @@ Please follow these guidelines:
10. We aim for compatibility with ghc versions from 7.8.3 to the
latest release. All pull requests and commits are tested
- automatically on travis-ci.org, using GHC versions in the
+ automatically on <travis-ci.org>, using GHC versions in the
`Tested-With` stanza of `pandoc.cabal`. We currently relax
the "`-Wall` clean" requirement for GHC 7.10.x, because
there are so many warnings relating to the addition of type
@@ -161,7 +167,7 @@ or, if you're using [stack],
stack setup
stack test
-The test program is `tests/test-pandoc.hs`.
+The test program is `test/test-pandoc.hs`.
Benchmarks
----------
@@ -176,6 +182,11 @@ With stack:
stack bench
+You can also build pandoc with the `weigh-pandoc` flag and
+run `weigh-pandoc` to get some statistics on memory usage.
+(Eventually this should be incorporated into the benchmark
+suite.)
+
Using the REPL
--------------
@@ -186,43 +197,60 @@ a ghci REPL for working with pandoc. With [stack], use
We recommend using the following `.ghci` file (which can be
placed in the source directory):
-```
-:set -fobject-code
-:set -XTypeSynonymInstances
-:set -XScopedTypeVariables
-:set -XOverloadedStrings
-```
+ :set -fobject-code
+ :set -XTypeSynonymInstances
+ :set -XScopedTypeVariables
+ :set -XOverloadedStrings
-The code
---------
+Profiling
+---------
-Pandoc has a publicly accessible git repository on
-github: <http://github.com/jgm/pandoc>. To get a local copy of the source:
+To use the GHC profiler with cabal:
- git clone git://github.com/jgm/pandoc.git
+ cabal clean
+ cabal install --enable-library-profiling --enable-executable-profiling
+ pandoc +RTS -p -RTS [file]...
+ less pandoc.prof
-Note: after cloning the repository (and in the future after pulling from it),
-you should do
+With stack:
- git submodule update --init
+ stack clean
+ stack install --profile
+ pandoc +RTS -p -RTS [file]...
+ less pandoc.prof
-to pull in changes to the templates (`data/templates/`). You can automate this
-by creating a file `.git/hooks/post-merge` with the contents:
+Templates
+---------
- #!/bin/sh
- git submodule update --init
+The default templates live in `data/templates`, which is a git
+subtree linked to <https://github.com/jgm/pandoc-templates.git>.
+The purpose of maintaining a separate repository is to allow
+people to maintain variant templates as a fork.
-and making it executable:
+You can modify the templates and submit patches without worrying
+much about this: when these patches are merged, we will
+push them to the main templates repository by doing
+
+ git subtree push --prefix=data/templates templates master
+
+where `templates` is a remote pointing to the templates
+repository.
+
+The code
+--------
+
+Pandoc has a publicly accessible git repository on
+github: <http://github.com/jgm/pandoc>. To get a local copy of the source:
- chmod +x .git/hooks/post-merge
+ git clone https://github.com/jgm/pandoc.git
The source for the main pandoc program is `pandoc.hs`. The source for
the pandoc library is in `src/`, the source for the tests is in
-`tests/`, and the source for the benchmarks is in `benchmark/`.
+`test/`, and the source for the benchmarks is in `benchmark/`.
The modules `Text.Pandoc.Definition`, `Text.Pandoc.Builder`, and
`Text.Pandoc.Generic` are in a separate library `pandoc-types`. The code can
-be found in a <http://github.com/jgm/pandoc-types>.
+be found in <http://github.com/jgm/pandoc-types>.
To build pandoc, you will need a working installation of the
[Haskell platform].
@@ -261,7 +289,7 @@ The library is structured as follows:
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.
+ 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
@@ -274,6 +302,10 @@ The library is structured as follows:
- `Text.Pandoc.UUID` contains functions for generating UUIDs.
- `Text.Pandoc.XML` contains functions for formatting XML.
+[open issues]: https://github.com/jgm/pandoc/issues
+[closed issues]: https://github.com/jgm/pandoc/issues?q=is%3Aissue+is%3Aclosed
+[latest released version]: https://github.com/jgm/pandoc/releases/latest
+[development version]: https://github.com/pandoc-extras/pandoc-nightly/releases/latest
[pandoc-discuss]: http://groups.google.com/group/pandoc-discuss
[issue tracker]: https://github.com/jgm/pandoc/issues
[User's Guide]: http://pandoc.org/MANUAL.html
@@ -281,7 +313,8 @@ The library is structured as follows:
[EditorConfig]: http://editorconfig.org/
[Haskell platform]: http://www.haskell.org/platform/
[hsb2hs]: http://hackage.haskell.org/package/hsb2hs
-[beginner-friendly]: https://github.com/jgm/pandoc/labels/beginner-friendly
+[GitHub labels]: https://github.com/jgm/pandoc/labels
+[good first issue]:https://github.com/jgm/pandoc/labels/good%20first%20issue
[enhancement]: https://github.com/jgm/pandoc/labels/enhancement
[bug]: https://github.com/jgm/pandoc/labels/bug
[complexity:low]: https://github.com/jgm/pandoc/labels/complexity:low
diff --git a/COPYRIGHT b/COPYRIGHT
index 70781a2de..711b8f299 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,8 @@
Pandoc
-Copyright (C) 2006-2017 John MacFarlane <jgm at berkeley dot edu>
+Copyright (C) 2006-2018 John MacFarlane <jgm at berkeley dot edu>
-This code is released under the [GPL], version 2 or later:
+With the exceptions noted below, this code is released under the [GPL],
+version 2 or later:
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,38 +28,101 @@ Pandoc's complete source code is available from the [Pandoc home page].
[Pandoc home page]: http://pandoc.org
-Pandoc includes some code from other authors. The copyright and license
-statements for these sources are included below. All are GPL-compatible
-licenses.
+Pandoc includes some code with different copyrights, or subject to different
+licenses. The copyright and license statements for these sources are included
+below. All are GPL-compatible licenses.
+
+----------------------------------------------------------------------
+The modules in the `pandoc-types` repository (Text.Pandoc.Definition,
+Text.Pandoc.Builder, Text.Pandoc.Generics, Text.Pandoc.JSON,
+Text.Pandoc.Walk) are licensed under the BSD 3-clause license:
+
+Copyright (c) 2006-2018, John MacFarlane
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+
+ * Neither the name of John MacFarlane nor the names of other
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+Pandoc's templates (in `data/templates`) are dual-licensed GPL (v2 or
+higher, same as pandoc) and the BSD 3-clause license.
+
+Copyright (c) 2014--2018, John MacFarlane
+
+----------------------------------------------------------------------
+src/Text/Pandoc/Writers/Muse.hs
+Copyright (C) 2017-2018 Alexander Krotov
+
+Released under the GNU General Public License version 2 or later.
----------------------------------------------------------------------
src/Text/Pandoc/Writers/Texinfo.hs
-Copyright (C) 2008-2015 John MacFarlane and Peter Wang
+Copyright (C) 2008-2018 John MacFarlane and Peter Wang
Released under the GNU General Public License version 2 or later.
----------------------------------------------------------------------
src/Text/Pandoc/Writers/OpenDocument.hs
-Copyright (C) 2008-2015 Andrea Rossato and John MacFarlane
+Copyright (C) 2008-2018 Andrea Rossato and John MacFarlane
Released under the GNU General Public License version 2 or later.
----------------------------------------------------------------------
src/Text/Pandoc/Writers/Org.hs
-Copyright (C) 2010-2015 Puneeth Chaganti and John MacFarlane
+Copyright (C) 2010-2018 Puneeth Chaganti, John MacFarlane, and
+ Albert Krewinkel
+
+Released under the GNU General Public License version 2 or later.
+
+----------------------------------------------------------------------
+src/Text/Pandoc/Writers/ZimWiki.hs
+Copyright (C) 2017 Alex Ivkin
+
+Released under the GNU General Public License version 2 or later.
+
+----------------------------------------------------------------------
+src/Text/Pandoc/Readers/Docx.hs
+src/Text/Pandoc/Readers/Docx/*
+Copyright (C) 2014-2018 Jesse Rosenthal
Released under the GNU General Public License version 2 or later.
----------------------------------------------------------------------
src/Text/Pandoc/Readers/Textile.hs
-Copyright (C) 2010-2015 Paul Rivier and John MacFarlane
+Copyright (C) 2010-2018 Paul Rivier and John MacFarlane
Released under the GNU General Public License version 2 or later.
----------------------------------------------------------------------
src/Text/Pandoc/Readers/Org.hs
-tests/Tests/Readers/Org.hs
-Copyright (C) 2014-2015 Albert Krewinkel
+src/Text/Pandoc/Readers/Org/*
+test/Tests/Readers/Org/*
+Copyright (C) 2014-2018 Albert Krewinkel
Released under the GNU General Public License version 2 or later.
@@ -77,7 +141,13 @@ Copyright (C) 2004 Peter Jipsen http://www.chapman.edu/~jipsen
Released under the GNU General Public License version 2 or later.
------------------------------------------------------------------------
-The dzslides template contains javascript and CSS from Paul Rouget's
+data/pandoc.lua
+Copyright (C) 2017-2018 Albert Krewinkel
+
+Released under the GNU General Public License version 2 or later.
+
+----------------------------------------------------------------------
+The dzslides template contains JavaScript and CSS from Paul Rouget's
dzslides template.
http://github.com/paulrouget/dzslides
@@ -86,7 +156,7 @@ Released under the Do What the Fuck You Want To Public License.
------------------------------------------------------------------------
Pandoc embeds a lua interpreter (via hslua).
-Copyright © 1994–2015 Lua.org, PUC-Rio.
+Copyright © 1994–2017 Lua.org, PUC-Rio.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -106,3 +176,12 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+------------------------------------------------------------------------
+The template pandoc.jats is Copyright 2013--15 Martin Fenner,
+released under GPL version 2 or later.
+
+The file data/jats.csl is derived from a csl file by Martin Fenner,
+revised by Martin Paul Eve and then John MacFarlane.
+"This work is licensed under a Creative Commons Attribution-ShareAlike 3.0
+License. Originally by Martin Fenner."
diff --git a/INSTALL.md b/INSTALL.md
index 631641307..7e983d1c0 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -3,41 +3,32 @@
## Windows
- There is a package installer at pandoc's [download page].
+ This will install pandoc, replacing older versions, and
+ update your path to include the directory where pandoc's
+ binaries are installed.
+
+ - If you prefer not to use the msi installer, we also provide
+ a zip file that contains pandoc's binaries and
+ documentation. Simply unzip this file and move the binaries
+ to a directory of your choice.
- For PDF output, you'll also need to install LaTeX.
We recommend [MiKTeX](http://miktex.org/).
- - If you'd prefer, you can extract the pandoc and pandoc-citeproc
- executables from the MSI and copy them directly to any directory,
- without running the installer. Here is an example showing how to
- extract the executables from the pandoc-1.19.1 installer and copy
- them to `C:\Utils\Console\`:
-
- mkdir "%TEMP%\pandoc\"
- start /wait msiexec.exe /a pandoc-1.19.1-windows.msi /qn targetdir="%TEMP%\pandoc\"
- copy /y "%TEMP%\pandoc\pandoc.exe" C:\Utils\Console\
- copy /y "%TEMP%\pandoc\pandoc-citeproc.exe" C:\Utils\Console\
- rmdir /s /q "%TEMP%\pandoc\"
+## macOS
-## Mac OS X
+ - You can install pandoc using
+ [homebrew](http://brew.sh): `brew install pandoc`.
- There is a package installer at pandoc's [download page].
If you later want to uninstall the package, you can do so
by downloading [this script][uninstaller]
and running it with `perl uninstall-pandoc.pl`.
- - It is possible to extract the pandoc and pandoc-citeproc
- executables from the osx pkg file, if you'd rather not run
- the installer. To do this (for the version 1.19.1 package):
-
- mkdir pandoc-extract
- cd pandoc-extract
- xar -x ../pandoc-1.19.1-osx.pkg
- cat pandoc.pkg/Payload | gunzip -dc | cpio -i
- # executables are now in ./usr/bin/, man pages in ./usr/share/man
-
- - You can also install pandoc using
- [homebrew](http://brew.sh): `brew install pandoc`.
+ - We also provide a zip file containing the binaries and man
+ pages, for those who prefer not to use the installer. Simply
+ unzip the file and move the binaries and man pages to
+ whatever directory you like.
- For PDF output, you'll also need LaTeX. Because a full [MacTeX]
installation takes more than a gigabyte of disk space, we recommend
@@ -55,28 +46,37 @@
Note, however, that versions in the repositories are often
old.
- - For 64-bit [Debian] and [Ubuntu], we provide a debian package
- on the [download page].
+ - We provide a binary package for amd64 architecture on
+ the [download page]. This provides both `pandoc` and
+ `pandoc-citeproc`. The executables are statically linked and
+ have no dynamic dependencies or dependencies on external
+ data files. Note: because of the static
+ linking, the pandoc binary from this package cannot use lua
+ filters that require external lua modules written in C.
+
+ Both a tarball and a deb installer are provided. To install the deb:
sudo dpkg -i $DEB
- where `$DEB` is the path to the downloaded deb, will
- install the `pandoc` and `pandoc-citeproc` executables
- and man pages. If you use an RPM-based distro, you may be
- able to install this deb using `alien`, or try
+ where `$DEB` is the path to the downloaded deb. This will
+ install the `pandoc` and `pandoc-citeproc` executables and
+ man pages.
+
+ If you use an RPM-based distro, you may be able to install
+ the deb from our download page using `alien`.
- ar p $DEB data.tar.gz | sudo tar xvz --strip-components 2 -C /usr/local
+ On any distro, you may install from the tarball into `$DEST`
+ (say, `/usr/local/` or `$HOME/.local`) by doing
- - If you'd rather install pandoc in your home directory, say
- in `$HOME/.local`, then you can extract the files manually
- from the deb:
+ tar xvzf $TGZ --strip-components 1 -C $DEST
- ar p $DEB data.tar.gz | tar xvz --strip-components 2 -C $HOME/.local/
+ where `$TGZ` is the path to the downloaded zipped tarball.
+ For Pandoc versions before 2.0, which don't provide
+ a tarball, try instead
- where, again, `$DEB` is the path to the downloaded deb.
+ ar p $DEB data.tar.gz | tar xvz --strip-components 2 -C $DEST
- - If the version in your repository is too old and you cannot
- use the deb we provide, you can install from source, using the
+ - You can also install from source, using the
instructions below under [Compiling from source].
Note that most distros have the Haskell platform in their
package repositories. For example, on Debian/Ubuntu,
@@ -110,7 +110,6 @@ Or you can fetch the development code by cloning the repository:
git clone https://github.com/jgm/pandoc
cd pandoc
- git submodule update --init # to fetch the templates
Note: there may be times when the development code is broken
or depends on other libraries which must be installed
@@ -121,7 +120,7 @@ the last released version.
The easiest way to build pandoc from source is to use [stack]:
-1. Install [stack].
+1. Install [stack]. Note that Pandoc requires stack >= 1.6.0.
2. Change to the pandoc source directory and issue the following commands:
@@ -138,7 +137,7 @@ The easiest way to build pandoc from source is to use [stack]:
1. Install the [Haskell platform]. This will give you [GHC] and
the [cabal-install] build tool. Note that pandoc requires
- GHC >= 7.8.
+ GHC >= 7.10.
2. Update your package database:
@@ -157,13 +156,6 @@ The easiest way to build pandoc from source is to use [stack]:
cabal install
- Note: If you obtained the source from the git repository (rather
- than a release tarball), you'll need to do
-
- git submodule update --init
-
- to fetch the contents of `data/templates` before `cabal install`.
-
4. Make sure the `$CABALDIR/bin` directory is in your path. You should
now be able to run `pandoc`:
@@ -186,7 +178,7 @@ The easiest way to build pandoc from source is to use [stack]:
Note that this requires the `text-icu` library, which in turn
depends on the C library `icu4c`. Installation directions
- vary by platform. Here is how it might work on OSX with homebrew:
+ vary by platform. Here is how it might work on macOS with homebrew:
brew install icu4c
cabal install --extra-lib-dirs=/usr/local/Cellar/icu4c/51.1/lib \
@@ -232,9 +224,6 @@ assume that the pandoc source directory is your working directory.
- `embed_data_files`: embed all data files into the binary (default no).
This is helpful if you want to create a relocatable binary.
- Note: if this option is selected, you need to install the
- `hsb2hs` preprocessor: `cabal install hsb2hs` (version 0.3.1 or
- higher is required).
- `https`: enable support for downloading resources over https
(using the `http-client` and `http-client-tls` libraries).
@@ -281,16 +270,24 @@ To run with cabal, `cabal test`; to run with stack, `stack
test`.
To run particular tests (pattern-matching on their names), use
-the `-t` option:
+the `-p` option:
+
+ cabal test --test-options='-p markdown'
+
+Or with stack:
- cabal test --test-options='-t markdown'
+ stack test --test-arguments='-p markdown'
+
+It is often helpful to add `-j4` (run tests in parallel)
+and `--hide-successes` (don't clutter output with successes)
+to the test arguments as well.
If you add a new feature to pandoc, please add tests as well, following
the pattern of the existing tests. The test suite code is in
-`tests/test-pandoc.hs`. If you are adding a new reader or writer, it is
-probably easiest to add some data files to the `tests` directory, and
-modify `tests/Tests/Old.hs`. Otherwise, it is better to modify the module
-under the `tests/Tests` hierarchy corresponding to the pandoc module you
+`test/test-pandoc.hs`. If you are adding a new reader or writer, it is
+probably easiest to add some data files to the `test` directory, and
+modify `test/Tests/Old.hs`. Otherwise, it is better to modify the module
+under the `test/Tests` hierarchy corresponding to the pandoc module you
are changing.
### Running benchmarks
@@ -312,34 +309,10 @@ To run just the markdown benchmarks:
cabal bench --benchmark-options='markdown'
-### Building the whole pandoc ecosystem
-
-Sometimes pandoc's development code depends on unreleased versions
-of dependent libraries. You'll need to build these as well. A
-maximal build method would be
-
- mkdir pandoc-build
- cd pandoc-build
- git clone https://github.com/jgm/pandoc-types
- git clone https://github.com/jgm/texmath
- git clone https://github.com/jgm/pandoc-citeproc
- git clone https://github.com/jgm/pandoc
- git clone https://github.com/jgm/cmark-hs
- git clone https://github.com/jgm/zip-archive
- cd pandoc
- git submodule update --init
- stack install --test --install-ghc --stack-yaml stack.full.yaml
-
-To pull in the latest changes, after you've done this and there have been
-changes in the repositories: Visit each repository in pandoc-build
-(pandoc-types, texmath, pandoc-citeproc, pandoc, zip-archive, cmark-hs) and do
-`git pull`. In the pandoc repo, also do `git submodule update` and `stack
-install --test --stack-yaml stack.full.yaml`.
-
[Arch]: https://www.archlinux.org/packages/community/x86_64/pandoc/
[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths
-[Debian]: http://packages.debian.org/lenny/pandoc
+[Debian]: https://packages.debian.org/pandoc
[Fedora]: https://apps.fedoraproject.org/packages/pandoc
[FreeBSD ports]: http://www.freshports.org/textproc/pandoc/
[GHC]: http://www.haskell.org/ghc/
@@ -348,9 +321,9 @@ install --test --stack-yaml stack.full.yaml`.
[MacPorts]: http://trac.macports.org/browser/trunk/dports/textproc/pandoc/Portfile
[MacTeX]: https://tug.org/mactex/
[NetBSD]: http://pkgsrc.se/wip/pandoc
-[NixOS]: http://nixos.org/nixos/
-[Slackware]: http://www.linuxpackages.net/search_view.php?by=name&name=pandoc&ver=
-[Ubuntu]: http://www.ubuntu.com
+[NixOS]: https://nixos.org/nixos/packages.html
+[Slackware]: https://www.slackbuilds.org/result/?search=pandoc&sv=
+[Ubuntu]: https://packages.ubuntu.com/pandoc
[download page]: https://github.com/jgm/pandoc/releases/latest
[gentoo]: http://packages.gentoo.org/package/app-text/pandoc
[haskell repository]: https://wiki.archlinux.org/index.php/Haskell_Package_Guidelines#.5Bhaskell.5D
@@ -358,4 +331,4 @@ install --test --stack-yaml stack.full.yaml`.
[source tarball]: http://hackage.haskell.org/package/pandoc
[stack]: http://docs.haskellstack.org/en/stable/install_and_upgrade.html
[cabal-install]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall
-[uninstaller]: https://raw.githubusercontent.com/jgm/pandoc/master/osx/uninstall-pandoc.pl
+[uninstaller]: https://raw.githubusercontent.com/jgm/pandoc/master/macos/uninstall-pandoc.pl
diff --git a/MANUAL.txt b/MANUAL.txt
index ba6f25a3e..168f1784e 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1,6 +1,6 @@
% Pandoc User's Guide
% John MacFarlane
-% January 29, 2017
+% March 2, 2018
Synopsis
========
@@ -11,36 +11,42 @@ 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
-[Markdown], [CommonMark], [PHP Markdown Extra], [GitHub-Flavored Markdown],
-[MultiMarkdown], and (subsets of) [Textile], [reStructuredText], [HTML],
-[LaTeX], [MediaWiki markup], [TWiki markup], [Haddock markup], [OPML], [Emacs
-Org mode], [DocBook], [txt2tags], [EPUB], [ODT] and [Word docx]; and it can
-write plain text, [Markdown], [CommonMark], [PHP Markdown Extra],
-[GitHub-Flavored Markdown], [MultiMarkdown], [reStructuredText], [XHTML],
-[HTML5], [LaTeX] \(including [`beamer`] slide shows\), [ConTeXt], [RTF], [OPML],
-[DocBook], [OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki
-markup], [DokuWiki markup], [ZimWiki markup], [Haddock markup],
-[EPUB] \(v2 or v3\), [FictionBook2], [Textile], [groff man] pages,
-[Emacs Org mode], [AsciiDoc], [InDesign ICML], [TEI Simple], and [Slidy],
-[Slideous], [DZSlides], [reveal.js] or [S5] HTML slide shows. It can also
-produce [PDF] output on systems where LaTeX, ConTeXt, or `wkhtmltopdf` is
-installed.
-
-Pandoc's enhanced version of Markdown includes syntax for [footnotes],
-[tables], flexible [ordered lists], [definition lists], [fenced code blocks],
-[superscripts and subscripts], [strikeout], [metadata blocks], automatic tables of
-contents, embedded LaTeX [math], [citations], and [Markdown inside HTML block
-elements][Extension: `markdown_in_html_blocks`]. (These enhancements, described
-further under [Pandoc's Markdown], can be disabled using the
-`markdown_strict` input or output format.)
-
-In contrast to most existing tools for converting Markdown to HTML, which
-use regex substitutions, 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
+another, and a command-line tool that uses this library.
+
+Pandoc can read [Markdown], [CommonMark], [PHP Markdown Extra],
+[GitHub-Flavored Markdown], [MultiMarkdown], and (subsets of) [Textile],
+[reStructuredText], [HTML], [LaTeX], [MediaWiki markup], [TWiki
+markup], [TikiWiki markup], [Creole 1.0], [Haddock markup], [OPML],
+[Emacs Org mode], [DocBook], [JATS], [Muse], [txt2tags], [Vimwiki],
+[EPUB], [ODT], and [Word docx].
+
+Pandoc can write plain text, [Markdown],
+[CommonMark], [PHP Markdown Extra], [GitHub-Flavored Markdown],
+[MultiMarkdown], [reStructuredText], [XHTML], [HTML5], [LaTeX]
+\(including [`beamer`] slide shows\), [ConTeXt], [RTF], [OPML],
+[DocBook], [JATS], [OpenDocument], [ODT], [Word docx], [GNU Texinfo],
+[MediaWiki markup], [DokuWiki markup], [ZimWiki markup], [Haddock
+markup], [EPUB] \(v2 or v3\), [FictionBook2], [Textile], [groff man],
+[groff ms], [Emacs Org mode], [AsciiDoc], [InDesign ICML], [TEI
+Simple], [Muse], [PowerPoint] slide shows and [Slidy], [Slideous],
+[DZSlides], [reveal.js] or [S5] HTML slide shows. It can also produce
+[PDF] output on systems where LaTeX, ConTeXt, `pdfroff`,
+`wkhtmltopdf`, `prince`, or `weasyprint` is installed.
+
+Pandoc's enhanced version of Markdown includes syntax for [tables],
+[definition lists], [metadata blocks], [`Div` blocks][Extension:
+`fenced_divs`], [footnotes] and [citations], embedded
+[LaTeX][Extension: `raw_tex`] (including [math]), [Markdown inside HTML
+block elements][Extension: `markdown_in_html_blocks`], and much more.
+These enhancements, described further under [Pandoc's Markdown],
+can be disabled using the `markdown_strict` format.
+
+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
+(like an _abstract syntax tree_ or AST), 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.
+or output format requires only adding a reader or writer. Users can also
+run custom [pandoc filters] to modify the intermediate AST.
Because pandoc's intermediate representation of a document is less
expressive than many of the formats it converts between, one should
@@ -63,6 +69,7 @@ Markdown can be expected to be lossy.
[Slideous]: http://goessner.net/articles/slideous/
[HTML]: http://www.w3.org/html/
[HTML5]: http://www.w3.org/TR/html5/
+[polyglot markup]: https://www.w3.org/TR/html-polyglot/
[XHTML]: http://www.w3.org/TR/xhtml1/
[LaTeX]: http://latex-project.org
[`beamer`]: https://ctan.org/pkg/beamer
@@ -70,6 +77,7 @@ Markdown can be expected to be lossy.
[ConTeXt]: http://www.contextgarden.net/
[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
[DocBook]: http://docbook.org
+[JATS]: https://jats.nlm.nih.gov
[txt2tags]: http://txt2tags.org
[EPUB]: http://idpf.org/epub
[OPML]: http://dev.opml.org/spec2.html
@@ -80,8 +88,11 @@ Markdown can be expected to be lossy.
[DokuWiki markup]: https://www.dokuwiki.org/dokuwiki
[ZimWiki markup]: http://zim-wiki.org/manual/Help/Wiki_Syntax.html
[TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules
+[TikiWiki markup]: https://doc.tiki.org/Wiki-Syntax-Text#The_Markup_Language_Wiki-Syntax
[Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html
+[Creole 1.0]: http://www.wikicreole.org/wiki/Creole1.0
[groff man]: http://man7.org/linux/man-pages/man7/groff_man.7.html
+[groff ms]: http://man7.org/linux/man-pages/man7/groff_ms.7.html
[Haskell]: https://www.haskell.org
[GNU Texinfo]: http://www.gnu.org/software/texinfo/
[Emacs Org mode]: http://orgmode.org
@@ -91,44 +102,41 @@ Markdown can be expected to be lossy.
[PDF]: https://www.adobe.com/pdf/
[reveal.js]: http://lab.hakim.se/reveal-js/
[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1
-[InDesign ICML]: https://www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/IDML/idml-specification.pdf
+[InDesign ICML]: http://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-cookbook.pdf
[TEI Simple]: https://github.com/TEIC/TEI-Simple
+[Muse]: https://amusewiki.org/library/manual
+[PowerPoint]: https://en.wikipedia.org/wiki/Microsoft_PowerPoint
+[Vimwiki]: https://vimwiki.github.io
Using `pandoc`
--------------
-If no *input-file* is specified, input is read from *stdin*.
-Otherwise, the *input-files* are concatenated (with a blank
-line between each) and used as input. Output goes to *stdout* by
-default (though output to *stdout* is disabled for the `odt`, `docx`,
-`epub`, and `epub3` output formats). For output to a file, use the
-`-o` option:
+If no *input-files* are specified, input is read from *stdin*.
+Output goes to *stdout* by default. For output to a file,
+use the `-o` option:
pandoc -o output.html input.txt
-By default, pandoc produces a document fragment, not a standalone
-document with a proper header and footer. To produce a standalone
-document, use the `-s` or `--standalone` flag:
+By default, pandoc produces a document fragment. To produce a standalone
+document (e.g. a valid HTML file including `<head>` and `<body>`),
+use the `-s` or `--standalone` flag:
pandoc -s -o output.html input.txt
For more information on how standalone documents are produced, see
-[Templates], below.
-
-Instead of a file, an absolute URI may be given. In this case
-pandoc will fetch the content using HTTP:
-
- pandoc -f html -t markdown http://www.fsf.org
+[Templates] below.
If multiple input files are given, `pandoc` will concatenate them all (with
-blank lines between them) before parsing. This feature is disabled for
- binary input formats such as `EPUB`, `odt`, and `docx`.
+blank lines between them) before parsing. (Use `--file-scope` to parse files
+individually.)
+
+Specifying formats
+------------------
The format of the input and output can be specified explicitly using
command-line options. The input format can be specified using the
-`-r/--read` or `-f/--from` options, the output format using the
-`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from
-Markdown to LaTeX, you could type:
+`-f/--from` option, the output format using the `-t/--to` option.
+Thus, to convert `hello.txt` from Markdown to LaTeX, you could type:
pandoc -f markdown -t latex hello.txt
@@ -136,14 +144,15 @@ To convert `hello.html` from HTML to Markdown:
pandoc -f html -t markdown hello.html
-Supported output formats are listed below under the `-t/--to` option.
-Supported input formats are listed below under the `-f/--from` option. Note
-that the `rst`, `textile`, `latex`, and `html` readers are not complete;
-there are some constructs that they do not parse.
+Supported input and output formats are listed below under [Options]
+(see `-f` for input formats and `-t` for output formats). You
+can also use `pandoc --list-input-formats` and
+`pandoc --list-output-formats` to print lists of supported
+formats.
If the input or output format is not specified explicitly, `pandoc`
-will attempt to guess it from the extensions of
-the input and output filenames. Thus, for example,
+will attempt to guess it from the extensions of the filenames.
+Thus, for example,
pandoc -o hello.tex hello.txt
@@ -152,7 +161,10 @@ is specified (so that output goes to *stdout*), or if the output file's
extension is unknown, the output format will default to HTML.
If no input file is specified (so that input comes from *stdin*), or
if the input files' extensions are unknown, the input format will
-be assumed to be Markdown unless explicitly specified.
+be assumed to be Markdown.
+
+Character encoding
+------------------
Pandoc uses the UTF-8 character encoding for both input and output.
If your local character encoding is not UTF-8, you
@@ -170,45 +182,56 @@ will only be included if you use the `-s/--standalone` option.
Creating a PDF
--------------
-To produce a PDF, specify an output file with a `.pdf` extension.
-By default, pandoc will use LaTeX to convert it to PDF:
+To produce a PDF, specify an output file with a `.pdf` extension:
pandoc test.txt -o test.pdf
-Production of a PDF requires that a LaTeX engine be installed (see
-`--latex-engine`, below), and assumes that the following LaTeX packages
-are available: [`amsfonts`], [`amsmath`], [`lm`],
-[`ifxetex`], [`ifluatex`], [`eurosym`], [`listings`] (if the
-`--listings` option is used), [`fancyvrb`], [`longtable`],
-[`booktabs`], [`graphicx`] and [`grffile`] (if the
-document contains images), [`hyperref`], [`ulem`],
-[`geometry`] (with the `geometry` variable set), [`setspace`] (with
-`linestretch`), and [`babel`] (with `lang`). The use of `xelatex` or
-`lualatex` as the LaTeX engine requires [`fontspec`]; `xelatex` uses
-[`mathspec`], [`polyglossia`] (with `lang`), [`xecjk`], and
-[`bidi`] (with the `dir` variable set). The [`upquote`] and
-[`microtype`] packages are used if available, and [`csquotes`] will
-be used for [smart punctuation] if added to the template or included in
-any header file. The [`natbib`], [`biblatex`], [`bibtex`], and [`biber`]
-packages can optionally be used for [citation rendering]. These are
-included with all recent versions of [TeX Live].
-
-Alternatively, pandoc can use ConTeXt or `wkhtmltopdf` to create a PDF.
-To do this, specify an output file with a `.pdf` extension,
-as before, but add `-t context` or `-t html5` to the command line.
+By default, pandoc will use LaTeX to create the PDF, which requires
+that a LaTeX engine be installed (see `--pdf-engine` below).
+
+Alternatively, pandoc can use [ConTeXt], `pdfroff`, or any of the
+following HTML/CSS-to-PDF-engines, to create a PDF: [`wkhtmltopdf`],
+[`weasyprint`] or [`prince`].
+To do this, specify an output file with a `.pdf` extension, as before,
+but add the `--pdf-engine` option or `-t context`, `-t html`, or `-t ms`
+to the command line (`-t html` defaults to `--pdf-engine=wkhtmltopdf`).
PDF output can be controlled using [variables for LaTeX] (if
LaTeX is used) and [variables for ConTeXt] (if ConTeXt is used).
+When using an HTML/CSS-to-PDF-engine, `--css` affects the output.
If `wkhtmltopdf` is used, then the variables `margin-left`,
-`margin-right`, `margin-top`, `margin-bottom`, and `papersize`
-will affect the output, as will `--css`.
+`margin-right`, `margin-top`, `margin-bottom`, `footer-html`,
+`header-html` and `papersize` will affect the output.
+
+To debug the PDF creation, it can be useful to look at the intermediate
+representation: instead of `-o test.pdf`, use for example `-s -o test.tex`
+to output the generated LaTeX. You can then test it with `pdflatex test.tex`.
+
+When using LaTeX, the following packages need to be available
+(they are included with all recent versions of [TeX Live]):
+[`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`],
+[`ifxetex`], [`ifluatex`], [`listings`] (if the
+`--listings` option is used), [`fancyvrb`], [`longtable`],
+[`booktabs`], [`graphicx`] and [`grffile`] (if the document
+contains images), [`hyperref`], [`xcolor`] (with `colorlinks`),
+[`ulem`], [`geometry`] (with the `geometry` variable set),
+[`setspace`] (with `linestretch`), and
+[`babel`] (with `lang`). The use of `xelatex` or `lualatex` as
+the LaTeX engine requires [`fontspec`]. `xelatex` uses
+[`polyglossia`] (with `lang`), [`xecjk`], and [`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 added to the template or included in any header file. The
+[`natbib`], [`biblatex`], [`bibtex`], and [`biber`] packages can
+optionally be used for [citation rendering].
[`amsfonts`]: https://ctan.org/pkg/amsfonts
[`amsmath`]: https://ctan.org/pkg/amsmath
[`lm`]: https://ctan.org/pkg/lm
[`ifxetex`]: https://ctan.org/pkg/ifxetex
[`ifluatex`]: https://ctan.org/pkg/ifluatex
-[`eurosym`]: https://ctan.org/pkg/eurosym
[`listings`]: https://ctan.org/pkg/listings
[`fancyvrb`]: https://ctan.org/pkg/fancyvrb
[`longtable`]: https://ctan.org/pkg/longtable
@@ -223,6 +246,7 @@ will affect the output, as will `--css`.
[`babel`]: https://ctan.org/pkg/babel
[`bidi`]: https://ctan.org/pkg/bidi
[`mathspec`]: https://ctan.org/pkg/mathspec
+[`unicode-math`]: https://ctan.org/pkg/unicode-math
[`polyglossia`]: https://ctan.org/pkg/polyglossia
[`fontspec`]: https://ctan.org/pkg/fontspec
[`upquote`]: https://ctan.org/pkg/upquote
@@ -233,6 +257,23 @@ will affect the output, as will `--css`.
[`bibtex`]: https://ctan.org/pkg/bibtex
[`biber`]: https://ctan.org/pkg/biber
[TeX Live]: http://www.tug.org/texlive/
+[`wkhtmltopdf`]: https://wkhtmltopdf.org
+[`weasyprint`]: http://weasyprint.org
+[`prince`]: https://www.princexml.com/
+
+Reading from the Web
+--------------------
+
+Instead of an input file, an absolute URI may be given. In this case
+pandoc will fetch the content using HTTP:
+
+ pandoc -f html -t markdown http://www.fsf.org
+
+It is possible to supply a custom User-Agent string or other
+header when requesting a document from a URL:
+
+ pandoc -f html -t markdown --request-header User-Agent:"Mozilla/5.0" \
+ http://www.fsf.org
Options
=======
@@ -245,23 +286,20 @@ General options
: Specify input format. *FORMAT* can be `native` (native Haskell),
`json` (JSON version of native AST), `markdown` (pandoc's
extended Markdown), `markdown_strict` (original unextended
- Markdown), `markdown_phpextra` (PHP Markdown Extra), `markdown_github`
- (GitHub-Flavored Markdown), `markdown_mmd` (MultiMarkdown),
+ Markdown), `markdown_phpextra` (PHP Markdown Extra),
+ `markdown_mmd` (MultiMarkdown), `gfm` (GitHub-Flavored Markdown),
`commonmark` (CommonMark Markdown), `textile` (Textile), `rst`
(reStructuredText), `html` (HTML), `docbook` (DocBook), `t2t`
(txt2tags), `docx` (docx), `odt` (ODT), `epub` (EPUB), `opml` (OPML),
`org` (Emacs Org mode), `mediawiki` (MediaWiki markup), `twiki` (TWiki
- markup), `haddock` (Haddock markup), or `latex` (LaTeX). If
- `+lhs` is appended to `markdown`, `rst`, `latex`, or `html`, the
- input will be treated as literate Haskell source: see [Literate
- Haskell support], below. Markdown
- syntax extensions can be individually enabled or disabled by
- appending `+EXTENSION` or `-EXTENSION` to the format name. So, for
- example, `markdown_strict+footnotes+definition_lists` is strict
- Markdown with footnotes and definition lists enabled, and
- `markdown-pipe_tables+hard_line_breaks` is pandoc's Markdown
- without pipe tables and with hard line breaks. See [Pandoc's
- Markdown], below, for a list of extensions and
+ markup), `tikiwiki` (TikiWiki markup), `creole` (Creole 1.0),
+ `haddock` (Haddock markup), or `latex` (LaTeX).
+ (`markdown_github` provides deprecated and less accurate support
+ for Github-Flavored Markdown; please use `gfm` instead, unless you
+ need to use extensions other than `smart`.)
+ Extensions can be individually enabled or disabled by
+ appending `+EXTENSION` or `-EXTENSION` to the format name.
+ See [Extensions] below, for a list of extensions and
their names. See `--list-input-formats` and `--list-extensions`,
below.
@@ -271,46 +309,45 @@ General options
`json` (JSON version of native AST), `plain` (plain text),
`markdown` (pandoc's extended Markdown), `markdown_strict`
(original unextended Markdown), `markdown_phpextra` (PHP Markdown
- Extra), `markdown_github` (GitHub-Flavored Markdown), `markdown_mmd`
- (MultiMarkdown), `commonmark` (CommonMark Markdown), `rst`
- (reStructuredText), `html` (XHTML), `html5` (HTML5), `latex`
- (LaTeX), `beamer` (LaTeX beamer slide show), `context` (ConTeXt),
- `man` (groff man), `mediawiki` (MediaWiki markup),
- `dokuwiki` (DokuWiki markup), `zimwiki` (ZimWiki markup),
- `textile` (Textile), `org` (Emacs Org mode),
- `texinfo` (GNU Texinfo), `opml` (OPML), `docbook` (DocBook 4),
- `docbook5` (DocBook 5), `opendocument` (OpenDocument), `odt`
- (OpenOffice text document), `docx` (Word docx), `haddock`
- (Haddock markup), `rtf` (rich text format), `epub` (EPUB v2
- book), `epub3` (EPUB v3), `fb2` (FictionBook2 e-book),
- `asciidoc` (AsciiDoc), `icml` (InDesign ICML), `tei` (TEI
- Simple), `slidy` (Slidy HTML and JavaScript slide show),
- `slideous` (Slideous HTML and JavaScript slide show),
- `dzslides` (DZSlides HTML5 + JavaScript slide show),
- `revealjs` (reveal.js HTML5 + JavaScript slide show), `s5`
- (S5 HTML and JavaScript slide show), or the path of a custom
- lua writer (see [Custom writers], below). Note that `odt`,
- `epub`, and `epub3` output will not be directed to *stdout*;
- an output filename must be specified using the `-o/--output`
- option. If `+lhs` is appended to `markdown`, `rst`, `latex`,
- `beamer`, `html`, or `html5`, the output will be rendered as
- literate Haskell source: see [Literate Haskell support],
- below. Markdown syntax extensions can be individually
- enabled or disabled by appending `+EXTENSION` or
- `-EXTENSION` to the format name, as described above under `-f`.
- See `--list-output-formats` and `--list-extensions`, below.
+ Extra), `markdown_mmd` (MultiMarkdown), `gfm` (GitHub-Flavored
+ Markdown), `commonmark` (CommonMark Markdown), `rst`
+ (reStructuredText), `html4` (XHTML 1.0 Transitional), `html` or
+ `html5` (HTML5/XHTML [polyglot markup]), `latex` (LaTeX), `beamer`
+ (LaTeX beamer slide show), `context` (ConTeXt), `man` (groff man),
+ `mediawiki` (MediaWiki markup), `dokuwiki` (DokuWiki markup),
+ `zimwiki` (ZimWiki markup), `textile` (Textile), `org` (Emacs Org
+ mode), `texinfo` (GNU Texinfo), `opml` (OPML), `docbook` or
+ `docbook4` (DocBook 4), `docbook5` (DocBook 5), `jats` (JATS XML),
+ `opendocument` (OpenDocument), `odt` (OpenOffice text document),
+ `docx` (Word docx), `haddock` (Haddock markup), `rtf` (rich text
+ format), `epub2` (EPUB v2 book), `epub` or `epub3` (EPUB v3),
+ `fb2` (FictionBook2 e-book), `asciidoc` (AsciiDoc), `icml`
+ (InDesign ICML), `tei` (TEI Simple), `slidy` (Slidy HTML and
+ JavaScript slide show), `slideous` (Slideous HTML and JavaScript
+ slide show), `dzslides` (DZSlides HTML5 + JavaScript slide show),
+ `revealjs` (reveal.js HTML5 + JavaScript slide show), `s5` (S5
+ HTML and JavaScript slide show), `pptx` (PowerPoint slide show) or
+ the path of a custom lua writer (see [Custom writers],
+ below). (`markdown_github` provides deprecated and less accurate
+ support for Github-Flavored Markdown; please use `gfm` instead,
+ unless you use extensions that do not work with `gfm`.) Note that
+ `odt`, `docx`, and `epub` output will not be directed to *stdout*
+ unless forced with `-o -`. Extensions can be individually enabled or
+ disabled by appending `+EXTENSION` or `-EXTENSION` to the format
+ name. See [Extensions] below, for a list of extensions and their
+ names. See `--list-output-formats` and `--list-extensions`, below.
`-o` *FILE*, `--output=`*FILE*
: Write output to *FILE* instead of *stdout*. If *FILE* is
- `-`, output will go to *stdout*. (Exception: if the output
- format is `odt`, `docx`, `epub`, or `epub3`, output to stdout is disabled.)
+ `-`, output will go to *stdout*, even if a non-textual format
+ (`docx`, `odt`, `epub2`, `epub3`) is specified.
`--data-dir=`*DIRECTORY*
: Specify the user data directory to search for pandoc data files.
If this option is not specified, the default user data directory
- will be used. This is, in Unix:
+ will be used. This is, in UNIX:
$HOME/.pandoc
@@ -333,13 +370,27 @@ General options
: Generate a bash completion script. To enable bash completion
with pandoc, add this to your `.bashrc`:
- eval "$(pandoc --bash-completion)"
+ eval "$(pandoc --bash-completion)"
`--verbose`
: Give verbose debugging output. Currently this only has an effect
with PDF output.
+`--quiet`
+
+: Suppress warning messages.
+
+`--fail-if-warnings`
+
+: Exit with error status if there are any warnings.
+
+`--log=`*FILE*
+
+: Write log messages in machine-readable JSON format to
+ *FILE*. All messages above DEBUG level will be written,
+ regardless of verbosity settings (`--verbose`, `--quiet`).
+
`--list-input-formats`
: List supported input formats, one per line.
@@ -348,11 +399,12 @@ General options
: List supported output formats, one per line.
-`--list-extensions`
+`--list-extensions`[`=`*FORMAT*]
-: List supported Markdown extensions, one per line, followed
+: List supported extensions, one per line, preceded
by a `+` or `-` indicating whether it is enabled by default
- in pandoc's Markdown.
+ in *FORMAT*. If *FORMAT* is not specified, defaults for
+ pandoc's Markdown are given.
`--list-highlight-languages`
@@ -375,36 +427,17 @@ General options
Reader options
--------------
-`-R`, `--parse-raw`
-
-: Parse untranslatable HTML codes and LaTeX environments as raw HTML
- or LaTeX, instead of ignoring them. Affects only HTML and LaTeX
- input. Raw HTML can be printed in Markdown, reStructuredText, Emacs Org
- mode, HTML, Slidy, Slideous, DZSlides, reveal.js, and S5 output; raw LaTeX
- can be printed in Markdown, reStructuredText, Emacs Org mode, LaTeX, and
- ConTeXt output. The default is for the readers to omit untranslatable
- HTML codes and LaTeX environments. (The LaTeX reader does pass through
- untranslatable LaTeX *commands*, even if `-R` is not specified.)
-
-`-S`, `--smart`
-
-: Produce typographically correct output, converting straight quotes
- to curly quotes, `---` to em-dashes, `--` to en-dashes, and
- `...` to ellipses. Nonbreaking spaces are inserted after certain
- abbreviations, such as "Mr." (Note: This option is selected automatically
- when the output format is `latex` or `context`, unless `--no-tex-ligatures`
- is used. It has no effect for `latex` input.)
-
-`--old-dashes`
-
-: Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes: `-` before
- a numeral is an en-dash, and `--` is an em-dash. This option is selected
- automatically for `textile` input.
-
`--base-header-level=`*NUMBER*
: Specify the base level for headers (defaults to 1).
+`--strip-empty-paragraphs`
+
+: *Deprecated. Use the `+empty_paragraphs` extension instead.*
+ 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.
+
`--indented-code-classes=`*CLASSES*
: Specify classes to use for indented code blocks--for example,
@@ -448,7 +481,7 @@ Reader options
Those who would prefer to write filters in python can use the
module [`pandocfilters`], installable from PyPI. There are also
pandoc filter libraries in [PHP], [perl], and
- [javascript/node.js].
+ [JavaScript/node.js].
In order of preference, pandoc will look for filters in
@@ -456,9 +489,39 @@ Reader options
non-executable)
2. `$DATADIR/filters` (executable or non-executable)
+ where `$DATADIR` is the user data directory (see
+ `--data-dir`, above).
3. `$PATH` (executable only)
+ Filters and lua-filters are applied in the order specified
+ on the command line.
+
+`--lua-filter=`*SCRIPT*
+
+: Transform the document in a similar fashion as JSON filters (see
+ `--filter`), but use pandoc's build-in lua filtering system. The given
+ lua script is expected to return a list of lua filters which will be
+ applied in order. Each lua filter must contain element-transforming
+ functions indexed by the name of the AST element on which the filter
+ function should be applied.
+
+ The `pandoc` lua module provides helper functions for element
+ creation. It is always loaded into the script's lua environment.
+
+ The following is an example lua script for macro-expansion:
+
+ function expand_hello_world(inline)
+ if inline.c == '{{helloworld}}' then
+ return pandoc.Emph{ pandoc.Str "Hello, World" }
+ else
+ return inline
+ end
+ end
+
+ return {{Str = expand_hello_world}}
+
+
`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
: Set the metadata field *KEY* to the value *VAL*. A value specified
@@ -470,11 +533,6 @@ Reader options
underlying document (which is accessible from filters and may be
printed in some output formats).
-`--normalize`
-
-: Normalize the document after reading: merge adjacent
- `Str` or `Emph` elements, for example, and remove repeated `Space`s.
-
`-p`, `--preserve-tabs`
: Preserve tabs instead of converting them to spaces (the default).
@@ -496,20 +554,41 @@ Reader options
`insertion`, `deletion`, `comment-start`, and `comment-end`
classes, respectively. The author and time of change is
included. `all` is useful for scripting: only accepting changes
- from a certain reviewer, say, or before a certain date. This
- option only affects the docx reader.
+ from a certain reviewer, say, or before a certain date. If a
+ paragraph is inserted or deleted, `track-changes=all` produces a
+ span with the class `paragraph-insertion`/`paragraph-deletion`
+ before the affected paragraph break. This option only affects the
+ docx reader.
`--extract-media=`*DIR*
-: Extract images and other media contained in a docx or epub container
- to the path *DIR*, creating it if necessary, and adjust the images
- references in the document so they point to the extracted files.
- This option only affects the docx and epub readers.
+: Extract images and other media contained in or linked from
+ the source document to the path *DIR*, creating it if
+ necessary, and adjust the images references in the document
+ so they point to the extracted files. If the source format is
+ a binary container (docx, epub, or odt), the media is
+ extracted from the container and the original
+ filenames are used. Otherwise the media is read from the
+ file system or downloaded, and new filenames are constructed
+ based on SHA1 hashes of the contents.
+
+`--abbreviations=`*FILE*
+
+: Specifies a custom abbreviations file, with abbreviations
+ one to a line. If this option is not specified, pandoc will
+ read the data file `abbreviations` from the user data
+ directory or fall back on a system default. To see the
+ system default, use
+ `pandoc --print-default-data-file=abbreviations`. The only
+ use pandoc makes of this list is in the Markdown reader.
+ Strings ending in a period that are found in this list will
+ be followed by a nonbreaking space, so that the period will
+ not produce sentence-ending space in formats like LaTeX.
[`pandocfilters`]: https://github.com/jgm/pandocfilters
[PHP]: https://github.com/vinai/pandocfilters-php
[perl]: https://metacpan.org/pod/Pandoc::Filter
-[javascript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
+[JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
General writer options
----------------------
@@ -553,7 +632,15 @@ General writer options
: Print a system default data file. Files in the user data directory
are ignored.
+`--eol=crlf`|`lf`|`native`
+
+: Manually specify line endings: `crlf` (Windows), `lf`
+ (macOS/Linux/UNIX), or `native` (line endings appropriate
+ to the OS on which pandoc is being run). The default is
+ `native`.
+
`--dpi`=*NUMBER*
+
: Specify the dpi (dots per inch) value for conversion from pixels
to inch/centimeters and vice versa. The default is 96dpi.
Technically, the correct term would be ppi (pixels per inch).
@@ -570,10 +657,6 @@ General writer options
will be nonsemantic newlines in the output as well).
Automatic wrapping does not currently work in HTML output.
-`--no-wrap`
-
-: Deprecated synonym for `--wrap=none`.
-
`--columns=`*NUMBER*
: Specify length of lines in characters. This affects text wrapping
@@ -583,9 +666,10 @@ General writer options
`--toc`, `--table-of-contents`
: Include an automatically generated table of contents (or, in
- the case of `latex`, `context`, `docx`, and `rst`, an instruction to create
- one) in the output document. This option has no effect on `man`,
- `docbook`, `docbook5`, `slidy`, `slideous`, `s5`, or `odt` output.
+ the case of `latex`, `context`, `docx`, `odt`,
+ `opendocument`, `rst`, or `ms`, an instruction to create
+ one) in the output document. This option has no effect on
+ `man`, `docbook4`, `docbook5`, or `jats` output.
`--toc-depth=`*NUMBER*
@@ -593,12 +677,20 @@ General writer options
of contents. The default is 3 (which means that level 1, 2, and 3
headers will be listed in the contents).
+`--strip-comments`
+
+: Strip out HTML comments in the Markdown or Textile source,
+ rather than passing them on to Markdown, Textile or HTML
+ output as raw HTML. This does not apply to HTML comments
+ inside raw HTML blocks when the `markdown_in_html_blocks`
+ extension is not set.
+
`--no-highlight`
: Disables syntax highlighting for code blocks and inlines, even when
a language attribute is given.
-`--highlight-style=`*STYLE*
+`--highlight-style=`*STYLE*|*FILE*
: Specifies the coloring style to be used in highlighted source code.
Options are `pygments` (the default), `kate`, `monochrome`,
@@ -607,6 +699,28 @@ General writer options
[Syntax highlighting], below. See also
`--list-highlight-styles`.
+ Instead of a *STYLE* name, a JSON file with extension
+ `.theme` may be supplied. This will be parsed as a KDE
+ syntax highlighting theme and (if valid) used as the
+ highlighting style.
+
+ To generate the JSON version of an existing style,
+ use `--print-highlight-style`.
+
+`--print-highlight-style=`*STYLE*|*FILE*
+
+: Prints a JSON version of a highlighting style, which can
+ be modified, saved with a `.theme` extension, and used
+ with `--highlight-style`.
+
+`--syntax-definition=`*FILE*
+
+: Instructs pandoc to load a KDE XML syntax definition file,
+ which will be used for syntax highlighting of appropriately
+ marked code blocks. This can be used to add support for
+ new languages or to use altered syntax definitions for
+ existing languages.
+
`-H` *FILE*, `--include-in-header=`*FILE*
: Include contents of *FILE*, verbatim, at the end of the header.
@@ -632,6 +746,25 @@ General writer options
repeatedly to include multiple files. They will be included in the
order specified. Implies `--standalone`.
+`--resource-path=`*SEARCHPATH*
+
+: List of paths to search for images and other resources.
+ The paths should be separated by `:` on Linux, UNIX, and
+ macOS systems, and by `;` on Windows. If `--resource-path`
+ is not specified, the default resource path is the working
+ directory. Note that, if `--resource-path` is specified,
+ the working directory must be explicitly listed or it
+ will not be searched. For example:
+ `--resource-path=.:test` will search the working directory
+ and the `test` subdirectory, in that order.
+
+`--request-header=`*NAME*`:`*VAL*
+
+: Set the request header *NAME* to the value *VAL* when making
+ HTTP requests (for example, when a URL is given on the
+ command line, or when resources used in a document must be
+ downloaded).
+
Options affecting specific writers
----------------------------------
@@ -639,19 +772,22 @@ Options affecting specific writers
: Produce a standalone HTML file with no external dependencies, using
`data:` URIs to incorporate the contents of linked scripts, stylesheets,
- images, and videos. The resulting file should be "self-contained,"
- in the sense that it needs no external files and no net access to be
- displayed properly by a browser. This option works only with HTML output
- formats, including `html`, `html5`, `html+lhs`, `html5+lhs`, `s5`,
- `slidy`, `slideous`, `dzslides`, and `revealjs`. Scripts, images, and
- stylesheets at absolute URLs will be downloaded; those at relative URLs
- will be sought relative to the working directory (if the first source
+ images, and videos. Implies `--standalone`. The resulting file should be
+ "self-contained," in the sense that it needs no external files and no net
+ access to be displayed properly by a browser. This option works only with
+ HTML output formats, including `html4`, `html5`, `html+lhs`, `html5+lhs`,
+ `s5`, `slidy`, `slideous`, `dzslides`, and `revealjs`. Scripts, images,
+ and stylesheets at absolute URLs will be downloaded; those at relative
+ URLs will be sought relative to the working directory (if the first source
file is local) or relative to the base URL (if the first source
- file is remote). Limitation: resources that are loaded dynamically
- through JavaScript cannot be incorporated; as a result, `--self-contained`
- does not work with `--mathjax`, and some advanced features (e.g.
- zoom or speaker notes) may not work in an offline "self-contained"
- `reveal.js` slide show.
+ file is remote). Elements with the attribute
+ `data-external="1"` will be left alone; the documents they
+ link to will not be incorporated in the document.
+ Limitation: resources that are loaded dynamically through
+ JavaScript cannot be incorporated; as a result,
+ `--self-contained` does not work with `--mathjax`, and some
+ advanced features (e.g. zoom or speaker notes) may not work
+ in an offline "self-contained" `reveal.js` slide show.
`--html-q-tags`
@@ -659,8 +795,8 @@ Options affecting specific writers
`--ascii`
-: Use only ASCII characters in output. Currently supported only
- for HTML output (which uses numerical entities instead of
+: Use only ASCII characters in output. Currently supported only for
+ HTML and DocBook output (which uses numerical entities instead of
UTF-8 when this option is selected).
`--reference-links`
@@ -681,10 +817,7 @@ Options affecting specific writers
: Use ATX-style headers in Markdown and AsciiDoc output. The default is
to use setext-style headers for levels 1-2, and then ATX headers.
-
-`--chapters`
-
-: Deprecated synonym for `--top-level-division=chapter`.
+ (Note: for `gfm` output, ATX headers are always used.)
`--top-level-division=[default|section|chapter|part]`
@@ -717,22 +850,6 @@ Options affecting specific writers
be numbered "1.5", specify `--number-offset=1,4`.
Offsets are 0 by default. Implies `--number-sections`.
-`--no-tex-ligatures`
-
-: Do not use the TeX ligatures for quotation marks, apostrophes,
- and dashes (`` `...' ``, ` ``..'' `, `--`, `---`) when
- writing or reading LaTeX or ConTeXt. In reading LaTeX,
- parse the characters `` ` ``, `'`, and `-` literally, rather
- than parsing ligatures for quotation marks and dashes. In
- writing LaTeX or ConTeXt, print unicode quotation mark and
- dash characters literally, rather than converting them to
- the standard ASCII TeX ligatures. Note: normally `--smart`
- is selected automatically for LaTeX and ConTeXt output, but
- it must be specified explicitly if `--no-tex-ligatures` is
- selected. If you use literal curly quotes, dashes, and
- ellipses in your source, then you may want to use
- `--no-tex-ligatures` without `--smart`.
-
`--listings`
: Use the [`listings`] package for LaTeX code blocks
@@ -748,14 +865,16 @@ Options affecting specific writers
slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headers
above this level in the hierarchy are used to divide the
slide show into sections; headers below this level create
- subheads within a slide. The default is to set the slide level
- based on the contents of the document; see
- [Structuring the slide show].
+ subheads within a slide. Note that content that is
+ not contained under slide-level headers 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].
`--section-divs`
-: Wrap sections in `<div>` tags (or `<section>` tags in HTML5),
- and attach identifiers to the enclosing `<div>` (or `<section>`)
+: Wrap sections in `<section>` tags (or `<div>` tags for `html4`),
+ and attach identifiers to the enclosing `<section>` (or `<div>`)
rather than the header itself. See
[Header identifiers], below.
@@ -769,10 +888,10 @@ Options affecting specific writers
`--id-prefix=`*STRING*
-: Specify a prefix to be added to all automatically generated identifiers
- in HTML and DocBook output, and to footnote numbers in Markdown output.
- This is useful for preventing duplicate identifiers when generating
- fragments to be included in other pages.
+: Specify a prefix to be added to all identifiers and internal links
+ in HTML and DocBook output, and to footnote numbers in Markdown
+ and Haddock output. This is useful for preventing duplicate
+ identifiers when generating fragments to be included in other pages.
`-T` *STRING*, `--title-prefix=`*STRING*
@@ -786,59 +905,87 @@ Options affecting specific writers
: Link to a CSS style sheet. This option can be used repeatedly to
include multiple files. They will be included in the order specified.
-`--reference-odt=`*FILE*
-
-: Use the specified file as a style reference in producing an ODT.
- For best results, the reference ODT should be a modified version
- of an ODT produced using pandoc. The contents of the reference ODT
- are ignored, but its stylesheets are used in the new ODT. If no
- reference ODT is specified on the command line, pandoc will look
- for a file `reference.odt` in the user data directory (see
- `--data-dir`). If this is not found either, sensible defaults will be
- used.
-
- To produce a custom `reference.odt`, first get a copy of
- the default `reference.odt`: `pandoc
- --print-default-data-file reference.odt >
- custom-reference.odt`. Then open `custom-reference.docx` in
- LibreOffice, modify the styles as you wish, and save the
- file.
-
-`--reference-docx=`*FILE*
-
-: Use the specified file as a style reference in producing a docx file.
- For best results, the reference docx should be a modified version
- of a docx file produced using pandoc. The contents of the reference docx
- are ignored, but its stylesheets and document properties (including
- margins, page size, header, and footer) are used in the new docx. If no
- reference docx is specified on the command line, pandoc will look
- for a file `reference.docx` in the user data directory (see
- `--data-dir`). If this is not found either, sensible defaults will be
- used.
-
- To produce a custom `reference.docx`, first get a copy of
- the default `reference.docx`: `pandoc
- --print-default-data-file reference.docx >
- custom-reference.docx`. Then open `custom-reference.docx`
- in Word, modify the styles as you wish, and save the file.
- For best results, do not make changes to this file other
- than modifying the styles used by pandoc: [paragraph] Normal,
- Body Text, First Paragraph, Compact, Title, Subtitle,
- Author, Date, Abstract, Bibliography, Heading 1, Heading 2,
- Heading 3, Heading 4, Heading 5, Heading 6, Block Text,
- Footnote Text, Definition Term, Definition, Caption, Table
- Caption, Image Caption, Figure, Figure With Caption, TOC
- Heading; [character] Default Paragraph Font, Body Text Char,
- Verbatim Char, Footnote Reference, Hyperlink; [table] Normal
- Table.
-
-`--epub-stylesheet=`*FILE*
-
-: Use the specified CSS file to style the EPUB. If no stylesheet
- is specified, pandoc will look for a file `epub.css` in the
+ A stylesheet is required for generating EPUB. If none is
+ provided using this option (or the `stylesheet` metadata
+ field), pandoc will look for a file `epub.css` in the
user data directory (see `--data-dir`). If it is not
found there, sensible defaults will be used.
+`--reference-doc=`*FILE*
+
+: Use the specified file as a style reference in producing a
+ docx or ODT file.
+
+ Docx
+
+ : For best results, the reference docx should be a modified
+ version of a docx file produced using pandoc. The contents
+ of the reference docx are ignored, but its stylesheets and
+ document properties (including margins, page size, header,
+ and footer) are used in the new docx. If no reference docx
+ is specified on the command line, pandoc will look for a
+ file `reference.docx` in the user data directory (see
+ `--data-dir`). If this is not found either, sensible
+ defaults will be used.
+
+ To produce a custom `reference.docx`, first get a copy of
+ the default `reference.docx`: `pandoc
+ --print-default-data-file reference.docx >
+ custom-reference.docx`. Then open `custom-reference.docx`
+ in Word, modify the styles as you wish, and save the file.
+ For best results, do not make changes to this file other
+ than modifying the styles used by pandoc: [paragraph]
+ Normal, Body Text, First Paragraph, Compact, Title,
+ Subtitle, Author, Date, Abstract, Bibliography, Heading 1,
+ Heading 2, Heading 3, Heading 4, Heading 5, Heading 6,
+ Heading 7, Heading 8, Heading 9, Block Text, Footnote Text,
+ Definition Term, Definition, Caption, Table Caption,
+ Image Caption, Figure, Captioned Figure, TOC Heading;
+ [character] Default Paragraph Font, Body Text Char,
+ Verbatim Char, Footnote Reference, Hyperlink; [table]
+ Table.
+
+ ODT
+
+ : For best results, the reference ODT should be a modified
+ version of an ODT produced using pandoc. The contents of
+ the reference ODT are ignored, but its stylesheets are used
+ in the new ODT. If no reference ODT is specified on the
+ command line, pandoc will look for a file `reference.odt` in
+ the user data directory (see `--data-dir`). If this is not
+ found either, sensible defaults will be used.
+
+ To produce a custom `reference.odt`, first get a copy of
+ the default `reference.odt`: `pandoc
+ --print-default-data-file reference.odt >
+ custom-reference.odt`. Then open `custom-reference.odt` in
+ LibreOffice, modify the styles as you wish, and save the
+ file.
+
+ PowerPoint
+
+ : Any template included with a recent install of Microsoft
+ PowerPoint (either with `.pptx` or `.potx` extension) should
+ work, as will most templates derived from these.
+
+ The specific requirement is that the template should contain
+ the following four layouts as its first four layouts:
+
+ 1. Title Slide
+ 2. Title and Content
+ 3. Section Header
+ 4. Two Content
+
+ All templates included with a recent version of MS PowerPoint
+ will fit these criteria. (You can click on `Layout` under the
+ `Home` menu to check.)
+
+ You can also modify the default `reference.pptx`: first run
+ `pandoc --print-default-data-file reference.pptx >
+ custom-reference.pptx`, and then modify
+ `custom-reference.pptx` in MS PowerPoint (pandoc will use the
+ first four layout slides, as mentioned above).
+
`--epub-cover-image=`*FILE*
: Use the specified image as the EPUB cover. It is recommended
@@ -875,7 +1022,7 @@ Options affecting specific writers
line, be sure to escape them or put the whole filename in single quotes,
to prevent them from being interpreted by the shell. To use the
embedded fonts, you will need to add declarations like the following
- to your CSS (see `--epub-stylesheet`):
+ to your CSS (see `--css`):
@font-face {
font-family: DejaVuSans;
@@ -913,15 +1060,21 @@ Options affecting specific writers
documents with few level 1 headers, one might want to use a chapter
level of 2 or 3.
-`--latex-engine=pdflatex`|`lualatex`|`xelatex`
+`--epub-subdirectory=`*DIRNAME*
+
+: Specify the subdirectory in the OCF container that is to hold
+ the EPUB-specific contents. The default is `EPUB`. To put
+ the EPUB contents in the top level, use an empty string.
-: Use the specified LaTeX engine when producing PDF output.
+`--pdf-engine=pdflatex`|`lualatex`|`xelatex`|`wkhtmltopdf`|`weasyprint`|`prince`|`context`|`pdfroff`
+
+: Use the specified engine when producing PDF output.
The default is `pdflatex`. If the engine is not in your PATH,
the full path of the engine may be specified here.
-`--latex-engine-opt=`*STRING*
+`--pdf-engine-opt=`*STRING*
-: Use the given string as a command-line argument to the `latex-engine`.
+: Use the given string as a command-line argument to the `pdf-engine`.
If used multiple times, the arguments are provided with spaces between
them. Note that no check for duplicate options is done.
@@ -971,55 +1124,37 @@ Citation rendering
Math rendering in HTML
----------------------
-`-m` [*URL*], `--latexmathml`[`=`*URL*]
-
-: Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
- To insert a link to a local copy of the `LaTeXMathML.js` script,
- provide a *URL*. If no *URL* is provided, the contents of the
- script will be inserted directly into the HTML header, preserving
- portability at the price of efficiency. If you plan to use math on
- several pages, it is much better to link to a copy of the script,
- so it can be cached.
-
-`--mathml`[`=`*URL*]
-
-: Convert TeX math to [MathML] (in `docbook`, `docbook5`, `html` and `html5`).
- In standalone `html` output, a small JavaScript (or a link to such a
- script if a *URL* is supplied) will be inserted that allows the MathML to
- be viewed on some browsers.
-
-`--jsmath`[`=`*URL*]
-
-: Use [jsMath] to display embedded TeX math in HTML output.
- The *URL* should point to the jsMath load script (e.g.
- `jsMath/easy/load.js`); if provided, it will be linked to in
- the header of standalone HTML documents. If a *URL* is not provided,
- no link to the jsMath load script will be inserted; it is then
- up to the author to provide such a link in the HTML template.
+The default is to render TeX math as far as possible using Unicode characters.
+Formulas are put inside a `span` with `class="math"`, so that they may be styled
+differently from the surrounding text if needed. However, this gives acceptable
+results only for basic math, usually you will want to use `--mathjax` or another
+of the following options.
`--mathjax`[`=`*URL*]
: Use [MathJax] to display embedded TeX math in HTML output.
+ TeX math will be put between `\(...\)` (for inline math)
+ or `\[...\]` (for display math) and wrapped in `<span>` tags
+ with class `math`. Then the MathJax JavaScript will render it.
The *URL* should point to the `MathJax.js` load script.
- If a *URL* is not provided, a link to the MathJax CDN will
+ If a *URL* is not provided, a link to the Cloudflare CDN will
be inserted.
-`--gladtex`
-
-: Enclose TeX math in `<eq>` tags in HTML output. These can then
- be processed by [gladTeX] to produce links to images of the typeset
- formulas.
-
-`--mimetex`[`=`*URL*]
+`--mathml`
-: Render TeX math using the [mimeTeX] CGI script. If *URL* is not
- specified, it is assumed that the script is at `/cgi-bin/mimetex.cgi`.
+: Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`,
+ `html4` and `html5`). This is the default in `odt` output. Note that
+ currently only Firefox and Safari (and select e-book readers) natively
+ support MathML.
`--webtex`[`=`*URL*]
-: Render TeX formulas using an external script that converts TeX
- formulas to images. The formula will be concatenated with the URL
- provided. If *URL* is not specified, the CodeCogs will be used.
+: Convert TeX formulas to `<img>` tags that link to an external script
+ that converts formulas to images. The formula will be URL-encoded
+ and concatenated with the URL provided. For SVG images you can for
+ example use `--webtex https://latex.codecogs.com/svg.latex?`.
+ If no URL is specified, the CodeCogs URL generating PNGs
+ will be used (`https://latex.codecogs.com/png.latex?`).
Note: the `--webtex` option will affect Markdown output
as well as HTML, which is useful if you're targeting a
version of Markdown without native math support.
@@ -1027,9 +1162,8 @@ Math rendering in HTML
`--katex`[`=`*URL*]
: Use [KaTeX] to display embedded TeX math in HTML output.
- The *URL* should point to the `katex.js` load script. If a *URL* is
+ The *URL* is the base URL for the KaTeX library. If a *URL* is
not provided, a link to the KaTeX CDN will be inserted.
- Note: [KaTeX] seems to work best with `html5` output.
`--katex-stylesheet=`*URL*
@@ -1037,6 +1171,48 @@ Math rendering in HTML
not specified, a link to the KaTeX CDN will be inserted. Note that this
option does not imply `--katex`.
+`-m` [*URL*], `--latexmathml`[`=`*URL*]
+
+: *Deprecated.*
+ Use the [LaTeXMathML] script to display embedded TeX math in HTML output.
+ TeX math will be displayed between `$` or `$$` characters and put in
+ `<span>` tags with class `LaTeX`. The LaTeXMathML JavaScript will then
+ change it to MathML. Note that currently only Firefox and Safari
+ (and select e-book readers) natively support MathML.
+ To insert a link the `LaTeXMathML.js` script, provide a *URL*.
+
+`--jsmath`[`=`*URL*]
+
+: *Deprecated.*
+ Use [jsMath] (the predecessor of MathJax) to display embedded TeX
+ math in HTML output. TeX math will be put inside `<span>` tags
+ (for inline math) or `<div>` tags (for display math) with class
+ `math` and rendered by the jsMath script. The *URL* should point to
+ the script (e.g. `jsMath/easy/load.js`); if provided, it will be linked
+ to in the header of standalone HTML documents. If a *URL* is not provided,
+ no link to the jsMath load script will be inserted; it is then
+ up to the author to provide such a link in the HTML template.
+
+`--gladtex`
+
+: *Deprecated.*
+ Enclose TeX math in `<eq>` tags in HTML output. The resulting HTML
+ can then be processed by [gladTeX] to produce images of the typeset
+ formulas and an HTML file with links to these images.
+ So, the procedure is:
+
+ pandoc -s --gladtex input.md -o myfile.htex
+ gladtex -d myfile-images myfile.htex
+ # produces myfile.html and images in myfile-images
+
+`--mimetex`[`=`*URL*]
+
+: *Deprecated.*
+ Render TeX math using the [mimeTeX] CGI script, which generates an
+ image for each TeX formula. This should work in all browsers. If
+ *URL* is not specified, it is assumed that the script is at
+ `/cgi-bin/mimetex.cgi`.
+
[MathML]: http://www.w3.org/Math/
[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/
[jsMath]: http://www.math.union.edu/~dpvc/jsmath/
@@ -1088,10 +1264,11 @@ directory (see `--data-dir`, above). *Exceptions:*
- For `odt` output, customize the `default.opendocument`
template.
- For `pdf` output, customize the `default.latex` template
- (or the `default.beamer` template, if you use `-t beamer`,
- or the `default.context` template, if you use `-t context`).
+ (or the `default.context` template, if you use `-t context`,
+ or the `default.ms` template, if you use `-t ms`, or the
+ `default.html5` template, if you use `-t html5`).
- `docx` has no template (however, you can use
- `--reference-docx` to customize the output).
+ `--reference-doc` to customize the output).
Templates contain *variables*, which allow for the inclusion of
arbitrary information at any point in the file. Variables may be set
@@ -1107,6 +1284,22 @@ Some variables are set automatically by pandoc. These vary somewhat
depending on the output format, but include metadata fields as well
as the following:
+`sourcefile`, `outputfile`
+: source and destination filenames, as given on the command line.
+ `sourcefile` can also be a list if input comes from multiple files, or empty
+ if input is from stdin. You can use the following snippet in your template
+ to distinguish them:
+
+ $if(sourcefile)$
+ $for(sourcefile)$
+ $sourcefile$
+ $endfor$
+ $else$
+ (stdin)
+ $endif$
+
+ Similarly, `outputfile` can be `-` if output goes to the terminal.
+
`title`, `author`, `date`
: allow identification of basic aspects of the document. Included
in PDF metadata through LaTeX and ConTeXt. These can be set
@@ -1144,7 +1337,8 @@ as the following:
: non-null value if `--toc/--table-of-contents` was specified
`toc-title`
-: title of table of contents (works only with EPUB and docx)
+: title of table of contents (works only with EPUB,
+ opendocument, odt, docx, pptx)
`include-before`
: contents specified by `-B/--include-before-body` (may have
@@ -1158,7 +1352,8 @@ as the following:
: body of document
`meta-json`
-: JSON representation of all of the document's metadata
+: JSON representation of all of the document's metadata. Field
+ values are transformed to the selected output format.
[^subtitle]: To make `subtitle` work with other LaTeX
document classes, you can add the following to `header-includes`:
@@ -1179,21 +1374,12 @@ Language variables
format stored in the additional variables `babel-lang`,
`polyglossia-lang` (LaTeX) and `context-lang` (ConTeXt).
- Native pandoc `span`s and `div`s with the lang attribute
+ Native pandoc Spans and Divs with the lang attribute
(value in BCP 47) can be used to switch the language in
- that range.
-
-`otherlangs`
-: a list of other languages used in the document
- in the YAML metadata, according to [BCP 47]. For example:
- `otherlangs: [en-GB, fr]`.
- This is automatically generated from the `lang` attributes
- in all `span`s and `div`s but can be overridden.
- Currently only used by LaTeX through the generated
- `babel-otherlangs` and `polyglossia-otherlangs` variables.
- The LaTeX writer outputs polyglossia commands in the text but
- the `babel-newcommands` variable contains mappings for them
- to the corresponding babel.
+ that range. In LaTeX output, `babel-otherlangs` and
+ `polyglossia-otherlangs` variables will be generated
+ automatically based on the `lang` attributes of Spans
+ and Divs in the document.
`dir`
: the base direction of the document, either `rtl` (right-to-left)
@@ -1207,7 +1393,7 @@ Language variables
[Unicode Bidirectional Algorithm].
When using LaTeX for bidirectional documents, only the `xelatex` engine
- is fully supported (use `--latex-engine=xelatex`).
+ is fully supported (use `--pdf-engine=xelatex`).
[BCP 47]: https://tools.ietf.org/html/bcp47
[Unicode Bidirectional Algorithm]: http://www.w3.org/International/articles/inline-bidi-markup/uba-basics
@@ -1218,9 +1404,15 @@ Variables for slides
Variables are available for [producing slide shows with pandoc],
including all [reveal.js configuration options].
+`titlegraphic`
+: title graphic for Beamer documents
+
+`logo`
+: logo for Beamer documents
+
`slidy-url`
: base URL for Slidy documents (defaults to
- `http://www.w3.org/Talks/Tools/Slidy2`)
+ `https://www.w3.org/Talks/Tools/Slidy2`)
`slideous-url`
: base URL for Slideous documents (defaults to `slideous`)
@@ -1250,13 +1442,10 @@ including all [reveal.js configuration options].
: when true, the `beamerarticle` package is loaded (for
producing an article from beamer slides).
-`colorlinks`
-: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`,
- `urlcolor`, or `toccolor` are set (for beamer only).
-
-`linkcolor`, `citecolor`, `urlcolor`, `toccolor`
-: color for internal links, citation links, external links, and links in table
- of contents: uses any of the [predefined LaTeX colors] (for beamer only).
+`aspectratio`
+: aspect ratio of slides (for beamer only, `1610` for 16:10, `169` for 16:9,
+ `149` for 14:9, `141` for 1.41:1, `54` for 5:4, `43` for 4:3 which is the
+ default, and `32` for 3:2).
[reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration
@@ -1266,7 +1455,7 @@ Variables for LaTeX
LaTeX variables are used when [creating a PDF].
`papersize`
-: paper size, e.g. `letter`, `A4`
+: paper size, e.g. `letter`, `a4`
`fontsize`
: font size for body text (e.g. `10pt`, `12pt`)
@@ -1325,7 +1514,7 @@ LaTeX variables are used when [creating a PDF].
`linkcolor`, `citecolor`, `urlcolor`, `toccolor`
: color for internal links, citation links, external links, and links in table of contents:
- uses any of the [predefined LaTeX colors]
+ uses options allowed by [`xcolor`], including the `dvipsnames`, `svgnames`, and `x11names` lists
`links-as-notes`
: causes links to be printed as footnotes
@@ -1365,12 +1554,20 @@ LaTeX variables are used when [creating a PDF].
`biblatexoptions`
: list of options for biblatex.
+`natbiboptions`
+: list of options for natbib.
+
+`pagestyle`
+: An option for LaTeX's `\pagestyle{}`. The default article class
+ supports 'plain' (default), 'empty', and 'headings'; headings puts
+ section titles in the header.
+
[`article`]: https://ctan.org/pkg/article
[`report`]: https://ctan.org/pkg/report
[`book`]: https://ctan.org/pkg/book
[KOMA-Script]: https://ctan.org/pkg/koma-script
[`memoir`]: https://ctan.org/pkg/memoir
-[predefined LaTeX colors]: https://en.wikibooks.org/wiki/LaTeX/Colors#Predefined_colors
+[`xcolor`]: https://ctan.org/pkg/xcolor
[LaTeX Font Catalogue]: http://www.tug.dk/FontCatalogue/
[`mathpazo`]: https://ctan.org/pkg/mathpazo
[LaTeX font encodings]: https://ctan.org/pkg/encguide
@@ -1456,6 +1653,21 @@ Variables for man pages
`hyphenate`
: if `true` (the default), hyphenation will be used
+Variables for ms
+----------------
+
+`pointsize`
+: point size (e.g. `10p`)
+
+`lineheight`
+: line height (e.g. `12p`)
+
+`fontfamily`
+: font family (e.g. `T` or `P`)
+
+`indent`
+: paragraph indent (e.g. `2m`)
+
Using variables in templates
----------------------------
@@ -1505,8 +1717,292 @@ and modifying your custom templates accordingly. An easy way to do this
is to fork the [pandoc-templates] repository and merge in changes after each
pandoc release.
+Templates may contain comments: anything on a line after `$--`
+will be treated as a comment and ignored.
+
[pandoc-templates]: https://github.com/jgm/pandoc-templates
+Extensions
+==========
+
+The behavior of some of the readers and writers can be adjusted by
+enabling or disabling various extensions.
+
+An extension can be enabled by adding `+EXTENSION`
+to the format name and disabled by adding `-EXTENSION`. For example,
+`--from markdown_strict+footnotes` is strict Markdown with footnotes
+enabled, while `--from markdown-footnotes-pipe_tables` is pandoc's
+Markdown 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's Markdown] below (See [Markdown variants] for
+`commonmark` and `gfm`.) In the following, extensions that also work
+for other formats are covered.
+
+Typography
+----------
+
+#### Extension: `smart` ####
+
+Interpret straight quotes as curly quotes, `---` as em-dashes,
+`--` as en-dashes, and `...` as ellipses. Nonbreaking spaces are
+inserted after certain abbreviations, such as "Mr."
+
+This extension can be enabled/disabled for the following formats:
+
+input formats
+: `markdown`, `commonmark`, `latex`, `mediawiki`, `org`, `rst`, `twiki`
+
+output formats
+: `markdown`, `latex`, `context`, `rst`
+
+enabled by default in
+: `markdown`, `latex`, `context` (both input and output)
+
+Note: If you are *writing* Markdown, then the `smart` extension
+has the reverse effect: what would have been curly quotes comes
+out straight.
+
+In LaTeX, `smart` means to use the standard TeX ligatures
+for quotation marks (` `` ` and ` '' ` for double quotes,
+`` ` `` and `` ' `` for single quotes) and dashes (`--` for
+en-dash and `---` for em-dash). If `smart` is disabled,
+then in reading LaTeX pandoc will parse these characters
+literally. In writing LaTeX, enabling `smart` tells pandoc
+to use the ligatures when possible; if `smart` is disabled
+pandoc will use unicode quotation mark and dash characters.
+
+Headers and sections
+--------------------
+
+#### Extension: `auto_identifiers` ####
+
+A header without an explicitly specified identifier will be
+automatically assigned a unique identifier based on the header text.
+
+This extension can be enabled/disabled for the following formats:
+
+input formats
+: `markdown`, `latex`, `rst`, `mediawiki`, `textile`
+
+output formats
+: `markdown`, `muse`
+
+enabled by default in
+: `markdown`, `muse`
+
+The algorithm used to derive the identifier from the header text is:
+
+ - Remove all formatting, links, etc.
+ - Remove all footnotes.
+ - Remove all punctuation, except underscores, hyphens, and periods.
+ - Replace all spaces and newlines with hyphens.
+ - Convert all alphabetic characters to lowercase.
+ - Remove everything up to the first letter (identifiers may
+ not begin with a number or punctuation mark).
+ - If nothing is left after this, use the identifier `section`.
+
+Thus, for example,
+
+ Header Identifier
+ ------------------------------- ----------------------------
+ `Header identifiers in HTML` `header-identifiers-in-html`
+ `*Dogs*?--in *my* house?` `dogs--in-my-house`
+ `[HTML], [S5], or [RTF]?` `html-s5-or-rtf`
+ `3. Applications` `applications`
+ `33` `section`
+
+These rules should, in most cases, allow one to determine the identifier
+from the header text. The exception is when several headers have the
+same text; in this case, the first will get an identifier as described
+above; the second will get the same identifier with `-1` appended; the
+third with `-2`; and so on.
+
+These identifiers are used to provide link targets in the table of
+contents generated by the `--toc|--table-of-contents` option. They
+also make it easy to provide links from one section of a document to
+another. A link to this section, for example, might look like this:
+
+ See the section on
+ [header identifiers](#header-identifiers-in-html-latex-and-context).
+
+Note, however, that this method of providing links to sections works
+only in HTML, LaTeX, and ConTeXt formats.
+
+If the `--section-divs` option is specified, then each section will
+be wrapped in a `section` (or a `div`, if `html4` was specified),
+and the identifier will be attached to the enclosing `<section>`
+(or `<div>`) tag rather than the header itself. This allows entire
+sections to be manipulated using JavaScript or treated differently in
+CSS.
+
+#### Extension: `ascii_identifiers` ####
+
+Causes the identifiers produced by `auto_identifiers` to be pure ASCII.
+Accents are stripped off of accented Latin letters, and non-Latin
+letters are omitted.
+
+Math Input
+----------
+
+The extensions [`tex_math_dollars`](#extension-tex_math_dollars),
+[`tex_math_single_backslash`](#extension-tex_math_single_backslash), and
+[`tex_math_double_backslash`](#extension-tex_math_double_backslash)
+are described in the section about Pandoc's Markdown.
+
+However, they can also be used with HTML input. This is handy for
+reading web pages formatted using MathJax, for example.
+
+Raw HTML/TeX
+------------
+
+The following extensions (especially how they affect Markdown
+input/output) are also described in more detail in their respective
+sections of [Pandoc's Markdown].
+
+#### [Extension: `raw_html`] {#raw_html}
+
+When converting from HTML, parse elements to raw HTML which are not
+representable in pandoc's AST.
+By default, this is disabled for HTML input.
+
+#### [Extension: `raw_tex`] {#raw_tex}
+
+Allows raw LaTeX, TeX, and ConTeXt to be included in a document.
+
+This extension can be enabled/disabled for the following formats
+(in addition to `markdown`):
+
+input formats
+: `latex`, `org`, `textile`
+
+output formats
+: `textile`
+
+#### [Extension: `native_divs`] {#native_divs}
+
+This extension is enabled by default for HTML input. This means that
+`div`s are parsed to pandoc native elements. (Alternatively, you
+can parse them to raw HTML using `-f html-native_divs+raw_html`.)
+
+When converting HTML to Markdown, for example, you may want to drop all
+`div`s and `span`s:
+
+ pandoc -f html-native_divs-native_spans -t markdown
+
+#### [Extension: `native_spans`] {#native_spans}
+
+Analogous to `native_divs` above.
+
+
+Literate Haskell support
+------------------------
+
+#### Extension: `literate_haskell` ####
+
+Treat the document as literate Haskell source.
+
+This extension can be enabled/disabled for the following formats:
+
+input formats
+: `markdown`, `rst`, `latex`
+
+output formats
+: `markdown`, `rst`, `latex`, `html`
+
+If you append `+lhs` (or `+literate_haskell`) to one of the formats
+above, pandoc will treat the document as literate Haskell source.
+This means that
+
+ - In Markdown input, "bird track" sections will be parsed as Haskell
+ code rather than block quotations. Text between `\begin{code}`
+ and `\end{code}` will also be treated as Haskell code. For
+ ATX-style headers the character '=' will be used instead of '#'.
+
+ - In Markdown output, code blocks with classes `haskell` and `literate`
+ will be rendered using bird tracks, and block quotations will be
+ indented one space, so they will not be treated as Haskell code.
+ In addition, headers will be rendered setext-style (with underlines)
+ rather than ATX-style (with '#' characters). (This is because ghc
+ treats '#' characters in column 1 as introducing line numbers.)
+
+ - In restructured text input, "bird track" sections will be parsed
+ as Haskell code.
+
+ - In restructured text output, code blocks with class `haskell` will
+ be rendered using bird tracks.
+
+ - In LaTeX input, text in `code` environments will be parsed as
+ Haskell code.
+
+ - In LaTeX output, code blocks with class `haskell` will be rendered
+ inside `code` environments.
+
+ - In HTML output, code blocks with class `haskell` will be rendered
+ with class `literatehaskell` and bird tracks.
+
+Examples:
+
+ pandoc -f markdown+lhs -t html
+
+reads literate Haskell source formatted with Markdown conventions and writes
+ordinary HTML (without bird tracks).
+
+ pandoc -f markdown+lhs -t html+lhs
+
+writes HTML with the Haskell code in bird tracks, so it can be copied
+and pasted as literate Haskell source.
+
+Note that GHC expects the bird tracks in the first column, so indentend literate
+code blocks (e.g. inside an itemized environment) will not be picked up by the
+Haskell compiler.
+
+Other extensions
+----------------
+
+#### Extension: `empty_paragraphs` ####
+
+Allows empty paragraphs. By default empty paragraphs are
+omitted.
+
+This extension can be enabled/disabled for the following formats:
+
+input formats
+: `docx`, `html`
+
+output formats
+: `markdown`, `docx`, `odt`, `opendocument`, `html`
+
+#### Extension: `styles` #### {#ext-styles}
+
+Read all docx styles as divs (for paragraph styles) and spans (for
+character styles) regardless of whether pandoc understands the meaning
+of these styles. This can be used with [docx custom
+styles](#custom-styles-in-docx). Disabled by default.
+
+input formats
+: `docx`
+
+#### Extension: `amuse` ####
+
+In the `muse` input format, this enables Text::Amuse
+extensions to Emacs Muse markup.
+
+#### Extension: `citations` {#org-citations}
+
+Some aspects of [Pandoc's Markdown citation syntax](#citations) are also accepted
+in `org` input.
+
+#### Extension: `ntb` ####
+
+In the `context` output format this enables the use of [Natural Tables
+(TABLE)](http://wiki.contextgarden.net/TABLE) instead of the default
+[Extreme Tables (xtables)](http://wiki.contextgarden.net/xtables).
+Natural tables allow more fine-grained global customization but come
+at a performance penalty compared to extreme tables.
+
+
Pandoc's Markdown
=================
@@ -1514,11 +2010,9 @@ Pandoc understands an extended and slightly revised version of
John Gruber's [Markdown] syntax. This document explains the syntax,
noting differences from standard Markdown. Except where noted, these
differences can be suppressed by using the `markdown_strict` format instead
-of `markdown`. An extensions can be enabled by adding `+EXTENSION`
-to the format name and disabled by adding `-EXTENSION`. For example,
-`markdown_strict+footnotes` is strict Markdown with footnotes
-enabled, while `markdown-footnotes-pipe_tables` is pandoc's
-Markdown without footnotes or pipe tables.
+of `markdown`. Extensions can be enabled or disabled to specify the
+behavior more granularly. They are described in the following. See also
+[Extensions] above, for extensions that work also on other formats.
Philosophy
----------
@@ -1601,9 +2095,17 @@ wrapping). Consider, for example:
I like several of their flavors of ice cream:
#22, for example, and #5.
+#### Extension: `space_in_atx_header` ####
+
+Many Markdown implementations do not require a space between the
+opening `#`s of an ATX header and the header text, so that
+`#5 bolt` and `#hashtag` count as headers. With this extension,
+pandoc does require the space.
### Header identifiers ###
+See also the [`auto_identifiers` extension](#extension-auto_identifiers) above.
+
#### Extension: `header_attributes` ####
Headers can be assigned attributes using this syntax at the end
@@ -1640,55 +2142,6 @@ is just the same as
# My header {.unnumbered}
-#### Extension: `auto_identifiers` ####
-
-A header without an explicitly specified identifier will be
-automatically assigned a unique identifier based on the header text.
-To derive the identifier from the header text,
-
- - Remove all formatting, links, etc.
- - Remove all footnotes.
- - Remove all punctuation, except underscores, hyphens, and periods.
- - Replace all spaces and newlines with hyphens.
- - Convert all alphabetic characters to lowercase.
- - Remove everything up to the first letter (identifiers may
- not begin with a number or punctuation mark).
- - If nothing is left after this, use the identifier `section`.
-
-Thus, for example,
-
- Header Identifier
- ------------------------------- ----------------------------
- `Header identifiers in HTML` `header-identifiers-in-html`
- `*Dogs*?--in *my* house?` `dogs--in-my-house`
- `[HTML], [S5], or [RTF]?` `html-s5-or-rtf`
- `3. Applications` `applications`
- `33` `section`
-
-These rules should, in most cases, allow one to determine the identifier
-from the header text. The exception is when several headers have the
-same text; in this case, the first will get an identifier as described
-above; the second will get the same identifier with `-1` appended; the
-third with `-2`; and so on.
-
-These identifiers are used to provide link targets in the table of
-contents generated by the `--toc|--table-of-contents` option. They
-also make it easy to provide links from one section of a document to
-another. A link to this section, for example, might look like this:
-
- See the section on
- [header identifiers](#header-identifiers-in-html-latex-and-context).
-
-Note, however, that this method of providing links to sections works
-only in HTML, LaTeX, and ConTeXt formats.
-
-If the `--section-divs` option is specified, then each section will
-be wrapped in a `div` (or a `section`, if `--html5` was specified),
-and the identifier will be attached to the enclosing `<div>`
-(or `<section>`) tag rather than the header itself. This allows entire
-sections to be manipulated using JavaScript or treated differently in
-CSS.
-
#### Extension: `implicit_header_references` ####
Pandoc behaves as if reference links have been defined for each header.
@@ -1846,11 +2299,11 @@ this syntax:
Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and
`startFrom` is an attribute with value `100`. Some output formats can use this
information to do syntax highlighting. Currently, the only output formats
-that uses this information are HTML and LaTeX. 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
-`pandoc --list-highlight-languages`.) Otherwise, the code block above will
-appear as follows:
+that uses this information are HTML, 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 `pandoc --list-highlight-languages`.) Otherwise,
+the code block above will appear as follows:
<pre id="mycode" class="haskell numberLines" startFrom="100">
<code>
@@ -1858,6 +2311,12 @@ appear as follows:
</code>
</pre>
+The `numberLines` (or `number-lines`) class will cause the lines
+of the code block to be numbered, starting with `1` or the value
+of the `startFrom` attribute. The `lineAnchors` (or
+`line-anchors`) class will cause the lines to be clickable
+anchors in HTML output.
+
A shortcut form can also be used for specifying the language of
the code block:
@@ -1949,12 +2408,12 @@ But Markdown also allows a "lazy" format:
list item.
* and my second.
-### The four-space rule ###
+### Block content in list items ###
A list item may contain multiple paragraphs and other block-level
content. However, subsequent paragraphs must be preceded by a blank line
-and indented four spaces or a tab. The list will look better if the first
-paragraph is aligned with the rest:
+and indented to line up with the first non-space content after
+the list marker.
* First paragraph.
@@ -1965,19 +2424,29 @@ paragraph is aligned with the rest:
{ code }
+Exception: if the list marker is followed by an indented code
+block, which must begin 5 spaces after the list marker, then
+subsequent paragraphs must begin two columns after the last
+character of the list marker:
+
+ * code
+
+ continuation paragraph
+
List items may include other lists. In this case the preceding blank
-line is optional. The nested list must be indented four spaces or
-one tab:
+line is optional. The nested list must be indented to line up with
+the first non-space character after the list marker of the
+containing list item.
* fruits
- + apples
- - macintosh
- - red delicious
- + pears
- + peaches
+ + apples
+ - macintosh
+ - red delicious
+ + pears
+ + peaches
* vegetables
- + broccoli
- + chard
+ + broccoli
+ + chard
As noted above, Markdown allows you to write list items "lazily," instead of
indenting continuation lines. However, if there are multiple paragraphs or
@@ -1992,21 +2461,6 @@ other blocks in a list item, the first line of each must be indented.
Second paragraph of second
list item.
-**Note:** Although the four-space rule for continuation paragraphs
-comes from the official [Markdown syntax guide], the reference implementation,
-`Markdown.pl`, does not follow it. So pandoc will give different results than
-`Markdown.pl` when authors have indented continuation paragraphs fewer than
-four spaces.
-
-The [Markdown syntax guide] is not explicit whether the four-space
-rule applies to *all* block-level content in a list item; it only
-mentions paragraphs and code blocks. But it implies that the rule
-applies to all block-level content (including nested lists), and
-pandoc interprets it that way.
-
- [Markdown syntax guide]:
- http://daringfireball.net/projects/markdown/syntax#list
-
### Ordered lists ###
Ordered lists work just like bulleted lists, except that the items
@@ -2172,6 +2626,12 @@ document:
The label can be any string of alphanumeric characters, underscores,
or hyphens.
+Note: continuation paragraphs in example lists must always
+be indented four spaces, regardless of the length of the
+list marker. That is, example lists always behave as if the
+`four_space_rule` extension is set. This is because example
+labels tend to be long, and indenting content to the
+first non-space character after the label would be awkward.
### Compact and loose lists ###
@@ -2180,9 +2640,9 @@ cases" involving lists. Consider this source:
+ First
+ Second:
- - Fee
- - Fie
- - Foe
+ - Fee
+ - Fie
+ - Foe
+ Third
@@ -2394,6 +2854,18 @@ For headerless tables, the colons go on the top line instead:
| Right | Left | Centered |
+---------------+---------------+--------------------+
+##### Grid Table Limitations #####
+
+Pandoc does not support grid tables with row spans or column spans.
+This means that neither variable numbers of columns across rows nor
+variable numbers of rows across columns are supported by Pandoc.
+All grid tables must have the same number of columns in each row,
+and the same number of rows in each column. For example, the
+Docutils [sample grid tables] will not render as expected with
+Pandoc.
+
+[sample grid tables]: http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#grid-tables
+
#### Extension: `pipe_tables` ####
@@ -2428,7 +2900,10 @@ and lists, and cannot span multiple lines. If a pipe table contains a
row whose printable content is wider than the column width (see
`--columns`), then the cell contents will wrap, with the
relative cell widths determined by the widths of the separator
-lines.
+lines. (In this case, the table will take up the full text
+width.) If no lines are wider than column width, then
+cell contents will not be wrapped, and the cells will be sized
+to their contents.
Note: pandoc also recognizes pipe tables of the following
form, as can be produced by Emacs' orgtbl-mode:
@@ -2557,7 +3032,7 @@ Note that YAML escaping rules must be followed. Thus, for example,
if a title contains a colon, it must be quoted. The pipe character
(`|`) can be used to begin an indented block that will be interpreted
literally, without need for escaping. This form is necessary
-when the field contains blank lines:
+when the field contains blank lines or block-level formatting:
---
title: 'This is the title: it contains a colon'
@@ -2604,6 +3079,17 @@ template:
$endif$
$endfor$
+Raw content to include in the document's header may be specified
+using `header-includes`; however, it is important to mark up
+this content as raw code for a particular output format, using
+the [`raw_attribute` extension](#extension-raw_attribute)), or it
+will be interpreted as markdown. For example:
+
+ header-includes:
+ - ```{=latex}
+ \let\oldsection\section
+ \renewcommand{\section}[1]{\clearpage\oldsection{#1}}
+ ```
Backslash escapes
-----------------
@@ -2644,20 +3130,6 @@ two trailing spaces on a line.
Backslash escapes do not work in verbatim contexts.
-Smart punctuation
------------------
-
-#### Extension ####
-
-If the `--smart` option is specified, pandoc will produce typographically
-correct output, converting straight quotes to curly quotes, `---` to
-em-dashes, `--` to en-dashes, and `...` to ellipses. Nonbreaking spaces
-are inserted after certain abbreviations, such as "Mr."
-
-Note: if your LaTeX template or any included header file call for the
-[`csquotes`] package, pandoc will detect this automatically and use
-`\enquote{...}` for quoted text.
-
Inline formatting
-----------------
@@ -2746,16 +3218,20 @@ Attributes can be attached to verbatim text, just as with
### Small caps ###
-To write small caps, you can use an HTML span tag:
+To write small caps, use the `smallcaps` class:
- <span style="font-variant:small-caps;">Small caps</span>
+ [Small caps]{.smallcaps}
-(The semicolon is optional and there may be space after the
-colon.) This will work in all output formats that support small caps.
+Or, without the `bracketed_spans` extension:
-Alternatively, you can also use the new `bracketed_spans` syntax:
+ <span class="smallcaps">Small caps</span>
+
+For compatibility with other Markdown flavors, CSS is also supported:
+
+ <span style="font-variant:small-caps;">Small caps</span>
+
+This will work in all output formats that support small caps.
- [Small caps]{style="font-variant:small-caps;"}
Math
----
@@ -2794,10 +3270,13 @@ MediaWiki, DokuWiki
Textile
~ It will be rendered inside `<span class="math">` tags.
-RTF, OpenDocument, ODT
+RTF, OpenDocument
~ It will be rendered, if possible, using Unicode characters,
and will otherwise appear verbatim.
+ODT
+ ~ It will be rendered, if possible, using MathML.
+
DocBook
~ If the `--mathml` flag is used, it will be rendered using MathML
in an `inlineequation` or `informalequation` tag. Otherwise it
@@ -2813,51 +3292,8 @@ FictionBook2
HTML, Slidy, DZSlides, S5, EPUB
~ The way math is rendered in HTML will depend on the
- command-line options selected:
-
- 1. The default is to render TeX math as far as possible using Unicode
- characters, as with RTF, DocBook, and OpenDocument output. Formulas
- are put inside a `span` with `class="math"`, so that they may be
- styled differently from the surrounding text if needed.
-
- 2. If the `--latexmathml` option is used, TeX math will be displayed
- between `$` or `$$` characters and put in `<span>` tags with class `LaTeX`.
- The [LaTeXMathML] script will be used to render it as formulas.
- (This trick does not work in all browsers, but it works in Firefox.
- In browsers that do not support LaTeXMathML, TeX math will appear
- verbatim between `$` characters.)
-
- 3. If the `--jsmath` option is used, TeX math will be put inside
- `<span>` tags (for inline math) or `<div>` tags (for display math)
- with class `math`. The [jsMath] script will be used to render
- it.
-
- 4. If the `--mimetex` option is used, the [mimeTeX] CGI script will
- be called to generate images for each TeX formula. This should
- work in all browsers. The `--mimetex` option takes an optional URL
- as argument. If no URL is specified, it will be assumed that the
- mimeTeX CGI script is at `/cgi-bin/mimetex.cgi`.
-
- 5. If the `--gladtex` option is used, TeX formulas will be enclosed
- in `<eq>` tags in the HTML output. The resulting `htex` file may then
- be processed by [gladTeX], which will produce image files for each
- formula and an HTML file with links to these images. So, the
- procedure is:
-
- pandoc -s --gladtex myfile.txt -o myfile.htex
- gladtex -d myfile-images myfile.htex
- # produces myfile.html and images in myfile-images
-
- 6. If the `--webtex` option is used, TeX formulas will be converted
- to `<img>` tags that link to an external script that converts
- formulas to images. The formula will be URL-encoded and concatenated
- with the URL provided. If no URL is specified, the CodeCogs
- will be used (`https://latex.codecogs.com/png.latex?`).
-
- 7. If the `--mathjax` option is used, TeX math will be displayed
- between `\(...\)` (for inline math) or `\[...\]` (for display
- math) and put in `<span>` tags with class `math`.
- The [MathJax] script will be used to render it as formulas.
+ command-line options selected. Therefore see [Math rendering in HTML]
+ above.
[interpreted text role `:math:`]: http://docutils.sourceforge.net/docs/ref/rst/roles.html#math
@@ -2928,9 +3364,6 @@ For the most part this should give the same output as `raw_html`,
but it makes it easier to write pandoc filters to manipulate groups
of inlines.
-Raw TeX
--------
-
#### Extension: `raw_tex` ####
In addition to raw HTML, pandoc allows raw LaTeX, TeX, and ConTeXt to be
@@ -2955,23 +3388,58 @@ LaTeX, not as Markdown.
Inline LaTeX is ignored in output formats other than Markdown, LaTeX,
Emacs Org mode, and ConTeXt.
+### Generic raw attribute ###
+
+#### Extension: `raw_attribute` ####
+
+Inline spans and fenced code blocks with a special
+kind of attribute will be parsed as raw content with the
+designated format. For example, the following produces a raw
+groff `ms` block:
+
+ ```{=ms}
+ .MYMACRO
+ blah blah
+ ```
+And the following produces a raw `html` inline element:
+
+ This is `<a>html</a>`{=html}
+
+The format name should match the target format name (see
+`-t/--to`, above, for a list, or use `pandoc
+--list-output-formats`).
+
+This extension presupposes that the relevant kind of
+inline code or fenced code block is enabled. Thus, for
+example, to use a raw attribute with a backtick code block,
+`backtick_code_blocks` must be enabled.
+
+The raw attribute cannot be combined with regular attributes.
+
LaTeX macros
------------
#### Extension: `latex_macros` ####
-For output formats other than LaTeX, pandoc will parse LaTeX `\newcommand` and
-`\renewcommand` definitions and apply the resulting macros to all LaTeX
-math. So, for example, the following will work in all output formats,
-not just LaTeX:
+For output formats other than LaTeX, pandoc will parse LaTeX
+macro definitions and apply the resulting macros to all LaTeX
+math and raw LaTeX. So, for example, the following will work in
+all output formats, not just LaTeX:
\newcommand{\tuple}[1]{\langle #1 \rangle}
$\tuple{a, b, c}$
-In LaTeX output, the `\newcommand` definition will simply be passed
-unchanged to the output.
+Note that LaTeX macros will not be applied if they occur
+inside inside a raw span or block marked with the
+[`raw_attribute` extension](#extension-raw_attribute).
+When `latex_macros` is disabled, the raw LaTeX and math will
+not have macros applied. This is usually a better approach when
+you are targeting LaTeX or PDF.
+
+Whether or not `latex_macros` is enabled, the macro definitions
+will still be passed through as raw LaTeX.
Links
-----
@@ -3010,7 +3478,8 @@ definition, which may occur elsewhere in the document (either
before or after the link).
The link consists of link text in square brackets, followed by a label in
-square brackets. (There can be space between the two.) The link definition
+square brackets. (There cannot be space between the two unless the
+`spaced_reference_links` 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
@@ -3095,23 +3564,26 @@ The link text will be used as the image's alt text:
#### Extension: `implicit_figures` ####
-An image occurring by itself in a paragraph will be rendered as
-a figure with a caption.[^5] (In LaTeX, a figure environment will be
-used; in HTML, the image will be placed in a `div` with class
-`figure`, together with a caption in a `p` with class `caption`.)
-The image's alt text will be used as the caption.
+An image with nonempty alt text, occurring by itself in a
+paragraph, will be rendered as a figure with a caption. The
+image's alt text will be used as the caption.
![This is the caption](/url/of/image.png)
-[^5]: This feature is not yet implemented for RTF, OpenDocument, or
- ODT. In those formats, you'll just get an image in a paragraph by
- itself, with no caption.
+How this is rendered depends on the output format. Some output
+formats (e.g. RTF) do not yet support figures. In those
+formats, you'll just get an image in a paragraph by itself, with
+no caption.
If you just want a regular inline image, just make sure it is not
the only thing in the paragraph. One way to do this is to insert a
nonbreaking space after the image:
- ![This image won't be a figure](/url/of/image.png)\
+ ![This image won't be a figure](/url/of/image.png)\
+
+Note that in reveal.js slide shows, an image in a paragraph
+by itself that has the `stretch` class will fill the screen,
+and the caption and figure tags will be omitted.
#### Extension: `link_attributes` ####
@@ -3156,13 +3628,59 @@ For example:
is to look at the image resolution and the dpi metadata embedded in
the image file.
-Spans
------
+Divs and Spans
+--------------
+
+Using the `native_divs` and `native_spans` extensions
+(see [above][Extension: `native_divs`]), HTML syntax can
+be used as part of markdown to create native `Div` and `Span`
+elements in the pandoc AST (as opposed to raw HTML).
+However, there is also nicer syntax available:
+
+#### Extension: `fenced_divs` ####
+
+Allow special fenced syntax for native `Div` blocks. A Div
+starts with a fence containing at least three consecutive
+colons plus some attributes. The attributes may optionally
+be followed by another string of consecutive colons.
+The attribute syntax is exactly as in fenced code blocks (see
+[Extension: `fenced_code_attributes`]). As with fenced
+code blocks, one can use either attributes in curly braces
+or a single unbraced word, which will be treated as a class
+name. The Div ends with another line containing a string of at
+least three consecutive colons. The fenced Div should be
+separated by blank lines from preceding and following blocks.
+
+Example:
+
+ ::::: {#special .sidebar}
+ Here is a paragraph.
+
+ And another.
+ :::::
+
+Fenced divs can be nested. Opening fences are distinguished
+because they *must* have attributes:
+
+ ::: Warning ::::::
+ This is a warning.
+
+ ::: Danger
+ This is a warning within a warning.
+ :::
+ ::::::::::::::::::
+
+Fences without attributes are always closing fences. Unlike
+with fenced code blocks, the number of colons in the closing
+fence need not match the number in the opening fence. However,
+it can be helpful for visual clarity to use fences of different
+lengths to distinguish nested divs from their parents.
+
#### Extension: `bracketed_spans` ####
A bracketed sequence of inlines, as one would use to begin
-a link, will be treated as a span with attributes if it is
+a link, will be treated as a `Span` with attributes if it is
followed immediately by attributes:
[This is *some text*]{.class key="val"}
@@ -3214,7 +3732,6 @@ they cannot contain multiple paragraphs). The syntax is as follows:
Inline and regular footnotes may be mixed freely.
-
Citations
---------
@@ -3415,6 +3932,13 @@ in pandoc, but may be enabled by adding `+EXTENSION` to the format
name, where `EXTENSION` is the name of the extension. Thus, for
example, `markdown+hard_line_breaks` is Markdown with hard line breaks.
+#### Extension: `old_dashes` ####
+
+Selects the pandoc <= 1.8.2.1 behavior for parsing smart dashes:
+`-` before a numeral is an en-dash, and `--` is an em-dash.
+This option only has an effect if `smart` is enabled. It is
+selected automatically for `textile` input.
+
#### Extension: `angle_brackets_escapable` ####
Allow `<` and `>` to be backslash-escaped, as they can be in
@@ -3426,6 +3950,19 @@ implied by pandoc's default `all_symbols_escapable`.
Allow a list to occur right after a paragraph, with no intervening
blank space.
+#### Extension: `four_space_rule` ####
+
+Selects the pandoc <= 2.0 behavior for parsing lists, so that
+four spaces indent are needed for list item continuation
+paragraphs.
+
+#### Extension: `spaced_reference_links` ####
+
+Allow whitespace between the two components of a reference link,
+for example,
+
+ [foo] [bar].
+
#### Extension: `hard_line_breaks` ####
Causes all newlines within a paragraph to be interpreted as hard line
@@ -3446,7 +3983,7 @@ between two East Asian wide characters. This is a better choice
than `ignore_line_breaks` for texts that include a mix of East
Asian wide characters and other characters.
-##### Extension: `emoji` ####
+#### Extension: `emoji` ####
Parses textual emojis like `:smile:` as Unicode emoticons.
@@ -3499,12 +4036,6 @@ simply skipped (as opposed to being parsed as paragraphs).
Makes all absolute URIs into links, even when not surrounded by
pointy braces `<...>`.
-#### Extension: `ascii_identifiers` ####
-
-Causes the identifiers produced by `auto_identifiers` to be pure ASCII.
-Accents are stripped off of accented Latin letters, and non-Latin
-letters are omitted.
-
#### Extension: `mmd_link_attributes` ####
Parses multimarkdown style key-value attributes on link
@@ -3558,13 +4089,14 @@ variants are supported:
: `footnotes`, `pipe_tables`, `raw_html`, `markdown_attribute`,
`fenced_code_blocks`, `definition_lists`, `intraword_underscores`,
`header_attributes`, `link_attributes`, `abbreviations`,
- `shortcut_reference_links`.
+ `shortcut_reference_links`, `spaced_reference_links`.
-`markdown_github` (GitHub-Flavored Markdown)
-: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `auto_identifiers`,
+`markdown_github` (deprecated GitHub-Flavored Markdown)
+: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `gfm_auto_identifiers`,
`ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`,
- `intraword_underscores`, `strikeout`, `hard_line_breaks`, `emoji`,
- `shortcut_reference_links`, `angle_brackets_escapable`.
+ `space_in_atx_header`, `intraword_underscores`, `strikeout`,
+ `emoji`, `shortcut_reference_links`, `angle_brackets_escapable`,
+ `lists_without_preceding_blankline`.
`markdown_mmd` (MultiMarkdown)
: `pipe_tables`, `raw_html`, `markdown_attribute`, `mmd_link_attributes`,
@@ -3572,24 +4104,28 @@ variants are supported:
`mmd_title_block`, `footnotes`, `definition_lists`,
`all_symbols_escapable`, `implicit_header_references`,
`auto_identifiers`, `mmd_header_identifiers`,
- `shortcut_reference_links`.
+ `shortcut_reference_links`, `implicit_figures`,
+ `superscript`, `subscript`, `backtick_code_blocks`,
+ `spaced_reference_links`, `raw_attribute`.
`markdown_strict` (Markdown.pl)
-: `raw_html`
-
-Extensions with formats other than Markdown
--------------------------------------------
+: `raw_html`, `shortcut_reference_links`,
+ `spaced_reference_links`.
-Some of the extensions discussed above can be used with formats
-other than Markdown:
+We also support `commonmark` and `gfm` (GitHub-Flavored Markdown,
+which is implemented as a set of extensions on `commonmark`).
-* `auto_identifiers` can be used with `latex`, `rst`, `mediawiki`,
- and `textile` input (and is used by default).
+Note, however, that `commonmark` and `gfm` have limited support
+for extensions. Only those listed below (and `smart` and
+`raw_tex`) will work. The extensions can, however, all be
+individually disabled.
+Also, `raw_tex` only affects `gfm` output, not input.
-* `tex_math_dollars`, `tex_math_single_backslash`, and
- `tex_math_double_backslash` can be used with `html` input.
- (This is handy for reading web pages formatted using MathJax,
- for example.)
+`gfm` (GitHub-Flavored Markdown)
+: `pipe_tables`, `raw_html`, `fenced_code_blocks`, `auto_identifiers`,
+ `ascii_identifiers`, `backtick_code_blocks`, `autolink_bare_uris`,
+ `intraword_underscores`, `strikeout`, `hard_line_breaks`, `emoji`,
+ `shortcut_reference_links`, `angle_brackets_escapable`.
Producing slide shows with pandoc
=================================
@@ -3597,7 +4133,8 @@ Producing slide shows with pandoc
You can use pandoc to produce an HTML + JavaScript slide presentation
that can be viewed via a web browser. There are five ways to do this,
using [S5], [DZSlides], [Slidy], [Slideous], or [reveal.js].
-You can also produce a PDF slide show using LaTeX [`beamer`].
+You can also produce a PDF slide show using LaTeX [`beamer`], or
+slides shows in Microsoft [PowerPoint] format.
Here's the Markdown source for a simple slide show, `habits.txt`:
@@ -3659,6 +4196,10 @@ To produce a PDF slide show using beamer, type
Note that a reveal.js slide show can also be converted to a PDF
by printing it to a file from the browser.
+To produce a Powerpoint slide show, type
+
+ pandoc habits.txt -o habits.pptx
+
Structuring the slide show
--------------------------
@@ -3683,6 +4224,9 @@ rules:
"title slides," which just contain the section title
and help to break the slide show into sections.
+ * Content *above* the slide level will not appear in the slide
+ show.
+
* A title page is constructed automatically from the document's title
block, if present. (In the case of beamer, this can be disabled
by commenting out some lines in the default template.)
@@ -3704,14 +4248,38 @@ Incremental lists
By default, these writers produce lists that display "all at once."
If you want your lists to display incrementally (one item at a time),
use the `-i` option. If you want a particular list to depart from the
-default (that is, to display incrementally without the `-i` option and
-all at once with the `-i` option), put it in a block quote:
+default, put it in a `div` block with class `incremental` or
+`nonincremental`. So, for example, using the `fenced div` syntax, the
+following would be incremental regardless of the document default:
+
+ ::: incremental
+
+ - Eat spaghetti
+ - Drink wine
+
+ :::
+
+or
+
+ ::: nonincremental
+
+ - Eat spaghetti
+ - Drink wine
+
+ :::
+
+While using `incremental` and `nonincremental` divs are the
+recommended method of setting incremental lists on a per-case basis,
+an older method is also supported: putting lists inside a blockquote
+will depart from the document default (that is, it will display
+incrementally without the `-i` option and all at once with the `-i`
+option):
> - Eat spaghetti
> - Drink wine
-In this way incremental and nonincremental lists can be mixed in
-a single document.
+Both methods allow incremental and nonincremental lists to be mixed
+in a single document.
Inserting pauses
----------------
@@ -3766,21 +4334,41 @@ bibliographies:
Speaker notes
-------------
-reveal.js has good support for speaker notes. You can add notes to your
-Markdown document thus:
+Speaker notes are supported in reveal.js and PowerPoint (pptx)
+output. You can add notes to your Markdown document thus:
+
+ ::: notes
- <div class="notes">
This is my note.
- It can contain Markdown
- like this list
- </div>
+ :::
+
+To show the notes window in reveal.js, press `s` while viewing the
+presentation. Speaker notes in PowerPoint will be available, as usual,
+in handouts and presenter view.
-To show the notes window, press `s` while viewing the presentation.
Notes are not yet supported for other slide formats, but the notes
will not appear on the slides themselves.
+Columns
+-------
+
+To put material in side by side columns, you can use a native
+div container with class `columns`, containing two or more div
+containers with class `column` and a `width` attribute:
+
+ :::::::::::::: {.columns}
+ ::: {.column width="40%"}
+ contents...
+ :::
+ ::: {.column width="60%"}
+ contents...
+ :::
+ ::::::::::::::
+
Frame attributes in beamer
--------------------------
@@ -3822,6 +4410,8 @@ block][Extension: `yaml_metadata_block`]. Here is an example:
text: doi:10.234234.234/33
publisher: My Press
rights: © 2007 John Smith, CC BY-NC
+ ibooks:
+ version: 1.3.4
...
The following fields are recognized:
@@ -3887,6 +4477,16 @@ The following fields are recognized:
~ Either `ltr` or `rtl`. Specifies the `page-progression-direction`
attribute for the [`spine` element].
+`ibooks`
+ ~ iBooks-specific metadata, with the following fields:
+
+ - `version`: (string)
+ - `specified-fonts`: `true`|`false` (default `false`)
+ - `ipad-orientation-lock`: `portrait-only`|`landscape-only`
+ - `iphone-orientation-lock`: `portrait-only`|`landscape-only`
+ - `binding`: `true`|`false` (default `true`)
+ - `scroll-axis`: `vertical`|`horizontal`|`default`
+
[MARC relators]: http://loc.gov/marc/relators/relaterm.html
[`spine` element]: http://idpf.org/epub/301/spec/epub-publications.html#sec-spine-elem
@@ -3905,74 +4505,78 @@ with the `src` attribute. For example:
</source>
</audio>
-Literate Haskell support
-========================
+Syntax highlighting
+===================
-If you append `+lhs` (or `+literate_haskell`) to an appropriate input or output
-format (`markdown`, `markdown_strict`, `rst`, or `latex` for input or output;
-`beamer`, `html` or `html5` for output only), pandoc will treat the document as
-literate Haskell source. This means that
+Pandoc will automatically highlight syntax in [fenced code blocks] that
+are marked with a language name. The Haskell library [skylighting] is
+used for highlighting, which works in HTML, Docx, Ms, and LaTeX/PDF output.
+To see a list of language names that pandoc will recognize, type
+`pandoc --list-highlight-languages`.
- - In Markdown input, "bird track" sections will be parsed as Haskell
- code rather than block quotations. Text between `\begin{code}`
- and `\end{code}` will also be treated as Haskell code. For
- ATX-style headers the character '=' will be used instead of '#'.
+The color scheme can be selected using the `--highlight-style` option.
+The default color scheme is `pygments`, which imitates the default color
+scheme used by the Python library pygments (though pygments is not actually
+used to do the highlighting). To see a list of highlight styles,
+type `pandoc --list-highlight-styles`.
- - In Markdown output, code blocks with classes `haskell` and `literate`
- will be rendered using bird tracks, and block quotations will be
- indented one space, so they will not be treated as Haskell code.
- In addition, headers will be rendered setext-style (with underlines)
- rather than ATX-style (with '#' characters). (This is because ghc
- treats '#' characters in column 1 as introducing line numbers.)
+To disable highlighting, use the `--no-highlight` option.
- - In restructured text input, "bird track" sections will be parsed
- as Haskell code.
+[skylighting]: https://github.com/jgm/skylighting
- - In restructured text output, code blocks with class `haskell` will
- be rendered using bird tracks.
+Custom Styles in Docx
+=====================
- - In LaTeX input, text in `code` environments will be parsed as
- Haskell code.
+Input
+-----
- - In LaTeX output, code blocks with class `haskell` will be rendered
- inside `code` environments.
+The docx reader, by default, only reads those styles that it can
+convert into pandoc elements, either by direct conversion or
+interpreting the derivation of the input document's styles.
- - In HTML output, code blocks with class `haskell` will be rendered
- with class `literatehaskell` and bird tracks.
+By enabling the [`styles` extension](#ext-styles) in the docx reader
+(`-f docx+styles`), you can produce output that maintains the styles
+of the input document, using the `custom-style` class. Paragraph
+styles are interpreted as divs, while character styles are interpreted
+as spans.
-Examples:
+For example, using the `custom-style-reference.docx` file in the test
+directory, we have the following different outputs:
- pandoc -f markdown+lhs -t html
+Without the `+styles` extension:
-reads literate Haskell source formatted with Markdown conventions and writes
-ordinary HTML (without bird tracks).
+ $ pandoc test/docx/custom-style-reference.docx -f docx -t markdown
+ This is some text.
- pandoc -f markdown+lhs -t html+lhs
+ This is text with an *emphasized* text style. And this is text with a
+ **strengthened** text style.
-writes HTML with the Haskell code in bird tracks, so it can be copied
-and pasted as literate Haskell source.
+ > Here is a styled paragraph that inherits from Block Text.
-Syntax highlighting
-===================
+And with the extension:
-Pandoc will automatically highlight syntax in [fenced code blocks] that
-are marked with a language name. The Haskell library [highlighting-kate] is
-used for highlighting, which works in HTML, Docx, and LaTeX/PDF output.
-To see a list of language names that pandoc will recognize, type
-`pandoc --list-highlight-languages`.
+ $ pandoc test/docx/custom-style-reference.docx -f docx+styles -t markdown
-The color scheme can be selected using the `--highlight-style` option.
-The default color scheme is `pygments`, which imitates the default color
-scheme used by the Python library pygments (though pygments is not actually
-used to do the highlighting). To see a list of highlight styles,
-type `pandoc --list-highlight-styles`.
+ ::: {custom-style="FirstParagraph"}
+ This is some text.
+ :::
-To disable highlighting, use the `--no-highlight` option.
+ ::: {custom-style="BodyText"}
+ This is text with an [emphasized]{custom-style="Emphatic"} text style.
+ And this is text with a [strengthened]{custom-style="Strengthened"}
+ text style.
+ :::
-[highlighting-kate]: https://github.com/jgm/highlighting-kate
+ ::: {custom-style="MyBlockStyle"}
+ > Here is a styled paragraph that inherits from Block Text.
+ :::
-Custom Styles in Docx Output
-============================
+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.
+
+Output
+------
By default, pandoc's docx output applies a predefined set of styles for
blocks such as paragraphs and block quotes, and uses largely default
@@ -3984,19 +4588,19 @@ using `div`s and `span`s, respectively.
If you define a `div` or `span` with the attribute `custom-style`,
pandoc will apply your specified style to the contained elements. So,
-for example,
+for example using the `bracketed_spans` syntax,
- <span custom-style="Emphatically">Get out,</span> he said.
+ [Get out]{custom-style="Emphatically"}, he said.
-would produce a docx file with "Get out," styled with character
-style `Emphatically`. Similarly,
+would produce a docx file with "Get out" styled with character
+style `Emphatically`. Similarly, using the `fenced_divs` syntax,
Dickinson starts the poem simply:
- <div custom-style="Poetry">
+ ::: {custom-style="Poetry"}
| A Bird came down the Walk---
| He did not know I saw---
- </div>
+ :::
would style the two contained lines with the `Poetry` paragraph style.
@@ -4012,7 +4616,7 @@ want all italics to be transformed to the `Emphasis` character style
transform all italicized inlines to inlines within an `Emphasis`
custom-style `span`.
-[pandoc filters]: http://pandoc.org/scripting.html
+[pandoc filters]: http://pandoc.org/filters.html
Custom writers
==============
@@ -4036,182 +4640,10 @@ which you can modify according to your needs, do
Authors
=======
-© 2006-2016 John MacFarlane (jgm@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.)
-
-Contributors include
-Arata Mizuki,
-Aaron Wolen,
-Albert Krewinkel,
-Alex Ivkin,
-Alex Vong,
-Alexander Kondratskiy,
-Alexander Sulfrian,
-Alexander V Vershilov,
-Alfred Wechselberger,
-Andreas Lööw,
-Andrew Dunning,
-Antoine Latter,
-Arata Mizuki,
-Arlo O'Keeffe,
-Artyom Kazak,
-B. Scott Michel,
-Ben Gamari,
-Beni Cherniavsky-Paskin,
-Benoit Schweblin,
-Bjorn Buckwalter,
-Bradley Kuhn,
-Brent Yorgey,
-Bryan O'Sullivan,
-Caleb McDaniel,
-Calvin Beck,
-Carlos Sosa,
-Chris Black,
-Christian Conkle,
-Christoffer Ackelman,
-Christoffer Sawicki,
-Clare Macrae,
-Clint Adams,
-Conal Elliott,
-Craig S. Bosma,
-Daniel Bergey,
-Daniel T. Staal,
-Daniele D'Orazio,
-David Lazar,
-David Röthlisberger,
-Denis Laxalde,
-Douglas Calvert,
-Emanuel Evans,
-Emily Eisenberg,
-Eric Kow,
-Eric Seidel,
-Felix Yan,
-Florian Eitel,
-François Gannaz,
-Freiric Barral,
-Freirich Raabe,
-Frerich Raabe,
-Fyodor Sheremetyev,
-Gabor Pali,
-Gavin Beatty,
-Gottfried Haider,
-Greg Maslov,
-Greg Rundlett,
-Grégory Bataille,
-Gwern Branwen,
-Hans-Peter Deifel,
-Henrik Tramberend,
-Henry de Valence,
-Hubert Plociniczak,
-Ilya V. Portnov,
-Ivo Clarysse,
-J. Lewis Muir,
-Jaime Marquínez Ferrándiz,
-Jakob Voß,
-James Aspnes,
-Jamie F. Olson,
-Jan Larres,
-Jan Schulz,
-Jason Ronallo,
-Jeff Arnold,
-Jeff Runningen,
-Jens Petersen,
-Jesse Rosenthal,
-Joe Hillenbrand,
-John MacFarlane,
-John Muccigrosso,
-Jonas Smedegaard,
-Jonathan Daugherty,
-Jose Luis Duran,
-Josef Svenningsson,
-Julien Cretel,
-Juliusz Gonera,
-Justin Bogner,
-Jérémy Bobbio,
-Kelsey Hightower,
-Kolen Cheung,
-Konstantin Zudov,
-Kristof Bastiaensen,
-Lars-Dominik Braun,
-Luke Plant,
-Mark Szepieniec,
-Mark Wright,
-Martin Linn,
-Masayoshi Takahashi,
-Matej Kollar,
-Mathias Schenner,
-Mathieu Duponchelle,
-Matthew Eddey,
-Matthew Pickering,
-Matthias C. M. Troffaes,
-Mauro Bieg,
-Max Bolingbroke,
-Max Rydahl Andersen,
-Merijn Verstraaten,
-Michael Beaumont,
-Michael Chladek,
-Michael Snoyman,
-Michael Thompson,
-MinRK,
-Morton Fox,
-Nathan Gass,
-Neil Mayhew,
-Nick Bart,
-Nicolas Kaiser,
-Nikolay Yakimov,
-Oliver Matthews,
-Ophir Lifshitz,
-Pablo Rodríguez,
-Paul Rivier,
-Paulo Tanimoto,
-Peter Wang,
-Philippe Ombredanne,
-Phillip Alday,
-Prayag Verma,
-Puneeth Chaganti,
-Ralf Stephan,
-Raniere Silva,
-Recai Oktaş,
-RyanGlScott,
-Scott Morrison,
-Sergei Trofimovich,
-Sergey Astanin,
-Shahbaz Youssefi,
-Shaun Attfield,
-Sidarth Kapur,
-Sidharth Kapur,
-Simon Hengel,
-Sumit Sahrawat,
-Thomas Hodgson,
-Thomas Weißschuh,
-Tim Lin,
-Timothy Humphries,
-Tiziano Müller,
-Todd Sifleet,
-Tom Leese,
-Uli Köhler,
-Václav Zeman,
-Viktor Kronvall,
-Vincent,
-Václav Haisman,
-Václav Zeman,
-Wandmalfarbe,
-Waldir Pimenta,
-Wikiwide,
-Xavier Olive,
-bumper314,
-csforste,
-infinity0x,
-nkalvi,
-qerub,
-robabla,
-roblabla,
-rodja.trappe,
-rski,
-shreevatsa.public,
-takahashim,
-tgkokk,
-thsutton.
+Copyright 2006-2017 John MacFarlane (jgm@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.
[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
diff --git a/README.md b/README.md
index 4388d4d07..3f57b05aa 100644
--- a/README.md
+++ b/README.md
@@ -1,146 +1,149 @@
-Pandoc
-======
+<!-- Do not edit this file. It is generated automatically from
+README.template and MANUAL.txt via the command:
+pandoc --lua-filter tools/update-readme.lua README.template -o README.md
+-->
-[![github release](https://img.shields.io/github/release/jgm/pandoc.svg?label=current+release)](https://github.com/jgm/pandoc/releases)
-[![hackage release](https://img.shields.io/hackage/v/pandoc.svg?label=hackage)](http://hackage.haskell.org/package/pandoc)
+# Pandoc
+
+[![github
+release](https://img.shields.io/github/release/jgm/pandoc.svg?label=current+release)](https://github.com/jgm/pandoc/releases)
+[![hackage
+release](https://img.shields.io/hackage/v/pandoc.svg?label=hackage)](http://hackage.haskell.org/package/pandoc)
[![homebrew](https://img.shields.io/homebrew/v/pandoc.svg)](http://brewformulas.org/Pandoc)
-[![stackage LTS package](http://stackage.org/package/pandoc/badge/lts)](http://stackage.org/lts/package/pandoc)
-[![travis build status](https://img.shields.io/travis/jgm/pandoc/master.svg?label=travis+build)](https://travis-ci.org/jgm/pandoc)
-[![appveyor build status](https://ci.appveyor.com/api/projects/status/nvqs4ct090igjiqc?svg=true)](https://ci.appveyor.com/project/jgm/pandoc)
+[![stackage LTS
+package](http://stackage.org/package/pandoc/badge/lts)](http://stackage.org/lts/package/pandoc)
+[![travis build
+status](https://img.shields.io/travis/jgm/pandoc/master.svg?label=travis+build)](https://travis-ci.org/jgm/pandoc)
+[![appveyor build
+status](https://ci.appveyor.com/api/projects/status/nvqs4ct090igjiqc?svg=true)](https://ci.appveyor.com/project/jgm/pandoc)
[![license](https://img.shields.io/badge/license-GPLv2+-lightgray.svg)](https://www.gnu.org/licenses/gpl.html)
-[![pandoc-discuss on google groups](https://img.shields.io/badge/pandoc-discuss-red.svg?style=social)](https://groups.google.com/forum/#!forum/pandoc-discuss)
-
-
-The universal markup converter
-------------------------------
-
-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
-[Markdown], [CommonMark], [PHP Markdown Extra], [GitHub-Flavored Markdown],
-[MultiMarkdown], and (subsets of) [Textile], [reStructuredText], [HTML],
-[LaTeX], [MediaWiki markup], [TWiki markup], [Haddock markup], [OPML], [Emacs
-Org mode], [DocBook], [txt2tags], [EPUB], [ODT] and [Word docx]; and it can
-write plain text, [Markdown], [CommonMark], [PHP Markdown Extra],
-[GitHub-Flavored Markdown], [MultiMarkdown], [reStructuredText], [XHTML],
-[HTML5], [LaTeX] \(including [`beamer`] slide shows\), [ConTeXt], [RTF], [OPML],
-[DocBook], [OpenDocument], [ODT], [Word docx], [GNU Texinfo], [MediaWiki
-markup], [DokuWiki markup], [ZimWiki markup], [Haddock markup],
-[EPUB] \(v2 or v3\), [FictionBook2], [Textile], [groff man] pages,
-[Emacs Org mode], [AsciiDoc], [InDesign ICML], [TEI Simple], and [Slidy],
-[Slideous], [DZSlides], [reveal.js] or [S5] HTML slide shows. It can also
-produce [PDF] output on systems where LaTeX, ConTeXt, or `wkhtmltopdf` is
+[![pandoc-discuss on google
+groups](https://img.shields.io/badge/pandoc-discuss-red.svg?style=social)](https://groups.google.com/forum/#!forum/pandoc-discuss)
+
+## The universal markup converter
+
+<div id="description">
+
+Pandoc is a [Haskell](https://www.haskell.org) library for converting
+from one markup format to another, and a command-line tool that uses
+this library.
+
+Pandoc can read
+[Markdown](http://daringfireball.net/projects/markdown/),
+[CommonMark](http://commonmark.org), [PHP Markdown
+Extra](https://michelf.ca/projects/php-markdown/extra/),
+[GitHub-Flavored
+Markdown](https://help.github.com/articles/github-flavored-markdown/),
+[MultiMarkdown](http://fletcherpenney.net/multimarkdown/), and (subsets
+of) [Textile](http://redcloth.org/textile),
+[reStructuredText](http://docutils.sourceforge.net/docs/ref/rst/introduction.html),
+[HTML](http://www.w3.org/html/), [LaTeX](http://latex-project.org),
+[MediaWiki markup](https://www.mediawiki.org/wiki/Help:Formatting),
+[TWiki markup](http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules),
+[TikiWiki
+markup](https://doc.tiki.org/Wiki-Syntax-Text#The_Markup_Language_Wiki-Syntax),
+[Creole 1.0](http://www.wikicreole.org/wiki/Creole1.0), [Haddock
+markup](https://www.haskell.org/haddock/doc/html/ch03s08.html),
+[OPML](http://dev.opml.org/spec2.html), [Emacs Org
+mode](http://orgmode.org), [DocBook](http://docbook.org),
+[JATS](https://jats.nlm.nih.gov),
+[Muse](https://amusewiki.org/library/manual),
+[txt2tags](http://txt2tags.org), [Vimwiki](https://vimwiki.github.io),
+[EPUB](http://idpf.org/epub),
+[ODT](http://en.wikipedia.org/wiki/OpenDocument), and [Word
+docx](https://en.wikipedia.org/wiki/Office_Open_XML).
+
+Pandoc can write plain text,
+[Markdown](http://daringfireball.net/projects/markdown/),
+[CommonMark](http://commonmark.org), [PHP Markdown
+Extra](https://michelf.ca/projects/php-markdown/extra/),
+[GitHub-Flavored
+Markdown](https://help.github.com/articles/github-flavored-markdown/),
+[MultiMarkdown](http://fletcherpenney.net/multimarkdown/),
+[reStructuredText](http://docutils.sourceforge.net/docs/ref/rst/introduction.html),
+[XHTML](http://www.w3.org/TR/xhtml1/),
+[HTML5](http://www.w3.org/TR/html5/), [LaTeX](http://latex-project.org)
+(including [`beamer`](https://ctan.org/pkg/beamer) slide shows),
+[ConTeXt](http://www.contextgarden.net/),
+[RTF](http://en.wikipedia.org/wiki/Rich_Text_Format),
+[OPML](http://dev.opml.org/spec2.html), [DocBook](http://docbook.org),
+[JATS](https://jats.nlm.nih.gov),
+[OpenDocument](http://opendocument.xml.org),
+[ODT](http://en.wikipedia.org/wiki/OpenDocument), [Word
+docx](https://en.wikipedia.org/wiki/Office_Open_XML), [GNU
+Texinfo](http://www.gnu.org/software/texinfo/), [MediaWiki
+markup](https://www.mediawiki.org/wiki/Help:Formatting), [DokuWiki
+markup](https://www.dokuwiki.org/dokuwiki), [ZimWiki
+markup](http://zim-wiki.org/manual/Help/Wiki_Syntax.html), [Haddock
+markup](https://www.haskell.org/haddock/doc/html/ch03s08.html),
+[EPUB](http://idpf.org/epub) (v2 or v3),
+[FictionBook2](http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1),
+[Textile](http://redcloth.org/textile), [groff
+man](http://man7.org/linux/man-pages/man7/groff_man.7.html), [groff
+ms](http://man7.org/linux/man-pages/man7/groff_ms.7.html), [Emacs Org
+mode](http://orgmode.org),
+[AsciiDoc](http://www.methods.co.nz/asciidoc/), [InDesign
+ICML](http://wwwimages.adobe.com/www.adobe.com/content/dam/acom/en/devnet/indesign/sdk/cs6/idml/idml-cookbook.pdf),
+[TEI Simple](https://github.com/TEIC/TEI-Simple),
+[Muse](https://amusewiki.org/library/manual),
+[PowerPoint](https://en.wikipedia.org/wiki/Microsoft_PowerPoint) slide
+shows and [Slidy](http://www.w3.org/Talks/Tools/Slidy/),
+[Slideous](http://goessner.net/articles/slideous/),
+[DZSlides](http://paulrouget.com/dzslides/),
+[reveal.js](http://lab.hakim.se/reveal-js/) or
+[S5](http://meyerweb.com/eric/tools/s5/) HTML slide shows. It can also
+produce [PDF](https://www.adobe.com/pdf/) output on systems where LaTeX,
+ConTeXt, `pdfroff`, `wkhtmltopdf`, `prince`, or `weasyprint` is
installed.
-Pandoc's enhanced version of Markdown includes syntax for [footnotes],
-[tables], flexible [ordered lists], [definition lists], [fenced code blocks],
-[superscripts and subscripts], [strikeout], [metadata blocks], automatic tables of
-contents, embedded LaTeX [math], [citations], and [Markdown inside HTML block
-elements]. (These enhancements, described
-further under [Pandoc's Markdown], can be disabled using the
-`markdown_strict` input or output format.)
-
-In contrast to most existing tools for converting Markdown to HTML, which
-use regex substitutions, 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.
-
-Because pandoc's intermediate representation of a document is less
-expressive than many of the formats it converts between, one should
-not expect perfect conversions between every format and every other.
-Pandoc attempts to preserve the structural elements of a document, but
-not formatting details such as margin size. And some document elements,
-such as complex tables, may not fit into pandoc's simple document
-model. While conversions from pandoc's Markdown to all formats aspire
-to be perfect, conversions from formats more expressive than pandoc's
-Markdown can be expected to be lossy.
-
-[Markdown]: http://daringfireball.net/projects/markdown/
-[CommonMark]: http://commonmark.org
-[PHP Markdown Extra]: https://michelf.ca/projects/php-markdown/extra/
-[GitHub-Flavored Markdown]: https://help.github.com/articles/github-flavored-markdown/
-[MultiMarkdown]: http://fletcherpenney.net/multimarkdown/
-[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html
-[S5]: http://meyerweb.com/eric/tools/s5/
-[Slidy]: http://www.w3.org/Talks/Tools/Slidy/
-[Slideous]: http://goessner.net/articles/slideous/
-[HTML]: http://www.w3.org/html/
-[HTML5]: http://www.w3.org/TR/html5/
-[XHTML]: http://www.w3.org/TR/xhtml1/
-[LaTeX]: http://latex-project.org
-[`beamer`]: https://ctan.org/pkg/beamer
-[Beamer User's Guide]: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf
-[ConTeXt]: http://www.contextgarden.net/
-[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
-[DocBook]: http://docbook.org
-[txt2tags]: http://txt2tags.org
-[EPUB]: http://idpf.org/epub
-[OPML]: http://dev.opml.org/spec2.html
-[OpenDocument]: http://opendocument.xml.org
-[ODT]: http://en.wikipedia.org/wiki/OpenDocument
-[Textile]: http://redcloth.org/textile
-[MediaWiki markup]: https://www.mediawiki.org/wiki/Help:Formatting
-[DokuWiki markup]: https://www.dokuwiki.org/dokuwiki
-[ZimWiki markup]: http://zim-wiki.org/manual/Help/Wiki_Syntax.html
-[TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules
-[Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html
-[groff man]: http://man7.org/linux/man-pages/man7/groff_man.7.html
-[Haskell]: https://www.haskell.org
-[GNU Texinfo]: http://www.gnu.org/software/texinfo/
-[Emacs Org mode]: http://orgmode.org
-[AsciiDoc]: http://www.methods.co.nz/asciidoc/
-[DZSlides]: http://paulrouget.com/dzslides/
-[Word docx]: https://en.wikipedia.org/wiki/Office_Open_XML
-[PDF]: https://www.adobe.com/pdf/
-[reveal.js]: http://lab.hakim.se/reveal-js/
-[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1
-[InDesign ICML]: https://www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/IDML/idml-specification.pdf
-[TEI Simple]: https://github.com/TEIC/TEI-Simple
-
-
-
-
-[footnotes]: http://pandoc.org/MANUAL.html#footnotes
-[tables]: http://pandoc.org/MANUAL.html#tables
-[ordered lists]: http://pandoc.org/MANUAL.html#ordered-lists
-[definition lists]: http://pandoc.org/MANUAL.html#definition-lists
-[fenced code blocks]: http://pandoc.org/MANUAL.html#fenced-code-blocks
-[superscripts and subscripts]: http://pandoc.org/MANUAL.html#superscripts-and-subscripts
-[strikeout]: http://pandoc.org/MANUAL.html#strikeout
-[metadata blocks]: http://pandoc.org/MANUAL.html#metadata-blocks
-[math]: http://pandoc.org/MANUAL.html#math
-[citations]: http://pandoc.org/MANUAL.html#citations
-[Markdown inside HTML block elements]: http://pandoc.org/MANUAL.html#extension-markdown_in_html_blocks
-[Pandoc's Markdown]: http://pandoc.org/MANUAL.html#pandocs-markdown
-
-Installing
-----------
-
-Here's [how to install pandoc](INSTALL.md).
-
-Documentation
--------------
-
-Pandoc's website contains a full [User's Guide](https://pandoc.org/MANUAL.html).
-It is also available [here](MANUAL.txt) as pandoc-flavored Markdown.
-The website also contains some [examples of the use of
+Pandoc’s enhanced version of Markdown includes syntax for tables,
+definition lists, metadata blocks, `Div` blocks, footnotes and
+citations, embedded LaTeX (including math), Markdown inside HTML block
+elements, and much more. These enhancements, described further under
+Pandoc’s Markdown, can be disabled using the `markdown_strict` format.
+
+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 (like an *abstract syntax tree* or AST), 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. Users can also run custom [pandoc
+filters](http://pandoc.org/filters.html) to modify the intermediate AST.
+
+Because pandoc’s intermediate representation of a document is less
+expressive than many of the formats it converts between, one should not
+expect perfect conversions between every format and every other. Pandoc
+attempts to preserve the structural elements of a document, but not
+formatting details such as margin size. And some document elements, such
+as complex tables, may not fit into pandoc’s simple document model.
+While conversions from pandoc’s Markdown to all formats aspire to be
+perfect, conversions from formats more expressive than pandoc’s Markdown
+can be expected to be lossy.
+
+</div>
+
+## Installing
+
+Here’s [how to install pandoc](INSTALL.md).
+
+## Documentation
+
+Pandoc’s website contains a full [User’s
+Guide](https://pandoc.org/MANUAL.html). It is also available
+[here](MANUAL.txt) as pandoc-flavored Markdown. The website also
+contains some [examples of the use of
pandoc](https://pandoc.org/demos.html) and a limited [online
demo](https://pandoc.org/try).
-Contributing
-------------
-
-Pull requests, bug reports, and feature requests are welcome. Please make
-sure to read [the contributor guidelines](CONTRIBUTING.md) before opening a
-new issue.
-
+## Contributing
-License
--------
+Pull requests, bug reports, and feature requests are welcome. Please
+make sure to read [the contributor guidelines](CONTRIBUTING.md) before
+opening a new issue.
-© 2006-2016 John MacFarlane (jgm@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.)
+## License
-[GPL]: http://www.gnu.org/copyleft/gpl.html "GNU General Public License"
+© 2006-2018 John MacFarlane (jgm@berkeley.edu). Released under the
+[GPL](http://www.gnu.org/copyleft/gpl.html "GNU General Public License"),
+version 2 or greater. This software carries no warranty of any kind.
+(See COPYRIGHT for full copyright and warranty notices.)
diff --git a/Setup.hs b/Setup.hs
index af5731b71..889004bc0 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,10 +1,5 @@
-{-# LANGUAGE CPP #-}
-#if !defined(MIN_VERSION_Cabal)
-# define MIN_VERSION_Cabal(a,b,c) 0
-#endif
-
{-
-Copyright (C) 2006-2015 John MacFarlane <jgm@berkeley.edu>
+Copyright (C) 2006-2018 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,58 +17,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
import Distribution.Simple
-import Distribution.Simple.PreProcess
-import Distribution.Simple.Setup (ConfigFlags(..), CopyFlags(..), fromFlag)
+import Distribution.Simple.Setup (CopyFlags(..), fromFlag)
import Distribution.PackageDescription (PackageDescription(..))
-import Distribution.Simple.Utils ( rawSystemExitCode, findProgramVersion )
-import System.Exit
-import Distribution.Simple.Utils (info, notice, installOrdinaryFiles)
-import Distribution.Simple.Program (simpleProgram, Program(..))
+import Distribution.Simple.Utils (notice, installOrdinaryFiles)
import Distribution.Simple.LocalBuildInfo
-import Control.Monad (when)
-
-#if MIN_VERSION_Cabal(2,0,0)
-import Distribution.PackageDescription (mkFlagName)
-#else
-import Distribution.PackageDescription (FlagName(..))
-#endif
main :: IO ()
main = defaultMainWithHooks $ simpleUserHooks {
- -- enable hsb2hs preprocessor for .hsb files
- hookedPreProcessors = [ppBlobSuffixHandler]
- , hookedPrograms = [(simpleProgram "hsb2hs"){
- programFindVersion = \verbosity fp ->
- findProgramVersion "--version" id verbosity fp }]
- , postCopy = installManPage
+ postCopy = installManPage
}
-ppBlobSuffixHandler :: PPSuffixHandler
-#if MIN_VERSION_Cabal(2,0,0)
-ppBlobSuffixHandler = ("hsb", \_ lbi _ ->
-#else
-ppBlobSuffixHandler = ("hsb", \_ lbi ->
-#endif
- PreProcessor {
- platformIndependent = True,
- runPreProcessor = mkSimplePreProcessor $ \infile outfile verbosity ->
-#if MIN_VERSION_Cabal(2,0,0)
- do let embedData = case lookup (mkFlagName "embed_data_files")
-#else
- do let embedData = case lookup (FlagName "embed_data_files")
-#endif
- (configConfigurationsFlags (configFlags lbi)) of
- Just True -> True
- _ -> False
- when embedData $
- do info verbosity $ "Preprocessing " ++ infile ++ " to " ++ outfile
- ec <- rawSystemExitCode verbosity "hsb2hs"
- [infile, infile, outfile]
- case ec of
- ExitSuccess -> return ()
- ExitFailure _ -> error "hsb2hs is needed to build this program"
- })
-
installManPage :: Args -> CopyFlags
-> PackageDescription -> LocalBuildInfo -> IO ()
installManPage _ flags pkg lbi = do
diff --git a/benchmark/benchmark-pandoc.hs b/benchmark/benchmark-pandoc.hs
index e2707de20..489d5c39b 100644
--- a/benchmark/benchmark-pandoc.hs
+++ b/benchmark/benchmark-pandoc.hs
@@ -1,5 +1,6 @@
+{-# LANGUAGE TupleSections #-}
{-
-Copyright (C) 2012-2014 John MacFarlane <jgm@berkeley.edu>
+Copyright (C) 2012-2018 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -16,38 +17,70 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
import Text.Pandoc
+import qualified Text.Pandoc.UTF8 as UTF8
+import qualified Data.ByteString as B
import Criterion.Main
import Criterion.Types (Config(..))
+import Data.List (intersect)
import Data.Maybe (mapMaybe)
-import Debug.Trace (trace)
+import System.Environment (getArgs)
readerBench :: Pandoc
- -> (String, ReaderOptions -> String -> IO (Either PandocError Pandoc))
+ -> String
-> Maybe Benchmark
-readerBench doc (name, reader) =
- case lookup name writers of
- Just (PureStringWriter writer) ->
- let inp = writer def{ writerWrapText = WrapAuto} doc
- in return $ bench (name ++ " reader") $ nfIO $
- (fmap handleError <$> reader def{ readerSmart = True }) inp
- _ -> trace ("\nCould not find writer for " ++ name ++ "\n") Nothing
+readerBench doc name =
+ case res of
+ Right (readerFun, inp) ->
+ Just $ bench (name ++ " reader")
+ $ nf (\i -> either (error . show) id $ runPure (readerFun i))
+ inp
+ Left _ -> Nothing
+ where res = runPure $ do
+ (TextReader r, rexts)
+ <- either (fail . show) return $ getReader name
+ (TextWriter w, wexts)
+ <- either (fail . show) return $ getWriter name
+ inp <- w def{ writerWrapText = WrapAuto, writerExtensions = wexts }
+ doc
+ return (r def{ readerExtensions = rexts }, inp)
writerBench :: Pandoc
- -> (String, WriterOptions -> Pandoc -> String)
- -> Benchmark
-writerBench doc (name, writer) = bench (name ++ " writer") $ nf
- (writer def{ writerWrapText = WrapAuto }) doc
+ -> String
+ -> Maybe Benchmark
+writerBench doc name =
+ case res of
+ Right writerFun ->
+ Just $ bench (name ++ " writer")
+ $ nf (\d -> either (error . show) id $
+ runPure (writerFun d)) doc
+ _ -> Nothing
+ where res = runPure $ do
+ (TextWriter w, wexts)
+ <- either (fail . show) return $ getWriter name
+ return $ w def{ writerExtensions = wexts }
main :: IO ()
main = do
- inp <- readFile "tests/testsuite.txt"
- let opts = def{ readerSmart = True }
- let doc = handleError $ readMarkdown opts inp
- let readers' = [(n,r) | (n, StringReader r) <- readers]
+ args <- filter (\x -> take 1 x /= "-") <$> getArgs
+ print args
+ let matchReader (n, TextReader _) =
+ null args || ("reader" `elem` args && n `elem` args)
+ matchReader _ = False
+ let matchWriter (n, TextWriter _) =
+ null args || ("writer" `elem` args && n `elem` args)
+ matchWriter _ = False
+ let matchedReaders = map fst $ (filter matchReader readers
+ :: [(String, Reader PandocPure)])
+ let matchedWriters = map fst $ (filter matchWriter writers
+ :: [(String, Writer PandocPure)])
+ inp <- UTF8.toText <$> B.readFile "test/testsuite.txt"
+ let opts = def
+ let doc = either (error . show) id $ runPure $ readMarkdown opts inp
let readerBs = mapMaybe (readerBench doc)
- $ filter (\(n,_) -> n /="haddock") readers'
- let writers' = [(n,w) | (n, PureStringWriter w) <- writers]
- let writerBs = map (writerBench doc)
- $ writers'
+ $ filter (/="haddock")
+ (matchedReaders `intersect` matchedWriters)
+ -- we need the corresponding writer to generate
+ -- input for the reader
+ let writerBs = mapMaybe (writerBench doc) matchedWriters
defaultMainWith defaultConfig{ timeLimit = 6.0 }
(writerBs ++ readerBs)
diff --git a/benchmark/weigh-pandoc.hs b/benchmark/weigh-pandoc.hs
index 198d09b46..d3cada8c0 100644
--- a/benchmark/weigh-pandoc.hs
+++ b/benchmark/weigh-pandoc.hs
@@ -1,13 +1,14 @@
import Weigh
import Text.Pandoc
+import Data.Text (Text)
main :: IO ()
main = do
- doc <- read <$> readFile "tests/testsuite.native"
+ doc <- read <$> readFile "test/testsuite.native"
mainWith $ do
func "Pandoc document" id doc
mapM_
- (\(n,r) -> weighReader doc n (handleError . r def{ readerSmart = True }))
+ (\(n,r) -> weighReader doc n (either (error . show) id . runPure . r def{readerExtensions = pandocExtensions}))
[("markdown", readMarkdown)
,("html", readHtml)
,("docbook", readDocBook)
@@ -15,22 +16,22 @@ main = do
,("commonmark", readCommonMark)
]
mapM_
- (\(n,w) -> weighWriter doc n (w def))
+ (\(n,w) -> weighWriter doc n (either (error . show) id . runPure . w def))
[("markdown", writeMarkdown)
- ,("html", writeHtmlString)
- ,("docbook", writeDocbook)
+ ,("html", writeHtml5String)
+ ,("docbook", writeDocbook5)
,("latex", writeLaTeX)
,("commonmark", writeCommonMark)
]
-weighWriter :: Pandoc -> String -> (Pandoc -> String) -> Weigh ()
+weighWriter :: Pandoc -> String -> (Pandoc -> Text) -> Weigh ()
weighWriter doc name writer = func (name ++ " writer") writer doc
-weighReader :: Pandoc -> String -> (String -> Pandoc) -> Weigh ()
+weighReader :: Pandoc -> String -> (Text -> Pandoc) -> Weigh ()
weighReader doc name reader = do
case lookup name writers of
- Just (PureStringWriter writer) ->
- let inp = writer def{ writerWrapText = WrapAuto} doc
+ Just (TextWriter writer) ->
+ let inp = either (error . show) id $ runPure $ writer def{ writerWrapText = WrapAuto} doc
in func (name ++ " reader") reader inp
_ -> return () -- no writer for reader
diff --git a/changelog b/changelog
index c5f3739fd..7c8516e2d 100644
--- a/changelog
+++ b/changelog
@@ -1,26 +1,3252 @@
-pandoc (1.19.2.4)
+pandoc (2.1.2)
- * Add dependencies on texmath and skylighting to the executable.
- This is needed for dependency version numbers to be available,
- with Cabal > 2.
+ * Markdown reader:
+
+ + Fix parsing bug with nested fenced divs (#4281). Previously we allowed
+ "nonindent spaces" before the opening and closing `:::`, but this
+ interfered with list parsing, so now we require the fences to be flush with
+ the margin of the containing block.
+
+ * Commonmark reader:
+
+ + `raw_html` is now on by default. It can be disabled explicitly
+ using `-f commonmark-raw_html`.
+
+ * Org reader (Albert Krewinkel):
+
+ + Move citation tests to separate module.
+ + Allow changing emphasis syntax (#4378). The characters allowed before
+ and after emphasis can be configured via `#+pandoc-emphasis-pre` and
+ `#+pandoc-emphasis-post`, respectively. This allows to change which
+ strings are recognized as emphasized text on a per-document or even
+ per-paragraph basis. Example:
+
+ #+pandoc-emphasis-pre: "-\t ('\"{"
+ #+pandoc-emphasis-post: "-\t\n .,:!?;'\")}["
+
+ * LaTeX reader:
+
+ + Fixed comments inside citations (#4374).
+ + Fix regression in package options including underscore (#4424).
+ + Make `--trace` work.
+ + Fixed parsing of `tabular*` environment (#4279).
+
+ * RST reader:
+
+ + Fix regression in parsing of headers with trailing space (#4280).
+
+ * Muse reader (Alexander Krotov):
+
+ + Enable `<literal>` tags even if amuse extension is enabled.
+ Amusewiki disables <literal> tags for security reasons.
+ If user wants similar behavior in pandoc, RawBlocks and RawInlines
+ can be removed or replaced with filters.
+ + Remove space prefix from `<literal>` tag contents.
+ + Do not consume whitespace while looking for closing end tag.
+ + Convert alphabetical list markers to decimal in round-trip test.
+ Alphabetical lists are an addition of Text::Amuse.
+ They are not present in Emacs Muse and can be ambiguous
+ when list starts with "i.", "c." etc.
+ + Allow `<quote>` and other tags to be indented.
+ + Allow single colon in definition list term.
+ + Fix parsing of verse in lists.
+ + Improved parsing efficiency. Avoid `parseFromString`.
+ Lists are parsed in linear instead of exponential time now.
+ + Replace ParserState with MuseState.
+ + Prioritize lists with roman numerals over alphabetical lists.
+ This is to make sure "i." starts a roman numbered list,
+ instead of a list with letter "i" (followed by "j", "k", ...").
+ + Fix directive parsing.
+ + Parse definition lists with multiple descriptions.
+ + Parse next list item before parsing more item contents.
+ + Fixed a bug: headers did not terminate lists.
+ + Move indentation parsing from `definitionListItem` to `definitionList`.
+ + Paragraph indentation does not indicate nested quote.
+ Muse allows indentation to indicate quotation or alignment,
+ but only on the top level, not within a <quote> or list.
+ + Require that block tags are on separate lines.
+ Text::Amuse already explicitly requires it anyway.
+ + Fix matching of closing inline tags.
+ + Various internal changes.
+ + Fix parsing of nested definition lists.
+ + Require only one space for nested definition list indentation.
+ + Do not remove trailing whitespace from `<code>`.
+ + Fix parsing of trailing whitespace. Newline after whitespace now
+ results in softbreak instead of space.
+
+ * Docx reader (Jesse Rosenthal, except where noted):
+
+ + Handle nested sdt tags (#4415).
+ + Don't look up dependant run styles if `+styles` is enabled.
+ + Move pandoc inline styling inside custom-style span.
+ + Read custom styles (#1843). This will read all paragraph and
+ character classes as divs and spans, respectively. Dependent styles
+ will still be resolved, but will be wrapped with appropriate style
+ tags. It is controlled by the `+styles` extension (`-f docx+styles`).
+ This can be used in conjunction with the `custom-style` feature in the
+ docx writer for a pandoc-docx editing workflow. Users can convert from
+ an input docx, reading the custom-styles, and then use that same input
+ docx file as a reference-doc for producing an output docx file. Styles
+ will be maintained across the conversion, even if pandoc doesn't
+ understand them.
+ + Small change to Fields hyperlink parser. Previously, unquoted string
+ required a space at the end of the line (and consumed it). Now we
+ either take a space (and don't consume it), or end of input.
+ + Pick table width from the longest row or header (Francesco Occhipinti,
+ #4360).
+
+ * Muse writer (Alexander Krotov):
+
+ + Change verse markup: `> ` instead of `<verse>` tag.
+ + Remove empty strings during inline normalization.
+ + Don't indent nested definition lists.
+ + Use unicode quotes for quoted text.
+ + Write image width specified in percent in Text::Amuse mode.
+ + Don't wrap displayMath into `<verse>`.
+ + Escape nonbreaking space (`~~`).
+ + Join code with different attributes during normalization.
+ + Indent lists inside Div.
+ + Support definitions with multiple descriptions.
+
+ * Powerpoint writer (Jesse Rosenthal):
+
+ + Use table styles This will use the default table style in the
+ reference-doc file. As a result they will be easier when using
+ in a template, and match the color scheme.
+ + Remove empty slides. Because of the way that slides were split, these
+ could be accidentally produced by comments after images. When animations
+ are added, there will be a way to add an empty slide with either
+ incremental lists or pauses.
+ + Implement syntax highlighting. Note that background colors can't
+ be implemented in PowerPoint, so highlighting styles that require
+ these will be incomplete.
+ + New test framework for pptx. We now compare the output of the
+ Powerpoint writer with files that we know to (a) not be corrupt,
+ and (b) to show the desired output behavior (details below).
+ + Add `notesMaster` to `presentation.xml` if necessary.
+ + Ignore links and (end)notes in speaker notes.
+ + Output speaker notes.
+ + Read speaker note templates conditionally. If there are speaker
+ notes in the presentation, we read in the notesMasters templates
+ from the reference pptx file.
+ + Fix deletion track changes (#4303, Jesse Rosenthal).
+
+ * Markdown writer: properly escape @ to avoid capture as citation
+ (#4366).
+
+ * LaTeX writer:
+
+ + Put hypertarget inside figure environment (#4388).
+ This works around a problem with the endfloat package and
+ makes pandoc's output compatible with it.
+ + Fix image height with percentage (#4389). This previously caused
+ the image to be resized to a percentage of textwidth, rather than
+ textheight.
+
+ * ConTeXt writer (Henri Menke):
+
+ + New section syntax and support `--section-divs` (#2609).
+ `\section[my-header]{My Header}` ->
+ `\section[title={My Header},reference={my-header}]`.
+ The ConTeXt writer now supports the `--section-divs` option to
+ write sections in the fenced style, with `\startsection` and
+ `\stopsection`.
+ + xtables: correct wrong usage of caption (Henri Menke).
+
+ * Docx writer:
+
+ + Fix image resizing with multiple images (#3930, Andrew Pritchard).
+ + Use new golden framework (Jesse Rosenthal).
+ + Make more deterministic to facilitate testing (Jesse Rosenthal).
+ - `getUniqueId` now calls to the state to get an incremented digit,
+ instead of calling to P.uniqueHash.
+ - we always start the PRNG in mkNumbering/mkAbstractNum with the same
+ seed (1848), so our randoms should be the same each time.
+ + Fix ids in comment writing (Jesse Rosenthal). Comments from
+ `--track-changes=all` were producing corrupt docx, because the
+ writer was trying to get id from the `(ID,_,_)` field of
+ the attributes, and ignoring the "id" entry in the key-value pairs. We
+ now check both.
+
+ * Ms writer: Added papersize variable.
+
+ * TEI writer:
+
+ + Use `height` instead of `depth` for images (#4331).
+ + Ensure that id prefix is always used.
+ + Don't emit `role` attribute; that was a leftover from the
+ Docbook writer.
+ + Use 'xml:id', not 'id' attribute (#4371).
+
+ * AsciiDoc writer:
+
+ + Do not output implicit heading IDs (#4363, Alexander
+ Krotov). Convert to `asciidoc-auto_identifiers` for old behaviour.
+
+ * RST writer:
+
+ + Remove `blockToRST'` moving its logic into `fixBlocks`
+ (Francesco Occhipinti).
+ + Insert comment between lists and quotes (#4248, Francesco Occchipinti).
+
+ * RST template: remove definition of 'math' role as raw.
+ This used to be needed prior to v 0.8 of docutils, but
+ now math support is built-in.
+
+ * Slides: Use divs to set incremental/non-incremental (#4381,
+ Jesse Rosenthal). The old method (list inside blockquote) still
+ works, but we are encouraging the use of divs with class
+ `incremental` or `nonincremental`.
+
+ * Text.Pandoc.ImageSize:
+
+ + Make image size detection for PDFs more robust (#4322).
+ + Determine image size for PDFs (#4322).
+ + EMF Image size support (#4375, Andrew Pritchard).
+
+ * Text.Pandoc.Extensions:
+
+ + Add `Ext_styles` (Jesse Rosenthal, API change). This will be used in
+ the docx reader (defaulting to off) to read pargraph and character
+ styles not understood by pandoc (as divs and spans, respectively).
+ + Made `Ext_raw_html` default for `commonmark` format.
+
+ * Text.Pandoc.Parsing:
+
+ + Export `manyUntil` (Alexander Krotov, API change).
+ + Export improved `sepBy1` (Alexander Krotov).
+ + Export list marker parsers: `upperRoman`, `lowerRoman`,
+ `decimal`, `lowerAlpha`, `upperAlpha` (Alexander Krotov, API change).
+
+ * Tests/Lua: fix tests on windows (Albert Krewinkel).
-pandoc (1.19.2.3)
+ * Lua: register script name in global variable (#4393). The name of the Lua
+ script which is executed is made available in the global Lua variable
+ `PANDOC_SCRIPT_FILE`, both for Lua filters and custom writers.
+
+ * Tests: Abstract powerpoint tests out to OOXML tests (Jesse Rosenthal).
+ There is very little pptx-specific in these tests, so we abstract out
+ the basic testing function so it can be used for docx as well. This
+ should allow us to catch some errors in the docx writer that slipped
+ by the roundtrip testing.
+
+ * Lua filters: store constructors in registry (Albert Krewinkel). Lua
+ functions used to construct AST element values are stored in the Lua
+ registry for quicker access. Getting a value from the registry is much
+ faster than getting a global value (partly to idiosyncrasies of hslua);
+ this change results in a considerable performance boost.
+
+ * Documentation:
+
+ + `doc/org.md` Add draft of Org-mode documentation (Albert Krewinkel).
+ + `doc/lua-filters.md`: document global vars set for filters
+ (Albert Krewinkel).
+ + INSTALL.md: mention Stack version. (#4343, Adam Brandizzi).
+ + MANUAL: add documentation on custom styles (Jesse Rosenthal).
+ + MANUAL.txt: Document incremental and nonincremental divs (Jesse
+ Rosenthal). Blockquoted lists are still described, but fenced divs are
+ presented in preference.
+ + MANUAL.txt: document header and footer variables (newmana).
+ + MANUAL.txt: self-contained implies standalone (#4304, Daniel Lublin).
+ + CONTRIBUTING.md: label was renamed. (#4310, Alexander Brandizzi).
+
+ * Require tagsoup 0.14.3 (#4282), fixing HTML tokenization bug.
+
+ * Use latest texmath.
+
+ * Use latest pandoc-citeproc.
+
+ * Allow exceptions 0.9.
+
+ * Require aeson-pretty 0.8.5 (#4394).
+
+ * Bump blaze-markup, blaze-html lower bounds to 0.8, 0.9 (#4334).
+
+ * Update tagsoup to 0.14.6 (Alexander Krotov, #4282).
+
+ * Removed ghc-prof-options. As of cabal 1.24, sensible defaults are used.
+
+ * Update default.nix to current nixpkgs-unstable for hslua-0.9.5 (#4348,
+ jarlg).
+
+
+pandoc (2.1.1)
+
+ * Markdown reader:
+
+ + Don't coalesce adjacent raw LaTeX blocks if they are separated by a
+ blank line. See lierdakil/pandoc-crossref#160.
+ + Improved `inlinesInBalancedBrackets` (#4272, jgm/pandoc-citeproc#315).
+ The change both improves performance and fixes a regression whereby
+ normal citations inside inline notes and figure captions were not
+ parsed correctly.
+
+ * RST reader:
+
+ + Better handling for headers with an anchor (#4240). Instead of creating a
+ Div containing the header, we put the id directly on the header.
+ This way header promotion will work properly.
+ + Add aligned environment when needed in math (#4254). `rst2latex.py`
+ uses an `align*` environment for math in `.. math::` blocks, so this
+ math may contain line breaks. If it does, we put the math in an
+ `aligned` environment to simulate `rst2latex.py`'s behavior.
+
+ * HTML reader:
+
+ + Fix col width parsing for percentages < 10% (#4262, n3fariox).
+
+ * LaTeX reader:
+
+ + Advance source position at end of stream.
+ + Pass through macro defs in `rawLaTeXBlock` even if the `latex_macros`
+ extension is set (#4246). This reverts to earlier behavior and is
+ probably safer on the whole, since some macros only modify things in
+ included packages, which pandoc's macro expansion can't modify.
+ + Fixed pos calculation in tokenizing escaped space.
+ + Allow macro definitions inside macros (#4253). Previously we went into
+ an infinite loop with
+ ```
+ \newcommand{\noop}[1]{#1}
+ \noop{\newcommand{\foo}[1]{#1}}
+ \foo{hi}
+ ```
+ + Fix inconsistent column widths (#4238). This fixes a bug whereby column
+ widths for the body were different from widths for the header in some
+ tables.
+
+ * Docx reader (Jesse Rosenthal):
+
+ + Parse hyperlinks in `instrText` tags (#3389, #4266). This was a form of
+ hyperlink found in older versions of word. The changes introduced for
+ this, though, create a framework for parsing further fields in MS Word
+ (see the spec, ECMA-376-1:2016, §17.16.5, for more on these fields).
+ We introduce a new module, `Text.Pandoc.Readers.Docx.Fields` which
+ contains a simple parsec parser. At the moment, only simple hyperlink
+ fields are accepted, but that can be extended in the future.
+
+ * Muse reader (Alexander Krotov):
+
+ + Parse `~~` as non-breaking space in Text::Amuse mode.
+ + Refactor list parsing.
+
+ * Powerpoint writer (Jesse Rosenthal):
+
+ + Change reference to `notesSlide` to `endNotesSlide`.
+ + Move image sizing into `picProps`.
+ + Improve table placement.
+ + Make our own `_rels/.rels` file.
+ + Import reference-doc images properly.
+ + Move `Presentation.hs` out of `PandocMonad`.
+ + Refactor into separate modules. T.P.W.Powerpoint.Presentation
+ defines the Presentation datatype and goes Pandoc->Presentation;
+ T.P.W.Pandoc.Output goes Presentation->Archive.
+ Text.Pandoc.Writers.Powerpoint a thin wrapper around the two modules.
+ + Avoid overlapping blocks in column output.
+ + Position images correctly in two-column layout.
+ + Make content shape retrieval environment-aware.
+ + Improve image handling. We now determine image and caption placement
+ by getting the dimensions of the content box in a given layout.
+ This allows for images to be correctly sized and positioned in a
+ different template. Note that images without captions and headers are
+ no longer full-screened. We can't do this dependably in different
+ layouts, because we don't know where the header is (it could be to
+ the side of the content, for example).
+ + Read presentation size from reference file. Our presentation size is
+ now dependent on the reference/template file we use.
+ + Handle (sub)headers above slidelevel correctly. Above the slidelevel,
+ subheaders will be printed in bold and given a bit of extra space
+ before them. Note that at the moment, no distinction is made between
+ levels of headers above the slide header, though that can be changed.
+ + Check for required files. Since we now import from reference/dist
+ file by glob, we need to make sure that we're getting the files we
+ need to make a non-corrupt Powerpoint. This performs that check.
+ + Improve templating using `--reference-doc`. Templating should work
+ much more reliably now.
+ + Include Notes slide in TOC.
+ + Set notes slide header to slide-level.
+ + Add table of contents. This is triggered by the `--toc` flag. Note
+ that in a long slide deck this risks overrunning the text box. The user
+ can address this by setting `--toc-depth=1`.
+ + Set notes slide number correctly.
+ + Clean up adding metadata slide. We want to count the slide numbers
+ correctly if it's in there.
+ + Add anchor links. For anchor-type links (`[foo](#bar)`) we produce
+ an anchor link. In powerpoint these are links to slides, so we keep
+ track of a map relating anchors to the slides they occur on.
+ + Make the slide number available to the blocks. For anchors,
+ block-processing functions need to know what slide number
+ they're in. We make the `envCurSlideId` available to blocks.
+ + Move `curSlideId` to environment.
+ + Allow setting `toc-title` in metadata.
+ + Link notes to endnotes slide.
+
+ * Markdown writer:
+
+ + Fix cell width calculation (#4265). Previously we could get
+ ever-lengthening cell widths when a table was run repeatedly through
+ `pandoc -f markdown -t markdown`.
+
+ * LaTeX writer:
- * Add CPP to Setup.hs so it works with Cabal >= 2 and < 2.
+ + Escape `&` in lstinline (Robert Schütz).
+
+ * ConTeXt writer:
+
+ + Use xtables instead of Tables (#4223, Henri Menke).
+ Default to xtables for context output. Natural Tables are used
+ if the new `ntb` extension is set.
+
+ * HTML writer:
+
+ + Fixed footnote backlinks with `--id-prefix` (#4235).
+
+ * `Text.Pandoc.Extensions`: Added `Ext_ntb` constructor (API change,
+ Henri Menke).
+
+ * `Text.Pandoc.ImageSize`: add derived `Eq` instance to `Dimension`
+ (Jesse Rosenthal, API change).
+
+ * Lua filters (Albert Krewinkel):
+
+ + Make `PANDOC_READER_OPTIONS` available.
+ The options which were used to read the document are made available to
+ Lua filters via the `PANDOC_READER_OPTIONS` global.
+ + Add lua module `pandoc.utils.run_json_filter`, which runs a JSON filter
+ on a Pandoc document.
+ + Refactor filter-handling code into `Text.Pandoc.Filter.JSON`,
+ `Text.Pandoc.Filter.Lua`, and `Text.Pandoc.Filter.Path`.
+ + Improve error messages. Provide more context about the task
+ which caused an error.
+
+ * data/pandoc.lua (Albert Krewinkel):
+
+ + Accept singleton inline as a list. Every constructor which accepts a
+ list of inlines now also accepts a single inline element for
+ convenience.
+ + Accept single block as singleton list. Every constructor which accepts
+ a list of blocks now also accepts a single block element for
+ convenience. Furthermore, strings are accepted as shorthand for
+ `{pandoc.Str "text"}` in constructors.
+ + Add attr, listAttributes accessors. Elements with
+ attributes got an additional `attr` accessor. Attributes were
+ accessible only via the `identifier`, `classes`, and `attributes`,
+ which was in conflict with the documentation, which indirectly states
+ that such elements have the an `attr` property.
+ + Drop `_VERSION`. Having a `_VERSION` became superfluous, as this
+ module is closely tied to the pandoc version, which is available via
+ `PANDOC_VERSION`.
+ + Fix access to Attr components. Accessing an Attr value (e.g.,
+ ` Attr().classes`) was broken; the more common case of accessing it via
+ an Inline or Block element was unaffected by this.
+
+ * Move `metaValueToInlines` to from Docx writer to
+ `Text.Pandoc.Writers.Shared`, so it can be used by other writers
+ (Jesse Rosenthal).
+
+ * MANUAL.txt:
+
+ + Clarify otherlangs in LaTeX (#4072).
+ + Clarify `latex_macros` extension.
+ + Recommend use of `raw_attribute` extension in header includes (#4253).
+
+ * Allow latest QuickCheck, tasty, criterion.
+
+ * Remove custom prelude and ghc 7.8 support.
+
+ * Reduce compiler noise (exact paths for compiled modules).
+
+pandoc (2.1)
+
+ * Allow filters and lua filters to be interspersed (#4196). Previously
+ we ran all lua filters before JSON filters. Now we run filters in
+ the order they are presented on the command line, whether lua or JSON.
+ There are two incompatible API changes: The type of `applyFilters`
+ has changed, and `applyLuaFilters` has been removed. `Filter` is
+ also now exported.
+
+ * Use latest skylighting and omit the `missingIncludes` check, fixing
+ a major performance regression in earlier releases of the 2.x series
+ (#4226). Behavior change: If you use a custom syntax definition that
+ refers to a syntax you haven't loaded, pandoc will now complain when
+ it is highlighting the text, rather than doing a check at the start.
+ This change dramatically speeds up invocations of pandoc on short
+ inputs.
+
+ * Text.Pandoc.Class: make `FileTree` opaque (don't export
+ `FileTree` constructor). This forces users to interact with it using
+ `insertInFileTree` and `getFileInfo`, which normalize file names.
+
+ * Markdown reader:
+
+ + Rewrite `inlinesInBalancedBrackets`. The rewrite is much more
+ direct, avoiding `parseFromString`. And it performs significantly
+ better; unfortunately, parsing time still increases exponentially
+ (see #1735).
+ + Avoid parsing raw tex unless `\` + letter seen. This seems to
+ help with the performance problem, #4216.
+
+ * LaTeX reader: Simplified a check for raw tex command.
+
+ * Muse reader (Alexander Krotov):
+
+ + Enable round trip test (#4107).
+ + Automatically translate `#cover` into `#cover-image`.
+ Amusewiki uses #cover directive to specify cover image.
+
+ * Docx reader (Jesse Rosenthal):
+
+ + Allow for insertion/deletion of paragraphs (#3927).
+ If the paragraph has a deleted or inserted paragraph break (depending
+ on the track-changes setting) we hold onto it until the next
+ paragraph. This takes care of accept and reject. For this we introduce
+ a new state which holds the ils from the previous para if necessary.
+ For `--track-changes=all`, we add an empty span with class
+ `paragraph-insertion`/`paragraph-deletion` at the end of the paragraph
+ prior to the break to be inserted or deleted.
+ + Remove unused anchors (#3679). Docx produces a lot of anchors with
+ nothing pointing to them---we now remove these to produce cleaner
+ output. Note that this has to occur at the end of the process
+ because it has to follow link/anchor rewriting.
+ + Read multiple children of `w:sdtContents`.
+ + Combine adjacent anchors. There isn't any reason to have numerous
+ anchors in the same place, since we can't maintain docx's
+ non-nesting overlapping. So we reduce to a single anchor.
+ + Improved tests.
+
+ * Muse writer (Alexander Krotov): don't escape URIs from AST
+
+ * Docx writer:
+
+ + Removed redundant subtitle in title (Sebastian Talmon).
+ + `firstRow` table definition compatibility for Word 2016 (Sebastian
+ Talmon). Word 2016 seems to use a default value of "1" for table
+ headers, if there is no firstRow definition (although a default
+ value of 0 is documented), so all tables get the first Row formatted
+ as header. Setting the parameter to 0 if the table has no header
+ row fixes this for Word 2016
+ + Fix custom styles with spaces in the name (#3290).
+
+ * Powerpoint writer (Jesse Rosenthal):
+
+ + Ignore Notes div for parity with other slide outputs.
+ + Set default slidelevel correctly. We had previously defaulted to
+ slideLevel 2. Now we use the correct behavior of defaulting to the
+ highest level header followed by content. We change an expected test
+ result to match this behavior.
+ + Split blocks correctly for linked images.
+ + Combine adjacent runs.
+ + Make inline code inherit code size. Previously (a) the code size
+ wasn't set when we force size, and (b) the properties was set from
+ the default, instead of inheriting.
+ + Simplify `replaceNamedChildren` function.
+ + Allow linked images. The following markdown:
+ `[![Image Title](image.jpg)](http://www.example.com)`
+ will now produce a linked image in the resulting PowerPoint file.
+ + Fix error with empty table cell. We require an empty `<a:p>` tag,
+ even if the cell contains no paragraphs---otherwise PowerPoint
+ complains of corruption.
+ + Implement two-column slides. This uses the columns/column div
+ format described in the pandoc manual. At the moment, only two
+ columns (half the screen each) are allowed. Custom widths are not
+ supported.
+ + Added more tests.
+
+ * OpenDocument/ODT writers: improved rendering of formulas (#4170, oltolm).
+
+ * Lua filters (Albert Krewinkel):
+
+ + `data/pandoc.lua`: drop 'pandoc-api-version' from Pandoc objects
+ + The current pandoc-types version is made available to Lua programs in
+ the global `PANDOC_API_VERSION`. It contains the version as a list of
+ numbers.
+ + The pandoc version available as a global `PANDOC_VERSION` (a list
+ of numbers).
+ + `data/pandoc.lua`: make `Attr` an `AstElement`.
+ + `data/pandoc.lua`: make all types subtypes of `AstElement`.
+ `Pandoc`, `Meta`, and `Citation` were just plain functions and did
+ not set a metatable on the returned value, which made it difficult
+ to amend objects of these types with new behavior. They are now
+ subtypes of AstElement, meaning that all their objects can gain
+ new features when a method is added to the behavior object
+ (e.g., `pandoc.Pandoc.behavior`).
+ + `data/pandoc.lua`: split type and behavior tables. Clearly distinguish
+ between a type and the behavioral properties of an instance of that
+ type. The behavior of a type (and all its subtypes) can now be
+ amended by adding methods to that types `behavior` object, without
+ exposing the type objects internals. E.g.:
+ ```lua
+ pandoc.Inline.behavior.frob = function () print'42' end
+ local str = pandoc.Str'hello'
+ str.frob() -- outputs '42'
+ ```
+ + `data/pandoc.lua`: fix Element inheritance. Extending all elements
+ of a given type (e.g., all inline elements) was difficult, as the
+ table used to lookup unknown methods would be reset every time a
+ new element of that type was created, preventing recursive property
+ lookup. This is was changed in that all methods and attributes of
+ supertypes are now available to their subtypes.
+ + `data/pandoc.lua`: fix attribute names of Citation (#4222). The
+ fields were named like the Haskell fields, not like the documented,
+ shorter version. The names are changed to match the documentation
+ and Citations are given a shared metatable to enable simple
+ extensibility.
+ + `data/pandoc.lua`: drop function `pandoc.global_filter`.
+ + Bump `hslua` version to 0.9.5. This version fixes a bug that made it
+ difficult to handle failures while getting lists or a Map from Lua.
+ A bug in pandoc, which made it necessary to always pass a tag when
+ using MetaList or MetaBlock, is fixed as a result. Using the pandoc
+ module's constructor functions for these values is now optional
+ (if still recommended).
+ + Stop exporting `pushPandocModule` (API change). The introduction
+ of `runPandocLua` renders direct use of this function obsolete.
+ + Update generation of module docs for lua filters.
+ + `Lua.Module.Utils`: make stringify work on `MetaValues` (John
+ MacFarlane). I'm sure this was intended in the first place,
+ but currently only `Meta` is supported.
+
+ * Improve benchmarks.
+
+ + Set the default extensions properly.
+ + Improve benchmark argument parsing. You can now say
+ `make bench BENCHARGS="markdown latex reader"` and both the
+ markdown and latex readers will be benchmarked.
+
+ * MANUAL.txt simplify and add more structure (Mauro Bieg).
+
+ * Generate README.md from template and MANUAL.txt.
+ `make README.md` will generate the README.md after changes
+ to MANUAL.txt have been made.
+
+ * Update copyright notices to include 2018 (Albert Krewinkel).
+
+pandoc (2.0.6)
+
+ * Added `jats` as an input format.
+
+ + Add Text.Pandoc.Readers.JATS, exporting `readJATS` (API
+ change) (Hamish Mackenzie).
+ + Improved citation handling in JATS reader. JATS citations
+ are now converted to pandoc citations, and JATS ref-lists
+ are converted into a `references` field in metadata, suitable
+ for use with pandoc-citeproc. Thus a JATS article with embedded
+ bibliographic information can be processed with pandoc and
+ pandoc-citeproc to produce a formatted bibliography.
+
+ * Allow `--list-extensions` to take an optional FORMAT argument.
+ This lists the extensions set by default for the selected FORMAT.
+ The extensions are now alphabetized, and the `+` or `-`
+ indicating the default setting comes before, rather than after,
+ the extension.
+
+ * Markdown reader:
+
+ + Preserve original whitespace between blocks.
+ + Recognize `\placeformula` as context.
+ + Be pickier about table captions. A caption starts with a `:` which
+ can't be followed by punctuation. Otherwise we can falsely interpret
+ the start of a fenced div, or even a table header line like
+ `:--:|:--:`, as a caption.
+ + Always use four space rule for example lists. It would be awkward
+ to indent example list contents to the first non-space character after
+ the label, since example list labels are often long. Thanks to
+ Bernhard Fisseni for the suggestion.
+ + Improve raw tex parsing. Note that the Markdown reader is also
+ affected by the `latex_macros` extension changes described below
+ under the LaTeX reader.
+
+ * LaTeX reader:
+
+ + `latex_macros` extension changes (#4179). Don't pass through macro
+ definitions themselves when `latex_macros` is set. The macros
+ have already been applied. If `latex_macros` is enabled, then
+ `rawLaTeXBlock` in Text.Pandoc.Readers.LaTeX will succeed in parsing
+ a macro definition, and will update pandoc's internal macro map
+ accordingly, but the empty string will be returned.
+ + Export `tokenize`, `untokenize` (API change).
+ + Use `applyMacros` in `rawLaTeXBlock`, `rawLaTeXInline`.
+ + Refactored `inlineCommand`.
+ + Fix bug in tokenizer. Material following `^^` was
+ dropped if it wasn't a character escape. This only affected
+ invalid LaTeX, so we didn't see it in the wild, but it appeared
+ in a QuickCheck test failure.
+ + Fix regression in LateX tokenization (#4159). This mainly affects the
+ Markdown reader when parsing raw LaTeX with escaped spaces.
+ + Add tests of LaTeX tokenizer.
+ + Support `\foreignlanguage` from babel.
+ + Be more tolerant of `&` character (#4208). This allows us to parse
+ unknown tabular environments as raw LaTeX.
+
+ * Muse reader (Alexander Krotov):
+
+ + Parse anchors immediately after headings as IDs.
+ + Require that note references does not start with 0.
+ + Parse empty comments correctly.
+
+ * Org reader (Albert Krewinkel):
+
+ + Fix asterisks-related parsing error (#4180).
+ + Support minlevel option for includes (#4154). The level of headers
+ in included files can be shifted to a higher level by specifying a
+ minimum header level via the `:minlevel` parameter. E.g.
+ `#+include: "tour.org" :minlevel 1` will shift the headers in
+ tour.org such that the topmost headers become level 1 headers.
+ + Break-up org reader test file into multiple modules.
+
+ * OPML reader:
+
+ + Enable raw HTML and other extensions by default for notes
+ (#4164). This fixes a regression in 2.0. Note that extensions can
+ now be individually disabled, e.g. `-f opml-smart-raw_html`.
+
+ * RST reader:
+
+ + Allow empty list items (#4193).
+ + More accurate parsing of references (#4156). Previously we erroneously
+ included the enclosing backticks in a reference ID (#4156). This
+ change also disables interpretation of syntax inside references, as
+ in docutils. So, there is no emphasis in `` `my *link*`_ ``.
+
+ * Docx reader:
+
+ + Continue lists after interruption (#4025, Jesse Rosenthal).
+ Docx expects that lists will continue where they left off after an
+ interruption and introduces a new id if a list is starting again. So
+ we keep track of the state of lists and use them to define a "start"
+ attribute, if necessary.
+ + Add tests for structured document tags unwrapping (Jesse Rosenthal).
+ + Preprocess Document body to unwrap `w:sdt` elements (Jesse Rosenthal,
+ #4190).
+
+ * Plain writer:
+
+ + Don't linkify table of contents.
+
+ * RST writer:
+
+ + Fix anchors for headers (#4188). We were missing an `_`.
+
+ * PowerPoint writer (Jesse Rosenthal):
+
+ + Treat lists inside BlockQuotes as lists. We don't yet produce
+ incremental lists in PowerPoint, but we should at least treat lists
+ inside BlockQuotes as lists, for compatibility with other slide formats.
+ + Add ability to force size. This replaces the more specific
+ `blockQuote runProp`, which only affected the size of blockquotes. We
+ can use this for notes, etc.
+ + Implement notes. This currently prints all notes on a final slide.
+ Note that at the moment, there is a danger of text overflowing the
+ note slide, since there is no logic for adding further slides.
+ + Implement basic definition list functionality to PowerPoint writer.
+ + Don't look for default template file for Powerpoint (#4181).
+ + Add pptx to isTextFormat list. This is used to check standalone
+ and not writing to the terminal.
+ + Obey slide level option (Jesse Rosenthal).
+ + Introduce tests.
+
+ * Docx writer:
+
+ + Ensure that `distArchive` is the one that comes with pandoc
+ (#4182). Previously a `reference.docx` in `~/.pandoc` (or the user data
+ dir) would be used instead, and this could cause problems because a
+ user-modified docx sometimes lacks vital sections that we count
+ on the `distArchive` to supply.
+
+ * Org writer:
+
+ + Do not wrap "-" to avoid accidental bullet lists (Alexander Krotov).
+ + Don't allow fn refs to wrap to beginning of line (#4171, with help from
+ Alexander Krotov). Otherwise they can be interpreted as footnote
+ definitions.
+
+ * Muse writer (Alexander Krotov):
+
+ + Don't wrap note references to the next line (#4172).
+
+ * HTML writer:
+
+ + Use br elements in line blocks instead of relying on CSS
+ (#4162). HTML-based templates have had the custom CSS for
+ `div.line-block` removed. Those maintaining custom templates will want
+ to remove this too. We still enclose line blocks in a div with class
+ `line-block`.
+
+ * LaTeX writer:
+
+ + Use `\renewcommand` for `\textlatin` with babel (#4161).
+ This avoids a clash with a deprecated `\textlatin` command defined
+ in Babel.
+ + Allow fragile=singleslide attribute in beamer slides (#4169).
+ + Use `\endhead` after `\toprule` in headerless tables (#4207).
+
+ * FB2 writer:
+
+ + Add cover image specified by `cover-image` meta (Alexander Krotov,
+ #4195).
+
+ * JATS writer (Hamish Mackenzie):
+
+ + Support writing `<fig>` and `<table-wrap>` elements
+ with `<title>` and `<caption>` inside them by using Divs with class set
+ to one of `fig`, `table-wrap` or `caption` (Hamish Mackenzie). The
+ title is included as a Heading so the constraint on where Heading can
+ occur is also relaxed.
+ + Leave out empty alt attributes on links.
+ + Deduplicate image mime type code.
+ + Make `<p>` optional in `<td>` and `<th>` (#4178).
+ + Self closing tags for empty xref (#4187).
+ + Improve support for code language.
+
+ * Custom writer:
+
+ + Use init file to setup Lua interpreter (Albert Krewinkel).
+ The same init file (`data/init`) that is used to setup the Lua
+ interpreter for Lua filters is also used to setup the interpreter of
+ custom writers.lua.
+ + Define instances for newtype wrapper (Albert Krewinkel). The custom
+ writer used its own `ToLuaStack` instance definitions, which made
+ it difficult to share code with Lua filters, as this could result
+ in conflicting instances. A `Stringify` wrapper is introduced to
+ avoid this problem.
+ + Added tests for custom writer.
+ + Fixed definition lists and tables in `data/sample.lua`.
+
+ * Fixed regression: when target is PDF, writer extensions were being
+ ignored. So, for example, `pandoc -t latex-smart -o file.pdf`
+ did not work properly.
+
+ * Lua modules (Albert Krewinkel):
+
+ + Add `pandoc.utils` module, to hold utility functions.
+ + Create a Haskell module Text.Pandoc.Lua.Module.Pandoc to
+ define the `pandoc` lua module.
+ + Make a Haskell module for each Lua module. Move definitions for the
+ `pandoc.mediabag` modules to a separate Haskell module.
+ + Move `sha1` from the main `pandoc` module to `pandoc.utils`.
+ + Add function `pandoc.utils.hierarchicalize` (convert list of
+ Pandoc blocks into (hierarchical) list of Elements).
+ + Add function `pandoc.utils.normalize_date` (parses a date and
+ converts it (if possible) to "YYYY-MM-DD" format).
+ + Add function `pandoc.utils.to_roman_numeral` (allows conversion
+ of numbers below 4000 into roman numerals).
+ + Add function `pandoc.utils.stringify` (converts any AST element
+ to a string with formatting removed).
+ + `data/init.lua`: load `pandoc.utils` by default
+ + Turn pipe, read into full Haskell functions. The `pipe` and `read`
+ utility functions are converted from hybrid lua/haskell functions
+ into full Haskell functions. This avoids the need for intermediate
+ `_pipe`/`_read` helper functions, which have dropped.
+ + pandoc.lua: re-add missing MetaMap function. This was a bug
+ introduced in version 2.0.4.
+
+ * Text.Pandoc.Class: Add `insertInFileTree` [API change]. This gives
+ a pure way to insert an ersatz file into a `FileTree`. In addition, we
+ normalize paths both on insertion and on lookup.
+
+ * Text.Pandoc.Shared: export `blocksToInlines'` (API change, Maura Bieg).
+
+ * Text.Pandoc.MIME: Add opus to MIME type table as audio/ogg (#4198).
+
+ * Text.Pandoc.Extensions: Alphabetical order constructors for
+ `Extension`. This makes them appear in order in `--list-extensions`.
+
+ * Allow lenient decoding of latex error logs, which are not always
+ properly UTF8-encoded (#4200).
+
+ * Update latex template to work with recent versions of beamer.
+ The old template produced numbered sections with some recent
+ versions of beamer. Thanks to Thomas Hodgson.
+
+ * Updated reference.docx (#4175). Instead of just "Hello, world", the
+ document now contains exemplars of most of the styles that have an
+ effect on pandoc documents. This makes it easier to see the effect
+ of style changes.
+
+ * Removed `default.theme` data file (#4096). It is no longer needed now
+ that we have `--print-highlight-style`.
+
+ * Added `stack.lts9.yaml` for building with lts 9 and ghc 8.0.2.
+ We still need this for the alpine static linux build, since
+ we don't have ghc 8.2.2 for that yet.
+
+ * Removed `stack.pkg.yaml`. We only really need `stack.yaml`; we
+ can put flag settings for pandoc-citeproc there.
+
+ * Makefile: Add 'trypandoc' and 'pandoc-templates' targets to
+ make releases easier.
+
+ * MANUAL.txt:
+
+ + Add note on what formats have `+smart` by default.
+ + Use native syntax for custom-style (#4174, Mauro Bieg).
+ + Introduce dedicated Extensions section, since some extensions
+ affect formats other than markdown (Mauro Bieg, #4204).
+ + Clarify default html output for `--section-divs` (Richard Edwards).
+
+ * filters.md: say that Text.Pandoc.JSON comes form pandoc-types.
+ Closes jgm/pandoc-website#16.
+
+ * epub.md: Delete removed `-S` option from command (#4151, Georger Araújo).
+
+pandoc (2.0.5)
+
+ * Fix a bug in 2.0.4, whereby pandoc could not read the theme files
+ generated with `--print-highlight-style` (#4133). Improve JSON
+ serialization of styles.
+
+ * Fix CSS issues involving line numbers (#4128).
+ Highlighted code blocks are now enclosed in a div with class `sourceCode`.
+ Highlighting CSS no longer sets a generic color for pre and code; we only
+ set these for class `sourceCode`.
+
+ * `--pdf-engine-opt`: fix bug where option order was reversed (#4137).
+
+ * Add PowerPoint (pptx) writer (Jesse Rosenthal).
+ It works following the standard Pandoc conventions for making other
+ sorts of slides. Caveats:
+
+ + Syntax highlighting is not yet implemented. (This is difficult
+ because there are no character classes in Powerpoint.)
+ + Footnotes and Definition lists are not yet implemented. (Notes will
+ usually take the form of a final slide.
+ + Image placement and auto-resizing has a few glitches.
+ + Reference powerpoint files don't work dependably from the command
+ line. This will be implemented, but at the moment users are advised
+ to change themes from within Powerpoint.
+
+ * Create shared Text.Pandoc.Writers.OOXML module (Jesse Rosenthal).
+ This is for functions used by both Powerpoint and Docx writers.
+
+ * Add default pptx data for Powerpoint writer (Jesse Rosenthal).
+
+ * Add `empty_paragraphs` extension.
+
+ + Deprecate `--strip-empty-paragraphs` option. Instead we now
+ use an `empty_paragraphs` extension that can be enabled on
+ the reader or writer. By default, disabled.
+ + Add `Ext_empty_paragraphs` constructor to `Extension`.
+ + Revert "Docx reader: don't strip out empty paragraphs."
+ This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b.
+ + Implement `empty_paragraphs` extension in docx reader and writer,
+ opendocument writer, HTML reader and writer.
+ + Add tests for `empty_paragraphs` extension.
+
+ * Markdown reader:
+
+ + Don't parse native div as table caption (#4119).
+ + Improved computation of column widths in pipe tables.
+ Pipe tables with lines longer than the text width (as set
+ by `--columns`) are now scaled to text width, with the relative
+ widths of columns determined by the ratios between the
+ header lines. Previously we computed column widths using
+ the ratio of header line lengths to column width, so that
+ tables with narrow header lines were extremely thin, which
+ was very rarely the desired result.
+
+ * LaTeX reader: fix `\` before newline (#4134). This should be a space,
+ as long as it's not followed by a blank line. This has been fixed at the
+ tokenizer level.
+
+ * Muse reader (Alexander Krotov):
+
+ + Add test for `#disable-tables` directive in Emacs mode.
+ + Don't allow emphasis to be preceded by letter.
+ + Add underline support in Emacs Muse mode..
+ + Support multiline directives in Amusewiki mode
+
+ * Man writer: omit internal links (#4136). That is, just print the link
+ text without the URL.
+
+ * Markdown reader: accept processing instructions as raw HTML (#4125).
+
+ * Lua filters (Albert Krewinkel):
+
+ + Use script to initialize the interpreter. The file `init.lua` is
+ used to initialize the Lua interpreter which is used in Lua filters.
+ This gives users the option to require libraries which they want to
+ use in all of their filters, and to extend default modules.
+ + Fix package loading for Lua 5.1. The list of package searchers is
+ named `package.loaders` in Lua 5.1 and LuaJIT, and `package.searchers`
+ in Lua 5.2 and later.
+ + Refactor lua module handling. The integration with Lua's package/module
+ system is improved: A pandoc-specific package searcher is prepended to
+ the searchers in `package.searchers`. The modules `pandoc` and
+ `pandoc.mediabag` can now be loaded via `require`.
+ + Bump lower bound of hslua. The release hslua 0.9.3 contains a new
+ function which makes using Haskell functions as package loaders much
+ easier.
+
+ * reveal.js template: add title-slide identifier to title slide (#4120).
+ This allows it to be styled more easily.
+
+ * LaTeX template: Added support for `pagestyle` variable (#4135,
+ Thomas Hodgson)
+
+ * Add `-threaded` to ghc-options for executable (#4130, fixes a build
+ error on linux).
+
+
+pandoc (2.0.4)
+
+ * Add `--print-highlight-style` option. This generates a JSON version
+ of a highlighting style, which can be saved as a `.theme` file, modified,
+ and used with `--highlight-style` (#4106, #4096).
+
+ * Add `--strip-empty-paragraphs` option. This works for any input format.
+ It is primarily intended for use with docx and odt documents where
+ empty paragraphs have been used for inter-paragraph spaces.
+
+ * Support `--webtex` for `gfm` output.
+
+ * Recognize `.muse` file extension.
+
+ * Support beamer `\alert` in LaTeX reader. Closes #4091.
+
+ * Docx reader: don't strip out empty paragraphs (#2252).
+ Users who have a conversion pipeline from docx may want to consider adding
+ `--strip-empty-paragraphs` to the command line.
+
+ * Org reader (Albert Krewinkel): Allow empty list items (#4090).
+
+ * Muse reader (Alexander Krotov):
+
+ + Parse markup in definition list terms.
+ + Allow definition to end with EOF.
+ + Make code blocks round trip.
+ + Drop common space prefix from list items.
+ + Add partial round trip test.
+ + Don't interpret XML entities.
+ + Remove `nested`.
+ + Parse `~~` as non-breaking space in Emacs mode.
+ + Correctly remove indentation from notes. Exactly one space is
+ required and considered to be part of the marker.
+ + Allow list items to be empty.
+ + Add ordered list test.
+ + Add more multiline definition tests.
+ + Don't allow blockquotes within lists.
+ + Fix reading of multiline definitions.
+ + Add inline `<literal>` support.
+ + Concatenate inlines of the same type
+
+ * Docx writer: allow empty paragraphs (#2252).
+
+ * CommonMark/gfm writer:
+
+ + Use raw html for native divs/spans (#4113). This allows a pandoc
+ markdown native div or span to be rendered in gfm using raw html tags.
+ + Implement `raw_html` and `raw_tex` extensions. Note that `raw_html`
+ is enabled by default for `gfm`, while `raw_tex` is disabled by default.
+
+ * Muse writer (Alexander Krotov):
+
+ + Test that inline math conversion result is normalized.
+ Without normalization this test produced
+ `<em>a</em><em>b</em><em>c</em>`.
+ + Improve inline list normalization and move to writer.
+ + Escape hash symbol.
+ + Escape `----` to avoid accidental horizontal rules.
+ + Escape only `</code>` inside code tag.
+ + Additional `<verbatim>` is not needed as `<code>` is verbatim already.
+
+ * LaTeX writer:
+
+ + Allow specifying just width or height for image size.
+ Previously both needed to be specified (unless the image was
+ being resized to be smaller than its original size).
+ If height but not width is specified, we now set width to
+ textwidth. If width but not height is specified, we now set
+ height to textheight. Since we have `keepaspectratio`, this
+ yields the desired result.
+ + Escape `~` and `_` in code with `--listings` (#4111).
+
+ * HTML writer: export `tagWithAttributes`. This is a helper allowing
+ other writers to create single HTML tags.
+
+ * Let papersizes `a0`, `a1`, `a2`, ... be case-insensitive by
+ converting the case as needed in LaTeX and ConTeXt writers.
+
+ * Change `fixDisplayMath` from `Text.Pandoc.Writers.Shared`
+ so that it no longer produces empty `Para`'s as an artifact.
+
+ * `Text.Pandoc.Shared.blocksToInlines`: rewrote using builder.
+ This gives us automatic normalization, so we don't get
+ for example two consecutive Spaces.
+
+ * Include default CSS for 'underline' class in HTML-based templates.
+
+ * revealjs template: add `tex2jax` configuration for the
+ math plugin. With the next release of reveal.js, this will
+ fix the problem of `$`s outside of math contexts being
+ interpreted as math delimiters (#4027).
+
+ * `pandoc.lua` module for use in lua filters (Albert Krewinkel):
+
+ + Add basic lua List module (#4099, #4081). The List module is
+ automatically loaded, but not assigned to a global variable. It can be
+ included in filters by calling `List = require 'List'`. Lists of blocks,
+ lists of inlines, and lists of classes are now given `List` as a metatable,
+ making working with them more convenient. E.g., it is now possible to
+ concatenate lists of inlines using Lua's concatenation operator `..`
+ (requires at least one of the operants to have `List` as a metatable):
+
+ function Emph (emph)
+ local s = {pandoc.Space(), pandoc.Str 'emphasized'}
+ return pandoc.Span(emph.content .. s)
+ end
+
+ The `List` metatable is assigned to the tables which get passed to
+ the constructors `MetaBlocks`, `MetaInline`, and `MetaList`. This
+ enables the use of the resulting objects as lists.
+ + `Lua/StackInstances`: push Pandoc and Meta via constructor.
+ Pandoc and Meta elements are now pushed by calling the respective
+ constructor functions of the pandoc Lua module. This makes serialization
+ consistent with the way blocks and inlines are pushed to lua and allows
+ to use List methods with the `blocks` value.
+ + Add documentation for pandoc.List in `lua-filters.md`.
+
+ * Use latest tagsoup. This fixes a bug in parsing HTML tags with
+ `&` (but not a valid entity) following them (#4094, #4088).
+
+ * Use skylighting 0.4.4.1, fixing the color of unmarked code text
+ when `numberLines` is used (#4103).
+
+ * Make `normalizeDate` more forgiving (Mauro Bieg, #4101), not
+ requiring a leading 0 on single-digit days.
+
+ * Fix `--help` output for `--highlight-style` to include `FILE` (Mauro
+ Bieg, #4095).
+
+ * Clearer deprecation warning for `--latexmathml, --asciimathml, -m`.
+ Previously we only mentioned `--latexmathml`, even if `-m` was
+ used.
+
+ * Changelog: fix description of lua filters in 2.0 release
+ (Albert Krewinkel). Lua filters were initially run *after* conventional
+ (JSON) filters. However, this was changed later to make it easier to deal
+ with files in the mediabag. The changelog is updated to describe that
+ feature of the 2.0 release correctly.
+
+ * Change Generic JSON instances to TemplateHaskell (Jasper Van der Jeugt,
+ #4085). This reduces compile time and memory usage significantly.
+
+ * `lua-filters.md`: Added tikz filter example.
+
+ * Create alternative zip file for macOS binaries.
+
+ * Create alternative zip file for Windows binaries.
+
+ * Update INSTALL.md since we now provide zips for binaries.
+
+ * Relax `http-types` dependency (Justus Sagemüller, #4084).
+
+ * Add `epub.md`, `getting-started.md` to docs. These used to live in
+ the website repo.
+
+ * Add `packages` target to Makefile.
+
+ * Bump bounds for binary, http-types, tasty-hunit
+
+pandoc (2.0.3)
+
+ * Lua filters: preload text module (Albert Krewinkel, #4077).
+ The `text` module is preloaded in lua. The module contains some UTF-8
+ aware string functions, implemented in Haskell. The module is loaded on
+ request only, e.g.:
+
+ text = require 'text'
+ function Str (s)
+ s.text = text.upper(s.text)
+ return s
+ end
+
+ * Allow table-like access to attributes in lua filters (Albert Krewinkel,
+ #4071). Attribute lists are represented as associative lists in Lua. Pure
+ associative lists are awkward to work with. A metatable is attached to
+ attribute lists, allowing to access and use the associative list as if
+ the attributes were stored in as normal key-value pair in table.
+ Note that this changes the way `pairs` works on attribute lists. Instead
+ of producing integer keys and two-element tables, the resulting iterator
+ function now returns the key and value of those pairs. Use `ipairs` to
+ get the old behavior. Warning: the new iteration mechanism only works if
+ pandoc has been compiled with Lua 5.2 or later (current default: 5.3).
+
+ * Text.Pandoc.Parsing.uri: allow `&` and `=` as word characters (#4068).
+ This fixes a bug where pandoc would stop parsing a URI with an
+ empty attribute: for example, `&a=&b=` wolud stop at `a`.
+ (The uri parser tries to guess which punctuation characters
+ are part of the URI and which might be punctuation after it.)
+
+ * Introduce `HasSyntaxExtensions` typeclass (Alexander Krotov, #4074).
+
+ + Added new `HasSyntaxExtensions` typeclass for `ReaderOptions` and
+ `WriterOptions`.
+ + Reimplemented `isEnabled` function from `Options.hs` to accept both
+ `ReaderOptions` and `WriterOptions`.
+ + Replaced `enabled` from `CommonMark.hs` with new `isEnabled`.
+
+ * Add `amuse` extension (Alexander Krotov) to enable Amuse wiki
+ behavior for `muse`. New `Ext_amuse` constructor for
+ `Extension`. Note: this is switched on by default; for
+ Emacs behavior, use `muse-amuse`.
+
+ * Muse reader (Alexander Krotov):
+
+ + Count only one space as part of list item marker.
+ + Produce SoftBreaks on newlines. Now wrapping can be preserved
+ with `--wrap=preserve`.
+ + Add Text::Amuse footnote extensions. Footnote end is indicated by
+ indentation, so footnotes can be placed anywhere in the text,
+ not just at the end of it.
+ + Accept Emacs Muse definition lists when `-amuse`.
+ Emacs Muse does not require indentation.
+
+ * HTML reader:
+
+ + Ensure we don't produce level 0 headers (#4076), even for chapter
+ sections in epubs. This causes problems because writers aren't set
+ up to expect these.
+ + Allow spaces after `\(` and before `\)` with `tex_math_single_backslash`.
+ Previously `\( \frac{1}{a} < \frac{1}{b} \)` was not parsed as math in
+ `markdown` or `html` `+tex_math_single_backslash`.
+ + Parse div with class `line-block` as LineBlock.
+ + Don't fail with block-level content in figcaption (Mauro Bieg, #4183).
+
+ * MANUAL: clarify that math extensions work with HTML.
+ Clarify that `tex_math_dollars` and `tex_math_single_backslash`
+ will work with HTML as well as Markdown.
+
+ * Creole reader: Fix performance issue for longer lists (Sascha Wilde,
+ #4067).
+
+ * RST reader: better support for 'container' directive (#4066).
+ Create a div, incorporate name attribute and classes.
+
+ * LaTeX reader:
+
+ + Support column specs like `*{2}{r}` (#4056). This is equivalent to
+ `rr`. We now expand it like a macro.
+ + Allow optional args for parbox (#4056).
+ + Allow optional arguments on `\footnote` (#4062).
+
+ * EPUB writer: Fixed path for cover image (#4069). It was previously
+ `media/media/imagename`, and should have been `media/imagename`.
+
+ * Markdown writer: fix bug with doubled footnotes in grid tables
+ (#4061).
+
+ * LaTeX template: include natbib/biblatex after polyglossia (#4073).
+ Otherwise we seem to get an error; biblatex wants polyglossia
+ language to be defined.
+
+ * Added examples to lua filters documentation.
+
+
+pandoc (2.0.2)
+
+ * Deprecated ancient HTML math methods: `--latexmathml`, `--gladtex`,
+ `--mimetex`, `--jsmath`.
+
+ * Fixed URIs in `data/jats.csl`. They were being rendered twice,
+ leading to invalid XML in default JATS output with pandoc-citeproc.
+
+ * `lua-filters.md`: use real-world man page filter as example.
+
+ * Add lua filter functions `walk_inline` and `walk_block`
+ in the pandoc module, to apply filters inside particular
+ inline and block elements.
+
+ * Refactored some code from `Text.Pandoc.Lua.PandocModule`
+ into new internal module `Text.Pandoc.Lua.Filter`.
+
+ * Markdown reader:
+
+ + Allow fenced code blocks to be indented 1-3 spaces (#4011).
+ This brings our handling of them into alignment with CommonMark's.
+ + Fix YAML metadata with "chomp" (`|-`). Previously if a
+ YAML block under `|-` contained a blank line, pandoc would
+ not parse it as metadata.
+
+ * Removed `etc.` from abbreviations file. Often `etc.` ends a
+ sentence, and we want the period to be treated as a
+ sentence-ending period.
+
+ * Fix regression with `--metadata` (#4054). Values specified with
+ `--metadata` should replace a metadata value set in the document
+ itself, rather than creating a list including a new value.
+
+ * EPUB writer:
+
+ + Fix EPUB OCF structure. #3720 had been improperly implemented.
+ + Fix modified paths for raw HTML tags (src, poster, etc.)
+ (#4050, #4055). This had not been updated for the new EPUB
+ container layout, with a separate text/ subdirectory.
+ + Fix image paths with empty `--epub-subdirectory`.
+
+ * Miscellaneous code cleanup (Alexander Krotov).
+
+ * Use pandoc-types 1.17.3, which adds `Walkable` instances
+ for `[Block] Block` and `[Inline] Inline`.
+
+ * Remove obsolete `stack.full.yaml` (#4052).
+
+ * Change to using pandoc-citeproc 0.12.1 in binary packages.
+
+ * Consolidate math output method documentation (#4049, Mauro Bieg).
+
+ * `MANUAL.txt`: fix header level of "Extension: emoji" (Albert Krewinkel).
+
+ * Use lua filter to generate man page from `MANUAL.txt`, replacing old
+ Haskell filters. This is easier and faster.
+
+ * Improved `INSTALL.md`.
+
+ * Update commands to extract deb archive on Linux (#4043, Salim B).
+
+
+pandoc (2.0.1.1)
+
+ * Improved fix to #3989 (parsing of HTML tags containing
+ `>` in an attribute or comment). The previous fix (in 2.0.1) only
+ worked in certain cases.
+
+ * FB2 writer (Alexander Krotov):
+
+ + Add `unrecognised` genre to `<title-info>`
+ (Alexander Krotov). XML schema requires at least one genre.
+ + Remove `<annotation>` from `<body>`.
+
+ * CommonMark writer: fix strikethrough for `gfm` (#4038).
+
+ * Use texmath 0.10, which adds support for a wider range of
+ symbols and fixes default column alignments in MathML
+ and OMML.
+
+ * Highlighting fixes, using skylighting 0.4.3.2:
+
+ + Fix invalid CSS.
+ + Support `lineAnchors` (or `line-anchors`) in HTML code blocks.
+ + Ensure that code lines don't get duplicate identifiers (#4031).
+ The line identifiers are built using the code block's identifier
+ as a prefix. If the code block has null identifier, we use
+ `cb1`, `cb2`, etc.
+
+ * Added a few abbreviations to `data/abbreviations`,
+ and sorted the list (#3984, Wandmalfarbe).
+
+ * Improved support for columns in HTML writer (#4028).
+
+ + Remove `width` attribute from the `div`.
+ + Remove space between `<div class="column">` elements,
+ since this prevents columns whose widths sum to 100%
+ (the space takes up space).
+ + Move as much as possible of the CSS to the template.
+ + Ensure that all the HTML-based templates (including epub)
+ contain the CSS for columns.
+ + Columns default to 50% width unless they are given a width
+ attribute. So if you want two equal-width columns, you
+ can use a div with class `column` and no `width` attribute.
+
+ * SelfContained: use `base64` for css links with media attribute (#4026).
+ This fixes `--self-contained` with S5.
+
+ * Improve `pandoc-template-mode.el` (Vaclav Haisman).
+
+ * Issue INFO, not WARNING, when a .sty file cannot be
+ read in LaTeX reader. It is normally not an issue requiring
+ a fix from the user if .sty files are not found.
+
+ * INSTALL.md: MacOS instructions needed xar -f (adam234).
+
+ * MANUAL.txt:
+
+ + Clarify that --setext-headers doesn't affect gfm output (#4035).
+ + Clarify what is needed to open and close a div in `fenced_divs`
+ (#4039, Tristano Ajmone).
+ + Removed reference to `default.beamer` in docs (#4024).
+ Also added mention of other templates affecting PDF output
+ with different settings.
+
+pandoc (2.0.1)
+
+ * Fixed regression in parsing of HTML comments in markdown and other
+ non-HTML formats (`Text.Pandoc.Readers.HTML.htmlTag`) (#4019).
+ The parser stopped at the first `>` character, even if it wasn't
+ the end of the comment.
+
+ * Creole reader (Sascha Wilde):
+
+ + Fix some minor typos and formatting.
+ + Add additional test on nowiki-block after para.
+ + Fix lists with trailing white space.
+
+ * LaTeX reader: handle `%` comment right after command.
+ For example, `\emph%`.
+
+ * Markdown reader: make sure fenced div closers work in lists.
+ Previously the following failed:
+
+ ::: {.class}
+ 1. one
+ 2. two
+ :::
+
+ and you needed a blank line before the closing `:::`.
+
+ * Make `fenced_divs` affect the Markdown writer. If `fenced_divs` is
+ enabled, Divs will be rendered as fenced divs.
+
+ * LaTeX/Beamer writer: support "blocks" inside columns and other Divs
+ (#4016).
+
+ * HTML Writer: consistently use dashed class-names (Mauro Bieg, #3556).
+ Note: this change may require some changes in CSS rules.
+ `footnoteRef` has become `footnote-ref`, `titleslide` has
+ become `title-slide`, and `footnoteBack` has become `footnote-back`.
+
+ * JATS writer: Properly pass through author metadata (#4020).
+
+ * FB2 writer (Alexander Krotov):
+
+ + Write blocks outside of `<p>` in definitions.
+ + Make bullet lists consistent with ordered lists, repeating
+ the marker for the outer list rather than indenting sublists,
+ since indentation does not work in readers.
+ + Add new style FB2 tests.
+
+ * `Text.Pandoc.ImageSize`: Add `Millimeter` constructor to `Dimension`
+ (#4012) [API change]. Now sizes given in 'mm' are no longer converted
+ to 'cm'.
+
+ * Revise documentation of small caps syntax (Andrew Dunning, #4013).
+
+ * Fix broken reference links in manual (Andrew Dunning, #4014)
+
+ * Fixed example of slide columns structure in changelog (#4015).
+ Also documented this feature in MANUAL.txt.
+
+
+pandoc (2.0.0.1)
+
+ * EPUB writer:
+
+ + Fixed filepaths for nonstandard epub-subdirectory values.
+ + Ensure that epub2 is recognized as a non-text format,
+ so that a template is used.
+ + Don't include "prefix" attribute for ibooks for epub2.
+ It doesn't validate.
+ + Fix stylesheet paths; previously we had an incorrect
+ stylesheet path for the cover page and nav page.
+
+ * LaTeX reader:
+
+ + Insert space when needed in macro expansion (#4007).
+ Sometimes we need to insert a space after a control sequence
+ to prevent it merging with a following letter.
+ + Allow unbraced arguments for macros (#4007).
+ + Allow body of macro definition to be unbraced (#4007).
+
+ * Linux package build: ensure that pandoc-citeproc is statically linked.
+
+ * trypandoc: add native, ms.
+
+pandoc (2.0)
+
+ [new features]
-pandoc (1.19.2.2)
+ * New output format `ms` (groff ms). Complete support, including
+ tables, math, syntax highlighting, and PDF bookmarks. The writer uses
+ texmath's new eqn writer to convert math to eqn format, so a ms file
+ produced with this writer should be processed with `groff -ms -e` if
+ it contains math.
- * Fix build with GHC 8.2.1 (#3876, Peter Simons). Setup.hs does not
- compile with Cabal 2.x, so we require an earlier version via
- setup-depends. The following packages need newer versions with
- GHC 8.2.1 and had their constraints relaxed accordingly:
- executable-path, process, syb, and time.
+ * New output format `jats` (Journal Article Tag Suite). This is an XML
+ format used in archiving and publishing articles. Note that a
+ URI-encoded CSL stylesheet (`data/jats.csl`) is added automatically
+ unless a stylesheet is specified using `--css`.
-pandoc (1.19.2.1)
+ * New output format `gfm` (GitHub-flavored CommonMark) (#3841).
+ This uses bindings to GitHub's fork of cmark, so it should parse
+ gfm exactly as GitHub does (excepting certain postprocessing
+ steps, involving notifications, emojis, etc.). `markdown_github`
+ has been deprecated in favor of `gfm`.
+
+ * New output format `muse` (Emacs Muse) (Alexander Krotov, #3489).
+
+ * New input format `gfm` (GitHub-flavored CommonMark) (#3841).
+ This uses bindings to GitHub's fork of cmark. `markdown_github`
+ has been deprecated in favor of `gfm`.
+
+ * New input format `muse` (Emacs Muse) reader (Alexander Krotov, #3620).
+
+ * New input format `tikiwiki` (TikiWiki markup) (rlpowell, #3800).
+
+ * New input format `vimwiki` (Vimwiki markup) (Yuchen Pei, #3705).
+ Note that there is a new data file, `data/vimwiki.css`, which can
+ be used to display the HTML produced by this reader and
+ pandoc's HTML writer in the style of vimwiki's own HTML
+ export.
+
+ * New input format `creole` (Creole 1.0) (#3994, Sascha Wilde).
+
+ * New syntax for Divs, with `fenced_divs` extension enabled by
+ default (#168). This gives an attractive, plain-text way to create
+ containers for block-level content.
+
+ * Added new syntax for including raw content in any output format,
+ enabled by the `raw_attribute` extension (which is on by default
+ for `markdown` and `multimarkdown`). The syntax is the same as
+ for fenced code blocks or code inlines, only with `{=FORMAT}` for
+ attributes, where `FORMAT` is the name of the output format
+ (e.g., `ms`, `html`).
+
+ * Implement multicolumn support for slide formats (#1710).
+ The structure expected is:
+
+ :::::::::::::: {.columns}
+ ::: {.column width="40%"}
+ contents...
+ :::
+ ::: {.column width="60%"}
+ contents...
+ :::
+ ::::::::::::::
+
+ Support has been added for beamer and all HTML slide formats.
+
+ * Allows line comments in templates, beginning with `$--` (#3806).
+ (Requires doctemplates 0.2.1.)
+
+ * Add `--eol=crlf|lf|native` flag and writer option to control line endings
+ (Stefan Dresselhaus, #3663, #2097).
+
+ * Add `--log` option to save log messages in JSON format to a file (#3392).
+
+ * Add `--request-header` option, to set request headers when pandoc
+ makes HTTP requests to fetch external resources. For example:
+ `--request-header User-Agent:blah`.
+
+ * Added lua filters (Albert Krewinkel, #3514). The new `--lua-filter`
+ option works like `--filter` but takes pathnames of special lua filters
+ and uses the lua interpreter baked into pandoc, so that no external
+ interpreter is needed. Note that lua filters are all applied before
+ regular filters, regardless of their position on the command line.
+ For documentation of lua filters, see `doc/lua-filters.md`.
+
+ * Set `PANDOC_READER_OPTIONS` in environment where filters are run.
+ This contains a JSON representation of `ReaderOptions`, so filters
+ can access it.
+
+ * Support creation of pdf via groff `ms` and pdfroff.
+ `pandoc -t ms -o output.pdf input.txt`.
+
+ * Support for PDF generation via HTML and `weasyprint` or `prince`
+ (Mauro Bieg, #3909). `pandoc -t html5 -o output.pdf --pdf-engine=prince`.
+
+ * Added `--epub-subdirectory` option (#3720). This specifies the
+ subdirectory in the OCF container that holds the EPUB specific content.
+ We now put all EPUB related content in an `EPUB/` subdirectory by default
+ (later this will be configurable).
+
+ ```
+ mimetype
+ META-INF/
+ com.apple.ibooks.display-options.xml
+ container.xml
+ EPUB/ <<--configurable-->>
+ fonts/ <<--static-->>
+ font.otf
+ media/ <<--static-->>
+ cover.jpg
+ fig1.jpg
+ styles/ <<--static-->>
+ stylesheet.css
+ content.opf
+ toc.ncx
+ text/ <<--static-->>
+ ch001.xhtml
+ ```
+
+ * Added `--resource-path=SEARCHPATH` command line option (#852).
+ SEARCHPATH is separated by the usual character, depending on OS
+ (: on unix, ; on windows). Default resource path is just working
+ directory. However, the working directory must be explicitly
+ specified if the `--resource-path` option is used.
+
+ * Added --abbreviations=FILE option for custom abbreviations file
+ (#256). Default abbreviations file (`data/abbreviations`) contains
+ a list of strings that will be recognized by pandoc's
+ Markdown parser as abbreviations. (A nonbreaking space will
+ be inserted after the period, preventing a sentence space in
+ formats like LaTeX.) Users can override the default by putting a file
+ abbreviations in their user data directory (`~/.pandoc` on *nix).
+
+ * Allow a theme file as argument to `--highlight-style`.
+ Also include a sample, `default.theme`, in `data/`.
+
+ * Allow `--syntax-definition` option for dynamic loading of syntax
+ highlighting definitions (#3334).
+
+ * Lists in `markdown` by default now use the CommonMark variable
+ nesting rules (#3511). The indentation required for a block-level
+ item to be included in a list item is no longer fixed, but is
+ determined by the first line of the list item. To be included in
+ the list item, a block must be indented to the level of the first
+ non-space content after the list marker. Exception: if are 5 or more
+ spaces after the list marker, then the content is interpreted as an
+ indented code block, and continuation paragraphs must be indented
+ two spaces beyond the end of the list marker. See the CommonMark
+ spec for more details and examples.
+
+ Documents that adhere to the four-space rule should, in most cases,
+ be parsed the same way by the new rules. Here are some examples
+ of texts that will be parsed differently:
+
+ - a
+ - b
+
+ will be parsed as a list item with a sublist; under the four-space
+ rule, it would be a list with two items.
+
+ - a
+
+ code
+
+ Here we have an indented code block under the list item, even though it
+ is only indented six spaces from the margin, because it is four spaces
+ past the point where a continuation paragraph could begin. With the
+ four-space rule, this would be a regular paragraph rather than a code
+ block.
+
+ - a
+
+ code
+
+ Here the code block will start with two spaces, whereas under
+ the four-space rule, it would start with `code`. With the four-space
+ rule, indented code under a list item always must be indented eight
+ spaces from the margin, while the new rules require only that it
+ be indented four spaces from the beginning of the first non-space
+ text after the list marker (here, `a`).
+
+ This change was motivated by a slew of bug reports from people
+ who expected lists to work differently (#3125, #2367, #2575, #2210,
+ #1990, #1137, #744, #172, #137, #128) and by the growing prevalance
+ of CommonMark (now used by GitHub, for example). Those who
+ prefer the old behavior can use `-f markdown+four_space_rule`.
+
+ * Added `four_space_rule` extension. This triggers the old pandoc
+ parsing rule for content nested under list items (the "four space
+ rule").
+
+ * Added `spaced_reference_links` extension (#2602). It allows whitespace
+ between the two parts of a reference link: e.g.
+
+ [a] [b]
+
+ [b]: url
+
+ This was previously enabled by default; it is now forbidden by default.
+
+ * Add `space_in_atx_header` extension (#3512). This is enabled by default
+ in pandoc and GitHub markdown but not the other flavors.
+ This requires a space between the opening #'s and the header
+ text in ATX headers (as CommonMark does but many other implementations
+ do not). This is desirable to avoid falsely capturing things like
+
+ #hashtag
+
+ or
+
+ #5
+
+ * Add `sourcefile` and `outputfile` template variables (Roland Hieber,
+ #3431).
+
+ * Allow ibooks-specific metadata in epubs (#2693). You can now have
+ the following fields in your YAML metadata, and it will be treated
+ appropriately in the generated EPUB:
+
+ ```
+ ibooks:
+ version: 1.3.4
+ specified-fonts: false
+ ipad-orientation-lock: portrait-only
+ iphone-orientation-lock: landscape-only
+ binding: true
+ scroll-axis: vertical
+ ```
+
+
+ [behavior changes]
+
+ * Reader functions no longer presuppose that CRs have been
+ stripped from the input. (They strip CRs themselves, before
+ parsing, to simplify the parsers.)
+
+ * Added support for translations (localization) (#3559).
+ Currently this only affects the LaTeX reader, for things
+ like `\figurename`. Translation data files for 46 languages
+ can be found in `data/translations`.
+
+ * Make `--ascii` work with DocBook output too.
+
+ * Rename `--latex-engine` to `--pdf-engine`,
+ and `--latex-engine-opt` to `--pdf-engine-opt`.
+
+ * Removed `--parse-raw` and `readerParseRaw`. These were confusing.
+ Now we rely on the `+raw_tex` or `+raw_html` extension with latex or html
+ input. Thus, instead of `--parse-raw -f latex` we use `-f latex+raw_tex`,
+ and instead of `--parse-raw -f html` we use `-f html+raw_html`.
+
+ * With `--filter` R filters are now recognized, even if they are
+ not executable (#3940, #3941, Andrie de Vries).
+
+ * Support SVG in PDF output, converting with `rsvg2pdf` (#1793).
+
+ * Make epub an alias for epub3, not epub2.
+
+ * Removed `--epub-stylesheet`; use `--css` instead (#3472, #847).
+ Multiple stylesheets may be used. Stylesheets will be taken both from
+ `--css` and from the `stylesheet` metadata field (which can contain
+ either a file path or a list of them).
+
+ * `--mathml` and MathML in HTMLMathMethod no longer take an argument.
+ The argument was for a bridge JavaScript that used to be necessary
+ in 2004. We have removed the script already.
+
+ * `--katex` improvements. The latest version is used, and the
+ autoload script is loaded by default.
+
+ * Change MathJax CDN default since old one is shutting down (#3544).
+ Note: The new URL requires a version number, which we'll have
+ to update manually in subsequent pandoc releases in order to
+ take advantage of mathjax improvements.
+
+ * `--self-contained`: don't incorporate elements with `data-external="1"`
+ (#2656). You can leave an external link as it is by adding the attribute
+ data-external="1" to the element. Pandoc will then not try to
+ incorporate its content when `--self-contained` is used. This is
+ similar to a feature already supported by the EPUB writer.
+
+ * Allow `--extract-media` to work with non-binary input formats
+ (#1583, #2289). If `--extract-media` is supplied with a non-binary
+ input format, pandoc will attempt to extract the contents of all
+ linked images, whether in local files, data: uris, or external uris.
+ They will be named based on the sha1 hash of the contents.
+
+ * Make `papersize: a4` work regardless of the case of `a4`.
+ It is converted to `a4` in LaTeX and `A4` in ConTeXt.
+
+ * Make `east_asian_line_breaks` affect all readers/writers (#3703).
+
+ * Underlined elements are now treated consistently by readers
+ (#2270, hftf); they are always put in a Span with class `underline`.
+ This allows the user to treat them differently from other emphasis,
+ using a filter. Docx, Org, Textile, Txt2Tags, and HTML readers
+ have been changed.
+
+ * Improved behavior of `auto_identifiers` when there are explicit ids
+ (#1745). Previously only autogenerated ids were added to the list
+ of header identifiers in state, so explicit ids weren't taken
+ into account when generating unique identifiers. Duplicated
+ identifiers could result. This simple fix ensures that explicitly given
+ identifiers are also taken into account.
+
+ * Use `table-of-contents` for contents of toc, make `toc` a boolean
+ (#2872). Changed markdown, rtf, and HTML-based templates accordingly.
+ This allows you to set `toc: true` in the metadata; this
+ previously produced strange results in some output formats.
+ For backwards compatibility, `toc` is still set to the
+ toc contents. But it is recommended that you update templates
+ to use `table-of-contents` for the toc contents and `toc`
+ for a boolean flag.
+
+ * Change behavior with binary format output to stdout.
+ Previously, for binary formats, output to stdout was disabled
+ unless we could detect that the output was being piped (and not
+ sent to the terminal). Unfortunately, such detection is not
+ possible on Windows, leaving windows users no way to pipe binary
+ output. So we have changed the behavior in the following way:
+
+ + Output to stdout is allowed when it can be determined that
+ the output is being piped (on non-Windows platforms).
+ + If the `-o` option is not used, binary output is never sent
+ to stdout by default; instead, an error is raised.
+ + If `-o -` is used, binary output is sent to stdout, regardless
+ of whether it is being piped. This works on Windows too.
+
+ * Better error behavior: uses of `error` have been replaced by
+ raising of `PandocError`, which can be trapped and handled by the
+ calling program.
+
+ * Removed `hard_line_breaks` extension from `markdown_github` (#3594).
+ GitHub has two Markdown modes, one for long-form documents like READMEs
+ and one for short things like issue coments. In issue comments, a line
+ break is treated as a hard line break. In README, wikis, etc., it is
+ treated as a space as in regular Markdown. Since pandoc is more likely to
+ be used to convert long-form documents from GitHub Markdown,
+ `-hard_line_breaks` is a better default.
+
+ * Include `backtick_code_blocks` extension in `mardkown_mmd` (#3637).
+
+ * Escape `MetaString` values (as added with `-M/--metadata` flag) (#3792).
+ Previously they would be transmitted to the template without any
+ escaping. Note that `--M title='*foo*'` yields a different result from
+
+ ---
+ title: *foo*
+ ---
+
+ In the latter case, we have emphasis; in the former case, just
+ a string with literal asterisks (which will be escaped
+ in formats, like Markdown, that require it).
+
+ * Allow `em`, `cm`, `in` for image height/width in HTML, LaTeX (#3450).
+
+ * HTML writer: Insert `data-` in front of unsupported attributes. Thus,
+ a span with attribute `foo` gets written to HTML5 with `data-foo`, so
+ it is valid HTML5. HTML4 is not affected. This will allow us to use
+ custom attributes in pandoc without producing invalid HTML. (With help
+ from Wandmalfarbe, #3817.)
+
+ * Plain writer: improved super/subscript rendering. We now
+ handle more non-digit characters for which there are
+ sub/superscripted unicode characters. When unicode
+ sub/superscripted characters are not available, we use
+ `_(..)` or `^(..)` (#3518).
+
+ * Docbook, JATS, TEI writers: print INFO message when omitting interior
+ header (#3750). This only applies to section headers inside list items,
+ e.g., which were otherwise silently omitted.
+
+ * Change to `--reference-links` in Markdown writer (#3701). With
+ `--reference-location` of `section` or `block`, pandoc will now repeat
+ references that have been used in earlier sections. The Markdown
+ reader has also been modified, so that *exactly* repeated references
+ do not generate a warning, only references with the same label but
+ different targets. The idea is that, with references after every block,
+ one might want to repeat references sometimes.
+
+ * ODT/OpenDocument writer:
+
+ + Support `lang` attribute (#1667).
+ + Added support for `--toc` (#2836). Thanks to @anayrat.
+
+ * Docx writer:
+
+ + `lang` meta, see #1667 (Mauro Bieg, #3515).
+ + Change `FigureWithCaption` to `CaptionedFigure` (iandol, #3658).
+ + Use `Table` rather than `Table Normal` for table style (#3275).
+ `Table Normal` is the default table style and can't be modified.
+ + Pass through comments (#2994). We assume that comments are defined as
+ parsed by the docx reader:
+
+ I want <span class="comment-start" id="0" author="Jesse Rosenthal"
+ date="2016-05-09T16:13:00Z">I left a comment.</span>some text to
+ have a comment <span class="comment-end" id="0"></span>on it.
+
+ We assume also that the id attributes are unique and properly
+ matched between comment-start and comment-end.
+ + Bookmark improvements. Bookmark start/end now surrounds content rather
+ than preceding it. Bookmarks generated for Div with id
+ (jgm/pandoc-citeproc#205).
+ + Add `keywords` metadata to docx document properties (Ian).
+
+ * RST writer: support unknown interpreted text roles by
+ parsing them as `Span` with `role` attributes (#3407). This
+ way they can be manipulated in the AST.
+
+ * HTML writer:
+
+ + Line block: Use class instead of style attribute (#1623). We now
+ issue `<div class="line-block">` and include a default definition
+ for `line-block` in the default templates, instead of hard-coding a
+ `style` on the div.
+ + Add class `footnoteBack` to footnote back references (Timm Albers).
+ This allows for easier CSS styling.
+ + Render SmallCaps as span with smallcaps class (#1592), rather than
+ using a style attribute directly. This gives the user more flexibility
+ in styling small caps in CSS.
+ + With reveal.js we use `data-src` instead of `src` for images for
+ lazy loading.
+ + Special-case `.stretch` class for images in reveal.js (#1291).
+ Now in reveal.js, an image with class `stretch` in a paragraph
+ by itself will stretch to fill the whole screen, with no
+ caption or figure environment.
+
+ * Added warnings for non-rendered blocks to writers.
+
+ * Writers now raise an error on template failure.
+
+ * When creating a PDF via LaTeX, warn if the font is missing some
+ characters (#3742).
+
+ * Remove initial check for PDF-creating program (#3819).
+ Instead, just try running it and raise the exception if it
+ isn't found at that point. This improves things for users of Cygwin
+ on Windows, where the executable won't be found by `findExecutable`
+ unless `.exe` is added. The same exception is raised as before, but
+ at a later point.
+
+ * Readers issue warning for duplicate header identifiers (#1745).
+ Autogenerated header identifiers are given suffixes so as not to clash
+ with previously used header identifiers. But they may still coincide with
+ an explicit identifier that is given for a header later in the document,
+ or with an identifier on a div, span, link, or image. We now issue
+ a warning in this case, so users can supply an explicit identifier.
+
+ * CommonMark reader now supports `emoji`, `hard_line_breaks`, `smart`,
+ and `raw_html` extensions.
+
+ * Markdown reader:
+
+ + Don't allow backslash + newline to affect block structure (#3730).
+ Note that as a result of this change, the following, which formerly
+ produced a header with two lines separated by a line break, will
+ now produce a header followed by a paragraph:
+
+ # Hi\
+ there
+
+ This may affect some existing documents that relied on
+ this undocumented and unintended behavior. This change makes pandoc
+ more consistent with other Markdown implementations, and with itself
+ (since the two-space version of a line break doesn't work inside ATX
+ headers, and neither version works inside Setext headers).
+
+
+ * Org reader (Albert Krewinkel, unless noted):
+
+ + Support `table.el` tables (#3314).
+ + Support macros (#3401).
+ + Support the `#+INCLUDE:` file inclusion mechanism (#3510).
+ Recognized include types are `example`, `export`, `src`, and
+ normal org file inclusion. Advanced features like line numbers
+ and level selection are not implemented yet.
+ + Interpret more meta value as inlines. The values of the following
+ meta variables are now interpreted using org-markup instead of
+ treating them as pure strings: `keywords` (comma-separated list of
+ inlines), `subtitle` (inline values), `nocite` (inline values, can
+ be repeated).
+ + Support `\n` export option (#3940). This turns all newlines in the
+ text into hard linebreaks.
+
+ * RST reader:
+
+ + Improved admonition support (#223). We no longer add an
+ `admonition` class, we just use the class for the type of admonition,
+ `note` for example. We put the word corresponding to the label in
+ a paragraph inside a `Div` at the beginning of the admonition with
+ class `admonition-title`. This is about as close as we can get to
+ RST's own output.
+ + Initial support of `.. table` directive. This allows adding captions
+ to tables.
+ + Support `.. line-block` directive. This is deprecated but may still
+ be in older documents.
+ + Support scale and align attributes of images (#2662).
+ + Implemented implicit internal header links (#3475).
+ + Support RST-style citations (#853). The citations appear at the end
+ of the document as a definition list in a special div with id
+ `citations`. Citations link to the definitions.
+ + Recurse into bodies of unknown directives (#3432).
+ In most cases it's better to preserve the content than
+ to emit it. This isn't guaranteed to have good results;
+ it will fail spectacularly for unknown raw or verbatim directives.
+ + Handle chained link definitions (#262). For example,
+
+ .. _hello:
+ .. _goodbye: example.com
+
+ Here both `hello` and `goodbye` should link to `example.com`.
+ + Support anchors (#262). E.g.
+
+ `hello`
+
+ .. _hello:
+
+ paragraph
+
+ This is supported by putting "paragraph" in a `Div` with id `hello`.
+ + Support `:widths:` attribute for table directive.
+ + Implement csv-table directive (#3533). Most attributes are supported,
+ including `:file:` and `:url:`.
+ + Support unknown interpreted text roles by parsing them as Span
+ with "role" attributes (#3407). This way they can be manipulated in
+ the AST.
+
+ * HTML reader: parse a span with class `smallcaps` as `SmallCaps`.
+
+ * LaTeX reader:
+
+ + Implemented `\graphicspath` (#736).
+ + Properly handle column prefixes/suffixes. For example, in
+ `\begin{tabular}{>{$}l<{$}>{$}l<{$} >{$}l<{$}}`
+ each cell will be interpreted as if it has a `$`
+ before its content and a `$` after (math mode).
+ + Handle komascript `\dedication` (#1845). It now adds a
+ `dedication` field to metadata. It is up to the user to supply
+ a template that uses this variable.
+ + Support all `\textXX` commands, where XX = `rm`, `tt`, `up`, `md`,
+ `sf`, `bf` (#3488). Spans with a class are used when there is
+ nothing better.
+ + Expand `\newenvironment` macros (#987).
+ + Add support for LaTeX subfiles package (Marc Schreiber, #3530).
+ + Better support for subfigure package (#3577).
+ A figure with two subfigures turns into two pandoc
+ figures; the subcaptions are used and the main caption
+ ignored, unless there are no subcaptions.
+ + Add support for \vdots (Marc Schreiber, #3607).
+ + Add basic support for hyphenat package (Marc Schreiber, #3603).
+ + Add basic `\textcolor` support (Marc Schreiber).
+ + Add support for `tabularx` environment (Marc Schreiber, #3632).
+ + Better handling of comments inside math environments (#3113).
+ This solves a problem with commented out `\end{eqnarray}` inside
+ an eqnarray (among other things).
+ + Parse tikzpicture as raw verbatim environment if `raw_tex` extension
+ is selected (#3692). Otherwise skip with a warning. This is better
+ than trying to parse it as text!
+ + Add `\colorbox` support (Marc Schreiber).
+ + Set identifiers on Spans used for `\label`.
+ + Have `\setmainlanguage` set `lang` in metadata.
+ + Support etoolbox's `\ifstrequal`.
+ + Support `plainbreak`, `fancybreak` et al from the memoir class
+ (bucklereed, #3833).
+ + Support `\let`. Also, fix regular macros so they're expanded at the
+ point of use, and NOT also the point of definition. `\let` macros,
+ by contrast, are expanded at the point of definition. Added an
+ `ExpansionPoint` field to `Macro` to track this difference.
+ + Support simple `\def` macros. Note that we still don't support
+ macros with fancy parameter delimiters, like `\def\foo#1..#2{...}`.
+ + Support \chaptername, \partname, \abstractname, etc. (#3559,
+ obsoletes #3560).
+ + Put content of `\ref`, `\label`, `\eqref` commands into `Span` with
+ attributes, so they can be handled in filters (Marc Schreiber, #3639)
+ + Add Support for `glossaries` and `acronym` package (Marc Schreiber,
+ #3589). Acronyms are not resolved by the reader, but acronym and
+ glossary information is put into attributes on Spans so that they
+ can be processed in filters.
+ + Use `Link` instead of `Span` for `\ref`. This makes more sense
+ semantically and avoids unnecessary `Span [Link]` nestings when
+ references are resolved.
+ + Rudimentary support for `\hyperlink`.
+ + Support `\textquoteleft|right`, `\textquotedblleft|right` (#3849).
+ + Support `\lq`, `\rq`.
+ + Implement `\newtoggle`, `\iftoggle`, `\toggletrue|false` from etoolbox
+ (#3853).
+ + Support `\RN` and `\Rn`, from biblatex (bucklereed, #3854).
+ + Improved support for `\hyperlink`, `\hypertarget` (#2549).
+ + Support `\k` ogonek accent.
+ + Improve handling of accents. Handle ogonek, and fall back correctly
+ with forms like `\"{}`.
+ + Better support for ogonek accents.
+ + Support for `\faCheck` and `\faClose` (Marc Schreiber, #3727).
+ + Support for `xspace` (Marc Schreiber, #3797).
+ + Support `\setmainlanguage` or `\setdefaultlanguage` (polyglossia)
+ and `\figurename`.
+ + Better handling of `\part` in LaTeX (#1905). Now we parse chapters as
+ level 0 headers, and parts as level -1 headers. After parsing, we
+ check for the lowest header level, and if it's less than 1 we bump
+ everything up so that 1 is the lowest header level. So `\part` will
+ always produce a header; no command-line options are needed.
+ + Add block version of `\textcolor` (Marc Schreiber).
+ + `\textcolor` works as inline and block command (Marc Schreiber).
+ + `\textcolor` will be parse as span at the beginning of a paragraph
+ (Marc Schreiber).
+ + Read polyglossia/babel `\text(LANG){...}` (bucklereed)
+ + Improved handling of include files in LaTeX reader (#3971).
+ Previously `\include` wouldn't work if the included file
+ contained, e.g., a begin without a matching end.
+ + Support `\expandafter` (#3983).
+ + Handle `\DeclareRobustCommand` (#3983). Currently it's just treated
+ as a synonym for `\newcommand`.
+ + Handle `\lettrine` (Mauro Bieg).
+
+ * Math improvements due to updates in texmath:
+
+ + Improved handling of accents and upper/lower delimiters.
+ + Support for output in GNU eqn format (used with *roff).
+ + Allow `\boldsymbol` + a token without braces, and similarly
+ with other styling commands.
+ + Improve parsing of `\mathop` to allow multi-character operator names.
+ + Add thin space after math operators when "faking it with
+ unicode."
+
+ * `walk` is now used instead of `bottomUp` in the `ToJSONFilter`
+ instance for `a -> [a]` (pandoc-types). Note that behavior
+ will be slightly different, since `bottomUp`'s treatment of
+ a function `[a] -> [a]` is to apply it to each sublist of a
+ list, while walk applies it only to maximal sublists.
+ Usually the latter behavior is what is wanted, and the
+ former can be simulated when needed. But there may be
+ existing filters that need to be rewritten in light of the
+ new behavior. Performance should be improved.
+
+ * There are some changes to syntax highlighting due to revisions
+ in the `skylighting` library:
+
+ + Support for `powershell` has been added, and many syntax
+ definitions have been updated.
+ + Background colors have been added to the `kate` style.
+ + The way highlighted code blocks are formatted in HTML has
+ been changed (David Baynard), in ways that may require
+ changes in hard-coded CSS affecting highlighting.
+ (If you haven't included hard-coded highlighting CSS in
+ your template, you needn't change anything.)
+
+
+ [API changes]
+
+ * New module `Text.Pandoc.Class` (Jesse Rosenthal, John MacFarlane).
+ This contains definitions of the `PandocMonad` typeclass, the
+ `PandocIO` and `PandocPure` monads, and associated functions.
+
+ * Changed types of all writers and readers.
+
+ + We now use `Text` instead of `String` in the interface (#3731).
+ (We have not yet changed the internals of most readers to work
+ with `Text`, but making this change in the API now opens up a
+ path to doing that.)
+ + The result is now of form `m a` with constraint `PandocMonad m`.
+ Readers and writers can be combined to form monadic values which
+ can be run using either `runIO` or `runPure`. If `runIO` is used,
+ then both readers and writers will be able to do IO when needed
+ (for include files, for example); if `runPure` is used,
+ then the functions are pure and will not touch IO.
+ + Where previously you used
+ `writeRST def (readMarkdown def "[foo](url)")`, now you
+ would use
+ `runPure $ readMarkdown def (pack "[foo](url)") >>= writeRST def`.
+
+ * New module `Text.Pandoc.Readers` (Albert Krewinkel). This
+ contains reader helper functions formerly defined in the
+ top-level `Text.Pandoc` module.
+
+ + Changed `StringReader` -> `TextReader`.
+ + `getReader` now returns a pair of a reader and
+ `Extensions`, instead of building the extensions into the
+ reader (#3659). The calling code must explicitly set
+ `readerExtensions` using the `Extensions` returned. The
+ point of the change is to make it possible for the calling
+ code to determine what extensions are being used.
+
+ * New module `Text.Pandoc.Writers` (Albert Krewinkel).
+ This contains writer helper functions formerly defined in the
+ top-level `Text.Pandoc` module.
+
+ + Changed `StringWriter` -> `TextWriter`.
+ + `getWriter` now retuns a pair of a reader and
+ `Extensions`, instead of building the extensions into the
+ reader (#3659). The calling code must explicitly set
+ `readerExtensions` using the `Extensions` returned. The
+ point of the change is to make it possible for the calling
+ code to determine what extensions are being used.
+
+ * New module `Text.Pandoc.Lua`, exporting `runLuaFilter` (Albert Krewinkel,
+ #3514).
+
+ * New module `Text.Pandoc.App`. This abstracts out the functionality
+ of the command line program (`convertWithOpts`), so it can be reproduced
+ e.g. in a desktop or web application. Instead of exiting, we throw errors
+ (#3548), which are caught (leading to exit) in pandoc.hs, but allow other
+ users of `Text.Pandoc.App` to recover. `pandoc.hs` is now a 2-liner.
+ The module also exports some utility functions for parsing options
+ and running filters.
+
+ * New module `Text.Pandoc.Logging` (exported module) (#3392).
+ This now contains the `Verbosity` definition previously in
+ `Text.Pandoc.Options`, as well as a new `LogMessage` datatype that will
+ eventually be used instead of raw strings for warnings. This will enable
+ us, among other things, to provide machine-readable warnings if desired.
+ Include ToJSON instance and showLogMessage. This gives us the possibility
+ of both machine-readable and human-readable output for log messages.
+
+ * New module `Text.Pandoc.BCP47`, with `getLang`, `Lang(..)`, `parseBCP47`.
+
+ * New module `Text.Pandoc.Translations`, exporting `Term`,
+ `Translations`, `readTranslations`.
+
+ * New module `Text.Pandoc.Readers.LaTeX.Types', exporting `Macro`, `Tok`,
+ `TokType`, `Line`, `Column`.
+
+ * `Text.Pandoc.Error`: added many new constructors for `PandocError`.
+
+ * Expose some previously private modules (#3260). These are often
+ helpful to people writing their own reader or writer modules:
+
+ + `Text.Pandoc.Writers.Shared`
+ + `Text.Pandoc.Parsing`
+ + `Text.Pandoc.Asciify`
+ + `Text.Pandoc.Emoji`
+ + `Text.Pandoc.ImageSize`
+ + `Text.Pandoc.Highlighting`
+`
+ * New module `Text.Pandoc.Extensions` (Albert Krewinkel):
+ Extension parsing and processing functions were defined in the top-level
+ `Text.Pandoc` module. These functions are moved to the Extensions
+ submodule as to enable reuse in other submodules.
+
+ * Add `Ext_raw_attribute` constructor for `Extension`.
+
+ * Add `Ext_fenced_divs` constructor for `Extension'.
+
+ * Add `Ext_four_space_rule` constructor in `Extension`.
+
+ * Add `Ext_gfm_auto_identifiers` constructor for `Extension`.
+
+ * Add `Monoid` instance for `Extensions`.
+
+ * Add `Text.Pandoc.Writers.Ms`, exporting `writeMs`.
+
+ * Add `Text.Pandoc.Writers.JATS`, exporting `writeJATS`.
+
+ * Add `Text.Pandoc.Writers.Muse`, exporting `writeMuse`.
+
+ * Add `Text.Pandoc.Readers.Muse`, exporting `readMuse`.
+
+ * Add `Text.Pandoc.Readers.TikiWiki`, exporting `readTikiWiki`.
+
+ * Add `Text.Pandoc.Readers.Vimwiki`, exporting `readVimwiki`.
+
+ * Add `Text.Pandoc.Readers.Creole`, exporting `readCreole`.
+
+ * Export `setVerbosity` from `Text.Pandoc`.
+
+ * `Text.Pandoc.Pretty`: Add `Eq` instance for `Doc`.
+
+ * `Text.Pandoc.XML`: `toEntities`: changed type to `Text -> Text`.
+
+ * `Text.Pandoc.UTF8`:
+
+ + Export `fromText`, `fromTextLazy`, `toText`, `toTextLazy`.
+ Define `toString`, `toStringLazy` in terms of them.
+ + Add new functions parameterized on `Newline`: `writeFileWith`,
+ `putStrWith`, `putStrLnWith`, `hPutStrWith`, `hPutStrLnWith`.
+
+ * `Text.Pandoc.MediaBag`: removed `extractMediaBag`.
+
+ * `Text.Pandoc.Highlighting`:
+
+ + `highlighting` now returns an Either rather than Maybe.
+ This allows us to display error information returned by the skylighting
+ library. Display a warning if the highlighting library throws an error.
+ + Add parameter for `SyntaxMap` to `highlight`.
+
+ * `Text.Pandoc.Writers.Math`:
+
+ + Export `defaultMathJaxURL`, `defaultKaTeXURL`. This will ensure that
+ we only need to update these in one place.
+
+ * `Text.Pandoc.SelfContained`:
+
+ + Removed `WriterOptions` parameter from `makeSelfContained`.
+ + Put `makeSelfContained` in PandocMonad instead of IO. This removes
+ the need to pass MediaBag around and improves exceptions. It also
+ opens up the possibility of using makeSelfContained purely.
+ + Export `makeDataURI`.
+
+ * `Text.Pandoc.ImageSize`:
+
+ + Export `lengthToDim`, new function `scaleDimension`.
+ + Export `inEm` from ImageSize (#3450).
+ + Change `showFl` and `show` instance for `Dimension` so
+ extra decimal places are omitted.
+ + Added `Em` as a constructor of `Dimension`.
+ + Add `WriterOptions` parameter to `imageSize` signature (Mauro Bieg).
+
+ * `Text.Pandoc.Templates`:
+
+ + Change type of `renderTemplate'`. Now it runs in `PandocMonad`
+ and raises a proper `PandocTemplateError` if there are problems, rather
+ than failing with uncatchable `error`.
+ + Change signature of `getDefaultTemplate`. Now it runs in any instance
+ of `PandocMonad`, and returns a `String` rather than an `Either` value.
+ And it no longer takes a `datadir` parameter, since this can be
+ retrieved from `CommonState`.
+
+ * `Text.Pandoc.Options`:
+
+ + Added `writerEpubSubdirectory` to `WriterOptions` (#3720).
+ The EPUB writer now takes its EPUB subdirectory from this option.
+ + In `WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine`
+ and `writerLaTeXArgs` to `writerPdfArgs` (Mauro Bieg, #3909).
+ + Add `writerSyntaxMap` to `WriterOptions`.
+ + Removed `writerEpubStylesheet` from `WriterOptions`.
+ + Remove `writerUserDataDir` from `WriterOptions`. It is now carried
+ in `CommonState` in `PandocMonad` instances. (And thus it can be used
+ by readers too.)
+ + Changed `writerEpubMetadata` to a `Maybe String`.
+ + Removed `readerApplyMacros` from `ReaderOptions`. Now we just check
+ the `latex_macros` reader extension.
+ + FromJSON/ToJSON instances for `ReaderOptions`.
+ + In `HTMLMathMethod`, the `KaTeX` contsructor now takes only
+ one string (for the KaTeX base URL), rather than two.
+ + Removed `writerSourceURL` from `WriterOptions`. We now use
+ `stSourceURL` in `CommonState`, which is set by `setInputFiles`.
+
+ * `Text.Pandoc.Shared`:
+
+ + `tabFilter` now takes a `Text`, not `String`.
+ + `openURL`: Changed type from an Either. Now it will just raise
+ an exception to be trapped later.
+ + Remove `normalizeSpaces` (#1530).
+ + Remove `warn`. (Use `report` from `Text.Pandoc.Class` instead.)
+ + Export a new function `crFilter`.
+ + Add `eastAsianLineBreakFilter` (previously in Markdown reader).
+ + Provide custom `isURI` that rejects unknown schemes.
+ (Albert Krewinkel, #2713). We also export the set of known
+ `schemes`. The new function replaces the function of the same name
+ from `Network.URI`, as the latter did not check whether a scheme is
+ well-known. All official IANA schemes (as of 2017-05-22) are
+ included in the set of known schemes. The four non-official schemes
+ `doi`, `isbn`, `javascript`, and `pmid` are kept.
+ + Remove `err`.
+ + Remove `readDataFile`, `readDefaultDataFile`, `getReferenceDocx`,
+ `getReferenceODT`. These now live in `Text.Pandoc.Class`,
+ where they are defined in terms of `PandocMonad`
+ primitives and have different signatures.
+ + Remove `openURL`. Use `openURL` from `Text.Pandoc.Class` instead.
+ + Add `underlineSpan`.
+
+ * `Text.Pandoc.Readers.HTML`: export new `NamedTag` class.
+
+ * `Text.Pandoc.Readers.Markdown`: remove `readDocxWithWarnings`.
+ With the new API one can simply use `getLog` after running
+ the reader.
+
+ * `Text.Pandoc.Readers.LaTeX`: Changed types for `rawLaTeXInline`
+ and `rawLaTeXBlock`. (Both now return a `String`, and they are
+ polymorphic in state.)
+
+
+ [bug fixes and under-the-hood improvements]
+
+ * TEI writer: Added identifiers on `<div>` elements.
+
+ * DokuWiki reader: Better handling for code block in list item (#3824).
+
+ * Custom writer: Remove old preprocesesor conditionals (Albert Krewinkel).
+
+ * ZimWiki writer: Removed internal formatting from note and table cells,
+ because ZimWiki does not support it (Alex Ivkin, #3446).
+
+ * MediaWiki writer:
+
+ + Updated list of syntax highlighting languages (#3461).
+ Now `r` gets you `<source>` rather than `<code>` (among others).
+ + Add display attribute on `<math>` tags (#3452). This allows display
+ math to be rendered properly.
+ + Remove newline before `</ref>` (#2652).
+ + Don't softbreak lines inside list items (#3531).
+
+ * Org writer:
+
+ + Reduce to two spaces after bullets (#3417, Albert Krewinkel).
+ + Add unit tests (Alexander Krotov).
+ + Stop using raw HTML to wrap divs (Albert Krewinkel, #3771).
+ + Do not strip `#` from Org anchor links (Alexander Krotov).
+
+ * CommonMark writer:
+
+ + Avoid excess blank lines at end of output.
+ + Prefer pipe tables to HTML tables even if it means losing relative
+ column width information (#3734).
+ + Support table, strikethrough extensions, when enabled (as with gfm).
+ Note that we bypass the commonmark writer from cmark and construct our
+ own pipe tables, with better results.
+ + Properly support `--wrap=none`.
+ + Use smallcaps class for `SmallCaps` (#1592).
+ + Omit "fig:" prefix in image titles. This is used internally to
+ indicate internal figures.
+
+ * RST writer:
+
+ + Properly handle table captions.
+ + Don't wrap lines in in definition list terms. Wrapping is not allowed.
+ + Implemented `+/-smart` and improved escaping with `+smart`.
+ + Add empty comments when needed to avoid including a blockquote
+ in the indented content of a preceding block (#3675).
+ + Improve grid table output, fix bug with empty rows (#3516).
+ Uses the new `gridTable` in Writers.Shared, which is here
+ improved to better handle 0-width cells.
+ + Remove space at beginning/end of RST code span (#3496). Otherwise
+ we get invalid RST. There seems to be no way to escape the space.
+ + Add header anchors when header has non-standard id (#3937).
+ + Correctly handle inline code containing backticks, using a `:literal:`
+ role (#3974).
+ + Don't backslash-escape word-internal punctuation (#3978).
+
+ * Markdown writer:
+
+ + Don't include variables in metadata blocks. Previously variables set
+ on the command line were included in e.g. YAML metadata, contrary to
+ documentation and intentions.
+ + Improved escaping with `+smart`.
+ + Fixed grid tables embedded in grid tables (#2834).
+ + Use span with class 'smallcaps' for SmallCaps, instead of a style
+ attribute as before (#1592).
+ + Escape initial `%` in a paragraph if the `pandoc_title_blocks`
+ extension is enabled (#3454). Otherwise in a document starting with
+ a literal `%` the first line is wrongly interpreted as a title.
+ + Fixed false ordered lists in YAML metadata (#3492, #1685). Now we
+ properly escape things that would otherwise start ordered lists,
+ such as
+
+ ---
+ title: 1. inline
+ ...
+ + Better handling of tables with empty columns (#3337). We now
+ calculate the number of columns based on the longest row (or the
+ length of aligns or widths).
+ + Escape unordered list markers at beginning of paragraph (#3497), to
+ avoid false interpretation as a list.
+ + Escape `|` appropriately.
+ + Ensure space before list at top level (#3487).
+ + Avoid spurious blanklines at end of document after tables and list,
+ for example.
+ + Fixed bugs in simple/multiline list output (#3384).
+ Previously we got overlong lists with `--wrap=none`. This is fixed.
+ Previously a multiline list could become a simple list (and would
+ always become one with `--wrap=none`).
+ + Don't emit a simple table if `simple_tables` disabled (#3529).
+ + Case-insensitive reference links (David A Roberts, #3616).
+ Ensure that we do not generate reference links whose labels differ only
+ by case. Also allow implicit reference links when the link
+ text and label are identical up to case.
+ + Put space before reference link definitions (Mauro Bieg, #3630).
+ + Better escaping for links (David A. Roberts, #3619). Previously the
+ Markdown writer would sometimes create links where there were none
+ in the source. This is now avoided by selectively escaping bracket
+ characters when they occur in a place where a link might be created.
+ + Added missing `\n` (David A. Roberts, #3647).
+ + Fixed duplicated reference links with `--reference-links`
+ and `--reference-location=section` (#3674). Also ensure that there
+ are no empty link references `[]`.
+ + Avoid inline surround-marking with empty content (#3715).
+ E.g. we don't want `<strong></strong>` to become `****`.
+ Similarly for emphasis, super/subscript, strikeout.
+ + Don't allow soft break in header (#3736).
+ + Make sure `plain`, `markdown_github`, etc. work for raw.
+ Previously only `markdown` worked. Note: currently a raw block labeled
+ `markdown_github` will be printed for any `markdown` format.
+ + Ensure that `+` and `-` are escaped properly so they don't cause
+ spurious lists (#3773). Previously they were only
+ if succeeded by a space, not if they were at end of line.
+ + Use pipe tables if `raw_html` disabled and `pipe_tables` enabled,
+ even if the table has relative width information (#3734).
+ + Markdown writer: don't crash on `Str ""`.
+ + Make `Span` with null attribute transparent. That is, we don't use
+ brackets or `<span>` tags to mark spans when there are no attributes;
+ we simply output the contents.
+ + Escape pipe characters when `pipe_tables` enabled (#3887).
+ + Better escaping of `<` and `>`. If `all_symbols_escapable` is set,
+ we backslash escape these. Otherwise we use entities as before.
+ + When writing plain, don't use `&nbsp;` to separate list and indented
+ code. There's no need for it in this context, since this isn't to be
+ interpreted using Markdown rules.
+ + Preserve classes in JS obfuscated links (Timm Albers, #2989).
+ HTML links containing classes originally now preserve them when using
+ JavaScript email obfuscation.
+ + Render `SmallCaps` as a native span when `native_spans` are enabled.
+ + Always write attributes with `bracketed_spans` (d-dorazio).
+
+ * Man writer:
+
+ + Fix handling of nested font commands (#3568). Previously pandoc emitted
+ incorrect markup for bold + italic, for example, or bold + code.
+ + Avoid error for definition lists with no definitions (#3832).
+
+ * DocBook writer:
+
+ + Fix internal links with `writerIdentifierPrefix opt`
+ (#3397, Mauro Bieg).
+
+ * Docx writer:
+
+ + Don't include bookmarks on headers unless non-null id (#3476).
+ + Support 9 levels of headers (#1642).
+ + Allow 9 list levels (#3519).
+ + Don't take `distArchive` from datadir (#3322). The docx writer takes
+ components from the distribution's version of `reference.docx` when it
+ can't find them in a user's custom `reference.docx`. Previously, we
+ allowed a `reference.docx` in the data directory (e.g. `~/.pandoc`)
+ to be used as the distribution's reference.docx. This led to a
+ bizarre situation where pandoc would produce a good docx using
+ `--template ~/.pandoc/ref.docx`, but if `ref.docx` were moved to
+ `~/.pandoc/reference.docx`, it would then produce a corrupted docx.
+ + Fixed handling of soft hyphen (0173) (#3691).
+ + Better handling of keywords (#3719).
+ + Cleaner code for handling dir and style attributes for `Div`.
+ + Use `Set` for dynamic styles to avoid duplicates.
+ + Removed redundant element from data/docx/word/numbering.xml.
+ The elements we need are generated when the document is
+ compiled; this didn't do anything.
+ + Activate `evenAndOddHeaders` from reference docx (#3901,
+ Augustín Martín Barbero).
+
+ * ODT/OpenDocument writer:
+
+ + Calculate aspect ratio for percentage-sized images (Mauro Bieg, #3239).
+ + Use more widely available bullet characters (#1400). The old
+ characters weren't available in some font sets. These seem to work
+ well on Windows and Linux versions of LibreOffice.
+ + Wider labels for lists (#2421). This avoids overly narrow labels for
+ ordered lists with `()` delimiters. However, arguably it creates
+ overly wide labels for bullets. Also, lists now start flush with
+ the margin, rather than indented.
+ + Fixed dropped elements in some ordered lists (#2434).
+
+ * FB2 writer:
+
+ + Don't render `RawBlock` as code.
+ + Don't fail with an error on interior headers (e.g. in list) (#3750).
+ Instead, omit them with an INFO message.
+ + Add support for "lang" metadata (Alexander Krotov, #3625).
+ + Format `LineBlock` as poem (Alexander Krotov). Previously writer
+ produced one paragraph with `<empty-line/>` elements, which are not
+ allowed inside `<p>` according to FB2 schema.
+ + Replace `concatMap` with `cMap` (Alexander Krotov).
+ + Write FB2 lists without nesting blocks inside `<p>` (Alexander
+ Krotov, #4004)
+
+ * HTML writer:
+
+ + Make sure `html4`, `html5` formats work for raw blocks/inlines.
+ + Render raw inline environments when `--mathjax` used (#3816).
+ We previously did this only with raw blocks, on the assumption
+ that math environments would always be raw blocks. This has changed
+ since we now parse them as inline environments.
+ + Ensure we don't get two style attributes for width and height.
+ + Report when not rendering raw inline/block.
+ + Issue warning if no title specified and template used (#3473).
+ + Info message if `lang` is unspecified (#3486).
+ + Removed unused parameter in `dimensionsToAttributeList`.
+ + Avoid two class attributes when adding `uri` class (#3716).
+ + Fix internal links with `writerIdentifierPrefix opt` (#3397, Mauro
+ Bieg).
+ + Use revealjs's math plugin for mathjax (#3743). This is a thin
+ wrapper around mathjax that makes math look better on revealjs.
+ + Slidy: use h1 for all slides, even if they were originally
+ level 2 headers (#3566). Otherwise the built-in table of contents
+ in Slidy breaks.
+
+ * LaTeX writer:
+
+ + Don't render LaTeX images with data: URIs (#3636). Note that
+ `--extract-media` can be used when the input contains data: URIs.
+ + Make highlighted code blocks work in footnotes (Timm Albers).
+ + Don't use figure inside table cell (#3836).
+ + Use proper code for list enumerators (#3891). This should fix problems
+ with lists that don't use arabic numerals.
+ + Always add hypertarget when there's a non-empty identifier (#2719).
+ Previously the hypertargets were only added when there was actually
+ a link to that identifier.
+ + Use `%` after hypertarget before code block.
+ + Add `\leavevmode` before hypertarget at start of paragraph (#2704,
+ fixes formatting problems in beamer citations).
+ + Don't use `lstinline` in \item[..] (#645). If you do, the contents
+ of item disappear or are misplaced. Use `\texttt` instead.
+ + Fix problem with escaping in `lstinline` (#1629). Previously the
+ LaTeX writer created invalid LaTeX when `--listings` was specified and
+ a code span occured inside emphasis or another construction.
+ + Fix error with line breaks after empty content (#2874). LaTeX
+ requires something before a line break, so we insert a `~` if no
+ printable content has yet been emitted.
+ + Use BCP47 parser.
+ + Fixed detection of otherlangs (#3770). We weren't recursing into
+ inline contexts.
+ + Handle language in inline code with `--listings` (#3422).
+ + Write euro symbol directly in LaTeX (Andrew Dunning, #3801).
+ The textcomp package allows pdfLaTeX to parse `€` directly, making the
+ `\euro` command unneeded.
+ + Fixed footnotes in table captions (#2378). Note that if the table has
+ a first page header and a continuation page header, the notes will
+ appear only on the first occurrence of the header.
+ + In `writeBeamer` output, allow hyperlinks to frames (#3220).
+ Previously you could link to a header above or below slide level but
+ not *to* slide level. This commit changes that. Hypertargets are
+ inserted inside frame titles; technically the reference is to just
+ after the title, but in normal use (where slides are viewed full
+ screen in a slide show), this does not matter.
+ + Remove `\strut` at beginning of table cells (#3436). This fixes a
+ problem with alignment of lists in table cells. The `\strut` at the
+ end seems to be enough to avoid the too-close spacing that motivated
+ addition of the strut in #1573.
+ + Add partial siunitx Support (Marc Schreiber, #3588).
+
+ * ConTeXt writer:
+
+ + Refactored to use BCP47 module.
+ + Remove unnecessary `$` (Alexander Krotov, #3482).
+ + Use header identifiers for chapters (#3968).
+
+ * EPUB writer:
+
+ + `title_page.xhtml` is now put in `text/`.
+ + Don't strip formatting in TOC (#1611).
+
+ * Textile reader:
+
+ + Fix bug for certain links in table cells (#3667).
+ + Allow 'pre' code in list item (#3916).
+
+ * HTML reader:
+
+ + Added warnings for ignored material (#3392).
+ + Better sanity checks to avoid parsing unintended things as
+ raw HTML in the Markdown reader (#3257).
+ + Revise treatment of `li` with `id` attribute (#3596). Previously we
+ always added an empty div before the list item, but this created
+ problems with spacing in tight lists. Now we do this: If the list
+ item contents begin with a `Plain` block, we modify the `Plain`
+ block by adding a `Span` around its contents. Otherwise, we add a
+ `Div` around the contents of the list item (instead of adding an
+ empty `Div` to the beginning, as before).
+ + Add `details` tag to list of block tags (#3694).
+ + Removed `button` from block tag list (#3717). It is already in the
+ `eitherBlockOrInlineTag` list, and should be both places.
+ + Use `Set`s instead of lists for block tag lookup.
+ + Rewrote to use `Text` throughout. Effect on memory usage is modest
+ (< 10%).
+ + Use the lang value of `<html>` to set the lang meta value (bucklereed,
+ #3765).
+ + Ensure that paragraphs are closed properly when the parent block
+ element closes, even without `</p>` (#3794).
+ + Parse `<figure>` and `<figcaption>` (Mauro Bieg, #3813).
+ + Parse `<main>` like `<div role=main>` (bucklereed, #3791).
+ `<main>` closes `<p>` and behaves like a block element generally
+ + Support column alignments (#1881). These can be set either
+ with a `width` attribute or with `text-width` in a `style` attribute.
+ + Modified state type to be an instance of `HasLogMessages`, so
+ `registerHeader` can issue warnings.
+ + `</td>` or `</th>` should close any open block tag (#3991).
+ + `<td>` should close an open `<th>` or `<td>`.
+ + `htmlTag` improvements (#3989). We previously failed on cases
+ where an attribute contained a `>` character. This patch fixes the
+ bug, which especially affects raw HTML in Markdown.
+
+ * Txt2Tags reader:
+
+ + Newline is not indentation (Alexander Krotov).
+
+ * MediaWiki reader:
+
+ + Allow extra hyphens after `|-` in tables (#2649).
+ + Allow blank line after table start (#2649).
+ + Fixed more table issues (#2649).
+ + Ensure that list starts begin at left margin (#2606). Including when
+ they're in tables or other list items.
+ + Make smart double quotes depend on `smart` extension (#3585).
+ + Don't do curly quotes inside `<tt>` contexts (#3585). Even if `+smart`.
+ + Modified state type to be an instance of `HasLogMessages`, so
+ `registerHeader` can issue warnings.
+
+ * TWiki reader (Alexander Krotov):
+
+ + Remove unnecessary `$` (#3597).
+ + Simplify `linkText` (#3605).
+
+ * EPUB reader:
+
+ + Minor refactoring, avoiding explicit MediaBag handling.
+ This all works behind the scenes in CommonState plumbing.
+
+ * Docx reader:
+
+ + Don't drop smartTag contents (#2242).
+ + Handle local namespace declarations (#3365). Previously we didn't
+ recognize math, for example, when the xmlns declaration occured on
+ the element and not the root.
+ + More efficient trimSps (#1530). Replacing `trimLineBreaks`. This
+ does the work of `normalizeSpaces` as well, so we avoid the need for
+ that function here.
+ + Avoid 0-level headers (Jesse Rosenthal, #3830). We used to parse
+ paragraphs styled with "HeadingN" as "nth-level header." But if a
+ document has a custom style named "Heading0", this will produce a
+ 0-level header, which shouldn't exist. We only parse this style
+ if N>0. Otherwise we treat it as a normal style name, and
+ follow its dependencies, if any.
+ + Add tests for avoiding zero-level header (Jesse Rosenthal).
+
+ * ODT reader:
+
+ + Replaced `collectRights` with Rights from `Data.Either`.
+ + Remove dead code (Albert Krewinkel).
+
+ * Org reader (Albert Krewinkel, unless noted).
+
+ + Don't allow tables inside list items (John MacFarlane, #3499).
+ + Disallow tables on list marker lines (#3499).
+ + Convert markup at beginning of footnotes (John MacFarlane, #3576).
+ + Allow emphasized text to be followed by `[` (#3577).
+ + Handle line numbering switch for src blocks.
+ The line-numbering switch that can be given to source blocks (`-n` with
+ an start number as an optional parameter) is parsed and translated to a
+ class/key-value combination used by highlighting and other readers and
+ writers.
+ + Stop adding rundoc prefix to src params. Source block parameter names
+ are no longer prefixed with `rundoc`. This was intended to simplify
+ working with the rundoc project, a babel runner. However, the rundoc
+ project is unmaintained, and adding those markers is not the reader's
+ job anyway. The original language that is specified for a source
+ element is now retained as the `data-org-language` attribute and only
+ added if it differs from the translated language.
+ + Allow multi-word arguments to src block params (#3477). The reader now
+ correctly parses src block parameter list even if parameter arguments
+ contain multiple words.
+ + Avoid creating `nullMeta` by applying `setMeta` directly
+ (Alexander Krotov).
+ + Replace `sequence . map` with `mapM`.
+ + Fix smart parsing behavior. Parsing of smart quotes and special
+ characters can either be enabled via the `smart` language extension or
+ the `'` and `-` export options. Smart parsing is active if either the
+ extension or export option is enabled. Only smart parsing of special
+ characters (like ellipses and en and em dashes) is enabled by default,
+ while smart quotes are disabled. Previously, all smart parsing was
+ disabled unless the language extension was enabled.
+ + Subject full doc tree to headline transformations (Albert Krewinkel,
+ #3695). Emacs parses org documents into a tree structure, which is
+ then post-processed during exporting. The reader is changed to do the
+ same, turning the document into a single tree of headlines starting
+ at level 0.
+ + Fix cite parsing behaviour (Herwig Stuetz). Until now, `org-ref`
+ cite keys included special characters also at the end. This caused
+ problems when citations occur right before colons or at the end of
+ a sentence. With this change, all non alphanumeric characters at
+ the end of a cite key are ignored. This also adds `,` to the list
+ of special characters that are legal in cite keys to better mirror
+ the behaviour of org-export.
+ + Fix module names in haddock comments. Copy-pasting had lead to
+ haddock module descriptions containing the wrong module names.
+ + Recognize babel result blocks with attributes (#3706). Babel
+ result blocks can have block attributes like captions and names.
+ Result blocks with attributes were not recognized and were parsed
+ as normal blocks without attributes.
+ + Include tags in headlines. The Emacs default is to include tags in the
+ headline when exporting. Instead of just empty spans, which contain the
+ tag name as attribute, tags are rendered as small caps and wrapped in
+ those spans. Non-breaking spaces serve as separators for multiple tags.
+ + Respect export option for tags (#3713). Tags are appended to
+ headlines by default, but will be omitted when the `tags` export option
+ is set to nil.
+ + Use `tag-name` attribute instead of `data-tag-name`.
+ + Use `org-language` attribute rather than `data-org-language`.
+ + Modified state type to be an instance of `HasLogMessages`, so
+ `registerHeader` can issue warnings.
+ + End footnotes after two blank lines. Footnotes can not only be
+ terminated by the start of a new footnote or a header, but also by two
+ consecutive blank lines.
+ + Update emphasis border chars (#3933). The org reader was updated to
+ match current org-mode behavior: the set of characters which are
+ acceptable to occur as the first or last character in an org emphasis
+ have been changed and now allows all non-whitespace chars at the
+ inner border of emphasized text (see `org-emphasis-regexp-components`).
+
+ * RST reader:
+
+ + Fixed small bug in list parsing (#3432). Previously the parser didn't
+ handle properly this case:
+
+ * - a
+ - b
+ * - c
+ - d
+ + Handle multiline cells in simple tables (#1166).
+ + Parse list table directive (Keiichiro Shikano, #3432).
+ + Make use of `anyLineNewline` (Alexander Krotov, #3686).
+ + Use `anyLineNewline` in `rawListItem` (Alexander Krotov, #3702).
+ + Reorganize block parsers for ~20% faster parsing.
+ + Fixed `..include::` directive (#3880).
+ + Handle blank lines correctly in line blocks (Alexander Krotov, #3881).
+ Previously pandoc would sometimes combine two line blocks separated
+ by blanks, and ignore trailing blank lines within the line block.
+ + Fix indirect hyperlink targets (#512).
+
+ * Markdown reader:
+
+ + Allow attributes in reference links to start on next line (#3674).
+ + Parse YAML metadata in a context that sees footnotes defined in
+ the body of the document (#1279).
+ + When splitting pipe table cells, skip tex math (#3481).
+ You might have a `|` character inside math. (Or for that matter
+ something that the parser might mistake for raw HTML.)
+ + Treat span with class `smallcaps` as SmallCaps.
+ This allows users to specify small caps in Markdown this way:
+ `[my text]{.smallcaps}` (#1592).
+ + Fixed internal header links (#2397).
+ This patch also adds `shortcut_reference_links` to the list
+ of mmd extensions.
+ + Treat certain environments as inline
+ when they occur without space surrounding them (#3309, #2171).
+ E.g. equation, math. This avoids incorrect vertical space
+ around equations.
+ + Optimized `nonindentSpaces`. Makes the benchmark go from 40 to 36 ms.
+ + Allow latex macro definitions indented 1-3 spaces.
+ Previously they only worked if nonindented.
+ + Improved parsing of indented raw HTML blocks (#1841).
+ Previously we inadvertently interpreted indented HTML as
+ code blocks. This was a regression. We now seek to determine the
+ indentation level of the contents of an HTML block, and (optionally)
+ skip that much indentation. As a side effect, indentation may be
+ stripped off of raw HTML blocks, if `markdown_in_html_blocks` is
+ used. This is better than having things interpreted as indented
+ code blocks.
+ + Fixed smart quotes after emphasis (#2228). E.g. in `*foo*'s 'foo'`.
+ + Warn for notes defined but not used (#1718).
+ + Use `anyLineNewline` (Alexander Krotov).
+ + Interpret YAML metadata as Inlines when possible (#3755). If
+ the metadata field is all on one line, we try to interpret it as
+ Inlines, and only try parsing as Blocks if that fails. If it
+ extends over one line (including possibly the `|` or `>` character
+ signaling an indented block), then we parse as Blocks. This was
+ motivated by some German users finding that `date: '22. Juin 2017'`
+ got parsed as an ordered list.
+ + Fixed spurious parsing as citation as reference def (#3840).
+ We now disallow reference keys starting with `@` if the
+ `citations` extension is enabled.
+ + Parse `-@roe` as suppress-author citation (pandoc-citeproc#237).
+ Previously only `[-@roe]` (with brackets) was recognized as
+ suppress-author, and `-@roe` was treated the same as `@roe`.
+ + Fixed parsing of fenced code after list when there is no intervening
+ blank line (#3733).
+ + Allow raw latex commands starting with `\start` (#3558). Previously
+ these weren't allowed because they were interpreted as starting
+ ConTeXt environments, even without a corresponding `\stop`...
+ + Added `inlines`, `inlines1`.
+ + Require nonempty alt text for `implicit_figures` (#2844).
+ A figure with an empty caption doesn't make sense.
+ + Removed texmath macro material; now all this is handled
+ in the LaTeX reader functions.
+ + Fixed bug with indented code following raw LaTeX (#3947).
+
+ * LaTeX reader:
+
+ + Rewrote LaTeX reader with proper tokenization (#1390,
+ #2118, #3236, #3779, #934, #982). This rewrite is primarily
+ motivated by the need to get macros working properly. A side benefit
+ is that the reader is significantly faster. We now tokenize the
+ input text, then parse the token stream. Macros modify the token
+ stream, so they should now be effective in any context, including
+ math. Thus, we no longer need the clunky macro processing
+ capacities of texmath.
+ + Parse `\,` to `\8198` (six-per-em space) (Henri Werth).
+ + Allow `\newcommand\foo{blah}` without braces.
+ + Support `\lstinputlisting` (#2116).
+ + Issue warnings when skipping unknown latex commands (#3392).
+ + Include contents of `\parbox`.
+ + Allow `\hspace` and `\vspace` to count as raw block or inline.
+ Previously we would refuse to parse anything as raw inline if
+ it was in the `blockCommands` list. Now we allow exceptions
+ if they're listed under ignoreInlines in inlineCommands.
+ This should make it easier e.g. to include an `\hspace`
+ between two side-by-side raw LaTeX tables.
+ + Don't drop contents of `\hypertarget`.
+ + Handle spaces before `\cite` arguments.
+ + Allow newpage, clearpage, pagebreak in inline contexts as well as
+ block contexts (#3494).
+ + Treat `{{xxx}}` the same as `{xxx}` (#2115).
+ + Use `pMacroDefinition` in macro (for more direct parsing).
+ Note that this means that `macro` will now parse one
+ macro at a time, rather than parsing a whole group together.
+ + Fixed failures on \ref{}, \label{} with `+raw_tex`. Now these
+ commands are parsed as raw if `+raw_tex`; otherwise, their argument
+ is parsed as a bracketed string.
+ + Don't crash on empty `enumerate` environment (#3707).
+ + Handle escaped `&` inside table cell (#3708).
+ + Handle block structure inside table cells (#3709). `minipage` is no
+ longer required.
+ + Handle some width specifiers on table columns (#3709). Currently
+ we only handle the form `0.9\linewidth`. Anything else would have
+ to be converted to a percentage, using some kind arbitrary assumptions
+ about line widths.
+ + Make sure `\write18` is parsed as raw LaTeX. The change is in the
+ LaTeX reader's treatment of raw commands, but it also affects the
+ Markdown reader.
+ + Fixed regression with starred environment names (#3803).
+ + Handle optional args in raw `\titleformat` (#3804).
+ + Improved heuristic for raw block/inline. An unknown command at the
+ beginning of the line that could be either block or inline is
+ treated as block if we have a sequence of block commands followed by
+ a newline or a `\startXXX` command (which might start a raw ConTeXt
+ environment).
+ + Don't remove macro definitions from the output, even if
+ `Ext_latex_macros` is set, so that macros will be applied.
+ Since they're only applied to math in Markdown, removing the macros
+ can have bad effects. Even for math macros, keeping them should be
+ harmless.
+ + Removed `macro`. It is no longer necessary, since the
+ `rawLaTeXBlock` parser will parse macro definitions. This also avoids
+ the need for a separate `latexMacro` parser in the Markdown reader.
+ + Use `label` instead of `data-label` for label in caption (#3639).
+ + Fixed space after \figurename etc.
+ + Resolve references to section numbers.
+ + Fix `\let\a=0` case, with single character token.
+ + Allow `@` as a letter in control sequences. `@` is commonly used
+ in macros using `\makeatletter`. Ideally we'd make the tokenizer
+ sensitive to `\makeatletter` and `\makeatother`, but until then this
+ seems a good change.
+ + Track header numbers and correlate with labels.
+ + Allow `]` inside group in option brackets (#3857).
+ + lstinline with braces can be used (verb cannot be used with braces)
+ (Marc Schreiber, #3535).
+ + Fix keyval funtion: pandoc did not parse options in braces correctly
+ (Marc Schreiber, #3642).
+ + When parsing raw LaTeX commands, include trailing space (#1773).
+ Otherwise things like `\noindent foo` break and turn into
+ `\noindentfoo`. Affects `-f latex+raw_tex` and `-f markdown` (and other
+ formats that allow `raw_tex`).
+ + Don't treat "..." as Quoted (#3958). This caused quotes to be omitted in
+ `\texttt` contexts.
+ + Add tests for existing `\includegraphics` behaviour (Ben Firshman).
+ + Allow space before `=` in bracketd options (Ben Firshman).
+ + Be more forgiving in parsing command options. This was needed, for
+ example, to make some minted options work.
+ + Strip off quotes in `\include` filenames.
+
+ * Added `Text.Pandoc.CSV`, simple (unexported) CSV parser.
+
+ * `Text.Pandoc.PDF`:
+
+ + Got `--resource-path` working with PDF output (#852).
+ + Fetch images when generating PDF via context (#3380).
+ To do this, we create the temp directory as a subdirectory
+ of the working directory. Since context mk IV by default looks
+ for images in the parent directory, this works.
+ + Use `report` instead of `warn`, make it sensitive to verbosity settings.
+ + Use `fillMediaBag` and `extractMedia` to extract media to temp dir.
+ This reduces code duplication.
+ + `html2pdf`: use stdin instead of intermediate HTML file
+ + Removed useless `TEXINPUTS` stuff for `context2pdf`. mkiv context
+ doesn't use `TEXINPUTS`.
+
+ * `Text.Pandoc.Pretty`:
+
+ + Simplified definition of `realLength`.
+ + Don't error for blocks of size < 1. Instead, resize to 1 (see #1785).
+
+ * `Text.Pandoc.MIME`:
+
+ + Use `application/javascript` (not `application/x-javascript`).
+ + Added `emf` to mimeTypes with type `application/x-msmetafile` (#1713).
+
+ * `Text.Pandoc.ImageSize`:
+
+ + Improve SVG image size code (Marc Schreiber, #3580).
+ + Make `imageSize` recognize basic SVG dimensions (Mauro Bieg, #3462).
+
+ * Use `Control.Monad.State.Strict` throughout. This gives 20-30% speedup
+ and reduction of memory usage in most of the writers.
+
+ * Use `foldrWithKey` instead of deprecated `foldWithKey`.
+
+ * `Text.Pandoc.SelfContained`:
+
+ + Fixed problem with embedded fonts (#3629).
+ + Refactored getData from `getDataURI` in `SelfContained`.
+ + Don't use data URIs for script or style (#3423). Instead, just use
+ script or style tags with the content inside. The old method with
+ data URIs prevents certain optimizations outside pandoc. Exception:
+ data URIs are still used when a script contains `</script>` or a
+ style contains `</`.
+ + SelfContained: Handle URL inside material retrieved from a URL
+ (#3629). This can happen e.g. with an @import of a google web font.
+ (What is imported is some CSS which contains an url reference
+ to the font itself.) Also, allow unescaped pipe (|) in URL.
+ + Load resources from `data-src` (needed for lazy loading in
+ reveal.js slide shows).
+ + Handle `data-background-image` attribute on section (#3979).
+
+ * `Text.Pandoc.Parsing`:
+
+ + Added `indentWith` (Alexander Krotov, #3687).
+ + Added `stateCitations` to `ParserState`.
+ + Removed `stateChapters` from `ParserState`.
+ + In `ParserState`, make `stateNotes'` a Map, add `stateNoteRefs`.
+ + Added `gobbleSpaces` and `gobbleAtMostSpaces`.
+ + Adjusted type of `insertIncludedFile` so it can be used with token
+ parser.
+ + Replace old texmath macro stuff from Parsing. Use Macro from
+ Text.Pandoc.Readers.LaTeX.Types instead.
+ + Export `insertIncludedFile`.
+ + Added `HasLogMessages`, `logMessage`, `reportLogMessages` (#3447).
+ + Replace partial with total function (Albert Krewinkel).
+ + Introduce `HasIncludeFiles` type class (Albert Krewinkel). The
+ `insertIncludeFile` function is generalized to work with all parser
+ states which are instances of that class.
+ + Add `insertIncludedFilesF` which returns F blocks (Albert Krewinkel).
+ The `insertIncludeFiles` function was generalized and renamed
+ to `insertIncludedFiles'`; the specialized versions are based on that.
+ + `many1Till`: Check for the end condition before parsing (Herwig
+ Stuetz). By not checking for the end condition before the first
+ parse, the parser was applied too often, consuming too much of the
+ input. This only affects `many1Till p end` where `p` matches on a
+ prefix of `end`.
+ + Provide `parseFromString` (#3690). This is a verison of
+ `parseFromString` specialied to ParserState, which resets
+ `stateLastStrPos` at the end. This is almost always what we want.
+ This fixes a bug where `_hi_` wasn't treated as emphasis in the
+ following, because pandoc got confused about the position of the
+ last word: `- [o] _hi_`.
+ + Added `takeP`, `takeWhileP` for efficient parsing of `[Char]`.
+ + Fix `blanklines` documentation (Alexander Krotov, #3843).
+ + Give less misleading line information with `parseWithString`.
+ Previously positions would be reported past the end of the chunk.
+ We now reset the source position within the chunk and report
+ positions "in chunk."
+ + Add `anyLineNewline` (Alexander Krotov).
+ + Provide shared F monad functions for Markdown and Org readers
+ (Albert Krewinkel). The `F` monads used for delayed evaluation
+ of certain values in the Markdown and Org readers are based on a
+ shared data type capturing the common pattern of both `F` types.
+ + Add `returnF` (Alexander Krotov).
+ + Avoid parsing `Notes:**` as a bare URI (#3570). This avoids parsing
+ bare URIs that start with a scheme + colon + `*`, `_`, or `]`.
+ + Added `readerAbbreviations` to `ParserState`. Markdown reader
+ now consults this to determine what is an abbreviation.
+ + Combine grid table parsers (Albert Krewinkel, #3638). The grid table
+ parsers for markdown and rst was combined into one single
+ parser `gridTable`, slightly changing parsing behavior of both
+ parsers: (1) The markdown parser now compactifies block content
+ cell-wise: pure text blocks in cells are now treated as paragraphs
+ only if the cell contains multiple paragraphs, and as plain blocks
+ otherwise. Before, this was true only for single-column tables. (2)
+ The rst parser now accepts newlines and multiple blocks in header
+ cells.
+ + Generalize tableWith, gridTableWith (Albert Krewinkel).
+ The parsing functions `tableWith` and `gridTableWith` are generalized
+ to work with more parsers. The parser state only has to be an
+ instance of the `HasOptions` class instead of requiring a concrete
+ type. Block parsers are required to return blocks wrapped into a
+ monad, as this makes it possible to use parsers returning results
+ wrapped in `Future`s.
+
+ * `Text.Pandoc.Shared`:
+
+ + Simplify `toRomanNumeral` using guards (Alexander Krotov, #3445)
+ + `stringify`: handle Quoted better (#3958). Previously we were losing
+ the quotation marks in Quoted elements.
+
+ * `Text.Pandoc.Writers.Shared`:
+
+ + Export `metaToJSON'`, `addVariablesToJSON` (#3439).
+ This allows us to add the variables AFTER using the metadata
+ to generate a YAML header (in the Markdown writer).
+ + Added `unsmartify` (previously in RST writer).
+ Undo literal double curly quotes. Previously we left these.
+ + Generalize type of `metaToJSON` so it can take a Text. Previously a
+ String was needed as argument; now any ToJSON instance will do.
+ + Added `gridTable` (previously in Markdown writer).
+ + `gridTable`: Refactored to use widths in chars.
+ + `gridTable`: remove unnecessary extra space in cells.
+ + Fixed `addVariablesToJSON`. It was previously not allowing multiple
+ values to become lists.
+ + Pipe tables: impose minimum cell size (see #3526).
+
+
+ [default template changes]
+
+ * HTML templates (including EPUB and HTML slide show templates):
+
+ + Make default.html5 polyglot markup conformant (John Luke Bentley,
+ #3473). Polyglot markup is HTML5 that is also valid XHTML. See
+ <https://www.w3.org/TR/html-polyglot>. With this change, pandoc's
+ html5 writer creates HTML that is both valid HTML5 and valid XHTML.
+ + Regularized CSS in html/epub/html slide templates (#3485).
+ All templates now include `code{white-space: pre-wrap}`
+ and CSS for `q` if `--html-q-tags` is used. Previously some templates
+ had `pre` and others `pre-wrap`; the `q` styles were only sometimes
+ included.
+ + CSS for `.smallcaps`, (Mauro Bieg, #1592)
+ + `default.revealjs`: make `history` default to true.
+ + `default.revealjs`: use lazy loading (#2283).
+ + `default.revealjs`: add `mathjax` variable and some conditional code
+ to use the MathJaX plugin.
+ + `default.slidy` uses `https` instead of `http` (ickc, #3848).
+ + `default.dzslides`: Load Google Font using HTTPS by default
+ (Yoan Blanc).
+
+ * DocBook5 template: Use `lang` and `subtitle` variables (Jens Getreu,
+ #3855).
+
+ * LaTeX/Beamer template:
+
+ + Combine LaTeX/Beamer templates (Andrew Dunning, #3878).
+ `default.beamer` has been removed; beamer now uses the
+ `default.latex` template. Beamer-specific parts are conditional
+ on the `beamer` variable set by the writer. Note that
+ `pandoc -D beamer` will return this (combined) template.
+ + Use `xcolor` for `colorlinks` option (Andrew Dunning, #3877).
+ Beamer loads `xcolor` rather than `color`, and thus the
+ `dvipsnames` option doesn't take effect. This also provides a wider
+ range of colour selections with the `svgnames` option.
+ + Use starred versions of `xcolor` names (Andrew Dunning).
+ Prevents changes to documents defined using the `dvipsnames` list (e.g.
+ `Blue` gives a different result with svgnames enabled).
+ + Load `polyglossia` after header-includes (#3898). It needs to be
+ loaded as late as possible.
+ + Use `unicode-math` (Vaclav Haisman). Use `mathspec` with only
+ XeLaTeX on request.
+ + Don't load `fontspec` before `unicode-math` (over there).
+ The `unicode-math` package loads `fontspec` so explict loading of
+ `fontspec` before `unicode-math` is not necessary.
+ + Use `unicode-math` by default in default.latex template. mathspec will
+ be used in xelatex if the `mathspec` variable is set; otherwise
+ unicode-math will be used (Václav Haisman).
+ + Use `dvipsnames` options when `colorlinks` specified (otherwise
+ we get an error for `maroon`) (Thomas Hodgson).
+ + Added beamer `titlegraphic` and `logo` variables (Thomas Hodgson).
+ + Fix typo in fix for notes in tables (#2378, zeeMonkeez).
+ + Fix `hyperref` options clash (Andrew Dunning, #3847) Avoids an options
+ clash when loading a package (e.g. `tufte-latex`) that uses
+ `hyperref` settings different from those in the template.
+ + Add `natbiboptions` variable (#3768).
+ + Fix links inside captions in LaTeX output with links-as-notes
+ (Václav Haisman, #3651). Declare our redefined `\href` robust.
+ + Load `parskip` before `hyperref` (Václav Haisman, #3654).
+ + Allow setting Japanese fonts when using LuaLaTeX (Václav Haisman,
+ #3873). by using the `luatexja-fontspec` and `luatexja-preset`
+ packages. Use existing `CJKmainfont` and `CJKoptions` template
+ variables. Add `luatexjafontspecoptions` for `luatexja-fontspec`
+ and `luatexjapresetoptions` for `luatexja-preset`.
+ + Added `aspectratio` variable to beamer template (Václav Haisman,
+ #3723).
+ + Modified template.latex to fix XeLaTex being used with tables
+ (lwolfsonkin, #3661). Reordered `lang` variable handling to
+ immediately before `bidi`.
+
+ * ConTeXt template: Improved font handling: `simplefonts` is now
+ obsolete in ConTeXt (Pablo Rodríguez).
+
+
+ [documentation improvements]
+
+ * MANUAL.txt:
+
+ + Add URL for Prince HTML > PDF engine (Ian, #3919).
+ + Document that content above slide-level will be omitted in
+ slide shows. See #3460, #2265.
+ + Explain `--webtex` SVG url (Mauro Bieg, #3471)
+ + Small clarification in YAML metadata section.
+ + Document that html4 is technically XHTML 1.0 transitional.
+ + Remove refs to highlighting-kate (#3672).
+ + Document ibooks specific epub metadata.
+ + Clarify that mathml is used for ODT math.
+ + Mention limitations of Literate Haskell Support (#3410,
+ Joachim Breitner).
+ + Add documentation of limitations of grid tables (Stephen
+ McDowell, #3864).
+ + Clarify that meta-json contains transformed values (Jakob Voß,
+ #3491) Make clear that template variable `meta-json` does not
+ contain plain text values or JSON output format but field values
+ transformed to the selected output format.
+
+ * COPYRIGHT:
+
+ + Clarify that templates are dual-licensed.
+ + Clarify that pandoc-types is BSD3 licensed.
+ + List new files not written by jgm (Albert Krewinkel).
+ + Update dates in copyright notices (Albert Krewinkel). This follows
+ the suggestions given by the FSF for GPL licensed software.
+ <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
+
+ * INSTALL.md:
+
+ + Improved instructions for tests with patterns.
+ + Put RPM-based distros on separate point (Mauro Bieg, #3449)
+
+ * CONTRIBUTING.md:
+
+ + Fixed typos (Wandmalfarbe, #3479).
+ + Add "ask on pandoc-discuss" (Mauro Bieg).
+
+ * Add lua filter documentation in `doc/lua-filters.md`. Note that the
+ end of this document is autogenerated from `data/pandoc.lua`
+ using `make doc/lua-filters.md`, which uses `tools/ldoc.ltp`
+ (Albert Krewinkel).
+
+ * Add `doc/filters.md`. This is the old scripting tutorial from
+ the website.
+
+ * Add `doc/using-the-pandoc-api.md` (#3289). This gives an introduction
+ to using pandoc as a Haskell library.
+
+
+ [build infrastructure improvements]
+
+ * Removed `data/templates` submodule. Templates are now a subtree
+ in `data/templates`. This removes the need to do `git submodule
+ update`.
+
+ * Renamed `tests` -> `test`.
+
+ * Remove `https` flag. Always build with HTTPS support.
+
+ * Use `file-embed` instead of `hsb2hs` to embed data files when
+ `embed_data_files` flag is set. `file-embed` gives us better dependency
+ tracking: if a data file changes, ghc/stack/cabal know to recompile
+ the Data module. This also removes `hsb2hs` as a build dependency.
+
+ * Add `custom-setup` stanza to pandoc, lowercase field names.
+
+ * Add `static` Cabal flag.
+
+ * Name change OSX -> MacOS. Add a -MacOS suffix to mac package rather
+ than -OSX. Changed local names from osx to macos.
+
+ * make_macos_package.sh - Use strip to reduce executable size.
+
+ * Revised binary linux package. Now a completely static executable
+ is created, using Docker and alpine. We create both a deb and a
+ tarball. The old `deb` directory has been replaced with a `linux`
+ directory. Running `make` in the `linux` directory should
+ perform the build, putting the binary packages in `artifacts/`.
+
+ * `linux/control.in`: add `Replaces:`, so existing pandoc-citeproc and
+ pandoc-data packages will be uninstalled; this package provides
+ both (#3822). Add latex packages as 'suggested', update
+ description.
+
+ * Remove cpphs build requirement -- it is no longer needed.
+
+ * Replaced `{deb,macos,windows}/stack.yaml` with `stack.pkg.yaml`.
+
+ * Name change OSX -> macOS (ickc, #3869).
+
+ * Fix casing of Linux, UNIX, and Windows (ickc).
+
+ * `.travis.yml`: create a source dist and do cabal build and test there.
+ That way we catch errors due to files missing from the data
+ section of pandoc.cabal.
+
+ * Makefile:
+
+ + Split `make haddock` from `make full`.
+ + Add BRANCH variable for winpkg.
+ + Add `lint` target.
+ + Improve `make full`. Disable optimizations.
+ Build everything, inc. trypandoc and benchmarks. Use parallel build.
+ + Allow `make test` to take `TESTARGS`.
+
+ * Added new command tests (`Tests.Command`), using small text files
+ in `test/command/`. Any files added in this directory will be treated
+ as shell tests (see smart.md for an example). This makes it very easy
+ to add regression tests etc.
+
+ * Test fixes so we can find data files. In old tests & command tests,
+ we now set the environment variable `pandoc_datadir`. In lua tests,
+ we set the datadir explicitly.
+
+ * Refactored `compareOutput` in docx writer test.
+
+ * Consolidated some common functions in `Tests.Helper`.
+
+ * Small change to unbalanced bracket test to speed up test suite.
+
+ * Speed up Native writer quickcheck tests.
+
+ * Use tasty for tests rather than test-framework.
+
+ * Add simple Emacs mode to help with Pandoc templates editing.
+ (Václav Haisman, #3889). `tools/pandoc-template-mode.el`
- * Require skylighting >= 0.1.1.4.
- * Adjust test output for skylighting version.
- * Relax upper bounds on blaze-html and blaze-markup.
pandoc (1.19.2)
@@ -319,11 +3545,11 @@ pandoc (1.19)
3. does some postprocessing of the paragraphs that combines tables
followed immediately by captions
- The ODT writer used the `TableCaption` style for the caption
- paragraph. This commit follows the OpenOffice approach which allows
- for appending captions to table but uses a built-in style named
- `Table` instead of `TableCaption`. Users of a custom `reference.odt`
- should change the style's name from `TableCaption` to `Table`.
+ The ODT writer used the `TableCaption` style for the caption
+ paragraph. This commit follows the OpenOffice approach which allows
+ for appending captions to table but uses a built-in style named
+ `Table` instead of `TableCaption`. Users of a custom `reference.odt`
+ should change the style's name from `TableCaption` to `Table`.
* ODT reader: Infer tables' header props from rows (#3199,
Hubert Plociniczak). ODT reader simply provided an empty header list
@@ -3274,7 +6500,7 @@ pandoc (1.13.2.1)
pandoc (1.13.2)
- * TWiki Reader: add new new twiki reader (API chaneg, Alexander Sulfrian).
+ * TWiki Reader: add new new twiki reader (API change, Alexander Sulfrian).
* Markdown reader:
@@ -3552,23 +6778,23 @@ pandoc (1.13.2)
Now we still support those, but also support the format recommended
for epub metadata in the pandoc README:
- ---
- title:
- - type: main
- text: My Book
- - type: subtitle
- text: An investigation of metadata
- creator:
- - role: author
- text: John Smith
- - role: editor
- text: Sarah Jones
- identifier:
- - scheme: DOI
- text: doi:10.234234.234/33
- publisher: My Press
- rights: (c) 2007 John Smith, CC BY-NC
- ...
+ ---
+ title:
+ - type: main
+ text: My Book
+ - type: subtitle
+ text: An investigation of metadata
+ creator:
+ - role: author
+ text: John Smith
+ - role: editor
+ text: Sarah Jones
+ identifier:
+ - scheme: DOI
+ text: doi:10.234234.234/33
+ publisher: My Press
+ rights: (c) 2007 John Smith, CC BY-NC
+ ...
* `Text.Pandoc.Templates.getDefaultTemplate`:
don't fail when called with "fb2" (#1660).
@@ -5291,6 +8517,8 @@ pandoc (1.12)
+ Export `varListToJSON`.
* `Text.Pandoc.PDF` exports `makePDF` instead of `tex2pdf`.
+ The signature of `makePDF` has changed and now contains
+ an additional argument for pdf engine options.
* `Text.Pandoc`:
@@ -5313,6 +8541,8 @@ pandoc (1.12)
+ All bibliography-related fields have been removed from
`ReaderOptions` and `WriterOptions`: `writerBiblioFiles`,
`readerReferences`, `readerCitationStyle`.
+ + Removed `writerPdfArgs` from `WriterOptions`. These are now
+ passed in as a parameter to `makePDF`.
* The `Text.Pandoc.Biblio` module has been removed. Users of the
pandoc library who want citation support will need to use
@@ -8564,7 +11794,7 @@ pandoc (1.5)
* Added Maybe datadir parameter to readDataFile, saveOpenDocumentAsODT,
latexMathMLScript, s5HeaderIncludes, and getDefaultTemplate. If
- Nothing, no user directory is searched for an override.
+ Nothing, no user directory is searched for an override.
* Added 'plain' output format. This is similar to markdown, but
removes links, pictures, inline formatting, and most anything that
@@ -8678,8 +11908,8 @@ pandoc (1.5)
+ Allow footnotes to be indented < 4 spaces.
This fixes a regression. A test case has been added.
+ Escape spaces in URLs as %20. Previously they were incorrectly
- escaped as +, which is appropriate only for the query part of
- a URL. Resolves Issue #220.
+ escaped as +, which is appropriate only for the query part of
+ a URL. Resolves Issue #220.
+ Require two spaces after capital letter + period for list item.
Otherwise "E. coli" starts a list. This might change the semantics
of some existing documents, since previously the two-space
@@ -8806,7 +12036,7 @@ pandoc (1.4)
* Pandoc no longer requires Template Haskell. Resolves Issue #186.
+ Removed need for TH in ODT module. Instead get reference.odt from
- data file at run time.
+ data file at run time.
+ Removed TH dependency from S5 module. S5 module now exports
s5HeaderIncludes, which pandoc.hs includes if writer is s5 and
standalone.
@@ -8823,7 +12053,7 @@ pandoc (1.4)
on unix), or, if not found there, from the system data
directory ($CABALDIR/shared/pandoc-VERSION/). All data
files, including templates, LaTeXMathML.js, s5 styles,
- and reference.odt, can be overridden by the user.
+ and reference.odt, can be overridden by the user.
* s5 files moved from data/ui/default to s5/default.
@@ -8848,7 +12078,7 @@ pandoc (1.4)
* Added --reference-odt option, so users may customize the styles
used in pandoc-generated ODT files. Users may also place a
- default reference.odt in the ~\.pandoc directory.
+ default reference.odt in the ~\.pandoc directory.
* ODT writer:
+ Indented and line-broke styles.xml so it can be modified more easily.
@@ -8932,8 +12162,8 @@ pandoc (1.3)
* Treat a backslash followed by a newline as a hard line break
in markdown. Resolves Issue #154. This is a nice alternative
- to markdown's "invisible" way of indicating hardline breaks
- using lines that end with two spaces.
+ to markdown's "invisible" way of indicating hardline breaks
+ using lines that end with two spaces.
* Improved performance of markdown reader by ~10% by eliminating the
need for a separate parsing pass for notes. Raw notes are now stored
@@ -8944,7 +12174,7 @@ pandoc (1.3)
* In markdown reader, treat 4 or more * or _ in a row as literal
text. (Trying to parse long strings of * or _ as strong or emph
- leads to exponential performance problems.)
+ leads to exponential performance problems.)
* Markdown reader: Use + rather than %20 for spaces in URLs.
@@ -8962,8 +12192,8 @@ pandoc (1.3)
* Modified html+lhs output to use "haskell" highlighter instead
of "literateHaskell". The highlighting module now adds bird tracks
- after highlighting (for HTML output), if the code block has the
- "literate" class. This gives better results, because kate's
+ after highlighting (for HTML output), if the code block has the
+ "literate" class. This gives better results, because kate's
haskell highlighter is much better than the literateHaskell
highlighter.
@@ -9084,7 +12314,7 @@ pandoc (1.2.1)
explicit marker. For example:
A. my list
- #. continued
+ #. continued
Resolves Issue #140.
+ Allow continuation lines in line blocks. Also added test cases for
@@ -9117,7 +12347,7 @@ pandoc (1.2.1)
* Added new Haskell version of markdown2pdf, due to
Paulo Tanimoto. This should be more portable than the old
- shell script.
+ shell script.
* Made 'pandoc -v' more explicit about compiler options.
Resolves Issue #139.
@@ -9267,7 +12497,7 @@ pandoc (1.1)
* Text.Pandoc.Shared: Modified wrappedTeX to eliminate the line break
between a footnote and immediately following nonspace characters in
LaTeX and ConTeXt output. (This gets interpreted as a space, which
- is not desired in cases like "text^[note]---".) Resolves Issue #93.
+ is not desired in cases like `text^[note]---`.) Resolves Issue #93.
* Windows installer: Don't require admin privileges to run
installer. Modified pandoc-setup.iss, and changed modpath.iss to
@@ -10773,8 +14003,8 @@ pandoc (0.3) unstable; urgency=low
* Revised footnote syntax. (See README for full details.) The
'[^1]' format now standard in markdown extensions is supported,
- as are inline footnotes with this syntax: '^[My note.]'.
- The earlier footnote syntax '^(1)' is no longer supported.
+ as are inline footnotes with this syntax: `^[My note.]`.
+ The earlier footnote syntax `^(1)` is no longer supported.
* Improved HTML representation of footnotes. All footnotes
are now auto-numbered and appear in an ordered list at the
diff --git a/data/abbreviations b/data/abbreviations
new file mode 100644
index 000000000..7be63d891
--- /dev/null
+++ b/data/abbreviations
@@ -0,0 +1,50 @@
+al.
+Apr.
+Aug.
+Bros.
+Capt.
+cf.
+ch.
+Co.
+Corp.
+cp.
+Dec.
+Dr.
+e.g.
+esp.
+Feb.
+Gen.
+Gov.
+Hon.
+i.e.
+Inc.
+Jan.
+Jr.
+Jul.
+Jun.
+Ltd.
+M.A.
+M.D.
+Mar.
+Mr.
+Mrs.
+Ms.
+No.
+Nov.
+Oct.
+p.
+Ph.D.
+pp.
+Pres.
+Prof.
+Rep.
+Rev.
+sec.
+Sen.
+Sep.
+Sept.
+Sgt.
+Sr.
+St.
+vol.
+vs.
diff --git a/data/bash_completion.tpl b/data/bash_completion.tpl
index 317fd5095..c9145c06c 100644
--- a/data/bash_completion.tpl
+++ b/data/bash_completion.tpl
@@ -29,8 +29,8 @@ _pandoc()
COMPREPLY=( $(compgen -W "references javascript none" -- ${cur}) )
return 0
;;
- --latex-engine)
- COMPREPLY=( $(compgen -W "pdflatex lualatex xelatex" -- ${cur}) )
+ --pdf-engine)
+ COMPREPLY=( $(compgen -W "pdflatex lualatex xelatex wkhtmltopdf weasyprint prince context pdfroff" -- ${cur}) )
return 0
;;
--print-default-data-file)
diff --git a/data/docx/[Content_Types].xml b/data/docx/[Content_Types].xml
index 9c5756aed..1e888dff9 100644
--- a/data/docx/[Content_Types].xml
+++ b/data/docx/[Content_Types].xml
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml" /><Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml" /><Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml" /><Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml" /><Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" /><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml" /><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" /><Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml" /></Types>
+<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml" /><Override PartName="/word/numbering.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml" /><Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml" /><Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml" /><Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" /><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml" /><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml" /><Override PartName="/word/comments.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml" /><Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml" /></Types>
diff --git a/data/docx/docProps/core.xml b/data/docx/docProps/core.xml
index 2274766e4..bc61390b0 100644
--- a/data/docx/docProps/core.xml
+++ b/data/docx/docProps/core.xml
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title></dc:title><dc:creator></dc:creator></cp:coreProperties> \ No newline at end of file
+<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title>Title</dc:title><dc:creator>Author</dc:creator><cp:keywords></cp:keywords><dcterms:created xsi:type="dcterms:W3CDTF">2017-12-27T05:22:50Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2017-12-27T05:22:50Z</dcterms:modified></cp:coreProperties> \ No newline at end of file
diff --git a/data/docx/word/_rels/document.xml.rels b/data/docx/word/_rels/document.xml.rels
index ca0c57b63..f01e07658 100644
--- a/data/docx/word/_rels/document.xml.rels
+++ b/data/docx/word/_rels/document.xml.rels
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" Id="rId1" Target="numbering.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Id="rId2" Target="styles.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Id="rId3" Target="settings.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Id="rId4" Target="webSettings.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Id="rId5" Target="fontTable.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Id="rId6" Target="theme/theme1.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" Id="rId7" Target="footnotes.xml" /></Relationships>
+<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" Id="rId1" Target="numbering.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Id="rId2" Target="styles.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" Id="rId3" Target="settings.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" Id="rId4" Target="webSettings.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" Id="rId5" Target="fontTable.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Id="rId6" Target="theme/theme1.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" Id="rId7" Target="footnotes.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" Id="rId8" Target="comments.xml" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Id="rId30" Target="http://example.com" TargetMode="External" /></Relationships>
diff --git a/data/docx/word/_rels/footnotes.xml.rels b/data/docx/word/_rels/footnotes.xml.rels
index be7e70853..81d529a4c 100644
--- a/data/docx/word/_rels/footnotes.xml.rels
+++ b/data/docx/word/_rels/footnotes.xml.rels
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships" /> \ No newline at end of file
+<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Id="rId30" Target="http://example.com" TargetMode="External" /></Relationships> \ No newline at end of file
diff --git a/data/docx/word/comments.xml b/data/docx/word/comments.xml
new file mode 100644
index 000000000..ca80aa7fe
--- /dev/null
+++ b/data/docx/word/comments.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<w:comments xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" /> \ No newline at end of file
diff --git a/data/docx/word/document.xml b/data/docx/word/document.xml
index 7199034da..f74c3f56e 100644
--- a/data/docx/word/document.xml
+++ b/data/docx/word/document.xml
@@ -1,2 +1,398 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"><w:body><w:p><w:r><w:t xml:space="preserve">Hello world.</w:t></w:r></w:p></w:body></w:document>
+<?xml version="1.0" encoding="utf-8"?>
+<w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
+xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
+xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
+xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:v="urn:schemas-microsoft-com:vml"
+xmlns:w10="urn:schemas-microsoft-com:office:word"
+xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
+xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"
+xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing">
+
+ <w:body>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Title" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Title
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Subtitle" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Subtitle
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Author" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Author
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Date" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Date
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Compact" />
+ <w:pStyle w:val="Abstract" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Abstract
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading1" />
+ </w:pPr>
+ <w:bookmarkStart w:id="21" w:name="heading-1" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 1
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="21" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading2" />
+ </w:pPr>
+ <w:bookmarkStart w:id="22" w:name="heading-2" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 2
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="22" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading3" />
+ </w:pPr>
+ <w:bookmarkStart w:id="23" w:name="heading-3" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 3
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="23" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading4" />
+ </w:pPr>
+ <w:bookmarkStart w:id="24" w:name="heading-4" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 4
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="24" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading5" />
+ </w:pPr>
+ <w:bookmarkStart w:id="25" w:name="heading-5" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 5
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="25" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading6" />
+ </w:pPr>
+ <w:bookmarkStart w:id="26" w:name="heading-6" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 6
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="26" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading7" />
+ </w:pPr>
+ <w:bookmarkStart w:id="27" w:name="heading-7" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 7
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="27" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading8" />
+ </w:pPr>
+ <w:bookmarkStart w:id="28" w:name="heading-8" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 8
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="28" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Heading9" />
+ </w:pPr>
+ <w:bookmarkStart w:id="29" w:name="heading-9" />
+ <w:r>
+ <w:t xml:space="preserve">
+Heading 9
+</w:t>
+ </w:r>
+ <w:bookmarkEnd w:id="29" />
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="FirstParagraph" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+First Paragraph.
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="BodyText" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Body Text. Body Text Char.
+</w:t>
+ </w:r>
+ <w:r>
+ <w:t xml:space="preserve">
+
+</w:t>
+ </w:r>
+ <w:r>
+ <w:rPr>
+ <w:rStyle w:val="VerbatimChar" />
+ </w:rPr>
+ <w:t xml:space="preserve">
+Verbatim Char
+</w:t>
+ </w:r>
+ <w:r>
+ <w:t xml:space="preserve">
+.
+</w:t>
+ </w:r>
+ <w:r>
+ <w:t xml:space="preserve">
+
+</w:t>
+ </w:r>
+ <w:hyperlink r:id="rId30">
+ <w:r>
+ <w:rPr>
+ <w:rStyle w:val="Hyperlink" />
+ </w:rPr>
+ <w:t xml:space="preserve">
+Hyperlink
+</w:t>
+ </w:r>
+ </w:hyperlink>
+ <w:r>
+ <w:t xml:space="preserve">
+.
+</w:t>
+ </w:r>
+ <w:r>
+ <w:t xml:space="preserve">
+
+</w:t>
+ </w:r>
+ <w:r>
+ <w:t xml:space="preserve">
+Footnote.
+</w:t>
+ </w:r>
+ <w:r>
+ <w:rPr>
+ <w:rStyle w:val="FootnoteReference" />
+ </w:rPr>
+ <w:footnoteReference w:id="31" />
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="BlockText" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Block Text.
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="TableCaption" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Table caption.
+</w:t>
+ </w:r>
+ </w:p>
+ <w:tbl>
+ <w:tblPr>
+ <w:tblStyle w:val="Table" />
+ <w:tblW w:type="pct" w:w="0.0" />
+ <w:tblLook w:firstRow="1" />
+ <w:tblCaption w:val="Table caption." />
+ </w:tblPr>
+ <w:tblGrid />
+ <w:tr>
+ <w:trPr>
+ <w:cnfStyle w:firstRow="1" />
+ </w:trPr>
+ <w:tc>
+ <w:tcPr>
+ <w:tcBorders>
+ <w:bottom w:val="single" />
+ </w:tcBorders>
+ <w:vAlign w:val="bottom" />
+ </w:tcPr>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Compact" />
+ <w:jc w:val="left" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Table
+</w:t>
+ </w:r>
+ </w:p>
+ </w:tc>
+ <w:tc>
+ <w:tcPr>
+ <w:tcBorders>
+ <w:bottom w:val="single" />
+ </w:tcBorders>
+ <w:vAlign w:val="bottom" />
+ </w:tcPr>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Compact" />
+ <w:jc w:val="left" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Table
+</w:t>
+ </w:r>
+ </w:p>
+ </w:tc>
+ </w:tr>
+ <w:tr>
+ <w:tc>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Compact" />
+ <w:jc w:val="left" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+1
+</w:t>
+ </w:r>
+ </w:p>
+ </w:tc>
+ <w:tc>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Compact" />
+ <w:jc w:val="left" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+2
+</w:t>
+ </w:r>
+ </w:p>
+ </w:tc>
+ </w:tr>
+ </w:tbl>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="ImageCaption" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Image Caption
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="DefinitionTerm" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+DefinitionTerm
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Definition" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Definition
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="DefinitionTerm" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+DefinitionTerm
+</w:t>
+ </w:r>
+ </w:p>
+ <w:p>
+ <w:pPr>
+ <w:pStyle w:val="Definition" />
+ </w:pPr>
+ <w:r>
+ <w:t xml:space="preserve">
+Definition
+</w:t>
+ </w:r>
+ </w:p>
+ <w:sectPr />
+ </w:body>
+</w:document>
diff --git a/data/docx/word/footnotes.xml b/data/docx/word/footnotes.xml
index db82d9462..2a150e026 100644
--- a/data/docx/word/footnotes.xml
+++ b/data/docx/word/footnotes.xml
@@ -1,26 +1,7 @@
-<?xml version="1.0" encoding="utf-8"?>
-<w:footnotes xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
-xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"
-xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
-xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:v="urn:schemas-microsoft-com:vml"
-xmlns:w10="urn:schemas-microsoft-com:office:word"
-xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
-xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"
-xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing">
-
- <w:footnote w:type="continuationSeparator" w:id="0">
- <w:p>
- <w:r>
- <w:continuationSeparator />
- </w:r>
- </w:p>
- </w:footnote>
- <w:footnote w:type="separator" w:id="-1">
- <w:p>
- <w:r>
- <w:separator />
- </w:r>
- </w:p>
- </w:footnote>
-</w:footnotes>
+<?xml version="1.0" encoding="UTF-8"?>
+<w:footnotes xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"><w:footnote w:type="continuationSeparator" w:id="0"><w:p><w:r><w:continuationSeparator /></w:r></w:p></w:footnote><w:footnote w:type="separator" w:id="-1"><w:p><w:r><w:separator /></w:r></w:p></w:footnote><w:footnote w:id="31"><w:p><w:pPr><w:pStyle w:val="FootnoteText" /></w:pPr><w:r>
+ <w:rPr>
+ <w:rStyle w:val="FootnoteReference" />
+ </w:rPr>
+ <w:footnoteRef />
+</w:r><w:r><w:t xml:space="preserve"> </w:t></w:r><w:r><w:t xml:space="preserve">Footnote Text.</w:t></w:r></w:p></w:footnote></w:footnotes> \ No newline at end of file
diff --git a/data/docx/word/numbering.xml b/data/docx/word/numbering.xml
index b9e91371b..2df923f28 100644
--- a/data/docx/word/numbering.xml
+++ b/data/docx/word/numbering.xml
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<w:numbering xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:abstractNum w:abstractNumId="0"><w:nsid w:val="e17f69ba" /><w:multiLevelType w:val="multilevel" /><w:lvl w:ilvl="0"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="0" /></w:tabs><w:ind w:left="480" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="1"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="720" /></w:tabs><w:ind w:left="1200" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="2"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="1440" /></w:tabs><w:ind w:left="1920" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="3"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="2160" /></w:tabs><w:ind w:left="2640" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="4"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="2880" /></w:tabs><w:ind w:left="3360" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="5"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="3600" /></w:tabs><w:ind w:left="4080" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="6"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="4320" /></w:tabs><w:ind w:left="4800" w:hanging="480" /></w:pPr></w:lvl></w:abstractNum><w:num w:numId="1"><w:abstractNumId w:val="0" /></w:num></w:numbering> \ No newline at end of file
+<w:numbering xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:abstractNum w:abstractNumId="990"><w:nsid w:val="170cd2de" /><w:multiLevelType w:val="multilevel" /><w:lvl w:ilvl="0"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="0" /></w:tabs><w:ind w:left="480" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="1"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="720" /></w:tabs><w:ind w:left="1200" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="2"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="1440" /></w:tabs><w:ind w:left="1920" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="3"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="2160" /></w:tabs><w:ind w:left="2640" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="4"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="2880" /></w:tabs><w:ind w:left="3360" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="5"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="3600" /></w:tabs><w:ind w:left="4080" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="6"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="4320" /></w:tabs><w:ind w:left="4800" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="7"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="5040" /></w:tabs><w:ind w:left="5520" w:hanging="480" /></w:pPr></w:lvl><w:lvl w:ilvl="8"><w:numFmt w:val="bullet" /><w:lvlText w:val=" " /><w:lvlJc w:val="left" /><w:pPr><w:tabs><w:tab w:val="num" w:pos="5760" /></w:tabs><w:ind w:left="6240" w:hanging="480" /></w:pPr></w:lvl></w:abstractNum><w:num w:numId="1000"><w:abstractNumId w:val="990" /></w:num></w:numbering> \ No newline at end of file
diff --git a/data/docx/word/settings.xml b/data/docx/word/settings.xml
index 425e6f7b5..afa0199c9 100644
--- a/data/docx/word/settings.xml
+++ b/data/docx/word/settings.xml
@@ -44,4 +44,4 @@
<w:clrSchemeMapping w:bg1="light1" w:t1="dark1" w:bg2="light2" w:t2="dark2" w:accent1="accent1" w:accent2="accent2" w:accent3="accent3" w:accent4="accent4" w:accent5="accent5" w:accent6="accent6" w:hyperlink="hyperlink" w:followedHyperlink="followedHyperlink" />
<w:decimalSymbol w:val="." />
<w:listSeparator w:val="," />
-</w:settings>
+</w:settings> \ No newline at end of file
diff --git a/data/docx/word/styles.xml b/data/docx/word/styles.xml
index d19c4c7fb..130a55a63 100644
--- a/data/docx/word/styles.xml
+++ b/data/docx/word/styles.xml
@@ -251,6 +251,66 @@
<w:szCs w:val="24" />
</w:rPr>
</w:style>
+ <w:style w:type="paragraph" w:styleId="Heading7">
+ <w:name w:val="Heading 7" />
+ <w:basedOn w:val="Normal" />
+ <w:next w:val="BodyText" />
+ <w:uiPriority w:val="9" />
+ <w:unhideWhenUsed />
+ <w:qFormat />
+ <w:pPr>
+ <w:keepNext />
+ <w:keepLines />
+ <w:spacing w:before="200" w:after="0" />
+ <w:outlineLvl w:val="6" />
+ </w:pPr>
+ <w:rPr>
+ <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" />
+ <w:color w:val="4F81BD" w:themeColor="accent1" />
+ <w:sz w:val="24" />
+ <w:szCs w:val="24" />
+ </w:rPr>
+ </w:style>
+ <w:style w:type="paragraph" w:styleId="Heading8">
+ <w:name w:val="Heading 8" />
+ <w:basedOn w:val="Normal" />
+ <w:next w:val="BodyText" />
+ <w:uiPriority w:val="9" />
+ <w:unhideWhenUsed />
+ <w:qFormat />
+ <w:pPr>
+ <w:keepNext />
+ <w:keepLines />
+ <w:spacing w:before="200" w:after="0" />
+ <w:outlineLvl w:val="7" />
+ </w:pPr>
+ <w:rPr>
+ <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" />
+ <w:color w:val="4F81BD" w:themeColor="accent1" />
+ <w:sz w:val="24" />
+ <w:szCs w:val="24" />
+ </w:rPr>
+ </w:style>
+ <w:style w:type="paragraph" w:styleId="Heading9">
+ <w:name w:val="Heading 9" />
+ <w:basedOn w:val="Normal" />
+ <w:next w:val="BodyText" />
+ <w:uiPriority w:val="9" />
+ <w:unhideWhenUsed />
+ <w:qFormat />
+ <w:pPr>
+ <w:keepNext />
+ <w:keepLines />
+ <w:spacing w:before="200" w:after="0" />
+ <w:outlineLvl w:val="8" />
+ </w:pPr>
+ <w:rPr>
+ <w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" />
+ <w:color w:val="4F81BD" w:themeColor="accent1" />
+ <w:sz w:val="24" />
+ <w:szCs w:val="24" />
+ </w:rPr>
+ </w:style>
<w:style w:type="paragraph" w:styleId="BlockText">
<w:name w:val="Block Text" />
<w:basedOn w:val="BodyText" />
@@ -282,8 +342,9 @@
<w:semiHidden />
<w:unhideWhenUsed />
</w:style>
- <w:style w:type="table" w:default="1" w:styleId="TableNormal">
- <w:name w:val="Normal Table" />
+ <w:style w:type="table" w:default="1" w:styleId="Table">
+ <w:name w:val="Table" />
+ <w:basedOn w:val="TableNormal" />
<w:semiHidden />
<w:unhideWhenUsed />
<w:qFormat />
@@ -340,8 +401,8 @@
<w:name w:val="Figure" />
<w:basedOn w:val="Normal" />
</w:style>
- <w:style w:type="paragraph" w:customStyle="1" w:styleId="FigureWithCaption">
- <w:name w:val="Figure with Caption" />
+ <w:style w:type="paragraph" w:customStyle="1" w:styleId="CaptionedFigure">
+ <w:name w:val="Captioned Figure" />
<w:basedOn w:val="Figure" />
<w:pPr>
<w:keepNext />
@@ -389,8 +450,7 @@
<w:rFonts w:asciiTheme="majorHAnsi" w:eastAsiaTheme="majorEastAsia" w:hAnsiTheme="majorHAnsi" w:cstheme="majorBidi" />
<w:b w:val="0" />
<w:bCs w:val="0" />
- <w:color w:val="365F91" w:themeColor="accent1"
- w:themeShade="BF" />
+ <w:color w:val="365F91" w:themeColor="accent1" w:themeShade="BF" />
</w:rPr>
</w:style>
</w:styles>
diff --git a/data/epub.css b/data/epub.css
index 594a1e01e..34835ced4 100644
--- a/data/epub.css
+++ b/data/epub.css
@@ -12,7 +12,7 @@ h2.author { }
h3.date { }
ol.toc { padding: 0; margin-left: 1em; }
ol.toc li { list-style-type: none; margin: 0; padding: 0; }
-a.footnoteRef { vertical-align: super; }
+a.footnote-ref { vertical-align: super; }
em, em em em, em em em em em { font-style: italic;}
em em, em em em em { font-style: normal; }
diff --git a/data/init.lua b/data/init.lua
new file mode 100644
index 000000000..ed39dd294
--- /dev/null
+++ b/data/init.lua
@@ -0,0 +1,7 @@
+-- This Lua script is run every time the Lua interpreter is started when running
+-- a Lua filter. It can be customized to load additional modules or to alter the
+-- default modules.
+
+pandoc = require 'pandoc'
+pandoc.mediabag = require 'pandoc.mediabag'
+pandoc.utils = require 'pandoc.utils'
diff --git a/data/jats.csl b/data/jats.csl
new file mode 100644
index 000000000..dc1f154a8
--- /dev/null
+++ b/data/jats.csl
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" default-locale="en-US">
+ <info>
+ <title>Journal Article Tag Suite</title>
+ <title-short>JATS</title-short>
+ <id>http://www.zotero.org/styles/journal-article-tag-suite</id>
+ <link href="https://github.com/MartinPaulEve/JATS-CSL/blob/master/jats.csl" rel="self"/>
+ <link rel="documentation" href="http://jats.nlm.nih.gov/archiving/tag-library/1.0/index.html"/>
+ <author>
+ <name>Martin Paul Eve</name>
+ <email>martin@martineve.com</email>
+ </author>
+ <category citation-format="numeric"/>
+ <category field="medicine"/>
+ <category field="biology"/>
+ <summary>Use this style to generate bibliographic data in Journal Article Tagging Suite (JATS) 1.0 XML format</summary>
+ <updated>2014-06-21T17:41:26+00:00</updated>
+ <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Originally by Martin Fenner.</rights>
+ </info>
+ <locale xml:lang="en">
+ <terms>
+ <term name="et-al">{{jats}}&lt;etal/&gt;{{/jats}}</term>
+ </terms>
+ </locale>
+ <macro name="citation-number">
+ <text variable="citation-number" prefix="{{jats}}id=&quot;ref-{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}"/>
+ </macro>
+ <macro name="author">
+ <names variable="author">
+ <name prefix="{{jats}}&lt;name&gt;{{/jats}}" suffix="{{jats}}&lt;/name&gt;{{/jats}}" name-as-sort-order="all" sort-separator="">
+ <name-part name="family" text-case="capitalize-first" prefix="{{jats}}&lt;surname&gt;{{/jats}}" suffix="{{jats}}&lt;/surname&gt;{{/jats}}"/>
+ <name-part name="given" text-case="capitalize-first" prefix="{{jats}}&lt;given-names&gt;{{/jats}}" suffix="{{jats}}&lt;/given-names&gt;{{/jats}}"/>
+ </name>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+
+ <macro name="editor">
+ <names variable="editor" prefix="{{jats}}&lt;person-group person-group-type=&quot;editor&quot;&gt;{{/jats}}" suffix="{{jats}}&lt;/person-group&gt;{{/jats}}">
+ <name prefix="{{jats}}&lt;name&gt;{{/jats}}" suffix="{{jats}}&lt;/name&gt;{{/jats}}" name-as-sort-order="all" sort-separator="">
+ <name-part name="family" text-case="capitalize-first" prefix="{{jats}}&lt;surname&gt;{{/jats}}" suffix="{{jats}}&lt;/surname&gt;{{/jats}}"/>
+ <name-part name="given" text-case="capitalize-first" prefix="{{jats}}&lt;given-names&gt;{{/jats}}" suffix="{{jats}}&lt;/given-names&gt;{{/jats}}"/>
+ </name>
+ <substitute>
+ <names variable="editor"/>
+ </substitute>
+ </names>
+ </macro>
+
+ <macro name="editor">
+ <group delimiter=": ">
+ <names variable="editor">
+ <name prefix="{{jats}}&lt;name&gt;{{/jats}}" suffix="{{jats}}&lt;/name&gt;{{/jats}}" name-as-sort-order="all" sort-separator="">
+ <name-part name="family" text-case="capitalize-first" prefix="{{jats}}&lt;surname&gt;{{/jats}}" suffix="{{jats}}&lt;/surname&gt;{{/jats}}"/>
+ <name-part name="given" text-case="capitalize-first" prefix="{{jats}}&lt;given-names&gt;{{/jats}}" suffix="{{jats}}&lt;given-names&gt;{{/jats}}"/>
+ </name>
+ </names>
+ </group>
+ </macro>
+ <macro name="title">
+ <choose>
+ <if type="book" match="any">
+ <group prefix="{{jats}}&lt;source&gt;{{/jats}}" suffix="{{jats}}&lt;/source&gt;{{/jats}}">
+ <text variable="title"/>
+ </group>
+ </if>
+ <else>
+ <group prefix="{{jats}}&lt;article-title&gt;{{/jats}}" suffix="{{jats}}&lt;/article-title&gt;{{/jats}}">
+ <text variable="title"/>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="container-title">
+ <text variable="container-title" form="short" prefix="{{jats}}&lt;source&gt;{{/jats}}" suffix="{{jats}}&lt;/source&gt;{{/jats}}"/>
+ </macro>
+ <macro name="publisher">
+ <text variable="publisher" prefix="{{jats}}&lt;publisher-name&gt;{{/jats}}" suffix="{{jats}}&lt;/publisher-name&gt;{{/jats}}"/>
+ <text variable="publisher-place" prefix="{{jats}}&lt;publisher-loc&gt;{{/jats}}" suffix="{{jats}}&lt;/publisher-loc&gt;{{/jats}}"/>
+ </macro>
+ <macro name="link">
+ <choose>
+ <if match="any" variable="DOI">
+ <group prefix="{{jats}}&lt;pub-id pub-id-type=&quot;doi&quot;&gt;{{/jats}}" suffix="{{jats}}&lt;/pub-id&gt;{{/jats}}">
+ <text variable="DOI"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if match="any" variable="PMID">
+ <group prefix="{{jats}}&lt;ext-link ext-link-type=&quot;pmid&quot; {{/jats}}" suffix="{{jats}}&lt;/ext-link&gt;{{/jats}}">
+ <text variable="PMID" prefix="{{jats}}xlink:href=&quot;http://www.ncbi.nlm.nih.gov/pubmed/{{/jats}}" suffix="{{jats}}&quot; xlink:type=&quot;simple&quot;&gt;{{/jats}}"/>
+ <text variable="PMID"/>
+ </group>
+ </if>
+ </choose>
+ <choose>
+ <if variable="URL" match="any">
+ <text variable="URL" />
+ </if>
+ </choose>
+ </macro>
+ <macro name="date">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper report patent book" match="any">
+ <group prefix="{{jats}}&lt;date&gt;{{/jats}}" suffix="{{jats}}&lt;/date&gt;{{/jats}}">
+ <date variable="issued">
+ <date-part name="day" form="numeric-leading-zeros" prefix="{{jats}}&lt;day&gt;{{/jats}}" suffix="{{jats}}&lt;/day&gt;{{/jats}}"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="{{jats}}&lt;month&gt;{{/jats}}" suffix="{{jats}}&lt;/month&gt;{{/jats}}"/>
+ <date-part name="year" prefix="{{jats}}&lt;year&gt;{{/jats}}" suffix="{{jats}}&lt;/year&gt;{{/jats}}"/>
+ </date>
+ </group>
+ </if>
+ <else>
+ <group prefix="{{jats}}&lt;date-in-citation content-type=&quot;access-date&quot;{{/jats}}" suffix="{{jats}}&lt;/date-in-citation&gt;{{/jats}}">
+ <date variable="accessed" prefix="{{jats}} iso-8601-date=&quot;{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}">
+ <date-part name="year"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="{{jats}}-{{/jats}}"/>
+ <date-part name="day" form="numeric-leading-zeros" prefix="{{jats}}-{{/jats}}"/>
+ </date>
+ <date variable="accessed">
+ <date-part name="day" prefix="{{jats}}&lt;day&gt;{{/jats}}" suffix="{{jats}}&lt;/day&gt;{{/jats}}"/>
+ <date-part name="month" form="numeric-leading-zeros" prefix="{{jats}}&lt;month&gt;{{/jats}}" suffix="{{jats}}&lt;/month&gt;{{/jats}}"/>
+ <date-part name="year" prefix="{{jats}}&lt;year&gt;{{/jats}}" suffix="{{jats}}&lt;/year&gt;{{/jats}}"/>
+ </date>
+ </group>
+ </else>
+ </choose>
+ </macro>
+ <macro name="location">
+ <choose>
+ <if type="article-journal article-magazine" match="any">
+ <text variable="volume" prefix="{{jats}}&lt;volume&gt;{{/jats}}" suffix="{{jats}}&lt;/volume&gt;{{/jats}}"/>
+ <text variable="issue" prefix="{{jats}}&lt;issue&gt;{{/jats}}" suffix="{{jats}}&lt;/issue&gt;{{/jats}}"/>
+ </if>
+ </choose>
+ <choose>
+ <if type="article-journal article-magazine article-newspaper chapter" match="any">
+ <text variable="page-first" prefix="{{jats}}&lt;fpage&gt;{{/jats}}" suffix="{{jats}}&lt;/fpage&gt;{{/jats}}"/>
+ </if>
+ </choose>
+ </macro>
+ <macro name="publication-type">
+ <group prefix="{{jats}} publication-type=&quot;{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}">
+ <choose>
+ <if type="article-journal article-magazine article-newspaper" match="any">
+ <text value="journal"/>
+ </if>
+ <else-if type="book" match="any">
+ <text value="book"/>
+ </else-if>
+ <else-if type="chapter" match="any">
+ <text value="bookchapter"/>
+ </else-if>
+ <else-if type="dataset" match="any">
+ <text value="dataset"/>
+ </else-if>
+ <else-if type="patent" match="any">
+ <text value="patent"/>
+ </else-if>
+ <else-if type="report" match="any">
+ <text value="report"/>
+ </else-if>
+ <else-if type="review" match="any">
+ <text value="review"/>
+ </else-if>
+ <else>
+ <text value="standard"/>
+ </else>
+ </choose>
+ </group>
+ </macro>
+ <citation collapse="citation-number">
+ <sort>
+ <key variable="citation-number"/>
+ </sort>
+ <layout delimiter=",">
+ <group prefix="{{jats}}&lt;xref ref-type=&quot;bibr&quot; rid=&quot;{{/jats}}" suffix="{{jats}}&lt;/xref&gt;{{/jats}}">
+ <text variable="citation-number" prefix="{{jats}}ref-{{/jats}}" suffix="{{jats}}&quot;&gt;{{/jats}}"/>
+ <text variable="citation-number"/>
+ </group>
+ </layout>
+ </citation>
+ <bibliography sort-separator="">
+ <layout>
+ <group prefix="{{jats}}&lt;ref {{/jats}}" suffix="{{jats}}&lt;/ref&gt;{{/jats}}">
+ <text macro="citation-number"/>
+ <group prefix="{{jats}}&lt;element-citation{{/jats}}" suffix="{{jats}}&lt;/element-citation&gt;{{/jats}}">
+ <text macro="publication-type"/>
+ <text macro="author" prefix="{{jats}}&lt;person-group person-group-type=&quot;author&quot;&gt;{{/jats}}" suffix="{{jats}}&lt;/person-group&gt;{{/jats}}"/>
+ <text macro="title" />
+ <text macro="container-title"/>
+ <text macro="editor"/>
+ <text macro="publisher"/>
+ <text macro="date"/>
+ <text macro="location"/>
+ <text macro="link"/>
+ </group>
+ </group>
+ </layout>
+ </bibliography>
+</style>
+
diff --git a/data/pandoc.List.lua b/data/pandoc.List.lua
new file mode 100644
index 000000000..6b3188a65
--- /dev/null
+++ b/data/pandoc.List.lua
@@ -0,0 +1,120 @@
+--[[
+List.lua
+
+Copyright © 2017–2018 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–2018 Albert Krewinkel
+-- @license MIT
+local List = {
+ _VERSION = "0.1.0"
+}
+
+function List:new (o)
+ o = o or {}
+ setmetatable(o, self)
+ self.__index = self
+ return o
+end
+
+function List:__call (o)
+ return self:new(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
+
+--- Checks if the list has an item equal to the given needle.
+-- @param needle item to search for
+-- @param init index at which the search is started
+-- @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
+
+--- Returns the value and index of the first occurrence of the given item.
+-- @param needle item to search for
+-- @param init index at which the search is started
+-- @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 init index at which the search is started
+-- @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
+
+--- 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 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
+
+--- 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
+
+return List
diff --git a/data/pandoc.lua b/data/pandoc.lua
new file mode 100644
index 000000000..512b2919c
--- /dev/null
+++ b/data/pandoc.lua
@@ -0,0 +1,945 @@
+--[[
+pandoc.lua
+
+Copyright © 2017–2018 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–2018 Albert Krewinkel
+-- @license MIT
+local M = {}
+
+local List = require 'pandoc.List'
+
+------------------------------------------------------------------------
+-- 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, indices)
+ local loadstring = loadstring or load
+ local bracketed = {}
+ for i = 1, #indices do
+ bracketed[i] = string.format('[%d]', indices[#indices - i + 1])
+ 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
+ local name, substructure = next(acc)
+ res[name] = make_indexing_function(fn_template, {...})
+ add_accessors(substructure, ...)
+ else
+ for i = 1, #(acc or {}) do
+ add_accessors(acc[i], i, ...)
+ end
+ end
+ end
+ add_accessors(accessors)
+ return res
+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.__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
+ 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 explicitely
+-- @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
+
+------------------------------------------------------------------------
+--- 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'
+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'
+function M.Meta:new (meta) return meta end
+
+
+------------------------------------------------------------------------
+-- MetaValue
+-- @section MetaValue
+M.MetaValue = AstElement:make_subtype('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) return ensureList(content) 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'
+
+--- 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)} 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 = {attr or M.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)} 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 = {attr or M.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, attr or M.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)} 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 {1, M.DefaultStyle, M.DefaultDelim}
+ return {c = {listAttributes, ensureList(items)}}
+ 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 {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.Table = M.Block:create_constructor(
+ "Table",
+ function(caption, aligns, widths, headers, rows)
+ return {
+ c = {
+ ensureInlineList(caption),
+ List:new(aligns),
+ List:new(widths),
+ List:new(headers),
+ List:new(rows)
+ }
+ }
+ end,
+ {"caption", "aligns", "widths", "headers", "rows"}
+)
+
+
+------------------------------------------------------------------------
+-- Inline
+-- @section Inline
+
+--- Inline element class
+M.Inline = AstElement:make_subtype'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 brief image description
+-- @tparam[opt] Attr attr additional attributes
+-- @treturn Inline code element
+M.Code = M.Inline:create_constructor(
+ "Code",
+ function(text, attr) return {c = {attr or M.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 ""
+ attr = attr or M.Attr()
+ return {c = {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 = attr or M.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 = {attr or M.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 strong element
+M.Superscript = M.Inline:create_constructor(
+ "Superscript",
+ 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 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
+}