It is supposed to replace emojis with their aliases,
but previously this only worked when the emojis were
in a specially marked span.
Note that this change doesn't affect `commonmark` (or `gfm`)
because the relevant code is in commonmark-hs. This will also
need updating.
See #9876.
- Turn captioned images into Figure elements. Closes#9391.
- Improve the logic for associating elements with captions.
Closes#9358.
- Ensure that captions that can't be associated with an
element aren't just silently dropped. Closes#9610.
...with width/height. That was a mistaken call in #6936.
Usually when these values disagree, it is because the image
has been resized by a tool that leaves the original exif values
the same, so the width/height metadata are more likely to be
correct that exif width/height.
Closes#9871.
...and only include it if `english` or `german` is used.
Since 3d8f011, the babel language is not specified as a
class option any more; so now we need to explicitly specify
the language option when we load `selnolig`. Only `german`
and `english` are valid, so we construct the variable
`selnolig-langs` in the writer and include `selnolig` if it
is nonempty.
This should restore proper ligature suppression when
lualatex is used.
Closes#9863. Supersedes #9864.
Thanks to @fkohrt for the initial fix.
The function allows to specify a template with the same argument value
that would be used with the `--template` command line parameter.
Closes: #9854
Co-authored-by: Carsten Gips <cagix@hsbi.de>
The state is an internal value and should be treated as such. The
`PANDOC_STATE` global is merely a copy; unsetting the global no longer
breaks the Lua engine.
Pandoc used to emit a `header` class on the `tr` element that forms the table header. This is no longer needed, because `head > tr` will do the same thing.
Similarly, pandoc used to emit `even` and `odd` classes on `tr`s, allowing striped styling. This is no longer needed, because one can use e.g. `tbody tr:nth-child(2n)`.
We now omit these classes, which have a good chance of conflicting with classes used for other things.
Closes#9325.
The default is now to use a *copy* of the global environment when running a
filter; this ensures better separation when `run_lua_filter` is used multiple
times. A custom environment can be specified via the optional third parameter.
Task lists are now properly formatted, with no bullet.
In addition, we have removed an expensive generic traverse to
remove Space elements, and replaced it with code in
`inlinesToOpenXML`. This should give better performance; it
also reduces XML size in the metadata, which wasn't previously
affected by the de-Spacing.
TODO: parse this in the reader so that we can have task lists round-trip.
Closes#5198.
This extends support for fine-grained properties in Typst.
If the `typst:no-figure` class is present on a Table, the table will not be placed in a figure.
If the `typst:figure:kind` attribute is present, its value will be used for the figure's `kind`.
These features are documented in `doc/typst-property-output.md`.
Closes#9777.
OpenXML doesn't have a way of indicating column alignments, but
we guess them by looking at the justification property on the
first paragraph of a cell, if there is one.
We take the column alignments from the first body row.
Closes#8551.
Lists created by `pandoc.json.decode` now behave like lists generated
via `pandoc.List`. This also ensures that `pandoc.List` tables are
encoded as JSON arrays when passed to `pandoc.json.encode`.
Fixes: #9834