Note: You are currently viewing documentation for Moodle 2.3. Up-to-date documentation for the latest stable version is available here: Algebra filter.

Algebra filter: Difference between revisions

From MoodleDocs
mNo edit summary
No edit summary
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Moodle has an  "algebra filter" which can display mathematical expressions as if they were typeset. The filter is included in the standard Moodle packages but the administrator must activate it before you can use it and it requires that the Moodle Tex filter also be working as the algebra filter simply parses math expressions in one syntax and then converts the expressions to LaTex expressions for the Tex filter to render and display.
{{Improve}}
{{Filters}}
==Generally==
Moodle has an  "algebra filter" which can display mathematical expressions as if they were typeset. The filter is included in the standard Moodle packages but the administrator must activate it before you can use it.


Unfortunately, though implementation of Tex for Moodle Docs has been demonstrated (see e.g. https://docs.moodle.org/test/Development:MediaWiki_TeX_test) that functionality has yet to be addressed in the production version of moodle docs.
NOTE that use of the algebra filter REQUIRES that the Moodle Tex filter also be working as the algebra filter simply parses math expressions in one syntax and then converts the expressions to LaTex expressions for the Tex filter to render and display. The filter uses a perl script borrowed from


More to the point, while it has been argued that the algebra filter is easy to use, there is apparently no Moodle reference on its "grammar" or "syntax".  See http://moodle.org/mod/forum/discuss.php?d=126522&parent=554632 for links to an explanation of this notation from the Webworks site.
The filter (see http://cvs.moodle.org/moodle/filter/algebra/ ) uses algebra2tex.pl, a perl script (and its associated perl module, AlgParser.pm) to parse text expressions delimited by double@ signs as tokens (though the tokens employed can be tweaked manually.)


Unfortunately, the advent of the $$TeX$$ notation seems to have swamped the Algebra Notation. Very little discussion or resources have been devoted to this filter, and a lot more has been directed at TeX Notation.  
NOTE perl script REQUIRES '''Perl'''. This is no problem with most Linux servers, but may be the cause for malfunctions in the Win world like broken connections. Exceptions / failures are NOT catched and reported via this Moodle filter.
If there is no Perl available, activate Moodle Tex (as mentioned above) and use the JAVA Math Formula Editor. It is available after activating Tex. Minor corrections in the resulting Tex code dont need deeper digging in Tex fundamentals.
 
While many have argued that the algebra filter is easy to use, there is apparently no Moodle reference on its "grammar" or "syntax". Research in to Webworks produced these two links for using webworks text expressions (the first one is arguably replaced by the second):
 
* http://webwork.math.rochester.edu/docs/docs/pglanguage/availableFunctions.html
* http://webwork.maa.org/wiki/Mathematical_notation_recognized_by_WeBWorK
 
See http://moodle.org/mod/forum/discuss.php?d=126522&parent=554632.
 
There is a discussion of Algebra filter syntax at http://moodle.org/mod/forum/discuss.php?d=5402 offered by [http://moodle.org/user/view.php?id=2466&course=5 Zbigniew Fiedorowicz].
 
It appears that as of Moodle.org moving to Moodle 2 (late 2010) the Algebra filter in the forums is no longer working. It also appears that the Algebra filter does not work in Moodle Docs (which is not Moodle code, but MediaWiki, which I don't believe has a ready filter based on algebra2tex.pl.
 
==Troubleshooting==
The file algebradebug.php is provided in the filter folder for the purpose of debugging. Problems may arise comes from the first tags in algebradebug.php
 
define('NO_MOODLE_COOKIES', true); // Because it interferes with caching
 
You can delete the line or set it to false.


[[Category:Filter]]
[[Category:Mathematics]]
[[Category:Mathematics]]


[[fr:Filtre Algebra]]
[[fr:Filtre Algebra]]

Latest revision as of 19:16, 16 November 2012

This page really needs improving. Please see the page comments for suggestions of what to include, then remove this template when you're done.

Generally

Moodle has an "algebra filter" which can display mathematical expressions as if they were typeset. The filter is included in the standard Moodle packages but the administrator must activate it before you can use it.

NOTE that use of the algebra filter REQUIRES that the Moodle Tex filter also be working as the algebra filter simply parses math expressions in one syntax and then converts the expressions to LaTex expressions for the Tex filter to render and display. The filter uses a perl script borrowed from

The filter (see http://cvs.moodle.org/moodle/filter/algebra/ ) uses algebra2tex.pl, a perl script (and its associated perl module, AlgParser.pm) to parse text expressions delimited by double@ signs as tokens (though the tokens employed can be tweaked manually.)

NOTE perl script REQUIRES Perl. This is no problem with most Linux servers, but may be the cause for malfunctions in the Win world like broken connections. Exceptions / failures are NOT catched and reported via this Moodle filter. If there is no Perl available, activate Moodle Tex (as mentioned above) and use the JAVA Math Formula Editor. It is available after activating Tex. Minor corrections in the resulting Tex code dont need deeper digging in Tex fundamentals.

While many have argued that the algebra filter is easy to use, there is apparently no Moodle reference on its "grammar" or "syntax". Research in to Webworks produced these two links for using webworks text expressions (the first one is arguably replaced by the second):

See http://moodle.org/mod/forum/discuss.php?d=126522&parent=554632.

There is a discussion of Algebra filter syntax at http://moodle.org/mod/forum/discuss.php?d=5402 offered by Zbigniew Fiedorowicz.

It appears that as of Moodle.org moving to Moodle 2 (late 2010) the Algebra filter in the forums is no longer working. It also appears that the Algebra filter does not work in Moodle Docs (which is not Moodle code, but MediaWiki, which I don't believe has a ready filter based on algebra2tex.pl.

Troubleshooting

The file algebradebug.php is provided in the filter folder for the purpose of debugging. Problems may arise comes from the first tags in algebradebug.php

define('NO_MOODLE_COOKIES', true); // Because it interferes with caching

You can delete the line or set it to false.