-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Support for equations #17
Comments
I haven't really looked into adding support for equations. I suspect, however, that it would be quite a lot of work, and take more time than I currently have spare, unless there happens to be another library that already handles this. Would you mind providing a small example document that I can take a look at in case I find the time? |
Sure. I'm attaching a file which only has a equation in it. I'm hoping that will make things easier to handle. If you need a bigger file to look at let me know. The problem, as far I understand, is that there is no native way to present OMML in HTML. We have to convert it to either MathML or LaTeX and then use some kind of external JavaScript library like Mathjax to properly render it in the browser. There are some libraries like https://github.com/xiilei/dwml to help with the conversion. Another alternative way of representing equation would be to convert them into images. But I'm not very sure how that can be done. Let me know what you think. I can also help getting a PR ready for this if we can make a concrete plan for the implementation. Thanks again :) |
Images are no good in my opinion, as it looses semantics. MathML seems to be the best fit for HTML. Maybe look at https://github.com/jgm/texmath to do the heavy lifting? This library can go from OMML (Office Math Markup Language, used in Microsoft Office) to MathML. |
Hello, |
Any progess for this feature...? |
Just found out about KaTeX might be a good alternative to MathML |
A really important feature, would love to see it in python-mammoth. |
There is a trick to convert equation inside a docx file into LaTeX. As equation is stored as omath tag inside Here is a demo |
Very helpful! Thanks a lot! |
Hi @mwilliamson There are any news or suggestions to support Math and Chemistry Formulas? How could we collaborate with this issue to achieve it? |
Currently it ignores equations with the following warning
An unrecognised element was ignored: {http://schemas.openxmlformats.org/officeDocument/2006/math}oMath
Is it possible to add support for equations?
Thanks for all your work. :)
The text was updated successfully, but these errors were encountered: