Releases: jgm/pandoc
pandoc 3.9.0.2
I'm pleased to announce the release of pandoc 3.9.0.2,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.9.0.2
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.9.0.2
This release just fixes a bad regression in the typst template.
Click to expand changelog
- Typst template: fix regression introduced in 3.9.0.1 (#11538).
pandoc 3.9.0.1
I'm pleased to announce the release of pandoc 3.9.0.1,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.9.0.1
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.9.0.1
This is a bug-fix release, with no major new features or
API changes, but lots of small improvements. See the
changelog for details.
Thanks to all who contributed, especially new contributors
Agriya Khetarpal, Peter Briggs, Sidney Mau, and λx.x.
Click to expand changelog
-
WASM GUI:
- Don’t block everything while pandoc.wasm loads.
- Fix bug with Unicode filenames (#11447).
- Catch errors loading pandoc.
-
Docx reader:
- Recognize media inside textboxes (#11053, Raymond Berger).
- Properly handle media stored with packaged-rooted paths such as
/media(#11518). This can be produced by the online version of Word. With this change, media stored at an absolute path will be stored with its original name and not given a SHA1-based name. - Preserve non-textbox content when unwrapping textboxes (#11510, #6893, #11412, #5394, #9633). Treat text inside a textbox containing an image as a figure caption.
-
Typst reader:
- Handle bibliography command (#11460). If this is present, a bibliography section is added to the document and the bibliography paths are added to
bibliographyin the metadata. This sets things up for using--citeproc.
- Handle bibliography command (#11460). If this is present, a bibliography section is added to the document and the bibliography paths are added to
-
Textile reader:
- Handle block content in cells (#11455).
-
Docx reader:
- Support
w:gridBeforetable row property (#11464, Jan Tojnar).
- Support
-
LaTeX reader:
-
ODT Reader:
-
Markdown reader:
- Fix bug with
lists_without_preceding_blankline(#11534).
- Fix bug with
-
Typst writer:
- Don’t add a carriage return after
\for hard break (#11446). They are not necessary. Note that they can still be included if you use--wrap=preserveand add a newline in your source document. - Improve handling of data: URIs in images. Instead of using an SVG with a link containing the data URI (the solution of #10460), we can now simply produce a
bytesobject with the requisite bytes. Typst figures out the format automatically. - Fix escaping of quotes (#11463).
- Include alt attributes on images (mcanouil).
- Properly escape
.after bracketed argument (#11511).
- Don’t add a carriage return after
-
Docx writer:
-
EPUB writer:
-
ODT writer:
- Rename inline source class to match LibreOffice (#3390, Jan Tojnar). Rename the text style we use to represent
Codeinlines fromSource_20_TexttoSource_Text. This is the same name LibreOffice Writer uses so it will be recognized by the Character Styles section of the Styles menu. - Remove font size from inline source class (Jan Tojnar). This matches what LibreOffice Writer is doing. Also fixes literals inside headings being too small.
- Modernize
Preformatted Text&Source Textstyles (Jan Tojnar). Presumably,font-family-genericandfont-pitchwill allow to find a replacement on systems that do not haveCourier New.
- Rename inline source class to match LibreOffice (#3390, Jan Tojnar). Rename the text style we use to represent
-
Markdown writer:
-
HTML writer:
- For revealjs, default
scrollProgresstoauto(Christophe Dervieux).
- For revealjs, default
-
PPTX writer:
- Register content type for embedded fonts (#11492).
-
MediaWiki writer:
- Use appropriate syntax for external images (#11494). Note that they will only be rendered as images if an option
$wgAllowExternalImagesis enabled in the MediaWiki instance.
- Use appropriate syntax for external images (#11494). Note that they will only be rendered as images if an option
-
ICML writer:
- Support for image object styles (#11498, massifrg). This change allows users to style images in InDesign bysetting the
object-styleattribute in a pandoc Image, which is mapped to the AppliedObjectStyle attribute in the Rectangle element around an Image element in the resulting ICML.
- Support for image object styles (#11498, massifrg). This change allows users to style images in InDesign bysetting the
-
JATS writer:
- Improve representation of Divs (Albert Krewinkel). The writer now checks if the element used to represent (non-special) Divs has any
<boxed-text>specific attributes. If it does, the writer keeps wrapping the Div contents in a<boxed-text>, as it did before. Otherwise, the writer falls back to the more appropriate<p>element or simply unwraps the Div if the wrapping element wouldn’t have any attributes. The new behavior gives better semantic results in most cases, as<boxed-text>should be used for text that “is outside the flow of the narrative text”, which doesn’t apply to most divs. “Special” divs, like those used to mark sections, are not affected by this change.
- Improve representation of Divs (Albert Krewinkel). The writer now checks if the element used to represent (non-special) Divs has any
-
Text.Pandoc.Writers.GridTable:
- Normalize tables (#8102). Previously, if an invalid table was passed to
toTable, an array index error could be raised. Normalizing the table forces it into a shape that won’t allow this error.
- Normalize tables (#8102). Previously, if an invalid table was passed to
-
Lua subsystem (Albert Krewinkel):
- Add new function
pandoc.types.Sources(#11441).
- Add new function
-
LaTeX template: properly handle keywords with commas. These need to be put in an
\xmpquote{..}command. Closes #11528. -
HTML styles template: avoid duplicate code selector. Consolidate two clauses. Closes #11484.
-
Revealjs template: fix type rendering of scroll-view options (Christophe Dervieux, #11486).
-
Typst template:
- Use both place and block for title (Gordon Woodhull). Otherwise the title will be confined to the left column
- Put title block in a conditional (#11529). This avoids an empty block for documents that lack metadata information. The empty block causes problems if
#set pageis used, as it will cause a page break.
-
Beamer template: add
logooptionvariable (#11452, Sidney Mau). -
Text.Pandoc.ImageSize:
- Correctly handle percentage width, height on SVG (#11530). Previously we were getting image size of 0 when a percentage was specified for width or height on SVG. With this change, we simply ignore these percentages (becaues ImageSize doesn’t know the size of the containing element).
-
Re-add
-threadedto compile options in pandoc-cli. -
Use released djot, asciidoc, texmath, typst.
-
Allow crypton 1.1, tls 2.2, http-client-tls 0.4.
-
Require auto-update >= 0.2.6 to fix server on macOS (#11488).
-
pandoc-cli.cabal: bump base min bound to 4.18 (same as pandoc).
-
MANUAL.txt:
pandoc 3.9
I'm pleased to announce the release of pandoc 3.9,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.9
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.9
Starting with this release, pandoc can be compiled to WASM, making it
possible to use pandoc in the browser. A full-featured GUI interface
is provided at https://pandoc.org/app.
Defaults files may now be in either JSON or YAML, and variable
interpolation works now for the `defaults` field of a defaults file,
making it easier for defaults files to extend others.
--extract-media will now create a zip archive containing the media
(instead of a directory) if the specified path has a .zip extension.
A special class on headings can now be used to reset 'subsequent'
status for citations processed using --citeproc. This can be important
for some styles, which require that full citation information be given
for the first citation to a work in any given chapter.
The 'alerts' extension can now be used with pandoc's Markdown.
Support has been added for PDF standards and tagging via lualatex.
API changes:
- Text.Pandoc.Shared exports hasLineBreaks.
- The PandocHttpError constructor for PandocError now takes
a Text as argument instead of HttpException.
Thanks to all who contributed, especially new contributors Albert
Lei, Anton Melnikov, Chris Callison-Burch, Jacob Larkin, Yann
Trividic, You Jiangbin, benniekiss, and har7an.
Click to expand changelog
-
Add support for compiling pandoc to WASM. (To build,
make pandoc.wasm.) A stanza incabal.projectcontains the necessary build modifications. We owe this almost entirely to TerrorJack, who created the original proof of context and came up with the necessary build flags and patches to some dependencies.pandoc.wasmhas almost all the power of regular pandoc. The main limitations is that it operates in a WASM sandbox and thus cannot use HTTP to fetch resources and cannot run system commands. As a result, JSON filters cannot be used,--embed-resourcesworks only with resources that have been explicitly provided in the WASM sandbox, and PDFs cannot be produced (since that requires running external commands). However, Lua filters can be used, as long as they do not run system commands.A JavaScript bridge module,
wasm/pandoc.js, is provided; this handles the setup necessary to runpandoc.wasmin a browser.In addition, a full-featured GUI interface is provided in the
wasmsubdirectory.make servefrom that directory and it will run locally, or visit https://pandoc.org/app. Note that once the relevant code has been downloaded by the browser, it runs entirely in the browser, and the conversions never touch a server. The GUI was developed in interaction with Claude Code. This app includes a WASM version of Typst and can produce PDF output via Typst. -
Defaults files may now be either JSON or YAML (though a
.yamlextension will still be assumed if the file has no extension). The structure of a JSON defaults file is isomorphic to that of a YAML defaults file. -
Variable expansion now works even for the
defaultsfield of defaults files (#8024, Jacob Larkin). -
--extract-mediawill now create a zip archive containing the media (instead of a directory) if the path provided has a.zipextension. -
Processing with
--citeprocis now affected by areset-citation-positionsclass on headings. When thereset-citation-positionsclass is added to a top-level heading,--citeprocwill reset position information at that point in the document. This is needed in order to ensure that the first citation in a chapter to a work that has been cited in a previous chapter will not be in abbreviated form. -
RST reader:
- Fix definition lists where term ends with
-(#11323). This reverts some old code giving special treatment to lines ending in hyphens; I don’t understand why it was there, because rst2html does not seem to do this.
- Fix definition lists where term ends with
-
HTML reader:
-
Markdown reader:
- Fix parsing of inline math (
$...$) (#11311, benniekiss). Do not allow blank lines before closing$delimiter. This brings the parser in line with the documentation. - Allow superscripted spans (#11409). These were being parsed as inline notes. Now we disallow an inline note followed by attributes, as this is almost certainly meant to be a span.
- Support
alertsextension for pandoc markdown (#9716). It is not enabled by default.
- Fix parsing of inline math (
-
MediaWiki reader:
- Add behavior switches support (#11354, Anton Melnikov). They add a field to metadata without producing any text.
- Handle non-recognized tags as plain text (#11299).
- Better handling of inline tags (#11299).
<mark>,<var>,<samp>, and<kbd>now produce Code or Span elements with classes, which can be handled by multiple output formats, instead of simply being parsed as raw HTML tags.
-
RTF reader:
- Ensure a new paragraph on
\pard(#11361, Tuong Nguyen Manh). New paragraphs may start with\pardalone without an explicit paragraph break with\parpreceding it. - Improve hyperlink parsing more (#10942, Tuong Nguyen Manh). Both the field instruction and its result may be ungrouped.
- Fix bug where list items were incorporated into a following table (#11364).
- Ensure a new paragraph on
-
ODT reader:
- Add table row and column spans (#11366, Tuong Nguyen Manh). Parse the number-rows-spanned and number-columns-spanned attributes to create Cells for the Table.
-
DocBook reader:
- Support “role” attribute (#11255, Yann Trividic). The
roleattribute is parsed and added to Pandoc AST elements, using a wrapper Div if needed. - Omit empty title when not required (#11422). This affects example and sidebar elements.
- Fix adding wrong metadata (#11300, Tuong Nguyen Manh). Now keep track of the current element stack to only add metadata if inside an appropriate parent element.
- Support “role” attribute (#11255, Yann Trividic). The
-
DocBook/JATS reader:
- Don’t export surrounding space from inline elements (#11398). Previously we would export leading and trailing space inside elements like emphasis or ulink so they appeared outside the resulting pandoc Inline (Emph or Link). This is not really motivated; DocBook and XML in general treats leading and trailing whitespace in this context as significant.
-
Docx reader:
-
LaTeX reader:
- Handle more quote macros from fontspec and ngerman babel (#6120).
-
Org reader:
- Don’t include ‘example’ class when parsing org example blocks (#11339). These are just unmarked code blocks.
-
Texinfo writer:
- Improve handling of certain code blocks (#11312). MediaWiki, for example, will parse a code block containing formatting as a sequence of Code elements separated by LineBreaks. For this we now use a texinfo example block.
-
Typst writer:
- Escape hyphens when needed (#11334).
-
HTML writer:
- Include all classes on highlighted code elements (#11423). Previously, only the language class was included, and the others were dropped.
- Slide formats: Make
. . .pause work in nested blocks (#7201, #7582). - For revealjs, add idiomatic highlight.js support (#11420, Claude Opus 4.5). When using
--syntax-highlighting=idiomaticwith reveal.js output, pandoc now generates HTML compatible with reveal.js’s built-in highlight.js plugin: Code blocks use<pre><code class="language-X">format. The template loads highlight.js CSS, JS, and RevealHighlight plugin.
-
Markdown writer:
-
JATS writer:
- Fix XML output for nested figures (#11362, Albert Krewinkel). Subfigures are now wrapped inside a
<fig-group>element. Furthermore, figure content that isn’t allowed as children of<fig>elements, such as raw text, gets wrapped in<p>elements to ensure schema-conforming XML.
- Fix XML output for nested figures (#11362, Albert Krewinkel). Subfigures are now wrapped inside a
-
AsciiDoc writer:
-
Docx writer:
- Skip directory entries when building media overrides (#11379, You Jiangbin). Pandoc’s docx writer was previously adding an
<Override>for/word/media/in[Content_Types].xmlwhen the reference doc contains media, which violates OPC rules and causes Word to report corruption. - Refactor the monolithic
writeDocxinto a number of smaller functions (Claude Opus 4.5). - Replace generic XML traversal with direct path navigation (Claude Opus 4.5). Instead of using Data.Generics
everywhereto traverse the entire XML tree when setting language attributes, navigate directly to the known pathw:docDefaults/w:rPr/w:lang. This is more efficient and removes the dependency onData.Generics.
- Skip directory entries when building media overrides (#11379, You Jiangbin). Pandoc’s docx writer was previously adding an
-
EPUB writer:
- Don’t use footnote backlinks for EPUBv3. Here we use aside elements, which are popups, and the backlinks are not needed; in some readers they cause a redundant number to appear, since the reader adds a note number.
-
MediaWiki writer:
- Use Doc Text instead of Text for document construction (with Claude Open 4.5). This refactors the writer to use Text.DocLayout combinators (vcat, hcat, literal, blankline, cr, chomp) for building output, following the pattern used by other text format writers (RST, Markdown, Man). This enables better control over line spa...
pandoc 3.8.3
I'm pleased to announce the release of pandoc 3.8.3,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.8.3
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.8.3
This release adds three new input formats (asciidoc, pptx, and
xlsx) and one new output format (bbcode + variants).
It fixes a number of bugs (including some regressions in 3.8).
See the changelog for full details.
API changes:
+ New exported module Text.Pandoc.Readers.AsciiDoc,
exporting readAsciiDoc.
+ New module Text.Pandoc.Readers.Pptx, exporting readPptx.
+ New module Text.Pandoc.Readers.Xlsx, exporting readXlsx.
+ Text.Pandoc.Readers: Export readAsciiDoc, readXlsx, readPptx.
+ New module Text.Pandoc.Writers.BBCode, exporting
writeBBCode, writeBBCodeSteam, writeBBCodeFluxBB,
writeBBCodePhpBB, writeBBCodeHubzilla, writeBBCodeXenforo.
+ Text.Pandoc.Writers: Export writeBBCode,
writeBBCodeSteam, writeBBCodeFluxBB, writeBBCodePhpBB,
writeBBCodeHubzilla, writeBBCodeXenforo .
+ Text.Pandoc.Writers.Shared: Export insertCurrentSpansAtColumn,
takePreviousSpansAtColumn and decrementTrailingRowSpans.
+ Text.Pandoc.Shared: Export allRowsEmpty and
tableBodiesToRows.
Thanks to all who contributed, especially new contributors
Anton Antich, and Asliddinbek Azizovich, and James Barlow.
Click to expand changelog
-
Add
asciidocas an input format (#1456). -
Add
xlsx(Microsoft Excel) as an input format (Anton Antich). Each worksheet turns into a section containing a table. -
Add
pptx(PowerPoint) as new input format (Anton Antich). -
Add
bbcodeas a new output format (#11242, reptee). Several variants of BBCode are also supported:bbcode_fluxbb(FluxBB),bbcode_phpbb(phpBB),bbcode_steam(Hubzilla),bbcode_hubzilla(Hubzilla), andbbcode_xenforo(xenForo). -
New exported module Text.Pandoc.Readers.AsciiDoc, exporting
readAsciiDoc[API change]. -
New module
Text.Pandoc.Readers.Pptx, exportingreadPptx(Anton Antich) [API change]. -
New module
Text.Pandoc.Readers.Xlsx, exportingreadXlsx(Anton Antich) [API change]. -
LaTeX reader:
- Revert
\linebreakas LineBreak (#11272).\linebreakis more of a hint, it shouldn’t produce a hard break. - Better handling of
\makeatletterin parsing raw LaTeX (#11270). - Fix spurious paragraph breaks in math environments (#11265, Emmanuel Ferdman). Previously, a math environment with extra space before the
\endwould get rendered with a blank line, which LaTeX treats as a paragraph break. - Change type on
rawLaTeXParserin Text.Pandoc.LaTeX.Parsing. The preparser doesn’t need to return a value. - Fix
rawTeXParser(#11253). Make macro expansion in raw LaTeX depend on the setting of thelatex_macrosextension. Previously macros were always expanded, even in raw TeX in markdown. In addition, there was previously a bug that caused content to be garbled in certain cases. - Handle
ifstrequalat a lower level, like the otherifcommands (#11253). - Move
ifstrequal,iftoggle, etc., which were misplaced inenvironments, toblockCommands, so these commands work properly.
- Revert
-
Docx reader:
- Handle REF link instruction (#11296, Ezwal).
- Check recursively for caption styles (Albert Krewinkel). The docx reader uses caption styles to identify figures and captioned tables. It now checks for known caption styles in the full styles hierarchy of a paragraph instead of just checking the style directly. This allows to recognize caption styles that are built on top of the basic caption style, as is sometimes the case in sophisticated styles.
-
Markdown reader:
- Fix performance issue in links with
'(#10880).
- Fix performance issue in links with
-
Typst reader:
- Handle document metadata and
#title(jgm/typst-hs#80). Note that previously, the typst reader never returned document metadata. Now it does, even if the typst document does not contain a#titlefunction that would result in actually printing the title block.
- Handle document metadata and
-
Djot reader:
- Add Space elements (#11250). Previously we just got big Str elements with spaces included. But many pandoc writers assume that breakable spaces will be Space elements, and this is also required for automatic wrapping.
-
RST reader:
- Correctly handle intraword emphasis (#11309).
-
Text.Pandoc.Readers:
- Export
readAsciiDoc,readXlsx,readPptx[API change].
- Export
-
New module Text.Pandoc.Writers.BBCode, exporting
writeBBCode,writeBBCodeSteam,writeBBCodeFluxBB,writeBBCodePhpBB,writeBBCodeHubzilla,writeBBCodeXenforo[API change]. -
LaTeX writer:
-
HTML writer:
-
ANSI writer:
- Apply row spans in tables (#10149, Tuong Nguyen Manh). The ANSI writer is now able to keep track of row spans and apply them in rows.
-
Pptx writer:
- Handle reference doc without slides (#7536, Tuong Nguyen Manh).
-
AsciiDoc writer:
- Add more table features (#11267, Tuong Nguyen Manh): Row span and column span, footer row, individual horizontal cell alignment.
-
Typst template:
- Fix font for compatibility with typst 0.14, which doesn’t permit an empty array for
font(#11238). - Re-add
columnsto typst template (#11259), fixing a pandoc 3.8 regression. - Fix syntax for bibliography inclusion (#11233, Mickaël Canouil). Previously the syntax was wrong when multiple bibliography files were specified. Typst expects an array.
- Fix font for compatibility with typst 0.14, which doesn’t permit an empty array for
-
Text.Pandoc.Writers:
- Export
writeBBCode,writeBBCodeSteam,writeBBCodeFluxBB,writeBBCodePhpBB,writeBBCodeHubzilla,writeBBCodeXenforo[API change].
- Export
-
Text.Pandoc.Writers.Shared:
- Add functions
insertCurrentSpansAtColumn,takePreviousSpansAtColumnanddecrementTrailingRowSpansfor applying and keeping track of RowSpans over multiple rows (#10149, Tuong Nguyen Manh). [API change]
- Add functions
-
Text.Pandoc.Logging:
- Change message for missing HTML title warning (#11307). Suggest setting the
pagetitlevariable instead of settingtitlein metadata.
- Change message for missing HTML title warning (#11307). Suggest setting the
-
Lua subsystem:
- Preserve common state of custom Lua readers (Albert Krewinkel). The common state is transferred to Lua when calling a custom Lua reader, and is now also transferred back after the reader has finished. This ensures that info messages, warnings, and mediabag entries are available to the main program and all subsequent processing steps.
-
Text.Pandoc.PDF:
- Avoid converting SVG to PDF when non-TeX PDF engine is used (#11275). This fixes a 3.8 regression, which caused documents with SVGs to raise an error when converted to PDF using WeasyPrint.
- Fix a 3.8 regression with typst and smart quotes (#11256). Before 3.8, the default behavior when producing a PDF
-t typstwas to produce smart quotes according to typst’s defaults. (This could be defeated by specifying-t typst-smart.) This behavior broke in 3.8 because of a change to Text.Pandoc.PDF. This change causedsmartto be disabled for all formats when producing PDFs, when before it was only disable for TeX-based formats (to avoid bad ligatures). This commit restores the old behavior. Possibly the regression also other affects other non-TeX formats, e.g. HTML.
-
Text.Pandoc.Shared:
- Add functions
allRowsEmptyandtableBodiesToRowsfrom the RST writer for reuse in other writers. (Tuong Nguyen Manh) [API change].
- Add functions
-
Text.Pandoc.Citeproc:
- Allow formatting in locator to be transmitted to citeproc. We do this indirectly, by rendering the formatting using the HTML tags that citeproc recognizes. Fixes jgm/citeproc#68 and jgm/citeproc#163. Note that formatting is only possible for locators given in the explicit form, surrounded by curly braces. It won’t work for implicit locators, since these expect number-like expressions.
-
New non-exported module Text.Pandoc.Readers.OOXML.Shared containing functions factored out from Text.Pandoc.Readers.Docx.Util (Anton Antich).
-
Tests: The common file
nativeDiffhas been extracted from the Docx and Pptx text files and put in Tests.Helpers. -
Use asciidoc 0.1, djot 0.1.2.4, texmath 0.13.0.2, typst 0.8.1, citeproc 0.12.
-
MANUAL.txt:
-
Update INSTALL.md (#11271).
pandoc 3.8.2.1
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.
Click to expand changelog
-
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 singleparameterattribute. - Add support for dynamic blocks.
- 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.,
-
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.textmodule 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
--citeprocis now on par with what we had in pandoc 3.7, even with the revised Chicago styles.
pandoc 3.8.2
I'm pleased to announce the release of pandoc 3.8.2,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.8.2
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.8.2
This release fixes a regression in the typst template (since 3.8), which caused links to be omitted.
It also adds a new default Markdown extension, `table_attributes`, which allows attributes to be added to tables by putting them after the caption.
API change: Add `Ext_table_attributes` constructor to Extension.
Thanks to all who contributed.
Click to expand changelog
-
Markdown reader/writer: implement new
table_attributesextension (#10884). Whentable_attributesis enabled (as it is by default for pandoc’s Markdown), attributes can be attached to a table by including them at the end of the caption. Previously the writer would emit an identifier in this position, but the reader didn’t handle it. Now arbitrary attributes are allowed, and they work in both the reader and writer. -
Typst writer: don’t add superfluous semicolons (#11196). Previously we added semicolons after inline commands not followed by spaces, but mainly this was to deal with one issue: the presence of a semicolon after an inline command, which would be swallowed as a command separator (#9252). This commits adopts an approach that should avoid so many superfluous semicolons: it escapes semicolons that might come right after a command.
-
Typst template: fix 3.8 regression in which links disappear (#11194). A template change in 3.8 added a show rule for links which causes them to disappear except in special cases.
-
Text.Pandoc.Parsing: rewrite
oneOfStringsmore efficiently. -
LaTeX writer: Fix strikeout in links (#11192, Tuong Nguyen Manh). As in #1294
\urland\hrefneed to be protected inside an mbox forsoulcommands. -
Text.Pandoc.Extensions: Add
Ext_table_attributesconstructor forExtension[API change]. -
Use released texmath 0.13.0.1.
-
Update FSF contact information in COPYING (#11183, Bensun Muite).
-
MANUAL.txt: remove some redundancy (#11178, Reuben Thomas).
pandoc 3.8.1
I'm pleased to announce the release of pandoc 3.8.1,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.8.1
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.8.1
This release introduces a few new features and fixes some bugs
and regressions. Of special note:
- New output format vimdoc (for Vim documentation).
- --syntax-highlighting now works as expected for typst output.
- New shorthands variable allows activating babel shorthands
in LaTeX/PDF output.
- Removed coloring for links in epub.css, so that the reader's
defaults will be used.
API changes:
- New module Text.Pandoc.Writers.Vimdoc, exporting writeVimdoc.
- Text.Pandoc.Parsing: new functions tableWithSpans,
tableWithSpans', toTableComponentsWithSpans, and
toTableComponentsWithSpans'.
- Text.Pandoc.Shared: new function removeLinks.
- Text.Pandoc.Highlighting: export functions formatTypstBlock,
formatTypstInline, styleToTypst (from skylighting).
Thanks to all who contributed, especially Tuong Nguyen Manh (who
has been working hard to improve table support) and new contributors
Raymond Berger and reptee.
Click to expand changelog
-
New output format
vimdoc(Vim documentation format) (#11132, reptee).- [API change] Added module Text.Pandoc.Writers.Vimdoc, exporting
writeVimdoc.
- [API change] Added module Text.Pandoc.Writers.Vimdoc, exporting
-
Markdown reader:
- Improve superscript/subscript/inline note parsing (#8652). We do not allow inline notes to be followed by
(or[. Otherwise, we parse inline notes before superscripts. Also, the sub/superscript parsers have been adjusted so that they really exclude unescaped spaces (as they did not before, when the spaces occurred in nested inlines). - Fix simple table alignment (#11136, Tuong Nguyen Manh). Take wide characters into account when determining the alignment.
- Improve superscript/subscript/inline note parsing (#8652). We do not allow inline notes to be followed by
-
LaTeX reader:
- Ignore
\pandocbounded(#11140).
- Ignore
-
XML reader:
- Parse
<MetaString>(#11137, massifrg).
- Parse
-
Typst reader:
- Add support for reading typst pagebreak (#11101, Raymond Berger). The pagebreak is parsed as a HorizontalRule inside a wrapper Div with class
page-break.
- Add support for reading typst pagebreak (#11101, Raymond Berger). The pagebreak is parsed as a HorizontalRule inside a wrapper Div with class
-
Docx reader:
- Handle figures in indented paragraphs (#11028).
- Change default for textwidth. This should only be used if
sectPris not found. - Properly calculate table column widths (#9837, #11147). Previously we assumed that every table took up the full text width. Now we read the text width from the document’s
sectPr. - Use Tasty.Golden for Docx reader tests. This way we can update them with
--accept.
-
RST reader:
- Fix regression in simple table parsing (#11150).
- SkippedContent warning if table directive contains non-tabular content.
- Simple tables: leading space in a cell should not cause the contents to be parsed as a block quote (#11146).
- Parse
:alt:on figure (#11140). Also give a better default ifaltis not specified, using the stringified caption rather than the filename. - Support col spans for simple tables (Tuong Nguyen Manh).
-
Markdown writer:
- Improve handling of implicit figures (#11140). Allow implicit figures when alt text differs from caption (in this case, we use an image attribute to add the alt).
- Use approximate pipe tables when it’s the only option (#11128). If we have a table with row/colspans that can rendered as an approximate pipe table (without row/colspans), and no other table format is enabled that could render the table, we fall back to an “approximate” pipe table, with no row/colspans.
-
RST writer:
-
OpenDocument writer:
- Add missing table elements (#10002, Tuong Nguyen Manh). Add missing header rows after the first one, footer rows as well as TableBody header rows.
-
Docx writer:
- Fix regression (from 3.8) in highlighted code (#11156).
-
Powerpoint writer:
- Handle single column (Tuong Nguyen Manh).
-
Typst writer:
-
LaTeX writer:
- Make beamer footnotes compatible with pauses (#5954). Previously they would appear before the content to which the note was attached, when there were pauses in a slide.
- Avoid
\_in bibliography variable (#11152). - Ensure that unlabelled tables don’t increment counter (#11141).
- Protect VERB in caption (#11139, Tuong Nguyen Manh).
- Don’t add links to TOC (#11124, Albert Krewinkel).
- Fix strikeouts in beamer title (#11168, Tuong Nguyen Manh).
-
LaTeX template: Add
shorthandsvariable for LaTeX output (#11160). If true, pandoc will allow language-specific shorthands when loading babel. (This is helpful, for example, in getting proper spacing around French punctuation.) -
epub.css: Remove coloring for
a, a:visiting(#11174). This was causing links in iOS books app not to be distinguished in any way (since underlining is not used there). -
Text.Pandoc.Parsing:
- [API chage] (Tuong Nguyen Manh). New functions
tableWithSpans,tableWithSpans',toTableComponentsWithSpansandtoTableComponentsWithSpans'take a list of lists of (Blocks, RowSpan, ColSpan) to parse a Table with different RowSpan and ColSpan values accordingly. New helper functionssingleRowSpansandsingleColumnSpanshelp set all RowSpans or ColSpans to be 1 in case the table format only allows setting one or the other.
- [API chage] (Tuong Nguyen Manh). New functions
-
Text.Pandoc.Class:
- Let
fetchItemfail if the HTTP request is not successful (Albert Krewinkel). HTTP requests that don’t return a 200 error code are now treated as an error. This ensures that a warning is triggered when using--embed-resourcesor--extract-media.
- Let
-
Text.Pandoc.Writers.Shared:
- Add new function
removeLinks[API change] (Albert Krewinkel). The function converts links to spans. It is used, for example, to avoid nested links. The HTML writer used to put the description of nested links into small caps, but uses a simple span now.
- Add new function
-
Text.Pandoc.Highlighting: export typst functions [API change]. New exported functions
formatTypstBlock,formatTypstInline,styleToTypst. -
Text.Pandoc.XML:
- Add
fetchpriorityto list of HTML attributes (#11176).
- Add
-
Allow unicode-data 0.7.
-
Use released djot 0.1.2.3. Fixes a bug in which indentation was swallowed in a code block inside a blockquote.
pandoc 3.8
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.
Click to expand changelog
-
Add a new input and output format
xml, exactly representing a Pandoc AST and isomorphic to the existingnativeandjsonformats (massifrg). XML schemas for validation can be found intools/pandoc-xml.*. The format is documented indoc/xml.md. Pandoc now defaults to this reader and writer when the.xmlextension is used.Two new exported modules are added [API change]: Text.Pandoc.Readers.XML, exporting
readXML, and Text.Pandoc.Writers.XML, exportingwriteXML. A new unexported module Text.Pandoc.XMLFormat is also added. -
Add a new command line option
--syntax-highlighting; this takes the valuesnone,default,idiomatic, a style name, or a path to a theme file. It replaces the--no-highlighting,--highlighting-style, and--listingsoptions, which will still work but with a deprecation warning. (Albert Krewinkel) -
Create directory of output file if it doesn’t exist (#11040).
-
Update
--versioncopyright dates (#10961), and use a hardcoded string “pandoc” for the program name in--version, per GNU guidelines. -
Add
smart_quotesandspecial_stringsextensions (Albert Krewinkel). Currently these only affectorg. 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_listsextension. 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
\minisecas 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.,
alignorequation. Previously we “downshifted” these, parsing analignenvironment as a Math element withaligned, and anequationenvironment 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
smallcapsto 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
preelement (#11064).
- Don’t drop the initial newline in a
-
DocBook reader:
-
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 #9080 (comment). - Make definition lists behave like other lists (#10889). If the
four_space_ruleextension 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.
- Don’t confuse a span after an author-in-text citation with a locator. E.g.
-
ODT reader:
- Support
table-header-rows(Tuong Nguyen Manh).
- Support
-
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 like11cccto 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-placementattribute is present on a figure, it will be used as the optional positioning hint in LaTeX (e.g.ht). With implicit figures,latex-placementwill 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-idifSOURCE_DATE_EPOCHenvvar is set (#6539, Albert Krewinkel). TheSOURCE_DATE_EPOCHenvironment 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\urlmacro 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$..$.
- Control figure placement with attribute (#10369, Sean Soon). If a
-
Typst writer:
- Check
XID_Continuein 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). Thenocitemetadata 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
langattribute in Divs (#10965). - Rename
numberingvariable tosection-numbering(Albert Krewinkel). This is the name expected by the default template. - Add support for custom and/or translated “Abstract” titles (Albert Krewinkel, #9724).
- Check
-
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, useX; otherwise use the first class other thansourceCode. - 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 defini...
- 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
pandoc 3.7.0.2
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.
Click to expand changelog
-
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).
- Include alt option in
-
Markdown writer:
-
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:
-
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.
- Add function
-
tools/update-lua-module-docs: fix handling of wikilinks (Albert Krewinkel). -
doc/lua-filters.md: add missing docs forpandoc.Caption(Albert Krewinkel). -
Require texmath 0.12.10.3, typst 0.8.0.1
pandoc 3.7.0.1
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.
Click to expand changelog
-
Text.Pandoc.Shared.Writer: Fix numerous problems with
gridTableand add tests (#10848). These fixes affect the Markdown, RST, and Muse writers. -
Fix context writer/template to produce tagged PDFs (#10846). As before, the
taggingextension must be enabled. We now add the command that tells ConTeXt to start tagging.