I'm pleased to announce the release of pandoc 3.10.1,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.10.1
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.10.1
This release contains many small improvements and bug fixes.
Some of the more notable ones are mentioned here (see the changelog
for details):
- t2t (Txt2Tags markup) is now an output format.
- It is now possible to use a defaults file without an
extension; pandoc will add the .yaml extension only if
no file exists with the name specified.
- The auto_identifiers extension may now be used with typst input.
(however, it is not enabled by default.)
- We now use '#divider()' (typst 0.15) for typst horizontal rules,
instead of defining our own horizontalRule function.
- It is now finally possible to force LaTeX to use a regular
floating table rather than a longtable, which is especially
important for two-column layouts (longtable does not
support them). One does this by adding the `float` class
to the table's attributes.
- starmath is now used instead of MathML for math in ODT.
This produces much better results and improves the editability
of equations.
- We now automatically enable auto_identifiers when a table of contents
is requested, since these require identifiers to link to.
- A new flake.nix allows use to use 'nix build' and 'nix run'
with pandoc.
API changes:
New module Text.Pandoc.Writers.Txt2Tags, exporting writeTxt2Tags,
also re-exported by Text.Pandoc.Writers.
Thanks to all who contributed, especially new contributors
Can H. Tartanoglu, Chirag Dhamange, Enrico Spinielli,
Robertas, Scott Talbert, Tobias Deiminger, luginf.
Click to expand changelog
-
New output format
t2t(Txt2Tags markup, https://txt2tags.org)) (luginf). -
New module Text.Pandoc.Writers.Txt2Tags, exporting
writeTxt2Tags(loginf) [API change]. Also exported from Text.Pandoc.Writers. -
Change adding of
.yamlextension in--defaultsoption (#11717). Previously it was always added if the specified filename lacked an extension. Now it is only added if there is no file with the original name. This facilitates using--defaultswith bash/zsh<(..)or=(..). -
RST reader:
-
Markdown reader:
- Ordered sublists must start with 1, er equivalent, e.g. i (#11735). This brings the markdown parser in line with commonmark, and avoids a lot of unintended list starts. Note that ordered lists that are not sublists may still start with numbers other than 1.
-
ODT reader:
- Don’t create Emph just because of changed font (#11691).
-
RTF reader:
- Support multi-paragraph list items.
- Support legacy
\pn/\pntextparagraph numbering (#11686).
-
Docx reader:
-
LaTeX reader:
- Handle
\hypertargetwith one braced parameter (#7418).
- Handle
-
DokuWiki reader:
- Skip non-cell content after table row (#11739).
-
Typst reader:
-
HTML reader:
-
Powerpoint writer:
- Keep tables and surrounding text on same slide (#11433, Chris Callison-Burch). Previously, when a slide contained bullet points before and after a table, content would be split across multiple slides or use a two-column layout that didn’t preserve the source order.
-
Texinfo writer:
-
LaTeX writer:
- Provide a way to use table instead of longtable (#1023). When the
floatclass is attached to a table, a standard floatingtablewill be generated instead of alongtable. Placement can be specified via thelatex-placementattribute. This will help, especially, those who use two-column layouts, sincelongtableis incompatible with these. - Fix footnotes in definition list headings (#8240).
- Provide a way to use table instead of longtable (#1023). When the
-
Markdown writer:
- Fix ordered list indentation bug (#11762).
- Improve identification of code language class by looking it up in the syntax map (#11701).
- In YAML metadata, put double quotes around strings that are numbers beginning with 0 or ending with 0 and having a decimal point (#11715). Otherwise they will read as YAML numbers and potentially be modified (e.g. 3.10 -> 3.1).
-
Docx writer:
- Use namespace URI instead of prefix in extractPageLayout (#11697, Robertas).
-
ODT writer:
- Use starmath for math. This improves appearance and editability of equations. The main code changes are due to @jdpipe (#11470).
- Image anchoring, percent dimensions, text width resolution (#11746, Can H. Tartanoglu). Inline images now emit
text:anchor-type=as-charon theirdraw:frame, anchoring the frame as a character so it flows with the surrounding text. When both width and height are given and the width is a percentage, the width is now resolved against the reference document text area width, mirroring how the docx writer derives its print width from the reference docx section properties. The height follows the aspect ratio.
-
RTF writer:
- Emit real RTF lists with a list table. Lists were written as plain paragraphs with a literal marker and a hanging indent, carrying none of the
\ls/\ilvlreferences or the\listtable/\listoverridetablethat the RTF list model (and pandoc’s own reader) expect, so lists could not round-trip. - Allow fontsize to be specified (#11750). The fontsize is specified in a variable or metadata field and passed through the renderer via a Reader monad.
- Emit real RTF lists with a list table. Lists were written as plain paragraphs with a literal marker and a hanging indent, carrying none of the
-
Typst writer:
- Fold
langintopickTypstAttributes(#11673). This ensures thatlangattributes will be set for both Divs and Spans. - Add support for tight terms in Typst writer (#11748, Amir Dekel). This just affects whether a blank line is emitted in the markup. Note that pandoc’s default template contains a show rule for terms that will make these blank lines irrelevant, but this change allows one to use tight lists with custom templates.
- Further tight term list improvements. For tight list items consisting of just one Plain block, we no longer create a
#blockfor the definition; this allows it to remain on the same line as the term. - Emit
divider()as horizontal rule (#11540).
- Fold
-
LaTeX template:
- The
captionpackage is included and a default spacing set between the caption and the table.
- The
-
Typst template:
- Remove custom show rule for terms. Instead, we use a set rule to set hanging-indent.
- Remove old
horizontalRuledefinition from default template. - Polyfill
dividerfor typst < 0.15. - Allow multiword keywords (#11730, Albert Krewinkel). Typst expects single words as keywords, so keywords consisting of multiple words must be quoted (and should not be wrapped).
-
HTML template:
- Remove hard-coded font-size for print CSS. Print CSS now uses the inherited font-size.
-
epub.css:
-
Text.Pandoc.Shared:
- Improve
makeSections(#11745). Previously it would sometimes create doubled section divs. By leaving the inner heading’s id on the heading itself, and then consolidating the inner and outer section divs, we can avoid this undesirable result. taskListItemToAscii: handle empty task list case.taskListItemFromAscii: handle empty task list case (#11599, Chirag Dhamange).
- Improve
-
Text.Pandoc.App.CommandLineOptions:
- Use
optCSLandoptBibliographyfrom Opt (#11741). Previously we setoptMetadatadirectly, but that had some unintended effects, especially in interacting with defaults files. With this change, a--cslon the command line can override one set in a prior defaults file.
- Use
-
Text.Pandoc.App:
- Enable
auto_identifierswhen a table of contents is requested (#11041). Table-of-contents entries link to heading identifiers, so when--toc/--table-of-contentsis given, force theauto_identifiersextension on for the input format even when it is off by default (as it now is for typst). This makes typst-to-markdown--tocproduce working links.
- Enable
-
Text.Pandoc.Writers.Shared:
htmlAttrs- don’t adddata-prefix formarkdown(#11685). This is necessary for themarkdown_attributeextension to work properly.
-
Ensure that IO error messages go to stderr (#11710).
-
Use emojis 0.1.5, texmath 0.13.2,typst 0.11, typst-symbols 0.3, pandoc-types 1.23.1.2, djot 0.1.4.1, commonmark-extensions 0.2.7.1, skylighting-format-blaze-html 0.1.2.1.
-
Add Makefile rule to update all-cabal-hashes in flake.lock.
-
MANUAL.txt:
- Clarify comment about table types (#11719).
- Small clarification in image section (#11760).
- Rewrite “A note on security.” Clarify the risks of using pandoc in a web service and explain how to do so more safely. Note some specific vulnerabilities with the pdf-engine
wkhtmltopdf. This incorporates the suggestions made in #11262 and also benefits from a report by Kai Aizen. - Clarify
native_numberingextension (#11599). - Include Lua filter to set float attribute on tables.
- Clarify expectations for EPUB metadata (#11723).
- Improve instructions for specifying EPUB identifier (#11723).
- Fix typo (#11720, Scott Talbert).
-
Fix typo in lua-filters.md (#11724, Enrico Spinielli).
-
Revamp
flake.nixto usehaskell.nix(#11707). This allows the project to be built usingnix buildand run usingnix run. @srid deserves credit for most of this. stack.yaml is used as a source of truth for the versions to use, including for git repositories. -
Change symlink to regular file for COPYING.md in pandoc-cli, pandoc-lua-engine, pandoc-server.