rstudio / gt

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

render gt in HTML and PDF results in different styling #1739

Open rwaaijman opened 2 months ago

rwaaijman commented 2 months ago

Quarto book project to HTML and PDF

I'm creating a quarto book project, with 2 different outputs, HTML and PDF

I would like to use one script (.qmd file) to create a gt table, with results in the same styling in HTML and PDF.

At the moment they look different. Is there a function which I can use that manage this?

example

PDF pdf

HTML html

salim-b commented 1 month ago

Depends on https://github.com/rstudio/gt/issues/1625.

olivroy commented 1 month ago

It is a bit more complex than that. It seems that Quarto will not alter table styling by default. Can't find the proper documentation, but this thread has a few details https://github.com/quarto-dev/quarto-cli/issues/6945