Skip to main content
Inspiring
May 11, 2021
Answered

MathMl-rendering in Sigil 1.5.1 and ADE 4.5.11.187212

  • May 11, 2021
  • 1 reply
  • 670 views

I have an EPUB-file in which I'm trying to replace math-equations that came as JPEGs, with MathMl-code:

  <p class="equation">
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
     <mrow>
       <msup><mi>x</mi><mn>'</mn></msup><mo>=</mo>
          <mfrac>
             <mrow>
                <mi>x</mi><mo>-</mo><mn>vt</mn>
             </mrow>
             <mrow>
                <msqrt>
                   <mn>1</mn><mo>-</mo>
                   <mfrac>
                      <msup><mi>v</mi><mn>2</mn></msup>
                      <msup><mi>c</mi><mn>2</mn></msup>
                   </mfrac>
                </msqrt>
             </mrow>
          </mfrac>
     </mrow>
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
    <mrow>
       <msup><mi>y</mi><mn>'</mn></msup><mo>=</mo><mi>y</mi>
    </mrow>
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
    <mrow>
       <msup><mi>z</mi><mn>'</mn></msup><mo>=</mo><mi>z</mi>
    </mrow>
    </math>
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
     <mrow>
        <msup><mi>t</mi><mn>'</mn></msup><mo>=</mo>
           <mfrac>
              <mrow>
                 <mi>t</mi><mo>-</mo>
                    <mfrac>
                       <mi>v</mi>
                       <msup><mi>c</mi><mn>2</mn></msup>
                    </mfrac>
                    <mo>.</mo>
                    <mi>x</mi>
              </mrow>
              <mrow>
                 <msqrt>
                   <mn>1</mn><mo>-</mo>
                   <mfrac>
                      <msup><mi>v</mi><mn>2</mn></msup>
                      <msup><mi>c</mi><mn>2</mn></msup>
                   </mfrac>
                 </msqrt>
              </mrow>
           </mfrac>
     </mrow>
    </math>             
  </p>

(Code may be somewhat inefficient as I'm a MathMl-newbie)

Sigil 1.5.1 renders this code just as I wanted it, and all the equations come out just fine.

 

However, when I load the file into ADE 4.5.11, it is rendered as follows:

x'= x-vt 1 - v2 c2 y'=y z'=z t'= t- v c2 . x 1- v2 c2

ADE doesn't seem to recognize the Math-tags. What am I missing?

 

Thx for any info.

    This topic has been closed for replies.
    Correct answer WillemVermeer

    I found it! ADE didn't render the equations properly because it was an Epub2.0-file. In a Forum I found that it would work after I'd put the file thru the "Sigil Epub3 plugin" to get it into Epub3.0-format.

    Installed the plugin, ran the conversion, and this time ADE does display the MathMl properly.

     

    Solved.

    1 reply

    WillemVermeerAuthorCorrect answer
    Inspiring
    May 14, 2021

    I found it! ADE didn't render the equations properly because it was an Epub2.0-file. In a Forum I found that it would work after I'd put the file thru the "Sigil Epub3 plugin" to get it into Epub3.0-format.

    Installed the plugin, ran the conversion, and this time ADE does display the MathMl properly.

     

    Solved.