<< Chapter < Page | Chapter >> Page > |
Remember that each operator in MathML has a specific number of arguments that can be associated with it. For instance, the operator
plus
must have at least two arguments (as in
) up to an unlimited number of arguments (as in
...). The operator
root
has one required argument (the radicand, as in
), as well as one optional argument for specifying which root power (as in
).
When you insert a series of characters into the editor, the editor will correctly parse some of the symbols you enter as operators, and some as arguments of the operators. Furthermore, it correctly determines which operator you have typed in, and correctly associates the surrounding symbols as arguments of that operator.
The menu buttons in the toolbar will paste an operator over your highlighted expression, and insert blank blocks for all the required and optional arguments of the operator. This means that keyboard input and toolbar insertion are useful for different things.
+z
. The editor interprets
as one argument of the
plus
operator, and the previously existing expression as the other argument. Toolbar insertion cannot do this. Some examples of workarounds are given below.The following sections will show you how to create an expression from scratch using mainly toolbar entry, and how to use part or all of your existing expression as one argument of a new operator.
The toolbars are useful when creating new expressions because you work "from the top down". The operator with the broadest scope is inserted from the menus first. Then, the arguments are filled in with variables and numbers, or with another complex expression. If one complex expression is itself an argument of an operator, you can use the toolbar to insert the operator first, and then fill in the arguments again. Continue this iteration with successively narrower scoped operators, until only number and variables are left to be inserted as arguments.
Let's create
using the toolbar menus, and in the same order that we created it with keyboard input
above . We'll first
insert
, then
add
as an argument to the existing
plus
operator, and finally
add
as an argument in a new operation.
Make sure the editing area in the MathML editor is blank. It should already be blank if you've just opened it. If you have some text entered, delete it first.
The expressions
and
stand in relation to one another as arguments of a
plus
operator, so we will start by inserting a
plus
operator and then inserting successively smaller chunks of the expression.
plus
operator from the toolbar.plus
operation, then select the
power
operator from the toolbar.power
operation, and type in
.power
operation, and type in
.plus
operation, and select the
times
operator from the toolbar.times
operation, and type in
.times
operation, and type in
.There are two ways we can add the final argument
to the
plus
operator. One way would have been to add an extra argument to the
plus
operation immediately after we inserted it from the toolbar menu. After Step 1 above, click in either blank block on each side of the
+
sign. Then insert another
plus
operation. Essentially we are inserting the entire operator as an argument of the first
plus
operator, but the editor will correctly condense this and turn all three blocks into arguments of one
plus
operator. The same thing occurs with keyboard input when, say, you replace the 6 in
with
.
The second method would be to want to add a new argument to the
plus
operator after we already created the expression
. In this case, we essentially want to make
the first argument of a new
plus
operator, and then add
as the second operator. This is known as "
wrapping " existing math in a new operation.
Ctrl+X
(or
⌘+X
on a Mac), so that you are left with a blank editing area.plus
operator from the toolbar menu.c
.You will also have to wrap existing math when inserting a new operation. Let's change the first expression to .
power
operation
. You should be left with a blank block +
.times
operator from the toolbar menu.a
.Notification Switch
Would you like to follow the 'Connexions guide to mathml' conversation and receive update notifications?