-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
docx to html conversion: aligned equations not working #150
Comments
Here's what the XML looks like for the first two equations. The aligning is done by <m:oMathPara>
<m:oMath>
<m:sSub>
<m:sSubPr>
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
<w:i />
</w:rPr>
</m:ctrlPr>
</m:sSubPr>
<m:e>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>E</m:t>
</m:r>
</m:e>
<m:sub>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>Na</m:t>
</m:r>
</m:sub>
</m:sSub>
<m:r>
<m:rPr>
<m:aln />
</m:rPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t xml:space="preserve">
=61.5
</m:t>
</m:r>
<m:r>
<m:rPr>
<m:sty m:val="p" />
</m:rPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>mV</m:t>
</m:r>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t xml:space="preserve">
</m:t>
</m:r>
<m:r>
<m:rPr>
<m:sty m:val="p" />
</m:rPr>
<w:br />
</m:r>
</m:oMath>
<m:oMath>
<m:sSub>
<m:sSubPr>
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
<w:i />
</w:rPr>
</m:ctrlPr>
</m:sSubPr>
<m:e>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>E</m:t>
</m:r>
</m:e>
<m:sub>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>Na</m:t>
</m:r>
</m:sub>
</m:sSub>
<m:r>
<m:rPr>
<m:aln />
</m:rPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t xml:space="preserve">
=61.5
</m:t>
</m:r>
<m:r>
<m:rPr>
<m:sty m:val="p" />
</m:rPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t>mV</m:t>
</m:r>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math"
w:hAnsi="Cambria Math" />
</w:rPr>
<m:t xml:space="preserve">
</m:t>
</m:r>
<m:r>
<m:rPr>
<m:sty m:val="p" />
</m:rPr>
<w:br />
</m:r>
</m:oMath> |
The omml parser for texmath currently ignores the m:aln property. |
See the tex parser's treatment of |
I currently fix the latex code that is generated by pandoc using post-processing with Python. This is satisfactory for me but aligned equations are pretty common so it would seem like it is something that should be handled. Not sure if it is priority. I would offer to help but I don't know the first thing about either OMML or Haskell. |
I am converting docx to html using pandoc (v2.9.1) called from conda Python (3.7.1).
I have attached two examples of aligned equations in a docx file where I have aligned them at the equality sign within the Word document.
testmath.docx
The Latex code lacks the \begin{aligned} ... \end{aligned} words, lacks the decorated equality sign '&=' needed for alignment, and the line breaks are not properly implemented.
The text was updated successfully, but these errors were encountered: