docx writer: fully support for \mathop{}
ilcpm opened this issue · 4 comments
I want to write \varlimsup_{n\to\infty}
in markdown and convert it to word
but I got an error when I convert, I think the reason is pandoc don't know how to convert it. so I use \mathop{\overline{\lim}}
, but the result is wrong
and I try \underset{n\to\infty}{\overline{\lim}}
, it works
so I hope pandoc can support \mathop{}
correctly
in another word, \mathop{\hat{xyz}}_{abc}
should works as \hat{xyz}_{abc}
in inline mode, and works as \underset{abc}{\hat{xyz}}
in display mode
inline mode:
display mode:
Let's reopen this as a texmath issue, maybe we can support mathop better.
The problem is this. In texmath's model for formulas, the MathOperator constructor takes a Text argument, not an arbitrary structured formula. So when we run into something like \mathop{\overline{\lim}}
, we try to convert the formula to plain text, and this isn't always possible.
The right fix, you'd think, would be to change the type of the argument to MathOperator. However, it's tricky because we need to support multiple formats. Clearly a math operator in TeX can be just about anything, but I think in MathML the <mo>
element can't contain structured equations (e.g. superscripts).
So I'm not sure at the moment what the best solution is.