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

Context: How to mark up equation solving #29

Open
samimaattaCelia opened this issue Jun 13, 2024 · 2 comments
Open

Context: How to mark up equation solving #29

samimaattaCelia opened this issue Jun 13, 2024 · 2 comments

Comments

@samimaattaCelia
Copy link
Collaborator

There should be a context section on how to mark up equation solving. Basically how to mark up the math and commentary parts. I will later submit an example of mark up that I was thinking.

@Lisahartun
Copy link

I would love to see an example.
I've found something on the web. What do we think about that?

<math display="block" xmlns="http://www.w3.org/1998/Math/MathML" id="schrodinger">
    <mi title='Imaginary Unit'>i</mi>
    <mi title="Reduced Plank's Constant">ℏ</mi>
    <mfrac title="Partial Differential Operator">
        <mo>∂</mo>
        <mrow>
            <mo>∂</mo>
            <mi title="Time">t</mi>
        </mrow>
    </mfrac>
    <mn title="Wavefunction">Ψ</mn>
    <mo form="infix">=</mo>
    <mfrac>
        <mrow>
            <mo form="infix" lucida="true">-</mo>
            <msup>
                <mi title="Plank's constant">h</mi>
                <mn>2</mn>
            </msup>
        </mrow>
        <mrow>
            <mn>2</mn>
            <mi title="Mass of particle">m</mi>
        </mrow>
    </mfrac>
    <msup title="Laplacian">
        <mo>∇</mo>
        <mn>2</mn>
    </msup>
    <mn title="Wavefunction">Ψ</mn>
    <mo form="infix">+</mo>
    <mi title="Potential energy">V</mi>
    <mn title="Wavefunction">Ψ</mn>
</math>

@samimaattaCelia
Copy link
Collaborator Author

This is how I would approach the equation solving mark up and commentary. This is a pretty common way in Finnish textbooks to show what has been done in the solving process:
Two steps of equation solving. The parts of equations are divided into a table like layout

The equation solving is arranged in a table and different parts are table cells. That's how they line up nicely with each other. This is also how MathCAT would navigate between the different parts of the equations.

The commentary part is weird, and I don't really know how it should be marked up. I did it like this:
<mo>|</mo><mo>|</mo><mo>:</mo><mn>2</mn> <mtext>(both sides divided by 2)</mtext>. If marked up with <mo>||</mo> MathCAT would read: "parallel (lines)".

This example is from MathCAT's tests, so Neil made it himself. In that sense I trust that it's as intended in the MathML specs as well. I included the mark up for the commentary myself.

Complete mark up:

<math>
          <mrow>
            <mtable>
              <mtr>
                <mtd>
                  <mrow>
                    <mi>x</mi>
                    <mo>+</mo>
                    <mi>y</mi>
                  </mrow>
                </mtd>
                <mtd>
                  <mo>=</mo>
                </mtd>
                <mtd>
                  <mn>7</mn>
                </mtd>
                <mtd>
                  <mo>|</mo><mo>|</mo><mo>:</mo><mn>2</mn> <mtext>(both sides divided by 2)</mtext>
                </mtd>
              </mtr>
              <mtr>
                <mtd>
                  <mfrac>
                  <mrow>
                    <mn>2</mn>
                    <mi>x</mi>
                    <mo>+</mo>
                    <mn>3</mn>
                    <mi>y</mi>
                  </mrow>
                <mn>2</mn>
                </mfrac>
                
                </mtd>
                <mtd>
                  <mo>=</mo>
                </mtd>
                <mtd>
                  <mrow>
                    <mfrac>
                    <mn>17</mn>
                    <mn>2</mn>
                  </mfrac>
                  </mrow>
                </mtd>
                <mtd></mtd>
              </mtr>
            </mtable>
          </mrow>
        </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

2 participants