Text editors

error in Atto's equation editor (matrix)

 
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Przemyslaw Stencel
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 surprise  But the code entered via the button is not.  thoughtful 

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: -
Picture of Geoffrey Rowland
Re: error in Atto's equation editor (matrix)
Group Plugin developers

Hi Przemyslaw

This is an annoying and long standing issue:

MDL-45067

MDL-50935

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:

https://moodle.org/plugins/atto_matrix


 
Average of ratings: Useful (1)
Picture of Przemyslaw Stencel
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: -
Picture of Daniel Thies
Re: error in Atto's equation editor (matrix)
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

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)
Picture of Przemyslaw Stencel
Re: error in Atto's equation editor (matrix)
 

Thank you smile

That's the piece I was missing smile

 
Average of ratings: -