format_chr {cocoon} | R Documentation |
Format character strings with italics and type
format_chr(x, italics = TRUE, type = "md")
x |
Character string |
italics |
Logical value (default = TRUE) for whether text should be italicized |
type |
Type of formatting ( |
A character string that has either Markdown or LaTeX formatting for italics or not.
format_chr("Hello world!")
# Format in LaTeX syntax
format_chr("Hello world!", type = "latex")
# Remove italics
format_chr("Hello world!", italics = FALSE)