06 Integrating formulas
ONYX offers authors the possibility to integrate formulas. They can be entered by using either an integrated formula editor or, alternatively, in LaTeX notation.
To ensure the best possible display in different browsers, ONYX uses the established MathJax framework.
Content
Creating formulas
Creating formulas with the integrated formula editor
If you want to integrate formulas into a question or a test, you can use a formula plugin in the ONYX Editor. This function can be found in the HTML editor, for example in the text field in which you enter the question. Here, you can create formulas in a dialogue with the help of the above mentioned formula editor or by using LaTeX notation.
If you want to create a formula in a text field, proceed as follows:
Select the icon in the text editor. | |
In the dialogue, enter your formula in the text field via the formula editor. You can also use a virtual keyboard for input. Here you will find a selection of typical elements. Insert the formula into the test by clicking on Finish. | |
Another option is to switch to the LaTeX tab in the dialogue. The formula can be entered here in LaTeX notation. Here as well, insert the formula into the test by clicking on Finish. | |
The formula is then displayed in the text field in LaTeX notation or as a placeholder. If necessary, you can change this default configuration in your ONYX user settings. | |
In the question preview and later in the user view, the formula is displayed the same way as in the formula preview. |
Creating formulas with LaTeX
The ONYX Editor provides LaTeX support for all author input. Via the HTML editor, which is part of the ONYX Editor, you can integrate formulas into all question areas such as the question text, alternative answer options, or feedback, by using the LaTeX markup language. The formula display is done with the established MathJax Framework, and automatically converted to a professionally formatted formula.
Fig.: LaTeX input in the ONYX Editor | Fig.: Formula display in a test situation |
In order to display mathematical formulas in LaTeX, you just need to integrate the formula into your text. This can be done as follows:
- \( Formula \)
- \[ Formula \]
- $$ Formula $$
You can find extensive material on how to generate formulas with LaTeX on the internet. For instance, detailed examples are provided in the Wikibook: LaTeX compendium for mathematicians (in German).
Formula display
Formula display in the ONYX Editor
In the editing view, a formula is displayed as a placeholder or in LaTeX notation according to the user settings. This setting can be changed in your ONYX user settings.
Fig.: Formula display as placeholder in the ONYX editor
Fig.: Formula display in the ONYX player
Formula display in the ONYX player
ONYX uses the MathJax framework to display formulas in a test. On the MathJax demo pages, you can find several examples on how to insert formulas.
Fig.: Formula insertion in the ONYX Editor
Fig.:
Formula display in the ONYX playerFurther external formula editors
Formulas can also be created with other external formula editors, converted into the LaTeX markup language and used in ONYX. There are numerous LaTeX formula editors available on the Internet for this. Despite their extensive functionality, MyScript Math or the LaTeX formula editors from Matheretter and Zahlenkern are easy to use.
MyScript
The MyScript website is easy to use. Write your formula in the free space by using the mouse or stylus. The formula editor translates the displayed formula into LaTeX notation and, if it matches the formula, also displays a graph of the created function.
The LaTeX notation for the formula entered is displayed in the top right-hand corner of the page which can then be selected, copied and pasted into the ONYX HTML input fields.
Fig.: Formula input with MyScript
Matheretter and Zahlenkern
With the editor of the Matheretter LaTeX assistant or the Zahlenkern LaTeX formula editor, you can create formulas using ready-made, graphic formula symbols and adapt them. The formula editors also translate the displayed formula into LaTeX notation, which can then be inserted into the ONYX HTML input fields.
Fig.: Formula input in the Matheretter LaTeX assistant
Fig.: Formula input in the Zahlenkern LaTeX formula editor