Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathML errors for Kvile #48

Open
samimaattaCelia opened this issue Oct 16, 2024 · 0 comments
Open

MathML errors for Kvile #48

samimaattaCelia opened this issue Oct 16, 2024 · 0 comments

Comments

@samimaattaCelia
Copy link
Collaborator

Writing the MathML errors that I had in one EPUB in the spring. I wrote them here, since we didn't have the document ready yet. These also render better.

Same equation on multiple lines

kuva

<math altimg="images/math-0022.jpg" alttext="" display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
    <mrow>
        <mrow>
            <mn>2</mn>
            <mo>&#x00D7;</mo>
            <mn>5</mn>
            <mo>+</mo>
            <mn>2</mn>
            <mo>&#x00D7;</mo>
            <mn>2,52</mn>
        </mrow>
    </mrow>
</semantics>
</math>
<math altimg="images/math-0023.jpg" alttext="" display="block"
xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
    <mrow>
        <mrow>
            <mo>=</mo>
            <mn>10</mn>
            <mo>+</mo>
            <mn>5,04</mn>
        </mrow>
    </mrow>
</semantics>
</math>
<math altimg="images/math-0024.jpg" alttext="" display="block"
xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
    <mrow>
        <mrow>
            <mo>=</mo>
            <mn>15,04</mn>
        </mrow>
    </mrow>
</semantics>
</math>

Use of <mfenced>

kuva

I noticed that the pattern <mfenced separators=""> repeated, so it could just be about checking that.

<math altimg="images/math-0060.jpg" alttext="" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
<semantics>
    <mrow>
        <mrow>
            <mn>2</mn>
            <mo>&#x00D7;</mo>
            <mfenced separators="">
                <mrow>
                    <mn>3</mn>
                    <mo>+</mo>
                    <mn>5</mn>
                </mrow>
            </mfenced>
        </mrow>
    </mrow>
</semantics>
</math>

kuva

<math altimg="images/math-0090.jpg" alttext="" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
        <mrow>
            <mrow>
                <mfenced separators="" close="|" open="|">
                    <mrow>
                        <mn>5</mn>
                        <mo>&#x2212;</mo>
                        <mn>3</mn>
                    </mrow>
                </mfenced>
            </mrow>
        </mrow>
    </semantics>
</math>

kuva

<math altimg="images/math-0146.jpg" alttext="" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
        <mrow>
            <mfenced close="" open="{">
                <mrow>
                    <mtable equalcolumns="true" equalrows="true">
                      <mtr>
                      <mtd>
                      <mrow>
                      <mi>x</mi>
                      <mo>&#x2212;</mo>
                      <mn>3</mn>
                      <mi>y</mi>
                      <mo>=</mo>
                      <mrow>
                      <mo>&#x2212;</mo>
                      <mn>5</mn>
                      </mrow>
                      </mrow>
                      </mtd>
                      </mtr>
                      <mtr>
                      <mtd>
                      <mrow>
                      <mo>&#x2212;</mo>
                      <mn>2</mn>
                      <mi>x</mi>
                      <mo>&#x2212;</mo>
                      <mi>y</mi>
                      <mo>=</mo>
                      <mrow>
                      <mo>&#x2212;</mo>
                      <mn>4</mn>
                      </mrow>
                      </mrow>
                      </mtd>
                      </mtr>
                    </mtable>
                </mrow>
            <mo>)</mo>
        </mrow>
    </semantics>
</math>

Using MathML when not needed

kuva

<math altimg="images/math-0069.jpg" alttext=""display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
        <mrow>
            <mn>400,00</mn>
        </mrow>
    </semantics>
</math>

Not using <mtable> correctly

kuva

The expressions don't line up in their column, because the same cell is used for all the mark up.

<math altimg="images/math-0138.jpg" alttext="" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
        <mrow>
            <mtable equalcolumns="true" equalrows="true">
                <mtr>
                    <mtd>
                        <mrow>
                          <mn>2</mn>
                          <mi>x</mi>
                          <mo>+</mo>
                          <mn>4</mn>
                          <mo>=</mo>
                          <mn>6</mn>
                          <mo>&#x2225;</mo>
                          <mo>:</mo>
                          <mn>2</mn>
                        </mrow>
                    </mtd>
                </mtr>
                <mtr>
                    <mtd>
                        <mrow>
                          <mi>x</mi>
                          <mo>+</mo>
                          <mn>2</mn>
                          <mo>=</mo>
                          <mn>3</mn>
                        </mrow>
                    </mtd>
                </mtr>
            </mtable>
        </mrow>
    </semantics>
</math>

Intended markup:

kuva

<math altimg="images/math-0138.jpg" alttext="" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
        <mrow>
            <mtable equalrows="true">
                <mtr>
                    <mtd>
                        <mrow>
                          <mn>2</mn>
                          <mi>x</mi>
                          <mo>+</mo>
                          <mn>4</mn>
                        </mrow>
                    </mtd>
                    <mtd>
                      <mo>=</mo>                        
                    </mtd>
                    <mtd>
                      <mrow>
                        <mn>6</mn>
                        
                      </mrow>
                    </mtd>
                    <mtd>
                     <mo>&#x2225;</mo>                                                
                     <mo>:</mo>
                     <mn>2</mn>
                    </mtd>
                </mtr>
                <mtr>
                    <mtd>
                        <mrow>
                          <mi>x</mi>
                          <mo>+</mo>
                          <mn>2</mn>
                        </mrow>
                    </mtd>
                    <mtd>
                      <mo>=</mo>
                    </mtd>
                    <mtd>
                      <mn>3</mn>
                    </mtd>
                    <mtd>
                    </mtd>                                          
                </mtr>
            </mtable>
        </mrow>
    </semantics>
</math>

Using comma as an operator when it should be a decimal comma

kuva

<math altimg="images/math-0208.jpg" alttext="" display="block" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
        <mrow>
          <mfrac>
          <mrow>
          <mn>3</mn>
          <mo>+</mo>
          <mn>4</mn>
          </mrow>
          <mn>2</mn>
          </mfrac>
          <mo>=</mo>
          <mfrac>
          <mn>7</mn>
          <mn>2</mn>
          </mfrac>
          <mo>=</mo>
          <mn>3</mn>
          <mo>,</mo>
          <mn>5</mn>
        </mrow>
    </semantics>
</math>

Using a decimal point when it should be decimal comma

kuva

(Also too many <mrow>s.)

<math altimg="images/math-0209.jpg" alttext="" display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
    <semantics>
        <mrow>
          <mrow>
          <mn>3.5</mn>
          </mrow>
        </mrow>
    </semantics>
</math>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant