All Versions
28
Latest Version
Avg Release Cycle
39 days
Latest Release
1266 days ago

Changelog History
Page 3

  • v2.7.1 Changes

    March 14, 2019

    ➕ Add tectonic as an option for –pdf-engine (#5345, Cormac Relf). Runs tectonic on STDIN instead of a temporary .tex file, so that it looks in the working directory for \include and \input like the rest of the engines. Allows overriding the output directory args with --pdf-engine-opt=--outdir --pdf-engine-opt="$DIR".

    👍 Allow -o/--output to be used with --print-default-data-file, --print-highlighting-style, --print-default-template. Note that -o must occur BEFORE the --print* command on the command line (this is documented, #5357).

    LaTeX reader:

    • Support \underline, \ul, \uline (#5359, Paul Tilley). These are parsed as a Span with class underline, as with other readers.

    - Ensure that \Footcite and \Footcites get put in a note.

    ipynb reader:

    • Remove sensitivity to raw_html, raw_tex extensions. We now include every output format. Pruning is handled by --ipynb-output.

    - Better handling of cell metadata. We now include even complex cell metadata in the Div’s attributes (as JSON, in complex cases, or as plain strings in simple cases).

    ipynb writer:

    • Recurse into native divs for output cell data (#5354).

    - Render cell metadata fields from div attributes.

    Docx writer: avoid extra copy of abstractNum and num elements in numbering.xml. This caused pandoc-produced docx files to be uneditable using Word Online (#5358).

    Markdown writer: improve handling of raw blocks/inline. We now emit raw content using raw_attribute when no more direct method is available. Use of raw_attribute can be forced by disabling raw_html and raw_tex.

    🚚 LaTeX writer: Add classes for frontmatter support (#5353, Andrew Dunning) and remove frontmatter from scrreprt.

    LaTeX template:

    - Better handling of front/main/backmatter (#5348). In pandoc 2.7 we assumed that every class with chapters would accept \frontmatter, \mainmatter, and \backmatter. This is not so (e.g. report does not). So pandoc 2.7 breaks on report class by including an unsupported command. Instead of the book-class variable, we use two variables, has-chapters and has-frontmatter, and set these intelligently in the writer.

    Text.Pandoc.Shared: Improve filterIpynbOutput. Ensure that images are prioritized over text. best should include everything for ipynb.

    🚚 Tests.Old: specify --data-dir=../data to ensure tests can find data files even if they haven’t been installed. Remove old pandoc_datadir environment variable, which hasn’t done anything for a long time.

    MANUAL.txt: Add recommendation to use raw_attribute with ipynb (#5354).

    👉 Use cmark-gfm-hs 0.1.8 (note that 0.1.7 is buggy).

    ✅ Use latest pandoc-citeproc, texmath.

  • v2.7 Changes

    March 03, 2019

    Use XDG data directory for user data directory (#3582). Instead of $HOME/.pandoc, the default user data directory is now $XDG_DATA_HOME/pandoc, where XDG_DATA_HOME defaults to $HOME/.local/share but can be overridden by setting the environment variable. If this directory is missing, then $HOME/.pandoc is searched instead, for backwards compatibility. However, we recommend moving local pandoc data files from $HOME/.pandoc to $HOME/.local/share/pandoc. On Windows the default user data directory remains the same.

    Slide show formats behavior change: content under headers less than slide level is no longer ignored, but included in the title slide (for HTML slide shows) or in a slide after the title slide (for beamer). This change makes possible 2D reveal.js slideshows with content in the top slide on each stack (#4317, #5237).

    ➕ Add command line option --ipynb-output=all|none|best (#5339). Output cells in ipynb notebooks often contain several different versions of an output, with different MIME types, e.g. an HTML table and a plain-text fallback. Specifying --ipynb-output=best (the default) ensures that the best version for the output format is used. all includes all versions, and none suppresses them all, leaving output cells empty.

    asciidoctor is now an output format separate from asciidoc, to accommodate some minor implementation-specific differences (currently just in the treatment of display math).

    ➕ Add latexmk as an option for --pdf-engine (#3195). Note that you can use --pdf-engine-opt=-outdir=bar to specify a persistent temp directory.

    Markdown reader:

    • Improve tight/loose list handling (#5285). Previously the algorithm allowed list items with a mix of Para and Plain, which is never wanted.
    • Add newline when parsing blocks in YAML (#5271). Otherwise last block gets parsed as a Plain rather than a Para. This is a regression in pandoc 2.x. This patch restores pandoc 1.19 behavior.
    • Make yamlToMeta respect extensions (#5272, Mauro Bieg). This adds a ReaderOptions parameter to yamlToMeta [API change].

    - Fix bug parsing fenced code blocks (#5304). Previously parsing would break if the code block contained a string of backticks of sufficient length followed by something other than end of line.

    LaTeX reader: don’t let \egroup match {. braced now actually requires nested braces. Otherwise some legitimate command and environment definitions can break.

    Docx reader (Jesse Rosenthal):

    • Rename getDocumentPath as getDocumentXmlPath.
    • Use field notation for setting ReaderEnv.
    • Figure out document.xml path once at the beginning of parsing, and add it to the environment, so we can avoid repeated lookups.
    • Dynamically determine main document xml path (#5277). The desktop Word program places the main document file in word/document.xml, but the online word places it in word/document2.xml. This file path is actually stated in the root _rels/.rels file, in the Relationship element with an http://../officedocument type.
    • Fix paths in archive to prevent Windows failure (#5277). Some paths in archives are absolute (have an opening slash) which, for reasons unknown, produces a failure in the test suite on MS Windows. This fixes that by removing the leading slash if it exists.
    • Add comments to aid code readability.
    • Trim space inside the last inline (#5273).

    - Unwrap sdt elements in footnotes and comments (#5302).

    Muse reader (Alexander Krotov):

    • Test that block level markup does not break <verbatim>.

    - Add secondary note support.

    ipynb reader: handle images referring to attachments. Previously we didn’t strip off the attachment: prefix, so even though the attachment was available in the mediabag, pandoc couldn’t find it.

    JATS reader:

    • Fix parsing of figures (#5321). This ensures that a figure containing a single image is parsed as a pandoc “implicit figure” (i.e., a Para with a single Image whose title attribute begins with fig:). More complex figures will still be parsed as divs.
    • Support fig-group block element (#5317).

    - Handle citations with multiple references (#5310). The rid attribute can have a space-separated list of ids.

    AsciiDoc Writer: Add writeAsciiDoctor [API change, Tarik Graba]. Handle display math appropriately for Asciidoctor.

    JATS writer: wrap figure caption in <p> to fix validation (#5290, Mauro Bieg).

    HTML writer:

    • Implement WAI-ARIA roles for (end)notes, citations, and bibliography (#4213). Note that doc-biblioref is only used when link-citations produces links, since it belongs on links.

    - Include content (including speaker notes) in title slides (#4317, #5237).

    ipynb writer:

    • Ensure final newline.
    • Only include metadata under jupyter field.
    • Don’t create attachments for images with absolute URIs, including data: URIs (#5303).

    - Keep plain text fallbacks in output even if a richer format is included (#5293). We don’t know what output format will be needed. See the --ipynb-output command line option for a way to control what formats are included in the output.

    Markdown writer: use markdown="1" when appropriate for Divs: when native_divs and markdown_in_html_blocks are disabled but raw_html and markdown_attribute are enabled.

    LaTeX writer:

    • Use right fold for escapeString. This is more elegant than the explicit recursive code we were using.
    • Avoid {} after control sequences when escaping. \ldots{}. doesn’t behave as well as \ldots. with the latex ellipsis package. This patch causes pandoc to avoid emitting the {} when it is not necessary. Now \ldots and other control sequences used in escaping will be followed by either a {}, a space, or nothing, depending on context.

    - For beamer, include contents under headers superordinate to slidelevel (#4317). Currently we keep the fancy title slide, and add a new slide with the same title and whatever content was under the header.

    👍 Powerpoint writer (Jesse Rosenthal): support underlines. Use span with single class “underline” as in docx writer.

    Muse writer: escape secondary notes (Alexander Krotov).

    👍 FB2 writer: add section identifiers support (#5229, John KetzerX).

    ⚠ Make --fail-if-warnings work for PDF output (#5343).

    Lua filters (Albert Krewinkel):

    • Load module pandoc before calling init.lua (#5287). The file init.lua in pandoc’s data directory is run as part of pandoc’s Lua initialization process. Previously, the pandoc module was loaded in init.lua, and the structure for marshaling was set up after. This allowed simple patching of element marshaling, but made using init.lua more difficult. Now, all required modules are now loaded before calling init.lua. The file can be used entirely for user customization. Patching marshaling functions, while discouraged, is still possible via the debug module.

    - All Lua modules bundled with pandoc, i.e., pandoc.List, pandoc.mediabag, pandoc.utils, and text are re-exported from the pandoc module. They are assigned to the fields List, mediabag, utils, and text, respectively.

    Text.Pandoc.Lua (Albert Krewinkel):

    • Split StackInstances into smaller Marshaling modules.

    - Get CommonState from Lua global. This allows more control over the common state from within Lua scripts.

    LaTeX template:

    • Support the subject metadata variable (#5289, Pascal Wagler).

    - Add \frontmatter, \mainmatter, \backmatter for book classes (#5306).

    epub3 template: Add titlepage class to section (#5269).

    HTML5 template: Add ARIA role doc-toc for table of contents (#4213).

    📇 Make –metadata-file use pandoc-markdown (#5279, #5272, Mauro Bieg).

    Text.Pandoc.Shared:

    • Remove withTempDir [API change].
    • Add new exported function defaultUserDataDirs [API change].
    • Add filterIpynbOutput [API change].

    - compactify: Avoid lists with a mix of Plain and Para elements (#5285).

    🌐 Text.Pandoc.Translations: reorder alphabetically and remove Author (#5334, Mauro Bieg).

    Text.Pandoc.Extensions:

    • More carefully groom ipynb default extensions.

    - Add all_symbols_escapable to githubMarkdownExtensions.

    Text.Pandoc.PDF:

    • Use system temp directory when possible (#1192). Previously we created temp dirs in the working directory, partly (a) because there were problems using the system temp directory on Windows, when their pathnames included tildes, and partly (b) because programs like epstopdf.pl would not be allowed to write to directories outside the working directory in restricted mode. We now (a) use the system temp dir except when the path includes tildes, and (b) set TEXMFOUTPUT when creating the PDF, so that subsidiary programs can use the system temp directory. This addresses problems that occurred when pandoc was used in a synced directory (such as Dropbox).

    - Change types of subsidiary functions to PandocIO, to allow warnings to be threaded through (#5343).

    Text.Pandoc.MIME: add WebP (#5267, Mauro Bieg).

    ✅ Tests: avoid calling findPandoc multiple times.

    🚚 Old tests: remove need for temp files by using pipeProcess.

    ➕ Added simple ipynb reader/writer tests (#5274).

    Rearrange --help output in a more rational way, with common options at the beginning and options grouped by function (#5336).

    trypandoc: Add JATS and other missing formats (Arfon Smith, #5291).

    ➕ Add missing copyright notices and remove license boilerplate (#4592, Albert Krewinkel).

    🏁 Use latest basement/foundation on 32bit windows.

    ✅ Use latest skylighting (#5328). Custom syntax definitions no longer try to load language.dtd.

    Require texmath 0.11.2.1

    ✅ Use latest pandoc-citeproc (0.16.1.1).

    MANUAL.txt:

    • Clarify variable substitution indentation in templates (#5338, Agustín Martín Barbero).
    • Reorder custom-styles section (#5324, Mauro Bieg).
  • v2.6 Changes

    January 31, 2019

    👌 Support ipynb (Jupyter notebook) as input and output format.

    • Add ipynb as input and output format (extension .ipynb).
    • Added Text.Pandoc.Readers.Ipynb [API change].
    • Added Text.Pandoc.Writers.Ipynb [API change].
    • Add PandocIpynbDecodingError constructor to Text.Pandoc.Error.Error [API change].
    • Depend on ipynb library.

    - Note: there is no template for ipynb.

    ➕ Add DokuWiki reader (#1792, Alexander Krotov). This adds Text.Pandoc.Readers.DokuWiki [API change], and adds dokuwiki as an input format.

    👍 Implement task lists (#3051, Mauro Bieg). Added task_lists extension. Task lists are supported from markdown and gfm input. They should work, to some degree, in all output formats, though in most formats you’ll get a bullet list with a unicode character for the box. In HTML, you get checkboxes and in LaTeX/PDF output, a box is used as the list marker. API changes:

    • Added constructor Ext_task_lists to Extension.

    - Added taskListItemFromAscii and taskListItemToAscii to Text.Pandoc.Shared.

    👍 Allow some command line options to take URL in addition to FILE. --include-in-header, --include-before-body, --include-after-body.

    HTML reader:

    • Handle empty start attribute (see #5162).

    - Treat textarea as a verbatim environment (#5241) and preserve spacing.

    RST reader:

    • Change treatment of number-lines directive (Brian Leung, #5207). Directives of this type without numeric inputs should not have a startFrom attribute; with a blank value, the writers can produce extra whitespace.
    • Removed superfluous sourceCode class on code blocks (#5047).

    - Handle sourcecode directive as synonynm for code (#5204).

    Markdown reader:

    • Remove sourceCode class for literate Haskell code blocks (#5047). Reverse order of literate and haskell classes on code blocks when parsing literate Haskell, so haskell is first.

    - Treat <textarea> as a verbatim environment (#5241).

    Org reader:

    • Handle minlevel option differently (#5190, Brian Leung). When minlevel exceeds the original minimum level observed in the file to be included, every heading should be shifted rightward.
    • Allow for case of :minlevel == 0 (#5190).
    • Fix treatment of links to images (#5191, Albert Krewinkel). Links with descriptions which are pointing to images are no longer parsed as inline images, but as links.
    • Add support for #+SELECT_TAGS (Brian Leung).

    - Separate filtering logic from conversion function (Brian Leung).

    🐎 TWiki reader: Fix performance issue with underscores (#3921).

    MediaWiki reader: use _ instead of - in auto-identifiers (#4731). We may not still be exactly matching mediawiki’s algorithm.

    LaTeX reader:

    • Remove sourceCode class for literate Haskell code blocks (#5047). Reverse order of literate and haskell classes on code blocks when parsing literate Haskell, so haskell is first.
    • Support \DeclareMathOperator (#5149).
    • Support \inputminted (#5103).
    • Support \endinput (#5233).

    - Allow includes with dots like cc_by_4.0. Previously the .0 was interpreted as a file extension, leading pandoc not to add .tex (and thus not to find the file). The new behavior matches tex more closely.

    Man reader:

    - Use mapLeft from Shared instead of defining own.

    Docx reader (Jesse Rosenthal):

    - Handle level overrides (#5134).

    Docx writer:

    • Support custom properties (#3024, #5252, Agustín Martín Barbero). Also supports additional core properties: subject, lang, category, description.

    - Make Level into a real type, instead of an alias for a tuple (Jesse Rosenthal).

    ICML writer (Mauro Bieg):

    - Support unnumbered headers (#5140).

    Texinfo writer: Use header identifier for anchor if present (#4731). Previously we were overwriting an existing identifier with a new one.

    Org writer: Preserve line-numbering for example and code blocks (Brian Leung).

    Man/Ms writers: Don’t escape - as \-. The \- gets rendered in HTML and PDF as a unicode minus sign.

    Ms writer: Ensure we have a newline after .EN in disply math (#5251).

    RST writer: Don’t wrap simple table header lines (#5128).

    📄 Asciidoc writer: Shorter delimiters for tables, blockquotes (#4364). This matches asciidoctor reference docs.

    🚚 Dokuwiki writer: Remove automatic : prefix before internal image links (#5183, Damien Clochard). This prevented users from making relative image links.

    🚚 Zimwiki writer: remove automatic colon prefix before internal images (#5183, Damien Clochard).

    🚚 MediaWiki writer: fix caption, use ‘thumb’ instead of ‘frame’ (#5105). Captions used to have the word ‘caption’ prepended; this has been removed. Also, ‘thumb’ is used instead of ‘frame’ to allow images to be resized.

    reveal.js writer:

    • Ensure that we don’t get > 2 levels of section nesting, even with slide level > 2 (#5168).

    - If slide level == N but there is no N-level header, make sure the next header with level > N gets treated as a slide and put in a section, rather than remaining loose (#5168).

    Markdown writer:

    • Make plain RawBlocks pass through in plain output.

    - Include needed whitespace after HTML figure (#5121). We use HTML for a figure in markdown dialects that can’t represent it natively.

    Commonmark writer:

    • Fix handling of SoftBreak with hard_line_breaks (#5195).

    - Implement --toc (writerTableOfContents) in commonmark/gfm writers (#5172).

    EPUB writer:

    • Ensure that picture transforms are done on metadata too.

    - Small fixes to nav.xhtml: Add ‘landmarks’ id attribute to the landmarks nav. Replace old default CSS removing numbers from ol.toc li with new rules that match nav#toc ol, nav#landmarks ol. We keep the toc class on ol for backwards compatibility.

    LaTeX writer:

    • Make raw content marked beamer pass through in beamer output (pandoc/lua-filters#40).
    • Beamer: avoid duplicated fragile property in some cases (#5208).

    - Add # special characters for listings (#4939). This character needs special handling in \lstinline.

    RTF writer: use toTableOfContents from Shared to replace old duplicated code.

    Pptx writer:

    • Support custom properties. Also supports additional core properties: subject, category, description (#5252, Agustín Martín Barbero).

    - Use toTableOfContents from Shared to replace old duplicated code.

    ODT writer (Augustín Martín Barbero):

    • Fix typo in custom properties (#2839).

    - Improve standard properties, including the following core properties: generator (Pandoc/VERSION), description, subject, keywords, initial-creator (from authors), creation-date (actual creation date) (#5252).

    Custom writers:

    • Allow ‘-’ in filenames for custom lua writers (#5187).
    • sample.lua: add SingleQuoted, DoubleQuoted (#5104).

    - sample.lua: Add a missing > (MichaWiedenmann).

    reveal.js template: Add zoomKey config (#4249).

    💅 HTML5 template: Remove unnecessary type=“text/css” on style and link for HTML5 (#5146).

    LaTeX template (Andrew Dunning, except where noted):

    • Prevent fontspec from scaling mainfont to match the default font, Latin Modern. A main font set to 12pt could previously appear between 11pt to 13pt depending on its design. To return to the earlier rendering, use -V mainfontoptions="Scale=MatchLowercase" (#5212, #5218).
    • Display monospaced fonts without TeX ligatures when using --pdf-engine=lualatex. It now matches the behaviour of other engines (#5212, #5218).
    • Remove the deprecated romanfont variable. The functionality of mainfont is identical (#5218).
    • Render \subtitle with the standard document classes. Previously, subtitle only appeared when using the KOMA-Script classes or Beamer (#5213, #5244).
    • Use Babel instead of Polyglossia for LuaLaTeX. This avoids several language selection problems, notably with retaining French spacing conventions when switching to a verbatim environment or another language; and in printing Greek text without hyphenation (#5193).
    • Use the xurl package if available, improving the appearance of URLs by allowing them to break at additional points (#5193).
    • Use bookmark if available to correct heading levels in PDF bookmarks: see the KOMA-Script 3.26 release notes (#5193).
    • Require the xcolor package to avoid a possible error when using additional packages alongside footnotes in tables (#5193, closes #4861).
    • Remove obsolete fixltx2e package, which has no functionality with TeX Live 2015 or later (#5193).
    • Allow multiple fontfamilies.options (#5193, closes #5194).
    • Restrict institute variable to Beamer (#5219).
    • Use footnotehyper package if available to make footnotes in tables compatible with hyperref (#5234).
    • Number parts and chapters in book classes only if the numbersections variable is set, for consistency with other output formats. To return to the previous behaviour, use -V numbersections -V secnumdepth=0 (#5235).
    • Reindent file (#5193).
    • Use built-in parskip handling with KOMA-Script classes (#5143, Enno).

    - Set default listings language for lua, assembler (#5227, John MacFarlane). Otherwise we get an error when trying to compile code with lua or assembler code. To change the default dialect (currenty 5.3 for lua and x86masm for assembler), you can use --include-in-header to inject something like \lstset{defaultdialect=[5.2]Lua}.

    Text.Pandoc.Readers: Changed types of readJSON; it now runs in an instance of PandocMonad, like the other readers and writers. [API change]

    Text.Pandoc.Writers: Changed types of writeJSON; it now runs in an instance of PandocMonad, like the other readers and writers. [API change]

    Text.Pandoc.Error: Added PandocUTF8DecodingError constructor for PandocError. [API change]

    🔨 Text.Pandoc.Writers.Shared - add toTableOfContents. [API change] This is refactored out from the Markdown writer. It can be used in other writers to create a table of contents.

    👌 Improve error messages for UTF-8 decoding errors. Now we give the filename and byte offset (#4765).

    Text.Pandoc.XML: Strip out illegal XML characters in escapeXMLString (#5119).

    ⚡️ Text.Pandoc.Process: update pipeProcess (Albert Krewinkel). The implementation of pipeProcess was rewritten to fix sporadic failures caused by prematurely closed pipes.

    👉 Use safeRead instead of read everywhere in the code (John MacFarlane, Mauro Bieg, #5162, #5180).

    Text.Pandoc.SelfContained: Decompress .svgz when converting to data: URI (#5163, Alexander Krotov).

    🚚 Text.Pandoc.Parsing: Remove unused HasHeaderMap (#5175, Alexander Krotov). [API change]

    🏁 Normalize Windows paths to account for change in ghc 8.6 (#5127). When pandoc is compiled with ghc 8.6, Windows paths are treated differently, and paths beginning \\server no longer work. This commit rewrites such patsh to \\?\UNC\server which works. The change operates at the level of argument parsing, so it only affects the command line program.

    📇 Simplify/fix reading of --metadata values on command line to avoid problems relating to haskell-hvr/HsYAML#7 (#5177).

    data/pandoc.lua: auto-fix nested constructor arguments (Albert Krewinkel). Incorrect types to pandoc element constructors are automatically converted to the correct types when possible. This was already done for most constructors, but conversions are now also done for nested types (like lists of lists).

    ✂ Removed custom Setup.hs, use build-type: simple. The only thing we gained from the custom build was automatic installation of the man page when using ‘cabal install’. But custom builds cause problems, e.g., with cross-compilation. Installation of the man page is better handled by packagers. Note to packagers (e.g. Debian): it may be necessary to add a step installing the man page with the next release.

    👍 Allow latest http-client, tasty, zip-archive, Glob.

    👍 Require skylighting >= 0.7.5, adding support for sml, J, typescript.

    ✅ Tests: Cleaned up findPandoc in Tests.Helpers, so it works well with cabal v2.

    INSTALL.md:

    • Use button for installer links (John MacFarlane, Mauro Bieg, #5167).
    • Fix links and bump required stack version (max).

    - Improve installation notes on associated software (Andrew Dunning). Includes explanation of how to install related tools with package managers (since the method of installing rsvg-convert is not obvious).

    📚 doc/org.md: improve documentation of org features (Albert Krewinkel).

    doc/lua-filters.md: use 3rd level headers for module fields.

    MANUAL:

    • Clarify automatic identifiers (#5201). We remove non-alphanumerics. This includes, e.g., emojis.
    • Fix example for Div with id (Geoffrey Ely).
    • Update list of LaTeX packages used.
    • Make it clear that hard_line_breaks works in gfm (see #5195).
    • Mention raw_attribute in documentation for raw_html and raw_tex (#5240, thanks to @eiro).
    • Clarify that $sep$ must come right before $endfor$ in templates (#5243, Lev Givon).
    • Document metadata support for docx, odt, pptx writers (Agustín Martín Barbero).
    • Reorganize template variables (#5249, Andrew Dunning). Add additional headings to categorize variables, and alphabetize when there is large number; add more examples.

    - Document date-meta template variable (#5260, Tristan Stenner).

    trypandoc: Fix CSS and viewport.

  • v2.5 Changes

    November 27, 2018

    Text.Pandoc.App: split into several unexported submodules (Albert Krewinkel): Text.Pandoc.App.FormatHeuristics, Text.Pandoc.App.Opt, Text.Pandoc.App.CommandLineOptions, Text.Pandoc.App.OutputSettings. This is motivated partly by the desire to reduce recompilations when something is modified, since App previously depended on virtually every other module.

    Text.Pandoc.Extensions

    • Semantically, gfm_auto_identifiers is now a modifier of auto_identifiers; for identifiers to be set, auto_identifiers must be turned on, and then the type of identifier produced depends on gfm_auto_identifiers and ascii_identifiers are set. Accordingly, auto_identifiers is now added to githubMarkdownExtensions (#5057).

    - Remove ascii_identifiers from githubMarkdownExtensions. GitHub doesn’t seem to strip non-ascii characters any more.

    Text.Pandoc.Lua.Module.Utils (Albert Krewinkel)

    • Test AST object equality via Haskell (#5092). Equality of Lua objects representing pandoc AST elements is tested by unmarshalling the objects and comparing the result in Haskell. A new function equals which performs this test has been added to the pandoc.utils module.

    - Improve stringify. Meta value strings (MetaString) and booleans (MetaBool) are now converted to the literal string and the lowercase boolean name, respectively. Previously, all values of these types were converted to the empty string.

    🚚 Text.Pandoc.Parsing: Remove Functor and Applicative constraints where Monad already exists (Alexander Krotov).

    Text.Pandoc.Pretty: Don’t render BreakingSpace at end of line or beginning of line (#5050).

    Text.Pandoc.Readers.Markdown

    • Fix parsing of citations, quotes, and underline emphasis after symbols. Starting with pandoc 2.4, citations, quoted inlines, and underline emphasis were no longer recognized after certain symbols, like parentheses (#5099, #5053).

    - In pandoc 2.4, a soft break after an abbreviation would be relocated before it to allow for insertion of a nonbreaking space after the abbreviation. This behavior is here reverted. A soft break after an abbreviation will remain, and no nonbreaking space will be added. Those who care about this issue should take care not to end lines with an abbreviation, or to insert nonbreaking spaces manually.

    Text.Pandoc.Readers.FB2: Do not throw error for unknown elements in <body> (Alexander Krotov). Some libraries include custom elements in their FB2 files.

    Text.Pandoc.Readers.HTML

    • Allow tfoot before body rows (#5079).
    • Parse <small> as a Span with class “small” (#5080).

    - Allow thead containing a row with td rather than th (#5014).

    Text.Pandoc.Readers.LaTeX

    • Cleaned up handling of dimension arguments. Allow decimal points, preceding space.
    • Don’t allow arguments for verbatim, etc.
    • Allow space before bracketed options.
    • Allow optional arguments after \\ in tables.

    - Improve parsing of \tiny, \scriptsize, etc. Parse as raw, but know that these font changing commands take no arguments.

    Text.Pandoc.Readers.Muse

    • Trim whitespace before parsing grid table cells (Alexander Krotov).

    - Add grid tables support (Alexander Krotov).

    Text.Pandoc.Shared

    • For bibliography match Div with id refs, not class references. This was a mismatch between pandoc’s docx, epub, latex, and markdown writers and the behavior of pandoc-citeproc, which actually looks for a div with id refs rather than one with class references.
    • Exactly match GitHub’s identifier generating algorithm (#5057).

    - Add parameter for Extensions to uniqueIdent and inlineListToIdentifier (#5057). [API change] This allows these functions to be sensitive to the settings of Ext_gfm_auto_identifiers and Ext_ascii_identifiers, and allows us to use uniqueIdent in the CommonMark reader, replacing custom code. It also means that gfm_auto_identifiers can now be used in all formats.

    Text.Pandoc.Writers.AsciiDoc

    • Use .+ as list markers to support nested ordered lists (#5087).
    • Support list number styles (#5089).

    - Render Spans using [#id .class]#contents# (#5080).

    Text.Pandoc.Writers.CommonMark

    • Respect --ascii (#5043, quasicomputational).

    - Make sure --ascii affects quotes, super/subscript.

    Text.Pandoc.Writers.Docx

    • Fix bookmarks to headers with long titles (#5091). Word has a 40 character limit for bookmark names. In addition, bookmarks must begin with a letter. Since pandoc’s auto-generated identifiers may not respect these constraints, some internal links did not work. With this change, pandoc uses a bookmark name based on the SHA1 hash of the identifier when the identifier isn’t a legal bookmark name.
    • Add bookmarks to code blocks (Nikolay Yakimov).
    • Add bookmarks to images (Nikolay Yakimov).

    - Refactor common bookmark creation code into a function (Nikolay Yakimov).

    📇 Text.Pandoc.Writers.EPUB: Handle calibre metadata (#5098). Nodes of the form

      <meta name="calibre:series" content="Classics on War and Politics"/>
    

    📇 are now included from an epub XML metadata file. You can also include this information in your YAML metadata, like so:

      calibre:
       series: Classics on War and Policitics
    

    📇 In addition, ibooks-specific metadata can now be included via an XML file. (Previously, it could only be included via YAML metadata, see #2693.)

    Text.Pandoc.Writers.HTML: Use plain " instead of &quot; outside of attributes.

    Text.Pandoc.Writers.ICML: Consolidate adjacent strings, inc. spaces. This avoids splitting up the output unnecessarily into separate elements.

    Text.Pandoc.Writers.LaTeX: Don’t emit [<+->] unless beamer output, even if writerIncremental is True (#5072).

    Text.Pandoc.Writers.Muse (Alexander Krotov).

    • Output tables as grid tables if they have multi-line cells.
    • Indent simple tables only on the top level.
    • Output tables with one column as grid tables.
    • Add support for --reference-location.

    - Internal improvements.

    Text.Pandoc.Writers.OpenDocument: Fix list indentation (Nils Carlson, #5095). This was a regression in pandoc 2.4.

    ⚠ Text.Pandoc.Writers.RTF: Fix warnings for skipped raw inlines.

    Text.Pandoc.Writers.Texinfo: Add blank line before @menu section (#5055).

    Text.Pandoc.XML: in toHtml5Entities, prefer shorter entities when there are several choices for a particular character.

    data/abbreviations

    - Add additional abbreviations (Andrew Dunning) Many of these borrowed from the Chicago Manual of Style 10.42, ‘Scholarly abbreviations’.

    Templates

    - Asciidoc template: add :lang: to title header is lang is set in metadata (#5088).

    pandoc.cabal: Add cabal flag derive_json_via_th (Albert Krewinkel) Disabling the flag will cause derivation of ToJSON and FromJSON instances via GHC Generics instead of Template Haskell. The flag is enabled by default, as deriving via Generics can be slow (see #4083).

    trypandoc:

    • Tweaked drop-down lists.
    • Put link to site in footer.
    • Preselect output format.
    • Update on change of in or out format.

    - Add man input format.

    MANUAL.txt:

    • Fix outdated description of latex_macros extension.
    • Clarified placement of bibliography.
    • Added “A note on security.”
    • Fix note on curly brace syntx for locators.
    • Document new explicit syntax for citeproc locators.
    • Remove confusing cross-links for some extensions.
    • Don’t put pandoc in code ticks in heading.
    • Document that --ascii works for gfm and commonmark too.

    - Add man to --from options.

    doc/customizing-pandoc.md: various improvements (Mauro Bieg).

  • v2.4 Changes

    November 04, 2018

    pandoc (2.4)

    [new features]

    • 🆕 New input format man (Yan Pashkovsky, John MacFarlane).

    [behavior changes]

    🌐 --ascii is now implemented in the writers, not in Text.Pandoc.App, via the new writerPreferAscii field in WriterOptions. Now the write* functions for Docbook, HTML, ICML, JATS, LaTeX, Ms, Markdown, and OPML are sensitive to writerPreferAscii. Previously the to-ascii translation was done in Text.Pandoc.App, and thus not available to those using the writer functions directly.

    --ascii now works with Markdown output. HTML5 character reference entities are used.

    --ascii now works with LaTeX output. 100% ASCII output can’t be guaranteed, but the writer will use commands like \"{a} and \l whenever possible, to avoid emiting a non-ASCII character.

    For HTML5 output, --ascii now uses HTML5 character reference entities rather than numerical entities.

    👌 Improved detection of format based on extension (in Text.Pandoc.App). We now ensure that if someone tries to convert a file for a format that has a pandoc writer but not a reader, it won’t just default to markdown.

    ➕ Add viz. to abbreviations file (#5007, Nick Fleisher).

    💅 AsciiDoc writer: always use single-line section headers, instead of the old underline style (#5038). Previously the single-line style would be used if --atx-headers was specified, but now it is always used.

    RST writer: Use simple tables when possible (#4750).

    CommonMark (and gfm) writer: Add plain text fallbacks. (#4528, quasicomputational). Previously, the writer would unconditionally emit HTML output for subscripts, superscripts, strikeouts (if the strikeout extension is disabled) and small caps, even with raw_html disabled. Now there are plain-text (and, where possible, fancy Unicode) fallbacks for all of these corresponding (mostly) to the Markdown fallbacks, and the HTML output is only used when raw_html is enabled.

    👍 Powerpoint writer: support raw openxml (Jesse Rosenthal, #4976). This allows raw openxml blocks and inlines to be used in the pptx writer. Caveats: (1) It’s up to the user to write well-formed openxml. The chances for corruption, especially with such a brittle format as pptx, is high. (2) Because of the tricky way that blocks map onto shapes, if you are using a raw block, it should be the only block on a slide (otherwise other text might end up overlapping it). (3) The pptx ooxml namespace abbreviations are different from the docx ooxml namespaces. Again, it’s up to the user to get it right. Unzipped document and ooxml specification should be consulted.

    ✅ With --katex in HTML formats, do not use the autorenderer (#4946). We no longer surround formulas with \(..\) or \[..\]. Instead, we tell katex to convert the contents of span elements with class “math”. Since math has already been identified, this avoids wasted time parsing for LaTeX delimiters. Note, however, that this may yield unexpected results if you have span elements with class “math” that don’t contain LaTeX math. Also, use latest version of KaTeX by default (0.9.0).

    The man writer now produces ASCII-only output, using groff escapes, for portability.

    ODT writer:

    • Add title, author and date to metadata; any remaining metadata fields are added as meta:user-defined tags.
    • Implement table caption numbering (#4949, Nils Carlson). Captioned tables are numbered and labeled with format “Table 1: caption”, where “Table” is replaced by a translation, depending on the value of lang in metadata. Uncaptioned tables are not enumerated.

    - OpenDocument writer: Implement figure numbering in captions (#4944, Nils Carlson). Figure captions are now numbered 1, 2, 3, … The format in the caption is “Figure 1: caption” and so on (where “Figure” is replaced by a translation, depending on the value of lang in the metadata). Captioned figures are numbered consecutively and uncaptioned figures are not enumerated. This is necessary in order for LibreOffice to generate an Illustration Index (Table of Figures) for included figures.

    👍 RST reader: Pass through fields in unknown directives as div attributes (#4715). Support class and name attributes for all directives.

    👍 Org reader: Add partial support for #+EXCLUDE_TAGS option. (#4284, Brian Leung). Headers with the corresponding tags should not appear in the output.

    ⚠ Log warnings about missing title attributes now include a suggestion about how to fix the problem (#4909).

    Lua filter changes (Albert Krewinkel):

    Report traceback when an error occurs. A proper Lua traceback is added if either loading of a file or execution of a filter function fails. This should be of help to authors of Lua filters who need to debug their code.

    👍 Allow access to pandoc state (#5015). Lua filters and custom writers now have read-only access to most fields of pandoc’s internal state via the global variable PANDOC_STATE.

    💅 Push ListAttributes via constructor (Albert Krewinkel). This ensures that ListAttributes, as present in OrderedList elements, have additional accessors (viz. start, style, and delimiter).

    📇 Rename ReaderOptions fields, use snake_case. Snake case is used in most variable names, using camelCase for these fields was an oversight. A metatable is added to ensure that the old field names remain functional.

    Iterate over AST element fields when using pairs. This makes it possible to iterate over all ield names of an AST element by using a generic for loop with pairs`:

    for field_name, field_content in pairs(element) do
    ... 
    end
    

    📄 Raw table fields of AST elements should be considered an implementation detail and might change in the future. Accessing element properties should always happen through the fields listed in the Lua filter docs.

    Note that the iterator currently excludes the t/tag field.

    Ensure that MetaList elements behave like Lists. Methods usable on Lists can also be used on MetaList objects.

    🛠 Fix MetaList constructor (Albert Krewinkel). Passing a MetaList object to the constructor pandoc.MetaList now returns the passed list as a MetaList. This is consistent with the constructor behavior when passed an (untagged) list.

    🐎 Custom writers: Custom writers have access to the global variable PANDOC_DOCUMENT(Albert Krewinkel, #4957). The variable contains a userdata wrapper around the full pandoc AST and exposes two fields, meta and blocks. The field content is only marshaled on-demand, performance of scripts not accessing the fields remains unaffected.

    [API changes]

    Text.Pandoc.Options: add writerPreferAscii to WriterOptions.

    Text.Pandoc.Shared:

    • Export splitSentences. This was previously duplicated in the Man and Ms writers.

    - Add ToString typeclass (Alexander Krotov).

    🆕 New exported module Text.Pandoc.Filter (Albert Krewinkel).

    📜 Text.Pandoc.Parsing

    • Generalize gridTableWith to any Char Stream (Alexander Krotov).

    - Generalize readWithM from [Char] to any Char Stream that is a ToString instance (Alexander Krotov).

    🆕 New exposed module Text.Pandoc.Filter (Albert Krewinkel).

    Text.Pandoc.XML: add toHtml5Entities.

    🆕 New exported module Text.Pandoc.Readers.Man (Yan Pashkovsky, John MacFarlane).

    Text.Pandoc.Writers.Shared

    • Add exported functions toSuperscript and toSubscript (quasicomputational, #4528).
    • Remove exported functions metaValueToInlines, metaValueToString. Add new exported functions lookupMetaBool, lookupMetaBlocks, lookupMetaInlines, lookupMetaString. Use these whenever possible for uniformity in writers (Mauro Bieg, #4907). (Note that removed function metaValueToInlines was in previous released versions.)

    - Add metaValueToString.

    Text.Pandoc.Lua

    🔦 Expose more useful internals (Albert Krewinkel):

    - `runFilterFile` to run a Lua filter from file;
    - data type `Global` and its constructors; and
    - `setGlobals` to add globals to a Lua environment.
    

    This module also contains Pushable and Peekable instances required to get pandoc’s data types to and from Lua. Low-level Lua operation remain hidden in Text.Pandoc.Lua.

    📇 Rename runPandocLua to runLua (Albert Krewinkel).

    ✂ Remove runLuaFilter, merging this into Text.Pandoc.Filter.Lua’s apply (Albert Krewinkel).

    🛠 [bug fixes and under-the-hood improvements]

    📜 Text.Pandoc.Parsing

    • Make uri accept any stream with Char tokens (Alexander Krotov).
    • Rewrite uri without withRaw (Alexander Krotov).
    • Generalize parseFromString and parseFromString' to any streams with Char token (Alexander Krotov)

    - Rewrite nonspaceChar using noneOf (Alexander Krotov)

    Text.Pandoc.Shared: Reimplement mapLeft using Bifunctor.first (Alexander Krotov).

    Text.Pandoc.Pretty: Simplify Text.Pandoc.Pretty.offset (Alexander Krotov).

    Text.Pandoc.App

    • Work around HXT limitation for –syntax-definition with windows drive (#4836).
    • Always preserve tabs for man format. We need it for tables.

    - Split command line parsing code into a separate unexported module, Text.Pandoc.App.CommandLineOptions (Albert Krewinkel).

    Text.Pandoc.Readers.Roff: new unexported module for tokenizing roff documents.

    🆕 New unexported module Text.Pandoc.RoffChar, provided character escape tables for roff formats.

    Text.Pandoc.Readers.HTML: Fix htmlTag and isInlineTag to accept processing instructions (#3123, regression since 2.0).

    Text.Pandoc.Readers.JATS: Use foldl' instead of maximum to account for empty lists (Alexander Krotov).

    Text.Pandoc.Readers.RST: Don’t allow single-dash separator in headerless table (#4382).

    📜 Text.Pandoc.Readers.Org: Parse empty argument array in inline src blocks (Brian Leung).

    Text.Pandoc.Readers.Vimwiki:

    • Get rid of F, runF and stateMeta' in favor of stateMeta (Alexander Krotov).

    - Parse Text without converting to [Char] (Alexander Krotov).

    📜 Text.Pandoc.Readers.Creole: Parse Text without converting to [Char] (Alexander Krotov).

    Text.Pandoc.Readers.LaTeX

    👍 Allow space at end of math after \ (#5010).

    ➕ Add support for nolinkurl command (#4992, Brian Leung).

    Simplified type on doMacros'.

    🐎 Tokenize before pulling tokens, rather than after (#4408). This has some performance penalty but is more reliable.

    👀 Make macroDef polymorphic and allow in inline context. Otherwise we can’t parse something like \lowercase{\def\x{Foo}}. I have actually seen tex like this in the wild.

    👌 Improved parsing of \def, \let. We now correctly parse:

    \def\bar{hello}
    \let\fooi\bar
    \def\fooii{\bar}
    \fooi +\fooii
    
    \def\bar{goodbye}
    \fooi +\fooii
    

    👌 Improve parsing of \def argspec.

    👀 Skip \PackageError commands (see #4408).

    Fix bugs omitting raw tex (#4527). The default is -raw_tex, so no raw tex should result unless we explicitly say +raw_tex. Previously some raw commands did make it through.

    🚚 Moved isArgTok to Text.Pandoc.Readers.LaTeX.Parsing.

    🚚 Moved babelLangToBCP, polyglossiaLangToBCP to new module, Text.Pandoc.Readers.LaTeX.Lang (unexported).

    📦 Simplified accent code using unicode-transforms. New dependency on unicode-transforms package for normalization.

    👍 Allow verbatim blocks ending with blank lines (#4624).

    👌 Support breq math environments: dmath, dgroup, darray. This collects some of the general-purpose code from the LaTeX reader, with the aim of making the module smaller.

    Text.Pandoc.Readers.Markdown

    • Fix awkward soft break movements before abbreviations (#4635).

    - Add updateStrPos in a couple places where needed.

    Text.Pandoc.Readers.Docx: Trigger bold/italic with bCs, iCs (#4947). These are variants for “complex scripts” like Arabic and are now treated just like b, i (bold, italic).

    Text.Pandoc.Readers.Muse (Alexander Krotov)

    • Try to parse lists before trying to parse table. This ensures that tables inside lists are parsed correctly.
    • Forbid whitespace after opening and before closing markup elements.
    • Parse page breaks.
    • Simplify museToPandocTable to get rid of partial functions.
    • Allow footnotes to start with empty line.
    • Make sure that the whole text is parsed.
    • Allow empty headers. Previously empty headers caused parser to terminate without parsing the rest of the document.
    • Allow examples to be indented with tabs.
    • Remove indentation from examples indicated by {{{ and }}}.
    • Fix parsing of empty cells.
    • Various changes to internals.
    • Rewrite some parsers in applicative style.
    • Avoid tagsoup dependency.

    - Allow table caption to contain +.

    Text.Pandoc.Writers.LaTeX

    • Add newline if math ends in a comment (#4880). This prevents the closing delimiter from being swalled up in the comment.
    • With --listings, don’t pass through org-babel attributes (#4889).
    • With --biblatex, use \autocite when possible (#4960). \autocites{a1}{a2}{a3} will not collapse the entries. So, if we don’t have prefixes and suffixes, we use instead \autocite{a1,a2,a3}.

    - Fix description lists contining highlighted code (#4662).

    Text.Pandoc.Writers.Man

    • Don’t wrap .SH and .SS lines (#5019).
    • Avoid unnecessary .RS/.RE pair in definition lists with one paragraph definitions.
    • Moved common groff functions to Text.Pandoc.Writers.Groff.
    • Fix strong/code combination on man (should be \f[CB] not \f[BC], see #4973).
    • Man writer: use \f[R] instead of \f[] to reset font (Alexander Krotov, #4973).

    - Move splitSentences to Text.Pandoc.Shared.

    Text.Pandoc.Writers.Docx

    ➕ Add framework for custom properties (#3034). So far, we don’t actually write any custom properties, but we have the infrastructure to add this.

    🖐 Handle tables in table cells (#4953). Although this is not documented in the spec, some versions of Word require a w:p element inside every table cell. Thus, we add one when the contents of a cell do not already include one (e.g. when a table cell contains a table).

    Text.Pandoc.Writers.AsciiDoc: Prevent illegal nestings. Adjust header levels so that n+1 level headers are only found under n level headers, and the top level is 1.

    Text.Pandoc.Writers.OpenDocument: Improve bullet/numbering alignment (#4385). This change eliminates the large gap we used to have between bullet and text, and also ensures that numbers in numbered lists will be right-aligned.

    Text.Pandoc.Writers.ZimWiki

    • Number ordered list items sequentially, rather than always with 1 (#4962).

    - Remove extra indentation on lists (#4963).

    📇 Text.Pandoc.Writers.EPUB: Use metadata field css instead of stylesheet (Mauro Bieg, #4990).

    Text.Pandoc.Writers.Markdown: Ensure blank between raw block and normal content (#4629). Otherwise a raw block can prevent a paragraph from being recognized as such.

    Text.Pandoc.Writers.Ms

    • Removed old escapeBar. We don’t need this now that we use @ for math delim.
    • Moved common code to Text.Pandoc.Writers.Roff and to Text.Pandoc.RoffChar.

    - Move splitSentences to Text.Pandoc.Shared (to avoid duplication with the man writer).

    Text.Pandoc.Writers.Muse (Alexander Krotov).

    + Add support for grid tables.
    + Fix Muse writer style.
    + Use `length` instead of `realLength` to calculate definition
      indentation. Muse parsers don't take character width into
      account when calculating indentation.
    + Do not insert newline before lists.
    + Use lightweight markup after `</em>` tag.
    

    🆕 New unexported module Text.Pandoc.Writers.Roff, providing functions useful for all roff format writers (man, ms).

    Text.Pandoc.Lua

    🚚 Move globals handling to separate module Text.Pandoc.Lua.Global (Albert Krewinkel).

    Lua filter internals: push Shared.Element as userdata (Albert Krewinkel). Hierarchical Elements were pushed to Lua as plain tables. This is simple, but has the disadvantage that marshaling is eager: all child elements will be marshaled as part of the object. Using a Lua userdata object instead allows lazy access to fields, causing content marshaling just (but also each time) when a field is accessed. Filters which do not traverse the full element contents tree become faster as a result.

    0️⃣ [default template changes]

    LaTeX template:

    • Add variable hyperrefoptions (#4925, Mathias Walter).

    - Add variable romanfont, romanfontoptions (#4665, OvidiusCicero).

    💅 AsciiDoc template: use single-line style for title.

    🔌 revealjs template: Fix typo in the socket.io javascript plugin (#5006, Yoan Blanc).

    📄 Text.Pandoc.Lua.Util: add missing docstring to defineHowTo (Albert Krewinkel).

    data/pandoc.lua: add datatype ListAttributes (Albert Krewinkel)

    data/sample.lua: replace custom pipe function with pandoc.utils.pipe (Albert Krewinkel).

    📚 [documentation improvements]

    INSTALL.md

    • Add chromeos install instructions (#4958) (Evan Pratten).

    - Add note about TinyTeX.

    MANUAL.txt

    • Change groff -> roff.
    • Implement --ascii for Markdown writer.

    - Clarify LaTeX image dimensions output (Mauro Bieg).

    doc/customizing-pandoc.md: added skeleton (Mauro Bieg, #3288).

    ✅ doc/getting-started.md: Added title to test1.md to avoid warning.

    🔀 doc/lua-filters.md: merge type references into main document, fix description of Code.text (Albert Krewinkel).

    🏗 [build infrastructure improvements]

    👉 Makefile

    • Makefile: added quick-cabal, full-cabal targets.

    - Make .msi download targets insensitive to order of appveyor builds.

    ⚡️ Update benchmarks for ghc 8.6.1.

    pandoc.cabal:

    • Enable more compiler warnings (Albert Krewinkel).
    • Make base lower bound 4.8.
    • Bump upper bound for QuickCheck.
    • Bump upper bound for binary.
    • Updated version bounds for containers and haddock-library (#4974).
    • Added docx/docPropos/custom.xml to cabal data-files.
    • Require skylighting 0.7.4 (#4920).

    - New dependency on unicode-transforms package for normalization.

    👌 Improved .travis.yml testing and test with GHC 8.6.1 (Albert Krewinkel).

    ➕ Added tools/changelog-helper.sh.

    ➕ Added test/grofftest.sh for testing the man reader on real man pages.

  • v2.3.1 Changes

    September 29, 2018

    RST reader:

    • Parse RST inlines containing newlines (#4912, Francesco Occhipinti). This eliminates a regression introduced after pandoc 2.1.1, which caused inline constructions containing newlines not to be recognized.

    - Fix bug with internal link targets (#4919). They were gobbling up indented content underneath.

    Markdown reader: distinguish autolinks in the AST. With this change, autolinks are parsed as Links with the uri class. (The same is true for bare links, if the autolink_bare_uris extension is enabled.) Email autolinks are parsed as Links with the email class. This allows the distinction to be represented in the AST.

    Org reader:

    • Force inline code blocks to honor export options (Brian Leung).

    - Parse empty argument array in inline src blocks (Brian Leung).

    Muse reader (Alexander Krotov):

    • Added additional tests.
    • Do not allow code markup to be followed by digit.
    • Remove heading level limit.
    • Simplify <literal> tag parsers
    • Parse Text instead of String. Benchmark shows 7% improvement.
    • Get rid of HTML parser dependency.

    - Various code improvements.

    🏁 ConTeXt writer: change \ to / in Windows image paths (#4918). We do this in the LaTeX writer, and it avoids problems. Note that / works as a LaTeX path separator on Windows.

    LaTeX writer:

    • Add support for multiprenote and multipostnote arguments with --biblatex (Brian Leung, #4930). The multiprenotes occur before the first prefix of a multicite, and the multipostnotes follow the last suffix.

    - Fix a use of last that might take empty list. If you ran with --biblatex and have an empty document (metadata but no blocks), pandoc would previously raise an error because of the use of last on an empty list.

    🏗 RTF writer: Fix build failure with ghc-8.6.1 caused by missing MonadFail instance (Jonas Scholl).

    💅 ODT Writer: Improve table header row style handling (Nils Carlson). This changes the way styles for cells in the header row and normal rows are handled in ODT tables. Previously a new (but identical) style was generated for every table, specifying the style of the cells within the table. After this change there are two style definitions for table cells, one for the cells in the header row, one for all other cells. This doesn’t change the actual styles, but makes post-processing changes to the table styles much simpler as it is no longer necessary to introduce new styles for header rows and there are now only two styles where there was previously one per table.

    HTML writer:

    • Don’t add uri class to presumed autolinks. Formerly the uri class was added to autolinks by the HTML writer, but it had to guess what was an autolink and could not distinguish [http://example.com](http://example.com) from <http://example.com>. It also incorrectly recognized [pandoc](pandoc) as an autolink. Now the HTML writer simply passes through the uri attribute if it is present, but does not add anything.
    • Avoid adding extra section nestings for revealjs. Previously revealjs title slides at level (slidelevel - 1) were nested under an extra section element, even when the section contained no additional (vertical) content. That caused problems for some transition effects.

    - Omit unknown attributes in EPUB2 output. For example, epub:type attributes should not be passed through, or the epub produced will not validate.

    🚚 JATS writer: remove ‘role’ attribute on ‘bold’ and ‘sc’ elements (#4937). The JATS spec does not allow these.

    Textile writer: don’t represent uri class explicitly for autolinks (#4913).

    Lua filters (Albert Krewinkel):

    • Cleanup filter execution code.

    - Better error on test failure.

    ✅ HTML, Muse reader tests: reduce time taken by round-trip test.

    ➕ Added cabal.project.

    MANUAL: epub:type is only useful for epub3 (Maura Bieg).

    👉 Use hslua v1.0.0 (Albert Krewinkel).

    🛠 Fix translations/ru to use modern Russian orthography (Ivan Trubach).

    🏁 Build Windows binary using ghc 8.6.1 and cabal new-build. This fixes issues with segfaults in the 32-bit Windows binaries (#4283).

  • v2.3 Changes

    September 17, 2018

    ➕ Add --metadata-file option (Mauro Bieg, #1960), which allows users to specify metadata in a YAML file, regardless of the input format (#1960).

    Text.Pandoc.Writers.Shared: export isDisplayMath (API change).

    Text.Pandoc.Readers.Markdown: export yamlToMeta (API change, Mauro Bieg).

    Text.Pandoc.Readers.LaTeX.Types:

    • New type ArgSpec (API change).

    - Second parameter of Macro constructor is now [ArgSpec] instead of Int (API change).

    Markdown reader:

    • Use tex instead of latex for raw tex-ish content. We can’t always tell if it’s LaTeX, ConTeXt, or plain TeX. Better just to use tex always. Note that if context or latex specifically is desired, you can still force that in a markdown document by using the raw attribute. Note that this change may affect some filters, if they assume that raw tex parsed by the Markdown reader will be RawBlock (Format latex). In most cases it should be trivial to modify the filters to accept tex as well.
    • Refactor and reorganize YAML code (Mauro Bieg).

    - Make example_lists work for interrupted lists without startnum (#4908).

    HTML reader:

    • Parse <script type="math/tex tags as math (#4877). These are used by MathJax in some configurations.
    • Extract spaces inside links instead of trimming them (Alexander Krotov, #4845).
    • Added round-trip tests (Alexander Krotov).

    - Make parsing sensitive to the raw_tex extension (#1126). This now allows raw LaTeX environments, \ref, and \eqref to be parsed (which is helpful for translation HTML documents using MathJaX).

    Org reader (Albert Krewinkel):

    • Respect export option p for planning info. Inclusion of planning info (*DEADLINE*, *SCHEDULED*, and *CLOSED*) can be controlled via the p export option: setting the option to t will add all planning information in a Plain block below the respective headline.
    • Org reader internals: don’t rely on RecordWildCards and ViewPatterns ghc extensions.

    - Strip planning info from output. Planning info is parsed, but not included in the output (as is the default with Emacs Org-mode, #4867).

    LaTeX reader:

    • Handle parameter patterns for \def (#4768, #4771). For example: \def\foo#1[#2]{#1 and #2}.
    • Allow % characters in URLs. This affects \href and \url (#4832).
    • Fixed parsing of \texorpdfstring. We were returning the wrong argument as the content.
    • Support blockcquote, foreignblockquote, foreigncblockquote, hyphenblockquote, hyphencblockquote, enquote*, foreignquote, hyphenquote from csquotes (#4848). Note that foreignquote will be parsed as a regular Quoted inline (not using the quotes appropriate to the foreign language).
    • Support more text-mode accents (#4652). Add support for \|, \b, \G, \h, \d, \f, \r, \t, \U, \i, \j, \newtie, \textcircled. Also fall back to combining characters when composed characters are not available.
    • Resolve \ref for figure numbers.
    • Support mintinline (#4365, Marc Schreiber).
    • Fix siunitx unit commands so they are only recognized in siunitx contexts (#4842). For example, \l outside of an siunitx context should be l-slash, not l (for liter).

    - Fix double unnumbered class (#4838). The unnumbered class was being included twice for starred sections.

    RST reader: Don’t skip link definitions after comments (#4860).

    Muse reader (Alexander Krotov):

    • Close the </quote> in indented tag test. There is already a separate test for unclosed </quote>.
    • Autonumber sections in the correct order. Parsing now stops at each section header to ensure the header is registered before parsing of the next section starts.
    • Move duplicate code into headingStart function.
    • Allow newline after opening * or **.
    • Don’t allow digits after closing marker in lightweight markup This change makes reader more compatible with Emacs Muse.

    - Parse <verse> tag in one pass instead of using parseFromString. This change makes it possible to have verbatim </verse> tag inside verse.

    📜 ODT reader: deal gracefully with missing <office:font-face-decls/> (#4336). This allows pandoc to parse ODT document produced by KDE’s Calligra.

    Muse writer (Alexander Krotov):

    • Output headers without asterisks if not on the top level.
    • Never wrap definition list terms.
    • Set envInsideBlock = True when rendering notes.
    • Use "" instead of [] for empty String.
    • Check for whitespace in the beginning and end of Str’s.
    • Escape -, ; and > in the beginning of strings.
    • Escape list markers in the beginning of notes.
    • Normalize inline list before testing if tags should be used.
    • Use tags instead of lightweight markup for empty strings.
    • Use lightweight markup when possible.
    • Escape empty strings. This guarantees that conditionalEscapeString never returns empty string.
    • Wrap conditionalEscapeString result into Muse type. This removes the need to pass envInsideLinkDescription to it.
    • Separate shouldEscapeString function.
    • Simplify inline list rendering.

    - Replace newlines in strings with spaces.

    Docx writer:

    • Add MetaString case for abstract, subtitle (#4900, Mauro Bieg).

    - Properly handle display math in spans (#4826). This isn’t a complete solution, since other nestings of display math may still cause problems, but it should work for what is by far the most common case.

    HTML writer:

    • Always output <dt> element, even if it is empty (#4883, Alexander Krotov).

    - Don’t prefix epub: attributes with data-.

    Org writer: Don’t escape literal _, ^ (#4882). Org doesn’t recognize these escapes.

    ODT writer: Fix percentage image scaling (#4881, Nils Carlson). Image scaling was broken when a width was set to a percentage.

    👀 EPUB writer: set epub:type on body element in each chapter, depending on the epub:type of the first section (#4823). This only affects epub3. See http://www.idpf.org/epub/profiles/edu/structure/#h.l0bzsloklt10

    FB2 writer: put coverpage element between title and date rather than in document-info element (#4854).

    Markdown writer: Escape ~ if strikeout extension enabled (#4840).

    👍 Haddock writer: Use proper format for latex math in haddock (#4571, Joe Hermaszewski). Inline math in \(..\), display math in \[..\], tex is now used. Previously we’d “fake it with unicode” and fall back to tex when that didn’t work. But newer haddock versions support latex math.

    TEI writer:

    • Ensure that title element is always present, even if empty (#4839).

    - Put author tags in the template, rather than adding them in the writer (#4839).

    LaTeX writer/template: be sensitive to filecolor variable (#4822). linkcolor only affects internal links, and urlcolor only affects linked URLs. For external links, the option to use is filecolor.

    ConTeXt writer: output raw tex blocks as well as context (#969).

    RST writer:

    • Use .. raw:: latex for tex content.
    • Use .. container for generic Divs, instead of raw HTML.

    - Render Divs with admonition classes as admonitions (#4833). Also omit Div with class admonition-title. These are generated by the RST reader and should be omitted on round-trip.

    🖨 Text.Pandoc.PDF: fix message printed when rsvg-convert is not available (#4855, Antonio Terceiro).

    💅 HTML5 template: add the title-block-header identifier to the header element, to make it easier to style precisely (#4767, J. B. Rainsberger).

    🚚 OpenDocument template: Remove unnecessary indenting of TOC title (#4798, José de Mattos Neto).

    👍 latex template: Add support for (toc-title) to LaTeX (and PDF) (#4853, Wandmalfarbe).

    👍 TEI template: improve publicationStmt. Add support for publisher, address, pubPlace, and date variables.

    👍 beamer template: Support “toc-title” (#4835, Cyril Roelandt).

    Text.Pandoc.Extensions: Fix haddock on Ext_footnotes (Chris Martin).

    🚚 Lua: cleanup Lua utils, remove unused functions (Albert Krewinkel).

    MANUAL.txt:

    • Clarify that --biblatex/--natbib don’t work directly for PDF (#4904).
    • Document epub:type attribute (Mauro Bieg, #4901)
    • Clarify when --resource-path has an effect.
    • More detail on customization in syntax highlighting section.
    • Document encoding issue with --listings (#4871, Damien Clochard).
    • Remove docs on removed --katex-stylesheet (Mauro Bieg, #4862).

    - Use https for context wiki links (#4910).

    CONTRIBUTING.md:

    • Link to lua-filters repository (#4874).

    - Fix mistake in REPL instructions for stack. (#4849, Brian Leung).

    lua-filters.md: add links to filters, and to lua-filters repository (#4874).

    INSTALL.md:

    • Indicate that cabal >= 2.0 is needed.

    - Added chocolatey installation method (#4844, Miodrag Milić).

    ✅ Travis: exclude round-trip tests, except for nightly test which can fail.

    ✅ Use latest texmath, pandoc-citeproc.

    🛠 Use a patched version of foundation until haskell-foundation/foundation#503 is fixed.

    🏁 Clean up appveyor build and Windows package creation. We now use 64-bit stack and ghc 8.4.3, lts-12 for the 64-bit build. The WiX-based msi is now 64-bit for 64-bit builds (fixing #4795).

    ✂ Remove obsolete RELEASE-CHECKLIST.md.

    ➕ Added additional compiler warnings in Makefile and CI builds.

  • v0.16.1.2

    March 08, 2019