3.3. Modifying existing equations

Let's suppose you have entered the following equation: . After doing that, you realize that the correct equation is in fact: . One way to correct the equation is to:

  1. to explicitly select ,

  2. press Ctrl+C to copy the fraction to the clipboard,

  3. click the template from the "Operations & Functions" palette to replace the selection,

  4. explicitly select the left mi placeholder,

  5. press Ctrl+V to paste the fraction,

  6. Finally, replace the right mi placeholder by an mn element containing 1.

Fortunately there is a much quicker way to do this: using the text selection rather than the implicit or explicit element selection.

When you use the text selection:

  1. In fact, you select the MathML element which is the common ancestor of all the elements involved in the text selection. Note that this text selection is not used per se, therefore there is no need to be precise to the character.

  2. The MathML tool wraps the selected MathML element in the template clicked upon, rather than replace the selection by the template clicked upon. That is, you'll not loose what you have already typed.

Therefore the most efficient way to correct the above equation is to proceed as follows:

  1. select "2 x 3" normally, by dragging your mouse over this text,

  2. click the template in order to wrap the fraction (which is “common ancestor of the text selection”),

  3. Finally, replace the right mi placeholder by an mn element containing 1.

This worked fine, but what if the correct equation was ?

Well, if you select the text by dragging your mouse from the right to the left, the MathML tool will use the last placeholder of the template clicked upon. Normally (mouse dragged from the left to the right), the MathML tool uses the first placeholder of the template clicked upon.

Wrapping the implicitly or explicitly selected element

In some cases, you'll find that the text selection does not allow you to select the MathML element you want. For example, let's suppose you have entered and the correct equation is . There is no way to select the square root using the text selection.

When this is the case, you'll have to explicitly select the MathML element (for example, by clicking on m:msqrt in the Node Path Bar) you want to wrap and then Ctrl+click [6] or Shift+click on a template of a palette.

Ctrl+click

Wraps implicitly or explicitly selected element in the template clicked upon. Within this template, the first placeholder is substituted with the selected element.

Shift+click

Wraps implicitly or explicitly selected element in the template clicked upon. Within this template, the last placeholder is substituted with the selected element.



[6] Or Cmd+click on the Mac.