You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, components of tables (Cell, Row, TableBody, etc) cannot be used in element filters. The distinction between a typed Pandoc object and an "element component" isn't entirely clear from the Lua filter manual, so I was initially confused when filter functions for Cell did not run.
Making table components behave consistently with other elements was mentioned in #7718 (comment). This would be an excellent enhancement. Almost all current "element components" relate to tables. It would be great to have these be first-class citizens in the object model.
The text was updated successfully, but these errors were encountered:
One unclear point: how do we include that in the classical filters, where element processing is grouped by type (Inline -> Block -> Meta -> Pandoc). Maybe insert an "other" type somewhere in there.
The super simple take is that Table is a block element, so its structural components are too.
With a bit more nuance: if the primary difference between blocks and inlines is that inlines can only contain other inline content, whereas blocks can contain either block or inline content (as the API doc implies), then:
Cell, Row, TableHead, TableBody, and TableFoot would be block elements
Caption would be an inline element
ColSpec doesn't fit in neatly, but describes the table so should probably run with it (as a block element)
An "other" type is certainly possible. Would it offer any benefit?
I took a stab at that but was dissatisfied with the added complexity when doing this in Haskell. But I wrote a Lua library that can do that (and a few other things): jog.
Currently, components of tables (
Cell
,Row
,TableBody
, etc) cannot be used in element filters. The distinction between a typed Pandoc object and an "element component" isn't entirely clear from the Lua filter manual, so I was initially confused when filter functions forCell
did not run.Making table components behave consistently with other elements was mentioned in #7718 (comment). This would be an excellent enhancement. Almost all current "element components" relate to tables. It would be great to have these be first-class citizens in the object model.
The text was updated successfully, but these errors were encountered: