Description
The OMML-to-LaTeX converter crashes with NotImplementedError when encountering math functions not in the hardcoded FUNC dictionary. The FUNC dict only contains sin, cos, tan, arcsin, arccos, arctan, arccot, sinh, cosh, tanh, coth, sec, csc - but not common functions like log, ln, exp, det, gcd, lcm, etc.
Root Cause
In omml.py line 275: raise NotImplementedError("Not support func %s" % t). Any DOCX file with a math equation using an unrecognized function name will crash the entire conversion.
Proposed Fix
Instead of raising NotImplementedError, fall back to rendering the function name as plain text using \operatorname{}.
Description
The OMML-to-LaTeX converter crashes with NotImplementedError when encountering math functions not in the hardcoded FUNC dictionary. The FUNC dict only contains sin, cos, tan, arcsin, arccos, arctan, arccot, sinh, cosh, tanh, coth, sec, csc - but not common functions like log, ln, exp, det, gcd, lcm, etc.
Root Cause
In omml.py line 275: raise NotImplementedError("Not support func %s" % t). Any DOCX file with a math equation using an unrecognized function name will crash the entire conversion.
Proposed Fix
Instead of raising NotImplementedError, fall back to rendering the function name as plain text using \operatorname{}.