Plurimath

UnicodeMath

Author’s picture Suleman Uzair Author’s picture Ronald Tse on 04 Apr 2024

Introduction

Plurimath has been able to handle AsciiMath, MathML, LaTeX, and OMML for a while. Now, it’s added support for UnicodeMath, broadening its range of functionality.

Using UnicodeMath

Input string can be one of any of the following two types

  1. Unicode string # String containing the representation of the symbol

  2. Name syntax string # String containing the names instead of the representation.

Let’s start with the Unicode syntax,

string = '∑_(i=1)^n i^3'
formula = Plurimath::Math.parse(string, :unicode)
formula.to_unicodemath # => '∑_(i = 1)^(n) i^(3)'

And now the named syntax example.

string = '\sum_(i=1)^n i^3'
formula = Plurimath::Math.parse(string, :unicode)
string.to_unicodemath # => '∑_(i = 1)^(n) i^(3)'
Note
Input can be any of the both mentioned syntaxes, but the output will be in Unicode representation and not in named syntax.