问题
How could one add a caption to a flextable rendered to docx? EDIT: The aim is to produce a proper caption which can be referenced within the document to produce a list of tables and inline references.
iris.t <-
iris[1:5,] %>%
regulartable() %>%
style(pr_c = officer::fp_cell(vertical.align = "bottom",
border.bottom = officer::fp_border(width = 2)), part = "header") %>%
rotate(j = names(iris)[-c(1:2)],
rotation = "tbrl", part = "header", align = "bottom") %>%
height(height = max(dim_pretty(., part = "header")$widths), part = "header") %>%
width(width = dim_pretty(.,part = "body")$widths)
iris.t
来源:https://stackoverflow.com/questions/49676982/add-caption-to-flextable-in-docx