## Mathematics tools

### New 2.7 Equation Editor - Missing Key Items

New 2.7 Equation Editor - Missing Key Items

I was just doing some tests on qa.moodle.net and got to playing around with the new equation editor.  I found it decent enough but missing several items I thought would be pretty basic requirements:

Fractions
Subscripts/superscripts
Square roots
n-th roots

I went hunting and found Geoffrey Rowland had already raised MDL-45067 with an even better listing than mine.  Go vote.

Average of ratings: Useful (1)
Re: New 2.7 Equation Editor - Missing Key Items

Hi Joshua,

If you have admin access to a Moodle 2.7 site, you can add many of those extra items yourself. Literally, that was just what I was experimenting with when your post hit my email inbox.

Here is the advanced tab before change:

And here is the same tab after adding from Geoffrey Rowland's list:

P.S. It also makes it possible to fix the matrix one - which I forgot to do before making these pictures.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

That's great, but we should try to get the default right for everyone when Moodle is first installed.

Please could you add the details of how you configured that to MDL-45067?

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

Hi Joshua et al.

Thanks for the 'rabble-rousing'. Have just uploaded my current customised settings.php file for the Atto Equation Editor to MDL-45067. Also, added a few notes regarding some of my particular choices. Since Damian Weise recently fixed MDL-45009, this works for me using either the 'new' MathJax filter or the 'old' TeX filter on a recent Moodle 2.7 beta Git download.

This has all been informed by my recent tinkerings with Daniel Thies's MathSlate plugin. Indeed, there are a quite a few other features of MathSlate that could be incorporated in (adapted to) the new Moodle Atto Equation Editor. Of course, I do appreciate that the main focus is to get something functional and stable in core for the looming Moodle 2.7 release. Can set up tracker entries if there is wider interest.

1. Undo, Redo and Clear buttons (for the equation editor, not Atto). Building equations can be a bit fiddly So, these help avoid frustration!

2. The ability to add 'display' (newline, centred) equations - bounded by \[ ]\ , in addition to 'Inline' equations - bounded by . Appreciate that this is complicated because, as I understand it, the current Moodle default is to only use inline equations (bounded by the, now deprecated, double-dollars).

3. Some of the interactive YUI features in MathSlate, e.g. placeholders, drag-and-drop creation and rearrangement of equations, double-click deletion of equation elements etc.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

4. Should the mouse-over button title ("tool-tip") provide a brief description/explanation (lang file) rather than just showing the TeX code? eg 'Greater than or equal to' rather than '\geq''.

...and some screenshots. Too many buttons? But then it is easier to delete them rather than add them. Perhaps distribute over more tab categories?

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

Geoffrey -

Is it just a matter of placing your settings.php file into var/www/moodle/lib/editor/atto/plugins/equation? I have done that and the fractions buttons still do not exist.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items
The settings.php file only changes the default installation setting.  You need to update the setting if it is already installed.  If you go to the admin settings page for Equation under Atto you should see the new default setting.  You can copy and paste it into place or uninstall and reinstall the plugin.

Average of ratings: Useful (2)
Re: New 2.7 Equation Editor - Missing Key Items

As Daniel outlines, you need to update the configuration at Administration > Site administration > Plugins > Text editors > Atto HTML editor > Equation editor settings.

A nice feature of the new Equation editor is that you don't have to stick with he default settings and can easily add buttons for just about any TeX symbol or construct. It should be good to see what different practitioners come up with.

After this, you *may* also need to visit Administration > Site administration > Development> Purge all caches and then select the [Purge all caches] button to ensure the script updates 'take'.

Average of ratings: Useful (2)
Re: New 2.7 Equation Editor - Missing Key Items

I tried adding \frac and it did but it's not showing a graphical button like the other ones..

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

Each of the buttons has to be a valid TeX expression (not missing arguments).  Otherwise the TeX code appears which is actually an error message. You need to include an example numerator and denominator like \frac a b which will appear as $$\frac a b$$ in the button.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

You can tell I'm not a math person Thanks. I was able to take the settings fiel from https://tracker.moodle.org/browse/MDL-45067 and replaced it with mine, then copied and pasted the default text into the default fields.

Good to know the problem with not seeing key buttons is simply them not showing and we have the ability to add them in.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

Ooops

Just noticed that in the code in MDL-45067

\frac{a}{b}

is misleadingly displayed as:

\frac

{a}{b}

Apologies for any confusion.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

Geoff really does have a good eye for this stuff. The feedback he has given me has been great.

There needs to be a lot more mathematical thought put into configuration of the equation tool which the development process has not yet addressed.  The admin settings allow the rather easy customization of the TeX library offerings. I think this is very important because Moodle is used in a number of different environments.  There needs to be a advanced configuration available that is reasonably complete because even advanced teachers may not be TeX proficient, but I think it is important also to have it right on the lower end.  Before we get carried away adding features for multivariate integration, should we not ask whether it will discourage the average elementary teacher from using the tool? It might be better to have a simple default and put more advanced features in the docs.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

Agree entirely!

MDL-45067 started as a simple fix of the 2x2 matrix button, then turned into a TeX 'brain-dump'!

I posted the screenshots with the specific aim of encouraging some reorganisation and 'whittling-down' of the buttons. I'm a scientist, not a maths-specialist. My experimentalist nature likes to tinker with something that exists. Many of my expectations of and preconceptions about e-learning have proved wrong.

May well be difficult to come up with one layout for all educational contexts. However, given the easy configuration of the new Moodle equation editor, I'm sure we can come up with a default for Moodle 2.7 that's as good as, or better than, the existing options such as DragMath, Wiris or CodeCogs. By all means post suggestions here or as comments to MDL-45067

Simply moving some of basic options on the 'Advanced' tab to the first (leftmost) tab  - and stripping out most of the relational operators to later tabs - should make things less intimidating.

As you suggest, if it's still scary, complexities can end up in the Moodle Docs. Though, to be honest, I have found the existing docs on Algebra,TeX filters etc are already pretty scary. Maths can be a complex business .

So, I still think it is useful to have good working, exemplars of at least some advanced features in the default editor.

Average of ratings: -
Re: New 2.7 Equation Editor - Missing Key Items

Over the past two weeks, I've been playing with 2.7 a lot doing some of the qa testing. Today I was trying out math stuff and thought I was going to have to give up on using color, but through a stroke of luck, I discovered it is very easy to add it back.

To anyone interested, you only need to make a very slight addition to the default MathJax configuration for Moodle 2.7. Just add "color.js", into the TeX extensions section of the configuration so it looks similar to this:

Once you've done that, \color and \definecolor will work.

Average of ratings: Useful (2)