Math Functions

Can you add math functions such as exponents, square roots ect to the text options?

Content types: 
BV52's picture

Hi dkrefting,

You can insert Math functions using LaTeX. You can chgek this documentation for more details.

-BV 

What I see in the document is that this works from an LMS or other system. I am creating via our AEA Learning Online H5P paid account and taking the embed code from there. It doesn't appear that LaTex works that way or am I reading it wrong.

This is only via an LMS and not using the text tool through our AEA Learning Online H5P account where we create and embed from. Correct?

BV52's picture

Hi dkrefting,

If I'm not mistaken you have an H5P.com subscription, if this is the case you can use this documentation as a guide.

-BV

Thanks- I have had to use ascii math for another site I am working in and they have all of this to help http://asciimath.org/. Do you know of one for Latex?  All of these different things just makes my head hurt. :)  Yes we have an h5p.com account.

BV52's picture

Hi dkrefting,

I'm not sure there is but let me check with the H5P.com dev team, I'll get back to you within the week.

-BV

fnoks's picture

Maybe this could be helpful: https://www.hostmath.com/

This is an amazing site. I really appreciate your help!

I really appreciate all your help. I kinda figured out part of it but when I add the latex code in a sentence ie k predicts a growth factor of 1.03 while l predicts a growth factor of $$e^{0.03}$$, which is a bit more than 1.03.  It puts a carriage return before and after the code.  I have copied the line and pasted it clean- no difference. How do I take care of that?  I have enclosed a screen shot of what it looks like.

otacke's picture

Hi dkrefting!

Have you actually checked the documentation at https://h5p.org/mathematical-expressions ? I believe your question is answered there.

Best,

Oliver 

Oliver- thank you. Yes I have. That document is for those using an LMS to host h5p.  I am not doing that. I am working through h5p.com and embedding directly from there.

 

otacke's picture

Hi dkrefting!

I beg to differ. The usage is the same:

Mathematical expressions can be added to all text fields in the H5P authoring tool. There are three different ways you can use to let H5P know this is LaTeX:

 

  • \( some LaTeX \) for inline LaTeX, commonly used as part of sentences within a text
  • \[ some LaTeX \] or optionally $$ some LaTeX $$ for block LaTeX, commonly used as a standalone formula that will be centered

Cheers,
Oliver

Oliver- it took a lot of reworking the code.  But that works. Thanks you for your help.  I found out that a lot of the coding wasn't working on the first panel item with just the code (using accordian) but if I added text or carriage return before the code OR adding another panel it finally worked. That was what was throwing me off in trying a variety of coding. Not sure why but I believe the code is working.

otacke's picture

All is well that ends well :-)