Merck / r2rtf

Easily Create Production-Ready Rich Text Format (RTF) Table and Figure

Home Page:https://merck.github.io/r2rtf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using `cell_justification` provide unexpected results with `page_by`.

fb-elong opened this issue · comments

example

tbl %>% 
      rtf_body(
        border_top = "single", 
        border_bottom = "single",
        text_font = 4,
        cell_justification = c("c", "l", rep("c", ncol(tbl) - 2)),
        text_color = c(rep("white", 2), rep("black", ncol(tbl) - 2)),
        col_rel_width = c(1, rel_width),
        text_background_color = c(rep("royalblue4", 2), rep("white", ncol(tbl) - 2)), 
        page_by = "group"
    ) %>% 
rtf_encode() %>% 
write_rtf("tmp.rtf")

The issue can be resolved by changing cell_justification to text_justification