Pandoc
Authors/Creators
Description
<details> <summary>Click to expand changelog</summary>
Fix
gfm_auto_identifiersto replace emojis with their aliases, as documented (#9876).CSV reader:
- Turn line breaks into LineBreaks not SoftBreaks (#9797).
Docx reader:
- Support task lists (#8211).
- Fix a small bug in parsing delimiters in numbered lists, which led to the default delimiter being used wrongly in some cases.
- Improve handling of captions.
- Turn captioned images into Figure elements. Closes #9391.
- Improve the logic for associating elements with captions (#9358).
- Ensure that captions that can't be associated with an element aren't just silently dropped (#9610).
- Support HorizontalRule. We support both pandoc-style and the style described on a Microsoft support page, an empty paragraph with a bottom border (#6285).
- React to
"left"value onjcattribute. - Handle column and cell alignments (#8551). We take the column alignments from the first body row.
- Fix a bug that caused comments inside insertions or deletions to be ignored (#9833).
HTML reader:
- Better handle non-
lielements inulandol(#9809). For example, apafter a closedliwill be incorporated into the previousli. This mirrors what browsers do with this invalid HTML.
- Better handle non-
LaTeX reader:
- Fix parsing of dimensions beginning with
., e.g.\kern.1pt(#9902).
- Fix parsing of dimensions beginning with
Markdown reader:
- Allow author-only textual citations (#7219). E.g.
-@reese2002outside of brackets.
- Allow author-only textual citations (#7219). E.g.
RST reader:
- Tighten up rules for when emphasis can start (#9805).
- Support
:cite:role with citeproc (#9904). A subset of the functionality of the sphinxcontrib-bibtex extension to Sphinx is supported.
Textile reader:
- Don't let spans begin right after a symbol (#9878).
Texinfo writer:
- Ensure proper escaping in all node/link contexts.
- Target node rather than anchor when possible in internal links.
- Remove illegal characters from internal link anchors (#6177).
- Use two commas not one in
@ref. - Don't add anchors to headings. We don't need them, now that we make internal links use the node.
- Avoid duplicate node names.
- Improve menus. Properly handle the case where the node name is different from the descriptive title.
Texinfo template: add variables for filename and version.
Typst reader:
Fix an incomplete pattern match (#9807).
Handle inline bodies ending in a parbreak. E.g.
`#strong[ test ]
ConTeXt template: remove
\setupbackend[export=yes](#9820).Docx writer:
- Omit
jcattribute on table cells with AlignDefault (#5662). - Better formatting for task lists. Task lists are now properly formatted, with no bullet (#5198).
- Replace an expensive generic traverse to remove Space elements, for better performance.
- The new OpenXML template had spaces for metadata that need to be filled with OpenXML fragments with the proper shape. This patch ensures that everything is the right shape.
- Wrap figures with
idin a bookmark (#8662). - Add eastAsia font hints to
w:r(#9817). We do this when the text in the run contains any CJK characters. This ensures that ambiguous code points (e.g. quotation marks) will be represented as "wide" characters when together with CJK characters. - Clean up Abstract Title and Subtitle in default reference docx. Center Subtitle, remove color.
- Allow OpenXML templates to be used with
docx(#8338, #9069, #7256, #2928). The--reference-docoption allows customization of styles in docx output, but it does not allow one to adjust the content of the output (e.g., changing the order in which metadata, the table of contents, and the body of the document are displayed), or adding boilerplate text before or after the document body. For these changes, one can now use--templatewith an OpenXML template. (See the defaultopenxmltemplate for a sample.)--include-before-bodyand--include-after-bodycan also now be used withdocxoutput. The included files must be OpenXML fragments suitable for inclusion in the document body. - New unexported module Text.Pandoc.Writers.Docx.OpenXML.
- Omit
HTML writer:
Ensure URI escaping needed for
html4(#9905). Unicode characters need not be escaped for html5, and still won't be.Don't emit unnecessary classes in HTML tables (#9325, Thomas Soeiro). Pandoc used to emit a
headerclass on thetrelement that forms the table header. This is no longer needed, becausehead > trwill do the same thing. Similarly, pandoc used to emitevenandoddclasses ontrs, allowing striped styling. This is no longer needed, because one can use e.g.tbody tr:nth-child(2n).Compatibility warning: users who relied on these classes to style tables may need to adjust their CSS.
JATS writer:
- Support
supplementary-materialin metadata forjats_articlepublishing(#9818).
- Support
LaTeX writer:
- New method for ensuring images don't overflow (#9660). Previously we relied on graphicx internals and made global changes to Gin to force images to be resized if they exceed textwidth. This approach is brittle and caused problems with
\includesvg(see #9660). The new approach uses a new macro\pandocboundedthat is now defined in the LaTeX template. (Thanks here to Falk Hanisch in https://github.com/mrpiggi/svg/issues/60.) The LaTeX writer has been changed to enclose\includegraphicsand\includesvgcommands in this macro when they don't explicitly specify a width or height. In addition, the writer now addskeepaspectratioto the\includegraphicsor\includesvgoptions ifheightis specified without width, or vice versa. Previously, this was set in the preamble as a global option. Users should attend to the following compatibility issues:- If custom templates are used with the new LaTeX writer, they will have to be updated to include the new
\pandocboundedmacro, or an error will be raised because of the undefined macro. - Documents that specify explicit dimensions for an image may render differently, if the dimensions are greater than the line width or page height. Previously pandoc would shrink these images to fit, but the new behavior takes the specified dimensions literally. In addition, pandoc previously always enforced
keepaspectratio, even when width and height were both specified, so images with width and height specified that do not conform to their intrinsic aspect ratio will appear differently.
- If custom templates are used with the new LaTeX writer, they will have to be updated to include the new
- Task lists must be unordered (#9185).
- Specify language option for
selnoligand only include it ifenglishorgermanis used (#9863). (This includes changes to the LaTeX template.) This should restore proper ligature suppression when lualatex is used. - Fix
--toc-depthwith beamer output (#9861). Previously only top-level sections were ever included in the TOC, regardless of the setting of--toc-depth. - Use
\linewidthinstead of\columnwidthor\textwidthfor resizing figures, table cells, etc. in LaTeX (#9775).\linewidth, unlike the others, is sensitive to indented environments like lists.
- New method for ensuring images don't overflow (#9660). Previously we relied on graphicx internals and made global changes to Gin to force images to be resized if they exceed textwidth. This approach is brittle and caused problems with
LaTeX template: put
babel-langin options to beamer (#9868). This is required to make beamer use proper localized terms for things like "Section."Markdown writer:
- Don't print extra caption when using
implicit_figures. - Ensure blank line after HTML blocks in commonmark-based formats (#9792).
- Fix bug rendering block quotes in lists (#9908).
- Don't print extra caption when using
Typst writer:
- Support '.typst:no-figure' and 'typst:figure:kind=kind' attributes (#9778, Carlos Scheidegger). This extends support for fine-grained properties in Typst. If the
typst:no-figureclass is present on a Table, the table will not be placed in a figure. If thetypst:figure:kindattribute is present, its value will be used for the figure'skind(#9777). These features are documented indoc/typst-property-output.md.
- Support '.typst:no-figure' and 'typst:figure:kind=kind' attributes (#9778, Carlos Scheidegger). This extends support for fine-grained properties in Typst. If the
Typst template:
- Add subtitle (#9747, Mickaël Canouil).
- Use content rather than string for title, author, date, email (#9823). This allows formatting in title, author, date, and email fields. Since the PDF metadata requires a string, and typst only converts the title to a string (not the authors), we use
Textile writer:
- Get rid of header, odd, even classes on
tr(#9376).
- Get rid of header, odd, even classes on
Text.Pandoc.Class:
fillMediaBag: Convert IOErrors to warnings when fetching absolute paths (#9859, Albert Krewinkel). This will allow many conversions that would have failed with an error to succeed (albeit without images or other needed resources).
Text.Pandoc.ImageSize:
- Don't prefer exif width/height when they conflict with image width/height (#9871). That was a mistaken call in #6936. Usually when these values disagree, it is because the image has been resized by a tool that leaves the original exif values the same, so the width/height metadata are more likely to be correct that exif width/height.
Text.Pandoc.SelfContained:
- Strip CRs from XML before base64 encoding for data URI (so tests can work on Windows).
- Only create
<svg>elements for SVG images when the image has the classinline-svg. Otherwise just use adataURI as we do with other images (#9787).
Lua subsystem (Albert Krewinkel):
- Split Init module into more modules. The module has grown unwieldy and is therefore split into three internal Haskell modules,
Init,Module, andRun. - Add function
pandoc.utils.run_lua_filter(#9803). - Add function
pandoc.template.get(#9854, co-authored by Carsten Gips). The function allows to specify a template with the same argument value that would be used with the--templatecommand line parameter. - Keep CommonState object in the registry. The state is an internal value and should be treated as such. The
PANDOC_STATEglobal is merely a copy; unsetting the global no longer breaks the Lua engine. - Allow passing an environment to
run_lua_filter. The default is now to use a copy of the global environment when running a filter; this ensures better separation whenrun_lua_filteris used multiple times. A custom environment can be specified via the optional third parameter. - Set
pandoc.Listas default metatable for JSON lists (#9834). Lists created bypandoc.json.decodenow behave like lists generated viapandoc.List. This also ensures thatpandoc.Listtables are encoded as JSON arrays when passed topandoc.json.encode.
- Split Init module into more modules. The module has grown unwieldy and is therefore split into three internal Haskell modules,
Text.Pandoc.Writers.Shared: export
toTaskListItem[API change].Add unexported module Text.Pandoc.Char. This exports
isCJK. Use this instead of locally definedisCJKin T.P.Readers.MediaWiki.MANUAL.txt:
- Remove false claim that Lua mode does not support
-i(#9757, Ian Max Andolina). - Use level-3 headings for extensions (to avoid gaps).
- Add anchor for tagging extension.
- Remove explicit referencess to generate anchors. These will be linkified automatically.
- Fixed links to
option--reference-doc. - Add a note that column widths aren't supported in pptx for Divs with class
columns(#9890). - Fix alerts example (#9826, Ian Max Andolina).
- Fix markup of
babelfontsexample code (Albert Krewinkel).
- Remove false claim that Lua mode does not support
doc/custom-writers.md:- Fix usage of Template in example (Albert Krewinkel).
- Document the separator arg of
Writer.Blocks(Albert Krewinkel).
doc/lua-filters.md(Albert Krewinkel):- Fix outdated documentation for math and quoting functions and fields.
- Autogenerate docs for module
pandoc.templateandpandoc.layout. - Document operators of the "Doc" type.
pandoc-lua-engine: depend on pandoc >= 3.2 (see #9755).
Allow crypton-connection 0.4, time 1.14.
Allow tasty-quickcheck 0.11.
Use latest emojis, skylighting, skylighting-core, citeproc, djot, commonmark-extensions, typst-hs
</details>
Notes
Files
jgm/pandoc-3.2.1.zip
Files
(9.2 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:c737de0b91bcf39219dc749654d99087
|
9.2 MB | Preview Download |
Additional details
Related works
- Is supplement to
- Software: https://github.com/jgm/pandoc/tree/3.2.1 (URL)