Input | Output |

@@@x^2@@@ | @@x^2@@ |

@@@A=pi r^2@@@ | @@A=pi r^2@@ |

@@@dy/dx=3x^2/y^3@@@ | @@dy/dx=3x^2/y^3@@ |

@@@asin(x/y)@@@ | @@asin(x/y)@@ |

@@@int(x/(x^2+4) dx)@@@ | @@int(x/(x^2+4) dx)@@ |

@@@int(x/(x^2+4) dx,0,1)@@@ | @@int(x/(x^2+4) dx,0,1)@@ |

@@@sqrt(x^2+y^2)@@@ | @@sqrt(x^2+y^2)@@ |

@@@sqrt(x^2+y^2,3)@@@ | @@sqrt(x^2+y^2,3)@@ |

@@@x>=1@@@ | @@x>=1@@ |

@@@x<=pi@@@ | @@x<=pi@@ |

@@@x<>infty@@@ | @@x<>infty@@ |

@@@cos(x,2)+sin(x,2)=1@@@ | @@cos(x,2)+sin(x,2)=1@@ |

@@@cosh(x,2)-sinh(x,2)=1@@@ | @@cosh(x,2)-sinh(x,2)=1@@ |

@@@lim((x-2)/(x^2-4),x,2)=1/4@@@ | @@lim((x-2)/(x^2-4),x,2)=1/4@@ |

@@@lim(x/(x^2+1),x,infty)=0@@@ | @@lim(x/(x^2+1),x,infty)=0@@ |

Great job!

Is there any way to avoid the superfluous parentheses in the denominators of some of these expressions?

Lars.

Is there any way to avoid the superfluous parentheses in the denominators of some of these expressions?

No, not the way the filter currently works. It relies on the WeBWorK parsing engine, which puts in the extra parentheses. Martin doesn't like it either, because it's written in Perl.

Currently @@pi@@ is the only Greek letter that the algebra filter recognizes. It would not be difficult to add other Greek letters to the list of allowed constants/variables. However the algebra filter is really meant to handle only very simple expressions. More complicated expressions are supposed to be handled with the TeX filter. For instance $$$\alpha$$$ => $$\alpha$$. You can use the algebra debugger I posted here to translate a calculator type algebraic expression into TeX, edit it manually to add extra symbols, delete unwanted parentheses, etc., then paste it within double dollar signs to be handled by the TeX filter.

A long term goal that Martin and Janne are hoping to realize is to integrate a mathematics editor into the HTML Editor to output MathML.

Lars.

You produced this with the TeX filter, right? My comment went on the calculator filter - not the tex filter.

It is hard to produce the above expression with the calculator filter - correct me if I'm wrong. For an expression like the above, most students will enter, @@@x/((x+1)(x-1))@@@ to produce this:

@@x/((x+1)(x-1))@@

Wouldn't stripping the first \left and the last \right from the tex-translation of the denominator of a calculator notation expression solve this problem?

Lars.

There does seems to be a problem here - I think I may be coming around to your original point of view that it may be problematic to remove any parentheses:

Check out these:

@@@1/( (c+d)/(e+f) )@@@, which produces: @@1/( (c+d)/(e+f) )@@

@@@1/( (c+d)/(e+f)/(g+h) )@@@, which produces: @@1/( (c+d)/(e+f)/(g+h) )@@

@@@1/( (c+d)/(e+f)(g+h) )@@@, which produces: @@1/( (c+d)/(e+f)(g+h) )@@

Lars.

Please stick to your other thread where I have posted info about open_basedir.

As I said, you are not getting anything from the tex binaries and are getting the results of mimetex only.

What I want to show is @@(3.72 x 5.13)/0.2=1.4 with the x appearing as a times sign.

This is for a GCSE exam practice and is needed for an example.

$$$(3.72\times 5.13)/0.2=1.4$$$ => $$(3.72\times 5.13)/0.2=1.4$$

or

$$$\frac{3.72\times 5.13}{0.2}=1.4$$$ => $$\frac{3.72\times 5.13}{0.2}=1.4$$

Hi,Zbigniew Fiedorowicz :

Would please show me below in TeX syntax(or algebra),thank you very much!

98
__ ×76__

588
__ 6860
__ 7448

renders

$$\Large \begin{array}{r} 98 \\ \times 76 \\ \hline 588 \\ 6860 \\ \hline 7448\end{array}$$

Oops. The copy of mimetex on moodle is several years old and doesn't seem to recognize \hline. Download a recent copy of mimetex from http://www.forkosh.com/mimetex.html which will render (with slightly better antialiasing and gamma video correction than the old version, too)

The algebra filter parses text expressions using the webworks algebra parser, then essentially passes the results to the Moodle tex filter.

If you are writing TeX then there is arguably no reason to use the algebra filter. If you are looking for something simpler than TeX, then I would argue you look at asciimathml, but that is neither here nor there.

The display of your text expressions is handled either via your local tex installation, or if there is some issue with that, via the mimetex binary shipped with Moodle.

If your display, then, is problematic, I would suggest reviewing the docs on the tex filter and use the debug page to review your tex installation.

If you find issues with your tex install, I would post in a thread focusing on debugging tex, not in the algebra filter thread, though subscription is by forum, so everyone subscribed to this forum will see your post no matter where you post it....

I'm trying to get the quadratic formula in the algebra filter.

http://www.sosmath.com/algebra/quadraticeq/quadraformula/quadraformula.html

As you can see I'm not getting the result I want:

@@@(-b+sqrt(b^2-4ac))/(2a)@@@

gives

@@(-b+sqrt(b^2-4ac))/(2a)@@

Looks like the algebra filter is broken. Use tex instead:

$$$\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$$

gives,

$$\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$

Lars.

I am looking for a complete list of what is possible using the algebra filter. Is the set of examples above complete? I intend to use Moodle in a caclulus II class and I was thinking TeX may be too much to require.

Hi, I've tried to input these algebra syntax in different activities such as Resource, Chat, Forum, Journal, etc. But they all show up like as I input, @@x^2@@ instead of math output. Could you tell me how to make it interpret as a math notation?

Thanks very much,

Fei

Hello, I want to know if this syntax suports matrix, in order to write something like this:

| 0 0 1 2 |

| 1 2 1 1 |

| 3 3 2 1 |

| 1 2 3 1 |

thank a lot

hello Zig

Is there a book, manual, file giving all the possible algebra syntaxes?

thank you

Georges

Since Moodle translates Algebra notation to LaTeX, I recommend that you use the LaTeX language with the TeX filter. LaTeX is an international language, not a local dialect, and there are millions of good LaTeX references on the Web.

Don't wait for Zbigniew Fiedorowicz to reply. He is no longer subscribed to this forum.

Sir good day:

Please help me how to write subscript in moddle quiz. I want to write that in Multiple choice space not on the feedback space.

Thank you

Jerry

and it will display as