github jgm/pandoc 2.7.3
pandoc 2.7.3

latest releases: 3.2, pandoc-lua-engine-0.2.1.5, pandoc-cli-3.2...
4 years ago
  • Add jira (Atlassian’s Jira wiki markup) as output format (#2497, Albert Krewinkel).

  • Add tex_math_dollars to multimarkdownExtensions (#5512). This form is now supported in multimarkdown, in addition to tex_math_double_backslash.

  • Fix --self-contained so it works when output format has extensions. Previously if you used --self-contained with html-smart or html+smart, it wouldn’t work.

  • Add template variable curdir with working directory from which pandoc is run (#5464).

  • Markdown reader: don’t create implicit reference for empty header (#5549).

  • Muse reader: allow images inside link descriptions (Alexander Krotov).

  • HTML reader: epub related fixes.

    • With epub extensions, check for epub:type in addition to type.
    • Fix problem with noteref parsing which caused block-level content to be eaten with the noteref.
    • Rename pAnyTag to pAny.
    • Refactor note resolution.
    • Trim definition list terms (Alexander Krotov).
  • LaTeX reader:

    • Add braces when resolving \DeclareMathOperator (#5441). These seem to be needed for xelatex but not pdflatex.
    • Allow newlines in \mintinline.
    • Pass through unknown listings language as class (#5540). Previously if the language was not in the list of languages supported by listings, it would not be added as a class, so highlighting would not be triggered.
    • rawLaTeXInline: Include trailing {}s in raw latex commands (#5439). This change affects the markdown reader and other readers that allow raw LaTeX. Previously, trailing {} would be included for unknown commands, but not for known commands. However, they are sometimes used to avoid a trailing space after the command. The chances that a {} after a LaTeX command is not part of the command are very small.
  • MediaWiki reader: handle multiple attributes in table row (#5471, chinapedia).

  • Docx reader: Add support for w:rtl (#5545). Elements with this property are put into Span inlines with dir="rtl".

  • DocBook reader: Issue IgnoredElement warnings.

  • Org reader (Albert Krewinkel):

    • Fix planning elements in headers level 3 and higher (#5494). Planning info is now always placed before the subtree contents. Previously, the planning info was placed after the content if the header’s subtree was converted to a list, which happens with headers of level 3 and higher per default.
    • Omit, but warn about unknown export options. Unknown export options are properly ignored and omitted from the output.
    • Prefer plain symbols over math symbols (#5483). Symbols like \alpha are output plain and unemphasized, not as math.
    • Recognize emphasis after TODO/DONE keyword (#5484).
  • FB2 reader:

    • Skip unknown elements rather than throwing errors (#5560). Sometimes custom elements are used (e.g. id element inside author); previously the reader would halt with an error. Now it skips the element and issues an IgnoredElement warning.
    • Parse notes (#5493, Alexander Krotov).
    • Internal improvements (Alexander Krotov).
  • OpenDocument writer: Roll back automatic figure/table numbering (#5474). This was added in pandoc 2.7.2, but it makes it impossible to use pandoc-crossref. So this has been rolled back for now, until we find a good solution to make this behavior optional (or a creative way to let pandoc-crossref and this feature to coexist).

  • New module Text.Pandoc.Writers.Jira, exporting writeJira [API change] (Albert Krewinkel).

  • EPUB writer:

    • Don’t include ‘landmarks’ if there aren’t any. Previously we could get an empty ol element, which caused validation errors with epubcheck.
    • Ensure unique ids for styleesheets in content.opf (#5463).
    • Make stylesheet link compatible with kindlegen (#5466, Eric Schrijver). Pandoc omitted type="text/css" from both <style> and <rel="stylesheet"> elements in all templates, which is valid according to the spec. However, Amazon’s kindlegen software relies on this attribute on <link> elements when detecting stylesheets to include.
  • HTML writer:

    • Output video and audio elements depending on file extension of the image path (Mauro Bieg).
    • Emit empty alt tag in figures (#5518, Mauro Bieg). The same text is already in the and screen-readers would read it twice, see #4737.
    • Don’t add variation selector if it’s already there. This fixes round-trip failures.
    • Prevent gratuitious emojification on iOS (#5469). iOS chooses to render a number of Unicode entities, including ‘↩’, as big colorful emoji. This can be defeated by appending Unicode VARIATION SELECTOR-15’/‘VARIATION SELECTOR-16’. So we now append this character when escaping strings, for both ‘↩’ and ‘↔’. If other characters prove problematic, they can simply be added to needsVariationSelector.
    • Add class="heading" to level 7+ Headers rendered as <p> elements (#5457).
  • RST writer: treat Span with no attributes as transparent (#5446). Previously an Emph inside a Span was being treated as nested markup and ignored. With this patch, the Span is just ignored.

  • LaTeX writer:

    • Include inline code attributes with --listings (#5420).
    • Don’t produce columns environment unless beamer (#5485).
    • Fix footnote in image caption. Regression: the fix for #4683 broke this case.
    • Don’t highlight code in headings (#5574). This causes compilation errors.
    • Use \mbox to get proper behavior inside \sout (#5529).
  • EPUB writer: Fix document section assignments (#5546). For example, introduction should go in bodymatter, not frontmatter, and epigraph, conclusion, and afterward should go in bodymatter, not backmatter. For the full list of assignments, see the manual.

  • Markdown writer:

    • Add backslashes to avoid unwanted interpretation of definition list terms as other kinds of block (#554).
    • Ensure the code fence is long enough (#5519). Previously too few backticks were used when the code block contained an indented line of backticks. (Ditto tildes.)
    • Handle labels with integer names (Jesse Rosenthal, #5495). Previously if labels had integer names, it could produce a conflict with auto-labeled reference links. Now we test for a conflict and find the next available integer. This involves adding a new state variable stPrevRefs to keep track of refs used in other document parts when using --reference-location=block|section
  • Textile writer: fix closing tag for math output (Albert Krewinkel). Opening and closing tag for math output match now.

  • Org writer: always indent src blocks content by 2 spaces (#5440, Albert Krewinkel). Emacs always uses two spaces when indenting the content of src blocks, e.g., when exiting a C-c ' edit-buffer. Pandoc used to indent contents by the space-equivalent of one tab, but now always uses two spaces, too.

  • Asciidoc writer:

    • Use `+...+` form for inline code. The old `a__b__c` yields emphasis inside code in asciidoc. To get a pure literal code span, use `+a__b__c+`.
    • Use proper smart quotes with asciidoctor (#5487). Asciidoctor has a different format for smart quotes.
    • Use doubled ## when necessary for spans (#5566).
    • Ensure correct nesting of strong/emph (#5565): strong must be the outer element.
  • JATS writer:

    • Wrap elements with p when needed (#5570). The JATS spec restricts what elements can go inside fn and list-item. So we wrap other elements inside <p specific-use="wrapper"> when needed.
    • Properly handle footnotes (#5511) according to “best practice.” (Group them at the end in <fn-group> and use <xref> elements to link them.)
    • Fix citations with PMID so they validate (#5481). This includes an update to data/jats.csl.
    • Ensure validity of <pub-date> by parsing the date and extracting year, month, and day, as expected. Also add an iso-8601-date attribute automatically.
    • Don’t use <break> element for LineBreak. It is only allowed in a few special contexts, and not in <p> elements.
    • Don’t make <string-name> a child of <string>, which is illegal.
  • FB2 writer:

    • Do not wrap note references into <sup> and brackets (Alexander Krotov). Existing FB2 readers, such as FBReader, already display links with type=“note” as a superscript.
    • Use genre metadata field (#5478).
  • Muse writer: do not escape empty line after <br> (Alexander Krotov).

  • Add unicode code point in “Missing character” warning (#5538). If the character isn’t in the console font, the message is pretty useless, so we show the code point for anything non-ASCII.

  • Lua: add Version type to simplify comparisons (Albert Krewinkel). Version specifiers like PANDOC_VERSION and PANDOC_API_VERSION are turned into Version objects. The objects simplify version-appropriate comparisons while maintaining backward-compatibility. A function pandoc.types.Version is added as part of the newly introduced module pandoc.types, allowing users to create version objects in scripts.

  • pandoc lua module (Albert Krewinkel):

    • Fix deletion of nonexistent attributes (#5569).
    • Better tests for Attr and AttributeList.
  • pandoc.mediabag lua module (Albert Krewinkel):

    • Add function delete for deleting a single item.
    • Add function empty for removing all entries.
    • Add function items for iterating over mediabag.
  • Text.Pandoc.Class: Fix handling of file: URL scheme in downloadOrRead (#5517, Mauro Bieg). Previously file:/ URLs were handled wrongly and pandoc attempted to make HTTP requests, which failed.

  • Text.Pandoc.MIME: add mediaCategory [API change] (Mauro Bieg).

  • Text.Pandoc.Shared:

    • Add onlySimpleTableCells [API change] (Mauro Bieg) and use this to consolidate simple-table detection (#5524). This fixes an inconsistency in the HTML reader, which did not treat tables with <p> inside cells as simple.
    • metaToJSON: treat digits starting with 0 as a string, not a number (#5479). This fixes a regression in YAML metadata in pandoc 2.7.2.
  • Text.Pandoc.Logging: Add IgnoredElement constructor for LogMessage. SkippedConetnt doesn’t work for some XML-based readers which don’t have access to parsec source positions.

  • Text.Pandoc.Asciify: Add Turkish undotted-i (#5433, Mauro Bieg).

  • Improve output of Lua tests (#5499, Albert Krewinkel). This makes use of tasty-lua, a package to write tests in Lua and integrate the results into Tasty output. Test output becomes more informative: individual tests and test groups become visible in test output. Failures are reported with helpful error messages.

  • Lua: add pandoc.system module (#5468, Albert Krewinkel). The system Lua module provides utility functions to interact with the operating- and file system. E.g. print(pandoc.system.get_current_directory()) or

        pandoc.system.with_temporary_directory('tikz', function (dir)
          -- write and compile a TikZ file with pdflatex
        end)
  • LaTeX template: Add pdflang to hypersetup if lang is set (#5443).

  • beamer template: Fix using Beamer with geometry (#5505, Daniel Maslowski). Beamer already loads geometry, so we need to use the \geometry command to set geometry options.

  • EPUB2/3 templates: Move inline styles to default epub.css (#5466). NOTE: Those who use a custom CSS stylesheet with EPUB should add these lines:

    code{ white-space: pre-wrap; }
    span.smallcaps{ font-variant: small-caps; }
    span.underline{ text-decoration: underline; }
    q { quotes: "“" "”" "‘" "’"; }
    div.column{ display: inline-block; vertical-align: top; width: 50%; }
    
  • reveal.js template:

    • Updates for revealjs 3.8.0 (#5435, ebiim).
    • Remove reference to head.min.js (#5448, Winnie Hellmann). NOTE: users will need to update reveal.js to at least 3.8.0 for their presentations generated with this version of pandoc to work correctly.
  • Text.Pandoc.PDF:

    • Replace </> with literal / (#5451). We use forward-slash for a directory separator in tmpDir, even on Windows (because that’s what tex likes). So we should not put a backslash between the tmpDir and the filename on Windows. This is harmless enough in normal Windows setups, but it breaks on Cygwin. Thanks to @cc2x for noticing and diagnosing the problem.
    • Allow use of -output-directory in --pdf-engine-opt (#5462). This is currently possible with mklatex and -outdir, but was not yet possible with xelatex and -output-directory.
    • For PDF via ms/pdfroff, make TOC appear at beginning and in PDF bookmarks (#5553). Previously the TOC appeared at the end of the document, and was not bookmarked. To keep it at the end, add --pdf-engine-opt=--no-toc-relocation to your command line.
  • Fix broken links in documents (#5473, Shim Myeongseob). Also, use absolute links to pandoc.org when possible, so that the links can be followed by people viewing these documents on GitHub.

  • Improved sample lua tikz filter in lua-filters docs (#5445, Matthew Doty). There are three changes:

    • It only processes elements which begin with \begin{tikzpicture}
    • It uses pdf2svg instead of imagemagick to preserve fidelity
    • The images produced have transparent backgrounds
  • MANUAL.txt:

    • Add note about title-meta, author-meta, date-meta (#5486).
    • Fix typo (#5489, Christian Krause).
  • add test/tables.xwiki to git and pandoc.cabal (#5498, Mauro Bieg).

  • Disable missing-home-modules warning in stack.yaml. Otherwise stack ghci fails.

Don't miss a new pandoc release

NewReleases is sending notifications on new releases.