Create, print and turn to string objects of class latex_symb
main.RdThe class latex_symb is simply a wrapper for a string with LaTeX code. lsymb creates the wrapper, as.character and print extract the string.
Usage
lsymb(...)
# S3 method for class 'latex_symb'
print(x, ...)
# S3 method for class 'latex_symb'
as.character(x, ...)Value
lsymbreturns an object of classlatex_symb. It is an S3 class, whose objects are lists with a single component calledrepr.repris theLaTeXcode for the object, which is obtained by pasting the character representations of all the arguments.print.lsymbpasses thereprof its first argument, plus additional arguments, toprint. The returned value is whateverprintreturns.as.character.lsymbpasses thereprof its first argument, plus additional arguments, toas.character. The returned value is whateveras.characterreturns.
Examples
al <- lsymb("\\alpha")
print(al)
#> [1] "\\alpha"
as.character(al)
#> [1] "\\alpha"