Skip to content

Latex serialization of (-2)^2 and -(2^2) are identical #244

@ntala

Description

@ntala

The following instructions

const expr_1 = ce.box(["Power", -2, 2])
console.log(expr_1.latex)
const expr_2 = ce.box(["Power", ["Negate", 2], 2])
console.log(expr_2.latex)
const expr_3 = ce.box(["Negate", ["Power", 2, 2]])
console.log(expr_3.latex)

give :

-2^2
-2^2
-2^2

I should be :

(-2)^2
(-2)^2
-2^2

I have never used this library. I was just testing it from mathlive.io.
The versions displayed are :
MathField 0.105.3

Compute Engine {{SDK_VERSION}} ... (it looks like an interpolation was not done here).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions