ANN: pandoc 2.14

8 views
Skip to first unread message

John MacFarlane

unread,
May 29, 2021, 2:00:28 AM5/29/21
to pandoc-...@googlegroups.com, pandoc-...@googlegroups.com

I'm pleased to announce the release of pandoc 2.14,
available in the usual places:

Binary packages & changelog:
https://github.com/jgm/pandoc/releases/tag/2.14

Source & API documentation:
http://hackage.haskell.org/package/pandoc-2.14 [*]

[*] As I write this, Friday evening May 28, Hackage is down for
service, so I haven't been able to upload the package
yet. But when I do, it will be available at the link above.


Some highlights of the user-facing changes:

* Pandoc's text-format parsers are now aware of the file from which
each part of the source comes. That means better error messages,
more accurate source positions, and the possibility of resolving
relative paths (for includes and images) relative to the file
containing them, rather than the working directory. (See below on
the rebase_relative_paths extension.

* New extension rebase_relative_paths, which can optionally be
enabled for markdown and commonmark readers (including gfm). When
enabled, this extension rewrites relative image and link paths by
prepending the (relative) directory of the containing file. This
behavior is useful when your input sources are split into multiple
files, across several directories, with files referring to images
stored in the same directory. This closes a longstanding issue
(#3752).

* Curly-brace syntax for Markdown citation keys, allowing the use
of citation keys that are not otherwise recognizable by pandoc
due to their use of special characters. Using URLs as citation
keys now becomes feasible (#6026).

* Paths of include files in RST and Org are now properly resolved
relative to the containing file (#5501, #6632).

* The docx reader and writer now supports many new table features,
thanks to Emily Bourke (#6316) and Albert Krewinkel (#6315):
column spans, row spans, multiple header rows, table description
(parsed as a simple caption), captions, column widths.

* The LaTeX reader now has much improved support for siunitx commands,
and for \xspace and \newif.

* The HTML reader now parses <h1> elements as normal headers, even
if they have the class `title`. (Previously these were dropped,
on the assumption that they were recapitulating the metadata
title.) Use --shift-heading-level-by=-1 to turn the <h1> into the
document title, or a filter to restore the previous behavior.

* In beamer output, blocks with the classes 'example' and 'alert'
are now rendered as special exampleblock and alertblock
environments.


This is a major version bump because of some API changes:

* New exported module, Text.Pandoc.Sources. This defines a
type, Sources, that represents a number of chunks of
text labeled with source positions, and a typeclass, ToSources,
whose instances can be converted to Sources. The module also
exports modified versions of parsec Char parsers which take
a Sources as the stream type and automatically update source
positions as it moves through the labeled chunks.

* All of the readers that formerly took a Text parameter are now
polymorphic and can accept any instance of the (new) ToSources
typeclass. Text is an instance, so most current uses of the
readers should work without modification.

* Text.Pandoc.Parsing:
+ All parsers defined on Text as a stream are now defined on Sources.
+ The module also exports all of the modified Char parsers defined in
Text.Pandoc.Sources.
+ The old insertIncludedFileF has been removed, and insertIncludedFile
has been given a more general type, allowing it to be used where
insertIncludedFileF was.
+ The citeKey parser has been given a new parameter, which controls
whether the @{..} syntax is allowed.

* Text.Pandoc.Error: Modified the constructor PandocParsecError to take
a Sources rather than a Text as first argument, so parse error locations
can be accurately reported.

* Text.Pandoc.Extensions: Add constructor Ext_rebase_relative_paths to
Extensions.

* Text.Pandoc.XML.Light: add Eq, Ord instances for Content, Element,
Attr, CDataKind.

* Text.Pandoc.MediaBag:

+ Change MediaBag to use a Text key instead of [FilePath].
+ Export MediaItem type.
+ Change MediaBag type to a map from Text to MediaItem.
+ lookupMedia now returns a MediaItem.

* Text.Pandoc.Class: Remove fetchMediaResource.

* Text.Pandoc.Logging: Add LoadedResource constructor to LogMessage.

* Text.Pandoc.Asciify: export toAsciiText.

* Text.Pandoc.Highlighting: Change type of languagesByExtension,
adding a parameter for a SyntaxMap.

* Remove Text.Pandoc.BCP47 module. Use types and functions from
UnicodeCollation.Lang instead.


In addition, there are many bug fixes and small changes. For
details, see the changelog.

Thanks to everyone who contributed, especially Albert Krewinkel and
new contributors Anti-Distinctlyminty, Charanjit Singh, Emily
Bourke, Julien Dutant, Roman Beránek, Tatiana Porras, badumont,
mbrackeantidot, nuew, obcat, and tecosaur.

John MacFarlane

unread,
May 29, 2021, 12:05:53 PM5/29/21
to pandoc-...@googlegroups.com, pandoc-...@googlegroups.com

> Source & API documentation:
> http://hackage.haskell.org/package/pandoc-2.14 [*]
>
> [*] As I write this, Friday evening May 28, Hackage is down for
> service, so I haven't been able to upload the package
> yet. But when I do, it will be available at the link above.

I'm not sure whether Hackage is actually down. They were
planning to take it down last night, but according to the
status page it is operational.

When I attempt to upload, I get a 413 Request Entity Too Large
error.

Reported here:
https://github.com/haskell/hackage-server/issues/935

Does anyone know anything that might help?

John MacFarlane

unread,
May 29, 2021, 3:47:59 PM5/29/21
to pandoc-...@googlegroups.com, pandoc-...@googlegroups.com

Problem solved. I had to put the tarball on a diet.
Reply all
Reply to author
Forward
0 new messages