Summary: An introduction to the Math Editor
Note: You are viewing an old version of this document. The latest version is available here.
This module explains how to open the Math Editor, create math, edit existing math, and keyboard shortcuts. There is also a separate tutorial page with examples showcasing the features.
At the end of this module are nuances and limitations of the editor. Please, let us know which ones you'd really like to see incorporated!
When editing a Module using using Mozilla's Firefox browser, click on a part of the module to open a blue editing box. On the top-right hand side of the box is a "MathML Editor" link which will open up the editor.
![]() |
![]() |
The popup window can remain open while editing a module and can even stay open while editing several modules. At any point one can close the window, but the contents of the editor will be lost.
The Editor has 4 main sections, detailed below. The toolbar provides a way to insert new operations, a navigation tree to show where the cursor is located, and standard buttons for undo, preview, and source editing.
The main editing area is located below the toolbar and contains the math that is being edited.
The toolbar contains a row of buttons representing categories of different mathematical operations. These are enabled when something is selected in the editing area. Note: The editor does not infer multiplication and addition. See Nuances for how to insert next to existing math by wrapping existing math. Explain the different sections, when it's enabled, how things get inserted, and Keyboard Entry for things.
Shows the path to the cursor location. Math is organized in a tree-like hierarchy (see Navigating Math) and the path represents where in the tree the cursor currently is. The path (and context) are important because they define what can be inserted and where it will go.
These buttons allow the user to undo an operation such as deletion or insertion. See Keyboard Shortcuts for details on using these features from just the keyboard.
Shows what math will look like when module is published. To resume editing, one must click the Preview button a second time.
Math in Connexions is represented in an XML format known as MathML. Clicking the View Source button will allow editing of the raw MathML.
This is the main area for creating math. It begins empty, but math can be pasted directly in here from Connextions. The tutorials contain instructions on moving math from Connexions to the math editor and back. The editing area is the most important part of the editor and as several subsections, outlined below:
Math in the editor is structured like a tree. It can be thought of as removing the precedence rules and just having parentheses. For example, the formula "a*x^2+b*x+c=0" which is displayed (using the editor) as power operation than to times operation.
![]() |
There are two subsets of the MathML language; Content MathML and Presentation MathML. Content, as the name implies, focuses on expressing operations like addition, integration, matrices, etc. Presentation focuses on how precisely math is displayed and contains elements like tables and subscripts.
| Comparing Content and Presentation MathML | ||||
|---|---|---|---|---|
|
The editor supports creating and editing the Content Math subset while being able to navigate through Presentation MathML. Every thing that is entered into the Editor is entered as Content Math. For example, entering a*x^2+b*x+c=0 will be translated as the variable
The Math Editor can be used entirely from the keyboard (See Keyboard Input). The cursor can be in one of four places. Either it is editing a variable or number, editing an empty block of text, next to a complicated expression, or has selected an expression. In each of these places there are several things that can be done.
At this point, the cursor is surrounded by a blue box and the user can type in expressions or even paste existing MathML. The expression will be parsed as soon as the cursor leaves the box or presses the Enter key (in the case of an expression) or immediately when MathML is pasted in. The user can leave the box by pressing clicking on the toolbar or by pressing the Left, Right, or Tab key. See Keyboard Input for more on expressions.
When a cursor is next to a complicated expression, the expression is shown with a light gray background (See Context). From this point, one of three things may be done. The user may add on to the expression. This is done by just typing. For example, if the cursor is to the left of -1=e^ and parse the expression to yield
One can select the expression by either pressing Shift+Right/Left (depending on whether the cursor is before or after the element), Delete, or Backspace key. See Selection for what can be done next.
When an expression is selected, several things can be done:
Instead of using parentheses to denote which operations are grouped, the math editor highlights the current context for the operation. The context shows the position of the cursor relative to existing math in the editing area and is displayed using a gray background. An example of a confusing position can be shown using the following example. Suppose the editor contains the term
There are several places the user can enter text into the editor. Most of them behave the same way, but listed below are common uses and specifics:
a+2 There are three categories of key presses and are enumerated in the table below.
| Category | Key | Condition | Action |
|---|---|---|---|
| Ctrl+ (Apple ⌘+) | X | Math is selected | Cuts the selected Math to the clipboard and replaces it with an empty block (that can be deleted) |
| C | Math is selected | Copies the selected Math to the clipboard | |
| V | Math is selected | Pastes MathML from the Clipboard (can be from other sources) | |
| Z | Undoes one step in the editor | ||
| Y | Ctrl+Z was just pressed | Redoes one step in the editor | |
| E | Opens full-source editing | ||
| Navigation | Tab Shift+Tab | Moves to the next/previous free block | |
| Left / Right | Moves to the previous/next element in the Math | ||
| Shift+Left / Shift+Right | After / Before the Context | Selects the Context element (right next to the cursor) | |
| Before / After the Context | Selects the Context's parent | ||
| Modification | Enter | Attempts to parse the text entered next to the cursor | |
| Delete / Backspace | Cursor next to Math | Selects the Math Node (subsequent delete will remove the math) | |
| Math selected | Removes the node and replaces it with an empty block (a second press will remove the block as well) | ||
| Cursor in block | Removes the empty block if it is allowed in MathML (in "a+b+c" any one variable can be removed, but addition requires at least 2 things to add) |
| Type | Input | Math Output |
|---|---|---|
| Calculator | a*x^2+b*x+c=1/2 |
|
a && b || c != a -> b |
||
sin(x)^2+cos(x)^2=1 |
||
x_1+x_2<x_3 |
||
| Templates | sum=n*(n-1)/2 |
|
| MathML | <pi /> |
|
ҷx; |
ҷ |
This is a text entry place. See shortcuts. can paste MathML (Ctrl+V from Mathematica, MathType, etc), or enter simple algebra (see Shortcuts). Moving away using Enter, Tab, Left, Right will cause the input to be parsed and converted into Math.
Blocks are holes that may need to be filled. (Click or Tab to them). Required blocks have a yellow background and optional ones are transparent and have a dotted border.
Click, double-click, highlight, (only right-click inside a text box)
There are several nuances in the editor, and common ones are listed here, along with workarounds. Also listed are limitations of the editor and things we'd like to get working soon.
Operations like Sum, Max and Integrals may be over an interval, or when a certain condition holds (like <interval/> with a <condition/>.
Sometimes it is necessary to add to existing mathematical operations. For example, adding higher terms to a polynomial. This can be done either by using the keyboard or with help of the toolbar. In the explanations below we start with "b*x+c=0" and create
To add the
Using only the toolbar to insert math is a bit more difficult because the editor does not infer multiplication or addition when pasting right next to existing math. We will need to "wrap" the existing math with the combiner operation (usually +,*, or ^) and then add in the new math.