Universal markup converter
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 to WriterOptions
[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.
Improve handling of %
in bib(la)tex parsing (#8597, #8595).
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).
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 through convertWithOpts
.
LaTeX reader: fix regression in macro resolution for environments (#8573).
Chunked HTML writer: Fix handling of images with absolute URLs (#8567).
HTML writer:
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.
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 the pandoc
executable; for that you need to install pandoc-cli
.
Pandoc now behaves like a Lua interpreter when called as pandoc-lua
or when pandoc lua
is used (#8311, Albert Krewinkel). The Lua API that is available in filters is automatically available to the interpreter. (See the pandoc-lua
man page.)
Pandoc behaves like a server when called as pandoc-server
or when pandoc server
is used. (See the pandoc-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
and wikilinks_title_before_pipe
for commonmark
and markdown
. (#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 title wikilink
as a wikilink if a respective extension is enabled. Pandoc will use wikilinks_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 identifier foo
in contents/file1.txt
will become contents__file1.txt__foo
. Links will be adjusted accordingly: if file2.txt
links to file1.txt#foo
, then the link will be changed to point to #file1.txt__foo
. Similarly, a link to file1.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. A sitemap.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:
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.raw_html
extension is enabled, and as Div elements otherwise.<figure>
elements are parsed as figures, with the caption taken from the respective <figcaption>
elements.implicit_figures
extension, add a caption that’s identical to the image description. The writer checks for this and adds an aria-hidden
attribute to the <figcaption>
element in that case.<fig>
and <caption>
elements are parsed into figure elements, even if the contents is more complex.<fig>
and <caption>
elements are used write figures.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.Figure(caption, contents, attr)
, where caption
and contents
are strings and attr
is a table of key-value pairs.\startplacefigure
/\endplacefigure
, adding the features caption and listing title as properties. Subfigures are place in a single row with the \startfloatcombination
environment.mediaobject
elements, unless the figure contains subfigures or tables, in which case the figure content is unwrapped.FigureTable
; like before, single-image figures are still output as paragraphs with style Figure
or Captioned Figure
, depending on whether a caption is attached.FigureWithCaption
. Behavior for single-image figures therefore remains unchanged.float
.figure
.Changes in custom readers/writers:
custom
in the user’s data directory for a matching script if it can’t find one in the local directory. Previously, the readers
and writers
data directories were searched for custom readers and writers, respectively. Scripts in those directories must be moved to the custom
folder.Reader
function. This has been removed, the first argument is now always a list of sources. Use tostring
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:
Docx reader:
unnumbered
(#8148, Albert Krewinkel). This change ensures good conversion results when converting with --number-sections
.oMathPara
in w:p
with other content (#8483).ODT reader:
../
to relative links (see #3524); this needs to be removed when converting from ODT.readOdt
-> readODT
. [API change]DocBook reader:
href
attribute without worrying about the namespace.)JATS reader:
Ipynb reader:
LaTeX reader:
##
macro arguments properly (#8243).toksToString
in Parsing module.soul
commands, including \hl
.unnumbered
class for \part*
(#8447)TEXINPUTS
handling (#8392). If TEXINPUTS
ends with :
, then the system default TEXINPUTS
is added. We handle this by just adding the working directory in this case.MediaWiki reader:
HTML reader:
<tt>
(#8330). It was no longer being parsed as Code (Justin Wood).RST reader:
mark
role for round-trip.Textile reader:
Markdown reader:
Allow fenced code block “bare” language to be combined with attributes (#8174, Siphalor), e.g.
```haskell {.class #id}
```
Allow table caption labels to start with lowercase t
(#8259).
Grid tables: allow specifying a table foot by enclosing it with part separator lines, i.e., row separator lines consisting only of +
and =
characters (#8257, Albert Krewinkel). E.g.:
+------+-------+
| Item | Price |
+======+=======+
| Eggs | 5£ |
+------+-------+
| Spam | 3£ |
+======+=======+
| Sum | 8£ |
+======+=======+
Fix implicit_header_references
with duplicate headings (#8300). Documentation says that when more than one heading has the same text, an implicit reference [Heading text][]
refers to the first one. Previously pandoc linked to the last one instead. This patch makes pandoc conform to the documented behavior.
Parse highlighted text inside ==..==
if mark
extension enabled.
Org reader:
&
prefix (#8302).#+pandoc-emphasis-pre
work as expected (#8360, Amir Dekel).BibTeX reader:
%
in url
field (#7678). %
does not function as a comment character inside url
(where URL-encoding is common).url
field in bibtex
as well as biblatex
(#8287). This field is not officially supported for BibTeX, but many styles can handle it (https://www.bibtex.com/f/url-field/), and others will ignore it.software
type in biblatex <-> CSL conversions (#8504).version
field comes through in biblatex (#8504).BibTeX writer:
url
even for bibtex
(#8287).Org writer:
begin_example
.tag-name
in headers as tags (#8513, Albert Krewinkel). This enables round-tripping of tags in Org headings.EndNote reader:
DocBook writer:
writeDocbook
-> writeDocBook
, for consistency with the DocBook reader’s naming. [API change]inlinemediaobject
, not imageobject
.ConTeXt writer (Albert Krewinkel):
\type
for inline code. Inline codes that contained curly braces where previously rendered with \mono
; this led to unexpected results when the presentation of \type
was customized, as those changes would not have been applied to code rendered with \mono
.tagging
extension (Albert Krewinkel). Paragraphs are enclosed by \bpar
and \epar
commands, and highlight
commands are used for emphasis. This results in much better tagging in PDF output.LaTeX writer:
\includesvg
for SVGs and include the svg
package (#8334).soul
instead of ulem
for strikeout, underline (#8411). This handles things like hyphenation, line breaks, and nonbreaking spaces better.\toprule\noalign{}
instead of \toprule()
in tables, and similarly for \midrule
and \bottomrule
(#8223). This facilitates redefining \toprule
, \midrule
, and \bottomrule
without needing to gobble the ()s. (Those who redefine these macros on the assumption that they will be followed by ()
may need to change their definitions.)mark
.JATS writer:
<break/>
for LineBreak in the limited contexts that accept it (#8344).writeJATS
in favor of writeJatsArchiving
.RTF writer:
RST writer:
--list-tables
option is specified (writerListTables
) (#4564, Francesco Occhipinti).mark
role for Span with class mark
.Commonmark writer:
HTML writer:
. . .
as a slide pause in slides, and not in regular HTML output (#8281).<a>
inside <a>
(#7585). If a link text contains a link, we replace it with a span.doc-biblioentry
-> listitem
, doc-bibliography
-> list
.--mathjax
is used.HTML, Markdown writers: filter out empty class attributes (#8251). These should not be generated by any pandoc readers, but they might be produced programatically.
Markdown writer:
!
before [
(#8254).mark
extension.AsciiDoc writer:
ODT writer:
Docx writer:
lang
element (#7022). For East Asian languages, we need to adjust w:eastAsia
rather than w:val
. This allows normal fonts to be used for any Latin-font text. Similarly, for bidi languages, we need to adjust w:bidi
rather than w:val
. We treat he
and ar
as bidi languages, zh
, ja
, ko
as East Asian languages.mark
as highlighted. Currently yellow is hardcoded.MediaWiki writer:
Man writer:
--ascii
has been specified on the command line (writerPreferAscii
).ICML writer:
EPUB writer:
Ms writer:
XWiki writer:
LaTeX template:
\babelfont
when mainlang
and lang
are specified and pdflatex
is not being used (#8538). This is needed for good results in Arabic.urlstyle
(#8429, Amar Al-Zubaidi). This is set to same
by default, so users should not experience any change.HTML template:
mainfont
, fontsize
, and linestretch
can still be used as before; the only difference is that we no longer provide opinionated defaults. This commit also adds a maxwidth
variable that sets max-width
; if not set, 36em is used as a default.code { hyphens: manual; }
.styles.citations.html
partial in styles.html
.hanging
-> hanging-indent
in styles.citations.html
.EPUB CSS changes: Reduce the amount of inline CSS used for EPUBs (#8379). Almost everything is now in the default EPUB CSS (data/epub.css
), which can be overridden either by putting epub.css
in the user data directory or by using --css
on the command line. Inline styles are only used for syntax highlighting (which depends on the style specified, and is only included on pages with highlighted code) and for bibliography formatting (which can depend on the CSL style, and is only used in the page containing the bibliography).
Note that, for compatibility with older readers, we don’t use flexbox to style column/columns
divs by default, as we do in HTML. Instead, we use an older method which only works when there are two column
divs inside a columns
Reveal.js template: prevent line-wrapping of parallax options (#8503, Albert Krewinkel).
reference.pptx: Remove unsupported element (#8342, #6338, Link Swanson). The default template contained text above the header, which can mislead users into thinking there is a way to put text there using pandoc.
Text.Pandoc.Readers.Metadata:
Text.Pandoc.App:
parseOptionsFromArgs
and parseOptions
(#8406) They now return Either OptInfo Opt
. [API change]OptInfo
type [API change].handleOptInfo
function. This performs the IO actions for things like --version
that were previously done in parseOptionsFromArgs
[API change].convertWithOpts
: add argument for a ScriptingEngine
[API change].optEpubTitlePage
field on Opt
[API change] (#6097).optEpubChapterLevel
, add optSplitLevel
[API change].IpynbOutput(..)
[API change].Text.Pandoc.App.OutputSettings:
outputWriterName
in OutputSettings
.Text.Pandoc.Citeproc:
items
property in addition to an array of references. This is what is returned by e.g. https://api.zotero.org/groups/904125/items?v=...&format=csljson
{...}
(#8288). Previously a locator specified as {}
would be rendered as p.
with nothing after it.sub verbo
to sub-verbo
(#8315). This is a change in the term’s canonical name in citeproc. As a result of this change, sub verbo
locators have not worked in pandoc since citeproc 0.7.metaValueToPath
.toName
, which previously had been part of T.P.Citeproc.BibTeX, and allows for cleaner module dependencies.Export module Text.Pandoc.Slides
[API Change] (Albert Krewinkel).
Add new module Text.Pandoc.Format [API change] (Albert Krewinkel). The module provides functions and types for format spec parsing and processing. The function parseFormatSpec
was moved from Text.Pandoc.Extensions to the new module and renamed to parseFlavoredFormat
. It now operates in a PandocMonad and is based on the updated types.
Text.Pandoc.Sources:
Text.Pandoc.Extensions:
readExtension
[API change].parseFormatSpec
[API change]. This has been moved to Text.Pandoc.Format and renamed as parseFlavoredFormat
(Albert Krewinkel).CustomExtension
constructor to Extension
[API change].Bounded
, Enum
instances for Extension
.extensionsToList
function.readExtension
so it can handle CustomExtension
, and so that it returns a Text rather than Maybe Text
.showExtension
[API change].Ext_mark
extension [API change].Ext_tagging
constructor [API change] (Albert Krewinkel).Ext_wikilinks_title_after_pipe
, Ext_wikilinks_title_before_pipe
[API change] (Albert Krewinkel).Text.Pandoc.PDF:
papersize
on PDF generation via ms (#8403). We need to set an option in pdfroff in addition to including a macro in the ms file. With this fix, -Vpapersize=a4
should be sufficient to produce A4 PDF via ms.Text.Pandoc.MIME:
mime-types
, which is already a transitive dependency (#8277, Albert Krewinkel).Text.Pandoc.XML:
lookupEntity
from commonmark-hs [API change].Text.Pandoc.Parsing:
Stream(..)
, updatePosString
, SourceName
, Parsec
, ParsecT
. Removed exports: Parser
, ParserT
[API change].errorMessages
, messageString
[API change].fromParsecError
, which can be used to turn a parsec ParseError into a regular PandocParseError (#8382) [API change].nested
[API change]. It was not being used, and in fact it was a bad idea from the beginning, as it had no hope of solving the problem it was introduced to solve.characterReference
, charsInBalanced
. characterReference
so they now return a Text (some named references don’t correspond to a single Char). Use the the lookupEntity
function from commonmark-hs instead of the slow one from tagsoup [API change].charsInBalanced
now takes a Text parser rather than a Char parser as argument [API change].Text.Pandoc.Shared:
textToIdentifier
[API change].crFilter
. [API change]deLink
. [API change]notElemText
.makeMeta
.pandocVersion
(now available in Text.Pandoc.Version as pandocVersionText
).findM
[API change]. This was only used in one place, and can be replaced with simpler code.makeMeta
[API change].ordNub
[API change]. This is just nubOrd
from Data.Containers.ListUtils.mapLeft
[API change]. This is just a synonym for Bifunctor.first.elemText
, notElemText
[API change].pandocVersion
and pandocVersionText
, which are now exported by Text.Pandoc.Version.escapeURI
, isURI
. These are now exported by Text.Pandoc.URI, and removing them from Shared helps make the module structure more straightforward.blocksToInlines
. (#8499, Albert Krewinkel). This change also affects the pandoc.utils.blocks_to_inlines
Lua function.defaultUserDataDir
is no longer exported (it has been moved to T.P.Data) [API change].figureDiv
, offering offers a standardized way to convert a figure into a Div element (Albert Krewinkel) [API change].Text.Pandoc.Writers.Shared:
htmlAddStyle
, htmlAlignmentToString
and htmlAttrs
[API change] (Wout Gevaert).tagWithAttrs
(Wout Gevaert).toTableOfContents
: handle nested Divs better (#8402).Rename Text.Pandoc.Network.HTTP -> Text.Pandoc.URI. This is still an unexported internal module. Export urlEncode
, escapeURI
, isURI
, schemes
, uriPathToPath
. Drop exports of schemes
and uriPathToPath
.
Text.Pandoc.URI isURI
: don’t require non-ASCII characters to be escaped (#8508).
Rename Text.Pandoc.Readers.LaTeX.Types -> Text.Pandoc.TeX (internal module).
Text.Pandoc.Options:
writerListTables
, specifying that list tables be used in RST output [API change].writerEpubTitlePage
field on WriterOptions
(#6097) [API change].writerEpubChapterLevel
, add writerSplitLevel
[API change].Text.Pandoc.Filter:
applyFilters
[API change].applyJSONFilter
[API Change] (Albert Krewinkel).applyFilters
over scripting engine [API change] (Albert Krewinkel).New exported module Text.Pandoc.Chunks [API change]. This module provides functions to split Pandoc documents into chunks to be rendered in separate files, e.g. one per section. Internal identifiers are rewritten appropriately to point to the new locations (#6122).
Text.Pandoc.Readers:
getReader
, so it takes a FlavoredFormat
instead of a Text
[API change] (Albert Krewinkel).Text.Pandoc.Writers:
getWriter
, so it takes a FlavoredFormat
instead of a Text
[API change] (Albert Krewinkel).Text.Pandoc.Templates:
getDefaultTemplate
(Albert Krewinkel). The function getDefaultTemplate
no longer splits off extension modifers from the given format, as that conflicts with using custom writers as formats. Haskell library users should use getDefaultTemplate <=< (fmap formatName . parseFlavoredFormat)
if the input format can still contain extensions. The same is true for compileDefaultTemplate
, which calls getDefaultTemplate
internallyNew exported module Text.Pandoc.Scripting (Albert Krewinkel). The module contains the central data structure for scripting engines (e.g., Lua) [API change].
Text.Pandoc.Error:
PandocNoScriptingEngine
[API change] (Albert Krewinkel).PandocFormatError
[API change] (Albert Krewinkel). The new error is used to report problems with input or output format specifications.PandocNoTemplateError
(Albert Krewinkel).PandocParsecError
constructor from PandocError
(#8385). Henceforth we just use PandocParseError
.New module Text.Pandoc.Version, exporting pandocVersionText
and pandocVersion
[API change]. pandocVersion
returns a Version
instead of a Text
, which is consistent with pandocTypesVersion
.
Text.Pandoc.Class:
getPOSIXTime
, getZonedTime
sensitive to SOURCE_DATE_EPOCH
environment variable if set (#7093). (getTimestamp
was already sensitive.) This ensures that EPUB builds are reproducible.readDataFile
, readDefaultDataFile
, setTranslations
, and translateTerm
[API change].checkUserDataDir
[API change].T.P.Class.IO: export function writeMedia
[API change] (Albert Krewinkel). This is useful for the pandoc.mediabag
module.
Separate out Text.Pandoc.Data and Text.Pandoc.Translations from Text.Pandoc.Class (#8348). This makes Text.Pandoc.Class more self-contained.
readDataFile
and readDefaultDataFile
(both formerly provided by Text.Pandoc.Class), and also getDataFileNames
(formerly unexported in Text.Pandoc.App.CommandLineOptions) and defaultUSerDataDir
(formerly provided by Text.Pandoc.Shared). [API change]readTranslations
, getTranslations
, setTranslations
, translateTerm
, lookupTerm
, readTranslations
, Term(..)
, and Translations
[API change].Text.Pandoc now exports Text.Pandoc.Data and setTranslations
and translateTerm
{API change].
Export module Text.Pandoc.Class.IO [API change]. The module is useful when defining instances of class PandocMonad for types that are also instances of MonadIO.
Remove modules Text.Pandoc.Writers.Custom and Text.Pandoc.Readers.Custom [API Change] (Albert Krewinkel). The functions writeCustom
and readCustom
are available from module Text.Pandoc.Lua.
Text.Pandoc.Server:
Split this module into a separate package, pandoc-server
, allowing the pandoc
library to be compiled without server support.
Return object if JSON is accepted. Previously we just returned a JSON-encoded string. Now we return something like:
{
"output": "<p>hello</p>"
"base64": false,
"messages": [
{
"message": "Not rendering RawInline (Format \"tex\") \"\\\\noe\"",
"verbosity": "INFO"
}
],
}
This is a change in the pandoc-server JSON API.
Set translations in the writer based on lang
metadata.
Return error in JSON object if response is JSON.
Remove parseServerOpts
. [API change]
Text.Pandoc.Lua:
This module has been moved to a separate package, pandoc-lua-engine
.
Export applyFilter
, readCustom
, and writeCustom
. No longer export the lower-level function runFilterFile
[API change].
Change type of applyFilter
[API Change] (Albert Krewinkel). The module Text.Pandoc.Filter.Lua has been merged into Text.Pandoc.Lua. The function applyFilter
now has type
applyFilter :: (PandocMonad m, MonadIO m)
=> Environment-> [String]-> FilePath-> Pandoc-> m Pandoc
where Environment
is defined in Text.Pandoc.Filter.Environment.
Export new function getEngine
[API Change]. The function returns the Lua scripting engine.
Add unexported modules T.P.Lua.Reader, T.P.Lua.Writer. These contain the definitions of readCustom
and writeCustom
that were previously in T.P.Readers.Custom and T.P.Writers.Custom.
Cleanup module dependencies, for a cleaner module dependency graph.
The writeCustom
function has changed to return a Writer and an ExtensionsConfig [API change]. This allows ByteString writers to be defined.
The readCustom
function has changed to return a Reader and an ExtensionsConfig [API change].
Lua subsystem (Albert Krewinkel):
pandoc-lua-engine
. pandoc
does not depend on it. convertWithOpts
has a new parameter that can be used to pass in the scripting engine defined in pandoc-lua-engine
(or a different one, in theory).pandoc.format
. The module provides functions to query the set of extensions supported by formats and the set of extension enabled per default.pandoc.template.apply
.pandoc.template.meta_to_context
. The functions converts Meta values to template contexts; the intended use is in combination with pandoc.template.apply
.WriterOptions.variables
. The specialized peeker and pusher function for Context Text
values does not go via JSON, and thus keeps Doc values unchanged during round-tripping.Error running Lua
message is not prepended multiple times.pandoc.zip
.pandoc.template.apply
and in the WriterOptions template
field.reader_extensions
/writer_extensions
globals as Extensions
(#8390).pandoc.scaffolding.Writer
(#8377). This can be used to reduce boilerplate in custom writers.pandoc.text.toencoding
, pandoc.text.fromencoding
(#8512, Albert Krewinkel).pandoc.cli
module. Allow processing of CLI options in Lua.-D
CLI option for custom writers. A new error PandocNoTemplateError
(code 87) is thrown if a template is required but cannot be found.pandoc.write
and pandoc.read
.pandoc.mediabag.write
(Albert Krewinkel).pandoc.structure
(Albert Krewinkel). The function make_sections
has been given a friendlier interface and moved to the new module; the old pandoc.utils.make_sections
has been deprecated.Custom writers:
The global variables PANDOC_DOCUMENT
and PANDOC_WRITER_OPTIONS
are no longer set when the writer script is loaded. Both variables are still set in classic writers before the conversion is started, so they can be used when they are wrapped in functions.
Deprecate classic custom writers.
Add function pandoc.write_classic
. The function can be used to convert a classic writer into a new-style writer by setting it as the value of Writer
:
Writer = pandoc.write_classic
or to fully restore the old behavior:
function Writer (doc, opts)
PANDOC_DOCUMENT = doc
PANDOC_WRITER_OPTIONS = opts
load(PANDOC_SCRIPT_FILE)()
return pandoc.write_classic(doc, opts)
end
Support extensions in custom writers. Custom writers can define the extensions that they support via the global writer_extensions
. The variable’s value must be a table with all supported extensions as keys, and their default status as values. For example, the below specifies that the writer supports the extensions smart
and sourcepos
, but only the smart
extension is enabled by default:
writer_extensions = {
smart = true,
sourcepos = false,
}
Custom writers can define a default template via a global Template
function; the data directory is no longer searched for a default template. Writer authors can restore the old lookup behavior with
Template = function ()
local template
return template.compile(template.default(PANDOC_SCRIPT_FILE))
end
Custom readers:
Support extensions in custom readers. Custom readers, like writers, can define the set of supported extensions by setting a global. E.g.:
reader_extensions = {
smart = true,
citations = false,
}
Use latest versions of commonmark-extensions
, texmath
, citeproc
, gridtables
, and skylighting
.
Use pandoc-types 1.23. This adds the Figure
Block constructor and removes the Null
Block constructor.
Require aeson >= 2.0.
Use jira-wiki-markup 1.5.0 (#8511, Albert Krewinkel). Fixes issues with icon-like sequences at the beginning of words.
Use doctemplates 0.11, avoiding a transitive dependency on HsYAML.
Use skylighting 0.13.1.2.
Allow mtl 2.3.1 (Alexander Batischev).
Use latest skylighting-format-context.
Allow building with mtl 2.3.
Remove lua53
flag. We now only support Lua 5.4.
Add hie.yaml for haskell language server.
Add tools/latex-package-dependencies.lua.
Update default CSL with latest chicago-author-date.csl
.
make_artifacts.sh: various small improvements.
Remove sample.lua from data files (#8356).
Documentation:
PANDOC_WRITER_OPTIONS
in custom writers (Albert Krewinkel).pandoc.write_classic
(Albert Krewinkel).blank_before_blockquote
(#8324, Pranesh Prakash).--embed-resources
.pandoc-server.md
.--css
should be used with -s
.--metadata-file
(#8459).doc/lua-filters.md
: add documentation for pandoc.format
(Albert Krewinkel).Tests.Command: remove unused runTest
.
Add pandoc-lua.1 man page.
Improve shell.nix
.
Add tools/moduledeps.lua
for inspecting the internal module dependency tree.
Fix macOS zip so pandoc-server is a symlink. This cuts its size by 2x.
CI: Improve CI speed by caching more, eliminating macos builds, and splitting benchmarks into a separate action, run by manual dispatch. (We still test that benchmarks build in the regular CI.) The cache can be expired manually by modifying the secret CACHE_VERSION
.
Remove the unnecessary Setup.hs from pandoc. Cabal does not need this with build-type ‘simple’.
Add pandoc-lua and pandoc-server (symlinks) and their man pages to releases.
Use hslua-cli package for pandoc-lua interface (Albert Krewinkel).
Add server
flag to pandoc-cli, allowing it to be compiled without server support.
pandoc-cli: Allow building a binary without Lua support (Albert Krewinkel). Disabling the lua
cabal flag will result in a binary without Lua.
Move --version
handling to pandoc-cli. We need it here in order to print information about whether server and Lua support have been compiled in.
Move nightly
flag from pandoc to pandoc-cli (#8339).
Makefile changes:
make help
will now print all the targets and what they do.coverage
, weeder
, moduledeps
, prerelease
, ghcid
, repl
, linecounts
, hie.yaml
, binpath
.alias pandoc=`make binpath`
for convenient local testing of a build.quick-cabal
-> build
, quick-test
-> test
.SOURCEFILES
.Factor out xml-light into an internal library.
Add CITATION.cff (#8434).
Move trypandoc to a separate repository, jgm/trypandoc.
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 default flex
and overflow-x
properties of a column are set to auto
. In combination, these changes allow to get good results when using columns with or without explicit widths.
Org writer (Albert Krewinkel):
jupyter-
. This is the convention used by the emacs-jupyter package.src
blocks, making it easier to roundtrip from or through Org. Org babel ignores unknown header arguments.#+name
to src blocks.Fix some typos in the codebase (luz paz).
Require hslua-module-path 1.0.3 (#8228, Albert Krewinkel).
Add server capabilities.
pandoc-server
, and functions as a CGI program when renamed or symlinked as pandoc-server.cgi
. See the man page for pandoc-server
for full documentation.Text.Pandoc.App.Opts: Redo FromJSON
for Opt
so that optional values can be omitted (in which case the values from defaultOptions
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:
\label
. A caption is always included in this case, even if the caption is empty.\textquotesingle
for straight quotes in text.LaTeX template: fix behavior of colorlinks
variable (Albert Krewinkel, #8226). Fixes a regression in 2.19 that required the boxlinks
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 name lookupHighlightStyle
.
Text.Pandoc.App:
convertWithOpts'
from convertWithOpts
. 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 to readerStripComments
.
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:
pandoc-server.cgi
.Allow haddock-library-1.11.0.
Convert tool/extract-changes.hs
to a Lua filter.
Add --embed-resources
flag (Elliot Bobrow, #7331). This can be used to embed resources without implying --standalone
. Deprecate --self-contained
in favor of --embed-resources --standalone
.
Allow environment variable interpolation in highlight-style
and pdf-engine
fields in defaults files (#8061; Jaehwang Jung, #8073).
Allow placing custom readers and writers in user data directory (Albert Krewinkel, #8112) (readers
and writers
subdirectories).
Add tsv
(tab separated values) as an input format (#7974). [API change]: Text.Pandoc.Readers.CSV now exports readTSV
. Internal change: In Text.Pandoc.CSV, CSVOptions
has changed so that csvQuote
takes a Maybe value.
Add tex_math_dollars
to gfm
default extensions (reflecting gfm’s new support for math).
RST, Org, Markdown readers: support rowspans and colspans in grid tables (#8202, Albert Krewinkel). Note: the writers does not yet support these more complex grid table features, so these complex grid tables will not round-trip.
HTML, LaTeX, and MediaWiki readers: use formatCode
(#8162, #8129, Elliot Bobrow). This moves formatting from inside inline code elements to the outside, since pandoc’s Code element only takes string content.
Markdown reader:
smallcaps
, underline
) (Albert krewinkel, #4102). These spans are parsed as SmallCaps or Underline elements, but any attributes are included in a wrapping Span.HTML reader:
Org reader (Albert Krewinkel):
LaTeX reader:
\includesvg
(#8027).\lstinline
inside \passthrough
(#8179).mathEnvWith
(#8122). When converting e.g. an align environment to an aligned environment inside a Math element, we need to include a newline before the \end{aligned}
, since the previous line might end in a comment.\input
in LaTeX reader (#8092). Previously we required a .tex
extension, but TeX allows any extension for \input
(as opposed to \include
).RTF reader:
\nosupersub
(#8170).TikiWiki reader:
DocBook reader:
<xref>
elements (Frerich Raabe, #8065).JATS reader:
ref-
prefix from ref id in xref (#8007).RIS reader:
-
, provided they just have a newline, e.g. DB -\n
.MediaWiki reader:
DokuWiki reader:
tex_math_dollars
extension is now supported for dokuwiki
(but off by default) (#8178).<latex>...</latex>
is parsed as raw LaTeX inline, and inside <LATEX>..</LATEX>
as raw LaTeX block (#8178).<php>...</php>
is changed, so that instead of producing a code block, it produces raw HTML with <?php ... ?>
.LaTeX writer:
HTML writer:
--number-offset
. This formerly caused section divs to be produced, even when --section-divs
was not specified (#8097).[test]{.mark .underline}
; in addition, the special classes are no longer required to come first in the list of classes.EPUB writer:
--mathml
to your command line if you want to continue producing MathML.RST writer:
Ms writer:
ConTeXt writer:
Support complex table structures (Albert Krewinkel, #8116). The following table feature are now supported in ConTeXt:
The wrapping placetable
environment is also given a reference
option with the table identifier, enabling referencing of the table from within the document.
Unify link handling (Albert Krewinkel, #8096). Autolinks, i.e. links with content that’s the same as the linked URL, are now marked with the \url
command. All other links, both internal and external, are created with the \goto
command, leading to shorter, slightly more idiomatic code. As before, autolinks can still be styled via \setupurl
, other links via \setupinteraction
.
Use “sectionlevel” environment for headings (Albert Krewinkel, #5539). The document hierarchy is now conveyed using the \startsectionlevel
/\stopsectionlevel
by default. This makes it easy to include pandoc-generated snippets in documents at arbitrary levels. The more semantic environments “chapter”, “section”, “subsection”, etc. are used if the --top-level-division
command line parameter is set to a non-default value.
Docx writer:
w:lang
to rPr
for Span and Div with lang attribute, so that Word can know that “Apfel” is not a spelling error (#8026).ICML writer:
AsciiDoc writer:
+++text+++
; this is now changed to [.underline]#text#
. See comment at https://github.com/jgm/pandoc/issues/8070#issuecomment-1126883824.FB2 writer:
Markdown writer:
hard_line_breaks
enabled (#8035). We were already doing this for markdown
; this commit does the same thing for markua
and commonmark
and gfm
.commonmark
, markua
, gfm
. They are now nested by 2 spaces instead of 4 (#8011).Text.Pandoc.Class:
findFileWithDataFallback
[API Change] (Albert Krewinkel).fillMediaBag
: Keep attributes of original image on Span (Albert Krewinkel, #8099). Images that cannot be fetched are replaced with a Span that contains the image’s description. The span now also retains all original image attributes and inherits all attributes of the image. Furthermore, the classes image
and placeholder
are added, and path and title are store in attributes original-image-src
and original-image-title
, respectively.Text.Pandoc.Shared:
makeSections
: don’t make a section for a div with class “fragments” (#8098).makeSection
and in segmenting slides (#8155).formatCode
function to Text.Pandoc.Shared [API change] (Elliot Bobrow, #8129).taskListItemToAscii
: handle asciidoctor’s characters (#8011). Asciidoctor uses different unicode characters for task lists; we should recognize them too and be able to convert them to ascii task lists in formats like gfm.deLink
and mark for later removal.Text.Pandoc.Writers.Shared:
toTableOfContents
: Don’t replace links with empty spans in TOC (#8020).Text.Pandoc.Readers.Metadata:
blocksToInlines
from T.P.Shared.Text.Pandoc.Parsing:
gridTableWith'
, gridTableWith
[API Change] (Albert Krewinkel). The functions gridTableWith
and gridTableWith'
no longer takes a boolean argument that toggles whether a table head should be parsed: both, tables with heads and without heads, are always accepted now.Lua subsystem (Albert Krewinkel):
pandoc.system
module (Albert Krewinkel, #8184). The module now has the additional functions list_directory
, make_directory
, and remove_directory
. This makes it easier to write cross-platform scripts that need to inspect or modify the file system.clone
methods to Pandoc objects and allows to pass Blocks in instead of full Caption elements.pandoc.readers
and pandoc.writers
(#8177). The set of supported input and output formats is made available to Lua users.map
and includes
on lists like PANDOC_WRITER_OPTIONS.extensions
.Populate mediabag after filters have run (Albert Krewinkel, #8099). The mediabag is filled with document resources after the filters have run. This allows, for example, filter authors to modify image paths before pandoc tries to fetch the images. Lua filters that rely on a filled mediabag can use the new pandoc.mediabag.fill
function to perform that action in the filter.
Ms template: redefine rather than removing .CH macro (#8175).
JATS template (Albert Krewinkel, except as noted):
corresp="yes"
in their respective <contrib>
element.LaTeX template:
\textormath
to \TextOrMath
(Hos Es, #8036).HTML template styles:
span.underline
rule. This is superfluous now that we render Underline as <u>
.LaTeX template: Add boxlinks
variable for LaTeX/PDF output (#8198). If boxlinks
is set but colorlinks
is not, then boxes will be printed around links (hidelinks
will not be set in hypersetup
).
--self-contained
: Handle url()
in <style>
elements (#8193).
Text.Pandoc.PDF: use SHA1 hash of filename when converting SVG. The previous code threw away the directory component of the filename in constructing a new one. This led to surprising results if you had e.g. foo/pic.svg
and bar/pic.svg
; in the final PDF they’d be the same image, because the latter would overwrite the former in the temp directory.
Remove Muse reader round-trip tests. These are nondeterministic and have repeatedly failed on strange edge cases.
Update fonts MIME following IANA recommendation (Gabriel Lewertowski, #8127).
Future compat change for liftA2
export from Prelude (Georgi Lyubenov, #8132).
Update default.csl
from the latest chicago-author-date.csl.
Update manfilter.hs for greater portability (#8045). The tables in our man pages were not rendering correctly with mandoc, now used by default with macOS. mandoc doesn’t allow man formatting inside table cells. For maximum portability, we now render the tables in plain format and include them as code blocks in the man page.
CI: update macos container version (#8197, Sukka).
Add nightly
flag. This causes a -nightly-COMPILEDATE
suffix to be added the the output of --version
(#8016). This is used in the nightly CI builds.
Update dependencies (aeson, skylighting, pandoc-lua-marshall, citeproc, texmath).
Documentation improvements (thanks to Jiří Wolker, Castedo Ellerman, Albert Krewinkel, Bastien Dumont, Cezar Drożak, Benjamin Wuethrich, Ivan Panchenko, Sukil Etxenike, Masataka Ogawa).
New input formats: endnotexml
(EndNote XML bibliography), ris
(RIS bibliography).
A RIS bibliography file may now be used with --citeproc
.
Citeproc: Allow a formatted bibliography to be placed in metadata fields via a Div with class refs
(#7969, #526). Thus, one can include a metadata field, say refs
, whose content is an empty div with id refs
, and the formatted bibliography will be put into this metadata field. It may then be interpolated into a template using the variable refs
.
Ensure that you don’t get PDF output to terminal. -t pdf
now behaves like -t docx
and gives an error unless the output is redirected.
--version
now prints hslua version (#7929) and Lua version (#7997, Albert Krewinkel).
Change --metadata-file
parsing so that, when the input format is not markdown or a markdown variant, pandoc’s markdown is used (#6832, #7926). When the input format is a markdown variant, the same format is used. Reason for the change: it doesn’t make sense to run the markdown parser with a set of extensions designed for a non-markdown format, and this dramatically limits what people can do in metadata files.
Trim whitespace from math in --webtex
(#7892). This fixes problems with –webtex and markdown output, when display math starts or ends with a newline.
New exported module Text.Pandoc.Readers.EndNote, exporting readEndNoteXML
, readEndNoteXMLCitation
, and readEndNoteXMLReferences
. [API change]
--self-contained
: issue warning rather than failing with an error if a resource can’t be found (#7904).
New exported module, Text.Pandoc.Readers.RIS, exporting readRIS
(#7894).
LaTeX reader:
vbox
(#7939).\today
(#7905).\label
and \ref
for footnotes (#7930).\bgroup
(#7953).\usepackage
. If the package is local but causes parse errors, parse everything up to the error and skip the rest. Issue a CouldNotParseIncludeFile
warning indicating that parsing failed at that point.HTML reader:
<a epub:type="noteref">
and the identifier doesn’t correspond to anything in the note table (#7884). Previously we just silently skipped these cases.DocBook reader:
--verbose
.DokuWiki reader:
RST reader:
Span
with these attributes.JATS reader:
<fn-group>
elements are collected and re-inserted into the document as proper footnotes in the place where they are referenced.pub-date
(#8000).issn
and isbn
; use simpler form for issued date.ref-
prefix to the citation id to get the ref element’s id.Org reader:
Allow “:” in property drawer keys (Lucas V. R). Any non-space character is allowed as property drawer key, including “:” itself (so it is not really a delimiter). The real delimiter is a space character, so in a drawer like
:PROPERTIES:
::k:ey:: value
:END:
“:k:ey:” is a key with value “value”.
Allow comments above property drawer.
More flexible LaTeX environments (Lucas V. R).
Handle #+bibliography:
as metadata so that it can work with --citeproc
.
Parse #+print_bibliography:
as Div with id refs
.
Allow multiple #+bibliography:
.
Markdown reader:
Docx reader:
citations
extension for docx reader (#7840). When enabled, Zotero, Mendeley, and EndNote citations embedded in a docx are parsed as native pandoc citations. (When disabled, the generated citation text and bibliography are passed through as regular text.) The bibliography generated by the plugin is suppressed. Instead, bibliographic data embedded in citation items is added to the references
metadata field so that it can be used with --citeproc
.Docbook writer:
<xref>
elements. DocBook processors will generate appropriate cross-reference text when presented with an xref element.Docx writer:
Ipynb writer:
--
when smart
enabled), so now we use the plain writer.LaTeX writer:
\CSLRightInline
(#7932).scrreport
to chaptersClasses
(#6168, ivardb).page
,trim
,clip
attributes on images (#7181).()
after booktabs rules (#8001). These commands take optional arguments with () and [], which can lead to problems if the content of the table cell begins with these characters.RST writer:
HTML writer: performance improvements.
Org writer:
Markdown writer:
gfm_auto_identifiers
extension is set (#7941).\
. We now escape \
only if raw_tex
is enabled or it is followed by a non-alphanumeric.JATS writer:
<etal/>
(Albert Krewinkel). Citeproc adopted the BibTeX convention to use the author name “others” when there are additional authors that are not named. JATS uses the <etal>
element for this.element_citations
extension enabled, the references were put in a doubly-nested ref-list element (<ref-list><ref-list>...
).EPUB writer: refactor for clarity (#7991, Jonathan Dönszelmann, Ola Wolska, Ivar de Bruin, Jaap de Jong).
Custom writer (Albert Krewinkel):
Text.Pandoc.Logging: add CouldNotParseIncludeFile
constructor for LogMessage
[API change].
Text.Pandoc.Shared:
ordNub
as alias for nubOrd
from containers package (#7963, Albert Krewinkel).ensureValidXmlIdentifiers
. This function changes identifiers that don’t start with letters, and internal links to these identifiers, making them compatible with XML standards. The change is simple: we add id_
to the front. There is potential for duplication if there are already id_...
identifiers defined, but this seems rare enough not to worry too much about.Ensure that valid XML identifiers are used in Docbook, EPUB, FB2, HTML4, S5, Slidy, Slideous, ICML, ODT, TEI writers. Thus, if you convert [anchor]{#1} and [link to](#1)
, id_1
will be used instead of 1
for the identifier.
Lua (Albert Krewinkel).
pandoc.layout
to format and layout text.filter
, map
, and find_if
. These previously required the argument to be of type function
, which was too restrictive.Inlines
instead of List
.Sources
to pandoc.read
(#8002).Text.Pandoc.PDF:
wkhtmltopdf
as default pdf engine for HTML (Albert Krewinkel).Text.Pandoc.MediaBag: improve detection of absolute paths (#7881).
Text.Pandoc.Extensions:
raw_tex
extension from list of commonmark extensions, and from the commonmark_x
defaults. commonmark doesn’t parse raw TeX, and it doesn’t make sense to write it if we don’t parse it.native_divs
from allowed gfm extensions (#7965). This allows <div>
to be suppressed using -raw_html
. Previously native_divs
was enabled but could not be suppressed, because it was not in the list of available extensions for commonmark-based formats.Text.Pandoc.Parsing:
Partition module into (internal) submodules (#7962, Albert Krewinkel).
Unify grid table parsing (#7971, Albert Krewinkel). Grid table parsing in Markdown and RST are updated use the same functions. Functions are generalized to meet requirements for both formats. This change also lays the ground for further generalizations in table parsers, including support for advanced table features. [API change] in Text.Pandoc.Parsing:
tableWith'
and gridTableWith'
are now a mf TableComponents
instead of a quadruple of alignments, column widths, header rows and body rows.tableWith'
, TableComponents
, TableNormalization
, toTableComponents
, toTableComponents'
.Text.Pandoc.XML.Light: add versions of the parsers that allow specifying a custom entity map. Exports new functions: parseXMLElementWithEntities
, parseXMLContentsWithEntities
[API change].
Text.Pandoc.Writers.GridTable: improve module documentation (Albert Krewinkel).
Text.Pandoc.Parsing.GridTable: simplify column handling code (Albert Krewinkel).
Text.Pandoc.MIME: Add mime type for mkv extension (#7181).
Text.Pandoc.Asciify: Fix regression with ascii_identifiers
and Turkish undotted i (#8003).
Relax upper bound for hslua, allow hslua-2.2. (#7929) Lua 5.4 is used by default after this is merged. Packagers may still include Lua 5.3 instead by building pandoc with --constraint='hslua <2.2'
. Differences between 5.3 and 5.4 should not generally affect pandoc Lua filters. See list of incompatible changes here: https://www.lua.org/manual/5.4/manual.html#8.1
JATS template: allow multiple licenses (Albert Krewinkel).
LaTeX template:
\babelprovide
if babel-lang
is empty (#7945) to avoid an error.\usepackage{hyperref}
to their header-includes to make it available there. (The redundant \usepackage
will do no harm in this case.)\sout
. This used to be necessary to avoid problems with hyperref, when headings contain strikeout text, but it does not seem to be necessary any more (tested).Tests: improve location reporting of failing tests (Albert Krewinkel).
Add tests for idempotency of makeSections
(#7950).
Add armhf support in linux build script (#7944, Tony).
Use latest pandoc-types, so that toJSONFilter will work with Meta and MetaValue.
Use latest doclayout, texmath, commonmark, citeproc.
INSTALL.md: add reference to install via winget (#7951, Guriy Samarin).
MANUAL.txt:
smart
works for html input.--self-contained
does not work with --mathjax
(#682).doc/org.md: remove obsolete citations section. This mostly described citation formats we no longer support.
doc/lua-filters.md: Fix typo (#7981, Mario Lang).
Makefile: Use cabal for default build
Add lua53
cabal flag. It is false by default. If set to true, compile with hslua 2.1 and Lua 5.3, otherwise hslua 2.2 and Lua 5.4.
Fix regression in 2.17.1 which caused problems finding default files in the default user data directory. (Reverts the item “logic bug in fullDefaultsPath
”, which was misguided.)
Sample custom writer: use single quotes for strings (#7487, Albert Krewinkel).
Support pagedjs-cli
as pdf engine (#7838, Albert Krewinkel). PagedJS is a polyfill and supports the Paged Media standards by the W3C. https://www.pagedjs.org/
CommonMark reader: fix source position after YAML metadata (#7863).
LaTeX reader:
Remove retokenizing in rawLaTeXParser
.
Ensure that \raggedright
doesn’t gobble an argument (#7757).
Improve descItem
. For some reason we were skipping arbitrary blocks before \item
. This is now changed to “skip whitespace and comments.”
Improve handling of \newif
. Adding a pair of braces around the second argument of \def
prevents LaTeX from an emergency stop on input like the following (#6096).
\newif\ifepub
\epubtrue
\ifepub
hi
\fi
Docx reader: Parse both Zotero citation and bibliography as FieldInfo
(#7840).
LaTeX writer:
Markdown writer: handle explicit column widths with pipe tables (#7847). If a table has explicit column width information and the content extends beyond the --columns
width, we need to adjust the widths of the pipe separators to encode this width information.
Docx writer: Separate tables even with RawBlocks between (#7224, Michael Hoffmann). Adjacent docx tables need to be separated by an empty paragraph. If there’s a RawBlock between tables which renders to nothing, be sure to still insert the empty paragraph so that they will not collapse together.
Man writer: use custom font V for inline code (#7506). The V font is defined conditionally, so that it renders like CB in output formats that support that, and like B in those that don’t (e.g. the terminal). Aliases also defined for VI, VB, VBI.
Asciidoc writer: Support checklists in asciidoctor writer (#7832, Nikolai Korobeinikov, ricnorr). The checklist syntax (similar to task_list
in markdown) seems to be an asciidoctor-only addition.
HTML writer:
code { whitespace: pre-wrap; }
, spurious line breaks could be introduced into inline code (#7858).Custom writer: preserve order of element attributes (#7489, Albert Krewinkel). Attribute key-value pairs are marshaled as AttributeList, i.e., as a userdata type that behaves both like a list and a map. This allows to preserve the order of key-value pairs.
Switch to hslua-2.1 (Albert Krewinkel). This allows for some code simplification and improves stability.
Don’t read files outside of user data directory (Even Brenden). If a file path does not exist relative to the working directory, and it does exist relative to the user data directory, but outside of of the user data directory, do not read it. This applies to readDataFile
and readMetadataFile
in PandocMonad and, by extension, any module that uses these by passing them relative paths.
Text.Pandoc.Class.makeCanonical
: Correctly handle consecutive “..”s at the beginning of a path (Even Brenden). Prior to this commit, ../../file
would evaluate to file
, when it should be unchanged.
Search for metadata files in $DATADIR/metadata
(#7851, Even Brenden). If files specified with --metadata-file
are not found in the working directory, look in $DATADIR/metadata
(#5876).
Text.Pandoc.Class: export readMetadataFile
[API change] (#5876).
Text.Pandoc.Error: export new PandocCouldNotFindMetadataFileError
constructor for PandocError
[API change] (#5876).
Avoid putting a frame around speaker notes in beamer (#7857). If speaker notes (a Div with class ‘notes’) occur right after a section heading, but above slide level, the resulting \note{..}
caommand should not be wrapped in a frame, as that will cause a spurious blank slide.
CSS in HTML template: adjust #TOC and h1 on mobile (#7835, Mauro Bieg).
Text.Pandoc.Readers.LaTeX.Parsing: don’t export totoks
. Make the first param of tokenize
a SourcePos instead of SourceName, and use it instead of totoks
.
Text.Pandoc.Shared: Modify stringify
so it ignores [Citation]
inside Cite
(#7855). Otherwise we’ll sometimes get two copies of things, one from the citationPrefix
or citationSuffix
and another from the embedded fallback text. When there is no fallback text, we’ll get no content. However, it really isn’t an alternative to just rely on the result of running query
on the embedded Citation
s; this will result in a jumble of text rather than anything structured.
Omit --enable-doc
in the cabal haddock invocation in tools/build-and-upload-api-docs.sh
.
Text.Pandoc.App.Opt: fix logic bug in fullDefaultsPath
. Previously we would (also) search the default user data directory for a defaults file, even if a different user data directory was specified using --data-dir
. This was a mistake; if --data-dir
is used, the default user data directory should not be searched.
Text.Pandoc.Shared: defaultUserDataDir
behavior change (#7842). If the XDG data directory is not defined (e.g. because it’s not supported in the OS or HOME isn’t defined), we return the empty string instead of raising an exception.
Update command tests to distinguish stderr and test exit status.
MANUAL: add that speaker notes can be used with beamer (#7856).
Update build-and-upload-api-docs.sh
.
Document --trace
option. Document no-check-certificate
in defaults files. Document ‘sandbox’ option for defaults files. (#7873).
Fix pattern syntax in sample readability custom reader.
doc/custom-readers.lua: add example for “readable HTML.”
Fix message in man page about where code can be found.
manfilter.lua
: remove extra indent in table cells with code blocks.
Fix lua-filters documentation for table column widths (#7864).
epub.doc: Update links to KindleGen (#7846, Benson Muite, Mauro Bieg). KindleGen has been deprecated and we need to link to archived versions.
Use tables in defaults files documentation, so each default option is paired with the corresponding command-line option (Carsten Allefeld).
Use skylighting 0.12.2.
Add pandoc-lua-marshal to Nix shell (#7849, Even Brenden).
Require pandoc-lua-marshal 0.1.3.1 (#7831, Albert Krewinkel). Fixes a problem with List.includes
and List.find
that caused a Lua stackoverflow and subsequent program crash.
HTML template: load header-includes before math (#7833, Kolen Cheung). MathJax expect the config comes before loading the MathJax script. This change of order allows one to config MathJax via header-includes, which loads before the MathJax script. Cf. #2750.
When reading defaults file, stop at a line ...
. This line signals the end of a YAML document. This restores the behavior we got with HsYaml. yaml complains about content past this line. See https://github.com/jgm/pandoc/issues/4627#issuecomment-1012438765
Text.Pandoc.Citeproc: allow notes-after-punctuation
to work with numerical styles that use superscripts (e.g. american-medical-association.csl), as well as with note styles. The default setting of notes-after-punctuation
is true for note styles and false otherwise. This restores a behavior of pandoc-citeproc that wasn’t properly carried over to Citeproc (#7826, cf. jgm/pandoc-citeproc#384).
Use commonmark-pandoc 0.2.1.2 (#7769).
Add FAQ on images in ipynb containers (#7749, Kolen Cheung).