-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 math formulas in docx files #295
base: main
Are you sure you want to change the base?
Conversation
Office equations are surrounded with $formula$ $/formula$ before they are converted to html using mammoth. After HTML is generated, they are converted to latex using XSL
This is pretty neat. I know it's marked as draft, but I'd be interested to include it when ready. On that note, can you add some unit test cases -- at your convenience -- so that formulas can be included in the continuous integration testing pipeline? |
@microsoft-github-policy-service agree |
@afourney this should be ready for review |
I've just done a large refactoring, that will make this PR hard to merge directly. If you get it working with your branch, (adding those two missing files), I will handle the merge conflict -- don't worry. |
This is a really helpful function. Waiting for the PR to be merged. Thanks @marromlam and @afourney for working on this. |
Added those missing files @afourney |
Thanks. The code has since advanced, and introduce some merge conflicts. I will try to work through those tomorrow, or later this week, and I'll let you know if I run into any trouble. The main issue, is that I'd like to perform these operations in-memory. It's tricky though, because you are rewriting the zip file. I think it can still be done though! |
Oh, and where do those files originate @marromlam? I'll need to be careful about copyrights etc. |
ooml2mml.xsl is shipped with MS Office in the resources folder, and I imagine it is used by MS Word to do those kind of conversions. The other xsl files were taken from: http://www.raleigh.ru/MathML/mmltex/index.php?lang=en |
closes #289