powered by
Format character strings with italics and type
format_chr(x, italics = TRUE, type = "md")
A character string that has either Markdown or LaTeX formatting for italics or not.
Character string.
Logical value (default = TRUE) for whether text should be italicized.
Type of formatting ("md" = markdown, "latex" = LaTeX).
"md"
"latex"
format_chr("Hello world!") # Format in LaTeX syntax format_chr("Hello world!", type = "latex") # Remove italics format_chr("Hello world!", italics = FALSE)
Run the code above in your browser using DataLab