stretchy="true" is missing in mo element

18 views
Skip to first unread message

Simbu R

unread,
Mar 18, 2016, 5:30:04 AM3/18/16
to MathJax Users
Hi Everyone,

I have used the mathjax for latex to mathml conversion and we send the mathml output for our customer. 

We need <mo strechy="true"> and <mo strechy="false"> for all fences. 

Input:

$\ln \,{\gamma _i} =  - \ln ({x_i} + {\Lambda _{ij}}{x_j}) - {x_j}\left( {\frac{{\left[ {{\Lambda _{ij}}} \right]}}{{\left( {{x_i} + {\Lambda _{ij}}{x_j}} \right)}} - \frac{{\left\{ {{\Lambda _{ji}}} \right\}}}{{{x_j} + {\Lambda _{ji}}{x_i}}}} \right)$

Output:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mi>ln</mi>
  <mspace width="thinmathspace" />
  <mrow class="MJX-TeXAtom-ORD">
    <msub>
      <mi>&#x03B3;<!-- γ --></mi>
      <mi>i</mi>
    </msub>
  </mrow>
  <mo>=</mo>
  <mo>&#x2212;<!-- − --></mo>
  <mi>ln</mi>
  <mo>&#x2061;<!-- ⁡ --></mo>
  <mo stretchy="false">(</mo>
  <mrow class="MJX-TeXAtom-ORD">
    <msub>
      <mi>x</mi>
      <mi>i</mi>
    </msub>
  </mrow>
  <mo>+</mo>
  <mrow class="MJX-TeXAtom-ORD">
    <msub>
      <mi mathvariant="normal">&#x039B;<!-- Λ --></mi>
      <mrow class="MJX-TeXAtom-ORD">
        <mi>i</mi>
        <mi>j</mi>
      </mrow>
    </msub>
  </mrow>
  <mrow class="MJX-TeXAtom-ORD">
    <msub>
      <mi>x</mi>
      <mi>j</mi>
    </msub>
  </mrow>
  <mo stretchy="false">)</mo>
  <mo>&#x2212;<!-- − --></mo>
  <mrow class="MJX-TeXAtom-ORD">
    <msub>
      <mi>x</mi>
      <mi>j</mi>
    </msub>
  </mrow>
  <mrow>
    <mo>(</mo>
    <mrow class="MJX-TeXAtom-ORD">
      <mfrac>
        <mrow class="MJX-TeXAtom-ORD">
          <mrow>
            <mo>[</mo>
            <mrow class="MJX-TeXAtom-ORD">
              <mrow class="MJX-TeXAtom-ORD">
                <msub>
                  <mi mathvariant="normal">&#x039B;<!-- Λ --></mi>
                  <mrow class="MJX-TeXAtom-ORD">
                    <mi>i</mi>
                    <mi>j</mi>
                  </mrow>
                </msub>
              </mrow>
            </mrow>
            <mo>]</mo>
          </mrow>
        </mrow>
        <mrow class="MJX-TeXAtom-ORD">
          <mrow>
            <mo>(</mo>
            <mrow class="MJX-TeXAtom-ORD">
              <mrow class="MJX-TeXAtom-ORD">
                <msub>
                  <mi>x</mi>
                  <mi>i</mi>
                </msub>
              </mrow>
              <mo>+</mo>
              <mrow class="MJX-TeXAtom-ORD">
                <msub>
                  <mi mathvariant="normal">&#x039B;<!-- Λ --></mi>
                  <mrow class="MJX-TeXAtom-ORD">
                    <mi>i</mi>
                    <mi>j</mi>
                  </mrow>
                </msub>
              </mrow>
              <mrow class="MJX-TeXAtom-ORD">
                <msub>
                  <mi>x</mi>
                  <mi>j</mi>
                </msub>
              </mrow>
            </mrow>
            <mo>)</mo>
          </mrow>
        </mrow>
      </mfrac>
      <mo>&#x2212;<!-- − --></mo>
      <mfrac>
        <mrow class="MJX-TeXAtom-ORD">
          <mrow>
            <mo>{</mo>
            <mrow class="MJX-TeXAtom-ORD">
              <mrow class="MJX-TeXAtom-ORD">
                <msub>
                  <mi mathvariant="normal">&#x039B;<!-- Λ --></mi>
                  <mrow class="MJX-TeXAtom-ORD">
                    <mi>j</mi>
                    <mi>i</mi>
                  </mrow>
                </msub>
              </mrow>
            </mrow>
            <mo>}</mo>
          </mrow>
        </mrow>
        <mrow class="MJX-TeXAtom-ORD">
          <mrow class="MJX-TeXAtom-ORD">
            <msub>
              <mi>x</mi>
              <mi>j</mi>
            </msub>
          </mrow>
          <mo>+</mo>
          <mrow class="MJX-TeXAtom-ORD">
            <msub>
              <mi mathvariant="normal">&#x039B;<!-- Λ --></mi>
              <mrow class="MJX-TeXAtom-ORD">
                <mi>j</mi>
                <mi>i</mi>
              </mrow>
            </msub>
          </mrow>
          <mrow class="MJX-TeXAtom-ORD">
            <msub>
              <mi>x</mi>
              <mi>i</mi>
            </msub>
          </mrow>
        </mrow>
      </mfrac>
    </mrow>
    <mo>)</mo>
  </mrow>
</math>

more latex sample for above case.

Input 2:  $\ln \,{\gamma _i} = x_j^2\left[ {{\tau _{ji}}{{\left( {\frac{{{G_{ji}}}}{{{x_i} + {x_j}{G_{ji}}}}} \right)}^2} + \frac{{{\tau _{ij}}{G_{ij}}}}{{{{\left( {{x_j} + {x_i}{G_{ij}}} \right)}^2}}}} \right]$
             
           <mo stretchy="true"> is required
 
Input 3:  $\frac{{g_{{\rm{combinatorial}}}^E}}{{RT}} = {x_i}\ln \left( {\frac{{{\phi _i}}}{{{x_i}}}} \right) + {x_j}\ln \left( {\frac{{{\phi _j}}}{{{x_j}}}} \right) + \frac{z}{2}\left( {\left( {{q_i}{x_i}} \right)\ln \frac{{{\theta _i}}}{{{\phi _i}}} + {q_j}{x_j}\ln \frac{{{\theta _j}}}{{{\phi _j}}}} \right)$

             <mo stretchy="true"> and <mo stretchy="false"> both are required.

Regards,
Simbu R.

Davide P. Cervone

unread,
Mar 20, 2016, 9:09:20 AM3/20/16
to MathJax Users
I have used the mathjax for latex to mathml conversion and we send the mathml output for our customer. 

We need <mo strechy="true"> and <mo strechy="false"> for all fences. 

The operator dictionary default for ( is stretchy="true", so there is no need to include it explicitly on the <mo>.  The results of MathJax's TeX to MathML conversion does not include attributes that are the defaults for the given element, so stretchy="true" is not added explicitly to any <mo> for which it is the default.  

For me, the result of your expression, and the two below, does show stretchy delimiters.  You also say that you expect stretchy="false" to be applied, but I don't see where you would want that to be.  So I'm confused about your issue.  As far as I can see, the MathML output is correct for all three examples.

Davide


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Simbu R

unread,
Mar 31, 2016, 12:38:59 AM3/31/16
to MathJax Users, dp...@union.edu
Thanks for your support. Now i am clear...
Reply all
Reply to author
Forward
0 new messages