Creating equations

Creating equations

by Dave Browning -
Number of replies: 23
I'm really sorry if this is a totally basic question but i've had a look around and can't seem to get an easy answer. What is the best way to create equations and mathematical symbols on Moodle? I'm sure there must be an easy way! Thanks in advance.
Average of ratings: -
In reply to Dave Browning

Re: Creating equations

by Ian Wild -
Picture of Plugin developers
Hi Dave,

Are you familiar with $$LaTeX$$? That's the default method. E.g. to write the fraction a half you would type \frac{1}{2} and enclose that in two dollars (i.e. $) - or "double-dollars" - either side of \frac{1}{2}). If I do that below then it gets rendered as a fraction...

$$\frac{1}{2}$$

I've got more information on basic $$LaTeX$$ at my maths website here...

http://www.yourmathstutor.info/wiki/articles:latex

You just need to remember to enclose the $$LaTeX$$ with double-dollars.

BUT BEFORE YOU TRY THAT: you need to make sure that the TeX filter is turned on in Site Administration > Modules > Filters > Manage filters.

You may well, at this stage, have problems trying to get your server set up to render maths. If you do then please do post back and we should be able to sort you out. There are lots of different options to render maths, but I find it's best to try the default option first.

Hope this helps,

Ian.
In reply to Dave Browning

Re: Creating equations

by Ramon Eixarch -
hi Dave,

WIRIS tools for Moodle are very easy to install (we have an automatic installer) and they work pretty well. The formula editor is WYSIWYG, that is based on icons and foders.

You only have to unzip a file in folder ../moodle/pluginwiris/ and then install automatically from ../moodle/pluginwiris/install.php

Have a look WIRIS Plugin for Moodle

It is a commercial tool with very reasonable prices. Demo version is available for evaluation.
In reply to Dave Browning

Re: Creating equations

by Mauno Korpelainen -

I'm afraid there is no really easy answer or easy way - still the best non commercial choice at the moment is most likely wysiwyg editor Dragmath http://moodle.org/mod/data/view.php?d=13&rid=1454 that is based on similar Java technology as Wiris (my opinion).

We have been testing a javascript based editor that can add asciimathml (based on equation editor of Xinha but it is not ready yet), you can also insert Special Characters (unicode) to create simple equations or for example use some other tool outside moodle to produce Tex and paste the code to editor between doubledollars (Tex filter enabled) and so on.

One easy solution is to add resources that contain mathematics - most people can use for example Word with equation editor.

In reply to Mauno Korpelainen

Re: Creating equations

by Ian Wild -
Picture of Plugin developers
Hi again,

Mauno is right - Dragmath is excellent - though if you are a school (especially UK), check to make sure the latest Java engine is installed on the clients (had a bit of a game with that in one school I was at this week).

I know I've spoken about using MathML with Marc before - and I'm going to hide under my desk after I've finished writing this black eye big grin- but I'm not convinced that MathML should be marketed as the panacea for rendering math notation. At least certainly not in England (don't know about Scotland). My reason is that MathML is not natively supported by IE - and Firefox support can be flakey if you don't have the right fonts installed. This has been a big problem I've had at the schools I've been visiting this week: they don't have full ownership of the server and clients. I'm afraid we just fell back to installing jsMath - which worked first time just fine.

Don't get me wrong: certainly the one school was completely won over by AsciiMathML - on the one client we managed to hack to get it working. But the whole procedure on the school system was so problematic (basically the way it seems to be with schools in England) that we gave up.

I tried.... I really tried smile.

Now I'm going to go and hide under my desk mixed...

Ian.
In reply to Ian Wild

Re: Creating equations

by Marc Grober -
<rant>
May the wrath of the W3C be upon you, Ian.... big grin

Fie on IE and the trolls who vend it!

Yes, Microsoft offers a browser that does not support critical W3C standards. If you insist on using this product ( and as I recall, it was the attempt to force users of their OS to use this self same product that was the basis for litigation against Microsoft for anti-trust violations) then you can install MathPlayer and Adobe SVG as plugins and things will work just fine....

And if you IT department insists that you use broken software while refusing to provide you tools to address the defects, you can use asciimathml with fallback (which, if fonts or tools are not present) will use mimetex or mathtran to display your code (whether the code is written in TeX or asciimath.)

And, font installation takes seconds either via the msi that was made available via MIT or via the STIX fonts.

Where IS the emoticon for raspberrrrrrriiiiieeeesssssssssss!?

I don't buy server issues.... If you can install jsMath on a server you can install asciimathml (we are only talking about two files that can live anywhere.....) and, being able to install via theme makes it very quick....

Nor do I buy client issues..... for if one can install firefox one can install the STIX fonts (perms is perms).

That is not to say I am anti-jsMath.... just that Tex is almost impossible for students to use (let alone teachers) is limited in focus and is not extensible.
</rant>

<politicalaside>
Now I constantly hammer my countryfolk as being foolish (my daughter is singing 'Oh Canada" as I write this upon the news that the Republican candidate for the U.S. Presidency has selected our useless Governor to be his running mate) but I have to wonder whether England should embargo Redmond's products if the results are as Ian suggests.....
</politicalaside>

<sigh>
Well, I shall retire to my dung heap
</sigh>
In reply to Marc Grober

Re: Creating equations

by Ian Wild -
Picture of Plugin developers
Ian calling out from under his desk...big grin

Hi all,

sad I'm sorry to depress everybody and make everyone sad. I can see I have brought dishonour upon my fellow Moodlers black eye. It's just that I go into so many different schools and colleges and the madness that is IT provision in the English education system may well be the subject of my next book...

I don't buy
server issues.... If you can install jsMath on a server you can install asciimathml (we are only talking about two files that can live anywhere.....)

Well, the reason is basically this: in the UK learners are likely to spend a few days in school, maybe a day or two a week at college *and* accessing work from home. The powers-that-be always argue that they want to be sure that math notation is rendered in a consistent way where-ever the course is accessed. Start mentioning MathML, fallback and fonts then (rightly or wrongly) they look away in horror.

Nor do I buy client issues..... for if one can install firefox one can install the STIX fonts (perms is perms).

In English schools it is very common for IT to be outsourced (to RM more often than not). IT being outsourced means the school itself really has very little control over what gets installed on clients.

being able to install via theme makes it very quick....

Not if you've outsourced to a host who doesn't even give you ftp access - believe me I've been to a school recently with this predicament (don't ask - and they get charged £90 *per hour* for *any* work on that server, including theming. And that's cheap around here).

just that Tex is almost impossible for students to use (let alone teachers)

Well, to be fair to educators and their students in the UK (can't speak for everyone else big grin), in my (humble) experience about half of teachers I train know LaTeX and are happy to edit it raw (me included, to be honest). Those that don't either use an equation editor or use MathType. Of course DragMath gets people very excited and I nearly always install it where-ever I go (when we've got server access smile ).

Students rarely (if at all) have problems with LaTeX. Without wanting to sound horrible, students who are having problems with math anyway don't need to know it.

mixed Let me know when its safe to come out from under the desk, won't you?

Cheers all,

Ian.









In reply to Ian Wild

Re: Creating equations

by Marc Grober -
Ian,

If the hair in your ear hasn't been burned and you still have eyebrows you may want to stay under the bed for awhile longer.....

What I am trying to say is that if you have perms to install jsMath you have perms to install asciimath, and if you have perms to install firefox, you have perms to install STIX fonts..... and if you have no perms to do anything (i.e. install fonts, browser or plugin on the client or install mimetex, jsmath or asciimath) because in outsourcing your IT you forgot to include some clause that reminds the vendor that they work for you, well you should be on the dole, not running an educational program.... and in as much as it costs almost nothing to run a Moodle for a small public school (I did the Math in another forum.... soemthing like a pound a year per student.... and unless you really are inept that will include shell access) we are really back to managing a client image.... and since any competent IT vendor will manage all school computers with one image, even if we allow they don't have the presence of mind to avoid you know what, install of FF and fonts is trivial....

But this has almost nothing to do with Math (let alone usage with readers for the disabled.... but then I suppose visually impaired in England are just to Wales to work in the coal mines ;=} - rage against the what, Mr. Thomas - and my apologies to all of Wales).... but then I know you have worked with the visually impaired, Ian (though that must have been in Scotland where I understand even the visually impaired can land a salmon on a dry fly while riding a broon coo......) and it figures that a bunch of Englishers can spend the time before tea twiddling with TeX but can't manage a browser..... so much for a place where the bowler is the national hat - la.

Where to now? Oy! I'll handle their bloody IT issues for 60% of what they are paying and outsource the helpdesk to the Taliban and still make a fine profit.... You haven't had tech support until you've had Taliban tech support..

Well, it is Friday and I have burned myself out (my apologies to anyone I haven't apologized to yet....) The important point, as you well know Ian (are you still under the bed) is that the little toads be able to do Math, and if you have managed that then everything else is largely water seeping through the levees.......... and wet Mathematicians are better than no Mathematicians at all

Good night to all, and to all a good night (except to Ian to whom I suppose a good morning is due big grin
In reply to Marc Grober

Re: Creating equations

by Ian Wild -
Picture of Plugin developers
Morning!

Welcome to the wonderful world of the English education system wink.

then I suppose visually impaired in England are just to Wales to work in the coal mines

Sadly the government shut them all in the 1980's big grin.

Ian.


In reply to Mauno Korpelainen

Re: Creating equations

by Lev Abramov -

Excuse me for disturbing the slumber of this cold-turkey discussion. I am looking for a way of getting the Omega button to be displayed in my editor. You said,

you can also insert Special Characters (unicode) to create simple equations

which leads me to believe you might know how to get that button to appear. Please enlighten!

In reply to Lev Abramov

Re: Creating equations

by Carsten Kummerow -

Hi Lev,

I am not sure if this will solve your problem. The Omega button maybe comes with a new version of moodle? I don't have it on my installation either, I have one which looks like the Windows special character symbol and includes less characters. What I do is that I usually have the Special Characters Map running while editing in moodle. I simply copy and paste them into the editor window.

Greetings,

Carsten

In reply to Carsten Kummerow

Re: Creating equations

by Lev Abramov -

hi Carsten!

I am writing about the Omega button that neither you nor I can make to appear in our editors, while using an instance of the editor that DOES HAVE it. Ironical, eh?

I realize that special characters can be entered by using their html codes. However, I am dealing with a website for a school; teachers have so much to do that it is unreasonable to expect them to learn this new tool. I would rather give them a GUI that allows doing it in an easier way.

Anybody? The Omega buttom mystery! (and not the Omega-3 fatty acid...)

smile

I sincerely hope that before long, someone will notice this posting and tell us how to get that button. The "Alpha Under Square Root" button was so easy to get - the Omega button cannot be much more complicated. I hope. sad

Lev

In reply to Lev Abramov

Re: Creating equations

by Mauno Korpelainen -

Different editors have different buttons...

Moodle 2 is using TinyMCE which has an "Omega button" - default editor of moodle 1.9.x is HTMLArea, which is using a little different button for special characters...

Omega

In reply to Mauno Korpelainen

Re: Creating equations

by Lev Abramov -

Hi Mauno! Thanx for the response!

Now I see "who is who". smile However, the difference is not only in the button: TinyMCE offers a set of Greek characters that are not present in the HTMLarea (see the attached image, with marking).

I wonder if it is possible to add these characters to the set displayed. Any HTMLarea experts around?

Attachment new_editor.gif
In reply to Lev Abramov

Re: Creating equations

by Mauno Korpelainen -

Yes it is - in fact Enrique posted a long time ago a modification of HTMLArea which allows you to add all possible unicode characters... http://moodle.org/mod/forum/discuss.php?d=20864

In reply to Mauno Korpelainen

Re: Creating equations

by Lev Abramov -

Right, he did. Unfortunately, the thread is incomplete: the file to be uploaded is posted - but the instructions (where to upload it and what changes to make in the code in order for the new file to get "acknowledged" by the editor) are missing. Help on this will be appreciated.

Moreover: both editors (TinyMCE and HTMLarea) are supplied with a standard Moodle 1.9.X distro - but there seems to be no field where one can select which editor to display and use. I may be wrong, of course - even with 8 years of using Moodle, I am not familiar with EVERY screen of its GUI. If there is a GUI way to select the editor, please let me know how I can get there.

Thanx for all the help!

Lev

In reply to Lev Abramov

Re: Creating equations

by Mauno Korpelainen -

Well... http://moodle.org/mod/forum/discuss.php?d=20864 had several versions of those files and http://tracker.moodle.org/browse/MDL-10243 had some more (by Enrique and Janne) so it may be hard to find the latest version.

Anyway that important part of code by Dean Stringer which made the plugin functional in IE seems to be missing from most files there so I attach to this post one version that should be functional - just unzip the files over your moodle 1.9.X

There is a README.txt file inside the package that tells:

This add support for ALL UTF-8 symbolsets within the HTMLarea editor in Moodle.
Simply expands current "specials symbols"  tool button.

To install simply uncompress lang and lib directories into your local moodel directory.
local-lang contains an uncumplete translation to Spanish of block names.

Currently  NOT ALL UTF-8 blocks are currently visible. Only a sensible subset of them.
You can edit     $utf8_blocks = array( in    utf8_blocks.php
to modify the last item, 0=invisible, 1=invisible.

I dropped folder
local-lang from this attached package.

That relic version of TinyMCE ( 2.0.3 - 2006-02-13 ) in moodle 1.9.X and previous core versions of moodle is outdated many years ago and should not be used anymore anywhere. It just tells us the long history of trials to change core editor and from old posts from years 2006 to 2009 you can find some more info about several ways to change editor but none of these integrations were fully functional. Moodle 2 has finally the latest version of TinyMCE but we may need to wait some more years to get a fully functional administration of all editor settings to (core) moodle 2.

In reply to Mauno Korpelainen

Re: Creating equations

by Lev Abramov -

Hi again, Mauno!

First of all, thanx for the help. I will try to install it (in the sandbox installation first - then if it works out I will repeat it on the production installation). If you don't hear from me for a few days it indicates that everything is OK. smile

Now, I cannot believe that this issue - editor selection and configuration - is SO unimportant that it should take a few years to sort out. After all, we do have the editor configuration screen. I am not a programmer, but from what I know about the Moodle code, it should not be so hard to add a drop-down list that would allow the selection of the desired editor (provided more than one is installed).

It should not be too hard to install/upgrade an editor with the latest version (and, to tell the truth, I would make sure that every updated version of Moodle includes the latest available version of each editor supplied - or at least a set of instructions on the upgrade procedure).

Or am I oversimplifying?

Thanx again -

Lev

In reply to Lev Abramov

Re: Creating equations

by Mauno Korpelainen -

No, it's not hard to change editor - it was possible already in moodle 1.6 - and it is possible both in moodle 1.9.X and moodle 2. Before moodle 2 all editor functions were hardcoded to files like moodlelib.php and editorlib.php but it was possible to modify those functions or to disable default editor in theme and replace textareas with most available editors. The only major problem were different "moodle hacks" of HTMLArea - repository, multilang menus, translation, spellchecker configuration, smileys and things like that. HTMLArea was built-in default editor.

In moodle 2 new editor code is fully pluggable and it is also possible to add any new plugins and new editor versions/configurations of default editor tinymce and have different settings for each editor but integration of other editors than tinymce (for example CKEditor) is not so simple because moodle requires some "moodle features" like that translation and repository to work the same way in all editors.

I have used custom editors all the time during the past few years - my point was just that CORE moodle has not offered more than one version of HTMLArea or TinyMCE for all users - I am sure that we will see more advanced editor/button/setting switchers in the very near future, or at the latest in moodle 2.1 smile ( moodle 2 already has that code to support any editor settings but it is not yet in use in core files )

In reply to Mauno Korpelainen

Re: Creating equations

by Caroline Amos -

Hi Mauno,

You mention that people can use word with equation editor - great news.  Having created my equation in word, how on Earth do I get it into Moodle?  I've tried copy and paste, but it will only insert it as plain text.

Help??

Caroline

In reply to Caroline Amos

Re: Creating equations

by Marc Grober -

Risking the wrath of the Moodledum for piping in when a question is addressed to someone else, let me note that the post to which you are responding is, in net terms, old as dirt.

You can add your native MS-Word docs as resources or link to invocation of the doc via google doc viewer (this method can also eaily be embedded in Moodle which makes it a very handy way for people wed to poorly engineered office aplications, like MS-Word, to use documents created by such aplication in their native format, and still allow persons who would rather not be troubled with such poor software to view the products created.)

OR, convert the doc to html and have them rendered as images OR convert to pdf and have the whole thing rendered as image, OR convert to half a dozen other formats that are not a pain in my %^$#^.

The initial inquiry must be how you intend to serve up your material,  and if it is your intention to serve up your material as direct access to MS Word doc  docx files, then I think you need to think things through a bit more. The paradgm under which you labor has arguably passed, like the brontosaurus ;=}

Now, if you want something to develop materials in, then OpenOffice (or LibreOffice) makes a better candidate than MSO IMHO.  You can actually use extensions to export as mathml creatins created with its gui equatin editor, or even insert laTex to be rendered as either tokenized text expressions or as images.

Of course, you could use DragMath as a standalone app with either MSO or OOo/LO to create tokenized text expressions to place in your word processing document. You can then cut and paste to Moodle web resources from OOo/LO (doing that from MSO often backfires unfortunately.

Good luck

In reply to Marc Grober

Re: Creating equations

by Colin Fraser -
Picture of Documentation writers Picture of Testers

If Marc is claiming major paindom then I have to be the buzzing fly that is annoying but no-one is able to rid themselves of.

Have you considered what treasures may lie in these Moodle Docs?

In reply to Colin Fraser

Re: Creating equations

by Marc Grober -

LOL - my point exactly, Colin, which is why I wanted to implement an active lookup system that would push the user through an engineered search before they could post a question like, 'Is Moodle spelled with two "o"s?'

I am happy to HELP anyone, but that is a far cry from doing someone else's legwork. and on such points I truly do symathize with the devs no matter my take on the end product ( and I still think you are a bit naive about Austin and Merrell ) - RTFM may be a little harsh, but things are getting out of control......

In reply to Marc Grober

Re: Creating equations

by Colin Fraser -
Picture of Documentation writers Picture of Testers

<offtopic>

Marc, A&M dug their own grave, after a long term use of a system that no longer functioned as required - they were whinging about what? Bad advice from someone that should have known better? When has that ever been different? They also missed the point, or rather they did not accept, that reporting and recording is different in detail in every nation in the world, even if the fundamentals and the needs are exactly the same - the devil is in the detail. A&M can complain, but fact is, Tim is right it is not their standards that needs be met, and I suggested if they think it should then they can do something about it. "Why should I bother fixing someone's poor design" was a phrase used. In such an evolving tool, what is "poor design"? And while there is lots to fix, it is not that much that it renders Moodle useless or nearly so. They could have designed a new Gradebook, even if they kept it inhouse, but they chose to complain. No sympathy for them..

And my favourite, Moodle Docs are a collection of pages that contain some of the most ludicrous language, convoluted contradictions, questionable qualifications, meandering mutterings and inane instructions I have ever read and misunderstood. I know I sound somewhat ingenuous, at times, but fact is, my command of the language is not that good. For me, writing technical documentation is torture, and writing these responses is a serious editing task, (I talk a lot, but say little and still manage to offend everyonetongueout). A&M could do these things easily, but they chose not to, so for me, a couple of academics hiding their own unwillingness to adapt behind the veneer of a "paper" is really poor form. What they said is not totally invalid, but, fo rme, the motivation is questionable.

</offtopic>

While we are on about Tex Filter , a question, your feelings about mimetic and Moodle's Tex Notation filter are well know, and these are limited tools, certainly, but why not encourage to use them as we did Turbo Pascal, if you remember that far back, pre-VB and "Visual" C++ ( a lie that one) The Tex filter can be a handy and simplistic introduction to Tex, it has been for me anyway. I am now using MikTex to produce PDFs I am using in Moodle. (not ideal, but is better than over using the Tex Notation filter.) Big change!... It isn't MathJax or AsciiMath, but it works and it offers me some basic practice on document layouts etc. I started though, on the Tex Notation filter and while I still use it, the main effort is not with MikTex. When I dump Windows altogether, soon now, I am hoping that TexLive will be the better option. Probably going to OpenSuse so any recommendations?