On 10/12/21 8:31 PM, Aditya Mahajan wrote:

This is an issue with ConTeXt, but most of these issues are minor are easy to 
fix. Just send minimal examples showing the incorrect rendering.

Aditya



An example is attached.
MathML generated with

pandoc -f latex -t html --mathml sample-math.tex \
    | xmlstarlet ed -d "//*[local-name()='annotation']" \
    | xmlstarlet sel -t -c "/p/*" \
    | xmlstarlet ed -m "//*[local-name()='semantics']/*" \
        "//*[local-name()='math']" \
    | xmlstarlet ed -d "//*[local-name()='semantics']"
\usemodule[mathml]
\starttext
\startplaceformula
  \startformula
    \xmlprocessdata{}{
      <?xml version="1.0"?>
      <math xmlns="http://www.w3.org/1998/Math/MathML"; display="block">
        <mrow>
          <mrow>
            <mo stretchy="true" form="prefix">[</mo>
            <mtable>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>R</mi>
                    <mrow>
                      <mn>1</mn>
                      <mi>x</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>R</mi>
                    <mrow>
                      <mn>1</mn>
                      <mi>y</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>F</mi>
                    <mrow>
                      <mn>2</mn>
                      <mi>x</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>F</mi>
                    <mrow>
                      <mn>2</mn>
                      <mi>y</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>R</mi>
                    <mrow>
                      <mn>3</mn>
                      <mi>x</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>R</mi>
                    <mrow>
                      <mn>3</mn>
                      <mi>y</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>R</mi>
                    <mrow>
                      <mn>4</mn>
                      <mi>x</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>R</mi>
                    <mrow>
                      <mn>4</mn>
                      <mi>y</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
            </mtable>
            <mo stretchy="true" form="postfix">]</mo>
          </mrow>
          <mo>=</mo>
          <mrow>
            <mo stretchy="true" form="prefix">[</mo>
            <mtable>
              <mtr>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>1</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>1</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>1</mn>
                    </msub>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>1</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>1</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>1</mn>
                    </msub>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>1</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>1</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>1</mn>
                    </msub>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>1</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>1</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>1</mn>
                    </msub>
                  </mfrac>
                  <mo>+</mo>
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>2</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>2</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>2</mn>
                    </msub>
                  </mfrac>
                  <mo>+</mo>
                  <mfrac>
                    <mrow>
                      <mn>4</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>2</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>2</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>2</mn>
                    </msub>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <mn>4</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>2</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>2</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>2</mn>
                    </msub>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>2</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>2</mn>
                      </msub>
                    </mrow>
                    <msub>
                      <mi>L</mi>
                      <mn>2</mn>
                    </msub>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <mn>4</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
                <mtd columnalign="center">
                  <mo>&#x2212;</mo>
                  <mfrac>
                    <mrow>
                      <mn>2</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
                <mtd columnalign="center">
                  <mfrac>
                    <mrow>
                      <mn>4</mn>
                      <msub>
                        <mi>A</mi>
                        <mn>3</mn>
                      </msub>
                      <msub>
                        <mi>E</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                    <mrow>
                      <mn>5</mn>
                      <msub>
                        <mi>L</mi>
                        <mn>3</mn>
                      </msub>
                    </mrow>
                  </mfrac>
                </mtd>
              </mtr>
            </mtable>
            <mo stretchy="true" form="postfix">]</mo>
          </mrow>
          <mrow>
            <mo stretchy="true" form="prefix">[</mo>
            <mtable>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>u</mi>
                    <mrow>
                      <mn>2</mn>
                      <mi>x</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <msub>
                    <mi>u</mi>
                    <mrow>
                      <mn>2</mn>
                      <mi>y</mi>
                    </mrow>
                  </msub>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
              <mtr>
                <mtd columnalign="center">
                  <mn>0</mn>
                </mtd>
              </mtr>
            </mtable>
            <mo stretchy="true" form="postfix">]</mo>
          </mrow>
        </mrow>
      </math>
    }{}
  \stopformula
\stopplaceformula

\stoptext
\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{equation}
  \left[
    \begin{matrix}
      R_{1 x}\\
      R_{1 y}\\
      F_{2 x}\\
      F_{2 y}\\
      R_{3 x}\\
      R_{3 y}\\
      R_{4 x}\\
      R_{4 y}
    \end{matrix}
  \right]
  =
  \left[
    \begin{matrix}
      \frac{A_{1} E_{1}}{L_{1}} & 0 & - \frac{A_{1} E_{1}}{L_{1}} & 0 & 0 & 0 & 0 & 0\\
      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
      - \frac{A_{1} E_{1}}{L_{1}} & 0 & \frac{A_{1} E_{1}}{L_{1}} + \frac{A_{3} E_{3}}{5 L_{3}} & - \frac{2 A_{3} E_{3}}{5 L_{3}} & 0 & 0 & - \frac{A_{3} E_{3}}{5 L_{3}} & \frac{2 A_{3} E_{3}}{5 L_{3}}\\
      0 & 0 & - \frac{2 A_{3} E_{3}}{5 L_{3}} & \frac{A_{2} E_{2}}{L_{2}} + \frac{4 A_{3} E_{3}}{5 L_{3}} & 0 & - \frac{A_{2} E_{2}}{L_{2}} & \frac{2 A_{3} E_{3}}{5 L_{3}} & - \frac{4 A_{3} E_{3}}{5 L_{3}}\\
      0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
      0 & 0 & 0 & - \frac{A_{2} E_{2}}{L_{2}} & 0 & \frac{A_{2} E_{2}}{L_{2}} & 0 & 0\\
      0 & 0 & - \frac{A_{3} E_{3}}{5 L_{3}} & \frac{2 A_{3} E_{3}}{5 L_{3}} & 0 & 0 & \frac{A_{3} E_{3}}{5 L_{3}} & - \frac{2 A_{3} E_{3}}{5 L_{3}}\\
      0 & 0 & \frac{2 A_{3} E_{3}}{5 L_{3}} & - \frac{4 A_{3} E_{3}}{5 L_{3}} & 0 & 0 & - \frac{2 A_{3} E_{3}}{5 L_{3}} & \frac{4 A_{3} E_{3}}{5 L_{3}}
    \end{matrix}
  \right]
  \left[
    \begin{matrix}
      0\\
      0\\
      u_{2 x}\\
      u_{2 y}\\
      0\\
      0\\
      0\\
      0
    \end{matrix}
  \right]
\end{equation}
\end{document}

Attachment: sample-math.pdf
Description: Adobe PDF document

Attachment: sample-math-latex.pdf
Description: Adobe PDF document

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to