Some examples of subscripts etc.

Here are some examples using text formatting available through the formatting toolbar (visible when entering text):

N2 + 3 H2 → 2 NH3

(x2 - x1)2 + (y2 - y1)2 = d2

These formatting features are built in to basic html capabilities and the toolbar just provides shortcuts to writing the html code. Circled is the tool for entering subscripts:

toolbar image

Note: you will not see the formatting toolbar if you are using Safari as your browser. Use Firefox instead.

For more complex symbols or expressions, not directly supported by html, a filter can be used. This is an example of the Algebra filter I mentioned before. It is more cumbersome to use and the results can be less readable, but it works:


On this installation of Moodle, the Algebra filter is turned on, TeX (a more advanced filtering system) is turned off.

Composing an expression using the Algebra filter requires some knowledge of the formatting conventions, and it can be a little quirky for complex expressions, but it may meet most needs, and kids can learn it fairly easily because it is similar to calculator syntax.

If you'd like to play around with this text, click here and enter "demo" for the username and "demo" for the password, then click on the Edit tab above to experiment with the formatting.

How about a limit or integral?

\int \sin^{0,1}\left(\frac{x}{x^{2}+4}\right) dx

Well. That one did not work. The 0 and 1 are supposed to show up as the limits of integration. I have tried shifting parentheses around and, so far, have not had any luck.

It will work if I remove the "sin", but what if I want to have the sin in there?

\int_{0}^{1}\frac{x}{x^{2}+4} dx

Lets try a limit:

\lim_{x\to 2}x

\lim_{x\to 2}\frac{x-2}{x^{2}-4} =\frac{1}{4}

(note: I need to enter a space in between the exponent of 2 and the "-" to get this one to work. Otherwise it looked like this:

Syntax error: lim((x-2)/(x<a class="wiki_newentry" href="#">2-4</a>),x,2)=1/4

How about a limit with a "sin"?


There seems to be a syntax problem with "sin" that I have not been able to overcome. Any thoughts? The x and the 2 should be under the "lim" symbol as "x->2", but for some reason it is getting stuck as the exponent for "sin". The additional parentheses did not help.

The problem seems to be when I try to embed syntax based symbols inside of other syntax based symbols. How do I tell the algebra filter when one of those such as "sin" ends so that it will complete the syntax of the outermost expression?

Test section ------------