Table Drawing Research

Table engine output experimentation

Overview

Tables built in {gtsummary} typically use {gt} functions to draw and render tables in different output formats. As a result, not all table customization translated correctly. This repo is used to experiment and identify potential adaptions to {gt} functions to maintain as much of the table decoration as possible when exporting to other formats. Currently exploring: HTML, PDF (with and without Typst), and Word (.docx) outputs.

Below is the sample {gtsummary} table with notable customizations (footnotes, headers, titles, linebreaks, indentations, etc.) we are tracking.

This is the caption
[Used for cross referencing in Quarto; but I don’t think a footnote can be attached]

This is the Title
with a linebreak

1
This is the Subtitle2

Spanning Level 2

Characteristic
    Indented Header

4

Both Treatments

Spanning Level 1

3

Overall

Drug A
Manual Line Break

Drug B
Manual Line Break

Age
  linebreak in a cell

5
47 (38, 57) 46 (37, 60) 48 (39, 56)
      

Unknown

11 7 4

Grade




  

I

68 (34%) 35 (36%) 33 (32%)
  

II

68 (34%) 32 (33%) 36 (35%)
  

III

64 (32%) 31 (32%) 33 (32%)
      

Unknown

0 0 0
This is Source Note 1
This is Source Note 2
Abbreviations: Q1 = First Quartile; Q3 = Third Quartile
1 Footnote in Title
2 Footnote in Subtitle
3 Footnote in Spanning Header
4 Footnote in Header
5 Footnote in Body