Math Symbols in Moodle

I know, it isn’t for everyone. But if you need to typeset a math symbol, you need it to be easy to enter and correctly formatted. Moodle has a built-in capability to interpret math symbols using the LaTeX typesetting language.

All that’s needed are double dollar signs, like in this little example: I created an assignment call “latex sample” and typed the following in the assignment description:

The coefficient of $$x^2$$ is $$\pi$$.

That displays in Moodle as

If you aren’t familiar with LaTeX:

Here is my top-ten list of most needed LaTeX symbols.

  1. Subscripts use _ (underscore): $$a_1$$, $$H_a$$, $$k_s$$, etc
  2. Exponents and superscripts ^ (caret): $$x^2$$, $$e^x$$, etc
  3. Greek letter are preceded by \ (backslash): $$\pi$, $$\alpha$$, $$\mu$$ etc
  4. Fractions use a special construct: $$ \frac{ }{ } $$ For example “pi over 2” would be entered as $$ \frac{\pi}{2}$$
  5. Numbers and lots of symbols correspond to their typical keyboard symbol: prime = apostrophe, absolute value = vertical bar on backslash key $$ |x| $$, parens = (), as well as the operators +, –
  6. Integrals use the construction $$ \int $$, for example $$ \int_a^b f(x) dx $$
  7. Multiplication: use \cdot like this $$ x \cdot x^2 = x^3 $$
  8. If you want an old-fashioned “multiply by” symbol, use $$ 3 \times 2 = 6 $$
  9. If you want an old-fashioned “divided by” symbol, use $$ 6 \div 2 = 3 $$
  10. Beware of Percent Sign and literal Dollar Sign: They need to have a backslash $$ 21\% $$ and $$ \$21.99 $$.
  11. As suits this extra tip: infinity is entered with this sad misspelling: $$ \infty $$.

For more information, here’s a complete glossary of math symbols in LaTeX

Leave a Reply

Your email address will not be published. Required fields are marked *