Commit Graph
506 Commits
Author SHA1 Message Date
John MacFarlane dec0455725 Use released version of texmath. 2022-04-02 11:21:36 -07:00
John MacFarlane 7ac72fd549 Use released pandoc-types 1.22.2. 2022-04-02 10:13:58 -07:00
John MacFarlane 63de34481a stack.yaml - remove redundant clause for doclayout. 2022-03-30 14:09:40 -07:00
John MacFarlane ac2bf2f372 Use latest dev doclayout, pandoc-types 2022-03-30 13:19:06 -07:00
John MacFarlane f2eb52ad80 Use current dev versions of citeproc, doclayout. 2022-03-23 13:51:14 -07:00
John MacFarlane 5fdcb36c80 Use latest dev citeproc. 2022-03-23 08:52:47 -07:00
John MacFarlane e2d05626fc Use latest dev texmath. 2022-03-20 11:51:31 -07:00
John MacFarlane d128f5ee15 Depend on latest dev texmath. 2022-03-12 10:23:55 -08:00
John MacFarlane d523eca3d3 Use dev version of pandoc-types.
This allows toJSONFilter to work with Meta and MetaValue.
2022-03-11 10:23:06 -08:00
John MacFarlane f387d9bcd6 Use latest dev commonmark-extensions.
Closes #7942.
2022-02-27 22:42:38 -08:00
John MacFarlane 0ae7b1e1f8 Update texmath version to build against. 2022-02-24 08:54:16 -08:00
John MacFarlane ba337866e4 Use latest dev texmath. 2022-02-23 10:00:38 -08:00
Albert Krewinkel a3117bc142 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>
2022-02-19 11:26:18 -08:00
John MacFarlane 2a70d9c3c5 Require skylighting 0.12.3. 2022-02-18 12:00:39 -08:00
Albert Krewinkel 910296b745 Lua: Use pandoc-lua-marshal 0.1.5.
-   Allow any type of callable object as argument to List
    functions `filter`, `map`, and `find_if`. These previously
    required the argument to be of type `function`, which was too
    restrictive.

-   Inline: the type of Image captions is now `Inlines` instead
    of `List`.
2022-02-17 16:00:20 +01:00
John MacFarlane 139bcb9614 Use latest dev commonmark-extensions. 2022-02-13 13:33:54 -08:00
John MacFarlane 495ae605e3 Use latest dev commonmark, commonmark-extensions. 2022-02-13 12:47:51 -08:00
John MacFarlane 4b1cddd292 Depend on latest commonmark.
This resolves an issue with commonmark_x's support of
strikeout.
2022-02-12 15:31:06 -08:00
Albert Krewinkel 49f1e7608e Lua: add module pandoc.layout to format and layout text 2022-02-06 16:01:24 -08:00
John MacFarlane 54279149ab Use unreleased citeproc. 2022-02-03 07:37:13 -08:00
Albert Krewinkel 412596c30b Switch to hslua-2.1
This allows for some code simplification and improves stability.
2022-01-29 08:43:14 -08:00
John MacFarlane 89c8f2866e Use skylighting 0.12.2. 2022-01-19 15:44:27 -08:00
John MacFarlane 7f4907b2ce Use commonmark-pandoc 0.2.1.2.
Fixes #7769.
2022-01-14 10:07:06 -08:00
John MacFarlane a8be26b43d Add pandoc-lua-marshal-0.1.3.1 to stack.yaml 2022-01-14 10:07:01 -08:00
John MacFarlane c9d309d84b Use commonmark-extensions 0.2.3. 2022-01-12 09:58:45 -08:00
John MacFarlane ed3690afcd Use ipynb 0.2. 2022-01-12 00:09:16 -08:00
John MacFarlane a416a2f243 Use citeproc 0.6.0.1. 2022-01-11 23:52:57 -08:00
John MacFarlane a30b29624e Use latest texmath (0.12.4). 2022-01-11 19:19:27 -08:00
John MacFarlane 33da5833de Update commits for dev dependencies, allow text 2.0. 2022-01-09 15:30:22 -08:00
John MacFarlane 1dab8e57d3 Use dev version of citeproc. 2022-01-09 12:09:01 -08:00
Albert Krewinkel 13740c4543 stack.yaml: add missing hslua-aeson entry to extra-deps 2022-01-01 17:02:07 +01:00
John MacFarlane 2811468016 Use latest commonmark-hs.
This allows a bare-word class attribute on fenced divs,
as pandoc's Markdown reader now does.
2021-12-30 21:26:30 -08:00
Albert Krewinkel fae63b09bb Lua: use released pandoc-lua-marshal-0.1.3.
Inlines, Blocks, and List objects now have an `__eq` metamethod, testing
equality by comparing two lists element-wise.
2021-12-23 16:04:35 +01:00
Albert Krewinkel 17a32a99a5 Lua: simplify and deprecate function pandoc.utils.equals
The function is no longer required for element comparisons; it is now an
alias for the `==` operator.
2021-12-21 19:01:11 +01:00
John MacFarlane 8734057dff Put sourcepos attribute on header, not enclosing div...
with `-f commonmark+sourcepos`.

Closes #7769.
2021-12-21 09:55:17 -08:00
Albert Krewinkel a0af1b5926 Lua: change representation of TableHead, TableFoot, and Row values.
The objects now also follow the principle that element attributes are
accessible through the `.attr` field. Rows in `TableHead` and
`TableFoot` are available via the `.rows` field. Row objects have a
`.cells` field, containing the list of table cells.

Closes: #7718
2021-12-19 09:44:56 +01:00
John MacFarlane bc947a4496 Use latest doctemplates, commonmark-extensions in stack.yaml. 2021-12-18 09:49:09 -08:00
John MacFarlane 6303952623 Use dev texmath. 2021-12-14 22:22:09 -08:00
Albert Krewinkel b79bf192ec Lua: support topdown traversals
The traversal order of filters can now be selected by setting the key
`traverse` of the filter to either `'topdown'` or `'typewise'`; the
default remains `'typewise'`.

Topdown traversals can be cut short by returning `false` as a second
value from the filter function. No child-element of the returned element
is processed in that case.
2021-12-13 08:52:19 -08:00
Albert Krewinkel 3e7b46af64 Switch to released pandoc-lua-marshal-0.1.2
Cell values are now marshaled as userdata objects; a constructor
function for table cells is provided as `pandoc.Cell`.
2021-12-10 17:24:50 +01:00
Albert Krewinkel fa643ba6d7 Lua: update to latest pandoc-lua-marshal (0.1.1)
- `walk` methods are added to `Block` and `Inline` values; the methods
  are similar to `pandoc.utils.walk_block` and
  `pandoc.utils.walk_inline`, but apply to filter also to the element
  itself, and therefore return a list of element instead of a single
  element.

- Functions of name `Doc` are no longer accepted as alternatives for
  `Pandoc` filter functions. This functionality was undocumented.
2021-12-09 09:22:29 -08:00
John MacFarlane 8215ca081d Use latest dev version of ipynb.
This should give us deterministic JSON output for mime bundles.
2021-12-08 08:55:26 -08:00
John MacFarlane 51142c6803 Ipynb reader & writer: properly handle cell "id".
This is passed through if it exists (in Nb4); otherwise
the writer will add a random one so that cells all have
an "id".

Closes #7728.
2021-12-06 23:40:51 -08:00
John MacFarlane 928c120806 Allow unicode-transforms 0.4.0. 2021-12-02 09:00:33 -08:00
Albert Krewinkel c5287e9de5 stack.yaml: use pandoc-lua-marshal-0.1.0.1 2021-11-28 16:19:34 +01:00
Albert Krewinkel 3692a1d1e8 Lua: use package pandoc-lua-marshal (#7719)
The marshaling functions for pandoc's AST are extracted into a separate
package. The package comes with a number of changes:

  - Pandoc's List module was rewritten in C, thereby improving error
    messages.

  - Lists of `Block` and `Inline` elements are marshaled using the new
    list types `Blocks` and `Inlines`, respectively. These types
    currently behave identical to the generic List type, but give better
    error messages. This also opens up the possibility of adding
    element-specific methods to these lists in the future.

  - Elements of type `MetaValue` are no longer pushed as values which
    have `.t` and `.tag` properties. This was already true for
    `MetaString` and `MetaBool` values, which are still marshaled as Lua
    strings and booleans, respectively. Affected values:

      + `MetaBlocks` values are marshaled as a `Blocks` list;

      + `MetaInlines` values are marshaled as a `Inlines` list;

      + `MetaList` values are marshaled as a generic pandoc `List`s.

      + `MetaMap` values are marshaled as plain tables and no longer
        given any metatable.

  - The test suite for marshaled objects and their constructors has
    been extended and improved.

  - A bug in Citation objects, where setting a citation's suffix
    modified it's prefix, has been fixed.
2021-11-27 17:08:01 -08:00
John MacFarlane 06eb889e92 Use released texmath. 2021-11-20 15:18:19 -08:00
John MacFarlane 3ac7deadce Use latest dev texmath. 2021-11-16 21:47:27 -08:00
Albert Krewinkel 327bdd66b6 stack.yaml: require latest lpeg 2021-11-08 16:04:10 +01:00
Albert Krewinkel a1b6bf69f2 Lua: include lpeg module (#7649)
Compiles the 'lpeg' library (Parsing Expression Grammars For Lua) into
the program.

Package maintainers may choose to rely on package dependencies to make
lpeg available, in which case they can compile the with the constraint
`lpeg +rely-on-shared-lpeg-library`.
2021-11-04 19:25:29 -07:00