ITADN
jgm/pandoc

版本发布 8

pandoc 3.8.2.13.8.2.1
? · 2025-10-20

``` I'm pleased to announce the release of pandoc 3.8.2.1, available in the usual places: Binary packages & changelog: https://github.com/jgm/pandoc/releases/tag/3.8.2.1 Source & API documentation: http://hackage.haskell.org/package/pandoc-3.8.2.1 This is primarily a bug-fix release. There are no API changes. The main motivation for the release is to fix a serious performance regression with --citeproc and the default CSL style, chicago-author-date.csl. This style was recently revised in a way that took much longer for citeproc to parse. This version of pandoc is built with citeproc 0.11, which fixes the performance regression. One new feature (added by Albert Krewinkel) is that the Org reader now parses parameter lists on unknown blocks, and also supports dynamic blocks. Thanks to all who contributed, especially new contributors Emmanuel Ferdman, FoxChillz, mourino, and priiduonu. ``` <details> <summary>Click to expand changelog</summary> - 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. </details>

pandoc 3.83.8
? · 2025-09-06

``` I'm pleased to announce the release of pandoc 3.8, available in the usual places: Binary packages & changelog: https://github.com/jgm/pandoc/releases/tag/3.8 Source & API documentation: http://hackage.haskell.org/package/pandoc-3.8 This release comes with many small improvements and a few larger ones. Among the more visible changes: + A new input/output format xml, which exactly represents a pandoc AST in a more easily human-readable form than JSON. The format is documented in doc/xml.md, and schemas can be found in tools/pandoc-xml.*. + A new command line option --syntax-highlighting, which takes the values 'none', 'default', 'idiomatic', a style name, or a path to a theme file. --no-highlighting and --highlight-style are deprecated. + New extensions smart_quotes and special_strings for org mode. These allow pandoc's parsing to more closely reproduce Emacs org-mode's behavior. + The old compact_definition_lists extension has been removed. API changes: + New modules Text.Pandoc.Readers.XML (exporting readXML) and Text.Pandoc.Writers.XML (exporting writeXML). + Text.Pandoc.Extensions: added constructors Ext_smart_quotes, Ext_special_strings; removed Ext_compact_definition_lists. + Text.Pandoc.App now exports versionInfo, a function that takes three parameters that can be filled in by pandoc-cli. + Text.Pandoc.Parsing: tableWith and tableWith' now return a list of lists of Blocks, allowing for multiple header rows. + Text.Pandoc.ImageSize: Add Point and Pica as constructors of ImageSize. Add Avif constructor of ImageType. + Text.Pandoc.Class: CommonState is now opaque and does not support its fields. To compensate for this, we now export several new functions: getRequestHeaders, setRequestHeaders, getSourceURL, getTrace. Thanks to all who contributed, especially new contributors Christopher Kenny, Erik Post, Repetitive, Reuben Thomas, Ryan Gibb, Sean Soon, and massifrg. ``` <details> <summary>Click to expand changelog</summary> - 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: - Don’t confuse a span after an author-in-text citation with a locator. E.g. `@foo [test]{.bar}`. See https://github.com/jgm/pandoc/issues/9080#issuecomment-3221689892. - Make definition lists behave like other lists (#10889). If the `four_space_rule` extension is not enabled, figure out the indentation needed for child blocks dynamically, by looking at the first nonspace content after the `:` marker. Previously the four-space rule was always obeyed. - Fix tight/loose detection for definition lists, to conform to the documentation. - 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 `writerHighlightStyle` \[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. </details>

pandoc 3.7.0.23.7.0.2
? · 2025-05-29

I'm pleased to announce the release of pandoc 3.7.0.2, available in the usual places: Binary packages & changelog: https://github.com/jgm/pandoc/releases/tag/3.7.0.2 Source & API documentation: http://hackage.haskell.org/package/pandoc-3.7.0.2 This release fixes some regressions in grid table rendering introduced in 3.7. There are a few other nice improvements as well; see the changelog for details. Thanks to all who contributed, especially new contributor GHyman83. <details> <summary>Click to expand changelog</summary> - 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 </details>

pandoc 3.7.0.13.7.0.1
? · 2025-05-17

I'm pleased to announce the release of pandoc 3.7.0.1, available in the usual places: Binary packages & changelog: https://github.com/jgm/pandoc/releases/tag/3.7.0.1 Source & API documentation: http://hackage.haskell.org/package/pandoc-3.7.0.1 This release fixes some serious problems with the new grid table writer introduced in 3.7. If you installed 3.7, I recommend you upgrade. It also fixes tagging with `-t context+tagging`. ``` <details> <summary>Click to expand changelog</summary> - 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. </details>

pandoc 3.73.7
? · 2025-05-15

I'm pleased to announce the release of pandoc 3.7, available in the usual places: Binary packages & changelog: https://github.com/jgm/pandoc/releases/tag/3.7 Source & API documentation: http://hackage.haskell.org/package/pandoc-3.7 - New command-line option `--variable-json`. This allows non-string values (such as booleans or maps) to be given to template variables on the command line. - `--pdf-engine` will now accept `groff` as a value. - Markdown and RST writers now allow row/colspans in grid tables. In addition, table column widths will expand if needed to contain text that can't be wrapped, avoiding the introduction of unwanted whitespace. - The `four_space_rule` extension now works for `plain` output. - Roff formats now use the most portable syntax possible. - Improved handling of inline TeX in Org-mode. - In Lua filters, `pandoc.read` can now be used in "sandboxed" mode, restricting file or network access, by passing in a list of accessible files as a fourth parameter. API changes: - Text.Pandoc.Writers.Shared: new function `delimited`. - Text.Pandoc.Writers.Shared: new version of `gridTable` with changed parameters. - Text.Pandoc.Class: new exported function `sandboxWithFileTree`. Thanks to all who contributed, especially new contributors Manolis Stamatogiannakis, Mohamed Akram, and Niklas Eicker. <details> <summary>Click to expand changelog</summary> - 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.43.6.4
? · 2025-03-16

<details> <summary>Click to expand changelog</summary> - 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 `role`s 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. </details>

pandoc 3.6.23.6.2
? · 2025-01-12

<details> <summary>Click to expand changelog</summary> - New output 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). </details>

pandoc 3.6.13.6.1
? · 2024-12-23

<details> <summary>Click to expand changelog</summary> - 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). </details>