Skip to content

Conversation

cscheid
Copy link
Collaborator

@cscheid cscheid commented Oct 9, 2025

This adds built-in support to https://github.com/pandoc-ext/list-table. Right now it's a nice-to-have, but it'll be necessary once we move away from grid tables.

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Oct 9, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
Copy link
Collaborator

cderv commented Oct 10, 2025

Cool ! One the support will be in visual editor, this will be really cool to use !

Will this work with cross-ref too? Should we test it now or should we make a note to add support?

I guess the : caption {#id .class key=value} is not the one to use anymore?

Would it be

::: {#tbl-id .list-table widths="0.070833333333333,0.92916666666667" header-rows="1" .borderless}

Also, about widths="0.070833333333333,0.92916666666667", why not use tbl-colwidths that we already use : https://quarto.org/docs/authoring/tables.html#column-widths ?

@cscheid
Copy link
Collaborator Author

cscheid commented Oct 10, 2025

: caption {#id .class key=value} is not the one to use anymore?

Right now I'm just following precisely the syntax for list-table. Those captions should still work as a mechanism for making cross-referenceable tables, but I now realize that I need to switch the order of filters somewhat for that to be the case. Thanks for making me think through it. I'll add tests too.

@cscheid
Copy link
Collaborator Author

cscheid commented Oct 10, 2025

Also, about widths="0.070833333333333,0.92916666666667", why not use tbl-colwidths that we already use : https://quarto.org/docs/authoring/tables.html#column-widths ?

Because widths is syntax from the list-tables.lua filter, and I don't want to remove any of that functionality. With that said, tbl-colwidths will also work. The widths... came from an automated script I have to convert the grid tables to list tables.

We can do move these list tables to tbl-colwidths or not, I'm indifferent.

@cscheid
Copy link
Collaborator Author

cscheid commented Oct 10, 2025

One thing I don't love is that the syntax looks backwards from our fenced div crossref: here, we have caption first, then contents. In fenced-div crossrefs, we have contents, and then caption. We should consider extending the syntax so that both directions work.

That's not good for round-tripping, but I think I'm willing to suffer that cost here.

@cscheid cscheid merged commit 1405db6 into main Oct 10, 2025
51 checks passed
@cscheid cscheid deleted the feature/list-tables branch October 10, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants