<< Chapter < Page Chapter >> Page >

Math tree

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 a x 2 b x c 0 and as a tree would look like [link] . The equal sign has the least precedence and so is on the top. Similarly, x binds tighter to 2 through the power operation than to a through the times operation.

a*x^2+b*x+c=0 as a tree
a x 2 b x c 0 as a tree

Colors

Color notation (legend)

_ f _ = x 1 if x < 0 x 2 if __ > 0 __ otherwise

  • _ f _ : The location where text is currently being entered is represented as a box with a blue border (see Text Input for more information on how to enter math).
  • x and x 1 : Content MathML is represented in black while Presentation MathML is in a dark green (See Content vs. Presentation for editing Presentation MathML.
  • x < 0 : The cursor context (when the cursor is next to a complex expression) is represented by having a gray background. See Context for details.
  • __ and __ : Empty blocks that need to be filled are denoted with a yellow background and optional blocks that can be filled but do not need to be filled are transparent with a dotted border. See Blocks for details.
  • x 2 : The current selection is denoted by a light blue background. See Copy and Paste back to Modules for details.

Content vs. presentation

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

Example Content MathML in the Editor Example Presentation MathML in the Editor
Content MathML typically has fewer places to enter information and navigation is simpler, and Presentation MathML allows the user to tweak the way formulas are presented and is used by OCR and import software.

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 a times x to the power of 2 and added to b times x ...

Cursor

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.

Editing a variable, number, or block

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.

Next to a complicated expression

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 , the user may type -1=e^ and parse the expression to yield 1 e

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Connexions guide to mathml. OpenStax CNX. Aug 24, 2009 Download for free at http://cnx.org/content/col10963/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Connexions guide to mathml' conversation and receive update notifications?

Ask