AngouriMath

Navigation

← Back to list of members

UnicodeOutput

 Property

Summary

Makes Stringize and ToString print
mathematical symbols in place of their ASCII spellings. Off by default.

Remarks

With it on, pi prints as π, e as ℯ, +oo and
-oo as +∞ and −∞, <=>= as ≤≥,
not a = b as a ≠ b, insubset as ∈⊆,
a congruence a = b (mod n) as a ≡ b (mod n), forallexistsexists! as ∀∃∃!, \//\ as
∪∩, notandor as ¬∧∨, the
minus sign as − (U+2212), and an integer exponent in superscript digits:
x ^ 2 as x², x ^ (-1) as x⁻¹.
The parser reads every one of these back, so what is printed parses to the
expression that was printed, as the ASCII form does. Names, numbers and function
calls are printed as they are either way, and so is anything an exponent's
superscript would misplace: x ^ 2 ^ 3 prints as x ^ 2³, and an
exponent followed by ! keeps its ^.
Only what is shown changes. Latexize, the SymPy code, the
JSON form and every ordering the library takes by printed form stay as they are,
so that no answer depends on this setting.
#1242

Example

using System;
using AngouriMath;
using static AngouriMath.MathS;
            
Entity expr = "x ^ 2 - 1 <= pi";
using (Settings.UnicodeOutput.Set(true))
    Console.WriteLine(expr);
Console.WriteLine(expr);

Prints
x² − 1 ≤ π
x ^ 2 - 1 <= pi

























Angouri © 2019-2026 · Project's repo · Site's repo · Octicons · Transparency · 6003 pages online