AngouriMath
Latexize
Method with 2 overloads
Latexize
Summary
Returns the expression in LaTeX
Example
Entity expr = "a / b + sqrt(c)"; Console.WriteLine(expr.Latexize());
Output:
\frac{a}{b}+\sqrt{c}Example
using System; using AngouriMath; using static AngouriMath.MathS; Entity expr = "sqrt(a) + integral(sin(x), x)"; Console.WriteLine(expr); Console.WriteLine(expr.Latexize()); Entity expr2 = "a / b ^ limit(sin(x) - cosh(y), x, +oo)"; Console.WriteLine(expr2); Console.WriteLine(expr2.Latexize());
Prints
sqrt(a) + integral(sin(x), x) \sqrt{a}+\int \left[\sin\left(x\right)\right] dx a / b ^ limit(sin(x) - (e ^ y + e ^ (-y)) / 2, x, +oo) \frac{a}{{b}^{\lim_{x\to \infty } \left[\sin\left(x\right)-\frac{{e}^{y}+{e}^{-y}}{2}\right]}}Remarks
A node whose Codomain is not its type's default is rendered as the node
subscripted with the set,{\left(x\right)}_{\mathbb{Z}} . The parentheses are
unconditional: a Variable already renders its own index as a subscript,
sox_{\mathbb{Z}} would be indistinguishable from a variable named that way.
#1022Latexize(System.Boolean)
Summary
Returns the expression in LaTeX (for example, a / b -> \frac{a}{b})Parameter "parenthesesRequired"
Whether to wrap it with parenthesesRemarks
A node that renders its codomain needs no brackets: the subscript already applies to a
parenthesised group, so anything around it would be a second pair.
Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4862 pages online