Skip to contents

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, ...)

Arguments

...

Objects that can be passed to as.character.

x

An object of class latex_symb

Value

  • lsymb returns an object of class latex_symb. It is an S3 class, whose objects are lists with a single component called repr. repr is the LaTeX code for the object, which is obtained by pasting the character representations of all the arguments.

  • print.lsymb passes the repr of its first argument, plus additional arguments, to print. The returned value is whatever print returns.

  • as.character.lsymb passes the repr of its first argument, plus additional arguments, to as.character. The returned value is whatever as.character returns.

Examples

al <- lsymb("\\alpha")
print(al)
#> [1] "\\alpha"
as.character(al)
#> [1] "\\alpha"