Format a String with Italics for HTML or Latex Output

fmt_italic(string, indicator = "*", html = TRUE)

Arguments

string

The character vector to add italics to.

indicator

The indicator for which words should be italicized

html

Logical for whether the output should be HTML. If FALSE, Latex output is provided.

Value

A character vector

Examples

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."