Create, print and turn to string objects of class latex_symb
Description
The 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, ...)lsymb(...) ## S3 method for class 'latex_symb' print(x, ...) ## S3 method for class 'latex_symb' as.character(x, ...)
Arguments
... |
Objects that can be passed to |
x |
An object of class |
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) as.character(al)al <- lsymb("\\alpha") print(al) as.character(al)