normalize_mathquill: Normalize Unicode characters to their LaTeX equivalents.

View source: R/normalize.R

normalize_mathquillR Documentation

Normalize Unicode characters to their LaTeX equivalents.

Description

Converts the Unicode characters commonly emitted by visual formula editors (MathQuill, embedded in many learning platforms) or by plain keyboard input into the LaTeX commands understood by latex2r().

Usage

normalize_mathquill(x)

Arguments

x

string

Details

Minus signs and dashes become -, the multiplication and division symbols become ⁠\times⁠, ⁠\cdot⁠ and /, Greek letters become the corresponding LaTeX commands, and accented vowels become ⁠\bar{}⁠, ⁠\tilde{}⁠ or ⁠\hat{}⁠ (or their base letter when the accent has no meaning here).

This function is applied automatically by latex2r() before scanning, but it is exported so callers can inspect the normalized version of a formula.

Value

string

Examples

normalize_mathquill("×")

latexr documentation built on Sept. 30, 2026, 5:08 p.m.