latex_richtext: Converts a LaTeX String to Richtext

View source: R/geom-magic-text.R

latex_richtextR Documentation

Converts a LaTeX String to Richtext

Description

Helper function to convert a LaTeX string to richtext.

Usage

latex_richtext(x, sup = "^", sub = "_", br = "\n", env = parent.frame())

Arguments

x

a character vector.

sup

one-length character, indicates that characters after this is superscript.

sub

one-length character, indicates that characters after this is subscript.

br

string, separator of lines.

env

environment to evaluate each expression in.

Author(s)

Hou Yun

Examples

name <- c("A_2", "B^3", "C_2", "D^{123 + x}")
name <- latex_richtext(name)

Hy4m/linkET documentation built on June 30, 2023, 7:39 p.m.