render_latex: Renders a LaTeX tree

View source: R/parser.R

render_latexR Documentation

Renders a LaTeX tree

Description

Returns a string that is a valid plotmath expression, given a LaTeX tree returned by parse_latex.

Usage

render_latex(tokens, user_defined = list(), hack_parentheses = FALSE)

Arguments

tokens

tree of tokens

user_defined

any custom definitions of commands passed to TeX

hack_parentheses

render parentheses using group('(', phantom(), '.') and group(')', phantom(), '.'). This is useful to return valid expressions when the LaTeX source contains mismatched parentheses, but makes the returned expression much less tidy.

Value

String that should be parseable as a valid plotmath expression


latex2exp documentation built on Nov. 28, 2022, 9:05 a.m.