sammarshallou / webmaths

Java web services for handling MathML and TeX (intended for use with a Moodle filter)
GNU General Public License v3.0
5 stars 7 forks source link

JEuclid: <menclose notation="longdiv"> doesn't work #21

Closed sammarshallou closed 12 years ago

sammarshallou commented 12 years ago

The below equation looks terrible in JEuclid, while the MathML is correct (er, except for the annotation being in the wrong place - I wonder how that happened - probably doesn't matter though).

If JEuclid doesn't do the longdiv notation, I'm not sure if it would be possible to do some pre-transformation to make it into something that might work.

(Note: This may also benefit from LaTeX rendering support if we add that and if it includes this structure.)

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <semantics>
    <mstyle displaystyle="false">
      <mrow>
        <mn>8</mn>
        <menclose notation="longdiv">
          <mrow>
            <mn>72</mn>
          </mrow>
        </menclose>
      </mrow>
      <annotation encoding="MathType-MTEF"> </annotation>
    </mstyle>
  </semantics>
</math>
sammarshallou commented 12 years ago

It turns out the rendering is OK, but it doesn't make the bounding box big enough to actually fit in the line above, so it gets cropped from the result image.

To fix this I have done as follows with each prior to processing: