This function is based on rtables.officer::tt_to_flextable().
See notes to understand why this is experimental.
tt_to_flextable_j(
tt,
tblid,
theme = theme_docx_default_j(font = "Times New Roman", font_size = 9L, bold = NULL),
border = flextable::fp_border_default(width = 0.75, color = "black"),
indent_size = NULL,
titles_as_header = TRUE,
bold_titles = TRUE,
integrate_footers = TRUE,
counts_in_newline = FALSE,
paginate = FALSE,
fontspec = formatters::font_spec("Times", 9L, 1.2),
lpp = NULL,
cpp = NULL,
...,
colwidths = NULL,
tf_wrap = !is.null(cpp),
max_width = cpp,
total_page_height = 10,
total_page_width = my_pg_width_by_orient(orientation),
autofit_to_page = TRUE,
orientation = "portrait",
nosplitin = character(),
string_map = junco::default_str_map,
markup_df_docx = dps_markup_df_docx,
reduce_first_col_indentation = FALSE,
tlgtype = (utils::getFromNamespace("tlg_type", "junco"))(tt),
col_gap = ifelse(tlgtype == "Listing", 0.5, 3),
pagenum = ifelse(tlgtype == "Listing", TRUE, FALSE),
round_type = formatters::obj_round_type(tt),
alignments = list(),
border_mat = make_header_bordmat(obj = tt)
)a flextable object.
a VTableTree or a listing_df object
Character. Output ID to be displayed in the Title and last line of footer.
(optional) a function factory. See theme_docx_default_j() or rtables.officer::theme_docx_default() for more details.
(optional) an fp_border object.
(optional) Numeric. Not used and set to 9 points internally.
(optional) Default = TRUE.
(optional) Default = TRUE.
(optional) Default = TRUE.
(optional) Default = FALSE.
(optional) Default = FALSE.
(optional) a font_spec object.
(optional) Default = NULL. Not used.
(optional) Default = NULL. Not used.
other arguments.
(optional) Default = NULL.
(optional) Default = FALSE. Not used.
(optional) Default = NULL. Not used.
(optional) Default = 10. Not used.
(optional). No need to be specified by end user. Set to 6.38 ("portrait") or 8.88 ("landscape").
(optional) Default = TRUE. Not used and set to FALSE internally.
(optional) Default = "portrait". One of: "portrait", "landscape".
(optional) Default = character(). Named list.
(optional) Default = default_str_map.
(optional) Default = dps_markup_df_docx.
(optional) Default = FALSE.
(optional). No need to be specified by end user.
(optional). Default = 3 (Tables) or 0.5 (Listings).
(optional). Default = FALSE (Tables) or TRUE (Listings).
("iec" or "sas")
the type of rounding to perform. iec,
the default, performs rounding compliant with IEC 60559, while
sas performs nearest-value rounding consistent with rounding within SAS.
See [formatters::format_value()] for more details.
(list)
List of named lists. Vectorized.
(Default = list()) Used to specify individual column or cell alignments.
Each named list contains row, col, and value.
(matrix)
A m x k matrix where m is the number of columns of tt
and k is the number of lines the header takes up. See tidytlg::add_bottom_borders
for what the matrix should contain. Users should only specify this when the
default behavior does not meet their needs.