Wiki source code of 06 Formeln einbinden

Last modified by Anna Paul-Hasenfuss on 30.10.2024

Show last authors
1 {{section}}
2 {{column width="60%"}}
3 ONYX offers authors the possibility to integrate formulas. They can be entered by using either an integrated formula editor or, alternatively, in LaTeX notation.
4
5 To ensure the best possible display in different browsers, ONYX uses the established [[MathJax>>url:http://www.mathjax.org/]] framework.
6
7 [[image:attach:Beispiel - Formel_de.png]]
8 {{/column}}
9
10 {{column width="30%"}}
11 {{panel title="Content"}}
12 {{toc start="2"/}}
13 {{/panel}}
14
15 {{panel title="Related Topics"}}
16 * [[Placeholder image in the formula display>>doc:ONYX.Anmeldung.Benutzerprofil.WebHome||anchor="HPlaceholderimageintheformuladisplay"]]
17 * [[LaTeX help: LaTeX compendium for mathematicians>>url:https://de.wikibooks.org/wiki/LaTeX-Kompendium:_F%C3%BCr_Mathematiker||shape="rect"]]
18 {{/panel}}
19 {{/column}}
20 {{/section}}
21
22
23 == Creating formulas ==
24
25 === Creating formulas with the integrated formula editor ===
26
27 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.
28
29 If you want to create a formula in a text field, proceed as follows:
30
31 |(((
32 Select the icon [[image:LMS.Benutzerhandbuch OPAL.Icons.WebHome@Icon_Formel einbinden_schwarz.png||alt="Icon_Formel einbinden.png" data-xwiki-image-style="img-icon" height="24" width="24"]] in the text editor.
33 )))|[[image:attach:Editor - Formeldialog aufrufen_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
34 |(((
35 In the dialogue, enter your formula in the text field via the formula editor.
36
37 You can also use a virtual keyboard for input. Here you will find a selection of typical elements.
38
39 Insert the formula into the test by clicking on **Finish**.
40 )))|[[image:Editor - Formeldialog_Formeleditor_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
41 |(((
42 Another option is to switch to the **LaTeX** tab in the dialogue. The formula can be entered here in LaTeX notation.
43
44 Here as well, insert the formula into the test by clicking on **Finish**.
45 )))|[[image:Editor - Formeldialog_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
46 |(((
47 The formula is then displayed in the text field in LaTeX notation or as a placeholder.
48
49 If necessary, you can change this default configuration in your [[ONYX user settings>>url:https://help.bps-system.de/wiki/bin/view/ONYX/Anmeldung/Benutzerprofil/]].
50 )))|[[image:attach:Editor - Formeldarstellung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
51 |In the question preview and later in the user view, the formula is displayed the same way as in the formula preview.|[[image:attach:Player - Anzeige einer Formel_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
52
53 === Creating formulas with LaTeX ===
54
55 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>>url:http://www.mathjax.org/||shape="rect"]], and automatically converted to a professionally formatted formula.
56
57 |(((
58 (% class="content-wrapper" %)
59 (((
60 [[image:attach:Editor - Aufgabenstellung mit Formel_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
61
62 //Fig.: LaTeX input in the ONYX Editor//
63 )))
64 )))|(((
65 (((
66 [[image:attach:Testrun - Aufgabenstellung mit Formel_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
67
68 //Fig.: Formula display in a test situation//
69 )))
70 )))
71
72 In order to display mathematical formulas in LaTeX, you just need to integrate the formula into your text. This can be done as follows:
73
74 * \( Formula \)
75 * \[ Formula \]
76 * $$ Formula $$
77
78 {{warning}}
79 The $Formula$ LaTeX syntax is not supported in ONYX.
80 {{/warning}}
81
82 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>>url:https://de.wikibooks.org/wiki/LaTeX-Kompendium:_F%C3%BCr_Mathematiker||shape="rect"]] (in German).
83
84
85 == Formula display ==
86
87 === Formula display in the ONYX Editor ===
88
89 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>>doc:ONYX.Anmeldung.Benutzerprofil.WebHome||anchor="HSystemsettings"]].
90
91 [[image:Editor - Formeldarstellung Platzhalter_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
92
93 //Fig.: Formula display as placeholder in the ONYX editor//
94
95
96 [[image:Editor - Formeldarstellung_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
97
98 //Fig.: Formula display in the ONYX player//
99
100
101 === Formula display in the ONYX player ===
102
103 ONYX uses the MathJax framework to display formulas in a test. On the[[ MathJax>>url:http://www.mathjax.org/]] demo pages, you can find several examples on how to insert formulas.
104
105 [[image:Editor - Formeldarstellung Beispiel_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
106
107 //Fig.: Formula insertion in the ONYX Editor//
108
109
110 [[image:Player - Formeldarstellung Beispiel_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
111
112 //Fig.:(% style="display:none" %) (%%) Formula display in the ONYX player//(% style="display:none" %)
113
114
115 == Further external formula editors ==
116
117 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>>url:https://webdemo.myscript.com/views/math/index.html]] or the LaTeX formula editors from [[Matheretter>>url:https://www.matheretter.de/rechner/latex]] and [[Zahlenkern>>url:https://www.zahlen-kern.de/editor/]] are easy to use.
118
119
120 === MyScript ===
121
122 The [[MyScript>>url:https://webdemo.myscript.com/]] 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.
123
124 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.
125
126 [[image:attach:MyScript_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
127
128 //Fig.: Formula input with MyScript//
129
130
131 === Matheretter and Zahlenkern ===
132
133 With the editor of the [[Matheretter LaTeX assistant>>url:https://www.matheretter.de/rechner/latex||shape="rect"]] or the [[Zahlenkern LaTeX formula editor>>url:https://www.zahlen-kern.de/editor/||shape="rect"]], 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.
134
135 [[image:attach:Matheretter_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
136 //Fig.: Formula input in the Matheretter LaTeX assistant//
137
138 [[image:attach:LaTeX-Formeleditor_de.png||data-xwiki-image-style="img-screen" data-xwiki-image-style-border="true" width="500"]]
139 //Fig.: Formula input in the Zahlenkern LaTeX formula editor//
140
141