# Forums | Mahara Community

## Developers / Math on Mahara

Posts: 15

17 June 2011, 9:39 PM

Hi, I've successfully managed to put dragmath on my moodle, with the icon displaying in the tinymce editor, and am using MathJax to render throughout the moodle.

I'd like to do the same for mahara, so that my students (and I) will be able to use dragmath or something like it when entering content into portfolio views so that they don't have to be LaTex or MathML experts from the start. And then I'd like to incorporate MathJax as the site renderer.

With moodle, dragmath has an automatic installation package. Does anyone know how to get the job done with mahara? I plan to give it a go in a few days, but if anyone already knows or has some insight please let me know.

I'm quite a novice, and mainly just fumble my way through php files and such until I manage to get things working or ruin the lot. So please be kind with the detail.

Thanks!

Posts: 3509
##### Re: Math on Mahara

17 June 2011, 11:14 PM

Hello Malcolm,

MathJax should already work on Mahara according to http://mahara.org/interaction/forum/topic.php?id=2882

Then it would only be dragmath that you'd have to investigate. I don't remember anybody writing anything about it here.

Cheers

Kristina

Posts: 15
##### Re: Math on Mahara

18 June 2011, 12:54 AM

Thanks for pointing out that forum topic to me, Kristina. It looks like MathJax isn't bundled with Mahara, but that it's easily integrated.

I'll give it a try soon.

Thanks,

Malcolm

Posts: 3509
##### Re: Math on Mahara

18 June 2011, 10:35 PM

Hello Malcolm,

No, MathJax isn't bundled. You'd have to install it separately.

Cheers

Kristina

Posts: 3509
##### Re: Math on Mahara

18 June 2011, 10:58 PM

Hi Malcolm,

dajan posted his opinion at https://bugs.launchpad.net/mahara/+bug/730373

Cheers

Kristina

Posts: 15
##### Re: Math on Mahara

18 June 2011, 11:49 PM

I don't know what you mean by bundled I guess. It isn't in any of my mahara folders that came with the install, nor is it a plugin on the wiki.

I can follow the directions (probably) to put MathJax into Mahara from the blog you sent me to, but MathJax has a newer way of doing it now. They recommend the use of the following script in the head of any page to display math LateX or MathML. Unfortunately, I haven't found the place to insert the script. I tried the themeconfig.php for my theme, but get a parse error, or if I put it outside the php tags, I get an error about 'something really bad having happened' when the header is called.

Do you know where it should go to render math text on any page in mahara?

<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Posts: 3509
##### Re: Math on Mahara

19 June 2011, 4:04 AM

Hello Malcolm,

Oops. I meant to write "isn't". I don't know which file would be the best to put the extra code in. A developer would need to answer this question instead of me making a wild guess.

Cheers

Kristina

Posts: 253
##### Re: Math on Mahara

19 June 2011, 9:48 AM

Hi Malcom,

edit lib/web.php, and around line 221 (for Mahara 1.3, 229 for Mahara 1.4), you will see a line that reads:

$javascript_array[] =$jsroot . 'keyboardNavigation.js';

just add the following line above that one:

\$javascript_array[] = 'http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML';

That should do the trick :-)

Saludos.
Iñaki.

Posts: 15
##### Re: Math on Mahara

19 June 2011, 8:57 PM

Hi Iñaki,

thanks a million, it did indeed do the trick.

B. Regards,

Malcolm

Posts: 15
##### Re: Math on Mahara

20 June 2011, 9:58 PM

Since I also mentioned dragmath in this topic, I thought I'd update on that.

Instead of using dragmath, I added in wiris (which looks good to me now that I've learned about it).

To integrate wiris, I followed their moodle directions: http://www.wiris.com/en/plugins/docs/moodle/moodle-2.0

In conjuction with advice from an older topic on this forum: http://mahara.org/interaction/forum/topic.php?id=1944

Thanks for all the help on getting math on my mahara.

-Malcolm

17 results