GPL-2.0-or-later licensed and maintained by John MacFarlane
This version can be pinned in stack with:pandoc-3.8.3@sha256:b1cf21a9ddd419b12bbde2ae372482fa5bfa667f2198433053ba7e23145c51bd,41792

Module documentation for 3.8.3

  • Text
    • Text.Pandoc
      • Text.Pandoc.App
      • Text.Pandoc.Asciify
      • Text.Pandoc.Chunks
      • Text.Pandoc.Citeproc
      • Text.Pandoc.Class
        • Text.Pandoc.Class.IO
      • Text.Pandoc.Data
      • Text.Pandoc.Emoji
      • Text.Pandoc.Error
      • Text.Pandoc.Extensions
      • Text.Pandoc.Filter
      • Text.Pandoc.Format
      • Text.Pandoc.Highlighting
      • Text.Pandoc.ImageSize
      • Text.Pandoc.Logging
      • Text.Pandoc.MIME
      • Text.Pandoc.MediaBag
      • Text.Pandoc.Options
      • Text.Pandoc.PDF
      • Text.Pandoc.Parsing
      • Text.Pandoc.Process
      • Text.Pandoc.Readers
        • Text.Pandoc.Readers.AsciiDoc
        • Text.Pandoc.Readers.BibTeX
        • Text.Pandoc.Readers.CSV
        • Text.Pandoc.Readers.CommonMark
        • Text.Pandoc.Readers.Creole
        • Text.Pandoc.Readers.CslJson
        • Text.Pandoc.Readers.Djot
        • Text.Pandoc.Readers.DocBook
        • Text.Pandoc.Readers.Docx
        • Text.Pandoc.Readers.DokuWiki
        • Text.Pandoc.Readers.EPUB
        • Text.Pandoc.Readers.EndNote
        • Text.Pandoc.Readers.FB2
        • Text.Pandoc.Readers.HTML
        • Text.Pandoc.Readers.Haddock
        • Text.Pandoc.Readers.Ipynb
        • Text.Pandoc.Readers.JATS
        • Text.Pandoc.Readers.Jira
        • Text.Pandoc.Readers.LaTeX
        • Text.Pandoc.Readers.Man
        • Text.Pandoc.Readers.Markdown
        • Text.Pandoc.Readers.Mdoc
        • Text.Pandoc.Readers.MediaWiki
        • Text.Pandoc.Readers.Muse
        • Text.Pandoc.Readers.Native
        • Text.Pandoc.Readers.ODT
        • Text.Pandoc.Readers.OPML
        • Text.Pandoc.Readers.Org
        • Text.Pandoc.Readers.Pod
        • Text.Pandoc.Readers.Pptx
        • Text.Pandoc.Readers.RIS
        • Text.Pandoc.Readers.RST
        • Text.Pandoc.Readers.RTF
        • Text.Pandoc.Readers.TWiki
        • Text.Pandoc.Readers.Textile
        • Text.Pandoc.Readers.TikiWiki
        • Text.Pandoc.Readers.Txt2Tags
        • Text.Pandoc.Readers.Typst
        • Text.Pandoc.Readers.Vimwiki
        • Text.Pandoc.Readers.Xlsx
      • Text.Pandoc.Scripting
      • Text.Pandoc.SelfContained
      • Text.Pandoc.Shared
      • Text.Pandoc.Slides
      • Text.Pandoc.Sources
      • Text.Pandoc.Templates
      • Text.Pandoc.Transforms
      • Text.Pandoc.Translations
        • Text.Pandoc.Translations.Types
      • Text.Pandoc.UTF8
      • Text.Pandoc.Version
      • Text.Pandoc.Writers
        • Text.Pandoc.Writers.ANSI
        • Text.Pandoc.Writers.AnnotatedTable
        • Text.Pandoc.Writers.AsciiDoc
        • Text.Pandoc.Writers.BBCode
        • Text.Pandoc.Writers.BibTeX
        • Text.Pandoc.Writers.ChunkedHTML
        • Text.Pandoc.Writers.CommonMark
        • Text.Pandoc.Writers.ConTeXt
        • Text.Pandoc.Writers.CslJson
        • Text.Pandoc.Writers.Djot
        • Text.Pandoc.Writers.DocBook
        • Text.Pandoc.Writers.Docx
        • Text.Pandoc.Writers.DokuWiki
        • Text.Pandoc.Writers.EPUB
        • Text.Pandoc.Writers.FB2
        • Text.Pandoc.Writers.HTML
        • Text.Pandoc.Writers.Haddock
        • Text.Pandoc.Writers.ICML
        • Text.Pandoc.Writers.Ipynb
        • Text.Pandoc.Writers.JATS
        • Text.Pandoc.Writers.Jira
        • Text.Pandoc.Writers.LaTeX
        • Text.Pandoc.Writers.Man
        • Text.Pandoc.Writers.Markdown
        • Text.Pandoc.Writers.Math
        • Text.Pandoc.Writers.MediaWiki
        • Text.Pandoc.Writers.Ms
        • Text.Pandoc.Writers.Muse
        • Text.Pandoc.Writers.Native
        • Text.Pandoc.Writers.ODT
        • Text.Pandoc.Writers.OOXML
        • Text.Pandoc.Writers.OPML
        • Text.Pandoc.Writers.OpenDocument
        • Text.Pandoc.Writers.Org
        • Text.Pandoc.Writers.Powerpoint
        • Text.Pandoc.Writers.RST
        • Text.Pandoc.Writers.RTF
        • Text.Pandoc.Writers.Shared
        • Text.Pandoc.Writers.TEI
        • Text.Pandoc.Writers.Texinfo
        • Text.Pandoc.Writers.Textile
        • Text.Pandoc.Writers.Typst
        • Text.Pandoc.Writers.Vimdoc
        • Text.Pandoc.Writers.XML
        • Text.Pandoc.Writers.XWiki
        • Text.Pandoc.Writers.ZimWiki
      • Text.Pandoc.XML

Pandoc

github release hackage release homebrew stackage LTS package CI tests license pandoc-discuss on google groups

The universal markup converter

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library.

It can convert from

It can convert to

Pandoc can also produce PDF output via LaTeX, Groff ms, or HTML.

Pandoc’s enhanced version of Markdown includes syntax for tables, definition lists, metadata blocks, footnotes, citations, math, and much more. See the User’s Manual below under Pandoc’s Markdown.

Pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document (an abstract syntax tree or AST), and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. Users can also run custom pandoc filters to modify the intermediate AST (see the documentation for filters and Lua filters).

Because pandoc’s intermediate representation of a document is less expressive than many of the formats it converts between, one should not expect perfect conversions between every format and every other. Pandoc attempts to preserve the structural elements of a document, but not formatting details such as margin size. And some document elements, such as complex tables, may not fit into pandoc’s simple document model. While conversions from pandoc’s Markdown to all formats aspire to be perfect, conversions from formats more expressive than pandoc’s Markdown can be expected to be lossy.

Installing

Here’s how to install pandoc.

Documentation

Pandoc’s website contains a full User’s Guide. It is also available here as pandoc-flavored Markdown. The website also contains some examples of the use of pandoc and a limited online demo.

Contributing

Pull requests, bug reports, and feature requests are welcome. Please make sure to read the contributor guidelines before opening a new issue.

License

© 2006-2024 John MacFarlane ([email protected]). Released under the GPL, version 2 or greater. This software carries no warranty of any kind. (See COPYRIGHT for full copyright and warranty notices.)

Changes

Revision history for pandoc

pandoc 3.8.3 (2025-12-01)

  • Add asciidoc as an input format (#1456).

  • Add xlsx (Microsoft Excel) as an input format (Anton Antich). Each worksheet turns into a section containing a table.

  • Add pptx (PowerPoint) as new input format (Anton Antich).

  • Add bbcode as a new output format (#11242, reptee). Several variants of BBCode are also supported: bbcode_fluxbb (FluxBB), bbcode_phpbb (phpBB), bbcode_steam (Hubzilla), bbcode_hubzilla (Hubzilla), and bbcode_xenforo (xenForo).

  • New exported module Text.Pandoc.Readers.AsciiDoc, exporting readAsciiDoc [API change].

  • New module Text.Pandoc.Readers.Pptx, exporting readPptx (Anton Antich) [API change].

  • New module Text.Pandoc.Readers.Xlsx, exporting readXlsx (Anton Antich) [API change].

  • LaTeX reader:

    • Revert \linebreak as LineBreak (#11272). \linebreak is more of a hint, it shouldn’t produce a hard break.
    • Better handling of \makeatletter in parsing raw LaTeX (#11270).
    • Fix spurious paragraph breaks in math environments (#11265, Emmanuel Ferdman). Previously, a math environment with extra space before the \end would get rendered with a blank line, which LaTeX treats as a paragraph break.
    • Change type on rawLaTeXParser in Text.Pandoc.LaTeX.Parsing. The preparser doesn’t need to return a value.
    • Fix rawTeXParser (#11253). Make macro expansion in raw LaTeX depend on the setting of the latex_macros extension. Previously macros were always expanded, even in raw TeX in markdown. In addition, there was previously a bug that caused content to be garbled in certain cases.
    • Handle ifstrequal at a lower level, like the other if commands (#11253).
    • Move ifstrequal, iftoggle, etc., which were misplaced in environments, to blockCommands, so these commands work properly.
  • Docx reader:

    • Handle REF link instruction (#11296, Ezwal).
    • Check recursively for caption styles (Albert Krewinkel). The docx reader uses caption styles to identify figures and captioned tables. It now checks for known caption styles in the full styles hierarchy of a paragraph instead of just checking the style directly. This allows to recognize caption styles that are built on top of the basic caption style, as is sometimes the case in sophisticated styles.
  • Markdown reader:

    • Fix performance issue in links with ' (#10880).
  • Typst reader:

    • Handle document metadata and #title (jgm/typst-hs#80). Note that previously, the typst reader never returned document metadata. Now it does, even if the typst document does not contain a #title function that would result in actually printing the title block.
  • Djot reader:

    • Add Space elements (#11250). Previously we just got big Str elements with spaces included. But many pandoc writers assume that breakable spaces will be Space elements, and this is also required for automatic wrapping.
  • RST reader:

    • Correctly handle intraword emphasis (#11309).
  • Text.Pandoc.Readers:

    • Export readAsciiDoc, readXlsx, readPptx [API change].
  • New module Text.Pandoc.Writers.BBCode, exporting writeBBCode, writeBBCodeSteam, writeBBCodeFluxBB, writeBBCodePhpBB, writeBBCodeHubzilla, writeBBCodeXenforo [API change].

  • LaTeX writer:

    • Make level 1-3 headings work inside blockquotes (#11281, James Barlow).
    • Remove split from list of math environments (#11274).
    • Improve handling of math environments in tex math (#11266).
  • HTML writer:

    • Add reveal.js scroll and scrollSnap options to writer and template (#10052, Asliddinbek Azizovich).
    • Use ‘defer’ when including mathjax script, as recommended in MathJax docs (#11292).
  • ANSI writer:

    • Apply row spans in tables (#10149, Tuong Nguyen Manh). The ANSI writer is now able to keep track of row spans and apply them in rows.
  • Pptx writer:

    • Handle reference doc without slides (#7536, Tuong Nguyen Manh).
  • AsciiDoc writer:

    • Add more table features (#11267, Tuong Nguyen Manh): Row span and column span, footer row, individual horizontal cell alignment.
  • Typst template:

    • Fix font for compatibility with typst 0.14, which doesn’t permit an empty array for font (#11238).
    • Re-add columns to typst template (#11259), fixing a pandoc 3.8 regression.
    • Fix syntax for bibliography inclusion (#11233, Mickaël Canouil). Previously the syntax was wrong when multiple bibliography files were specified. Typst expects an array.
  • Text.Pandoc.Writers:

    • Export writeBBCode, writeBBCodeSteam, writeBBCodeFluxBB, writeBBCodePhpBB, writeBBCodeHubzilla, writeBBCodeXenforo [API change].
  • Text.Pandoc.Writers.Shared:

    • Add functions insertCurrentSpansAtColumn, takePreviousSpansAtColumn and decrementTrailingRowSpans for applying and keeping track of RowSpans over multiple rows (#10149, Tuong Nguyen Manh). [API change]
  • Text.Pandoc.Logging:

    • Change message for missing HTML title warning (#11307). Suggest setting the pagetitle variable instead of setting title in metadata.
  • Lua subsystem:

    • Preserve common state of custom Lua readers (Albert Krewinkel). The common state is transferred to Lua when calling a custom Lua reader, and is now also transferred back after the reader has finished. This ensures that info messages, warnings, and mediabag entries are available to the main program and all subsequent processing steps.
  • Text.Pandoc.PDF:

    • Avoid converting SVG to PDF when non-TeX PDF engine is used (#11275). This fixes a 3.8 regression, which caused documents with SVGs to raise an error when converted to PDF using WeasyPrint.
    • Fix a 3.8 regression with typst and smart quotes (#11256). Before 3.8, the default behavior when producing a PDF -t typst was to produce smart quotes according to typst’s defaults. (This could be defeated by specifying -t typst-smart.) This behavior broke in 3.8 because of a change to Text.Pandoc.PDF. This change caused smart to be disabled for all formats when producing PDFs, when before it was only disable for TeX-based formats (to avoid bad ligatures). This commit restores the old behavior. Possibly the regression also other affects other non-TeX formats, e.g. HTML.
  • Text.Pandoc.Shared:

    • Add functions allRowsEmpty and tableBodiesToRows from the RST writer for reuse in other writers. (Tuong Nguyen Manh) [API change].
  • Text.Pandoc.Citeproc:

    • Allow formatting in locator to be transmitted to citeproc. We do this indirectly, by rendering the formatting using the HTML tags that citeproc recognizes. Fixes jgm/citeproc#68 and jgm/citeproc#163. Note that formatting is only possible for locators given in the explicit form, surrounded by curly braces. It won’t work for implicit locators, since these expect number-like expressions.
  • New non-exported module Text.Pandoc.Readers.OOXML.Shared containing functions factored out from Text.Pandoc.Readers.Docx.Util (Anton Antich).

  • Tests: The common file nativeDiff has been extracted from the Docx and Pptx text files and put in Tests.Helpers.

  • Use asciidoc 0.1, djot 0.1.2.4, texmath 0.13.0.2, typst 0.8.1, citeproc 0.12.

  • MANUAL.txt:

    • Improve implicit_figure documentation (#11082).
    • Give both forms of options when referring to them (#11306).
  • Update INSTALL.md (#11271).

pandoc 3.8.2.1 (2025-10-20)

  • HTML reader: allow blank space between open and close iframe.

  • RTF reader: improve hyperlink parsing (#11211).

  • Org reader:

    • Parse parameter lists on unknown blocks (#11188, Albert Krewinkel). The reader tries to parse the rest of the opening line of a block, e.g., #+begin_myblock …, as a parameters list. It first assumes that the parameters are in lisp-style (:key value), then alternatively tries to read python-style key-value pairs (key=value) and falls back to reading the entire remaining line as a single parameter attribute.
    • Add support for dynamic blocks.
  • Docx writer: properly handle nested comment spans (#8189, #6959, mourino).

  • RST writer: Don’t use simple tables with RowSpans (#11214, Tuong Nguyen Manh).

  • Typst writer: Escape open paren after non-space (#11210). This fixes an issue that occurs if an open paren comes right after e.g. #strong[test].

  • Typst template: ensure that title block is properly centered (#11221).

  • LaTeX writer/template: small fix for unnumbered tables for compatibility with older LaTeX installations (#11201). Thanks to @priiduonu for the solution.

  • MANUAL.txt: Fixed missing backtick (#11209, FoxChillz).

  • Correct anchor references to pandoc.text module documentation (#11111, Emmanuel Ferdman).

  • Fixed golden test regeneration in Docx reader test.

  • Allow unicode-data 0.8.

  • Use citeproc 0.11. This fixes a significant performance regression in pandoc 3.8, which was due to a rewrite of the default chicago-author-date.csl file. Performance with --citeproc is now on par with what we had in pandoc 3.7, even with the revised Chicago styles.

pandoc 3.8.2 (2025-10-05)

  • Markdown reader/writer: implement new table_attributes extension (#10884). When table_attributes is enabled (as it is by default for pandoc’s Markdown), attributes can be attached to a table by including them at the end of the caption. Previously the writer would emit an identifier in this position, but the reader didn’t handle it. Now arbitrary attributes are allowed, and they work in both the reader and writer.

  • Typst writer: don’t add superfluous semicolons (#11196). Previously we added semicolons after inline commands not followed by spaces, but mainly this was to deal with one issue: the presence of a semicolon after an inline command, which would be swallowed as a command separator (#9252). This commits adopts an approach that should avoid so many superfluous semicolons: it escapes semicolons that might come right after a command.

  • Typst template: fix 3.8 regression in which links disappear (#11194). A template change in 3.8 added a show rule for links which causes them to disappear except in special cases.

  • Text.Pandoc.Parsing: rewrite oneOfStrings more efficiently.

  • LaTeX writer: Fix strikeout in links (#11192, Tuong Nguyen Manh). As in #1294 \url and \href need to be protected inside an mbox for soul commands.

  • Text.Pandoc.Extensions: Add Ext_table_attributes constructor for Extension [API change].

  • Use released texmath 0.13.0.1.

  • Update FSF contact information in COPYING (#11183, Bensun Muite).

  • MANUAL.txt: remove some redundancy (#11178, Reuben Thomas).

pandoc 3.8.1 (2025-09-29)

  • New output format vimdoc (Vim documentation format) (#11132, reptee).

    • [API change] Added module Text.Pandoc.Writers.Vimdoc, exporting writeVimdoc.
  • Markdown reader:

    • Improve superscript/subscript/inline note parsing (#8652). We do not allow inline notes to be followed by ( or [. Otherwise, we parse inline notes before superscripts. Also, the sub/superscript parsers have been adjusted so that they really exclude unescaped spaces (as they did not before, when the spaces occurred in nested inlines).
    • Fix simple table alignment (#11136, Tuong Nguyen Manh). Take wide characters into account when determining the alignment.
  • LaTeX reader:

    • Ignore \pandocbounded (#11140).
  • XML reader:

    • Parse <MetaString> (#11137, massifrg).
  • Typst reader:

    • Add support for reading typst pagebreak (#11101, Raymond Berger). The pagebreak is parsed as a HorizontalRule inside a wrapper Div with class page-break.
  • Docx reader:

    • Handle figures in indented paragraphs (#11028).
    • Change default for textwidth. This should only be used if sectPr is not found.
    • Properly calculate table column widths (#9837, #11147). Previously we assumed that every table took up the full text width. Now we read the text width from the document’s sectPr.
    • Use Tasty.Golden for Docx reader tests. This way we can update them with --accept.
  • RST reader:

    • Fix regression in simple table parsing (#11150).
    • SkippedContent warning if table directive contains non-tabular content.
    • Simple tables: leading space in a cell should not cause the contents to be parsed as a block quote (#11146).
    • Parse :alt: on figure (#11140). Also give a better default if alt is not specified, using the stringified caption rather than the filename.
    • Support col spans for simple tables (Tuong Nguyen Manh).
  • Markdown writer:

    • Improve handling of implicit figures (#11140). Allow implicit figures when alt text differs from caption (in this case, we use an image attribute to add the alt).
    • Use approximate pipe tables when it’s the only option (#11128). If we have a table with row/colspans that can rendered as an approximate pipe table (without row/colspans), and no other table format is enabled that could render the table, we fall back to an “approximate” pipe table, with no row/colspans.
  • RST writer:

    • Ensure blank line before directives (#11162).
    • Add col spans for simple tables (#10127, Tuong Nguyen Manh).
  • OpenDocument writer:

    • Add missing table elements (#10002, Tuong Nguyen Manh). Add missing header rows after the first one, footer rows as well as TableBody header rows.
  • Docx writer:

    • Fix regression (from 3.8) in highlighted code (#11156).
  • Powerpoint writer:

    • Handle single column (Tuong Nguyen Manh).
  • Typst writer:

    • Fix syntax highlighting (#11171, completes #10525). Previously the native typst highlighting was always used, regardless of the setting of --syntax-highlighting. With this change, --syntax-highlighting=none and --syntax-highlighting=<stylename> (with skylighting style) will work.
  • LaTeX writer:

    • Make beamer footnotes compatible with pauses (#5954). Previously they would appear before the content to which the note was attached, when there were pauses in a slide.
    • Avoid \_ in bibliography variable (#11152).
    • Ensure that unlabelled tables don’t increment counter (#11141).
    • Protect VERB in caption (#11139, Tuong Nguyen Manh).
    • Don’t add links to TOC (#11124, Albert Krewinkel).
    • Fix strikeouts in beamer title (#11168, Tuong Nguyen Manh).
  • LaTeX template: Add shorthands variable for LaTeX output (#11160). If true, pandoc will allow language-specific shorthands when loading babel. (This is helpful, for example, in getting proper spacing around French punctuation.)

  • epub.css: Remove coloring for a, a:visiting (#11174). This was causing links in iOS books app not to be distinguished in any way (since underlining is not used there).

  • Text.Pandoc.Parsing:

    • [API chage] (Tuong Nguyen Manh). New functions tableWithSpans, tableWithSpans', toTableComponentsWithSpans and toTableComponentsWithSpans' take a list of lists of (Blocks, RowSpan, ColSpan) to parse a Table with different RowSpan and ColSpan values accordingly. New helper functions singleRowSpans and singleColumnSpans help set all RowSpans or ColSpans to be 1 in case the table format only allows setting one or the other.
  • Text.Pandoc.Class:

    • Let fetchItem fail if the HTTP request is not successful (Albert Krewinkel). HTTP requests that don’t return a 200 error code are now treated as an error. This ensures that a warning is triggered when using --embed-resources or --extract-media.
  • Text.Pandoc.Writers.Shared:

    • Add new function removeLinks [API change] (Albert Krewinkel). The function converts links to spans. It is used, for example, to avoid nested links. The HTML writer used to put the description of nested links into small caps, but uses a simple span now.
  • Text.Pandoc.Highlighting: export typst functions [API change]. New exported functions formatTypstBlock, formatTypstInline, styleToTypst.

  • Text.Pandoc.XML:

    • Add fetchpriority to list of HTML attributes (#11176).
  • Allow unicode-data 0.7.

  • Use released djot 0.1.2.3. Fixes a bug in which indentation was swallowed in a code block inside a blockquote.

pandoc 3.8 (2025-09-06)

  • Add a new input and output format xml, exactly representing a Pandoc AST and isomorphic to the existing native and json formats (massifrg). XML schemas for validation can be found in tools/pandoc-xml.*. The format is documented in doc/xml.md. Pandoc now defaults to this reader and writer when the .xml extension is used.

    Two new exported modules are added [API change]: Text.Pandoc.Readers.XML, exporting readXML, and Text.Pandoc.Writers.XML, exporting writeXML. A new unexported module Text.Pandoc.XMLFormat is also added.

  • Add a new command line option --syntax-highlighting; this takes the values none, default, idiomatic, a style name, or a path to a theme file. It replaces the --no-highlighting, --highlighting-style, and --listings options, which will still work but with a deprecation warning. (Albert Krewinkel)

  • Create directory of output file if it doesn’t exist (#11040).

  • Update --version copyright dates (#10961), and use a hardcoded string “pandoc” for the program name in --version, per GNU guidelines.

  • Add smart_quotes and special_strings extensions (Albert Krewinkel). Currently these only affect org. Org mode makes a distinction between smart parsing of quotes, and smart parsing of special strings like .... The finer grained control over these features is necessary to truthfully reproduce Emacs Org mode behavior. Special strings are enabled by default, while smart quotes are disabled.

  • Remove the old compact_definition_lists extension. This was neded to preserve backwards compatibility after pandoc 1.12 was released, but at this point we can get rid of it.

  • Make -t chunkedhtml -o - output to stdout (as documented), rather than creating a directory called - (#11068).

  • RST reader: Support multiple header rows (#10338, TuongNM).

  • LaTeX reader:

    • Support soft hyphens (Albert Krewinkel).
    • Parse \minisec as unlisted level 6 headings (#10635, Albert Krewinkel).
    • Support \ifmmode (#10915).
    • Change handling of math environments (#9711, #9296). Certain environments in LaTeX will trigger math mode and can’t occur within math mode: e.g., align or equation. Previously we “downshifted” these, parsing an align environment as a Math element with aligned, and an equation environment as a regular display math element. With this shift, we put these in Math inlines but retain the original environments. texmath and MathJax both handle these environments well.
  • Typst reader:

    • Fix addition of image path prefix to use posix separator.
    • Properly resolve image paths in included files (#11090).
    • Handle inline-level show rules on block content (#11017). Typst allows things like smallcaps to be applied to block-level content like headings. This produces a type mismatch in pandoc, so before processing the output of typst-hs, we transform it, pulling the block-level elements outside of the inline-level elements.
  • Org reader:

    • Improve sub- and superscript parsing (Albert Krewinkel). Sub- and superscript must be preceded by a string in Org mode. Some text preceded by space or at the start of a paragraph was previously parsed incorrectly as sub- or superscript.
    • Allow “greater block” names to contain any non-space char (#4287, Albert Krewinkel).
    • Accept quoted values as argument values (#8869, Albert Krewinkel).
    • Recognize “fast access” characters in TODO state definitions (#10990, Ryan Gibb).
    • Improve org-cite parsing: Handle global prefix and suffix properly. Use all and only the styles mentioned in oc-basic.el. Allow space after ;.
  • HTML reader:

    • Don’t drop the initial newline in a pre element (#11064).
  • DocBook reader:

    • Add rowspan support (#10981, Sean Soon).
    • Be sensitive to startingnumber attribute on ordered lists (#10912).
  • POD reader:

    • Fix named entity lookup (#11015, Evan Silberman).
  • Man reader:

    • Support header and footer reader (Sean Soon).
  • Markdown reader:

  • ODT reader:

    • Support table-header-rows (Tuong Nguyen Manh).
  • Docx reader:

    • Don’t add highlighting if highlight color is “none” (#10900).
    • Handle strict OpenXML as well as transitional (#7691).
    • Fix stringToInteger (#9184). It previously converted things like 11ccc to an integer; now it requires that the whole string be parsable as an integer.
    • Improve handling of AlternateContent. This fixes handling of one representation of emojis in Word (#11113).
  • LaTeX writer:

    • Control figure placement with attribute (#10369, Sean Soon). If a latex-placement attribute is present on a figure, it will be used as the optional positioning hint in LaTeX (e.g. ht). With implicit figures, latex-placement will be added to the figure (and removed from the image) if it is present on the image.
    • Include cancel package only if there is math that contains \cancel, \bcancel, or \xcancel.
    • Add braces around comments in title-meta (#10501). This is needed to prevent PDFs from interpreting this as a sequence of titles.
    • Set pdf-trailer-id if SOURCE_DATE_EPOCH envvar is set (#6539, Albert Krewinkel). The SOURCE_DATE_EPOCH environment variable is used to trigger reproducible PDF compilation, i.e., PDFs that are identical down to the byte level for repeated runs.
    • Be more conservative about using \url (#8802). We only use it when the URL is all ASCII, since the \url macro causes problems when used with some non-ASCII characters.
    • Support soft hyphens (Albert Krewinkel).
    • Change handling of math environments (#9711, #9296). When certain math environments (e.g. align) are found in Math elements, we emit them “raw” instead of putting them in $..$.
  • Typst writer:

    • Check XID_Continue in identifiers (Tuong Nguyen Manh).
    • Add escapes to prevent inadvertent lists due to automatic wrapping (#10047). Also simplify existing code that was meant to do this.
    • Add parentheses around typst-native year-only citations (#11044).
    • Add native Typst support for nocite (#10680, Albert Krewinkel). The nocite metadata field can now be used to supply additional citations that don’t appear in the text, just as with citeproc and LaTeX’s bibtex and natbib.
    • Set lang attribute in Divs (#10965).
    • Rename numbering variable to section-numbering (Albert Krewinkel). This is the name expected by the default template.
    • Add support for custom and/or translated “Abstract” titles (Albert Krewinkel, #9724).
  • Org writer:

    • Don’t wrap link descriptions (#9000). Org doesn’t reliable display these as links if they have hard breaks.
    • Disable smart quotes by default (Albert Krewinkel).
  • Markdown writer:

    • Better handling of pandoc-generated code blocks (#10926). Omit the wrapper sourceCode divs added by pandoc around code blocks. More intelligently identify which class to use for the one class allowed in GFM code blocks. If there is a class of form language-X, use X; otherwise use the first class other than sourceCode.
    • Use fenced divs even with empty attributes (#10955, Carlos Scheidegger). Previously fenced divs were not used in this case, causing the writer to fall back to raw HTML.
    • Match indents in definition items (#10890, Albert Krewinkel). Previously, the first line of a definition details item always used a colon and three spaces instead of respecting the tab-stop setting, which could lead to round-tripping issues. Likewise, the indentation of continuation paragraphs in definition lists now matches the two-characters leader of the first line for Markua output.
  • DocBook writer:

    • Use startingnumber instead of override for start numbers on ordered lists (#10912).
  • ANSI writer:

    • Make --wrap=none work properly (#10898).
  • Djot writer:

    • Fix duplicate attributes before section headings (#10984).
  • Docx writer:

    • Ensure that documents don’t start with a section separator (#10578, Albert Krewinkel). Any leading section separator is removed from the result.
  • HTML writer:

    • Unwrap “wrapper” divs (#11014). Some of the readers (e.g. djot) add “wrapper” divs to hold attributes for elements that have no slot for attributes in the pandoc AST. The HTML reader now “unwraps” these wrappers so that the attributes go on the intended elements.
  • Asciidoc writer:

    • Handle lists with sublists following continuations (#11006). These require an additional blank line in some cases.
  • HTML styles template: prefix default styles with informative CSS comment (Albert Krewinkel, #8819).

  • Org template: add #+options lines if necessary (Albert Krewinkel). The default template now adds #+options lines if non-default settings are used for the smart_quotes and special_strings extensions.

  • LaTeX template:

    • Don’t emit empty linkcolor= in hypersetup (#11098).
    • Add RTL support for LuaTeX engine (Reuben Thomas).
  • Typst template:

    • Add several new variables (Christopher T. Kenny, #9956): thanks, abstract-title, linestretch, mathfont, codefont, linkcolor, filecolor, citecolor.
  • reference.docx:

    • Don’t left-align table header row (R. N. West, #11019).
    • Update East Asia font theme in styles.xml to minorEastAsia (TomBen).
    • Update language settings in styles.xml for East Asia to Simplified Chinese (TomBen).
  • Text.Pandoc.PDF:

    • makePDF: automatically embed resources from media bag in HTML before trying to convert it with weasyprint, etc. (#11099). This will give better results when converting from formats like docx.
    • Use utf8ToText for LaTeX log messages.
    • Make images from MediaBag available in tmp dir for every PDF engine, not just LaTeX/ConTeXt (#10911).
    • Improve error readability when pdf-engine is not supported (Albert Krewinkel). Each supported engine is now printed on a line of its own.
    • Allow pdflatex-dev and lualatex-dev as PDF engines (#10991, Albert Krewinkel). These are the development versions of the LaTeX binaries; installable, e.g., with tlmgr install latex-base-dev.
    • Clean up makePDF (Albert Krewinkel).
    • Avoid encoding errors when reading LaTeX logs (#10954).
  • Text.Pandoc.Readers:

    • Raise unknown reader error for ods, odp, odf, xls, xslx, zip extensions.
  • Text.Pandoc.App:

    • Recognize binary signatures and fail early (Repetitive). Fail early when receiving binary input with recognized signature: zip[-based], including OpenDocument and Microsoft formats, PDF, CFBF-based (old Microsoft formats including .doc and .xls), DjVu.
    • Remove code duplication around version info. Text.Pandoc.App.CommandLineOptions and pandoc-cli/src/pandoc.hs had similar code for generating version information. To avoid duplication, we now export versionInfo from Text.Pandoc.App [API change]. This function has three parameters that can be filled in when it is called by pandoc-cli.
  • Text.Pandoc.Parsing:

    • tableWith and tableWith' now return a list of lists of Blocks, rather than a list of Blocks, for the header rows, allowing for multiple header rows [API change] (#10338, TuongNM).
  • Text.Pandoc.Citeproc:

    • Don’t move footnotes around em-dashes (#11046).
    • Allow --citeproc to put the bibliography in a Div with id refs even when --file-scope is used (#11072). When --file-scope is used, a prefix will be added based on the filename, so the Div will end up having an identifier like myfile.md__refs. Previously, this prevented the bibliography from being added to the marked Div. Now pandoc will add the bibliography to any Div with the id refs or any id ending in __refs.
  • Text.Pandoc.Citeproc.BibTeX: Protect case in periodical titles (#11048). Thus, for example, {npj} Quantum Information should translate as [npj]{.nocase} Quantum Information.

  • Text.Pandoc.ImageSize:

    • Detect more JPEG file signatures (R. N. West and John MacFarlane, #11049).
    • Unpack compressed object streams in PDFs and look inside for MediaBox information (#10902).
    • Add Point and Pica as constructors of ImageSize [API change] (#8957). This will prevent unnecessary conversion of units.
    • Add Avif constructor on ImageType [API change] and support avif images (#10979).
  • Text.Pandoc.Writers.Shared:

    • Amend docs of lookupMeta... functions (#10634, Albert Krewinkel).
  • Text.Pandoc.Options:

    • Add and export defaultWebTeXURL WebTeX URL [API change] (#11029, Sean Soon). This fixes the webtex option when used without parameter in a defaults file.
    • Add type HighlightMethod and patterns [API Change] (Albert Krewinkel).
    • The writerListings and writerHighlightStyle fields of the WriterOptions type are replaced with writerHighlightMethod [API change] (Albert Krewinkel, #10525).
  • Text.Pandoc.Extensions:

    • Remove Ext_compact_definition_lists constructor for Extension [API change].
    • Add Ext_smart_quotes and Ext_special_strings constructors. [API change].
  • Text.Pandoc.SelfContained:

    • Try fetching relative resources without query or fragment if the original fetch fails. This provides a fix for #1477 in a way that doesn’t raise the problems mentioned in #11021.
  • Text.Pandoc.Highlighting:

    • Export defaultStyle [API Change] (Albert Krewinkel). This allows to be more explicit about using a default style, and providing a single point of truth for its value. The variable is an alias for pygments.
  • Text.Pandoc.Class:

    • downloadOrRead: do not drop fragment/hash for local file paths (#11021). With the previous behavior it was impossible to have an image file containing # or ?.
    • Export function runSilently [API Change] (Albert Krewinkel). The function runs an action in the PandocMonad, but returns all log messages reported by that action instead of adding them to the main log.
    • Make CommonState opaque. Text.Pandoc.Class now exports CommonState as an opaque object, without its fields. [API change] The internal module Text.Pandoc.Class.CommonState still exports the fields.
    • Text.Pandoc.Class now exports the following new functions: getRequestHeaders, setRequestHeaders, getSourceURL, getTrace. [API change]
    • CommonState now has a stManager field. This allows us to cache the HTTP client manager and reuse it for many requests, instead of creating it again (an expensive operation) for each request. This fixes a memory leak and performance issue in files with a large number of remote images (#10997).
  • Lua subsystem (Albert Krewinkel):

    • Add function pandoc.structure.unique_identifier.
    • Add functions pandoc.text.superscript and subscript.
    • Use proper interface functions to access the CommonState. The PANDOC_STATE is no longer a userdata object, but a table that behaves like the old object. Log messages in PANDOC_STATE.log are now in temporal order.
    • Add function pandoc.path.exists.
    • Add normalize function to Pandoc objects (#10356). This function performs a normalization of Pandoc documents. E.g., multiple successive spaces are collapsed, and tables are normalized such that all rows and columns contain the same number of cells.
    • Add more UTF-8-aware file operations to pandoc.system. Functions that expect UTF-8-encoded filenames should make it easier to write platform-independent scripts, as the encoding of the actual filename depends on the system. In addition, there is a new generalized method to run commands, and functions to retrieve XDG directory names. The new functions are command, copy, read_file, remove, rename, times, write_file, xdg.
    • Allow hslua-2.4.
    • Require lua-module-system 1.2.3. This provides List methods to the value returned by pandoc.system.list_directory (#11032).
  • MANUAL.txt:

    • Fix broken ConTeXt links (R. N. West, #11055).
    • Add xml as input/output format.
    • Fix minor capitalization typo (#11052, Albert Krewinkel).
  • doc/lua-filters:

    • Fix docs for pandoc.Cite (Albert Krewinkel).
    • Don’t encourage returning tables of filters from Lua filters (R. N. West, #10995). Use the Pandoc:walk method instead.
  • doc/extras.md: Fix link to pandoc-mode (Erik Post).

  • doc/lua-filters.md: Add example on using pandoc.Table constructor (#10956, Sean Soon).

  • Update default.csl from new chicago-author-date.csl, which is now for the 18th edition.

  • Use latest releases of citeproc, typst-hs, texmath, doclayout, skylighting-core, skylighting.

pandoc 3.7.0.2 (2025-05-28)

  • RST writer:

    • Don’t emit alignment markers in grid tables (#10857).
  • Asciidoc writer:

    • Add support for sidebars (GHyman83).
  • LaTeX writer:

    • Include alt option in \includegraphics (#6095).
  • Markdown writer:

    • Preserve figure attributes (Nikolay Yakimov, #10867). Fixes a regression introduced by 0d2114e, which caused the Markdown writer to ignore attributes on the figure if it has class or key-value attributes set.
  • HTML writer:

    • Use the ID prefix in the ID for the footnotes section (Benjamin Esham).
  • Text.Pandoc.Writers.Shared:

    • gridTable: fix (3.7) regression with missing cell alignments (#10853).
    • gridTable: fix headings with colspans (#10855). If the heading contains a colspan, we still need to include information in the header line about the colspecs.
    • gridTable: fix headerless tables. The top line should encode colspan information.
  • Text.Pandoc.SelfContained:

    • Fix handling of empty script element (#10862). Previously in this case the closing tag was dropped.
    • Do not drop data- attributes in script tags (#10861).
  • Lua subsystem (Albert Krewinkel):

    • Add function pandoc.mediabag.make_data_uri (#10876). The function takes a MIME type and raw data from which it creates an RFC 2397 data URI.
  • tools/update-lua-module-docs: fix handling of wikilinks (Albert Krewinkel).

  • doc/lua-filters.md: add missing docs for pandoc.Caption (Albert Krewinkel).

  • Require texmath 0.12.10.3, typst 0.8.0.1

pandoc 3.7.0.1 (2025-05-17)

  • Text.Pandoc.Shared.Writer: Fix numerous problems with gridTable and add tests (#10848). These fixes affect the Markdown, RST, and Muse writers.

  • Fix context writer/template to produce tagged PDFs (#10846). As before, the tagging extension must be enabled. We now add the command that tells ConTeXt to start tagging.

pandoc 3.7 (2025-05-14)

  • Add new command-line option --variable-json (#10341). This allows non-string values (booleans, lists, maps) to be given to template variables on the command line.

  • The --pdf-engine option can now take groff as a value.

  • Markdown writer:

    • Avoid spaces after/before open/close delimiters (#10696). E.g. instead of rendering x<em> space </em>y as x* space *y we render it as x *space* y.
    • Handle row/colspans in grid tables, and expand cells when it isn’t possible to lay them out without breaking string of non-whitespace.
    • Render a figure with Para caption as implicit figure (#10755).
    • When falling back to a Div with class figure for a figure that can’t be represented any other way, include a Div with class caption containing the caption.
    • Improve use of implicit figures when possible (#10758). When the alt differs from the caption, but only as regards formatting, we still use an implicit figure.
    • Omit initial newlines in gfm math blocks to avoid an ugly blank line.
    • Support the four_space_rule extension for plain output (#10813, Manolis Stamatogiannakis).
  • RST writer:

    • Handle row/colspans in grid tables, and expand cells when it isn’t possible to lay them out without breaking string of non-whitespace.
  • Muse writer:

    • Handle row/colspans in grid tables, and expand cells when it isn’t possible to lay them out without breaking string of non-whitespace.
  • JATS writer:

    • Fix escaping for writing-review-editing role (#10744).
  • HTML writer:

    • Remove trailing slash from default revealjs URL (#8749). This avoids a double slash in the URL’s path component.
  • LaTeX writer:

    • Make alignment work within multirow in tables (#10772).
  • Typst writer:

    • Support mark class on spans (#10747).
    • Add equation label if math contains \label{..} (#10805).
  • Roff format writers (man, ms):

    • Use the most compatible form for roff escapes (#10716). For example, \(xy instead of \[xy]. This was the original AT&T troff form and is the most widely supported. The bracketed form causes problem for some tools, e.g. makewhatis on macOS. And emit e followed by an escape for a unicode combining accent rather than the form \[e aa], which works for groff but not e.g. on macOS’s man. This change affects Text.Pandoc.RoffChar, Text.Pandoc.Writers.Roff, and the Man and Ms writers.
  • Docx writer:

    • Ensure that figures and tables with custom styles are not dropped (#10705).
    • Preserve Relationships for images from reference docx (#10759). This should allow one to include an image in a reference.docx and reference it in an openxml template.
    • Don’t renumber rels (#10769). We used to renumber the Relationships so they didn’t conflict with the set of fixed Relationships we imposed. We are now preserving the ids from the reference doc’s document.xml.refs, so we shouldn’t renumber them or references introduced by the user (e.g. in a template) will fail.
  • Ms writer:

    • Improve PDF TOC labels. We now use the plain writer to render these, so that Greek characters etc. will show up properly.
    • When no pdf-engine variable is specified, do not use the .pdfhref macros at all (#10738). This gives better results for links in formats other than PDF, since the link text would simply disappear if it exists only in a .pdfhref macro. When a PDF engine is specified, escape the argument of .pdfhref O in a way that is appropriate.
  • OpenDocument writer:

    • Fix character styles in footnotes (#10791). Character styles governing the position of the footnote reference should not be imposed on the footnote text.
  • Powerpoint writer:

    • Use reference-doc font for captions (#9896, R. N. West).
  • DocBook writer:

    • Use literallayout element for LineBlock (#10825).
  • MediaWiki reader/writer:

    • Allow definition on same line as term (#10708).
  • LaTeX reader:

    • Skip at most one argument to LaTeX tabular newline (#7512, Evan Silberman).
    • Disable ligatures inside \texttt (#10781).
    • Support more symbol commands (#10782).
  • Commonmark Reader:

    • Handle GFM math irregularity with braces (#10631). In GFM, you need to use \\{ rather than \{ for a literal brace.
  • DocBook reader:

    • Improve handling of literallayout (#10825). This is now only made a CodeBlock when there is a monospaced class. Otherwise it is made a LineBlock.
  • Org reader:

    • Add AVIF to Org Reader image extensions (#10736, Christian Christiansen).
    • Don’t include newlines in inine code/verbatim (#10730). Convert newlines to spaces as we do in other formats.
    • Change handling of inline TeX (#10836). Previously inline TeX was handled in a way that was different from org’s own export, and that could lead to information loss. This was particularly noticeable for inline math environments such as equation. Previously, an equation environment starting at the beginning of a line would create a raw block, splitting up the paragraph containing it (see #10836). On the other hand, an equation environment not at the beginning of a line would be turned into regular inline elements representing the math. (This would cause the equation number to go missing and in some cases degrade the math formatting.) Now, we parse all of these as raw “latex” inlines, which will be omitted when converting to formats other than LaTeX (and other formats like pandoc’s Markdown that allow raw LaTex).
  • Beamer template: fix regression in 3.6.4, reverting the omission of \date when the document does not have a date. By default, beamer will display a date when no \date is present in the title block, so this was an unintended behavior change. The reverted change was motivated by the desire to include a custom \date in the frontmatter via header-includes. This can be achieved more simply by simply setting the date variable. In markdown you can even use date in metadata and put some raw LaTeX there.

  • Ms template:

    • Use T rather than P as default font family (#10738).
    • Put PDF-specific things under a conditional. Don’t include them if pdf-engine isn’t set.
  • Upgrade reveal.js URL to v5 (#10740, Kolen Cheung). v4 is no longer available on unpkg.com.

  • Text.Pandoc.PDF: Allow groff to be used as --pdf-engine with ms (#10738). When groff is used as a PDF engine, the groff extension to ms is automatically enabled. Limitations:

    • groff currently produces larger PDFs than pdfroff.
    • With groff, a table of contents produced with --table-of-contents/--toc will always be placed at the end of the document.
    • Certain characters (e.g. Greek characters) may be dropped in the PDF outline.
  • Text.Pandoc.Writers.Shared:

    • Export delimited [API change].
    • New version of gridTable (#6344) [API change]. This handles row and colspans. It also ensures that cells won’t wrap text in places where it wouldn’t normally wrap, even if this means making the cells wider than requested by the colspec (#9001, #7641). Because the parameters are different, this is a breaking API change.
  • Text.Pandoc.App: set pdf-engine variable. If --pdf-engine is specified or if a PDF is being produced, we set the pdf-engine variable. This allows writers and templates to behave differently depending on the PDF engine.

  • Text.Pandoc.Class and Text.Pandoc.URI:

    • Fix parsing of base64 data URIs to allow URI escapes and whitespace (which will be ignored) (#10704).
    • Handle percent encoding in pBase64URI instead of unescaping later, for efficiency (#10704).
  • Text.Pandoc.Citeproc.BibTeX:

    • Recognize en as a langid in biblatex bibliographies (#10764).
  • Text.Pandoc.MIME:

    • Add mime type and extension for avif (#10704).
    • Handle apng, avif, jxl (#10704).
  • Text.Pandoc.Readers.LaTeX.Math: export inlineEnvironmentNames. Internal module, not a change to the public API.

  • reference.docx (Andrew Dunning):

    • Remove extra spaces around text placeholders.
    • Add footnote block text sample.
  • Text.Pandoc.Class.Sandbox:

    • Add sandboxWithFileTree function [API change] (Albert Krewinkel).
  • Lua subsystem (Albert Krewinkel):

    • pandoc-lua-engine: add all test files to the cabal file.
    • Allow pandoc.read to be called in “sandbox” mode for added security (#10831). Readers running in a sandbox will not be able to access the network or file system. The sandbox is enabled if the fourth parameter is a list of files or filename/content pairs. The files are read and then made available in the sandbox via en ersatz file system.
  • Makefile:

    • Add target release-checkist.
    • Install @daisy/ace from npm if not present.
    • Use pandoc lua instead of lua.
    • Fix typo in latex-package-dependencies target.
    • Use jq instead of json_reformat in validate-docx-golden-tests2.
  • NiX infrastructure: new working flake.nix and simpler shell.nix. Removed old default.nix.

  • Require random >= 1.3 and use splitGen. split has been deprecated.

  • Use citeproc-0.9. Bump citeproc bounds for pandoc, pandoc-lua-engine.

  • Use texmath-0.12.10.1.

  • Use released typst 0.8 (partially supporting typst 0.13).

  • Use citeproc 0.9.0.1.

  • MANUAL.txt:

    • Fix default URL for revealjs.
    • Add note that alerts extension only works with commonmark (#9716).
    • Remove “Body Text Char” from list of Word styles that can be customized using a reference.docx (#10646). This doesn’t seem to be present in pandoc-generated docx files, nor is it a Word default.
    • For pandoc lua, add note about the environment.
    • Improve documentation of --variable option.
  • doc/typst-property-output.md: Mention that typst:no-figure is a class, not an attribute (#10826, Niklas Eicker).

  • Change RELEASE-CHECKLIST to RELEASE-CHECKLIST-TEMPLATE.org. Use org-babel to automate many of the steps of the release.

  • INSTALL.md: update MacPorts information (#10719, Mohamed Akram).

  • COPYRIGHT: fix link to source code.

  • CONTRIBUTING.md: Fix link to discussion forum. (#10834, R. N. West).

pandoc 3.6.4 (2025-03-16)

  • Disable citations extension in writers if --citeproc is used (#10662). Otherwise we get undesirable results, as the format’s native citation mechanism is used instead of (or in addition to) the citeproc-generated citations.

  • Markdown reader:

    • Allow line break between URL and title of link (#10621).
    • Give better position information when YAML metadata parsing fails with a YAML exception (#10231).
    • Fixed escapedChar' parser (#10672). It should not accept escaped newlines.
    • Remove some misguided list fanciness (#9865, #7778, cf. #5628). Previously we tried to handle things like commented out list items:
      - one
      <!--
      - two
      -->
      - three
      
      and also things like:
      - one `and
      - two` and
      
      But the code we added to handle these cases caused problems with other, more straightforward things, like:
      - one
      - ```
        code
        ```
      - three
      
      So we are rolling back all the fanciness, so that the markdown parser now behaves more like the commonmark parser, in which indicators of block-level structure always take priority over indicators of inline structure.
  • HTML reader:

    • Skip MathJaX-introduced cruft (#10673).
    • Ignore style tags in the body (#10643).
  • LaTeX reader:

    • Better handle comments/whitespace in option lists and includes (#10659).
    • Support \newline, \linebreak.
  • Docx reader/writer:

    • Revert commit adding row heads (cbe67b9602a736976ef6921aefbbc60d51c6755a) (#10627). Word sets w:firstColumn="1" by default for tables. You have to find the Table Design tab and explicitly uncheck “First Column” to make this go away. In most cases, I don’t think writers intend to designate the first column as a row head, so this commit is going to produce unexpected results. In addition, because of the table normalization done by pandoc-type’s tableWith, any table containing a colspanned cell in the left-hand column will get broken if the first column is designated a row head. For these reasons it seems best to revert this change, which was made in response to #9495.
  • LaTeX writer and template:

    • Remove selnolig-langs (#9863). We now specify the language as a global option again, so we no longer need to specify it when invoking selnolig.
    • Use babel options shorthands=off (#6817).
    • Use * for multirow width when no colwidth specified (#10685). Otherwise the multirow will be excessively wide.
    • Protect \phantomsection (#10688, etclub).
  • Markdown writer:

    • Omit extra space after bullets (#7172). Those who want the old behavior can obtain it by using -t markdown+four_space_rule.
    • Treat Emph [Emph ils]] as ils (#10642). Otherwise we get **content** which means strong emphasis.
  • EPUB writer:

    • Use a nonbreaking space after section number in nav.xhtml. This seems to be required for iOS books app to display the space.
  • Typst writer:

    • Better heuristics for escaping potential list markers (#10650).
    • Ensure that citation-style works as well as csl (#10661).
  • Powerpoint writer:

    • Avoid extra blank lines before author when there is no subtitle (#10619).
  • JATS template:

    • Fix typo in author prefix in article.jats_publishing template (#10622, Tiago-Manzato).
  • Text.Pandoc.Parsing:

    • Smart quote parsing: ignore curly quotes (#10610). Previously we tried to match curly quotes as well as straight quotes, producing Quoted inlines. But it seems better just to assume that those who use curly quotes want them passed through verbatim. This also fixes an (unintended) bug whereby curly single left quotes would sometimes be changed to single right quotes.
  • Text.Pandoc.Shared:

    • makeSections: put some attributes on section element only. Certain role and epub:type attributes should only be on the section (and indeed, many roles give a validation error if left on the heading element).
  • Text.Pandoc.Logging:

    • Change NoTitleElement from WARNING to INFO (#10671). Users commonly complain about the warning when producing HTML documents without an explicit title. It seems that an info message is more appropriate, since pandoc’s default here (using the input’s base name) ensures compliance with the standard and many users are happy with that default. Those who want to make sure the message is seen can use --verbose.
  • Beamer template: only emit \date if set (#10687, josch).

  • Fix invalid OOXML in definition_list.docx test (#10394).

  • MANUAL.txt:

    • Correct typo: ‘date’ for doubled ‘title’ (#10654, Olivier Dossmann).
    • Add note about template variable for typst.
    • Change maxwidth default in MANUAL.txt (#10683).
    • Improve EPUB metadata documentation.
    • In Security section, alert readers to a threat relating to iframe in HTML, and add LaTeX, Typst to the list of formats that have an include (#10682).
  • doc/lua-filters.md: Add missing html_math_method ‘katex’ (R. N. West).

  • Use texmath 0.12.9.

  • Use typst 0.7. Fixes an issue with package loading, a regression in pandoc 3.6.3.

pandoc 3.6.3 (2025-02-09)

  • Track wikilinks with a class instead of a title (Evan Silberman). Previously wikilinks were distinguished by giving them the title wikilink. Now that we have link attributes, it makes more sense to give them the class wikilink. This change affects all readers and writers that support wikilinks.

  • DocBook reader:

    • Handle title inside orderedlist (#10594). Also some other elements that allow title: blockquote, calloutlist, etc.
    • Better handle informalequation (#10592, tombolano). Include id attribute.
    • Better handle formalpara, example, and sidebar (#8666, tombolano). Include identifiers and titles in each case.
  • Markdown reader:

    • Simplify and fix normal citation parsing (#10584). This fixes a bug that causes some normal citations to be parsed as bracketed regular citations.
  • ODT reader:

    • Create Figure elements for images that are figures (#10567).
    • Avoid producing spurious blockquotes in list items (#9505).
    • Fix unwanted block quotes (#10575). Previously the reader created block quotes whenever a paragraph was marked indented (even though this just affects the first line). With this change we still generate block quotes for content that has an altered left margin, but not for indented paragraphs.
  • Docx reader:

    • Do not issue warning for comments with +styles (#10571, Stephen Reindl).
  • LaTeX reader:

    • Test {,re}newcommand arguments (#4470, Evan Silberman).
  • Pod reader:

    • Consume blanks after =encoding in pod reader (#10537, Evan Silberman).
  • JATS writer:

    • Add CRediT roles to JATS (Charles Tapley Hoyt and Jez Cope, #10152). Enable annotating author roles using the Contribution Role Taxonomy (CRediT) and export this information in conformant JATS.
  • LaTeX writer/templates:

    • Improve babel support (#8283). Previously we used the .ini files for every language, but for European languages these tend to provide inferior results to the .ldf files used by classic Babel. Currently Babel documentation recommends using the classic system for European languages written in Latin and Cyrillic scripts and Vietnamese. So the LaTeX writer and template now follow this guidance.

      Main languages in the list of languages with good “classic” support are added to global documentclass options and will be automatically handled by Babel using the .ldf files.

      If the main language is not in this list, the babeloptions variable will be set to provide=*, which will cause support to be loaded from the .ini file rather than an .ldf. So, for example, setting -V babeloptions='' with a polytonic Greek document will cause the .ldf support to be used instead of the .ini.

      The default setting of this variable can be overwritten, but in most cases the default should give good results.

    • Allow csquotesoptions to be specified.

    • Fix indentation bugs in font-settings.latex.

  • Docx writer:

    • Repeat reference doc’s sectPr for each new section (#10577). Previously we were only carrying over the reference doc’s sectPr at the end of the document, so it wouldn’t affect the intermediate sections that are now added if --top-level-division is chapter or part. This could lead to bad results (e.g. page numbering starting only on the last chapter).
    • Create section divisions with --top-level-division=part (#10576).
    • Improve title style in reference.docx; base Author and Date on Title; remove condensed spacing (Andrew Dunning, #10581).
  • Typst writer:

    • Brace tables with typst:no-figure and typst:text attributes (#10563, Gordon Woodhull).
  • Ms writer:

    • Fix escaping of - (#10536). - should now be escaped in man output but not in ms output (where \- is a unicode minus sign).
  • HTML styles: fix style of hr so it works when printed (#10535, Hendrik Erz). Previously background-color was used to style the hr, but this gets ignored when printing. This commit uses border-top instead.

  • Text.Pandoc.Shared:

    • Handle <abbr> as a span-like inline in htmlSpanLikeElements (#5793, Evan Silberman).
  • Text.Pandoc.MediaBag:

    • Prefer MIME type when determining extensions for MediaBag items (#10557, Max Heller). This should give different results for remote images that are served at URLs that do not contain misleading extensions (e.g. shields.io).
  • Text.Pandoc.Citeproc:

    • Fix moving punctuation before citation notes. This previously worked with regular citations, but not author-in-text citations. Now it works with both.
  • doc/lua-filters.md:

    • Correct luacheck URL (#10589, R. N. West).
    • Add static analysis paragraph to debugging section (#10568, R. N. West).
    • Add note about extensions handling in read and write (Albert Krewinkel).
  • doc/extras.md:

    • Add entry for pandoc-subfigs (R. N. West).
    • Update diagram Lua filter URL and description (R. N. West).
  • MANUAL.txt:

    • Add note on using typst to produce pdf/a-2b.
    • Document top-level-division functionality with Docx (#10579, Andrew Dunning).
  • Raise xml-conduit upper bound.

  • Depend on latest commonmark-pandoc, commonmark-extensions, citeproc, typst.

  • Makefile: make make binpath quiet.

pandoc 3.6.2 (2025-01-12)

  • New input format: pod (Evan Silberman). Pod (“Plain old documentation”) is a markup languaged used principally to document Perl modules and programs.

  • New reader module Text.Pandoc.Readers.Pod, exporting readPod [API change].

  • Docx reader:

    • Support row heads in tables (#9495). Reader: When w:tblLook has w:firstColumn set (or an equivalent bit mask), we set row heads = 1 in the AST.
    • Read table styles as custom styles when styles extension is enabled (#9603).
  • HTML reader:

    • Add size information for font awesome SVG icons (#10134). If the icon has class fa-fw or fa-w16 or fa-w14, we add a width attribute to prevent the icon from appearing full-width in PDF or docx output.
  • Djot reader:

    • Use a Span with class “mark” rather than “highlighted” for highlighted text, for consistency with the other pandoc readers and writers.
  • mandoc reader:

    • Add mdoc St for C23 (Evan Silberman).
  • RST reader:

    • Fix handling of underscores (#10497). Fixes a a regression introduced in 3.6.
  • Docx writer:

    • Support row heads in tables (#9495). Writer: set w:firstColumn in w:tblLook when there are row heads. (Word only allows one, so this is triggered by any number of row heads > 0.)
  • Djot writer:

    • Render a Span with sole class “mark” as highlighted text.
  • Asciidoc writer:

    • Don’t emit the class in a span if it’s just “mark” (#10511). The “mark” class is used for highlighting, and Asciidoc treats bare #...# with no attributes as highlighted text.
    • Improve escaping (#10385, #2337, #6424).
  • EPUB v2 writer:

    • Fix cover image (#10505). This is a regression introduced in 3.6.
  • Typst writer:

    • Fix handling of pixel image dimensions (#9945). These are now converted to inches as in the LaTeX writer.
  • Improve error message given when users specify asciidoc as input format (#8416, Santiago Zarate).

  • Allow random 1.3.

  • Use texmath 0.12.8.13 (typst improvements).

  • lua-filters.md: document system.os return values (#10523).

  • MANUAL.txt:

    • Improve manual’s coverage of custom styles.
    • Replace LibreOffice PDF documentation link to latest so it links to the latest major release rather than a specific major release (which there are two of every year) (Stéphane Guillou).
    • Improve links and descriptions for odt, opendocument (#10518).

pandoc 3.6.1 (2024-12-23)

  • Allow YAML bibliographies to be arrays of references (#10452). Previously, they had to be YAML objects with a references key.

  • Change --template to allow use of extensionless templates (#5270). The intent is to allow bash process substitution: e.g., --template <(echo "foo"). Previously pandoc always added an extension based on the output format, which caused problems with the absolute filenames used by bash process substitution (e.g. /dev/fd/11). Now, if the template has no extension, pandoc will first try to find it without the extension, and then add the extension if it can’t be found. So, in general, extensionless templates can now be used. But this has been implemented in a way that should not cause problems for existing uses, unless you are using a template NAME.FORMAT but happen to have an extensionless file NAME in the template search path.

  • Allow --shift-heading-level-by=-1 to work in djot in the same way it works for other formats (with the top-level heading being promoted to metadata title) (#10459). This needed special treatment because of the way djot surrounds sections with Divs.

  • RST reader:

    • Handle explicit reference links (#10484, Evan Silberman). This case was missed when changing the reference link strategy for RST to allow a single pass. (It is a regression in pandoc 3.6.)
  • Markdown reader:

    • Use T.P.URI’s pBase64DataURI in parsing data URIs (#10075, Evan Silberman and John MacFarlane).
    • More efficient base64 data URI parsing (#10075, Evan Silberman and John MacFarlane). This should yield dramatic performance improvements for markdown documents containing large data URIs in images.
  • HTML reader:

    • Don’t canonicalize data: URIs (#10075). It can be very expensive to call network-uri’s URI parser on these.
  • LaTeX reader:

    • Handle figure* environment as a figure (#10472).
  • MediaWiki reader:

    • Allow empty quoted attributes (#10490).
    • Allow cells starting with + (#10491).
  • Textile reader:

    • Improve parsing of spans (#9878). The span needs to be separated from its surroundings by spaces. Also, a span can have attributes, which we now attach.
    • Inline constructors shouldn’t trigger if closer is preceded by whitespace (#10414).
  • Docx writer:

    • Put chapters in separate sections, and restart footnotes by section by default (#2773). The main effect of this change is that when --top-level-division=chapter is used, chapters will start on a new page and footnote numbering will restart for each chapter. Both of these defaults can be overridden in the reference.docx.
    • Use styleIds not styleNames for Title, Subtitle, etc. (#10282). This fixes a regression introduced in pandoc 3.5. This change affects the default openxml template as well as the OpenXML writer.
  • Markdown writer:

    • Avoid collapsing of initial/final newline in markdown raw blocks. This makes it easy to write a filter that adds extra blank lines before certain elements (#10477).
  • Mediawiki writer:

    • Escape line-initial characters that would otherwise be interpreted as list starts (#9700).
  • LaTeX writer:

    • Properly handle boolean value for csquotes variable (#10403).
    • Use displayquote for block quotes with csquotes (#10456).
  • HTML writer:

    • Avoid calling parseURIString for data URIs (#10075). This was done to determine the “media category,” but we can get that directly from the mime component of data: URIs.
  • Typst writer:

    • Properly handle data URIs in images (#10460).
  • LaTeX/Beamer templates:

    • Fix default.beamer nocite location (Thomas Hodgson). It must be inside a frame or it is ignored (#10465).
    • Move nocites from LaTeX preamble to body (#10461, Thomas Hodgson). Putting \nocite in the preamble works only with biblatex.
  • Text.Pandoc.Parsing:

    • Correct example in comment on charsInBalanced (Evan Silberman).
  • Text.Pandoc.Error:

    • Mention typst in rendering PandocUnknownWriterError for pdf (Evan Silberman).
  • Text.Pandoc.MediaBag:

    • insertMedia: fast path for data URIs. Avoid the slow URI parser from network-uri on large data URIs (#10075).
  • Text.Pandoc.Class:

    • Add shortcut for base64 data URIs in downloadOrRead (#10075). This avoids calling the slow URI parser from network-uri on data URIs, instead calling our own parser.
  • Text.Pandoc.MIME:

    • Fix extensionFromMimeType. We had a few special cases encoded, but as previously written they wouldn’t work properly with modifiers like ;charset=utf-8.
  • Text.Pandoc.URI:

    • Export pBase64DataURI. Modify isURI to use this and avoid calling network-uri’s inefficient parseURI for data URIs.
  • Text.Pandoc.PDF:

    • Fix temp file extension in toPdfViaTempFile (#10468). This fixes a regression in pandoc 3.6, which changed the extension from html to source. Apparently wkhtmltopdf needs it to be .html. So now we have added a parameter to toPdfViaTempFile that allows the extension to be specified in a way that is appropriate to the PDF engine used.
  • Lua (Albert Krewinkel):

    • Support more elements as input to pandoc.utils.stringify (#10450). Elements of type Caption, Cell, TableHead, and TableFoot can now be stringified.
    • Add Caption constructor to pandoc module.
  • Miscellaneous code quality improvements (Joseph C. Sible).

  • Depend on citeproc 0.8.1.2, skylighting and skylighting-core 0.14.5.

  • `doc/lua-filters.md: Fix links to constructors (Albert Krewinkel).

pandoc 3.6 (2024-12-07)

  • Add mdoc as input format (Evan Silberman). This change introduces a reader for mdoc, a roff-derived semantic markup language for manual pages. This reader has been developed almost exclusively against mandoc’s documentation and implementation of mdoc as a reference, and the real-world manual pages tested against are those from the OpenBSD base system. Of ~3500 manuals in mdoc format shipped with a fresh OpenBSD install, 17 cause the mdoc reader to exit with a parse error. Any further chasing of edge cases is deferred to future work.

  • New module: Text.Pandoc.Readers.Mdoc, exporting readMdoc [API change].

  • Issue warnings for duplicate YAML metadata keys (#10312).

  • Ensure that --sandbox affects --embed-resources. Previously it did not (contrary to what was implied by the manual), which means that an image with URL /etc/passwd would leak an encoded version of that file to HTML output with --self-contained or --embed-resources, even if --sandbox was used. Thanks to Samuel Mortenson for pointing out the issue.

  • Text.Pandoc.App.OutputSettings: add sandbox' function. This computes the sandboxed files from Opt and avoids code repetition.

  • Docx reader:

    • Parse index references as empty spans with attributes (#10171). Attributes included are entry, and optionally bold, italic, yomi, see.
    • Don’t create multiple paragraphs for title or subtitle (#10359). If there are multiple paragraphs with Title or Subtitle style, use only the first for metadata.
    • Handle case where Zotero itemData has different id from the citationItem id. In this case we use the citationItemId in the bibliography as well, overriding the referenceId in the itemData (#10366).
  • LaTeX reader:

    • Put parsed minipage in specially marked Div (#10266).
  • HTML reader:

    • Parse footnotes defined by dpub-aria roles (#5294).
  • MediaWiki reader:

    • Fix indented tables with caption (#10390).
    • Fix parsing of col/rowspan (#6992).
  • Typst reader:

    • Avoid generating empty paragraphs.
    • Support underparen, overparen.
    • Fix #quote attribution. If attribution is not present, don’t print the -- (#10320).
    • Fix typo in unicode code point for em dash (see #10320).
  • Commonmark reader:

    • implicit_figures should check for empty caption and not produce an implicit figure in this case (#10429).
  • RST reader:

    • Use a new one-pass parsing strategy. Instead of having an initial pass where we collect reference definitions, we create links with target ##SUBST##something or ##REF##something or ##NOTE##something, and resolve these in a pass over the parsed AST. This allows us to handle link references that are not at the top level (#10281).
    • Ignore newlines in URL in explicit link (#10279).
    • Handle block level substitutions.
    • Support :file: on raw directive (#8584).
    • Implement option lists (#10318).
    • Avoid putting metadata in Para (#7766). Create MetaInlines when possible, just as with markdown input. MetaBlocks is still used when there are multiple paragraphs or non-paragraph content. This change also affects field lists.
    • Fix linked substitutions (#6588). E.g. |Python|_.
    • Support inline anchors (#9196).
    • Explicit links define references (#5081). For example, Go to `g`_ `g <www.example.com>`_. should produce two links to www.example.com.
  • EPUB writer:

    • Use standardized filename for cover image instead of the original name (#10404). This avoids problems with e.g. filenames containing spaces.
  • Markdown writer:

    • Issue INFO warning when not rendering table, e.g., when raw_html is disabled and the table can’t be fit into a supported markdown table format (#10407).
    • Respect empty LineBlock lines in plain output (Evan Silberman). The plain writer behaved as a markdown variant with Ext_line_blocks turned off, and so empty lines in a line block would get eliminated.
  • LaTeX writer:

    Ensure that beamer footnotes go on frame, not column (#5769).

  • HTML writer:

    • Unwrap empty incremental divs (#10328, Albert Krewinkel). Divs are unwrapped if the only purpose of the div seems to be to control whether lists are presented incrementally on slides.
  • Typst writer:

    • Make template sensitive to a page-numbering variable (#10370). This can be set to an empty string (or, in metadata, to false) for no page numbers.
    • Make smart extension work (#10271). If smart is not enabled, a command in the default template will disable smartquote substitutions. When smart is enabled, render curly apostrophes as straight and escape straight apostrophes. When smart is disabled, render curly apostrophes as curly and don’t escape straight apostrophes. Similarly for quotes, em and en dashes. This should give more idiomatic typst output, with fewer unnecessary escapes.
  • ANSI writer:

    • Respect empty LineBlock lines (Evan Silberman).
  • JATS writer:

    • Correct spelling of suppress attribute (#10350, Andreas Deininger).
  • Typst template:

    • Remove definitions.typst partial.
    • Remove unnecessary definition of endnote.
    • Incorporate the one remaining definition into default.typst.
    • Use typst 0.12 code for two column layout (#10294, Luis Rivera).
    • Note: the new templates presuppose typst 0.12; if you try to use an earlier version of typst, an error will be raised.
  • LaTeX/Beamer template:

    • Split fonts.latex partial into two parts: fonts.latex and font-settings.latex.
    • In beamer template, load beamer theme between fonts.latex and font-settings.latex. This allows a theme (such as metropolis) to set its own default font, while still allowing the user to override it. This fixes a regression in pandoc 3.5 (#10297).
    • Note: Users who have custom templates based on pandoc 3.5 templates will need to add font-settings.latex() after fonts.latex() in the latex template. In a beamer template, the beamer theme-setting code needs to be moved between these two partials.
  • ConTeXt template: Ensure that font names don’t wrap (#10305).

  • epub.css: remove background-color (#10264, Suraj Patil). With this greyish background color, epubs look bad on a Kindle (#10263).

  • Text.Pandoc.ImageSize: add WebP support (Evan Silberman, #10397). Add Webp constructor on ImageType [API change].

  • Text.Pandoc.Readers.Roff and a new unexported module Text.Pandoc.Readers.Roff.Escape: parameterize Roff escaping (Evan Silberman) [API change]. This allows code to be reused between the mdoc and man readers, despite the differing Token types.

  • Text.Pandoc.PDF:

    • PDF via LaTeX: always do max runs if toc is present (#10308). The old method (checking to see if toc hash had changed) is not completely reliable.
    • Use .source extension, not .html, in toPdfViaTempFile (#10314).
  • Text.Pandoc.Logging: add YamlWarning constructor to LogMessage [API change] (#10312).

  • Text.Pandoc.Format: remove duplicate typst entry (#10388, Caleb Mclennan).

  • Fix a typo in the ua.yaml localization for ‘See’ (Jens).

  • Lua subsystem (Albert Krewinkel):

    • Remove prefixes from Lua type names (#8574). Lua type names were inconsistent with regard to the use of prefixes; all prefixes are removed now, and Lua types now have the same name as the Haskell types. The use of app-specific prefixes is suggested by the Lua manual to avoid collisions. However, this shouldn’t be a problem with pandoc, as it cannot be used as a Lua package.
  • doc/libraries.md: Add newly developed Haskell packages. Sort list alphabetically (Albert Krewinkel).

  • doc/lua-filters.md: document pandoc.List:iter method (Albert Krewinkel). List objects have a new function iter that returns an iterator function that returns the next list item on each call.

  • MANUAL.txt:

    • Clarify what the example of YAML EPUB metadata shows (#10405).
    • Fix typo in template syntax (#10265, Pascal Wagler).
    • Update manual with information on openxml template (#10273).
    • Clarify that --variable can only assign string values (#10298).
  • Fix comments in TEI writer referring to DocBook (#10430, Evan Silberman).

  • Fix several typos in documentation (#10349, Andreas Deininger).

  • Allow Diff 1.0.

  • Add font-settings.latex partial to pandoc.cabal (#10379).

  • Bump upper bound for data-default.

  • Use latest typst, texmath, pandoc-lua-marshal, commonmark-pandoc, commonmark-extensions, skylighting, skylighting-format-blaze-html.

pandoc 3.5 (2024-10-04)

  • Add command-line options --list-of-figures/--lof and --list-of-tables/--lot (#10029, Akash Patel). Only docx, latex, and context are affected by these options currently. Setting the lof and lot variables will also work for the formats that are currently supported.

  • Defaults files: interpolation of environment variables now works for to and from fields (#8024). This is needed because these files can contain paths of custom readers/writers.

  • Docx reader:

    • Reset lists after headers in same list numId (#10258). To accomplish this, we add a Heading constructor to BodyPart and include on it all the information list items have.
  • DocBook reader:

    • Parse id, class, and tabstyle on tables (#10181, Erik Rask). Add parsing of id (xml:id), class, and tabstyle XML attributes for table and informaltable in the DocBook reader. The tabstyle value is put in the ‘custom-style’ attribute.
  • Dokuwiki reader:

    • Be more forgiving about misaligned lists, like dokuwiki itself (#8863).
    • Improve blockquote parsing in dokuwiki. Allow for quoted code blocks.
    • Enable smart extension.
    • Properly parse -- and --- as dashes.
    • Fix block quote behavior (#6461). Blockquotes are not really block containers in DokuWiki; the lines are interpreted literally (so, e.g., you can’t start a list), and line breaks are added at the ends.
  • EPUB reader:

    • Fix links to other files in the EPUB, making them internal links to a fragment derived from the filename (#10207). There was already code to handle links like #foo, but not to handle links like ch0001.html#foo.
  • LaTeX reader:

    • Add em, ex, px, mu to list of units for dimension args (#10212).
  • ANSI writer:

    • Fix subscripts (Evan Silberman).
  • DokuWiki writer:

    • Don’t emit <HTML> tags (#7413). The use of these tags is now strongly discouraged for security reasons, and will be removed. We previously used them as a fallback for lists that could not be represented using DokuWiki syntax, e.g. ordered lists with fancy numbers or lists with multiple blocks in their items. We also used them for block quotes with multiple blocks as their contents. We now use the <WRAP> syntax (from the optional WRAP plugin) to handle lists with multiple blocks as their contents. A new method of handling block quotes with complex contents has the side benefit of also handling nested block quotes, which weren’t supported before. <HTML> and <html> tags are only for raw HTML blocks and inlines, and only if the raw_html extension is enabled. (It is now a valid extension for dokuwiki, though off by default.)
  • Docx writer:

    • Support --list-of-figures and --list-of-tables (or lof and lot variables) (Akash Patel).
  • HTML writer:

    • Don’t emit missing title/lang warnings if templates does not contain the pagetitle or lang variables respectively (#9370).
  • LaTeX writer:

    • Better fix for lists in definition lists (#10241). In commit a26ec96d89ccf532f7bca7591c96ba30d8544e4a we added an empty \item[] to the beginning of a list that occurs first in a definition list, to avoid having one item on the line with the label. This gave bad results in some cases (#10241) and there is a more idiomatic solution anyway: using \hfill.
    • Avoid error on refs div with empty citations (#10185). If there are no citations, don’t emit an empty CSLReferences environment.
  • RST writer:

    • Change bullet list hang from 3 to 2. This accords with the style in the RST reference docs.
    • Handle cases where indented context starts with block quote (#10236). In these cases we emit an empty comment to fix the point from which indentation is measured; otherwise the block quote is not parsed as a block quote. This affects list items and admonitions.
    • Don’t enclose the list table in a .. table::; this leads to doubled captions (#10226).
    • Fix alignment of list table items corresponding to cells (#10227).
  • JATS template:

    • Support floats-group (Albert Krewinkel, see #10196). The content of the floats-group variable is now rendered in a <floats-group> element when using the publishing or archiving tag sets.
  • LaTeX and Beamer templates:

    • Split old default.latex into two templates, default.latex and default.beamer, factoring common parts into partials: fonts.latex, common.latex, passoptions.latex, hypersetup.latex, after-header-includes.latex.
    • Make default.beamer the default template for beamer.
    • Add shorttitle, shortsubtitle, shortauthor, shortinstitute, shortdate variables to beamer template (#10248, Thomas Hodgson).
    • Make --number-sections work with beamer (#12045, Thomas Hodgson).
    • Support a list of images for titlegraphic in beamer template (#10246, Thomas Hodgson). Title graphic options will be applied to each title graphic. Images will be separated by \enspace.
    • Beamer theme options (#10243)
    • Add theme options to beamer template: colorthemeoptions, fontthemeoptions, innerthemeoptions, outerthemeoptions (#10243, Thomas Hodgson).
    • Don’t load amsmath, amssym in beamer template. These are loaded by beamer automatically.
  • Text.Pandoc.SelfContained:

    • Improve handling of links to remote CSS (#10261).
  • Text.Pandoc.Class:

    • Allow extracting data: URIs even in PandocPure (--sandbox) (#10249).
    • Export extractURIData [API change].
  • Text.Pandoc.PDF:

    • Read .toc and .log files from output directory (#10186). When this is different from the input directory, this is where .toc and .log files are written.
  • Text.Pandoc.Shared:

    • Modify addPandocAttributes for changes in commonmark-pandoc. The new commonmark-pandoc version automatically adds the attribute wrapper="1" on all Divs and Spans that are introduced just as containers for attributes that belong properly to their contents. So we don’t need to add the attribute here. This gives much better results in some cases. Previously the wrapper attribute was being added even for explicit Divs and Spans in djot, but it is not needed in these cases.
  • Text.Pandoc.Options:

    • Add writerListOfFigures and writerListOfTables fields to WriterOptions (#8245, Akash Patel). [API change]
  • Text.Pandoc.App:

    • Add optListOfFigures and optListOfTables to Opt (#8245) [API change].
  • Lua subsystem (Albert Krewinkel):

    • Update List module (#9835). The module now comes with a method :at(index[, def]) that allows to access indices, accepts negative indices to count from the end, and will return the def value as a default if the list has no item at the given position. Furthermore, the list constructor pandoc.List now accepts iterators. E.g., pandoc.List(text:gmatch '%S+') returns the list of words in text.
    • Support character styling via pandoc.layout. The Doc values produced and handled by the pandoc.layout module can now be styled using bold, italic, underlined, or strikeout. The style is ignored in normal rendering, but becomes visible when rendering to ANSI output. The pandoc.layout.render function now takes a third parameter that defines the output style, either plain or ansi.
    • It is now possible to return a single filter from a filter file, e.g.
      -- Switch single- and double quotes
      return {
        Quoted = function (q)
          elem.quotetype = elem.quotetype == 'SingleQuote'
            and 'DoubleQuote' or 'SingleQuote'
          return elem
        end
      }
      
      The filter must not contain numerical indexes, or it might be treated as a list of filters.
    • Add list_of_figures and list_of_tables to writer options (Akash Patel).
  • Use latest releases of commonmark, commonmark-pandoc, texmath, djot.

  • Stop depending on package SHA (Albert Krewinkel). Use crypton instead.

  • linux/make_artifacts.sh: add riscv64 support (Olivier Benz).

  • Fix invalid XML in test/docx/normalize.docx (#10242).

  • doc/lua-filters.md: list functions in pandoc.utils alphabetically (Albert Krewinkel).

  • MANUAL.txt:

    • Clarify use of beamerarticle variable (#10250).
    • Add clarification to address user issues like #6704 (Yehuda Katz).

pandoc 3.4 (2024-09-09)

  • New output format: ansi (for formatted console output) (Evan Silberman). Most Pandoc elements are supported and printed in a reasonable way, if not always ideally. This version does no detection of terminal capabilities, nor does it fall back to different output styles for less-capable terminals.

  • Add command line options --table-caption-position and --figure-caption-position. These allow the user to specify whether to put captions above or below tables and figures, respectively. The following output formats are supported: HTML (and related such as EPUB), LaTeX (and Beamer), Docx, ODT/OpenDocument, Typst.

  • Change default --pdf-engine via HTML to WeasyPrint (#10142). wkhtmltopdf is deprecated. weasyprint is the easiest-to-install, maintained alternative. For better results, one might prefer pagedjs-cli.

  • Org reader:

    • Fix parsing of src blocks with an -i flag (#10071, Albert Krewinkel). Tabs are now preserved in the contents of src blocks if the the block has the -i flag.
  • RTF reader:

    • Handle images inside shp contexts (#10145).
  • RST reader:

    • Improve simple table support (#10093). Multiline rows occur only when the first cell is empty; we were previously treating lines with any empty cell as row continuations. In addition, we no longer wrap multiline cells in Para if they can be represented as Plain. This is consistent with docutils behavior.
  • LaTeX reader:

    • Math environments don’t have bracketed options (#10160).
    • Parse nested tabular environments (#4746).
  • Typst reader:

    • Change how “block” elements are handled. Previously they were always parsed as divs. But actually they can occur in some “inline” contexts. Now we first try to parse them as inlines, and only as blocks if that fails. A surrounding Div or Span element is added only if there is an identifier.
  • HTML reader:

    • Only parse main element’s contents (if present) (#10140). If main has an id or class, we include a div with that id or class; otherwise just the contents.
    • Read TeX annotation in MathML content if present (#9971).
    • Better handle KaTeX-generated math (#9971). KaTeX emits the mathml followed by a span with an HTML fallback. Previously pandoc was converting both. We now ignore the HTML fallback span, marked with class katex-html.
  • Docx reader:

    • Add “SuppressAuthor” and “AuthorOnly” to citationMode when +citations is used (thomjur).
  • New module: Text.Pandoc.Writers.ANSI [API change] (Evan Silberman).

  • Docx writer:

    • Support custom-style attribute for docx table (Sebbones).
    • Support --number-offsets.
    • Make table/figure rendering sensitive to caption position settings.
  • OpenDocument writer:

    • Make table/figure rendering sensitive to caption position settings.
  • Typst writer/template:

    • Implement figure caption positions by triggering a show rule in the default template, which determines caption positions for figures and tables globally.
    • Don’t include trailing semicolon after @ style citations with suffixes (#10148).
    • Template: move header-includes before show doc (#9996, Gordon Woodhull).
  • LaTeX writer:

    • Make table/figure rendering sensitive to caption position settings (#5116).
    • Preserve locator labels with --natbib (#10057).
  • HTML writer/template:

    • Make <figcaption> placement sensitive to caption position settings. For tables, <caption> must be the first element, and positioning is determined by CSS, for here we set a variable which the default template is sensitive to.
    • Use makeSectionsWithOffsets for writerNumberOffsets, instead of the old, inefficient code.
    • Don’t add doc-biblioref role to every link in a citation; only to links to the bibliography (#10156).
    • Add data- when rendering label attribute (#10048).
  • Markdown writer:

    • Avoid emitting markdown caption if table has fallen back to raw HTML, which will then contain a <caption> tag (#10094).

    • Make math sensitive to tex_math_gfm extension (#9121). This means that in GFM output, the “new style” math will be used by default, e.g.

      $`x=y`$
      
      ```math
      x = y
      ```
      

      To defeat this and get the older behavior, namely

      $x=y$
      
      $$x=y$$
      

      one could use -t gfm-tex_math_gfm.

  • AsciiDoc writer:

    • Add link: prefix when needed (#10105). AsciiDoc requires it except for http, https, irc, mailto, ftp schemes (#10105).
    • Preserve original base level (#10062). We used to normalize so that the base level is always 1, but asciidoc no longer seems to care about that, and the behavior creates difficulties when we are converting fragments.
    • Don’t emit empty figure caption (#10047).
  • ODT writer:

    • Add TableCaption to styles.xml (#10058, Ian Max Andolina).
  • LaTeX template:

    • Fix wrong beamer color in (sub)section page (Jonathan).
  • Text.Pandoc.Options:

    • Add CaptionPosition and new WriterOptions fields writerFigureCaptionPosition and writerTableCaptionPosition [API change].
  • Text.Pandoc.Opt:

    • Change default for optNumberOffset to []. This behaves the same as [0,0,0,0,0].
    • Add Opt fields optFigureCaptionPosition and optTableCaptionPosition [API change].
  • Text.Pandoc.Format: change formatFromFilePaths so that it is smarter about URLs. URLs are parsed, and we take the format from the path component, if present (#10141). This means that https://emacs.org/ will be treated as HTML, while https://emacs.org/sample.org will be treated as Org.

  • Text.Pandoc.URI:

    • Add unofficial gemini: to list of URI schemes (Pau RE).
  • Text.Pandoc.Shared:

    • Add makeSectionsWithOffsets [API change].
    • Remove `stripEmptyParagraphs [API change] (Albert Krewinkel). This function is no longer used.
  • Text.Pandoc.Highlighting: Expose formatANSI [API change] (Evan Silberman).

  • Text.Pandoc.Writers.Shared: export to{Sub,Super}scriptInline [API change] (Evan Silberman).

  • Remove use of partial functions (e.g. head) in code.

  • Use latest skylighting-core, skylighting, doclayout, texmath, typst.

  • pandoc-lua-engine: Add accessors for several writer options, including some that were added in previous releases.

  • pandoc-server: Initialize some missing fields in WriterOptions: writerEpubTitlePage, writerChunkTemplate, writerListTables, writerFigureCaptionPosition, writerTableCaptionPosition.

  • CONTRIBUTING.md: Summarize steps for adding a new cli option.

  • MANUAL.txt:

    • Clarify that the --number-offset option should only directly affect numbering of the first section heading in a document; subsequent headings will increment normally.
    • Fix asciidoc link (#10039).
    • Fix CSL Docs broken link (#10100, Tristano Ajmone).
    • Document the use of luatexja when CJKmainfont is used with lualatex (#3873, Kolen Cheung).
    • Add a citations (typst) section to the manual (#9127).
    • Clarify that citations affects both input and output for org.
    • Add note on --citeproc that you may need to disable citations extension on the output format (e.g., -t markdown-citations) to see the rendered citation (#9127, #10012).
  • INSTALL.md — reorganise info on static binaries and add conda-forge install options (#10098, #10069, Ian Max Andolina).

pandoc 3.3 (2024-07-28)

  • New cli option: --link-images. This causes images to be linked rather than embedded in ODT.

  • Allow --number-sections to take an optional true|false argument.

  • RTF reader:

    • Handle \*\shppict without dropping image (#10025).
  • TWiki Reader:

    • Recognize WikiWords as internal links (#9941).
    • Avoid partial function.
  • Typst reader:

    • Ignore ‘pad’ and just parse its body (#9958).
    • Use typst 0.5.0.5. Fixes parsing of equations like $1.$.
  • Docx writer:

    • Fix regression with nested lists (#9994). The bug affects e.g. ordered lists with bullet sublists; after the sublist the top-level list reverts to bullets instead of being properly numbered. This is a regression introduced in version 3.2.1.
  • BibTeX writer:

    • Ensure that “literal” names are enclosed in braces (#9987).
  • Man writer:

    • Use default middle header when metadata does not include header (#9943). This change causes pandoc to omit the middle header parameter when header is not set, rather than emitting "". The parameter is optional and man will use a default based on the section if it is not specified.
  • HTML templates: don’t load polyfill (#9918). This was added in a period when MathJaX required polyfill. MathJaX no longer recommends this and polyfill should no longer be necessary on any reasonably modern browser.

  • Translations:

    • Add ua.yaml (Jens Oehlschlägel).
    • Add a script (tools/update-translations.py) and Makefile target (update-translations) to update translation data automatically from babel and polyglossia upstream (Stephen Huan).
    • Use this script to update language data, increasing the number of languages we cover (Stephen Huan). Fix a few small bugs in existing translations.
  • Fix some mistakes with Japanese language code (#9938). In several places we were mistakenly assuming that the BCP 47 code for Japanese language was jp. It is ja.

  • Text.Pandoc.Options:

    • New field in WriterOptions: writerLinkImages [API change] (#9815).
  • Text.Pandoc.App.Opt:

    • New field in Opt: optLinkImages [API change] (#9815).
  • Lua subsystem:

    • Keep lpeg and re as “loaded” modules (Albert Krewinkel). The modules lpeg and re are now treated as if they had been loaded with require. Previously the modules were only assigned to global values, but could be loaded again via require, thereby allowing to use a system-wide installation. However, this proved to be confusing.

      The old behavior can be restored by adding the following lines to the top of Lua scripts, or to the init.lua in the data dir.

      debug.registry()['_LOADED'].lpeg = nil
      debug.registry()['_LOADED'].re = nil
      
  • pandoc-cli: Include pandoc copyright in Lua version info (Albert Krewinkel).

  • pandoc-cli: Refer printing of version info to the Lua interpreter (Albert Krewinkel). The Lua interpreter no longer terminates when called with -v or --version arguments, thus improving compatibility with the default lua interpreter program.

  • Avoid partial functions in JATS reader, DocBook writer, Haddock reader.

  • Allow tls 2.1.x.

  • MANUAL.txt:

    • Make documentation of extensions clearer (#9060).
    • Fix section level for two Extensions entries.
  • lua-filters.md: Partially autogenerate docs for module pandoc (Albert Krewinkel). The documentation system isn’t powerful enough to generate the full documentation automatically.

pandoc 3.2.1 (2024-06-24)

  • Fix gfm_auto_identifiers to replace emojis with their aliases, as documented (#9876).

  • CSV reader:

    • Turn line breaks into LineBreaks not SoftBreaks (#9797).
  • Docx reader:

    • Support task lists (#8211).
    • Fix a small bug in parsing delimiters in numbered lists, which led to the default delimiter being used wrongly in some cases.
    • Improve handling of captions.
      • Turn captioned images into Figure elements. Closes #9391.
      • Improve the logic for associating elements with captions (#9358).
      • Ensure that captions that can’t be associated with an element aren’t just silently dropped (#9610).
    • Support HorizontalRule. We support both pandoc-style and the style described on a Microsoft support page, an empty paragraph with a bottom border (#6285).
    • React to "left" value on jc attribute.
    • Handle column and cell alignments (#8551). We take the column alignments from the first body row.
    • Fix a bug that caused comments inside insertions or deletions to be ignored (#9833).
  • HTML reader:

    • Better handle non-li elements in ul and ol (#9809). For example, a p after a closed li will be incorporated into the previous li. This mirrors what browsers do with this invalid HTML.
  • LaTeX reader:

    • Fix parsing of dimensions beginning with ., e.g. \kern.1pt (#9902).
  • Markdown reader:

    • Allow author-only textual citations (#7219). E.g. -@reese2002 outside of brackets.
  • RST reader:

    • Tighten up rules for when emphasis can start (#9805).
    • Support :cite: role with citeproc (#9904). A subset of the functionality of the sphinxcontrib-bibtex extension to Sphinx is supported.
  • Textile reader:

    • Don’t let spans begin right after a symbol (#9878).
  • Typst reader:

    • Fix an incomplete pattern match (#9807).
    • Handle inline bodies ending in a parbreak. E.g.
      `#strong[
      test
      ]
      
  • ConTeXt template: remove \setupbackend[export=yes] (#9820).

  • Docx writer:

    • Allow OpenXML templates to be used with docx (#8338, #9069, #7256, #2928). The --reference-doc option allows customization of styles in docx output, but it does not allow one to adjust the content of the output (e.g., changing the order in which metadata, the table of contents, and the body of the document are displayed), or adding boilerplate text before or after the document body. For these changes, one can now use --template with an OpenXML template. (See the default openxml template for a sample.) --include-before-body and --include-after-body can also now be used with docx output. The included files must be OpenXML fragments suitable for inclusion in the document body.
    • New unexported module Text.Pandoc.Writers.Docx.OpenXML.
    • Omit jc attribute on table cells with AlignDefault (#5662).
    • Better formatting for task lists. Task lists are now properly formatted, with no bullet (#5198).
    • Replace an expensive generic traverse to remove Space elements, for better performance.
    • Wrap figures with id in a bookmark (#8662).
    • Add eastAsia font hints to w:r (#9817). We do this when the text in the run contains any CJK characters. This ensures that ambiguous code points (e.g. quotation marks) will be represented as “wide” characters when together with CJK characters.
    • Clean up Abstract Title and Subtitle in default reference docx. Center Subtitle, remove color.
  • HTML writer:

    • Ensure URI escaping needed for html4 (#9905). Unicode characters need not be escaped for html5, and still won’t be.
    • Don’t emit unnecessary classes in HTML tables (#9325, Thomas Soeiro). Pandoc used to emit a header class on the tr element that forms the table header. This is no longer needed, because head > tr will do the same thing. Similarly, pandoc used to emit even and odd classes on trs, allowing striped styling. This is no longer needed, because one can use e.g. tbody tr:nth-child(2n). Compatibility warning: users who relied on these classes to style tables may need to adjust their CSS.
  • JATS writer:

    • Support supplementary-material in metadata for jats_articlepublishing (#9818).
  • LaTeX writer:

    • New method for ensuring images don’t overflow (#9660). Previously we relied on graphicx internals and made global changes to Gin to force images to be resized if they exceed textwidth. This approach is brittle and caused problems with \includesvg (see #9660). The new approach uses a new macro \pandocbounded that is now defined in the LaTeX template. (Thanks here to Falk Hanisch in https://github.com/mrpiggi/svg/issues/60.) The LaTeX writer has been changed to enclose \includegraphics and \includesvg commands in this macro when they don’t explicitly specify a width or height. In addition, the writer now adds keepaspectratio to the \includegraphics or \includesvg options if height is specified without width, or vice versa. Previously, this was set in the preamble as a global option. Users should attend to the following compatibility issues:
      • If custom templates are used with the new LaTeX writer, they will have to be updated to include the new \pandocbounded macro, or an error will be raised because of the undefined macro.
      • Documents that specify explicit dimensions for an image may render differently, if the dimensions are greater than the line width or page height. Previously pandoc would shrink these images to fit, but the new behavior takes the specified dimensions literally. In addition, pandoc previously always enforced keepaspectratio, even when width and height were both specified, so images with width and height specified that do not conform to their intrinsic aspect ratio will appear differently.
    • Task lists must be unordered (#9185).
    • Specify language option for selnolig and only include it if english or german is used (#9863). (This includes changes to the LaTeX template.) This should restore proper ligature suppression when lualatex is used.
    • Fix --toc-depth with beamer output (#9861). Previously only top-level sections were ever included in the TOC, regardless of the setting of --toc-depth.
    • Use \linewidth instead of \columnwidth or \textwidth for resizing figures, table cells, etc. in LaTeX (#9775). \linewidth, unlike the others, is sensitive to indented environments like lists.
  • LaTeX template: put babel-lang in options to beamer (#9868). This is required to make beamer use proper localized terms for things like “Section.”

  • Markdown writer:

    • Don’t print extra caption when using implicit_figures.
    • Ensure blank line after HTML blocks in commonmark-based formats (#9792).
    • Fix bug rendering block quotes in lists (#9908).
  • Texinfo writer:

    • Ensure proper escaping in all node/link contexts.
    • Target node rather than anchor when possible in internal links.
    • Remove illegal characters from internal link anchors (#6177).
    • Use two commas not one in @ref.
    • Don’t add anchors to headings. We don’t need them, now that we make internal links use the node.
    • Avoid duplicate node names.
    • Improve menus. Properly handle the case where the node name is different from the descriptive title.
  • Texinfo template: add variables for filename and version.

  • Typst writer:

    • Support ‘.typst:no-figure’ and ‘typst:figure:kind=kind’ attributes (#9778, Carlos Scheidegger). This extends support for fine-grained properties in Typst. If the typst:no-figure class is present on a Table, the table will not be placed in a figure. If the typst:figure:kind attribute is present, its value will be used for the figure’s kind (#9777). These features are documented in doc/typst-property-output.md.
  • Typst template:

    • Add subtitle (#9747, Mickaël Canouil).
    • Use content rather than string for title, author, date, email (#9823). This allows formatting in title, author, date, and email fields. Since the PDF metadata requires a string, and typst only converts the title to a string (not the authors), we use
  • Textile writer:

    • Get rid of header, odd, even classes on tr (#9376).
  • Text.Pandoc.Class:

    • fillMediaBag: Convert IOErrors to warnings when fetching absolute paths (#9859, Albert Krewinkel). This will allow many conversions that would have failed with an error to succeed (albeit without images or other needed resources).
  • Text.Pandoc.ImageSize:

    • Don’t prefer exif width/height when they conflict with image width/height (#9871). That was a mistaken call in #6936. Usually when these values disagree, it is because the image has been resized by a tool that leaves the original exif values the same, so the width/height metadata are more likely to be correct that exif width/height.
  • Text.Pandoc.SelfContained:

    • Strip CRs from XML before base64 encoding for data URI (so tests can work on Windows).
    • Only create <svg> elements for SVG images when the image has the class inline-svg. Otherwise just use a data URI as we do with other images (#9787).
  • Lua subsystem (Albert Krewinkel):

    • Split Init module into more modules. The module has grown unwieldy and is therefore split into three internal Haskell modules, Init, Module, and Run.
    • Add function pandoc.utils.run_lua_filter (#9803).
    • Add function pandoc.template.get (#9854, co-authored by Carsten Gips). The function allows to specify a template with the same argument value that would be used with the --template command line parameter.
    • Keep CommonState object in the registry. The state is an internal value and should be treated as such. The PANDOC_STATE global is merely a copy; unsetting the global no longer breaks the Lua engine.
    • Allow passing an environment to run_lua_filter. The default is now to use a copy of the global environment when running a filter; this ensures better separation when run_lua_filter is used multiple times. A custom environment can be specified via the optional third parameter.
    • Set pandoc.List as default metatable for JSON lists (#9834). Lists created by pandoc.json.decode now behave like lists generated via pandoc.List. This also ensures that pandoc.List tables are encoded as JSON arrays when passed to pandoc.json.encode.
  • Text.Pandoc.Writers.Shared: export toTaskListItem [API change].

  • Add unexported module Text.Pandoc.Char. This exports isCJK. Use this instead of locally defined isCJK in T.P.Readers.MediaWiki.

  • MANUAL.txt:

    • Remove false claim that Lua mode does not support -i (#9757, Ian Max Andolina).
    • Use level-3 headings for extensions (to avoid gaps).
    • Add anchor for tagging extension.
    • Remove explicit referencess to generate anchors. These will be linkified automatically.
    • Fixed links to option--reference-doc.
    • Add a note that column widths aren’t supported in pptx for Divs with class columns (#9890).
    • Fix alerts example (#9826, Ian Max Andolina).
    • Fix markup of babelfonts example code (Albert Krewinkel).
  • doc/custom-writers.md:

    • Fix usage of Template in example (Albert Krewinkel).
    • Document the separator arg of Writer.Blocks (Albert Krewinkel).
  • doc/lua-filters.md (Albert Krewinkel):

    • Fix outdated documentation for math and quoting functions and fields.
    • Autogenerate docs for module pandoc.template and pandoc.layout.
    • Document operators of the “Doc” type.
  • pandoc-lua-engine: depend on pandoc >= 3.2 (see #9755).

  • Allow crypton-connection 0.4, time 1.14.

  • Allow tasty-quickcheck 0.11.

  • Use latest emojis, skylighting, skylighting-core, citeproc, djot, commonmark-extensions, typst-hs

pandoc 3.2 (2024-05-11)

  • Change to --file-scope behavior (#8741): previously a Div with an identifier derived from the filename would be added around the contents of each file. This caused problems for “chunking” files into chapters, e.g. in EPUB. We no longer add the surrounding Div. This cooperates better with chunking. Note, however, that if you have relied on the old behavior to link to the beginning of the contents of a file using its filename as identifier, that will no longer work.

  • Markdown reader:

    • Allow repeated labels in numbered example lists. Previously if you tried to use the same label as an earlier example list item, you’d get a new number, not the old one, and references to the label would go to the second occurrence. Now an existing label will be reused, and no new number will be generated. Caveat: this only works reliably when the re-used example list item occurs by itself in a list, or occurs in a list of previously used example list items that occur in exactly the same order as previously.
    • Fix normalCite so it doesn’t consume past a closing ] boundary (#9710). This was causing an exponential performance bug on long lists of links containing potential emphasis characters.
    • Generalize inlinesInBalancedBrackets to inBalancedBrackets, with a parameter for the inner parser.
    • Auto-close unclosed divs (#9635). This applies to both fenced and HTML-ish varieties. Otherwise we face an exponential performance problem with backtracking. A warning is issued when a div is implicitly closed.
  • RST reader:

    • Fix figclass and align annotations for figures (#7473, Gokul Rajiv).
  • LaTeX writer:

    • Use polytonicgreek instead of polutonikogreek with babel (#9698). polutonikogreek is outdated. Also recognize both in the LaTeX reader.
    • Improve treatment of math inside soul commands (#1294, #5529). soul commands (ul, hl, st) are very fragile and the math must be handled specially.
  • LaTeX reader:

    • Fix over-eager macro expansion in conditionals (#9676).
    • Parse flalign, flalign* math environments (#9679). We parse these as Math elements with an aligned environment. Semantically it’s not exactly the same, but better than falling back to raw LaTeX.
  • LaTeX template: add titlegraphicoptions variable (#9207, Guilhem Saurel).

  • Docx reader:

    • Issue warning rather than error when we can’t parse EndNote citations (see #8433).
    • Fix anchor in header after anchor (#9626, mbracke).
  • RTF reader:

    • Don’t try to handle non-default code pages (#9683). Emit a warning instead.
  • OpenDocument writer:

    • Implement custom-style for spans (#9657).
  • Typst writer:

    • Add blank line in definition lists with multiple definitions (see #9704).
    • Property output (#9648, Gordon Woodhull). The Typst writer will pass on specially marked attributes as raw Typst parameters on selected elements. This allows extensive customization using filters. A separate document (doc/typst-property-output.md) has been added that provides extensive documentation and examples of the use of this feature.
  • Markdown writer:

    • Don’t try to align columns in pipe tables with lines greater than COLUMNS. The alignment just reduces readibility when the lines soft wrap.
    • Don’t use raw_attribute syntax for raw blocks, unless there is no other option (see #9677). Macros in a raw_attribute block don’t get interpreted when it is read again by pandoc’s markdown reader.
  • ConTeXt writer:

    • Replace depreciated \sc with \setsmallcaps (#9518, James P. Ascher).
  • Docx writer:

    • Use conventional styles/indents for Word bullet lists (#7280).
  • reference.docx:

    • Use current standard Word theme (#7280). This includes using the sans-serif font Aptos instead of the serif font Cambria, and default colors for headings.
    • Remove duplicate DefaultParagraphFont in styles.xml.
  • New module Text.Pandoc.Transforms [API change] (Albert Krewinkel). This module exports the following functions which were formerly exported from Tetx.Pnadoc.Shared: headerShift, filterIpynbOutput, eastAsianLineBreakFilter, as well as some functions that were previously not exported.

  • Text.Pandoc.Shared:

    • headerShift, filterIpynbOutput, and eastAsianLineBreakFilter are no longer exported from this module; they are now exported from Text.Pandoc.Transforms (Albert Krewinkel).
  • Text.Pandoc.Error:

    • Improve reporting of unsupported extensions errors (#9247, Albert Krewinkel).
  • Text.Pandoc.App:

    • Move “transforms” after filters (#9664). This will mean that --shift-heading-level-by affects a heading added by reference-section-title.
  • Text.Pandoc.App.CommandLineOptions:

    • Simplify output for OptVersion. Omit the information about versions of dependencies. We no longer emit version info at this level anyway; pandoc-cli intercepts and handles --version. This code would only be called if someone used the pandoc library function handleWithOptInfo in their own program.
  • Text.Pandoc.ImageSize:

    • Export ImageSize datatype.
  • Text.Pandoc.SelfContained:

    • Merge class attribute when both img and svg specify it (#9652, Carlos Scheidegger).
  • Text.Pandoc.Logging:

    • Add ScriptingInfo constructor for LogMessage [API change] (Albert Krewinkel).
    • Make DocxParserWarning a WARNING, not INFO. [API change].
    • Add UnsupportedCodePage constructor to LogMessage [API change].
    • Add UnclosedDiv constructor for LogMessage [API change].
  • Lua subsystem (Albert Krewinkel:

    • Add a pandoc.log module.
    • Uupdate to pandoc-lua-marshal version 0.2.7 (#8916). This fixes counterintuitive behavior of the content property on BulletList and OrderedList items. Unmarshalling of that field now matches the behavior of the constructor.
    • Use newest zip module. This adds a symlink function to Entry objects, allowing to check if an entry represents a symbolic link.
    • Improve pandoc.json.decode docs.
    • Update and fix docs for pandoc.types.Version and pandoc.utils.type.
    • Add new module pandoc.image The module provides basic querying functions for image properties.
    • Bump pandoc-lua-engine to 0.2.1.4.
  • Use latest KaTeX CDN asset (#9707, Salim B).

  • pandoc-cli: ensure UTF8 when emitting version info.

  • tools/update-lua-module-docs.lua: improve script-internal docs, cleanup (Albert Krewinkel).

  • Allow network 3.2.

  • Use latest versions of texmath, djot, skylighting-core, skylighting.

  • Fix command test for #9652.

  • Fix some typos in code comments (#9638, guqicun).

  • Command tests: include regular PATH after directory with the test executable (ensures that DLLs will be found on Windows).

  • MANUAL.txt:

    • Document handout variable for beamer (#9742).
    • Document formats affected by --slide-level (#9745).
    • Update the list of required LaTeX packages (#9728, Albert Krewinkel).
    • Use more descriptive link text for ODT (#9673).
    • Add clarification about toc-title in docx, pptx (#9645).
    • Better document truthiness for conditionals (#9661).
    • Mention that custom-style works with ODT (Ian Max Andolina).
    • Harmonize typographic dashes (#9688, Salim B). Standardize on --- with no space.
  • INSTALL.md: Minor tweaks (#9705, Leo Heitmann Ruiz).

pandoc 3.1.13 (2024-04-07)

  • Org reader:

    • Fix treatment of id property under heading (#9639).
  • DocBook reader:

    • Add empty title to admonition div if not present (#9569). This allows admonition elements (e.g. <note>) to work with gfm admonitions even if the <title> is not present.
  • DokuWiki reader:

    • Link text cannot contain formatting (e.g., // is not italics) (#9630).
    • An explicitly empty link text ([[url|]]) works the same as an omitted link text (#9632).
  • Typst reader:

    • Support Typst 0.11 table features: col/rowspans, table head and foot (#9588).
    • Parse cell col/rowspans.
  • CSLJson writer:

    • Put $ or $$ around math in csljson output (#9616).
  • ConTeXt writer:

    • Fix options order with \externalfigure. The dimensions should come after the class if both are present.
  • Typst writer:

    • Put label after Span, not before. Labels get applied to preceding markup item.
    • Support Typst 0.11 table features (#9588): colspans, rowspans, cell alignment overrides, relative column widths, header and footer, multiple table bodies with intermediate headers. Row heads are not yet supported.
    • The default typst template has been modified so that tables don’t have lines by default. As is standard with pandoc, we only add a line under a header or over a footer. However, a different default stroke pattern can easily be added in a template.
    • More reliable escaping in inline [..] contexts (#9586). For example, we need to escape [\1. April] or it will be treated as an ordered list.
    • Handle unnumbered on headings (#9585).
  • LaTeX writer:

    • Fix math inside strikeout (#9597).
  • Text.Pandoc.Writers.Shared:

    • Export isOrderedListMarker [API change].
  • Change lhs tests so they don’t use --standalone. This will avoid test failures due to minor changes in skylighting versions, e.g. #9589.

  • Use latest texmath, typst.

  • Require pandoc-lua-marshal 0.2.6 (#9613, Albert Krewinkel). Fixes an issue arising when the value of content properties on BlockQuote, Figure, and Div elements was an empty list.

  • Update lua-filters.md (#9611, Carlos Scheidegger).

pandoc 3.1.12.3 (2024-03-17)

  • Markdown reader: Fix bug with footnotes at end of fenced div (#9576).

  • LaTeX reader:

    • Improve tokenization of @ (#9555). Make tokenization sensitive to \makeatletter/\makeatother. Previously we just always treated @ as a letter. This led to bad results, e.g. with the sequence \@. E.g., a\@ b would parse as “ab” and a\@b as “a”.
    • Make withRaw work inside parseFromToks (#9517). This is needed for raw environments to work inside table cells.
    • Better handling of table colwidths (#9579). Previously the parser just failed if the column width specified in p{} wasn’t a multiple of \linewidth. This led to cases where content was skipped.
  • Typst writer:

    • Add ‘kind’ parameter to figures with tables (#9574).
    • Avoid unnecessary box around image in figure (#9236).
    • Omit width/height in images unless explicitly specified (#9236). Previously we computed width/heigth for images that didn’t have size information, because otherwise typst would expand the image to fit page width. This typst behavior has changed in 0.11. This change fixes a bug in which images would sometimes overflow page margins, depending on their intrinsic size.
    • Don’t add hard-coded inset to tables (#9580). Instead, set this globally in the default template, allowing it to be customized.
  • LaTeX template: Fix block headings support for unnumbered paragraphs (#9542, #6018, Oliver Fabel).

  • HTML templates: Replace polyfill provider (#9537, @SukkaW). Replace polyfill.io with cdnjs.cloudflare.com/polyfill. polyfill.io has been acquired by Funnull, and the service has become unstable.

  • Korean translations: delete colon in translation for ‘to’. This was invalid YAML, and not desired anyway, since a colon is added.

  • Use latest commonmark, commonmark-extensions. This fixes a 3.12 regression in parsing of commonmark/gfm autolinks (jgm/commonmark-hs#151).

  • Depend on djot 0.1.1.3, which fixes a serious parsing bug affecting regular paragraphs after lists.

  • Depend on latest skylighting, skylighting-core, typst-hs, texmath.

  • MANUAL.txt: Change broken link to IDML cookbook (#9563).

pandoc 3.1.12.2 (2024-02-29)

  • Docx reader:

    • Ensure that table captions are counted (#9518).
    • Detect caption by style name not id (#9518). The styleId can change depending on the localization.
    • Avoid emitting empty paragraph where caption was.
  • Markdown reader: fix regression in link parsing with wikilinks extensions (#9481). This fixes a regression introduced in 3.1.12.

  • Org reader/writer: support admonitions (#9475).

  • Org writer: omit extra blank line at end of quote block.

  • Typst writer: ensure that -, +, etc. are escaped at beginning of block (#9478). Our recent relaxing of escaping (#9386) caused problems for things like emphasized - characters that were rendered using #strong[-]#. This now gets rendered as #strong[\-].

  • LaTeX writer: fix bug when a language is specified in two different ways (#9472). If you used lang: de-DE but then had a span or div with lang=de, the preamble would try to load ngerman twice, leading to an error. This fix ensures that a language is only loaded once.

  • Docx writer: Don’t copy over footnotePr in settings.xml from reference.docx (#9522).

  • EPUB writer: omit EPUB2-specific meta tag on EPUB3 (#9493). This caused a validation failure in epubs with cover images.

  • Lua: avoid crashing when an error message is not valid UTF-8 (Albert Krewinkel).

  • Text.Pandoc.SelfContained:

    • Add role="img" to svgs.
    • Add aria-label to svg elements with alt text if present. Screen readers ignore alt attributes on svg elements but do pay attention to aria-label (#9525).
  • Text.Pandoc.Shared: Fix regression in section numbering in makeSections (#9516). Starting with pandoc 3.1.12, unnumbered sections incremented the section number.

  • Text.Pandoc.Class: fix openUrl TLS negotiation (#9483). With the release of TLS 2.0.0, the TLS library started requiring Extended Main Secret for the TLS handshake. This caused problems connecting to zotero’s server and others that do not support TLS 1.3. This commit relaxes this requirement.

  • Depend on djot 0.1.1.0 (fixes rendering on multiline block attributes).

  • Use new releases of skylighting-format-blaze-html (#9520). Fixes auto-wrapping of long source lines in HTML print media.

  • Use new commonmark-extensions (fixes issue with the rebase_relative_paths extension when used with commonmark/gfm.

  • Makefile: improve epub-validation target (#9493). Use --epub-cover-image to catch issues that only arise with that.

pandoc 3.1.12.1 (2024-02-17)

  • EPUB writer: omit EPUBv3-specific accessibility features on epub2 (#9469). Fixes a regression in 3.1.12.

  • More fixes for SVG ids with --self-contained (#9467). This generalizes the fix to #9420 so it applies to things like style="fill(url(#..." and should fix problems with SVGs including gradients.

  • Powerpoint writer: properly handle math in headings and tables (#9465). This ensures that paragraphs containing math are wrapped in a mc:AlternateContent node as required.

  • Makefile: make validate-epub check v2 output too.

pandoc 3.1.12 (2024-02-14)

  • Add djot as input and output format. Djot is a light markup syntax (https://djot.net).

    • New module Text.Pandoc.Readers.Djot [API change]. The function readDjot is also exported by Text.Pandoc.Readers.
    • New module Text.Pandoc.Writers.Djot [API change]. The function writeDjot is also exported by Text.Pandoc.Writers.
  • --number-sections now uses the first digit for the number of the top-level section, no matter what its level. So if the top-level section is level-2, numbers will be 1, 2, etc. rather than 0.1, 0.2, as in the past (#5071). For some backwards compatibility, we revert to the old behavior when the --number-offset option is used.

  • DocBook reader:

    • Better handling of <procedure> and <substeps> (#9341): <procedure> now gets parsed as an ordered list, and <substeps> as a sublist.
  • Man reader:

    • Move spaces outside of emph/strong (#9445).
  • MediaWiki reader:

    • Don’t make leading blanks underscores in image links (#9425).
    • Allow lowercase image: (#9424).
  • BibTeX reader:

    • Support pagetotal in converting BibLaTeX.
  • Markdown reader:

    • Fix wikilinks extensions to allow newlines in titles (#9454).
  • EPUB reader:

    • Don’t put # characters in identifiers.
  • LaTeX reader:

    • Improve treatment of \cref, \Cref (#7463). Use the reference-type ref+label and ref+Label. Also, associate with \vref ref instead of ref+page.
    • Limited support for \Cref (#7463).
    • Generate relative widths for \linewidth, \textheight (#9388).
  • Typst reader:

    • Fix handling of \overline (#9294). Due to a typo, it was being incorrectly rendered as an \underset.
    • Improve handling of inline #quote (#9413).
    • Fix handling of dot(), tilde(), ddot() (jgm/typst-hs#38).
    • Fix character used for norm (jgm/typst-hs#38).
  • Typst writer:

    • Use reference form (e.g. @jones2000[p. 30]) for citations when possible.
    • Use #ref or @ for links with reference-type="ref" (#7463). This attribute is added to LaTeX \cref, for example.
    • Improve citation support (#9452). Emit form: "prose" or form: "year" qualifiers if the citation is author-in-text or suppress-author. Strip initial comma from suffix, since typst will add an extra one.
    • Unescape URI escapes in image paths (#9389).
    • Handle labels and citaiton ids with spaces and other special characters (#9387). In these cases, we produce an explicit label() rather than using <> or @.
    • Avoid producing illegal labels (#9387).
    • Avoid unnecessary escapes (#9386).
  • LaTeX writer:

    • Make writer sensitive to empty_paragraphs extension (#9443).
    • Fix beamer highlighting (mh4ckt3mh4ckt1c4s).
    • Create valid table even when table is empty (#9350).
    • Set font fallback for babel main font (Max Heller).
    • Add some kerns where needed between quotes (#9371).
  • HTML writer:

    • Add suffix to multiple footnote section ids, so they are unique (Sam May). This is necessary when --reference-location is block or section.
  • EPUB writer:

    • Add ARA roles for accessibility (#9378, Iacobus1983). Footnote references are given role “doc-noteref”, footnote text gets “doc-footnote”, and nav gets “doc-toc”.
    • Ensure that an alt attribute is always added (#9354). This seems to be required by iBooks; even an empty alt attribute will satisfy it.
    • Add xml:lang to package element (#9372).
    • Add accessibility metadata to EPUB metadata (#9372, #9400, Iacobus1983 and John MacFarlane). Reasonable default values are used to ensure that pandoc’s EPUBs conform to the EU Accessibilty Act requirements, but values can be overridden using metadata.
  • Docx writer:

    • Restore ability to center-justify table (#9393). The fix to #5947 caused all tables to be left indented. This was necessary to avoid extra indentation in table cells when a table appeared in a list item. This change makes the changes conditional, so that they only affect tables in list items.
  • Man writer:

    • Fix bug with long URLs (#9458). URLs with more than 68 characters didn’t display properly because of wrapping.
    • Support (limited) syntax highlighting in code blocks (#9446). Currently only boldface and italics are supported. The monochrome style might be of use for those generating man pages.
  • Org writer:

    • Escape special lines in code blocks (#9218, Albert Krewinkel).
  • Markdown writer:

    • Use different width fences for nested divs (#9450). Outer divs have longer fences. This aids clarity for the reader, making it easier to see where the div ends. It also makes the output compatible with some other implementations, e.g. micromark, which require different-width fences for nesting.
    • Fix output for pipe tables with a huge number of columns (#9346). Previously we got invalid pipe tables when the number of table columns exceeded the setting of --columns.
  • Powerpoint writer:

    • Fix regression in layout for slides with figures (#9442).
    • Use internal column widths in pptx writer tables (#5706, Tomas Dahlqvist). The table writer used to only divide all available width evenly for all columns. In this update the code uses the incoming widths if they are available. If they are not set the earlier even distribution is used. Some of the golden templates are adjusted slightly because of different rounding when using the new calculation model.
  • Custom writers:

    • Fix handling of common state (#9229, Albert Krewinkel). The CommonState (PANDOC_STATE in Lua) may change between the time that a custom writer script is first loaded and when the writer is run. However, the writer was always using the initial state, which led to problems, e.g. when the mediabag was updated in a filter, as those updates where not visible to the writer. The state is now updated right before the writer function runs.
  • Text.Pandoc.SelfContained:

    • Fix id replacements in SVGs with clipping paths (#9420). This fixes --embed-resources when SVGs have clip-path attributes.
    • Fix size of duplicated SVGs with --embed-resources (#9439).
  • ConTeXt template: support font fallback (#9361, Lawrence Chonavel).

  • Text.Pandoc.Shared:

    • addPandocAttributes: use wrapper attribute, not wrap, for Divs and Spans added as wrappers to hold attributes on elements that do not accept them.
    • makeSections behavior changes:
      • When the optional base level parameter is provided, we no longer ensure that the sequence of heading levels is gapless (#9398). Instead, we set the lowest heading level to the specified base level, and adjust the others accordingly. If an author wants to skip a level, e.g. from level 1 to level 3, they can do that. In general, the heading levels specified in the source document are preserved; makeSections only puts them into a hierarchical structure.
      • Section numbers are now assigned differently, as described above under --number-sections changes (#5071).
    • Improve makeSections code for section number calculation.
  • Text.Pandoc.Chunks:

    • Autogenerate unique ids for sections missing them (#9383). This is needed for TOC generation to work properly. We can’t create TOC links if there are no ids. This fixes some EPUB validation issues we’ve been getting since switching over to Chunks for chunking.
    • Improve fixTOCTreePaths. We weren’t adding ids for section headings that don’t head a chunk, but these headings are needed for a TOC.
  • Lua: catch encoding error in pandoc.read (#9385, Albert Krewinkel). Fixed a bug that could lead to an un-catchable error and program termination when pandoc.read was called with invalid UTF-8 input.

  • LaTeX template: support font fallback (lawcho). This support is LuaLaTeX-specific. See MANUAL.txt for documentation.

  • Text.Pandoc.Readers: Add readMan to exports [API change] (George Stagg).

  • Text.Pandoc.PDF:

    • Reliably detect when TOC has changed (#9295). Sometimes the TOC changes but there are no warnings: this happens when no labels are present. In this case we must rerun LaTeX. So we now take the SHA1 hash of the TOC file and rerun LaTeX if it changes between runs.
    • Increase maximum number of LaTeX runs to 4 (#9299). On some documents, 4 runs are needed (e.g. when a LastPage reference is used).
    • Avoid readFileLazy, which caused improperly cleaned-up temp directories on Windows (#9460).
  • MANUAL.txt:

    • Harmonize spelling of Markdown and MultiMarkdown (#9402, Salim B).
    • Add <pre> to list of exceptions for markdown_in_html_blocks extension (#9305).
    • Add clarification to docs for --resource-path (#9417).
  • Makefile: Validate generated EPUB as part of prerelease checks.

  • Add validation for docx golden files to CI (Edwin Török).

pandoc 3.1.11.1 (2024-01-05)

  • 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 (2023-12-15)

  • 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 (2023-12-12)

  • 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 (2023-10-27)

  • 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 (2023-09-08)

  • 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 (2023-08-31)

  • 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 (2023-08-22)

  • 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 (2023-08-11)

  • 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 (2023-07-20)

  • Fix CVE-2023-38745, a 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 emitting 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 (2023-07-07)

  • 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 synonym. 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.

pandoc 3.1.4 (2023-06-24)

  • Fix a security vulnerability in MediaBag and T.P.Class.IO.writeMedia. This vulnerability, discovered by Entroy C, allows users to write arbitrary files to any location by feeding pandoc a specially crafted URL in an image element. The vulnerability is serious for anyone using pandoc to process untrusted input. The vulnerability does not affect pandoc when run with the --sandbox flag. [CVE-2023-35936]

  • Allow epub-title-page to be used in defaults files (#8908).

  • Issue Extracting info message (in --verbose mode) when using --extract-media or extracting media temporarily in PDF production.

  • HTML reader: Update TableBody RowHeadColumns caculation (#8634, Ruqi). This change sets RowHeadColumns to the minimum value of each row, which gives better results in cases where rows have different numbers of leading th tags.

  • Dokuwiki reader: retain image query parameters as attributes (#8887, echo0).

  • Textile reader: Add support for link references (#8706, Stephen Altamirano). Textile supports what it calls “link alias”, which are analogous to Markdown’s reference-style links.

  • LaTeX reader: support alt text on images (#8743, Albert Krewinkel).

  • Commonmark reader: Make implicit_figures work again. Support for this (introduced in #6350) disappeared when we made an architectural change.

  • JATS reader:

    • Add footer and multiple body parsing to table reader (#8765, Noah Malmed).
    • Parse references title from ref-list (#8365).
  • JATS writer:

    • Make --number-sections work.
    • Include title in ref-list (#8364). Previously the reference title ended up in a separate section at the back of the body instead of in the ref-list in the back matter.
  • Mediawiki writer: allow highlighting to work for F# language (Adelar da Silva Queiróz).

  • LaTeX writer: Fix escaping of & in \href and \url (#8903).

  • Docx writer:

    • Fix localization of “Abstract” title (#8702).
    • Allow abstract-title to be specified in docx metadata (#8794).
  • ChunkedHTML writer: Make math work in top-level page (#8915).

  • Text.Pandoc.Logging: add new log message type ScriptingWarning [API change] (Albert Krewinkel).

  • Lua: report warnings from Lua scripts (Albert Krewinkel). Lua’s warning system is plugged into pandoc’s reporting architecture. Warnings that are raised with the Lua warn function are now reported together with other messages.

  • Use crypton-connection instead of connection (#8896, Felix Yan). Follows the change introduced in tls 1.7.0.

  • Bump versions for skylighting-core, skylighting.

  • Include lua/module/sample.svg in cabal extra-source-files (Felix Yan).

  • Add Nynorsk (New Norwegian) translations (Per Christian Gaustad).

  • Add tests for fillMediaBag/extractMedia.

  • INSTALL.md:

    • Mention alternatives to LaTeX to generate PDF (Norwid Behrnd).
    • Update Linux install links (harabat).
  • pandoc-extras.md: add to “Academic publishing workflows” (#8696, Vladimir Alexiev).

pandoc 3.1.3 (2023-06-07)

  • New output format: typst.

  • New module: Text.Pandoc.Readers.Typst [API change].

  • DocBook reader:

    • Support more emphasis roles (Albert Krewinkel). The role “bf” is taken to indicate “bold face”, i.e., “strongly emphasized” text, while “underline” leads to underlined text.
  • JATS reader:

    • Improve title and label parsing in the JATS reader (#8718, Noah Malmed.)
    • Add rowspan, colspan and alignment to cells in jats table reader (#8408, Noah Malmed)
  • Org reader (Albert Krewinkel):

    • Require abstract environment to use lowercase.
    • Treat #+NAME as synonym for #+LABEL (#8578).
  • ODT reader:

    • Allow lists in table cells (#8892).
    • Allow frames inside spans (#8886).
  • RST reader:

    • Fix sorting on anonymous keys (#8877). This fixes a link resolution bug bug affecting RST documents with anonymous links.
  • HTML reader:

    • Fix iframe with data URI of an image (#8856). In this case we don’t want to try to parse the data at the URL. Instead, create an image inside a div.
  • RTF reader:

    • Fix bug in table parsing (#8767). In certain cases, text before a table was being incorporated into the table itself.
  • Docx reader:

    • Introduce support for Intense Quote (Stephan Meijer).
  • Markdown reader:

    • Disallow escaping of ~ and " in markdown_strict (#8777, Albert Krewinkel). This matches the behavior of the legacy Markdown.pl as well as what is described in the manual.
  • LaTeX reader: ignore args to column type in \multicolumn (#8789).

  • HTML writer:

    • Use first paragraph in task item as checkbox label (#8729, Albert Krewinkel).
  • Ms writer:

    • Coerce titles to inlines (#8835). Block-level formatting is not allowed inside .TL.
  • LaTeX writer:

    • Fix width for multicolumn simple table (#8831).
  • Jira writer:

    • Use first code block class as highlighting language (#8814, Albert Krewinkel). The writer no longer searches the list of classes for a known programming language but always uses the first class in that list as the language identifier.
  • OpenDocument writer:

    • Handle row header column cells as header cells (#8764, Michael Stahl).
    • Fix invalid text:p inside text:p from meta (#8256).
  • ODT writer:

    • Don’t add settings.xml (Michael Stahl). This will cause defaults to be used, which is what we want.
    • Don’t add unnecessary Configurations2 directory (Michael Stahl).
    • Don’t add thumbnail (Michael Stahl).
    • Put manifest.version on directory file-entry (Michael Stahl). See ODF 1.3 part 2, 4.16.14.1.
    • Stop validator complaints by producing ODF 1.3 (Michael Stahl).
  • MediaWiki writer:

    • Remove links from inside links in mediawiki writer (#8739, Wout Gevaert).
  • Typst writer:

    • Omit bibliography if citations not enabled (#8763). With this change, the typst writer will omit the #bibliography command when citations is not enabled. (If you want to use pandoc’s own --citeproc, you should combine it with -t typst-citations to disable native typst citations.
    • Use <..> for labels, create internal links.
    • Use #footnote for notes (#8893).
    • Fix alignment issue in lists. It’s an aesthetic issue only; the first line had an extra space indent after the list marker.
  • Commonmark writer:

    • Use shortcut reference links: commonmark supports these.
  • EPUB template: add lang attribute to <html> (Gabriel Lewertoski).

  • Template styles.html: fix task-list styling in reveal.js (#8731, Albert Krewinkel).

  • LaTeX template: Fix \babelfont (#8728).

  • Text.Pandoc.Parsing:

    • Remove unnecessary ‘spaces’ in parseFromString.
  • Text.Pandoc.ImageSize: Drop BOM at start of SVG if present. Otherwise our code can fail to determine image size.

  • Lua subsystem:

    • Fix value of PANDOC_SCRIPT_FILE for custom readers & writers (#8781, Albert Krewinkel). The value did not hold the actual file path for scripts in the custom folder of the datadir.
  • Fix YAML in translation files for cs and pl (#8787).

  • Fix pdf output via typst (#8754). One must now use typst compile rather than typst.

  • MANUAL.txt:

    • Added note that the user will need to create the user data dir (#8727).
    • Add wikilinks to non-default extensions (Ilona).
    • Update link to custom djot writer (Albert Krewinkel).
    • Better link to citation syntax.
    • Fix typo (sdhoward).
    • Note that # fancy list markers don’t work with commonmark (#8772, William Lupton).
    • Add commonmark fenced_div note (#8773, William Lupton).
    • Move highlighting documentation, with minor adjustments (William Lupton).
    • Fix inaccurate statement about spaces and tabs in template syntax (Frank Seifferth).
  • Update documentation for org-mode (Christian Christiansen, #8716).

  • doc/lua-filter.md:

    • Fix typos (#8734, perro tuerto).
    • Fix anchor (Toni Dietze).
    • Use full field name in example (#8857, Matt Dodson).
    • Fix copy-paste error (#8798, thron7).
  • CONTRIBUTING.md: update info on ghc versions.

  • INSTALL.md:

    • Fix cabal install instructions (Albert Krewinkel).
    • Use more relevant link to NetBSD/pkgsrc entry (Charlotte Koch).
    • Fix Windows install instructions for winget (#8799).
  • Tests: Rename test/docx/block_quotes_parse_indent.native for consistency (Stephan Meijer).

  • Add tls constraint on cabal.project. This is needed to avoid problems caused by the transition to crypton.

  • Require texmath 0.12.8.

pandoc 3.1.2 (2023-03-26)

  • Add a Lua REPL (Albert Krewinkel). This can be started with pandoc lua -i. It is also possible to instruct a filter to open the REPL at a certain point, for debugging (see pandoc.cli.repl).

  • Support typst as a --pdf-engine.

  • Add typst writer (#8713). New module Text.Pandoc.Writers.Typst, exporting writeTypst [API change].

  • Org reader:

  • DocBook reader:

    • Handle “book” for xref references (#8712, Andres Freund) This also adds a test xref to book and part.
    • Handle <part> (#8712).
  • HTML reader:

    • Fix behavior with -native_spans-raw_html (#8711). Previously with this configuration, <span>s were not treated as inline elements at all.
  • HTML writer:

    • Avoid duplicate classes (#8705).
    • Use img element instead of embed for .svg.gz and .png.gz etc. (#8699).
    • HTML writer footnotes changes (#8695): when --reference-location=section or =block, use an aside element for the notes rather than a section. When --reference-location=section, include the aside element inside the section element, rather than outside. (In slide shows, this option causes footnotes on a slide to be displayed at the bottom of the slide.)
  • EPUB writer:

    • Use different structure for epub footnotes (#8676, see #8672, #5583). Many EPUB readers are thrown off by pandoc’s current footnote output. Both the ol and the fact that the footnote backlink is at the end of the note seem to pose problems. With this commit, we now create a list of aside (or div) elements, instead of an ordered list. Each element begins with a note number that is linked back to the note reference. (So, the backlink occurs at the beginning rather than the end.) Thanks to @Porges and @lewer.
  • Docx writer:

    • Include abstract title (#8702). Uses localized term for abstract.
  • Markdown writer:

    • Use implicit figures if there’s a caption but no alt (#8689, Albert Krewinkel).
  • Jira reader (Albert Krewinkel):

    • Add panel title as nested div (#8681).
    • Require jira-wiki-markup 1.5.1 (#8680). This fixes a bug in the parser that caused text between two exclamation marks to be parsed as an image. The first ! of image markup must now be followed by a non-space character; otherwise, the enclosed text is parsed as normal content.
  • Ms writer:

    • Fix handling of Figure (#8660).
  • ICML writer:

    • Fix images with data (#8675). The Contents element should be inside Properties.
  • LaTeX writer:

    • Add Chinese to Babel languages.
    • Fix background image in Beamer when there are figure environments (#8671, Martín Pozo).
  • LaTeX template:

    • Add babelfonts variable to default LaTeX template. This allows specifying certain fonts to be used with certain babel languages. Thanks to Frederik Elwert.
    • Fix highlight/underline with lualatex (#8707). We need the lua-ul package instead of soul, which doesn’t work with lualatex.
  • Lua (Albert Krewinkel):

    • Add pandoc.cli.repl function
    • Fix json.encode for nested AST elements. Ensures that objects with nested AST elements can be encoded as JSON.
    • Auto-generate docs for pandoc modules.
    • Load text module as pandoc.text. This only affects the name in the Lua-internal documentation. It is still possible to load the modules via require 'text', although this is deprecated.
    • Move docs from module text to pandoc.text The latter is easier to use and more consistent with the other modules.
    • Keep the Lua stack clean A metatable used during initialization was not properly removed from the stack. Likewise, accessing the CommonState from Lua previously led to the pollution of the Lua stack with a left-over value.
    • Add function pandoc.format.from_path.
    • Allow to get the JSON encoding of log messages.
  • Text.Pandoc.Format: Add new function formatFromFilePaths [API change] (#8710, Albert Krewinkel).

  • The old Text.Pandoc.App.FormatHeuristics module has been removed.

  • In --version, use Windows %APPDATA% variable to describe user data dir (#8686, Pablo Rodríguez).

  • Text.Pandoc.App.CommandLineOptions: don’t lowercase arg to --from/--read (Albert Krewinkel). This prevented users to use custom writers with uppercase characters in their filenames. Format-normalization, including lower-casing of format identifiers, happens during format parsing.

  • Documentation:

    • Add doc/nix.md.
    • Add doc/extras.md. This was formally in the website repo.
    • doc/lua-filters.md: improve docs for pandoc.zip.
  • Factor out make_macos_release.sh from the release candidate workflow. Use cabal instead of stack to build the macos binary.

  • Modify linux/make_artifacts.sh so it will work on cirrus.

  • Switch to hslua-2.3

  • Depend on latest releases of texmath, doclayout.

pandoc 3.1.1 (2023-03-05)

  • EPUB reader: Give additional information in error if the epub zip container can’t be unpacked.

  • TSV reader: don’t gobble tabs as whitespace (#8661).

  • Org reader: accept empty tables (#8659).

  • LaTeX reader: fix multiplication syntax for tabular (#8658). We recognized *{6}{...} but not *6{...} or *6c.

  • Docx reader: parse image alt texts in LibreOffice generated files. LibreOffice tags images slightly differently than Word; this change lets the parses take that difference into account when looking for an image description (alt text).

  • DocBook reader:

    • Fix <xref> references to tables in DocBook files (#8626, Pavol Otto).
    • Parse figure as a Figure element in the AST (#8668).
  • JATS reader: avoid generating duplicate figure captions (#8669).

  • RST reader: align with spec in syntax for role names (#8653). In particular, we now allow colons in row names.

  • Add note on converting from .doc format to FAQs (#8654).

  • Trap error in getAppUserDataDirectory (#8648). This can raise an error if pandoc is run in a non-user environment.

  • LaTeX writer: do not use longtable foot with Beamer (#8638, Albert Krewinkel). The table foot is made part of the table body, as otherwise it won’t show up in the output. The root cause for this is that longtable cannot detect page breaks in Beamer.

  • LaTeX template: Add CJKsansfont and CJKmonofont for XeLaTeX (#8656, Yudong Jin). CJKsansfont and CJKmonofont will be set for xelatex only if CJKmainfont is also provided.

  • URL style in ConTeXt (#8612, Thomas Hodgson). Previously, a URL like this would be in monospace text: \useURL[url1][https://example.com]. Now, it will match the main text unless the linkstyle variable is set, which controls the styling of all links. Closes #8602.

  • Asciidoc writer: Properly escape | in table cells (#8665).

  • asciidoc{,tor} template: fix revision date when author is unset (#8637, arcnmx). Revision line syntax is only valid in combination with an author line, so the date attribute must be set explicitly when the author is missing

  • HTML writer: allow “track” element to be treated as block-level HTML (#8629).

  • Include needed polyfill when MathJaX is used (#8625).

  • JATS writer: include alt-text in <graphic>, <inline-graphic> elements (#8631, Albert Krewinkel).

  • Chunked HTML writer: Retain metadata in processing sections for chunked HTML (#8620). Previously we suppressed metadata in all but the top page, in order to prevent the title block from being printed on every page. This prevented use of custom variables set by metadata fields. This commit moves to a better solution: a conditional in the default template restricts the title block to the top page.

  • Lua API:

    • Add new function pandoc.system.cputime (Albert Krewinkel). The function returns the CPU time consumed by pandoc and can be used to benchmark Lua computations.
    • Add module pandoc.json to handle JSON encoding (#8605, Albert Krewinkel).
  • Use pandoc-lua-marshal 0.2.1 (Albert Krewinkel). All major AST elements now have __tojson metamethods that return the JSON representation of an element. This allows to JSON-encode these elements with libraries that respect the __tojson metamethod, including dkjson.

  • Use latest zip-archive. This allows pandoc to open certain epubs that it could not open before.

  • Use commonmark-extensions 0.2.3.4. This fixes some bugs involving definition lists and inline formatting.

  • Use latest skylighting-format-context

  • MANUAL.txt:

    • Document chunk-template in defaults file.
    • Remove obsolete “raw content in a style” section.
    • Revise documentation for --mathml to reflect support in all major browsers (#8667).
  • docs/custom-readers.md: Update JSON parsing example. The example now uses the built-in pandoc.json library to parse the API output.

  • doc/press.md: Add article on CiTO in J Cheminform by @egonw.

  • doc/lua-filters.md: fix typo in run_json_filter (Morgan Willcock).

pandoc 3.1 (2023-02-09)

  • Fix regression with --print-highlight-style option (#8586).

  • Add new --chunk-template option (#8581), allowing more control over the filenames in chunked HTML output.

  • Text.Pandoc.App: Add optChunkTemplate constructor to Opt [API change].

  • Text.Pandoc.Options: add writerChunkTemplate constructor to WriterOptions [API change].

  • Text.Pandoc.Chunks: add Data, Typeable, Generic, ToJSON, FromJSON instances for PathTemplate [API change].

  • Text.Pandoc.Citeproc: Fix bug in metaValueToReference (#8611). This bug caused us to get some repeated content when converting MetaBlock to Inlines.

  • Textile reader:

    • Support footnote backlinks (#8585, Stephen Altamirano).
    • Don’t allow brackets in URLs (#8582).
  • ODT reader: fix blockquote indent detection (#3437, Daniel Kessler).

  • LaTeX writer: include short figure/table caption if one is given (Albert Krewinkel). Short captions are used by LaTeX when generating the list of figures or list of tables. Adding a short caption will now overwrite the full caption in these lists.

  • Powerpoint writer: fix handling of simple figures (#8565, Albert Krewinkel). This ensures that simple figures are displayed in the same way as before the introduction of a dedicated Figure constructor in the AST.

  • Improve handling of % in bib(la)tex parsing (#8597, #8595).

  • Use released skylighting 0.13.2.1

  • INSTALL.md: direct people to cabal install pandoc-cli.

  • doc/lua-filters.md: document ‘Figure’ type and constructor (Albert Krewinkel). Fix typos (Martin Joerg).

  • Fix link in manual (#8583, Salim B).

pandoc 3.0.1 (2023-01-25)

  • Fix use of extensions with custom readers (#8571).

  • Text.Pandoc.Writers.Shared: export setupTranslations [API change]. Use this in HTML and OpenDocument writers, to ensure that translations are set up properly even when we don’t go through convertWithOpts.

  • LaTeX reader: fix regression in macro resolution for environments (#8573).

  • Chunked HTML writer: Fix handling of images with absolute URLs (#8567).

  • HTML writer:

    • Don’t omit newlines in task lists.
    • Don’t disable checkboxes in task lists (#8562).
  • Ensure that automatically set variables pandoc-version, outputfile, title-prefix, epub-cover-image, curdir, dzslides-core can be overridden by --variable on the command line. Previously they would create lists in the template Context, which is not desirable.

  • Fix man page copying in linux/make_artifacts.sh (#8566). Previously we were copying the pandoc-server.1 pandoc page to pandoc-lua.1.

  • pandoc.cabal: remove pandoc.cabal, stack.cabal from extra-source-files (#8560). The problem is that if these are in extra-source-files, then they get put in the tarball, and then anyone trying to build the source from an unpacked tarball will run into the problem that cabal.project and stack.yaml refer to pandoc-server, pandoc-lua-engine, and pandoc-cli, which aren’t in the tarball.

  • Require texmath 0.12.6 for better MathML output.

  • Fix typo in Lua filter documentation (Carlos Scheidegger).

  • Fix formatting of link in pandoc-server.md (James Scott-Brown).

  • Minor changelog fixups.

pandoc 3.0 (2023-01-18)

  • Split pandoc-server, pandoc-cli, and pandoc-lua-engine into separate packages (#8309). Note that installing the pandoc package from Hackage will no longer give you the pandoc executable; for that you need to install pandoc-cli.

  • Pandoc now behaves like a Lua interpreter when called as pandoc-lua or when pandoc lua is used (#8311, Albert Krewinkel). The Lua API that is available in filters is automatically available to the interpreter. (See the pandoc-lua man page.)

  • Pandoc behaves like a server when called as pandoc-server or when pandoc server is used. (See the pandoc-server man page.)<