h5p-editor-php-library
h5p-editor-php-library copied to clipboard
Add LaTeX-Support for Input
Special for all kind of Natural Science and Math a lot fo formulas are needed. Instead of uploading a picture für every formula it would be nice, if LaTex would be supported in the input lines. In LearningApps.org the Code is inherited with $$LaTeX-Code$$ and then renderd, when the text is loaded in an activity.
Thanks
PS: I'm not sure if this is the right place to ask for it but "h5p-editor" sounds good.
Hi @BiLachner , this is a really good idea and it has been discussed quite a bit on the forums: https://h5p.org/search/node/latex If someone from the community contributes the code or hires a third party to develop it, the Core Team will happily review and merge it in.
https://www.mathjax.org/
Hi, we have done that in the following way, we rebuild the ckeditor with the builder link from build-config.js and added the "Mathematical Formulas" Plugin. Theres a little extra work to trigger mathjax when the input comes late as when using interactive video, for this we hacked the library js/h5p.js (https://github.com/TobiGa/hvp_mathjax_library/blob/master/js/h5p.js line 363-469)
In the upcoming release, H5P will support adding mathematical formulas. It is implemented in a generic way (introducing something called addons):
- There's a new library called h5p-math-display
- Whenever you type e.g. $$<latex>$$, this library will be included when you view the content type
- h5p-math-display will load mathjax, which processes all latex expressions