functions in word #9349
Replies: 2 comments
-
I tried entering sin x in the Word equation editor, and the resulting XML looks like this: <m:oMathPara>
<m:oMath>
<m:func>
<m:funcPr>
<m:ctrlPr>
<w:rPr>
<w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math"/>
<w:i/>
</w:rPr>
</m:ctrlPr>
</m:funcPr>
<m:fName>
<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>sin
</m:t>
</m:r>
</m:fName>
<m:e>
<m:r>
<w:rPr>
<w:rFonts w:ascii="Cambria Math" w:hAnsi="Cambria Math"/>
</w:rPr>
<m:t>x
</m:t>
</m:r>
</m:e>
</m:func>
</m:oMath>
</m:oMathPara> Pandoc's output, by contrast, is not wrapping the operator name in a m:func element. So I think this is a place where pandoc's docx output could be improved. You could open an issue at jgm/texmath (that is the library that does the math), referencing this discussion. |
Beta Was this translation helpful? Give feedback.
-
I think the problem is that our math parser does not represent the notion of a "function application"; it has the notion of an operator name, but it doesn't separately represent what is the argument of that operator (here, 'x'). This seems to be needed for the output above -- unless m:fname can be used by itself (EDIT: it seems not). |
Beta Was this translation helpful? Give feedback.
-
When exported to docx, mathematical formulas are converted well, but functions are converted as text. For example, in word, when writing a formula, after entering a function, press the space bar, and a window will appear, there we enter expressions inside the function. And it looks good. I would also like to add that I work at obsidian, and convert to docx often. As a mathematician, I would like to recognize \operatorname{tg} xor another like \arctg as a function, I apologize for the translation, thank you.
Beta Was this translation helpful? Give feedback.
All reactions