Releases: jgm/pandoc
pandoc 3.1.5
Click to expand changelog
-
Allow all boolean flags to take an optional
true
orfalse
value (#8788, Sam S. Almahri). The default is true if no value is specified, so this is fully backwards-compatible. -
Support
--id-prefix
for markdown output (#8878) -
Markdown reader:
- Add strictness annotations to fix a memory leak (#8762).
-
Typst reader:
- Use typst-hs 0.3.0.0, which is more robust, fixes many bugs, and targets typst 0.6.
- Package loading is now supported, as long as the package has been cached or is local.
- Rewrite Typst reader in a way that makes it easier to extend.
- Filter out CR in raw.
- Handle block content for link element.
- Handle block-level content in text element.
- Handle style, align, place in inline contexts too.
- Improve info message for skipped elements.
-
Add typst reader tests (#8942).
-
MediaWiki reader:
- Revise treatment of โlink trail.โ Previously we only included ASCII letters. That is correct for English but not for, e.g., Spanish (see comment in #8525). A safer approach is to include all letters except those in the CJK unified ideograph ranges.
-
AsciiDoc writer:
- Make modern AsciiDoc the target for
asciidoc
(#8936). The AsciiDoc community now regards the dialect parsed byasciidoctor
as the official AsciiDoc syntax, so it should be the target of ourasciidoc
format. Theasciidoc
output format now behaves likeasciidoctor
used to.asciidoctor
is a deprecated synonynm. For the oldasciidoc
behavior (targeting the Python script), useasciidoc_legacy
. The templates have been consolidated. Instead of separatedefault.asciidoctor
anddefault.asciidoc
templates, there is justdefault.asciidoc
. - Text.Pandoc.Writers.AsciiDoc API changes:
writeAsciiDoc
now behaves likewriteAsciiDoctor
used to.writeAsciiDoctor
is now a deprecated synonym forwriteAsciiDoc
.- New exported function
writeAsciiDocLegacy
behaves likewriteAsciDoc
used to.
- Update line-through for asciidoc writer to custom inline style (#8933, Kevin Broch).
- Make modern AsciiDoc the target for
-
Typst writer:
-
Docx writer:
- Make relative widths work in tables. This didnโt work before because we were missing an attribute that tells Word to used fixed widths rather than computing optimal ones.
-
DokuWiki writer: fix lists with Div elements (#8920). The DokuWiki writer doesnโt render Divs specially, so their presence in a list (e.g.ย because of custom-styles) need not prevent a regular DokuWiki list from being used. (Falling back to raw HTML in this case is pointless because no new information is given.)
-
LaTeX writer:
- Fix babel name for
fa
(should bepersian
). - Prevent babel language from being imported twice (#8925).
- Fix babel name for
-
Text.Pandoc.Class:
-
Add
toTextM
[API change]. This is likeText.Pandoc.UTF8.toText
, except:- it takes a file path as first argument, in addition to bytestring contents
- it raises an informative error with source position if the contents are not UTF8-encoded
This replaces
utf8ToText
whenever we have the filename and are in a PandocMonad instance. This will lead to more informative error messages for UTF8-encoding, indicating the file path and byte offset where the error occurs (#8884). -
-
Remove invalid term โSubjectโ from Turkish translations (#8921).
-
stack.yaml: add pkg-config to nix packages (#8927, pacien).
-
Allow aeson 2.2.
-
MANUAL: Add clarification on โsection-divs. Closes #8882.
pandoc 3.1.4
Click to expand changelog
-
Fix a security vulnerability in MediaBag and T.P.Class.IO.writeMedia. This vulnerability, discovered by Entroy C, allows users to write arbitrary files to any location by feeding pandoc a specially crafted URL in an image element. The vulnerability is serious for anyone using pandoc to process untrusted input. The vulnerability does not affect pandoc when run with the
--sandbox
flag. -
Allow
epub-title-page
to be used in defaults files (#8908). -
Issue
Extracting
info message (in--verbose
mode) when using--extract-media
or extracting media temporarily in PDF production. -
HTML reader: Update TableBody RowHeadColumns caculation (#8634, Ruqi). This change sets RowHeadColumns to the minimum value of each row, which gives better results in cases where rows have different numbers of leading th tags.
-
Dokuwiki reader: retain image query parameters as attributes (#8887, echo0).
-
Textile reader: Add support for link references (#8706, Stephen Altamirano). Textile supports what it calls โlink aliasโ, which are analogous to Markdownโs reference-style links.
-
LaTeX reader: support alt text on images (#8743, Albert Krewinkel).
-
Commonmark reader: Make
implicit_figures
work again. Support for this (introduced in #6350) disappeared when we made an architectural change. -
JATS reader:
-
JATS writer:
- Make
--number-sections
work. - Include title in ref-list (#8364). Previously the reference title ended up in a separate section at the back of the body instead of in the ref-list in the back matter.
- Make
-
Mediawiki writer: allow highlighting to work for F# language (Adelar da Silva Queirรณz).
-
LaTeX writer: Fix escaping of
&
in\href
and\url
(#8903). -
Docx writer:
-
ChunkedHTML writer: Make math work in top-level page (#8915).
-
Text.Pandoc.Logging: add new log message type
ScriptingWarning
[API change] (Albert Krewinkel). -
Lua: report warnings from Lua scripts (Albert Krewinkel). Luaโs warning system is plugged into pandocโs reporting architecture. Warnings that are raised with the Lua
warn
function are now reported together with other messages. -
Use crypton-connection instead of connection (#8896, Felix Yan). Follows the change introduced in tls 1.7.0.
-
Bump versions for skylighting-core, skylighting.
-
Include lua/module/sample.svg in cabal extra-source-files (Felix Yan).
-
Add Nynorsk (New Norwegian) translations (Per Christian Gaustad).
-
Add tests for
fillMediaBag
/extractMedia
. -
INSTALL.md:
- Mention alternatives to LaTeX to generate PDF (Norwid Behrnd).
- Update Linux install links (harabat).
-
pandoc-extras.md: add to โAcademic publishing workflowsโ (#8696, Vladimir Alexiev).
pandoc 3.1.3
Click to expand changelog
-
New output format:
typst
. -
New module: Text.Pandoc.Readers.Typst [API change].
-
DocBook reader:
- Support more emphasis roles (Albert Krewinkel). The role โbfโ is taken to indicate โbold faceโ, i.e., โstrongly emphasizedโ text, while โunderlineโ leads to underlined text.
-
JATS reader:
-
Org reader (Albert Krewinkel):
- Require abstract environment to use lowercase.
- Treat
#+NAME
as synonym for#+LABEL
(#8578).
-
ODT reader:
-
RST reader:
- Fix sorting on anonymous keys (#8877). This fixes a link resolution bug bug affecting RST documents with anonymous links.
-
HTML reader:
- Fix iframe with data URI of an image (#8856). In this case we donโt want to try to parse the data at the URL. Instead, create an image inside a div.
-
RTF reader:
- Fix bug in table parsing (#8767). In certain cases, text before a table was being incorporated into the table itself.
-
Docx reader:
- Introduce support for Intense Quote (Stephan Meijer).
-
Markdown reader:
- Disallow escaping of
~
and"
inmarkdown_strict
(#8777, Albert Krewinkel). This matches the behavior of the legacyMarkdown.pl
as well as what is described in the manual.
- Disallow escaping of
-
LaTeX reader: ignore args to column type in
\multicolumn
(#8789). -
HTML writer:
- Use first paragraph in task item as checkbox label (#8729, Albert Krewinkel).
-
Ms writer:
- Coerce titles to inlines (#8835). Block-level formatting is not allowed inside
.TL
.
- Coerce titles to inlines (#8835). Block-level formatting is not allowed inside
-
LaTeX writer:
- Fix width for multicolumn simple table (#8831).
-
Jira writer:
- Use first code block class as highlighting language (#8814, Albert Krewinkel). The writer no longer searches the list of classes for a known programming language but always uses the first class in that list as the language identifier.
-
OpenDocument writer:
-
ODT writer:
- Donโt add settings.xml (Michael Stahl). This will cause defaults to be used, which is what we want.
- Donโt add unnecessary Configurations2 directory (Michael Stahl).
- Donโt add thumbnail (Michael Stahl).
- Put
manifest.version
on directory file-entry (Michael Stahl). See ODF 1.3 part 2, 4.16.14.1. - Stop validator complaints by producing ODF 1.3 (Michael Stahl).
-
MediaWiki writer:
- Remove links from inside links in mediawiki writer (#8739, Wout Gevaert).
-
Typst writer:
- Omit bibliography if
citations
not enabled (#8763). With this change, the typst writer will omit the#bibliography
command whencitations
is not enabled. (If you want to use pandocโs own--citeproc
, you should combine it with-t typst-citations
to disable native typst citations. - Use
<..>
for labels, create internal links. - Use
#footnote
for notes (#8893). - Fix alignment issue in lists. Itโs an aesthetic issue only; the first line had an extra space indent after the list marker.
- Omit bibliography if
-
Commonmark writer:
- Use shortcut reference links: commonmark supports these.
-
EPUB template: add
lang
attribute to<html>
(Gabriel Lewertoski). -
Template styles.html: fix task-list styling in reveal.js (#8731, Albert Krewinkel).
-
LaTeX template: Fix
\babelfont
(#8728). -
Text.Pandoc.Parsing:
- Remove unnecessary โspacesโ in
parseFromString
.
- Remove unnecessary โspacesโ in
-
Text.Pandoc.ImageSize: Drop BOM at start of SVG if present. Otherwise our code can fail to determine image size.
-
Lua subsystem:
- Fix value of PANDOC_SCRIPT_FILE for custom readers & writers (#8781, Albert Krewinkel). The value did not hold the actual file path for scripts in the custom folder of the datadir.
-
Fix YAML in translation files for
cs
andpl
(#8787). -
Fix pdf output via typst (#8754). One must now use
typst compile
rather thantypst
. -
MANUAL.txt:
- Added note that the user will need to create the user data dir (#8727).
- Add
wikilinks
to non-default extensions (Ilona). - Update link to custom djot writer (Albert Krewinkel).
- Better link to citation syntax.
- Fix typo (sdhoward).
- Note that
#
fancy list markers donโt work with commonmark (#8772, William Lupton). - Add commonmark
fenced_div
note (#8773, William Lupton). - Move highlighting documentation, with minor adjustments (William Lupton).
- Fix inaccurate statement about spaces and tabs in template syntax (Frank Seifferth).
-
Update documentation for org-mode (Christian Christiansen, #8716).
-
doc/lua-filter.md:
-
CONTRIBUTING.md: update info on ghc versions.
-
INSTALL.md:
- Fix cabal install instructions (Albert Krewinkel).
- Use more relevant link to NetBSD/pkgsrc entry (Charlotte Koch).
- Fix Windows install instructions for winget (#8799).
-
Tests: Rename test/docx/block_quotes_parse_indent.native for consistency (Stephan Meijer).
-
Add
tls
constraint on cabal.project. This is needed to avoid problems caused by the transition tocrypton
. -
Require texmath 0.12.8.
pandoc 3.1.2
Click to expand changelog
-
Add a Lua REPL (Albert Krewinkel). This can be started with
pandoc lua -i
. It is also possible to instruct a filter to open the REPL at a certain point, for debugging (seepandoc.cli.repl
). -
Support
typst
as a--pdf-engine
. -
Add typst writer (#8713). New module Text.Pandoc.Writers.Typst, exporting
writeTypst
[API change]. -
Org reader:
- Allow zero width space as an escape character (#8716, Christian Christiansen). Allow the character U+200B to be used as an escape character as described in the Org-mode documentation (https://orgmode.org/manual/Escape-Character.html).
-
DocBook reader:
-
HTML reader:
- Fix behavior with
-native_spans-raw_html
(#8711). Previously with this configuration,<span>
s were not treated as inline elements at all.
- Fix behavior with
-
HTML writer:
- Avoid duplicate classes (#8705).
- Use img element instead of embed for
.svg.gz
and.png.gz
etc. (#8699). - HTML writer footnotes changes (#8695): when
--reference-location=section
or=block
, use anaside
element for the notes rather than asection
. When--reference-location=section
, include theaside
element inside the section element, rather than outside. (In slide shows, this option causes footnotes on a slide to be displayed at the bottom of the slide.)
-
EPUB writer:
- Use different structure for epub footnotes (#8676, see #8672, #5583). Many EPUB readers are thrown off by pandocโs current footnote output. Both the ol and the fact that the footnote backlink is at the end of the note seem to pose problems. With this commit, we now create a list of aside (or div) elements, instead of an ordered list. Each element begins with a note number that is linked back to the note reference. (So, the backlink occurs at the beginning rather than the end.) Thanks to @Porges and @lewer.
-
Docx writer:
- Include abstract title (#8702). Uses localized term for abstract.
-
Markdown writer:
- Use implicit figures if thereโs a caption but no alt (#8689, Albert Krewinkel).
-
Jira reader (Albert Krewinkel):
- Add panel title as nested div (#8681).
- Require jira-wiki-markup 1.5.1 (#8680). This fixes a bug in the parser that caused text between two exclamation marks to be parsed as an image. The first
!
of image markup must now be followed by a non-space character; otherwise, the enclosed text is parsed as normal content.
-
Ms writer:
- Fix handling of Figure (#8660).
-
ICML writer:
- Fix images with data (#8675). The Contents element should be inside Properties.
-
LaTeX writer:
- Add Chinese to Babel languages.
- Fix background image in Beamer when there are figure environments (#8671, Martรญn Pozo).
-
LaTeX template:
- Add
babelfonts
variable to default LaTeX template. This allows specifying certain fonts to be used with certain babel languages. Thanks to Frederik Elwert. - Fix highlight/underline with lualatex (#8707). We need the lua-ul package instead of soul, which doesnโt work with lualatex.
- Add
-
Lua (Albert Krewinkel):
- Add
pandoc.cli.repl
function - Fix
json.encode
for nested AST elements. Ensures that objects with nested AST elements can be encoded as JSON. - Auto-generate docs for pandoc modules.
- Load text module as
pandoc.text
. This only affects the name in the Lua-internal documentation. It is still possible to load the modules viarequire 'text'
, although this is deprecated. - Move docs from module
text
topandoc.text
The latter is easier to use and more consistent with the other modules. - Keep the Lua stack clean A metatable used during initialization was not properly removed from the stack. Likewise, accessing the CommonState from Lua previously led to the pollution of the Lua stack with a left-over value.
- Add function
pandoc.format.from_path
. - Allow to get the JSON encoding of log messages.
- Add
-
Text.Pandoc.Format: Add new function
formatFromFilePaths
[API change] (#8710, Albert Krewinkel). -
The old Text.Pandoc.App.FormatHeuristics module has been removed.
-
In
--version
, use Windows%APPDATA%
variable to describe user data dir (#8686, Pablo Rodrรญguez). -
Text.Pandoc.App.CommandLineOptions: donโt lowercase arg to
--from
/--read
(Albert Krewinkel). This prevented users to use custom writers with uppercase characters in their filenames. Format-normalization, including lower-casing of format identifiers, happens during format parsing. -
Documentation:
- Add
doc/nix.md
. - Add
doc/extras.md
. This was formally in the website repo. doc/lua-filters.md
: improve docs forpandoc.zip
.
- Add
-
Factor out
make_macos_release.sh
from the release candidate workflow. Use cabal instead of stack to build the macos binary. -
Modify linux/make_artifacts.sh so it will work on cirrus.
-
Switch to hslua-2.3
-
Depend on latest releases of texmath, doclayout.
pandoc 3.1.1
Click to expand changelog
-
EPUB reader: Give additional information in error if the epub zip container canโt be unpacked.
-
TSV reader: donโt gobble tabs as whitespace (#8661).
-
Org reader: accept empty tables (#8659).
-
LaTeX reader: fix multiplication syntax for tabular (#8658). We recognized
*{6}{...}
but not*6{...}
or*6c
. -
Docx reader: parse image alt texts in LibreOffice generated files. LibreOffice tags images slightly differently than Word; this change lets the parses take that difference into account when looking for an image description (alt text).
-
DocBook reader:
-
JATS reader: avoid generating duplicate figure captions (#8669).
-
RST reader: align with spec in syntax for role names (#8653). In particular, we now allow colons in row names.
-
Add note on converting from .doc format to FAQs (#8654).
-
Trap error in getAppUserDataDirectory (#8648). This can raise an error if pandoc is run in a non-user environment.
-
LaTeX writer: do not use longtable foot with Beamer (#8638, Albert Krewinkel). The table foot is made part of the table body, as otherwise it wonโt show up in the output. The root cause for this is that longtable cannot detect page breaks in Beamer.
-
LaTeX template: Add CJKsansfont and CJKmonofont for XeLaTeX (#8656, Yudong Jin).
CJKsansfont
andCJKmonofont
will be set for xelatex only ifCJKmainfont
is also provided. -
URL style in ConTeXt (#8612, Thomas Hodgson). Previously, a URL like this would be in monospace text:
\useURL[url1][https://example.com]
. Now, it will match the main text unless thelinkstyle
variable is set, which controls the styling of all links. Closes #8602. -
Asciidoc writer: Properly escape
|
in table cells (#8665). -
asciidoc{,tor} template: fix revision date when author is unset (#8637, arcnmx). Revision line syntax is only valid in combination with an author line, so the date attribute must be set explicitly when the author is missing
-
HTML writer: allow โtrackโ element to be treated as block-level HTML (#8629).
-
Include needed polyfill when MathJaX is used (#8625).
-
JATS writer: include alt-text in
<graphic>
,<inline-graphic>
elements (#8631, Albert Krewinkel). -
Chunked HTML writer: Retain metadata in processing sections for chunked HTML (#8620). Previously we suppressed metadata in all but the top page, in order to prevent the title block from being printed on every page. This prevented use of custom variables set by metadata fields. This commit moves to a better solution: a conditional in the default template restricts the title block to the top page.
-
Lua API:
- Add new function
pandoc.system.cputime
(Albert Krewinkel). The function returns the CPU time consumed by pandoc and can be used to benchmark Lua computations. - Add module
pandoc.json
to handle JSON encoding (#8605, Albert Krewinkel).
- Add new function
-
Use pandoc-lua-marshal 0.2.1 (Albert Krewinkel). All major AST elements now have
__tojson
metamethods that return the JSON representation of an element. This allows to JSON-encode these elements with libraries that respect the__tojson
metamethod, including dkjson. -
Use latest zip-archive. This allows pandoc to open certain epubs that it could not open before.
-
Use commonmark-extensions 0.2.3.4. This fixes some bugs involving definition lists and inline formatting.
-
Use latest skylighting-format-context
-
MANUAL.txt:
- Document chunk-template in defaults file.
- Remove obsolete โraw content in a styleโ section.
- Revise documentation for
--mathml
to reflect support in all major browsers (#8667).
-
docs/custom-readers.md: Update JSON parsing example. The example now uses the built-in
pandoc.json
library to parse the API output. -
doc/press.md: Add article on CiTO in J Cheminform by @egonw.
-
doc/lua-filters.md: fix typo in
run_json_filter
(Morgan Willcock).
pandoc 3.1
Click to expand changelog
-
Fix regression with
--print-highlight-style
option (#8586). -
Add new
--chunk-template
option (#8581), allowing more control over the filenames in chunked HTML output. -
Text.Pandoc.App: Add
optChunkTemplate
constructor to Opt [API change]. -
Text.Pandoc.Options: add
writerChunkTemplate
constructor toWriterOptions
[API change]. -
Text.Pandoc.Chunks: add Data, Typeable, Generic, ToJSON, FromJSON instances for
PathTemplate
[API change]. -
Text.Pandoc.Citeproc: Fix bug in
metaValueToReference
(#8611). This bug caused us to get some repeated content when converting MetaBlock to Inlines. -
Textile reader:
-
ODT reader: fix blockquote indent detection (#3437, Daniel Kessler).
-
LaTeX writer: include short figure/table caption if one is given (Albert Krewinkel). Short captions are used by LaTeX when generating the list of figures or list of tables. Adding a short caption will now overwrite the full caption in these lists.
-
Powerpoint writer: fix handling of simple figures (#8565, Albert Krewinkel). This ensures that simple figures are displayed in the same way as before the introduction of a dedicated
Figure
constructor in the AST. -
Use released skylighting 0.13.2.1
-
INSTALL.md: direct people to cabal install pandoc-cli.
-
doc/lua-filters.md: document โFigureโ type and constructor (Albert Krewinkel). Fix typos (Martin Joerg).
-
Fix link in manual (#8583, Salim B).
pandoc 3.0.1
Click to expand changelog
-
Fix use of extensions with custom readers (#8571).
-
Text.Pandoc.Writers.Shared: export
setupTranslations
[API change]. Use this in HTML and OpenDocument writers, to ensure that translations are set up properly even when we donโt go throughconvertWithOpts
. -
LaTeX reader: fix regression in macro resolution for environments (#8573).
-
Chunked HTML writer: Fix handling of images with absolute URLs (#8567).
-
HTML writer:
- Donโt omit newlines in task lists.
- Donโt disable checkboxes in task lists (#8562).
-
Ensure that automatically set variables
pandoc-version
,outputfile
,title-prefix
,epub-cover-image
,curdir
,dzslides-core
can be overridden by--variable
on the command line. Previously they would create lists in the template Context, which is not desirable. -
Fix man page copying in
linux/make_artifacts.sh
(#8566). Previously we were copying the pandoc-server.1 pandoc page to pandoc-lua.1. -
pandoc.cabal: remove pandoc.cabal, stack.cabal from extra-source-files (#8560). The problem is that if these are in extra-source-files, then they get put in the tarball, and then anyone trying to build the source from an unpacked tarball will run into the problem that cabal.project and stack.yaml refer to pandoc-server, pandoc-lua-engine, and pandoc-cli, which arenโt in the tarball.
-
Require texmath 0.12.6 for better MathML output.
-
Fix typo in Lua filter documentation (Carlos Scheidegger).
-
Fix formatting of link in pandoc-server.md (James Scott-Brown).
-
Minor changelog fixups.
pandoc 3.0
Click to expand changelog
-
Split pandoc-server, pandoc-cli, and pandoc-lua-engine into separate packages (#8309). Note that installing the
pandoc
package from Hackage will no longer give you thepandoc
executable; for that you need to installpandoc-cli
. -
Pandoc now behaves like a Lua interpreter when called as
pandoc-lua
or whenpandoc lua
is used (#8311, Albert Krewinkel). The Lua API that is available in filters is automatically available to the interpreter. (See thepandoc-lua
man page.) -
Pandoc behaves like a server when called as
pandoc-server
or whenpandoc server
is used. (See thepandoc-server
man page.) -
A new command-line option
--list-tables
, causes tables to be formatted as list tables in RST (#4564, with Francesco Occhipinti). -
New command line option:
--epub-title-page=true|false
allows the EPUB title page to be omitted (#6097). -
--reference-doc
can now accept a URL argument (#8535) and load a remote reference doc. -
--version
output no longer contains version info for dependent packages. Instead, it contains a โFeaturesโ line that indicates whether the binary was compiled with support for acting as a server, and for using Lua filters and Custom writers. -
A new option
--split-level
replaces--epub-chapter-level
and affects both EPUB and chunked HTML output.--epub-chapter-level
will still work but is deprecated. -
Multiple input files with
--file-scope
: fix case where the links are URL-encoded, e.g.ย with%20
(#8467). -
Produce error if
--csl
is used more than once (#8195, Prat). -
Remove deprecated
--atx-headers
option. -
Remove deprecated option
--strip-empty-paragraphs
. -
In
--verbose
mode add message when running citeproc (as with other filters). -
Add new
mark
extension for highlighted text in Markdown, using==
delimiters (#7743). -
Add new extensions
wikilinks_title_after_pipe
andwikilinks_title_before_pipe
forcommonmark
andmarkdown
. (#2923, Albert Krewinkel). The former enables links of style[[Name of page|Title]]
and the latter[[Title|Name of page]]
. Titles are optional in both variants, so this works for both:[[https://example.org]]
,[[Name of page]]
. The writer is modified to render links with titlewikilink
as a wikilink if a respective extension is enabled. Pandoc will usewikilinks_title_after_pipe
if both extensions are enabled. -
Add prefixes to identifiers with
--file-scope
(#6384). This change only affects the case where--file-scope
is used and more than one file is specified on the command line. In this case, identifiers will be prefixed with a string derived from the file path, to disambiguate them. For example, an identifierfoo
incontents/file1.txt
will becomecontents__file1.txt__foo
. Links will be adjusted accordingly: iffile2.txt
links tofile1.txt#foo
, then the link will be changed to point to#file1.txt__foo
. Similarly, a link tofile1.txt
will point to#file1.txt
. A Div with an identifier derived from the file path will be added around each fileโs content, so that links to files will still work. -
New output format:
chunkedhtml
. This creates a zip file containing multiple HTML files, one for each section, linked with โnext,โ โprevious,โ โup,โ and โtopโ links. (If-o
is used with an argument without an extension, it is treated as a directory and the zip file is automatically extracted there, unless it already exists.) The top page will contain a table of contents if--toc
is used. Asitemap.json
file is also included. The option--split-level
determines the level at which sections are to be split. -
Support complex figures (Albert Krewinkel, Aner Lucero). There is now a dedicate Figure block constructor for figures. The old hack of representing a figure as
Para [Image attr [..alt..] (source, "fig:title")]
has been dropped. Here is a summary of figure support in different formats:- Markdown reader: paragraphs containing just an image are treated as figures if the
implicit_figures
extension is enabled. The identifier is used as the figureโs identifier and the image description is also used as figure caption; all other attributes are treated as belonging to the image. - Markdown writer: figures are output as implicit figures if possible, via HTML if the
raw_html
extension is enabled, and as Div elements otherwise. - HTML reader:
<figure>
elements are parsed as figures, with the caption taken from the respective<figcaption>
elements. - HTML writer: the alt text is no longer constructed from the caption, as was the case with implicit figures. This reduces duplication, but comes at the risk of images that are missing alt texts. Authors should take care to provide alt texts for all images. Some readers, most notably the Markdown reader with the
implicit_figures
extension, add a caption thatโs identical to the image description. The writer checks for this and adds anaria-hidden
attribute to the<figcaption>
element in that case. - JATS reader: The
<fig>
and<caption>
elements are parsed into figure elements, even if the contents is more complex. - JATS writer: The
<fig>
and<caption>
elements are used write figures. - LaTeX reader: support for figures with non-image contents and for subfigures.
- LaTeX writer: complex figures, e.g.ย with non-image contents and subfigures, are supported. The
subfigure
template variable is set if the document contains subfigures, triggering the conditional loading of the subcaption package. Contants of figures that contain tables are become unwrapped, as longtable environments are not allowed within figures. - DokuWiki, Haddock, Jira, Man, MediaWiki, Ms, Muse, PPTX, RTF, TEI, ZimWiki writers: Figures are rendered like Div elements.
- Asciidoc writer: The figure contents is unwrapped; each image in the the figure becomes a separate figure.
- Classic custom writers: Figures are passed to the global function
Figure(caption, contents, attr)
, wherecaption
andcontents
are strings andattr
is a table of key-value pairs. - ConTeXt writer: Figures are wrapped in a โplacefigureโ environment with
\startplacefigure
/\endplacefigure
, adding the features caption and listing title as properties. Subfigures are place in a single row with the\startfloatcombination
environment. - DocBook writer: Uses
mediaobject
elements, unless the figure contains subfigures or tables, in which case the figure content is unwrapped. - Docx writer: figures with multiple content blocks are rendered as tables with style
FigureTable
; like before, single-image figures are still output as paragraphs with styleFigure
orCaptioned Figure
, depending on whether a caption is attached. - DokuWiki writer: Caption and โalt-textโ are no longer combined. The alt text of a figure will now be lost in the conversion.
- FB2 writer: The figure caption is added as alt text to the images in the figure; pre-existing alt texts are kept.
- ICML writer: Only single-image figures are supported. The contents of figures with additional elements gets unwrapped.
- OpenDocument writer: A separate paragraph is generated for each block element in a figure, each with style
FigureWithCaption
. Behavior for single-image figures therefore remains unchanged. - Org writer: Only the first element in a figure is given a caption; additional block elements in the figure are appended without any caption being added.
- RST writer: Single-image figures are supported as before; the contents of more complex images become nested in a container of type
float
. - Texinfo writer: Figures are rendered as float with type
figure
. - Textile writer: Figures are rendered with the help of HTML elements.
- XWiki: Figures are placed in a group.
- Markdown reader: paragraphs containing just an image are treated as figures if the
-
Changes in custom readers/writers:
- It is now possible to have a custom reader and a custom writer for a format together in the same file. The file may also define a custom template for the writer.
- Pandoc now checks the folder
custom
in the userโs data directory for a matching script if it canโt find one in the local directory. Previously, thereaders
andwriters
data directories were searched for custom readers and writers, respectively. Scripts in those directories must be moved to thecustom
folder. - Custom readers used to implement a fallback behavior that allowed to consume just a string value as input to the
Reader
function. This has been removed, the first argument is now always a list of sources. Usetostring
on that argument to get a string.
-
New module Text.Pandoc.Writers.ChunkedHTML, exporting
writeChunkedHtml
[API change]. -
We now set the
pandoc-version
variable centrally rather than in the writers. One effect is the man writer now emits a comment with the pandoc version. -
pandoc-server:
- Add simple CORS support to pandoc-server (#8427).
- Print message to stderr when starting the server.
-
Docx reader:
-
ODT reader:
-
DocBook reader:
-
JATS reader:
- Handle uri element in references (#8270).
-
Ipynb reader:
...
pandoc 2.19.2
Click to expand changelog
-
Fix regression with data uris in 2.19.1 (#8239). In 2.19.1 we used the base64URL encoding rather than base64.
-
pandoc-server: handle
citeproc
parameter as documented (#8235). -
Org reader: treat emacs-jupyter src blocks as code cells (#8236, Albert Krewinkel). This improves support for notebook-like org files that are intended to be used with emacs-jupyter package.
-
HTML writer and templates: revert to using
width
property for column widths (Albert Krewinkel). The defaultflex
andoverflow-x
properties of a column are set toauto
. In combination, these changes allow to get good results when using columns with or without explicit widths. -
Org writer (Albert Krewinkel):
- Add support for jupyter nodebook cells (#6367).
- Prefix code language of ipynb code blocks with
jupyter-
. This is the convention used by the emacs-jupyter package. - Keep code block attributes as header args. This allows to keep more information in the resulting
src
blocks, making it easier to roundtrip from or through Org. Org babel ignores unknown header arguments. - Add code block identifier as
#+name
to src blocks.
-
Fix some typos in the codebase (luz paz).
-
Require hslua-module-path 1.0.3 (#8228, Albert Krewinkel).
pandoc 2.19.1
Click to expand changelog
-
Add server capabilities.
- New exported module Text.Pandoc.Server [API change].
- The pandoc executable now starts up a web server when renamed or symlinked as
pandoc-server
, and functions as a CGI program when renamed or symlinked aspandoc-server.cgi
. See the man page forpandoc-server
for full documentation.
-
Text.Pandoc.App.Opts: Redo
FromJSON
forOpt
so that optional values can be omitted (in which case the values fromdefaultOptions
are used). -
Org reader: treat โabstractโ block as metadata (Albert Krewinkel, #8204). A block of type โabstractโ is assumed to define the documentโs abstract. It is transferred from the main text to the metadata.
-
Org template: add abstract from metadata as block of type โabstractโ (#8204).
-
HTML writer: use
flex
property for column widths (Albert Krewinkel, #8232). -
LaTeX writer:
-
LaTeX template: fix behavior of
colorlinks
variable (Albert Krewinkel, #8226). Fixes a regression in 2.19 that required theboxlinks
variable to be set in addition to the usual link coloring variables. Otherwise links were never colored in LaTeX PDF output. -
Text.Pandoc.Highlighting: Export
lookupHighlightingStyle
[API change]. Previously this lived in an unexported module Text.Pandoc.App.CommandLineOptions, under the namelookupHighlightStyle
. -
Text.Pandoc.App:
- Remove unneeded MonadIO constraints in readSources.
- Factor out
convertWithOpts'
fromconvertWithOpts
. This runs in any PandocMonad, MonadIO, MonadMask instance. So far it is not exported, but it might find a use later.
-
Support
--strip-comments
in commonmark/gfm (#8222). This change makes the commonmark reader sensitive toreaderStripComments
. -
Lua: add function
pandoc.utils.citeproc
(Albert Krewinkel). The function runs the citeproc processor on a Pandoc document. Exposing this functionality to Lua allows to make citation processing part of a filter or writer, simplifies the creation of multiple bibliographies, and enables the use of varying citation styles in different parts of a document. -
Refactor
linux/make_artifacts.sh
. -
Update INSTALL.md installation from source instructions.
-
Use base64 package instead of base64-bytestring. It is supposed to be faster and more standards-compliant.
-
trypandoc improvements:
- Add dropdown with canned examples.
- Add citeproc support.
- Support csv, bibliographic and binary formats.
- Add load from file.
- Add permalink. Donโt always reload page.
- Use vanilla JS and CSS + the new
pandoc-server.cgi
.
-
Allow haddock-library-1.11.0.
-
Convert
tool/extract-changes.hs
to a Lua filter.