Skip to content

Releases: jgm/pandoc

pandoc 3.1.11.1

06 Jan 02:44
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Docx reader:

    • Fix HYPERLINK with only switch and no argument (#9246).
  • Org reader:

    • Parse caption and label for grid tables (#9279).
  • MediaWiki reader:

    • Handle multiline math in list items (#9293).
  • OPML writer:

    • Respect --wrap options & --columns in contents of notes (#9297).
  • ODT/OpenDocument writers:

    • Properly handle highlighting styles (#9287). These styles were going into an office:styles element in content.xml, but this is invalid. Instead they must go in styles.xml. The variable highlighting-styles no longer has any effect on the default opendocument template, and highlighting styles are not included in opendocument output.
  • Markdown writer:

    • Add table identifier at end of caption if present (#9279).
  • Text.Pandoc.PDF:

    • Expand list of environment variables to display in verbose output (#9303).
    • Ensure that we find all the LaTeX warnings requiring a rerun (#9284). This should fix a regression from 3.1.9 that led to incorrect alignments in tables (and possibly other issues).
  • Docx writer:

    • Ensure that pandoc’s output validates (Edwin Török, #9273, #9269, John MacFarlane, #9265, #9266, #9264).
    • Don’t emit empty table rows, which seem to cause problems for Word (#9224).
  • LaTeX writer:

    • Omit superfluous page locator label when used with --natbib or --biblatex (#9275). These will treat a bare number as a page locator, and they will be able to localize it. Note that the recognition of the locator label is locale-sensitive; if lang is de, then S. 33 is a page reference, and p. 33 is not!
  • Text.Pandoc.Chunks: Fine tune makeChunks (#9281).

    • Ensure that chunks not based on sections (those with the “preamble” class) get unique identifiers, by appending chunk number.
    • This will also ensure that they get unique path names when the path is generated from the identifier.
  • Default HTML5 template: remove html5shiv (and support for IE < 9).

  • Makefile:

    • Fix make quick-stack: j was expecting a number (Edwin Török).
    • Run built pandoc (instead of pandoc in path).
    • Add validate-epub target, using epubcheck to test the golden files.
    • Add validate-docx-golden-tests target.

pandoc 3.1.11

16 Dec 03:57
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Typst writer:

    • Emit ; after typst code, unless followed by space (#9252). Otherwise there’s the potential that the typst code will swallow up a following character.
  • Text.Pandoc.Logging:

    • Add MakePDFWarning constructor to LogMessage [API change].
    • Add MakePDFInfo constructor to LogMessage [API change].
  • Text.Pandoc.PDF:

    • LaTeX warnings are passed on to the user as warnings.
    • Use report with MakePDFWarning and MakePDFInfo to relay verbose information and warnings, instead of writing directly to stderr.
    • Parse logs to determine whether additional runs needed, instead of running a fixed number of times (#9255). (The number of times that was appropriate given pandoc’s default templates didn’t always work for custom templates, and thus pandoc 3.1.10’s change in the number of runs led to some regressions in PDF production.)
  • Makefile: in make prelease, add checks that pandoc-cli and pandoc have the same version, that pandoc-cli depends on this exact version of pandoc, that there is an entry for this version in the changelog, and that the version numbers in the generated man pages are correct.

  • Regenerate man pages with pandoc 3.1.10. This properly escapes hyphens and fixes version numbers in man pages for pandoc-server and pandoc-lua.

  • Depend on texmath 0.12.8.6. This omits unneeded lrs in typst math output.

  • Depend on typst 0.5. This allows the typst reader to support multiline strings, the version type, and the as keyword with import.

pandoc 3.1.10

13 Dec 02:15
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Link pandoc-cli version to pandoc version. Henceforth pandoc-cli’s version will be synchronized with pandoc’s, and pandoc-cli will depend on an exact pandoc version. This will avoid confusion by ensuring that cabal install pandoc-cli-X.Y.Z installs pandoc version X.Y.Z. It will make things more straightforward for upstream packagers (see #9232). This scheme does not follow the Haskell PVP, but that should cause no harm, because this package does not expose a library.

  • Add alerts markdown extension. This enables GitHub style markdown alerts as a commonmark extension. This extension is now default for gfm. It can’t be used with markdown, only with commonmark and variants.

  • Markdown reader:

    • Preserve newlines in math instead of changing to spaces. Otherwise we can get unwanted results if there’s a % comment (#9193).
    • Make attributes work with reference links (#9171).
  • HTML reader:

    • Improve handling of invalidly nested sublists (#9187, cf. #8150).
  • MediaWiki reader:

    • Allow attribute keys with hyphens (#9178).
  • ODT reader:

    • Support attr text:continue-numbering (#8979, Stephan Meijer).
  • Typst reader:

    • Allow references (e.g. @foo) to become citations if there is no corresponding label in the document.
    • Collapse adjacent cite elements.
    • Handle supplements in cite.
    • Change cite (only one key allowed, a label) (typst 0.9 breaking change).
    • Support quote element (typst 0.9).
  • LaTeX reader:

    • Handle otherlanguage environment and language-name environments like \begin{french}...\end{french} (#9202).
    • Fix theorem label parsing (#8872, Hikaru Ibayashi).
  • Docx reader:

    • Unwrap content of shaped textboxes (Stephan Meijer, #9214).
    • Improve handling of w:sym (#9220). We now look up symbols in symbol fonts using the table defined at Text.Pandoc.Readers.Docx.Symbols.
    • Add unexported module Text.Pandoc.Readers.Docx.Symbols. This gives us a table to use to resolve characters included in docx via w:sym element.
  • Man reader:

    • Properly handle .sp macro inside lists and block quotes (#9201).
  • LaTeX writer:

    • Fix bug with big footnotes inside emphasis (#8982, Hikaru Ibayashi).
    • Handle identifiers inside heading contents. \phantomsection can’t be used in this case, so we need \hypertarget (#9209).
  • LaTeX template:

    • Include bookmark package unconditionally. This package produces better PDF bookmarks than hyperref and does it on the first pass.
  • Typst writer:

    • Use quote for block quotes.
    • Support --toc-depth as in other writers (#9242).
    • Put inline image dimensions on enclosing box, not image (#9104).
    • Better handling of tables with captions (#9194). We now put these in a figure with a caption argument.
    • Update typst writer to typst 0.9 citation format (#9188).
  • Typst template:

    • Remove custom definition of blockquote in default template. (We now use built-in quote.)
    • Support table of contents.
    • Support csl (#9186, Ian Max Andolina). Typst now supports CSL for its native citation engine, so pandoc should use a specified csl style in the template, falling back to bibliographystyle if csl is not specified.
  • Docx writer:

    • Use different style for block quotes in notes (#9243). Using “Footnote Block Text” for the style name, so it can be given a different font size if footnotes are.
    • Allow embedded fonts to be used in reference.docx (#6728).
  • HTML5 writer:

    • To conform to validator’s expectations, doc-footnote role is used with aside and doc-endnotes with section.
    • aside is used only for notes at ends of sections or blocks; if all the notes come at the end of the document, section is used so we can have the doc-endnotes role.
  • JATS writer:

    • Handle case where there is material after refs div (#9166). Previously in such cases the references were not being moved to back matter.
  • Ms writer:

    • Don’t do normal escapes in filename arguments for PSPIC etc.
  • T.P.RoffChar: escape - as \-. The groff_man (7) man page indicates that - characters will be treated as typographic hyphens and are not appropriate for cases where the output should be copy-pasteable as an ASCII hyphen-minus character. (E.g. in command line options.) However, until a recent update groff man did not actually do this; it treated - and \- the same. With the new update (1.23.0) the two are distinguished (see https://lwn.net/Articles/947941/ for background), so now it is important that pandoc escape -.

  • Text.Pandoc.Extension: add Ext_alerts constructor [API change].

  • Text.Pandoc.PDF: We now default to running LaTeX only once in producing a PDF (instead of twice). This is made possible by the shift to the bookmark package, which does not require a second pass for PDF bookmarks. If a table of contents is present, we still have to run three times to get the page numbers, and if beamer is used we still do a minimum of two runs.

  • Text.Pandoc.Shared:

    • renderTags': use minimized tag for rect.
    • Allow svg path element to be minimized.
    • Export combineAttr [API change].
    • Improve isTightList so that it recognizes an item containing only a list which is itself tight as potentially an item in a tight list (#9161).
  • Text.Pandoc.MIME: Ensure we use .svg not .svgz as extension for image/svg+xml mime type. This fixes issues with embedded SVG images in docx output, among other things (#9195).

  • Text.Pandoc.Class: openURL improvements for data uris. Only treat data URI as base64 if ‘;base64’ is specified. Otherwise treat as UTF-8 (not 100% reliable but should cover most other cases). Strip off ;base64 (or ;charset=... or whatever) from mime type (#9195).

  • Text.Pandoc.SelfContained: Improve treatment of embedded SVGs (#9206, #8948).

    • Ensure unique ids for elements by prefixing SVG id.
    • Ensure SVG id attribute except when use element is used.
    • Remove width, height attributes from svg element when use element is used. Instead, add width and height 100% to the use element. This seems to get the sizing right.
  • Text.Pandoc.Citeproc: Don’t link citations if suppress-bibliography specified, for there will be nothing to link to (#9163).

  • epub.css: add styling for sup and sub (#9160).

  • Switch from base64 to base64-bytestring (#9233).

  • Use newest versions of commonmark, commonmark-extensions, commonmark-pandoc, texmath, typst, skylighting, skylighting-core.

  • Benchmark: use standalone documents for reader tests. Otherwise typst reader benchmark fails. Note: this means that we are now parsing longer documents, so bench results on readers won’t be comparable to before.

  • MANUAL.txt: update defaults file docs for bibliography fields (#9173). Recommend using top-level bibliography csl, etc. instead of a nested metadata field. Reason: ${USERDATA} and ${HOME} are only expanded in these contexts, not in metadata.

  • Move man pages to pandoc-cli package (#9245).

pandoc 3.1.9

28 Oct 01:11
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Make reference-section-title work with jats+element_citations (#9021).

  • Add bits as synonym of jats as input format.

  • JATS reader:

    • Modify JATS reader to handle BITS too (#9138, Julia Diaz). Add provision for title-group, book, book-part-wrapper, book-meta, book-part-meta, book-title, book-title-group, index, toc, legend, title, collection-meta
    • Fix handling of alt-text (#9130, Julia Diaz). Previously we were looking for an attribute that doesn’t exist in JATS; alt-text is provided by a child element.
  • CommonMark reader:

    • Handle Ext_tex_math_gfm (#9121). Parse GFM-specific math constructions when tex_math_gfm enabled.
  • DokuWiki reader:

    • Allow autolinks to be avoided using e.g. https:%%//%%... (#9153).
    • Parse <code> and <file> as block-level code (#9154). Previously we treated them as inline code in some contexts, but that is not how DokuWiki works.
  • LaTeX reader:

    • Better handle spacing commands \hfill, \vfill, \hskip, \vskip, etc. (#9150).
    • Fix incorrect abbreviation for astronomical unit (#9125, Michael McClurg).
  • Markdown reader:

    • Fix blindspot with superscript in links (#8981). Previously [^super^](#ref) wasn’t parsed as a link, due to code that was meant to prevent footnote markers from being recognized as reference links. This commit tightens up that code to avoid this bad effect. We have also added a new restriction on footnote labels: they cannot contain the characters ^, [, or ]. Though this is technically a breaking change, we suspect that the impact will be minimal, as it’s very unlikely people would be using these characters in their note labels.
    • Don’t apply --default-image-extension to data URIs (#9118).
    • More accurate check that a normalCite is not a link, bracketed span, or reference (#9080).
  • HTML reader:

    • Allow th to close td and vice versa (#9090).
    • Parse task lists using input elements (#9047, Seth Speaks).
  • Creole reader:

    • Handle empty cells correctly (#9141, Sascha Wilde).
  • Org writer:

    • Escape literal *, |, # at beginning of line with ZWS (#9159).
  • ICML writer:

    • Prevent doubled attributes (#9158).
  • Powerpoint writer:

    • Fix a corruption error caused when the document used both a regular png and a png in a data URI (#9113). (Similarly for any other image format.) The problem was that duplicate entries in [Content Types].xml were being created, one for the mime type image/png, one for image/png;base64.
  • LaTeX writer:

    • Fix rowspans in tables so they use the width of the column (= as the width parameter) (#9140).
    • Don’t treat table as “simple” if they have col widths. This should help fix a problem wherein some grid tables with colspans were overly wide (#9140).
    • Fix uneven indents in line block output (#9088).
  • JATS writer: fix 3.1.4 regression in handling block-level metadata (#9092).

  • Ms writer: improvements in image handling (#4475).

    • PDFPIC is now used for PDF images in figures.
    • Inline images that are postscript or PDF are rendered using PSPIC or PDFPIC. This isn’t ideal, because they will still be rendered as if in a separate paragraph, but it’s probably better than just printing the image name.
    • Units are included in height.
  • HTML writer:

    • If raw format is an HTML side deck format, emit it (James J Balamuta).
  • Typst writer:

    • Add #box around image to make it inline. (#9104) An #image by itself in typst is a block-level element. To force images to be inline (as they are in pandoc), we need to add a box with an explicit width. When a width is not given in image attributes, we compute one from the image itself, when possible.
    • Don’t allow long heading to wrap (#9132).
    • Escape ( (#9137). If unescaped ( occurs in certain contexts, it can be parsed as function application.
  • Man writer:

    • Fix some spacing issues around links (#9120). We need to use \c before a .UR or .MT, to avoid an extra space, and also after. To ensure that a space at the beginning of the following line doesn’t get swallowed up, we escape it with \.
    • Use UR, MT macros for URLs, emails (#9120).
  • Text.Pandoc.Extensions:

    • Add Ext_tex_math_gfm constructor to Extension (#9121). [API change]. This handles two GitHub-specific syntaxes for math. This is now default for gfm, in addition to tex_math_dollars.
    • Remove duplicates for Ext_raw_html and Ext_pipe_tables in some of the lists (Tim Stewart).
  • Text.Pandoc.Metadata: Add helpful message on some metadata YAML errors (#9155).

  • Text.Pandoc.Shared:

    • splitSentences: don’t split after initials. This improves the man and ms writer output, preventing sentence breaks after initials.
    • Add addPandocAttributes function [API change]. This is meant to simplify addition of attributes to Pandoc elements: for elements that don’t have a slot for attributes, an enclosing Div or Span is added to hold the attributes.
  • MANUAL.txt:

    • Clarify that formatting can’t cross line boundaries in line blocks (#9119).
    • Fix legacy option for citation (#8737, 3w36zj6)
  • Update et translations (priiduonu).

  • Updated no translations (Stephan Daus). Renamed no.yaml (macrolanguage Norwegian) to nb.yaml (Norwegian Bokmål). Created soft symbolic link from no.yaml pointing to nb.yaml.

  • Lua subsystem: Use the newest LPeg version (lpeg-1.1.*) (#9107, Albert Krewinkel).

  • Default epub.css: Apply style to h6, format styles, and combine identical styles under shared selectors (samuel-weinhardt).

  • Update nix flake with dependencies (piq9117).

  • LaTeX template: fix \CSLBlock vertical space (John Purnell).

  • Allow tasty 1.5 and Diff 0.5.

  • Require commonmark-extensions 0.2.4, commonmark 0.2.4.

  • Require texmath 0.12.8.4. This should improve math in powerpoint, fixing empty boxes around roots in some cases.

  • Require typst 0.3.2.1

pandoc 3.1.8

09 Sep 18:29
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • JATS reader:

    • Ignore <processing-meta> element (#9057, Julia Diaz).
    • Fix conversion of date to ISO 8601 format (#8865).
  • LaTeX template:

    • Add code allow \cite to break across lines (#9050).
    • Fix regression with CSL display="block" (#7363). This restores the line break before the block.
    • Rewrite CSLReferences environment to avoid depending on enumitem, which plays badly with beamer. Instead we use a regular list environment. Thanks to @jpcirrus for the concept (#9053).
    • Restore the pre-3.1.7 format of the CSLReferences environment, which again has two parameters. The first determines whether a hanging indent is used (1 = yes, 0 = no), and the second is the entry line spacing (0 = none).
    • Add a strut to avoid inconsistencies in spacing (#9058).
    • Remove a break at the end of CSLRightInline to avoid inconsistencies in spacing. It shouldn’t be necessary because the paragraph should extend to the right margin (#9058).
  • LaTeX writer:

    • Fix regression with figure labels (#9045). In 3.1.7, pandoc added two labels to LaTeX figure environments, one with a phantomsection.
    • Fix default citeproc entry-spacing. According to the CSL manual, the default entry spacing is 1. We were treating it as 0 (#9058).
  • HTML writer:

    • Use the ID prefix in the ID for the footnotes section (#9044, Benjamin Esham).
    • Fix CSL entry-spacing default (#9058).
  • Text.Pandoc.Citeproc: always include an entry-spacing attribute in the Div if the bibliography element contains an entry-spacing attribute (previously we omitted it when it was 0) (#9058).

  • Clean up pandoc’s own man pages by regenerating with pandoc 3.1.7.

  • pandoc-lua-engine: bump lower bound for pandoc (#9046).

  • Depend on texmath 0.12.8.2, fixing binom in typst writer (#9063).

pandoc 3.1.7

31 Aug 20:15
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Org reader:

    • Don’t parse alphabetical lists unless the fancy_lists extension is enabled (#9042).
    • Allow escaping commas in macro arguments (Amneesh Singh).
  • JATS reader:

    • Support for <permissions> metadata (#9037, Julia Diaz). metadata objects with multiple fields are created, matching the structure in JATS.
    • Correct name of JATS element attrib.
  • Markdown reader:

    • Support images with wikilink syntax, e.g. ![[foo|bar]], when one of the wikilinks extension is enabled (#8853).
    • Allow a citation or reference link to be parsed after a ! (#8254).
    • Fix dropped ! before nonexistent reference (#9038).
  • LaTeX writer:

    • Fix regression in escaping URLs (#9043).
    • Use \cite and \bibitem to link up citations, even with citeproc. (#9031). This will give us better accessibility; when tagging is enabled, the citation can be linked to the bibliography entry. This changes some of the details of the layout and the default template. We now make CSLReferences a special enumitem list that will contain \bibitems. Internal links inside citations to ids beginning in ref- are creating using \cite instead of \hyperref.
    • Use \phantomsection and \label instead of \hypertarget (#9022).
    • Use \hyperref for LaTeX internal links, \hyperlink for beamer (since \hyperref doesn’t seem to work) (#9022).
    • Backslash-escape % and # in URLs (#9014).
  • JATS writer:

    • Fix placement of ref-list when no title is specified for the reference section (#9017). (In this case we place it in back with an empty title.)
  • Man writer:

    • Avoid a .PP right after a section heading (#9020). This is at best a no-op (in groff man and mandoc) and at worst (in some formatters) may create extra whitespace.
    • We revert the fanciness introduced in #7506, which employs a custom font name V and a macro that makes this act like boldface in a terminal and monospace in other formats. Unfortunately, this code uses a mechanism that is not portable (and does not work in mandoc) (#9020).
    • Instead of using V for inline code, we simply use CR. Note that \f[CR] is emitted instead of plain \f[C], because there is no C font in man. (This produces warnings in recent versions of groff, #9020.)
    • For code blocks, we now use the .EX and .EE macros, together with .IP for spacing and indentation. This gives more standard code that can be better interpreted e.g. by mandoc (#9020).
  • Man template: don’t emit .hy, regardless of setting of hyphenate variable (#9020).

  • LaTeX template: special redefinition of \st for CJK (#9019). soul’s version raises on error on CJK text.

  • Use latest skylighting-format-blaze-html (#7248). This works around a longstanding iOS Safari bug that caused long lines to be displayed in a different font size in highlighted code.

  • Allow skylighting 0.14 (and require it in pandoc core).

  • Allow text 2.1.

pandoc 3.1.6.2

22 Aug 23:49
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Org reader: allow example lines to end immediately after the colon (Brian Leung).

  • Docx reader:

    • Omit “Table NN” from caption (#9002).
    • Avoid spurious block quotes in list items (#8836).
  • JATS reader: Fix display of block elements (#8889, Julia Diaz). A number of block elements, like disp-quote, list, and disp-formula, were always treated as inlines if appearing inside paragraphs, even if their usage granted a separate block.

  • HTML reader: avoid duplicate id on header and div (#8991).

  • Typst writer:

    • Use ~ for nonbreaking space, and escape literal ~ (#9010).
    • Put the label in right place for Div, use #block (#8991). Previously we were putting the label at the beginning of the Div’s contents, but according to the documentation such a label gets attached to the preceding element. We now use an explicit #block and add the label at the end.
  • LaTeX writer:

    • Improve escaping of URIs in href, url (#8992).
    • Improve internal links and targets (#8744). We no longer wrap section headings in a \hypertarget. This is unnecessary (hyperref creates an anchor based on the label) and it interferes with tagging. In addition, we now use \hyperref rather than \hyperlink for internal links. Currently \hypertarget is still being used for link anchors not on headings. Thanks to @u-fischer.
  • HTML format templates (style.html): Fix typo in clause for svg (Jackson Schuster).

  • Use lastest texmath, typst-symbols, typst. Targets typst 0.7.

pandoc 3.1.6.1

07 Aug 02:20
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • HTML reader: properly calculate RowHeadColumns (#8984). This fixes a bug in the calculation of the number of header columns in table row. It also changes the algorithm for determining the table body’s RowHeadColumns based on the numbers of head columns in each row. Previously we used the max, and #8634 switched to the min, which led to bad results. Now we only set RowHeadColumns to a non-zero value if all rows have the same number of head columns.

  • OpenDocument writer:

    • Implement syntax highlighting for inline and block code (#6710).
    • Support highlighted text in ODT/OpenDocument writers for Span with class mark (#8960). The color can be adjusted by modifying the Highlighted style.
  • Typst writer: escape // so it doesn’t get interpreted as a comment (#8966).

  • ChunkedHTML writer: Fix regression including MathJax script (#8967). The fix for #8620 caused the script to be included when the table of contents but not the body text of a page contains math. But it broke the case where the table of contents doesn’t contain math but the page does. This patch fixes the issue.

  • Text.Pandoc.SelfContained:

    • Retain attributes in SVG tag when referring to another SVG’s content using <use> (#8969).
    • Allow units in width and height for SVG. Units are optional but allowed.
    • Don’t coerce calculated SVG dimensions to Int.
    • fix calculation of SVG width and height. We were computing width and height from viewBox incorrectly (#8969).
    • Add clause for SVG to default CSS for HTML (#8969).
    • Ensure that width and height attributes don’t get specified twice is both the img tag and the svg include them (#8965).
    • Omit unnecessary attributes xmlns, xmlns:xlink, and version on SVG element (#8965).
    • Use 20 character rather than 40 character hashes for generated IDs (#8965).
  • Use pandoc-types 1.23.1. This fixes a regression with toJSONFilter (#8976), which in 1.23.0.1 no longer worked on pure values of type a -> [a].

  • Use ghc 9.6 for release builds (#8947).

  • Fix some links in FAQs (Diogo Almiro).

pandoc 3.1.6

21 Jul 15:39
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Fix new variant of the vulnerability in CVE-2023-35936. Guilhem Moulin noticed that the fix to CVE-2023-35936 was incomplete. An attacker could get around it by double-encoding the malicious extension to create or override arbitrary files.

  • --embed-resources: Use inline SVG instead of data uris for SVG images in HTML5 (#8948). Note that SelfContained does not have access to the writer name, so we check for HTML5 by determining whether the document starts with <DOCTYPE! html>. This means that inline SVG won’t be used when generating document fragments.

  • Fix regression on short boolean arguments (#8956). In 3.1.5 boolean arguments were allowed an optional argument (true|false). This created a regression for uses of fused short arguments, e.g. -somyfile.html, which was equivalent to -s -omyfile.html, but now raised an error because pandoc attempted to parse o as a boolean true or false. This change allows the fused short arguments to be used again. Note that -strue will be interpreted as -s with an argument true, not as -s -t -rue. It is best to use long option names with the optional boolean values, to avoid confusion.

  • Make --epub-title-page’s argument optional. It takes a boolean argument, and now that all of our boolean flags take such an argument, we can make this one optional for consistency.

  • Improve errors for illegal output formats. Previously if you did pandoc -s -t bbb, it would give you an error about the missing bbb template instead of saying that bbb is not a supported output format.

  • Improve errors for incorrect command-line option values (#8879). Always give the name of the relevant argument.

  • Fix typo on error message for incorrect --preserve-tabs argument. Thanks @fsoedjede

  • Docx reader: use SVG version of image if present (#7244). Previously the backup PNG was exported even if an SVG was present, but the SVG should be preferred.

  • Typst reader: fix regression in recognition of display math (#8949). The last release caused all math to be parsed as inline math.

  • JATS writer: don’t use <code> for inline code (#8889). It is intended for block-level code.

  • HTML writer: don’t make line blocks sensitive to --wrap (#8952).

  • RST writer: fix figure handling (#8930, #8871). This fixes a number of regressions from pandoc 2.x. Properly handle caption, alt attribute in figures. No longer treat a paragraph with a single image in it as a figure (we have a dedicated Figure element now).

  • Docx writer: Copy “mirror margins” property from reference.docx (#8946).

  • Text.Pandoc.UTF8: Deprecate decodeArg which is now a no-op. This was needed for old base versions which we no longer support.

  • Use released skylighting, typst.

  • Allow latest commonmark-extensions. This allows entities in wikilinks.

  • Switch back to using ghc 9.2 for linux and Windows binary releases (#8947, #8955). With ghc 9.4+, we were getting AVX instructions in the amd64 binary, which aren’t supported on older hardware. For maximum compatibility we switch back to ghc 9.2, which doesn’t cause the problem. (As documented, ghc should not be emiting these instructions, so we aren’t clear on the diagnosis, but the cure has been tested.)

  • Change Windows release build to use cabal instead of stack.

pandoc 3.1.5

07 Jul 16:38
@jgm jgm
Compare
Choose a tag to compare
Click to expand changelog
  • Allow all boolean flags to take an optional true or false value (#8788, Sam S. Almahri). The default is true if no value is specified, so this is fully backwards-compatible.

  • Support --id-prefix for markdown output (#8878)

  • Markdown reader:

    • Add strictness annotations to fix a memory leak (#8762).
  • Typst reader:

    • Use typst-hs 0.3.0.0, which is more robust, fixes many bugs, and targets typst 0.6.
    • Package loading is now supported, as long as the package has been cached or is local.
    • Rewrite Typst reader in a way that makes it easier to extend.
    • Filter out CR in raw.
    • Handle block content for link element.
    • Handle block-level content in text element.
    • Handle style, align, place in inline contexts too.
    • Improve info message for skipped elements.
  • Add typst reader tests (#8942).

  • MediaWiki reader:

    • Revise treatment of “link trail.” Previously we only included ASCII letters. That is correct for English but not for, e.g., Spanish (see comment in #8525). A safer approach is to include all letters except those in the CJK unified ideograph ranges.
  • AsciiDoc writer:

    • Make modern AsciiDoc the target for asciidoc (#8936). The AsciiDoc community now regards the dialect parsed by asciidoctor as the official AsciiDoc syntax, so it should be the target of our asciidoc format. The asciidoc output format now behaves like asciidoctor used to. asciidoctor is a deprecated synonynm. For the old asciidoc behavior (targeting the Python script), use asciidoc_legacy. The templates have been consolidated. Instead of separate default.asciidoctor and default.asciidoc templates, there is just default.asciidoc.
    • Text.Pandoc.Writers.AsciiDoc API changes:
      • writeAsciiDoc now behaves like writeAsciiDoctor used to.
      • writeAsciiDoctor is now a deprecated synonym for writeAsciiDoc.
      • New exported function writeAsciiDocLegacy behaves like writeAsciDoc used to.
    • Update line-through for asciidoc writer to custom inline style (#8933, Kevin Broch).
  • Typst writer:

    • Support unlisted class in headings (#8941).
    • Consolidate bibliography files into one #bibliography command (#8937).
    • Improve handling of autolinks (#8931).
  • Docx writer:

    • Make relative widths work in tables. This didn’t work before because we were missing an attribute that tells Word to used fixed widths rather than computing optimal ones.
  • DokuWiki writer: fix lists with Div elements (#8920). The DokuWiki writer doesn’t render Divs specially, so their presence in a list (e.g. because of custom-styles) need not prevent a regular DokuWiki list from being used. (Falling back to raw HTML in this case is pointless because no new information is given.)

  • LaTeX writer:

    • Fix babel name for fa (should be persian).
    • Prevent babel language from being imported twice (#8925).
  • Text.Pandoc.Class:

    • Add toTextM [API change]. This is like Text.Pandoc.UTF8.toText, except:

      • it takes a file path as first argument, in addition to bytestring contents
      • it raises an informative error with source position if the contents are not UTF8-encoded

    This replaces utf8ToText whenever we have the filename and are in a PandocMonad instance. This will lead to more informative error messages for UTF8-encoding, indicating the file path and byte offset where the error occurs (#8884).

  • Remove invalid term “Subject” from Turkish translations (#8921).

  • stack.yaml: add pkg-config to nix packages (#8927, pacien).

  • Allow aeson 2.2.

  • MANUAL: Add clarification on –section-divs. Closes #8882.