Pandoc
Authors/Creators
Description
I'm pleased to announce the release of pandoc 3.10,
available in the usual places:
Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/3.10
Source & API documentation:
http://hackage.haskell.org/package/pandoc-3.10
In addition to the usual basket of bug fixes and small improvements,
the following changes are worth mention:
- This release adds a --typst-input option, which allows passing
arbitrary `sys.inputs` parameters to the typst evaluator.
- groff is now the default pdf-engine for the ms format, replacing
pdfroff.
- The auto_identifiers extension (and related extensions) are
now available for the man reader.
- OpenDocument/ODT now uses predefined styles instead of emitting
automatic styles for every paragraph. This yields more idiomatic,
and more easily stylable, output, resolving a handful of longstanding
issues. If you use a custom reference.odt, it may need some updating.
API changes:
- Text.Pandoc.App.Opt: Opt has a new fieldi optTypstInputs.
- Text.Pandoc.Options: ReaderOptions has a new field readerTypstInputs.
Thanks to all who contributed, especially new contributors Dan Jacobson,
Johan Larsson, Keenan Brock, Meher Chaitanya, Sai Asish Y, and nibras shami.
<details> <summary>Click to expand changelog</summary>
Add
--typst-inputCLI option (#11588). This allows one to pass parameters to typst, which are available atsys.inputs, just astypstitself does with its--inputoption.Avoid trailing spaces in
--helpoutput (#11623).Make groff the default pdf-engine for
msoutput (#11558). Formerly it was pdfroff.Set default User-Agent request header to
pandoc/VERSION. This can be overridden using the--request-headeroption.Markdown reader:
- Allow grid tables to be indented (#11671, Johan Larsson). Like the other table syntaxes (pipe, simple, and multiline tables) and block-level constructs generally, a grid table may now be indented by up to three spaces and still be recognized as a table. Previously the grid-table parser required the table to begin at the left margin, so an indented grid table was parsed as a paragraph.
- Fix calculation of column widths for default columns in grid tables (#11664). This fixes a bug which produced too-narrow columns in some cases.
- Don't produce empty Raw element with
--strip-comments(#11625). - Fix quotes in inline notes (#11613, Andrew Dunning).
- Allow spaces inside attributes in super/sub (#11589).
- Simplify
checkNotes, remove dead code - Various small performance optimizations.
HTML reader:
- Parse aside as a Div with class "aside" (instead of using raw HTML) (#11626).
- Add "header" class to Divs created from headers.
Docx reader:
- Fix bug in bitmask checking (#8299). This led to some table rows being wrongly considered header rows.
- Improve treatment of
tblHeaderelement (#8299). IftblHeaderexists but hasw:val="0", then don't consider the element a header. - With
citationsextension, prefercitation-keyas the key for item data, if it is defined (#11581; cf. #10366, #11567). Theidkey used by Zotero is not exposed by their API and is generally not what is wanted when converting to biblatex. - Don't look to
exttags for image extent (#11580). This reverts a change from 7ff1b798c4e6681ef9050899442d80883116573a. The change was mistaken and could cause images to be parsed with the wrong sizes.
Man reader:
- Support
auto_identifiers,gfm_auto_identifiers, andascii_identifiersextensions (#8852, Meher Chaitanya). Section headings parsed from .SH and .SS macros now receive auto-generated id attributes when the extension is enabled (as it is by default). This enables--tocto produce working anchor links. - Better handling of
.TPmacro (#11668). We parse these as DefinitionList items, but we previously sometimes stopped prematurely in including material in the definition. We should include everything until we hit a new indentation-changing macro.
- Support
Roff reader:
- Handle
\line continuation in table cells (#11635).
- Handle
LaTeX reader:
- Evaluate theorem name when used rather than evaluating it when the
\newtheoremcommand is encountered (#11608). It may include macros only defined later. - Put identifier from label on table attributes rather than adding an enclosing Div (#11604).
- Evaluate theorem name when used rather than evaluating it when the
Typst reader:
- Fix issue parsing figure inside rotate or box (#11598).
- Implement "rotate" as pass-through (#11531). Information about the angle is encoded in an attribute of an enclosing span or div.
RTF reader:
- Fix tables parsed as deeply nested tables (#11682).
Docx writer:
- Fix display of paragraph with just inline math (#11674). Word displays a paragraph containing just one inline math element as if it were display math. We don't want that, so we add a zero-width space to defeat this behavior.
- Fix FirstParagraph style lost after heading with footnote (#11573).
- Fix empty keywords in core document properties (#11666, Sai Asish Y).
OpenDocument/ODT writer:
Use predefined styles (#9316, #5086, #2747, #3426, #7336). Previously the OpenDocument writer emitted a fresh automatic style (L1..Ln, P1..Pn, T1..Tn) for nearly every list, list-item paragraph, block quote, preformatted block, and inline text style. This commit teaches the writer to reference the predefined styles that LibreOffice ships and that pandoc's reference.odt now exports:
- Bullet lists use
List_20_1; ordered lists with default start and decimal format useNumbering_20_1. Non-default ordered lists generate a single named override style (Pandoc_Numbering_N) memoised by (ListNumberStyle, ListNumberDelim); a non-default start value with the default format is expressed viatext:start-valueon thetext:listelement instead of a new style. - List-item paragraphs use
List_20_Bullet[_Tight]andList_20_Number[_Tight]. The Tight variants are pandoc-specific (zero top/bottom margin) and are injected into the user's reference.odt if missing, just like the Skylighting token styles. - Block quotes use the predefined
Quotationsparagraph style directly. Nested block quotes use a single automatic style that inherits from Quotations and only adds extra margin-left, so a list inside a block quote now inherits its container's indent (#2747). - Preformatted blocks use
Preformatted_20_Textdirectly. - Emphasis, Strong, Strikeout, Subscript, Superscript and Code spans use the predefined
Emphasis,Strong_20_Emphasis,Strikeout,Subscript,SuperscriptandSource_20_Texttext styles. paraStyle/paraStyleFromParentno longer emit a wrapper automatic style when its only attribute would beparent-style-name; the parent name is returned directly.
- Bullet lists use
EPUB writer:
- Support multiple EPUB versions for raw content (#11628, nibras shami). This change ensures that raw content marked
epub2will appear in (only) EPUBv2 output and content markedepub3will appear in (only) EPUBv3 output.
- Support multiple EPUB versions for raw content (#11628, nibras shami). This change ensures that raw content marked
Typst writer:
- Add zero-width space before a Span label if otherwise the label doesn't come after anything (#11568). (In this case typst will raise an error.)
- Add newline after
#set textdirective (#11583). This ensures that blocks such as lists are parsed correctly after aset text.
LaTeX writer:
- Fix
fr-CAbabel language mapping (#11575, Christophe Dervieux). Map fr-CA tofrenchinstead of deprecatedcanadien. The babel-french package'scanadien.ldfis deprecated and broken: it never calls\ldf@finish, so\bbl@main@languageis left undefined, causing babel to crash at\begin{document}. Sincecanadienwas always just an unconditional alias forfrench, usefrenchdirectly.
- Fix
MediaWiki writer:
- Handle some technically malformed URLs (#11562).
- Fix escaping to avoid accidental lists (#11563).
Markdown writer:
- Fix spacing issues with definition lists.
- Properly handle the case where the first item is an indented code block (#11542).
- Use correct indentation when
four_space_ruleextension is disabled.
- Escape
:::to avoid triggering unintended divs (#11571).
- Fix spacing issues with definition lists.
Man writer:
Don't run together successive definitions in a tight definition list with multiple definitions after a term (#11547).
Text.Pandoc.Writers.Shared:
htmlAttrs: usedata-prefix when needed (#11680). This now behaves like the HTML writer, adding thedata-prefix for custom attributes. This will affect, e.g., the mediawiki writer.
Text.Pandoc.Error:
- Display IOError without stack trace (#11676).
- Use single quotes around paths and format names (#11645) in displayed messages.
Text.Pandoc.App.Opt:
- Opt has a new field
optTypstInputs[API change].
- Opt has a new field
Text.Pandoc.Options:
- Change
defaultMathJaxURLto use MathJax v4 (#11669). - ReaderOptions has a new field
readerTypstInputs[API change].
- Change
Text.Pandoc.Citeproc.BibTeX:
- Prevent wrong combination of
subtitleandtitleaddonwithmaintitle(#11677, Amir Dekel). Whenmaintitleis present,subtitleshould not be added totitle, but only tovolume-title. - BibLaTeX
inbookshould be CSLbook, notchapter(#11552). - Allow
doifield in bibtex (input and output) (#11617, Thomas Hodson).
- Prevent wrong combination of
Text.Pandoc.Translations:
- Find lang-script type translations (#11648). E.g. for
zh-Hant-TWlook for (in order)zh-Hant-TW.yaml,zh-Hant.yaml,zh.yaml.
- Find lang-script type translations (#11648). E.g. for
Text.Pandoc.Parsing:
- Various small optimizations.
- Fix bug in
extractIdClassto ensure that bothidandclassare stripped from key/value attributes..
Text.Pandoc.Shared:
- Various small optimizations.
ODT reference doc: demonstrate predefined styles (310327). This mirrors the demonstration content already present in the Word reference doc.
HTML templates:
- Include pandoc-version in generator meta tag (#11624).
- Styles: make screen-only CSS conditional (#11524, Keenan Brock).
EPUB templates:
- Add dir attribute to html element (#11554).
LaTeX template: Define
\xmpquoteif not defined (#11528).\xmpquoteis defined by the hyperref driver hyperxmp; we need a fallback for those who aren't using that.Lua subsystem:
- Add constructor
pandoc.TableBody.
- Add constructor
doc/lua-filters.md: Re-indent definition list items (Albert Krewinkel).
wasm/index.js: include filter to embed images for pdf-via-typst. Auto-inject
embed_imagesfilter for PDF via Typst. Otherwise conversion fails because we can't write the images in a temporary directory in the WASM sandbox. See jgm/pandoc#11584.Fix test suite parallel execution failures (#11566).
linux/make_artifacts.sh: add
loong64support (#11597, Olivier Benz).bash_completion.tpl: addgroffto--pdf-enginecompletions (#11555).MANUAL.txt:
- Improve description of reference links (#11643).
- Update instructions for modifying reference.docx (#11600, Dan Jacobson). Mention LibreOffice as an alternative.
- Clarify indentation rules for definition lists (#11542).
- Move
--sandboxto general options. - Reword restrictions on YAML metadata in commonmark (#11561).
Bump upper bound for time, tls, aeson.
Use latest releases of doclayout, asciidoc, texmath, typst, typst-symbols, pandoc-types, citeproc, commonmark, commonmark-pandoc, commonmark-extensions.
Add missing NAME heading to pandoc-lua, pandoc-server man pages (#11634).
</details>
Notes
Files
jgm/pandoc-3.10.zip
Files
(10.3 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:a977803f590ea1b4a34aef512fbce2c5
|
10.3 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/jgm/pandoc/tree/3.10 (URL)
Software
- Repository URL
- https://github.com/jgm/pandoc