If you want to write mathematical formulas on WeSchool in a clear and precise way - from the simplest to the more complex - the best choice is to use LaTeX (https://www.latex-project.org/)
LaTeX can be used:
- Inside our text editor (such as to add a text to a post or in a Module)
In all the test questions highlighted below, and in the answers to a Multiple-Choice question and in the matching terms of a Match the Pairs:
To write a mathematical formula with LaTeX, you need two things:
- First, use a precise delimiter to indicate that you want to write a formula
- Write the formula inside the delimiters, with the appropriate commands
LaTeX delimiters
Delimiters behave like parentheses: everything inside them will be interpreted as a command and transformed into a formula. There are two delimiters you can use on WeSchool to indicate a mathematical formula:
- the dollar ($... $)
- The double dollar ($$... $$)
For example, writing $ x + y $ we will get:
What is the difference between the dollar and the double dollar? The dollar puts the formula in line with the text, while the double dollar places it in the center of the page.
LaTeX commands
To write a mathematical formula we can type it normally: some symbols (such as +, - and =, the letters of the alphabet and others) do not need a particular command to be entered. In practice, with LaTeX we can write a literal expression without any issues. Many other components of a mathematical formula, such as an exponent or a fraction, must be entered via a command. Below is a list of the most frequently used commands and an example of how to use them on WeSchool.
Exponents and subscripts
An exponent is obtained with the caret character ^, a subscript with the underscorecharacter _. If what we have to put in the exponent or subscript is longer than a single character, we need to put it in brackets. For example:
Multiplications and fractions
The multiplication symbol is achieved with the \ times command for a “for” symbol or with \cdot for a dot. A fraction, on the other hand, is written using the \frac{N}{D} command, where for N we will have the numerator and for D the denominator; of course, the numerator and denominator can themselves be complicated expressions. For example:
Roots
The square roots are indicated with the command \sqrt{R}, where R is the radicand. If you wish to indicate a root of a particular order, other than 2, the command is \sqrt[n]{R} instead, with n the chosen index. For example:
The number of symbols and commands that can be used with LaTeX is vast. A list of the most used symbols can be found at this address. To check if the formula you wrote in LaTeX is correct, you can conveniently use this tool.