## Text editors

### error in Atto's equation editor (matrix)

error in Atto's equation editor (matrix)

Hi all,

There seems to be an error in Atto's equation editor - the advanced tab contains a button which is supposed to enter a matrix:

However, the button (and the Tex code inserted) is missing one backslash, and as a result - is not displaying the matrix correctly. The code should be:

I looked through the equation editor's files and found a place which seems to hold the buttons - in the /lib/editor/atto/plugins/equation/settings.php file:

However, as you can see, the Tex code in that file is correct   But the code entered via the button is not.

Moreover, when I tried to edit the /lib/editor/atto/plugins/equation/settings.php file, my changes were not reflected in the editor (purging caches did not help). Is there another place I should edit?

Average of ratings: -
Re: error in Atto's equation editor (matrix)

Hi Przemyslaw

This is an annoying and long standing issue:

The problem is that \ is treated as an escape character by PHP. So to display \\ in TeX you need \\\\ in settings.php.

If you make a lot of use of matrices in Moodle, you may find this plugin useful:

Average of ratings: Useful (1)
Re: error in Atto's equation editor (matrix)

Thank you, Geoffrey,

However, even when I made the change in settings.php (introduced 4 backslashes instead of 2), the editor still shows the wrong matrix. I have purged all caches (/admin/purgecaches.php) but there's no effect. Is there anything else I need to do?

Average of ratings: -
Re: error in Atto's equation editor (matrix)

The value in settings.php is a default value that is used to load the admin settings when the plugin is first installed. If the default setting is already loaded, then you need to change it in the settings for the Atto on the site.

Average of ratings: Useful (1)
Re: error in Atto's equation editor (matrix)

Thank you

That's the piece I was missing

Average of ratings: -