# Connexions

You are here: Home » Content » MathML Editor: Intermediate

## Navigation

### Lenses

What is a lens?

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

#### Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
• CNX Documentation

This module is included inLens: Connexions Documentation
By: Connexions

Click the "CNX Documentation" link to see all content affiliated with them.

Click the tag icon to display tags associated with this content.

• JVLA Affiliated

This module is included inLens: Jesuit Virtual Learning Academy Affiliated Material
By: Jesuit Virtual Learning AcademyAs a part of collection: "Connexions Tutorial and Reference"

Click the "JVLA Affiliated" link to see all content affiliated with them.

Click the tag icon to display tags associated with this content.

#### Also in these lenses

• OER/LOR Connexions T

This module is included inLens: OER/LOR Connexions Training
By: ConnexionsAs a part of collection: "Connexions Tutorial and Reference"

Comments:

"This collection has the basic training for authoring modules (chapters/sections) and collections (textbooks/courses etc)."

Click the "OER/LOR Connexions T" link to see all content selected in this lens.

Click the tag icon to display tags associated with this content.

### Recently Viewed

This feature requires Javascript to be enabled.

### Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

# MathML Editor: Intermediate

Module by: Philip Schatz. E-mail the author

## Introduction

This module presents step-by-step instructions for creating, and then editing well-known formulas to illustrate how to use the editor. The example and what properties of the editor it illustrates are listed below. All of these assume you have a blank Math Editor open.

## Quadratic Equation

As a simple example, we'll step through several ways of writing the well-known Quadratic Equation (with real or complex coefficients): ax2+bx+c=a(xb+b24ac2a)(x(b)b24ac2a) a x 2 b x c a x b b 2 4 a c 2 a x b b 2 4 a c 2 a

### Method 1: Pure Keyboard

Probably the quickest way to enter math is by using the keyboard. This method requires entering a total of 3 statements and a few Tab key presses.

1. Step 1. Start off with a blank editor.
2. Step 2. Enter the following into the main editing area "a*x^2+b*x+c=a*(x-(-b+root)/(2*a))*(x-(-b+root)/(2*a)) ". See below for details .
3. Step 3. Press the Enter key. This will cause the text to be parsed and converted into math.

Most of the text in step 2 should look similar to the notation used in calculators, except for "root ". Many calculators follow different conventions for entering complicated math operations like integrals and vectors. For this version of the editor we decided to wait for feedback from users on which convention to adopt. Until one is chosen, any math element defined in the W3C MathML Specification can be entered. The toolbar also provides a way to see the available commands.

#### Finish Entering Equation

At this point the editor should have 2 remaining boxes that need to be filled out, and 2 optional ones (the degree of the root). To fill in the rest, you will need to do the following:

1. Press Shift+Tab four times to move to the first empty block. (That is, hold down the Shift key, press the Tab key, and release the Shift key four times).
2. Enter "b^2-4*a*c " into the empty block under the radical.
3. Press the Enter key to convert the input into math.
4. Press Shift+Left arrow key to select b24ac b 2 4 a c
5. Press Ctrl+C to copy the selection to the clipboard.
6. Press the Tab key twice to move to the other empty block.
7. Press Ctrl+V to paste the selection into the current block.

Now, the equation should be complete. In the previous steps we used the Tab key to navigate to empty blocks that still needed information in them, skipping over optional ones. We used Shift+ arrow keys to select math and Ctrl+C and Ctrl+V to copy and paste that math.

#### Paste into Connexions

Finally, we need to copy the math and paste it back into a module. We already used the same technique above. Right now, the cursor should be just to the right of the second b24ac b 2 4 a c . The following steps will place the newly created quadratic equation back into the Connexions module.

1. Step 1. Press Ctrl+A to select the entire formula, or Shift+Right (or Shift+Left) until the math you want to copy is selected.
2. Step 2. Press Ctrl+C to copy it to the clipboard.
3. Step 3. Switch back to the window where you were editing the module.
4. Step 4. Place the cursor at the location you want to insert the quadratic formula.
5. Step 5. Press Ctrl+V to insert the formula.

#### Summary

In this tutorial we entered the quadratic equation entirely through the keyboard. We used the Tab and arrow keys to navigate through math content, the Return key to convert input text into math, and Ctrl+C and Ctrl+V to copy and paste both within the editor and between the editor and the main module editor.

Next, we will do the same example using the mouse and toolbar.

### Method 2: Toolbar

This method requires a bit more time because we will need to click the toolbar for every character (like "+", "*", or "/" in the previous method). Instead of doing the entire equation, this tutorial will step through creating only part of it: b+b24ac2a b b 2 4 a c 2 a

1. Step 1. Start off with a blank editor.
2. Step 2. Click the "Arithmetic" category in the toolbar.
3. Step 3. Click the "Divide" operation in the menu.
4. Step 4. Click the top empty block (numerator).
5. Step 5. Click the "Arithmetic" category in the toolbar and the "Plus" operation in the menu.
6. Step 6. Click the left empty block.
7. Step 7. Click the "Arithmetic" category and the "Negate" operation in the menu.
8. Step 8. Enter "b" in the top-left empty block
9. Step 9. Click the other empty block in the numerator.
10. Step 10. Click the "Arithmetic" category and the "Root" operation in the menu.
11. Step 11. Click the empty block under the radical.
12. Step 12. Click the "Arithmetic" category and the "Minus" operation in the menu.
13. Step 13. Click the left empty block.
14. Step 14. Click the "Arithmetic" category and the "Power" operation in the menu.
15. Step 15. Enter "b" and "2".
16. Step 16. ...

Using the toolbar is a bit more tedious, but serves as a way to find operations that can be expressed in MathML. Some operations have variations (A sum can take a variable and limits, or a variable and a condition) but see Limitations on how to enter them in.

#### Paste into Connexions

Pasting the Math back into Connexions can be done the same way as before, or can be done via the Edit menu in the browser. Again, we must select the entire equation. This can be done by highlighting the equation using the mouse, or double-clicking the division bar (since it is the outer-most operation). Once highlighted, you can Click Edit, and either Cut or Copy from the main browser menu bar. If you switch back to the Connexions module editor, you can Click Edit and then Paste again from the menu to paste the newly created math back into a module.

#### Summary

In this tutorial we entered a part of the quadratic equation using the mouse and toolbar buttons. We used the mouse to select move the cursor and select math, the toolbar to insert new operations, and the browser's Edit menu to copy and paste math between the editor and the main module editor.

Next, we will discuss some more advanced math editing.

### Advanced Editing

So far we've gone through creating math from scratch. In this section, we will look at how to insert more elaborate symbols, change how variables look (Presentation MathML), and customize some of the operations provided in the toolbar.

#### Elaborate Symbols

So far we've used simple characters available from the keyboard. The quadratic formula is frequently written with a plus-minus sign like: b ± b24ac 2a b ± b 2 4 a c 2 a In order to get this, we will need a little bit of Presentation MathML. This is because plus-minus is not an operation represented in Content MathML.

1. Step 1. We will start with one part of the formula (as described above )
2. Step 2. To save some time, copy the b24ac b 2 4 a c into the clipboard.
3. Step 3. Highlight everything in the numerator (it should be the entire plus operation)
4. Step 4. Replace it with "mrow " and press the enter key
5. Step 5. Enter "-b " and move to the next block
6. Step 6. Enter "± " and move to the next block
7. Step 7. Paste the part of the formula we copied earlier
mrow is used to control how Math is displayed to the user. In this case we used it to insert a plus-minus symbol between b b and b24ac b 2 4 a c . The Unicode standard defines many characters but the Unicode Mathematical Operators document may be a useful reference.

#### Customize the Look of Variables

There are many elaborate ways to customize how a variable looks. These are defined in the W3C MathML Specification . We will list off a few common ways to customize.

• Subscripts like x i x i can be entered by typing "x_i " or using "msub "
• A variable with both subscripts and superscripts can be entered using "msubsup "
• Backets like 0 0 can be added using "mfenced " and then changing the symbol used for the open and close bracket (by editing the source).
• Unlike subscripts which place content above/below and to the right, "munderover " places math directly above or below.
• A table can be added using "mtable "

#### Customize Toolbar Operations

Many operations that operate on a range have several ways of specifying the range they work on. For example, the following are equivalent: i =1ni2 i 1 n i 2 iSi2 S= i (i>0)(in) i S i 2 S i i 0 i n Changing the range these operations required switching to the MathML source and being familiar with the W3C MathML Specification . To change the former to the latter, we start with a clean "sum " operation. Then, to decrease the amount of hand editing, we can type "i in S " to the right of the equal sign. Then, we switch to MathML Source and replace every occurrence of "interval " with "condition " and removing the special "<block ...> " element just above the </condition> .

## W3C MathML Specification

The W3C MathML Specification defines all math used in Connexions modules. It provides ways to represent formulas in a way that records the semantic meaning in the formula (Content MathML ) as well as a way to lay out variables and formulas (Presentation MathML ).

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

### Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

### Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks