pandoc v2.11.2 Release Notes

Release Date: 2020-11-19 // over 3 years ago
  • Click to expand changelog

    ๐Ÿ’… Default to using ATX (##-style) headings for Markdown output (#6662, Aner Lucero). Previously we used Setext (underlined) headings by default for levels 1โ€“2.

    โž• Add option --markdown-headings=atx|setext, and deprecate --atx-headers (#6662, Aner Lucero).

    ๐Ÿ‘Œ Support markdown-headings in defaults files.

    ๐Ÿ›  Fix corner case in YAML metadata parsing (#6823). Previously YAML metadata would sometimes not get recognized if a field ended with a newline followed by spaces.

    --self-contained: increase coverage (#6854). Previously we only self-contained attributes for certain tag names (img, embed, video, input, audio, source, track, section). Now we self-contain any occurrence of src, data-src, poster, or data-background-image, on any tag; and also href on link tags.

    Markdown reader:

    • Fix detection of locators following in-text citations. Prevously, if we had @foo [p. 33; @bar], the p. 33 would be incorrectly parsed as a prefix of @bar rather than a suffix of @foo.
    • Improve period suppression algorithm for citations in notes in note citation styles (#6835).

    - Donโ€™t increment stateNoteNumber for example list references. This helps with #6836 (a bug in which example list references disturb calculation of citation note number and affect when ibid is triggered).

    LaTeX reader:

    • Move getNextNumber from Readers.LaTeX to Readers.LaTeX.Parsing.

    - Fix negative numbers in siunitx commands. A change in pandoc 2.11 broke negative numbers, e.g. \SI{-33}{\celcius} or \num{-3}. This fixes the regression.

    DocBook reader: drop period in formalpara title and put it in a div with class formalpara-title, so that people can reformat with filters (#6562).

    ๐Ÿ‘ Man reader: improve handling of .IP (#6858). We now better handle .IP when it is used with non-bullet, non-numbered lists, creating a definition list. We also skip blank lines like groff itself.

    Bibtex reader: fall back on en-US if locale for LANG not found. This reproduces earlier pandoc-citeproc behavior (jgm/citeproc#26).

    JATS writer:

    • Wrap all tables (Albert Krewinkel). All <table> elements are put inside <table-wrap> elements, as the former are not valid as immediate child elements of <body>.

    - Move Table handling to separate module (Albert Krewinkel). Adds two new unexported modules: Text.Pandoc.Writers.JATS.Types, Text.Pandoc.Writers.JATS.Table.

    Org writer:

    • Replace org #+KEYWORDS with #+keywords (TEC). As of ~2 years ago, lower case keywords became the standard (though they are handled case insensitive, as always).

    - Update org supported languages and identifiers according to the current list contained in (TEC).

    Only use filterIpynbOutput if input format is ipynb (#6841). Before this change content could go missing from divs with class output, even when non-ipynb was being converted.

    When checking reader/writer name, check base name now that we permit extensions on formats other than markdown.

    ๐Ÿ Text.Pandoc.PDF: Fix changePathSeparators for Windows (#6173). Previously a path beginning with a drive, like C:\foo\bar, was translated to C:\/foo/bar, which caused problems. With this fix, the backslashes are removed.

    ๐ŸŒฒ Text.Pandoc.Logging: Add constructor ATXHeadingInLHS constructor to LogMessage [API change].

    ๐Ÿ›  Fix error that is given when people specify doc output (#6834, gison93).

    ๐Ÿ’… LaTeX template: add a \break after parbox in CSLRightInline. This should fix spacing problems between entries with numeric styles. Also fix number of params on CSLReferences.

    reveal.js template: Put quotes around controlsLayout, controlsBackArrows, and display, since these require strings. Add showSlideNumber, hashOneBasedIndex, pause.

    ๐Ÿ›  Use citeproc 0.2. This fixes a bug with title case around parentheses.

    ๐ŸŽ pandoc.cabal: remove โ€˜staticโ€™ flag. This isnโ€™t really necessary and can be misleading (e.g. on macOS, where a fully static build isnโ€™t possible). cabalโ€™s new option --enable-executable-static does the same. On stack you can add something like this to the options for your executable in package.yaml:

    ld-options: -static -pthread

    โœ‚ Remove obsolete bibutils flag setting in linux/


    • Correct link-citation -> link-citations.

    - Add a sentence about pagetitle for HTML (#6843, Alex Toldaiev).

    ๐Ÿšš Remove references to pandoc-citeproc (#6857).

    ๐Ÿ‘• CONTRIBUTING: describe hlint and how itโ€™s used (#6840, Albert Krewinkel).

Previous changes from v2.11.1

  • Click to expand changelog

    DocBook Reader: fix duplicate bibliography bug (#6773, Nils Carlson).

    HTML reader:

    • Parse contents of iframes (#6770).

    - Parse inline svg as image unless raw_html is set in the reader (in which case the svg is passed through as raw HTML) (#6770).

    LaTeX reader:

    • Fix bug parsing macro arguments (#6796). If \cL is defined as \mathcal{L}, and \til as \tilde{#1}, then \til\cL should expand to \tilde{\mathcal{L}}, but pandoc was expanding it to \tilde\mathcal{L}. This is fixed by parsing the arguments in โ€œverbatim modeโ€ when the macro expands arguments at the point of use.

    - Properly support optional (cite) argument for \blockquote from csquotes (#6802).

    ๐Ÿ“ฆ LaTeX writer: Improved calculation of table column widths. We now have LaTeX do the calculation, using \tabcolsep. So we should now have accurate relative column widths no matter what the text width. The default template has been modified to load the calc package if tables are used.

    HTML writer: Fix duplicate โ€œclassโ€ attribute for table rows (Andy Morris).

    Text.Pandoc.Filter: allow shorter YAML representation of Citeproc (Albert Krewinkel). The map-based YAML representation of filters expects type and path fields. The path field had to be present for all filter types, but is not used for citeproc filters. The field can now be omitted when type is โ€œciteprocโ€, as described in the MANUAL.

    ๐Ÿ“œ Text.Pandoc.Error: Add PandocBibliographyError constructor for PandocError [API change]. This ensures that bibliography parsing errors generate messages that include the bibliography file name โ€“ otherwise it can be quite mysterious where it is coming from.

    ๐Ÿ›  Citeproc: properly handle csl field with data: URI (#6783). This is used with the JATS writer, so this fixes a regression in pandoc 2.11 with JATS output and citeproc.

    ๐Ÿ‘ Allow citation-abbreviations in defaults file.

    JATS templates: ensure jats_publishing output is valid (Albert Krewinkel).

    LaTeX template: Fix CSLRightInline, so that it does not run over the right margin.

    0๏ธโƒฃ HTML template: default CSS tweaks (Mauro Bieg and John MacFarlane).

    • Fix margin before codeblock
    • Add monobackgroundcolor variable, making the background color and padding of code optional.
    • Ensure that backgrounds from highlighting styles take precedence over monobackgroundcolor
    • Remove list markers from TOC
    • Add margin-bottom where needed
    • Remove italics from blockquote styling
    • Change borders and spacing in tables to be more consistent with other output formats
    • Style h5, h6
    • Set font-size for print media to 12pt.
    • Reduce interline space.
    • Reduce interparagraph space.
    • Reduce line width.
    • Remove the special line-height: 1 for table cells.
    • Remove the special line-height for pre.
    • Ensure that there is a bit more space before a heading than after.
    • Slightly reduced space after title header.

    - Add CSS example to MANUAL

    man template: Change comment that triggers tbl from .\"t to '\" t, as specified in groff_man(7) (#6803).

    ๐Ÿ‘€ Use latest commonmark, commonmark-extensions. This fixes a bug with nested blocks in footnotes with the footnote extension to commonmark. See jgm/commonmark-hs#63.

    ๐Ÿ‘ Citeproc: use comma for in-text citations inside footnotes. When an author-in-text citation like @foo occurs in a footnote, we now render it with: AUTHOR NAME + COMMA + SPACE + REST. Previously we rendered: AUTHOR NAME + SPACE + "(" + REST + ")". This gives better results. Note that normal citations are still rendered in parentheses.

    โœ… Use latest citeproc:

    • citeproc no longer capitalizes notes, so we do it in pandoc when appropriate.

    - Closes #6783.

    Clarify manual on --track-changes (#6801).

    โž• Add doc/ to document pandocโ€™s handling of JATS (#6794, Albert Krewinkel).

    ๐Ÿ›  Fix code example in (#6795).