rstudio / gt

Easily generate information-rich, publication-quality tables from R
https://gt.rstudio.com
Other
2.03k stars 208 forks source link

Add `as_typst()` function to support styled tables in `typst` Quarto output format #1500

Open elipousson opened 11 months ago

elipousson commented 11 months ago

Prework

Proposal

This may be premature given that the typst format is pre-release but I figured I'd offer the suggestion now that a as_typst() function that supports or enables custom table formatting when using the typst Quarto output format could be a great addition.

Some background via the Quarto documentation:

Quarto v1.4 includes support for the typst output format. Typst is a new open-source markup-based typesetting system that is designed to be as powerful as LaTeX while being much easier to learn and use.

The Quarto repo already has a related issue for incorporating the typst-tablex library for table formatting: https://github.com/quarto-dev/quarto-cli/issues/6811 Not sure if that would make a as_typst() function unnecessary or if the two could work in concert.

andrie commented 9 months ago

It seems to me that this typst package is going to be relevant for this work: https://github.com/typst/packages/tree/main/packages/preview/tablex/0.0.8

sda030 commented 7 months ago

Updates to Typst's included table formatting on the way: https://staging.typst.app/docs/changelog

olivroy commented 4 months ago

I think this is resolved natively with Quarto 1.5 (just released last week) https://quarto.org/docs/blog/posts/2024-07-02-beautiful-tables-in-typst/

roaldarbol commented 3 months ago

I'd just add that for some workflows, the native Quarto solution doesn't solve the issue - I usually save my tables to also incorporate them into other LaTeX documents (mytable |> gtsave("mytable.tex"). It would definitely be great to be able to export a Typst table. Hopefully the native conversion may aid that, but I don't think the issue is resolved yet.