# Revision history for pandoc ## pandoc 3.0 (PROVISIONAL YYYY-MM-DD) * Split pandoc-server, pandoc-cli, and pandoc-lua-engine into separate packages (#8309). * 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.) * A new command-line option `--list-tables`, causes tables to be formatted as list tables in RST (#4564, with Francesco Occhipinti). * `--version` output no longer contains version info for dependent packages. Instead, it contains a "Features" line that indicates whether the binary was compiled with support for acting as a server, and for using Lua filters and Custom writers. * Produce error if `--csl` is used more than once (#8195, Prat). * Remove deprecated `--atx-headers` option. * Remove deprecated option `--strip-empty-paragraphs`. * Add prefixes to identifiers with `--file-scope` (#6384). This change only affects the case where `--file-scope` is used and more than one file is specified on the command line. In this case, identifiers will be prefixed with a string derived from the file path, to disambiguate them. For example, an identifier `foo` in `contents/file1.txt` will become `contents__file1.txt__foo`. Links will be adjusted accordingly: if `file2.txt` links to `file1.txt#foo`, then the link will be changed to point to `#file1.txt__foo`. Similarly, a link to `file1.txt` will point to `#file1.txt`. A Div with an identifier derived from the file path will be added around each file's content, so that links to files will still work. * Docx reader: + Mark unnumbered headings with class `unnumbered` (#8148, Albert Krewinkel). This change ensures good conversion results when converting with `--number-sections`. * JATS reader: + Handle uri element in references (#8270). * LaTeX reader: + Skip parenthenized args of toprule, midrule, etc (#8242). + Handle `##` macro arguments properly (#8243). + Remove unused function `toksToString` in Parsing module. * Mediawiki reader: + Parse table cell with attributess, to support rowspan, colspan (#8231, Ruqi). * HTML reader: + Fix regression for `` (#8330). It was no longer being parsed as Code (Justin Wood). * Markdown reader: + Allow fenced code block "bare" language to be combined with attributes (#8174, Siphalor), e.g. ```` ```haskell {.class #id} ``` ```` + Allow table caption labels to start with lowercase `t` (#8259). + Grid tables: allow specifying a table foot by enclosing it with part separator lines, i.e., row separator lines consisting only of `+` and `=` characters (#8257, Albert Krewinkel). E.g.: ``` +------+-------+ | Item | Price | +======+=======+ | Eggs | 5£ | +------+-------+ | Spam | 3£ | +======+=======+ | Sum | 8£ | +======+=======+ ``` + Fix `implicit_header_references` with duplicate headings (#8300). Documentation says that when more than one heading has the same text, an implicit reference `[Heading text][]` refers to the first one. Previously pandoc linked to the last one instead. This patch makes pandoc conform to the documented behavior. * Org reader: + Allow org-ref v2 citations with `&` prefix (#8302). + Make `#+pandoc-emphasis-pre` work as expected (#8360, Amir Dekel). * BibTeX reader: + Fix handling of `%` in `url` field (#7678). `%` does not function as a comment character inside `url` (where URL-encoding is common). + Allow `url` field in `bibtex` as well as `biblatex` (#8287). This field is not officially supported for BibTeX, but many styles can handle it (), and others will ignore it. * BibTeX writer: + Pass through `url` even for `bibtex` (#8287). * Org writer: + Pass through unknown languages in code blocks (#8278), instead of producing `begin_example`. * LaTeX writer: + Do not repeat caption on headless tables (Albert Krewinkel). The caption of headless tables was repeated on each page that contained part of the table. It is now made part of the "first head", i.e. the table head that is printed only once. + Add separator line between table's body and its foot (Albert Krewinkel). + Ignore languages with no babel equivalent, instead of generating an invalid command in the preamble (#8325). + Use `\includesvg` for SVGs and include the `svg` package (#8334). * JATS writer: + Use `` for LineBreak in the limited contexts that accept it (#8344). + Officially deprecate `writeJATS` in favor of `writeJatsArchiving`. * RTF writer: + Add space after unicode escape commands (#8264). This fixes a bug that caused characters to disappear after unicode escapes. * RST writer: + Render tables as list tables when the `--list-tables` option is specified (`writerListTables`) (#4564, Francesco Occhipinti). * Commonmark writer: + Ensure that we don't have blank lines in raw HTML (#8307). * HTML writer: + Only add role attribute in HTML5 (#8241). It is not valid in HTML4. + Avoid aria-hidden in code blocks for HTML4 (#8241). + Only treat `. . .` as a slide pause in slides, and not in regular HTML output (#8281). + Properly merge classes for headings of level > 6 (#8363). + Prevent `` inside `` (#7585). If a link text contains a link, we replace it with a span. + Replace deprecated aria roles for bibliography entries (#8354). `doc-biblioentry` -> `listitem`, `doc-bibliography` -> `list`. * HTML, Markdown writers: filter out empty class attributes (#8251). These should not be generated by any pandoc readers, but they might be produced programatically. * Docx writer: + Better handling of tables in lists (#5947). Previously the content of each list cell was indented when the table belonged to a list item. + Indent tables in list items (#5947). + Adjust correct attribute on `lang` element (#7022). For East Asian languages, we need to adjust `w:eastAsia` rather than `w:val`. This allows normal fonts to be used for any Latin-font text. Similarly, for bidi languages, we need to adjust `w:bidi` rather than `w:val`. We treat `he` and `ar` as bidi languages, `zh`, `ja`, `ko` as East Asian languages. * Ms writer: + Properly format display equations (#8308). * XWiki writer: + Use template if it is specified (#8296). Previously templates were ignored. * LaTeX template: set fonts after Beamer theme (Jeremie Knuesel). Beamer themes such as metropolis and saintpetersburg change the default fonts. This change gives precedence to the user font settings by moving them after the loading of the Beamer theme. * reference.pptx: Remove unsupported element (#8342, #6338, Link Swanson). The default template contained text above the header, which can mislead users into thinking there is a way to put text there using pandoc. * Text.Pandoc.App: + Parameterize `convertWithOpts` over scripting engine [API Change] (Albert Krewinkel). + Move initial input-to-Pandoc code to internal submodule (Albert Krewinkel). * Text.Pandoc.Citeproc: + Check both extension and mime type to determine bibliography type when the bibliography is fetched remotely (#7151). + CslJson: allow an object with `items` property in addition to an array of references. This is what is returned by e.g. `https://api.zotero.org/groups/904125/items?v=...&format=csljson` + Require a digit for an implicit "page" locator inside explicit locator syntax `{...}` (#8288). Previously a locator specified as `{}` would be rendered as `p.` with nothing after it. + Update `sub verbo` to `sub-verbo` (#8315). This is a change in the term's canonical name in citeproc. As a result of this change, `sub verbo` locators have not worked in pandoc since citeproc 0.7. + Text.Pandoc.Citeproc.MetaValue: remove unused function `metaValueToPath`. + Add internal module Text.Pandoc.Citeproc.Name (#8345). This exports `toName`, which previously had been part of T.P.Citeproc.BibTeX, and allows for cleaner module dependencies. * Add new module Text.Pandoc.Format [API change] (Albert Krewinkel). The module provides functions and types for format spec parsing and processing. The function `parseFormatSpec` was moved from Text.Pandoc.Extensions to the new module and renamed to `parseFlavoredFormat`. It now operates in a PandocMonad and is based on the updated types. * Text.Pandoc.Extensions: + Fix JSON decoding of Extensions (#8352, Albert Krewinkel). + Add new exported function `readExtension` [API change]. + Remove `parseFormatSpec` [API change]. This has been moved to Text.Pandoc.Format and renamed as `parseFlavoredFormat` (Albert Krewinkel). + Simpler implementation of Extensions based on Set (benchmarks show no performance penalty). * Text.Pandoc.MIME: + Base module on package `mime-types`, which is already a transitive dependency (#8277, Albert Krewinkel). + Remove deprecated overrides (#8292). * Text.Pandoc.Shared: + Export `textToIdentifier` [API change]. + Remove deprecated `crFilter`. [API change] + Remove deprecated `deLink`. [API change] + Deprecate `notElemText`. + Deprecate `makeMeta`. + Rename `pandocVersion` to (exported) `pandocVersionText` and add a new `pandocVersion` that returns `Version` instead of `Text` [API change]. This is consistent with the type used for `pandocTypesVersion` and allows to use the value where a Version type is required. * Rename Text.Pandoc.Network.HTTP -> Text.Pandoc.URI. This is still an unexported internal module. Export `urlEncode`, `escapeURI`, `isURI`, `schemes`, `uriPathToPath`. Drop exports of `schemes` and `uriPathToPath`. * Rename Text.Pandoc.Readers.LaTeX.Types -> Text.Pandoc.TeX (internal module). * Text.Pandoc.Options: + WriterOptions now has a field `writerListTables`, specifying that list tables be used in RST output [API change]. * Text.Pandoc.App: + Export `IpynbOutput(..)` [API change]. * Text.Pandoc.Filter: + Export `applyFilters` [API change]. + Export `applyJSONFilter` [API Change] (Albert Krewinkel). + Parameterize `applyFilters` over scripting engine [API change] (Albert Krewinkel). * Text.Pandoc.Readers: + Change argument type of `getReader`, so it takes a `FlavoredFormat` instead of a `Text` [API change] (Albert Krewinkel). * Text.Pandoc.Writers: + Change argument type of `getWriter`, so it takes a `FlavoredFormat` instead of a `Text` [API change] (Albert Krewinkel). * Text.Pandoc.Templates: + Do not try to normalize input to `getDefaultTemplate` (Albert Krewinkel). The function `getDefaultTemplate` no longer splits off extension modifers from the given format, as that conflicts with using custom writers as formats. Haskell library users should use `getDefaultTemplate <=< (fmap formatName . parseFlavoredFormat)` if the input format can still contain extensions. The same is true for `compileDefaultTemplate`, which calls `getDefaultTemplate` internally * New exported module Text.Pandoc.Scripting (Albert Krewinkel). The module contains the central data structure for scripting engines (e.g., Lua) [API change]. * Text.Pandoc.Error: + Add new PandocError constructor `PandocNoScriptingEngine` [API change] (Albert Krewinkel). + Add new PandocError constructor `PandocFormatError` [API change] (Albert Krewinkel). The new error is used to report problems with input or output format specifications. * Separate out Text.Pandoc.Data and Text.Pandoc.Translations from Text.Pandoc.Class (#8348). This makes Text.Pandoc.Class more self-contained. + Text.Pandoc.Data is now an exported module, providing `readDataFile` and `readDefaultDataFile` (both formerly provided by Text.Pandoc.Class), and also `getDataFileNames` (formerly unexported in Text.Pandoc.App.CommandLineOptions). [API change] + Text.Pandoc.Translations is now an exported module (along with Text.Pandoc.Translations.Types), providing `readTranslations`, `getTranslations`, `setTranslations`, `translateTerm`, `lookupTerm`, `readTranslations`, `Term(..)`, and `Translations` [API change]. + Text.Pandoc.Class no longer exports `readDataFile`, `readDefaultDataFile`, `setTranslations`, and `translateTerm` [API change]. + Text.Pandoc.Class now exports `checkUserDataDir` [API change]. * Text.Pandoc now exports Text.Pandoc.Data and `setTranslations` and `translateTerm` {API change]. * Export module Text.Pandoc.Class.IO [API change]. The module is useful when defining instances of class PandocMonad for types that are also instances of MonadIO. * Remove modules Text.Pandoc.Writers.Custom and Text.Pandoc.Readers.Custom [API Change] (Albert Krewinkel). The functions `writeCustom` and `readCustom` are available from module Text.Pandoc.Lua. * Text.Pandoc.Server: + Split this module into a separate package, `pandoc-server`, allowing the `pandoc` library to be compiled without server support. + Return object if JSON is accepted. Previously we just returned a JSON-encoded string. Now we return something like: ``` { "output": "

hello

" "base64": false, "messages": [ { "message": "Not rendering RawInline (Format \"tex\") \"\\\\noe\"", "verbosity": "INFO" } ], } ``` This is a change in the pandoc-server JSON API. + Set translations in the writer based on `lang` metadata. + Return error in JSON object if response is JSON. + Remove `parseServerOpts`. [API change] * Text.Pandoc.Lua: + This module has been moved to a separate package, `pandoc-lua-engine`. + Export `applyFilter`, `readCustom`, and `writeCustom`. No longer export the lower-level function `runFilterFile` [API change]. + Change type of `applyFilter` [API Change] (Albert Krewinkel). The module Text.Pandoc.Filter.Lua has been merged into Text.Pandoc.Lua. The function `applyFilter` now has type ``` haskell applyFilter :: (PandocMonad m, MonadIO m) => Environment-> [String]-> FilePath-> Pandoc-> m Pandoc ``` where `Environment` is defined in Text.Pandoc.Filter.Environment. + Export new function `getEngine` [API Change]. The function returns the Lua scripting engine. + Add unexported modules T.P.Lua.Reader, T.P.Lua.Writer. These contain the definitions of `readCustom` and `writeCustom` that were previously in T.P.Readers.Custom and T.P.Writers.Custom. + Cleanup module dependencies, for a cleaner module dependency graph. + The `writeCustom` function has changed to return a Writer and an ExtensionsConfig [API change]. This allows ByteString writers to be defined. + The `readCustom` function has changed to return a Reader and an ExtensionsConfig [API change]. * Lua subsystem (Albert Krewinkel): + The whole Lua subsystem has been moved to a separate package, `pandoc-lua-engine`. `pandoc` does not depend on it. `convertWithOpts` has a new parameter that can be used to pass in the scripting engine defined in `pandoc-lua-engine` (or a different one, in theory). + Fix the behavior of Lua "Version" objects under equality comparisons (#8267). + Support running Lua with a GC-collected Lua state. + Ensure that extensions marshaling is consistent. + Produce more informative error messages for pandoc errors. Errors are reported in Lua in the same words in which they would be reported in the terminal. + Add new module `pandoc.format`. The module provides functions to query the set of extensions supported by formats and the set of extension enabled per default. + Add function `pandoc.template.apply`. + Add function `pandoc.template.meta_to_context`. The functions converts Meta values to template contexts; the intended use is in combination with `pandoc.template.apply`. + Allow Doc values in `WriterOptions.variables`. The specialized peeker and pusher function for `Context Text` values does not go via JSON, and thus keeps Doc values unchanged during round-tripping. * Custom writers: + The global variables `PANDOC_DOCUMENT` and `PANDOC_WRITER_OPTIONS` are no longer set when the writer script is loaded. Both variables are still set in classic writers before the conversion is started, so they can be used when they are wrapped in functions. + Deprecate classic custom writers. + Add function `pandoc.write_classic`. The function can be used to convert a classic writer into a new-style writer by setting it as the value of `Writer`: ``` lua Writer = pandoc.write_classic ``` or to fully restore the old behavior: ``` lua function Writer (doc, opts) PANDOC_DOCUMENT = doc PANDOC_WRITER_OPTIONS = opts load(PANDOC_SCRIPT_FILE)() return pandoc.write_classic(doc, opts) end ``` + Support extensions in custom writers. Custom writers can define the extensions that they support via the global `writer_extensions`. The variable's value must be a table with all supported extensions as keys, and their default status as values. For example, the below specifies that the writer supports the extensions `smart` and `sourcepos`, but only the `smart` extension is enabled by default: ``` lua writer_extensions = { smart = true, sourcepos = false, } ``` + Custom writers can define a default template via a global `Template` function; the data directory is no longer searched for a default template. Writer authors can restore the old lookup behavior with ``` lua Template = function () local template return template.compile(template.default(PANDOC_SCRIPT_FILE)) end ``` * Custom readers: + Support extensions in custom readers. Custom readers, like writers, can define the set of supported extensions by setting a global. E.g.: ``` lua reader_extensions = { smart = true, citations = false, } ``` * Use latest versions of `commonmark-extensions`, `texmath`, `citeproc`, `gridtables`, and `skylighting`. * Require aeson >= 2.0. * Remove `lua53` flag. We now only support Lua 5.4. * Add hie.yaml for haskell language server. * Documentation: + Deprecate `PANDOC_WRITER_OPTIONS` in custom writers (Albert Krewinkel). + Document `pandoc.write_classic` (Albert Krewinkel). + Document new table features (Albert Krewinkel). + Clarify what background-image does in reveal.js (#6450). + Documentation improvements for `blank_before_blockquote` (#8324, Pranesh Prakash). + Update grid table documentation (#8346). + Add note about MathJax fonts to `--embed-resources`. + Use cabal's --package-env more (#8317, Artem Pelenitsyn). + Modify Zerobrane instructions to use Lua 5.4 (#8353, Ian Max Andolina). + Fix documentation for highlight-style in `pandoc-server.md`. + Fix link to fedora package site (#8246, Akos Marton). + Rephrase paragraph on format extensions (#8375, Ilona Silverwood). * Tests.Command: remove unused `runTest`. * Add pandoc-lua.1 man page. * Improve `shell.nix`. * Add `tools/moduledeps.lua` for inspecting the internal module dependency tree. * Fix macOS zip so pandoc-server is a symlink. This cuts its size by 2x. * CI: Improve CI speed by caching more, eliminating macos builds, and splitting benchmarks into a separate action, run by manual dispatch. (We still test that benchmarks build in the regular CI.) The cache can be expired manually by modifying the secret `CACHE_VERSION`. * Remove the unnecessary Setup.hs from pandoc. Cabal does not need this with build-type 'simple'. * Add pandoc-lua and pandoc-server (symlinks) and their man pages to releases. * Use hslua-cli package for pandoc-lua interface (Albert Krewinkel). * Add `server` flag to pandoc-cli, allowing it to be compiled without server support. * pandoc-cli: Allow building a binary without Lua support (Albert Krewinkel). Disabling the `lua` cabal flag will result in a binary without Lua. * Move `--version` handling to pandoc-cli. We need it here in order to print information about whether server and Lua support have been copmiled in. * Move `nightly` flag from pandoc to pandoc-cli (#8339). * Rewrite Makefile and add a number of convenient targets, for coverage, weeder, module dependencies, prelease. `make help` will print the targets. * Factor out xml-light into an internal library. * Move trypandoc to a separate repository, jgm/trypandoc. ## pandoc 2.19.2 (2022-08-22) * Fix regression with data uris in 2.19.1 (#8239). In 2.19.1 we used the base64URL encoding rather than base64. * pandoc-server: handle `citeproc` parameter as documented (#8235). * Org reader: treat *emacs-jupyter* src blocks as code cells (#8236, Albert Krewinkel). This improves support for notebook-like org files that are intended to be used with emacs-jupyter package. * HTML writer and templates: revert to using `width` property for column widths (Albert Krewinkel). The default `flex` and `overflow-x` properties of a column are set to `auto`. In combination, these changes allow to get good results when using columns with or without explicit widths. * Org writer (Albert Krewinkel): + Add support for jupyter nodebook cells (#6367). + Prefix code language of ipynb code blocks with `jupyter-`. This is the convention used by the *emacs-jupyter* package. + Keep code block attributes as header args. This allows to keep more information in the resulting `src` blocks, making it easier to roundtrip from or through Org. Org babel ignores unknown header arguments. + Add code block identifier as `#+name` to src blocks. * Fix some typos in the codebase (luz paz). * Require hslua-module-path 1.0.3 (#8228, Albert Krewinkel). ## pandoc 2.19.1 (2022-08-18) * Add server capabilities. + New exported module Text.Pandoc.Server [API change]. + The pandoc executable now starts up a web server when renamed or symlinked as `pandoc-server`, and functions as a CGI program when renamed or symlinked as `pandoc-server.cgi`. See the man page for `pandoc-server` for full documentation. * Text.Pandoc.App.Opts: Redo `FromJSON` for `Opt` so that optional values can be omitted (in which case the values from `defaultOptions` are used). * Org reader: treat "abstract" block as metadata (Albert Krewinkel, #8204). A block of type "abstract" is assumed to define the document's abstract. It is transferred from the main text to the metadata. * Org template: add abstract from metadata as block of type "abstract" (#8204). * HTML writer: use `flex` property for column widths (Albert Krewinkel, #8232). * LaTeX writer: + Add label to tables that have an identifier (Albert Krewinkel, #8219). Tables with an identifier are marked with a `\label`. A caption is always included in this case, even if the caption is empty. + Use `\textquotesingle` for straight quotes in text. + Fix widths of multicolumn cells (#8218). * LaTeX template: fix behavior of `colorlinks` variable (Albert Krewinkel, #8226). Fixes a regression in 2.19 that required the `boxlinks` variable to be set in addition to the usual link coloring variables. Otherwise links were never colored in LaTeX PDF output. * Text.Pandoc.Highlighting: Export `lookupHighlightingStyle` [API change]. Previously this lived in an unexported module Text.Pandoc.App.CommandLineOptions, under the name `lookupHighlightStyle`. * Text.Pandoc.App: + Remove unneeded MonadIO constraints in readSources. + Factor out `convertWithOpts'` from `convertWithOpts`. This runs in any PandocMonad, MonadIO, MonadMask instance. So far it is not exported, but it might find a use later. * Support `--strip-comments` in commonmark/gfm (#8222). This change makes the commonmark reader sensitive to `readerStripComments`. * Lua: add function `pandoc.utils.citeproc` (Albert Krewinkel). The function runs the *citeproc* processor on a Pandoc document. Exposing this functionality to Lua allows to make citation processing part of a filter or writer, simplifies the creation of multiple bibliographies, and enables the use of varying citation styles in different parts of a document. * Refactor `linux/make_artifacts.sh`. * Update INSTALL.md installation from source instructions. * Use base64 package instead of base64-bytestring. It is supposed to be faster and more standards-compliant. * trypandoc improvements: + Add dropdown with canned examples. + Add citeproc support. + Support csv, bibliographic and binary formats. + Add load from file. + Add permalink. Don't always reload page. + Use vanilla JS and CSS + the new `pandoc-server.cgi`. * Allow haddock-library-1.11.0. * Convert `tool/extract-changes.hs` to a Lua filter. ## pandoc 2.19 (2022-08-03) * Add `--embed-resources` flag (Elliot Bobrow, #7331). This can be used to embed resources without implying `--standalone`. Deprecate `--self-contained` in favor of `--embed-resources --standalone`. * Allow environment variable interpolation in `highlight-style` and `pdf-engine` fields in defaults files (#8061; Jaehwang Jung, #8073). * Allow placing custom readers and writers in user data directory (Albert Krewinkel, #8112) (`readers` and `writers` subdirectories). * Add `tsv` (tab separated values) as an input format (#7974). [API change]: Text.Pandoc.Readers.CSV now exports `readTSV`. Internal change: In Text.Pandoc.CSV, `CSVOptions` has changed so that `csvQuote` takes a Maybe value. * Add `tex_math_dollars` to `gfm` default extensions (reflecting gfm's new support for math). * RST, Org, Markdown readers: support rowspans and colspans in grid tables (#8202, Albert Krewinkel). Note: the writers does not yet support these more complex grid table features, so these complex grid tables will not round-trip. * HTML, LaTeX, and MediaWiki readers: use `formatCode` (#8162, #8129, Elliot Bobrow). This moves formatting from inside inline code elements to the outside, since pandoc's Code element only takes string content. * Markdown reader: + Don't parse inline notes with blank lines inside (#8028). + Allow attributes in special spans (e.g. `smallcaps`, `underline`) (Albert krewinkel, #4102). These spans are parsed as SmallCaps or Underline elements, but any attributes are included in a wrapping Span. * HTML reader: + Allow sublists that are not marked as items (Albert Krewinkel, #8150). This is technically invalid HTML, but it can be found in the wild and browsers handle it. * Org reader (Albert Krewinkel): + Recognize absolute paths on Windows (Albert Krewinkel, #8201). + Recognize {webp,jxl} files as images (YI). + Allow attrs for Org tables (Albert Krewinkel, #8049). Tables with attributes are no longer wrapped in Div elements; attributes are added directly to the table element. + Support line selection in INCLUDE directives (Brian Leung, #8060). + Fix Post / Pre mixup when setting emphasis chars (Amir Dekel, #8134). * LaTeX reader: + Support `\includesvg` (#8027). + Unescape characters in `\lstinline` inside `\passthrough` (#8179). + Improve `mathEnvWith` (#8122). When converting e.g. an align environment to an aligned environment inside a Math element, we need to include a newline before the `\end{aligned}`, since the previous line might end in a comment. + Fix treatment of extensions for `\input` in LaTeX reader (#8092). Previously we required a `.tex` extension, but TeX allows any extension for `\input` (as opposed to `\include`). * RTF reader: + support `\nosupersub` (#8170). * TikiWiki reader: + Support underlined text * DocBook reader: + Improved reading `` elements (Frerich Raabe, #8065). * JATS reader: + Strip `ref-` prefix from ref id in xref (#8007). + Support edition in references (#8087). * RIS reader: + Make parser more forgiving (#8034). Allow blank lines after entries. Allow entries with no space after the `-`, provided they just have a newline, e.g. `DB -\n`. + Get right order of names (#8055). * MediaWiki reader: + Allow HTML comment after row start (#8110). * DokuWiki reader: + The `tex_math_dollars` extension is now supported for `dokuwiki` (but off by default) (#8178). + Content inside `...` is parsed as raw LaTeX inline, and inside `..` as raw LaTeX block (#8178). + The behavior of `...` is changed, so that instead of producing a code block, it produces raw HTML with ``. * LaTeX writer: + Improve grouping with autocites (#8088). + Extend list of book documentclasses (Wentau Han, #8053). + Fix width of multicolumn cells (Albert Krewinkel, #8090). Cells spanning multiple columns must be given an explicit width, calculated from the table properties. + Beamer: allow containsverbatim as alternative to fragile (#8080). * HTML writer: + Add 'footnotes' identifier to footnotes section (#8043). + Fix bug with `--number-offset`. This formerly caused section divs to be produced, even when `--section-divs` was not specified (#8097). + Use CSS flexboxes for columns (Albert Krewinkel). This allows an arbitrary number of columns, while the previous approach assumed exactly two columns. + Allow "spanlike" classes to be combined (see #8194). Previously classes like "underline" and "marked" had to be the first class in a span in order for the span to be interpreted as a "ul" or "mark" element. This commit allows these special classes to be "stacked," e.g. `[test]{.mark .underline}`; in addition, the special classes are no longer required to come first in the list of classes. + Avoid doubled style attribute when height and width are added to style because of an image, but the image already has a style attribute (#8047). + Do not include the deprecated doc-endnote role (#8030). doc-endnote was deprecated in DPUB-ARIA 1.1. + Remove extra soft break for tasklist (black-desk, #8142). Browser will display the extra newline character between checkbox and text as a space, which make tasklist items cannot be aligned. * EPUB writer: + Allow choice of math method for v3 (#8164). Previously we always used MathML for math in EPUB3, because the spec includes MathML. But this is not widely supported by readers, so it seems better to allow users to choose their math method as they can with EPUB2 or HTML. **NOTE:** Existing workflows that produce EPUBv3 documents including math will be affected by this change. You must add `--mathml` to your command line if you want to continue producing MathML. * RST writer: + Fix missing spaces with nested inlines (#8182). + Always escape literal backslash (#8178). * Ms writer: + Add comment in preamble stating generator. + Fix roff ms syntax highlighting definitions (#8175, thanks to Branden Robinson). * ConTeXt writer: + Support complex table structures (Albert Krewinkel, #8116). The following table feature are now supported in ConTeXt: - colspans, - rowspans, - multiple bodies, - row headers, and - multi-row table head and foot. The wrapping `placetable` environment is also given a `reference` option with the table identifier, enabling referencing of the table from within the document. + Unify link handling (Albert Krewinkel, #8096). Autolinks, i.e. links with content that's the same as the linked URL, are now marked with the `\url` command. All other links, both internal and external, are created with the `\goto` command, leading to shorter, slightly more idiomatic code. As before, autolinks can still be styled via `\setupurl`, other links via `\setupinteraction`. + Use "sectionlevel" environment for headings (Albert Krewinkel, #5539). The document hierarchy is now conveyed using the `\startsectionlevel`/`\stopsectionlevel` by default. This makes it easy to include pandoc-generated snippets in documents at arbitrary levels. The more semantic environments "chapter", "section", "subsection", etc. are used if the `--top-level-division` command line parameter is set to a non-default value. * Docx writer: + Add `w:lang` to `rPr` for Span and Div with lang attribute, so that Word can know that "Apfel" is not a spelling error (#8026). + Prevent crashing when handling invalid tables (Albert Krewinkel, #8102). Tables with different numbers of cells per row would sometimes crash pandoc. This fix prevents this by cutting off overlong rows. * ICML writer: + Support custom-style attribute on Table (#8079). * AsciiDoc writer: + Fix commas in link text (#8070). Commas in link text trigger interpretation of attributes. To block this, we replace them with numeric entities. + Fix underline. We were rendering it as `+++text+++`; this is now changed to `[.underline]#text#`. See comment at . * FB2 writer: + Fix handling of non-section Divs (#8123). * Markdown writer: + Disable soft wrapping when `hard_line_breaks` enabled (#8035). We were already doing this for `markdown`; this commit does the same thing for `markua` and `commonmark` and `gfm`. + Avoid excessive indentation on bullet lists for `commonmark`, `markua`, `gfm`. They are now nested by 2 spaces instead of 4 (#8011). * Text.Pandoc.Class: + Add new function `findFileWithDataFallback` [API Change] (Albert Krewinkel). + `fillMediaBag`: Keep attributes of original image on Span (Albert Krewinkel, #8099). Images that cannot be fetched are replaced with a Span that contains the image's description. The span now also retains all original image attributes and inherits all attributes of the image. Furthermore, the classes `image` and `placeholder` are added, and path and title are store in attributes `original-image-src` and `original-image-title`, respectively. * Text.Pandoc.Shared: + `makeSections`: don't make a section for a div with class "fragments" (#8098). + Ensure that Nulls are ignored by `makeSection` and in segmenting slides (#8155). + Add `formatCode` function to Text.Pandoc.Shared [API change] (Elliot Bobrow, #8129). + `taskListItemToAscii`: handle asciidoctor's characters (#8011). Asciidoctor uses different unicode characters for task lists; we should recognize them too and be able to convert them to ascii task lists in formats like gfm. + Deprecate `deLink` and mark for later removal. * Text.Pandoc.Writers.Shared: + `toTableOfContents`: Don't replace links with empty spans in TOC (#8020). * Text.Pandoc.Readers.Metadata: + Ensure that metadata values w/o trailing newlines are parsed as inlines, as the manual states. Previously, they were parsed as inlines if they would otherwise have been a single Plain or Para, but otherwise left unchanged. This led to some quirky results (e.g. #8143). We now use the general function `blocksToInlines` from T.P.Shared. * Text.Pandoc.Parsing: + Simplify `gridTableWith'`, `gridTableWith` [API Change] (Albert Krewinkel). The functions `gridTableWith` and `gridTableWith'` no longer takes a boolean argument that toggles whether a table head should be parsed: both, tables with heads and without heads, are always accepted now. * Lua subsystem (Albert Krewinkel): + Extend `pandoc.system` module (Albert Krewinkel, #8184). The module now has the additional functions `list_directory`, `make_directory`, and `remove_directory`. This makes it easier to write cross-platform scripts that need to inspect or modify the file system. + Require pandoc-lua-marshal 0.1.7. Adds a `clone` methods to Pandoc objects and allows to pass Blocks in instead of full Caption elements. + Add fields `pandoc.readers` and `pandoc.writers` (#8177). The set of supported input and output formats is made available to Lua users. + Ensure that tables marshaled via JSON arrays behave like Lists. This allows to invoke methods like `map` and `includes` on lists like `PANDOC_WRITER_OPTIONS.extensions`. + Require hslua-2.2.1, unless lua53 flag is set, and do not reset foreign encoding before running Lua. This fixes a problem where the encoding used for Lua filenames would sometimes mismatch the encoding used by the OS. + Simplify module loading code. Modules are now loaded directly; the special pandoc Lua package searcher is no longer necessary and has been removed. + Add function pandoc.mediabag.fill (#8104). The function allows to fill the mediabag with all images in a given document. Images that cannot be fetched are replaced with a Span containing the image description. * Populate mediabag after filters have run (Albert Krewinkel, #8099). The mediabag is filled with document resources after the filters have run. This allows, for example, filter authors to modify image paths before pandoc tries to fetch the images. Lua filters that rely on a filled mediabag can use the new `pandoc.mediabag.fill` function to perform that action in the filter. * Ms template: redefine rather than removing .CH macro (#8175). * JATS template (Albert Krewinkel, except as noted): + Include particles, prefix, suffix in names. + Mark authors with cor-id as corresponding authors. Corresponding authors are marked by setting the attribute `corresp="yes"` in their respective `` element. + Unconditionally include permissions element (#8040). Fixes a bug that caused license information to be omitted when no copyright information was provided. + Follow JATS4R recommendation and PudMed Central for license URI (Castedo Ellerman, #8041). * LaTeX template: + Rename `\textormath` to `\TextOrMath` (Hos Es, #8036). + Fix links-as-notes (Albert Krewinkel, #8077). * HTML template styles: + Remove `span.underline` rule. This is superfluous now that we render Underline as ``. + Improve CSS for task lists (#8151). * LaTeX template: Add `boxlinks` variable for LaTeX/PDF output (#8198). If `boxlinks` is set but `colorlinks` is not, then boxes will be printed around links (`hidelinks` will not be set in `hypersetup`). * `--self-contained`: Handle `url()` in `