texmath
texmath copied to clipboard
cannot recognize equation numbers in Word
cannot recognize equation numbers in Word
Tested with command:
E:\pandoc.exe -s 2.docx -t markdown-smart --wrap=none -o example35.md
File:2.docx
This is out of scope for now.
I don't understand why you said "it is out of scope for now".
I found a solution, and let's take 1+1=2 with equation number (8) as an example .
Currently, pandoc just converts it to
$$\begin{matrix}
1 + 1 = 2\#\left( 8 \right) \\
\end{matrix}$$
In order to get the right result , we just need to replace \#\left( 8 \right) \\ with \tag{8}. I am sorry I cannot contribute more .
I said "out of scope" because pandoc currently doesn't have a way of handling equation numbers and cross-refs. But I agree, converting this to \tag{8} or just ignoring it completely would be better than the current output, and both are feasible.
Here's the xml for "1=2" with eqn number 1.
<m:oMathPara>
<m:oMath>
<m:eqArr>
<m:eqArrPr>
<m:maxDist m:val="1"/>
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math" w:eastAsia="微软雅黑" w:hAnsi="Cambria Math"/>
<w:i/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
</m:ctrlPr>
</m:eqArrPr>
<m:e>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math" w:eastAsia="微软雅黑" w:hAnsi="Cambria Math"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
<m:t>1=2
</m:t>
</m:r>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math" w:eastAsia="微软雅黑" w:hAnsi="Cambria Math"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
<m:t>#
</m:t>
</m:r>
<m:d>
<m:dPr>
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math" w:eastAsia="微软雅黑" w:hAnsi="Cambria Math"/>
<w:i/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
</m:ctrlPr>
</m:dPr>
<m:e>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math" w:eastAsia="微软雅黑" w:hAnsi="Cambria Math"/>
<w:sz w:val="24"/>
<w:szCs w:val="24"/>
</w:rPr>
<m:t>1
</m:t>
</m:r>
</m:e>
</m:d>
</m:e>
</m:eqArr>
</m:oMath>
</m:oMathPara>
Very strange! It appears that there's no dedicated XML for the equation number, but rather some kind of convention so that whatever occurs after a run with just # is an equation number? Do I understand this correctly?
If I was correct , you would find the equation number after the last <m:t> tag.