LaTeX and mhchem in H5P

LaTeX and mhchem in H5P

by Benjamin Samudio -
Number of replies: 1

First, I want to say thank you so much to Moodle and H5P for what you do!  Because of your generous work, I am able to make engaging and interactive online content for my students. 

The creation of the Content Bank has been so helpful.  I teach chemistry and would very much like a way to use LaTeX/MathJax and mhchem in H5P content (mod_h5pactivity via the Content Bank) the way that I am able to in Moodle pages, for example.  Currently, I am able to use LaTeX (but not mhchem) in mod_hvp.  The version of Moodle that I use is 3.9+ (build: 20200618).

I am new to Moodle but already very much enjoy it.  I am hosting a Bitnami Moodle stack on AWS.  I have some facility with computer programming/servers and I am wondering if there might be a way to incorporate a molecular visualization program, such as 3Dmol.js, into Moodle.  Is it a matter of copying the 3Dmol.js library to the server that I use?  I've looked through the Moodle documentation but I'm not sure how to proceed.  Any input on this would be very much appreciated!

Average of ratings: -
In reply to Benjamin Samudio

Re: LaTeX and mhchem in H5P

by Benjamin Waller -
Hello Benjamin,

From what I understand, to reuse the H5P packages that you created and currently use via the mod_hvp (H5P plugin) in the new Content Bank, you can first download them (the .h5p file/s) then upload or create new ones in the Content Bank of your course. Then you should be able to add them into Moodle pages as you like.
I haven't had any experience with adding 3rd party JS libraries but doing a quick search pulled up the following for me.

Moodle docsJavascript Modules

Moodle docs - Guide to adding third party jQuery for AMD
Moodle Forum post -  Using third party JS in amd modules


Hope that helps,

Ben