tsengwoody / Access8Math

Allows access math content written by MathML ; Assist writing math content by LaTeX
GNU General Public License v2.0
32 stars 15 forks source link

Binomials #15

Closed sukiletxe closed 3 years ago

sukiletxe commented 4 years ago

According to MathML, mfrac also can be used for binomials. If the attribute linetickness is set to 0, it should be interpreted that way. Mathjax and Math Player do this too.

tsengwoody commented 4 years ago

May you provide some MathML example?

sukiletxe commented 4 years ago

Sure.

This is taken from http://www.pbx-brasil.com/Pesquisa/Ferramentas/Latex/mathjax/martinkeefe/mathjax5.html The original TeX is the annotation.

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <semantics>
    <mrow>
      <msup>
        <mn>2</mn>
        <mi>k</mi>
      </msup>
      <mo>&#x2212;<!-- − --></mo>
      <mrow>
        <mrow class="MJX-TeXAtom-OPEN">
          <mo maxsize="2.047em" minsize="2.047em">(</mo>
        </mrow>
        <mfrac linethickness="0">
          <mi>k</mi>
          <mn>1</mn>
        </mfrac>
        <mrow class="MJX-TeXAtom-CLOSE">
          <mo maxsize="2.047em" minsize="2.047em">)</mo>
        </mrow>
      </mrow>
      <msup>
        <mn>2</mn>
        <mrow class="MJX-TeXAtom-ORD">
          <mi>k</mi>
          <mo>&#x2212;<!-- − --></mo>
          <mn>1</mn>
        </mrow>
      </msup>
      <mo>+</mo>
      <mrow>
        <mrow class="MJX-TeXAtom-OPEN">
          <mo maxsize="2.047em" minsize="2.047em">(</mo>
        </mrow>
        <mfrac linethickness="0">
          <mi>k</mi>
          <mn>2</mn>
        </mfrac>
        <mrow class="MJX-TeXAtom-CLOSE">
          <mo maxsize="2.047em" minsize="2.047em">)</mo>
        </mrow>
      </mrow>
      <msup>
        <mn>2</mn>
        <mrow class="MJX-TeXAtom-ORD">
          <mi>k</mi>
          <mo>&#x2212;<!-- − --></mo>
          <mn>2</mn>
        </mrow>
      </msup>
    </mrow>
    <annotation encoding="application/x-tex">2^k-\binom{k}{1}2^{k-1}+\binom{k}{2}2^{k-2}</annotation>
  </semantics>
</math>
tsengwoody commented 3 years ago

OK, I will add rule for Binomial in future version.

Futyn-Maker commented 3 years ago

@sukiletxe Hello! To be honest, I don't understand in what cases this can be used. As I know, a binomial is a polynomial with two terms. Like (a + b)^2 and so on. What does mfrac mean in this rule?

Futyn-Maker commented 3 years ago

Oh, sorry for the confusion. The problem in the English word "binomial" which I translated in the same way as "binom". Now I understand that it means binomial coefficient...

tsengwoody commented 3 years ago

Binomial rule is added in math rule.