Mathematical and Chemical Formulas using LaTeX
LaTeX is a high-quality typesetting system used in mathematics and science to write text with formulas, e.g., equations, and tables using a special markup language with different formatting commands.
Both mathematical and chemical formulas can be written with LaTeX code according to the same principles. We first exemplify this with mathematical formulas, but give more details about writing chemical formulas at the bottom of this page.
Entering mathematical formulas in any text field
LaTeX formulas can be entered in any text field in Studium, and MathJax, a JavaScript display engine for mathematics, is loaded in the browser if Studium detects a formula image added by delimited LaTeX characters.
This change allows users to use formulas in more areas of Studium and manage formulas more efficiently.
LaTeX formulas can be added in any text field in Studium and are typeset or processed by MathJax. Formulas can be added through manual entry, or through the Math editor as supported in the Rich Content Editor.
Manually Entered Formulas
Formulas can be added manually in any Studium area that includes a text field, such as the title of an assignment or in a calendar event. Manual entries must be formatted according to LaTeX specifications.
Text fields support MathJax $$
or \(
and \)
delimiters to identify formulas. Adding formulas added in a \(...\)
format indicates the formula should be in an inline format. Generally, formulas entered with text should be formatted inline. However, a formula in a $$...$$
format indicates the formula should be in a block format. When saved, MathJax renders the LaTeX formula in the editor window as inline and block text, respectively.
Inline Example
This text:
will give this result:
Block Example
This text:
will give this result:
Formulas entered using the Math Editor
If you are going to write several formulas in block format, and those consist of several lines of LaTeX code, we recommend you to use the equation editor in the Rich Content Editor. This is easier to use, for example, when copying-pasting formulas from other documents (you do not get extra line breaks, as you sometimes get in the Rich Content Editor when pasting in from other documents). When using the Equation Editor, you do not write the initial and closing $$ characters, but only the LaTeX code itself.
Chemical formulas
Chemical formulas can be written in the same way as mathematical formulas, i.e., in any text field by entering the delimiters \(
and \)
(for inline format) or $$
and $$
(for block format), or entering them in the advanced view in the Math editor, see above.
Subscripts and superscripts are written using the symbols _
and ^
respectively. If there are more than one character inthe subscript or superscript, these should be surrounded by the following parentheses, {}
.
Example
In the example below, we have entered the chemical reaction formula for when hydrochloric acid is dissolved in water directly in the text in the rich content editor, both as an inline and a block format.
Resulting in this: