Repository navigation
I'm pleased to announce the release of pandoc 3.14,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.14
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.14
This release includes a lot of bug fixes and small improvements,
including improvements in dependencies, which you can read about
in the changelog. Here are the changes of special note:
-
Pandoc now searches a path given in an enviornment variable
PANDOC_DATA_DIRS when looking up data files (including
templates, filters, defaults files, metadata files, etc.).
The user data directory is still tried first. This change
will make it easier to create distributions of pandoc with
special customized data files. -
The LaTeX writer now uses custom macros for footnotes in
tables and definition lists, fixing a bug with hyperlinks
in the notes in these contexts. Those who use custom templates
will need to import the definitions of these macros from
the default LaTeX template.
API change:
- Text.Pandoc.Class exports new functions
getDataDirs
andgetPandocDataDirs.
Thanks to all who contributed, especially new contributors
Alain Lesage, Asuka, Caio Vinícius, Jeremy Levartovsky,
Nacho García, tyler000000.
Click to expand changelog
-
Support
PANDOC_DATA_DIRSfor data file lookup (#7922). IfPANDOC_DATA_DIRSis set, the (absolute) directories it lists are searched, in order, for data files not found in the user data directory, before falling back to the default data files. This covers templates, filters, defaults files, metadata files, CSL styles, and other data files. IfPANDOC_DATA_DIRSis set, print its value in--versionoutput. -
Reset sourcepos when parsing footnotes and grid table cells (#12001, extends fix for #11888). Otherwise, when one of these ends a file, relative paths in it can be rebased against the next file on the command line.
-
LaTeX reader:
- Fix duplicated text after a control space at line end (#12051, Asuka).
- Handle pandoc’s deferred footnotes (
\pandocfootnotemark{n}and\pandocfootnotetext{n}{..}) as produced by the LaTeX writer for notes in tables, captions, etc. - Ignore definitions of
\pandocbounded,\pandocfootnotemark, and\pandocfootnotetext(e.g. from pandoc’s template), which the reader handles directly. Previously these definitions were expanded, producing garbage and losing content. - Fix file-crossing bug in
rawLaTeXParser(#12072). The raw LaTeX parser didn’t work properly when crossing from one source file to another.
-
Typst reader:
- Handle
columns: autoin grid (#12061).
- Handle
-
HTML reader:
- Don’t drop ordered lists and rules inside footnotes (#11852). Previously an
<ol>inside the body of a note was treated as the list of notes, and its items were lost. Similarly, an<hr>inside a note was dropped.
- Don’t drop ordered lists and rules inside footnotes (#11852). Previously an
-
RST reader:
- Strip minimum indentation from indented blocks (#12071). Previously the indentation of the first line was stripped, so lines with less indentation lost all their leading whitespace. Now, as in docutils, the minimum indentation is stripped and relative indentation is preserved.
- Require descriptions in option list items (#12063).
-
ODT reader:
- Support the
stylesextension (#12060).
- Support the
-
Docx reader:
- Merge adjacent styled code blocks (#9183, Caio Vinícius). Without
+styles, consecutive “Source Code” paragraphs are combined into a single code block bycombineBlocks. With+styles, each paragraph is first wrapped in aDivcarrying itscustom-styleattribute, so theCodeBlockcase no longer matched and every line became its ownDiv [CodeBlock]. - Don’t drop contents of customXml element (#12050).
- Read all underline types (#11988, Patrick Creighton).
- Follow
w:numStyleLinkin abstract numberings (#9222, Caio Vinícius).
- Merge adjacent styled code blocks (#9183, Caio Vinícius). Without
-
Pptx reader:
- Don’t add spaces between text runs (#12016, Nacho García).
- Read the shapes inside group shapes (#12017, Nacho García).
- Read equations and markup-compatibility blocks (#12025, Nacho Garcia).
- Read speaker notes (Nacho García, #12023). Each slide’s notes are now read into a
notesdiv at the end of the slide’s blocks, the form the pptx writer turns into speaker notes, so pptx -> Markdown -> pptx keeps them. - Read charts as tables (Nacho García, #12023). Previously, a chart was read as a placeholder text. We now create a table from the chart’s cached data. The table is put in a
chartDiv whosetypeattribute holds the chart type. The chart’s title becomes the table captions. The chart code is in Text.Pandoc.Readers.OOXML.Charts. - Mark hidden slides with a
hiddenclass on the header (Nacho García, #12023). - Handle merged table cells (Nacho García).
- Parse bold, italic, sub/superscript and hyperlinks (Nacho García). Text runs were previously read as plain text, so their formatting and hyperlinks were lost.
- Read inherited bullets, numbering and nested lists (#12042, Nacho García).
- Skip slide number placeholders (#12045, Nacho García).
-
Xlsx reader:
- Resolve package-absolute relationship targets (#12013, Nacho García).
- Read inline strings and rich text as written (#12014, Nacho García).
- Look up a cell’s font through its cell format (#12033, Nacho García).
- Read merged cells as spans (Nacho García).
- Render dates and times (Nacho García).
- Render numbers as Excel’s General format (Nacho García, #12023).
- Read charts (#12043, Nacho García). Charts are now read as tables using the cached data.
-
Docx writer:
- Implement flip-flopping for emph (#11961). Emph within emph becomes upright. This is important for correct formatting of titles in CSL, among other things. LaTeX does this automatically, and in HTML we achieve it via CSS.
-
EPUB writer:
-
Ipynb writer:
- Make ANSI escape stripping linear (#7744, Jeremy Levartovsky).
-
Vimwiki reader:
- Support rejected todos (tyler000000).
-
LaTeX writer:
- Fix hyperlinks for deferred footnotes (#11936). Notes in tables, captions, and definition list terms are rendered as a mark followed later by the note text. Previously we used
\footnotemark{}and\footnotetextwith manual adjustments to the footnote counter. But hyperref anchors each\footnotetextat the destination of the most recent\footnotemark, so when there were several such notes, all of the texts got the last mark’s anchor and the links for the other marks were broken. We now emit\pandocfootnotemark{n}and\pandocfootnotetext{n}{..}, wherenis a unique id. These macros, defined in the default template when thedeferred-notesvariable is set, save the footnote mark and hyperref anchor at the mark and restore them at the text. This removes the need for counter arithmetic, works when the footnote counter is reset by chapter, and handles notes nested inside deferred notes (whose texts are now emitted after the text containing their marks). Note: Users of custom LaTeX templates, or of LaTeX fragments produced without--standalone, will need to include the definitions of\pandocfootnotemarkand\pandocfootnotetextfrom the default template. - Allow repeated longtable captions (#4558, Václav Haisman). If a table has a
repeat-captionclass, captions will be repeated on each page of a longtable.
- Fix hyperlinks for deferred footnotes (#11936). Notes in tables, captions, and definition list terms are rendered as a mark followed later by the note text. Previously we used
-
HTML styles template:
- Add emph flip-flopping. So, emph within emph renders as upright, etc.
- Move
@printrules to end (#12064), so they aren’t overridden.
-
Text.Pandoc.PDF:
- PDF via LaTeX: do at most 3 runs when only a TOC is present (#12012, Alain Lesage).
-
Text.Pandoc.Class:
- Export new functions
getDataDirsandgetPandocDataDirs. [API change]
- Export new functions
-
Text.Pandoc.Citeproc:
removeFinalPeriodnow acts across Link boundary.
-
pandoc-lua-engine: raise lower bound for pandoc to 3.13 (#12066).
-
Depend on texmath 0.13.3.5, commonmark 0.3.2, commonmark-extensions 0.2.8, citeproc 0.14.2, typst 0.12.1, emojis 0.1.6, skylighting 0.15.0.1.
-
New bounds for crypton in pandoc-lua-engine and pandoc.
-
Makefile:
- Fix release-templates target so it pushes tags.
- Remove default CABALOPTS. These can be put in cabal.project.local. This will ensure that the same options are used by HLS, so that rebuilds aren’t needed.
make check-cabal: exit with error status on outdated deps.- Reorganize
check-cabal; addcheck-sdisttarget we can run separately.
-
cabal.project: specify
+httpflag for all ghc versions. -
Minimize the test docx, odt, pptx files. This reduces the size of the test files (and release tarball) by 1.79 MB.