21 col width@main#22
Conversation
| ``` | ||
|
|
||
| [Preview the Output](outputs/pdf/col_widths_qmd_pdf.pdf) | ||
| - column width applied but the table is cut off if it doesn't fit in the page |
There was a problem hiding this comment.
can you update the widths using gt::pct() so they don't flow over the page? We just want to know if the Word and PDF outputs respect the specified widths.
There was a problem hiding this comment.
done! The results in the exported docs seem to be the same as the ones with the px() function.
|
The home page has a github icon, but when we click it, it does not direct to the GH page. Can you update that? |
|
|
||
| library(gtsummary) | ||
| tbl <- gtsummary::tbl_summary(gtsummary::trial, by = trt, include = c(age, grade), missing = "always", label = list(age = "Age \n\U00A0\U00A0linebreak in a cell")) |> add_overall() | ||
| gt_table <- tbl$table_body |> |
There was a problem hiding this comment.
What does the table look like if instead of tbl$table_body we used as_tibble(cols_label=FALSE)?
There was a problem hiding this comment.
I changed it so that it's just modifying the gtsummary table converted to gt with as_gt()
| gt::tab_header(gt::md("This is the Title \nwith a linebreak"), subtitle = "This is the Subtitle") |> | ||
| gt::cols_width(everything() ~ px(200)) #apply a 200 px width to all columns | ||
| ``` | ||
|
|
There was a problem hiding this comment.
I think it would be helpful to print the table here that we're exporting to Word and PDF. Then we know what the goal is. Can you make that change in all the sections?
There was a problem hiding this comment.
Great point! I've updated all the pages so that first chunk of code is evaluated and the table is displayed in the html output.
… adjust column width. Reorder docs 11 and 12
|
I think there are too many conflicts here. What do you think it is best to do @ayogasekaram? |
Merge branch 'main' into 21_col_width@main # Conflicts: # 01_line_breaks.qmd # 02_indentation.qmd # 03_spanning_header.qmd # 04_footnotes.qmd # 05_source_notes.qmd # 06_titles.qmd # 07_alignment.qmd # 08_text_styling.qmd # 09_tbl_too_long.qmd # 10_tbl_too_wide.qmd # _quarto.yml # _site/outputs/docx/col_widths_gt_word.docx # _site/outputs/docx/col_widths_qmd_word.docx # _site/outputs/docx/col_widths_rmd_word.docx # _site/outputs/pdf/col_widths_gt_pdf.pdf # _site/outputs/pdf/col_widths_qmd_pdf.pdf # _site/outputs/pdf/col_widths_rmd_pdf.pdf # docs/01_line_breaks.html # docs/02_indentation.html # docs/03_spanning_header.html # docs/04_footnotes.html # docs/05_source_notes.html # docs/06_titles.html # docs/07_alignment.html # docs/08_text_styling.html # docs/09_tbl_too_long.html # docs/10_tbl_too_wide.html # docs/12_other_engines.html # docs/index.html # docs/search.json
closes #21