Format character columns as markdown text
colformat_md(
x,
j = where(is.character),
part = c("body", "header", "all"),
auto_color_link = "blue",
md_extensions = NULL,
pandoc_args = NULL,
metadata = rmarkdown::metadata,
replace_na = "",
.from = "markdown+autolink_bare_uris-raw_html-raw_attribute",
.footnote_options = footnote_options(),
.sep = "\n\n"
)
A flextable
object
Columns to be treated as markdown texts.
Selection can be done by the semantics of dplyr::select()
.
One of "body", "header", and "all". If "all", formatting proceeds in the order of "header" and "body".
A color of the link texts.
Pandoc's extensions. Although it is prefixed with "md", extensions for any
formats specified to .from
can be used. See
https://www.pandoc.org/MANUAL.html#extensions for details.
Additional command line options to pass to pandoc
A list of metadata, typically the parsed result of the YAML front matter
(default: rmarkdown::metadata
). This value is used iff the .from
argument specifies the input format that supports the YAML metadata blocks.
A value to replace NA
(default = ""
).
Pandoc's --from
argument (default: 'markdown+autolink_bare_uris'
).
Options for footnotes generated by footnote_options()
.
A separator of paragraphs (default: "\n\n"
)
if (rmarkdown::pandoc_available("2.0.6")) {
d <- data.frame(
x = c("**bold**", "*italic*"),
y = c("^superscript^", "~subscript~"),
z = c("***^ft^~Extra~** is*", "*Cool*")
)
colformat_md(flextable::flextable(d))
}
x
y
z
bold
superscript
ftExtra is
italic
subscript
Cool