mathExpression: LaTeX Expressions in JASP

View source: R/mathExpression.R

mathExpressionR Documentation

LaTeX Expressions in JASP

Description

Construct LaTeX expressions for JASP output

Usage

mathExpression(x, inline = TRUE)

Arguments

x

A string that contains the LaTeX code for the math expression

inline

Should the expression be inline or in display mode?

Examples

# Escape the backslash character for LaTeX code
jaspBase::mathExpression("\\alpha + \\beta")
# Alternatively use the raw character constant
jaspBase::mathExpression(r"{\alpha + \beta}")

# By default expressions are inline, to disable use
jaspBase::mathExpression(r"{ \bar{x} = \frac{\sum_i^n x_i}{n} }", inline = FALSE)


jasp-stats/jaspBase documentation built on April 5, 2025, 3:46 p.m.