text_format: text_format

View source: R/text_format.R

text_formatR Documentation

text_format

Description

A function for easily formatting strings as bold or italicized using markdown or LaTeX syntax. 'bold(x)' is a shortcut for 'text_format(x, format = "bold", latex = FALSE)' and 'italic(x)' is a shortcut for 'text_format(x, format = "italic", latex = FALSE)'. 'bold_tex(x)' is a shortcut for 'text_format(x, format = "bold", latex = TRUE)' and 'italic_tex(x)' is a shortcut for 'text_format(x, format = "italic", latex = TRUE)'.

Usage

text_format(x, format = "italic", latex = FALSE)

bold(x)

bold_tex(x)

italic(x)

italic_tex(x)

supers(x)

supers_tex(x)

subs(x)

subs_tex(x)

Arguments

x

a character scalar or vector to be formatted.

format

a string specifying whether the text should be boled or italicized.

latex

if TRUE, text is formatted using LaTeX formatting.


camkay/panoply documentation built on Jan. 17, 2025, 6:31 a.m.