Takes a flextable object and renders any markdown in the specified part.
Arguments
- ft
Flextable object.
- obnd
Optional onbrand object used to format markdown. The default
NULL
value will use default formatting.- part
Part of the table can be one of
"all"
,"body"
(default),"header"
, or"footer"
.- prows
Optional rows of the part to process, ignored when
part = "all"
. Set toNULL
(default) to process all rows.- pcols
Optional columns of the part to process, ignored when
part = "all"
. Set toNULL
(default) to process all columns.
Examples
library(onbrand)
library(flextable)
df = data.frame(
A = c("e^x^", "text"),
B = c("sin(x~y~)", "**<ff:symbol>S</ff>**~x~"))
ft = flextable(df) |>
delete_part(part="header") |>
add_header(values =
list(A= "*Italics*",
B= "**Bold**") ) |>
theme_vanilla() |>
ft_apply_md(part="all")
ft
Italics
Bold
ex
sin(xy)
text
Sx