From 347985fb839745b0fb746dc33474ecbbff0f3d58 Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger <285675+cscheid@users.noreply.github.com> Date: Mon, 3 Jun 2024 09:52:53 -0700 Subject: typst,table - support '.typst:no-figure' and 'typst:figure:kind=kind' (#9778) 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. --- doc/typst-property-output.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/typst-property-output.md b/doc/typst-property-output.md index ab0d5a916..112c82afc 100644 --- a/doc/typst-property-output.md +++ b/doc/typst-property-output.md @@ -96,6 +96,14 @@ The following Pandoc AST elements are currently supported. More may be supported : The table is wrapped in a Typst [text element](https://typst.app/docs/reference/text/text/) with `prop` as one of its parameters. + `typst:no-figure` + + : By default, Pandoc will wrap the table in a Typst [figure element](https://typst.app/docs/reference/model/figure/). If this attribute is set, only the table element itself will be emitted. This avoids Typst's crossreference counter of kind `table` from being incremented. + + `typst:figure:kind` + + : If this attribute is set, Pandoc will wrap the table in a Typst [figure element](https://typst.app/docs/reference/model/figure/) with the specified `kind` attribute. This is useful for tables that should be cross-referenced as something other than `Table ...` in the document. Typst will use the `kind` attribute to increment the corresponding counter: `raw` and `image`. + - Table [Cell](https://pandoc.org/lua-filters.html#type-cell) `typst:prop` @@ -151,4 +159,4 @@ will produce the Typst output Here is some #text(fill: orange)[orange text]. ``` -Of course, this simple filter will only work for Typst's [predefined colors](https://typst.app/docs/reference/visualize/color/#predefined-colors). A more complete filter would need to translate the value as well. \ No newline at end of file +Of course, this simple filter will only work for Typst's [predefined colors](https://typst.app/docs/reference/visualize/color/#predefined-colors). A more complete filter would need to translate the value as well. -- cgit v1.2.3