jthomasmock / gtExtras

A Collection of Helper Functions for the gt Package.
https://jthomasmock.github.io/gtExtras/
Other
195 stars 27 forks source link

Margins of gt_two_column_layout #92

Closed petermott closed 1 year ago

petermott commented 1 year ago

Question

In Rstudio rmarkdown the output of gt_two_column_layout appears to float the first table to the left and the second to the right. With narrow tables put side-by-side just for comparison this results in a large gap in the middle of the tables: 2023-06-09 11_18_34-Chapter 8 Exercises - Opera

I can fix this by enclosing the rmarkdown code block in HTML tags:

image_2023-06-09_112316945

The result is then: image_2023-06-09_112752398

Is there a way to provide this information to the gt_two_column_layout command?

If not I would like to request this as a feature - something like gt_two_column_layout(tables, margins=c(250,250)

jthomasmock commented 1 year ago

Thanks for the overview!

gt_two_column_layout() is intended to be used with gt_save_extra() for screenshots where you don't have additional controls such as RMarkdown.

You are correct in that other HTML-native mechanisms available for RMarkdown and Quarto can further control the layout of tables in a document. Closing this issue as gt_two_column_layout() is not intended to replace capabilities available for HTML documents.