Skip to content

canonicalization problem with presubscript and primes #179

@NSoiffer

Description

@NSoiffer

This comes from a CMU braille test (4.3.4 example 3): ${}_{++}z^{''}$

The TeX code produces:

<math>
        <msub><mrow/><mrow><mo>+</mo><mo>+</mo></mrow></msub>
        <msup>
          <mi>z</mi>
          <msup><mi/><mo>″</mo></msup>
        </msup>
</math>

The WIRIS editor produces (I tried prescripts first and primes first, both came out the same):

<math>
    <mmultiscripts>
        <mi>z</mi>
        <mprescripts/>
        <mrow> <mo>+</mo> <mo>+</mo> </mrow>
        <none/>
    </mmultiscripts>
    <mo>''</mo>
</math>

Canonicalization produces:

 <math>
  <msup data-changed='added'>
    <mmultiscripts>
      <mi>z</mi>
      <mprescripts></mprescripts>
      <mrow> <mo>+</mo> <mo>+</mo> </mrow>
      <none></none>
    </mmultiscripts>
    <mo>″</mo>
  </msup>
 </math>

for the TeX.

The primes should be part of the mmultiscripts so the CMU rules can order the output correctly (primes after the base, then the presubscripts).

For the WIRIS encoding, the canonicalization does it wrong the opposite way:

 <math>
  <mmultiscripts>
    <mi>z</mi>
    <none></none>
    <msup>
      <mtext data-changed='empty_content'> </mtext>
      <mo>″</mo>
    </msup>
    <mprescripts></mprescripts>
    <mrow> <mo>+</mo> <mo>+</mo> </mrow>
    <none></none>
  </mmultiscripts>
 </math>

Here there is an msub with an empty base inside the mmultiscripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrulesPertains to Rules

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions