This vignette introduces how to format columns in flextable.
The example below shows that colformat_md()
function parses markdown texts in flextable.
data.frame(
x = c("**bold**", "*italic*"),
y = c("^superscript^", "~subscript~"),
z = c("***~ft~^Extra^** is*", "*Cool*"),
stringsAsFactors = FALSE
) %>%
as_flextable() %>%
colformat_md()
x | y | z |
bold | superscript | ftExtra is |
italic | subscript | Cool |
Currently, bold, italic, superscript, and subscript are supported. Note that other syntax may result in unexpected behaviors.