pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
600 stars 165 forks source link

list-table and pandoc-crossref #236

Open anghyflawn opened 2 years ago

anghyflawn commented 2 years ago

Thanks to the maintainers of list-table, which is making my life a lot easier! However, as far as I can see it is not interoperable with pandoc-crossref: putting an id on the list-table div

::: {.list-table #tbl:test}
Test caption

* - a
   - b
* - c
   - d
:::

does not generate a reference, whilst putting an id at the end of the caption (as is usual for pandoc-crossref)

::: {.list-table}
Test caption {#tbl:test}

* - a
   - b
* - c
   - d
:::

does not work, because the filter just returns the whole paragraph as a Plain block (so {#tbl:test} actually gets printed as part of the caption). Unfortunately I don't understand the internals of pandoc-crossref well enough to fix the filter, but if this were possible that would be hugely helpful. Thanks!