Format a String with Italics for HTML or Latex Output
fmt_italic(string, indicator = "*", html = TRUE)
The character vector to add italics to.
The indicator for which words should be italicized
Logical for whether the output should be HTML. If FALSE
, Latex
output is provided.
A character vector
fmt_italic("Make *this* italic.", html = TRUE)
#> [1] "Make <em>this</em> italic."
fmt_italic("Make *this* italic.", html = FALSE)
#> [1] "Make \\textit{this} italic."