Wednesday, December 12, 2007

Formula Editor in Open Office Part 4

Link from a blog


Creating and Editing Mathematical Formulas with OpenOffice.org

Math is the OpenOffice.org equation editor, which may be used to create and edit a wide variety of mathematically-oriented information.

Creating attractively formatted algebraic expressions has never been easier, and you can incorporate the resulting equations into technical reports, spreadsheets, or presentations. You can even export formulas in PDF form, publish them on the Web, or save your work in MathML format (an XML-based standard produced by the W3C).

Creating Simple Formulas

Although Math is a separate OpenOffice.org application, you can also create mathematical expressions directly inside most other OOo applications, including Writer, Calc, Impress and Draw. The formula is created as an OLE object, which may then be edited by double-clicking on the formula object.

Creating a formula directly in Writer is probably the most common scenario of all, which is achieved by first typing the required expression, then highlighting the text and finally selecting the Insert > Object > Formula command from the pull-down menu. For example, the original text {a + b} over 2 produces the formula:

A Simple Formula

Equations are actually created and edited by using a mathematical description language, which has a similar syntax to natural language. This means that if you are able to read a mathematical expression out loud, you are very close to being able to create that expression as a formula in Math. As an example, Figure 1 shows a selection of formulas, together with the expressions used to create them.

Creating Simple Mathematical Expressions

Figure 1. Creating simple mathematical expressions.

Looking at these examples, a few of the features of the mathematical description language may be observed:

  1. Basic operators such as addition and subtraction are generally written exactly as they will appear in the final equation.
  2. Math recognizes certain keywords in the formula. Thus, for example, the keyword over creates a fraction with a numerator and denominator, sqrt is replaced by a square root symbol, while sin, cos and tan are recognized as trigonometric functions.
  3. Anything which is not recognized as either a keyword, a function, or an operator is assumed to be a variable, and is shown using an italic font.
  4. Brackets are used to group terms—either visibly or invisibly. Curly brackets { ... } (called group brackets) do not actually appear in the final equation, but instead are used to logically group terms together, as seen with the second example in Figure 1. Round brackets ( ... ) also group terms together, but do appear in the final equation, as seen in the third example of Figure 1.
  5. Raising a number to a power is indicated by using a caret (^) symbol, thus a2 is written as a^2.

Further Examples

I think that's enough theory for one article, but just to show you the power of the Math application, Figure 2 demonstrates some of the more advanced formula types available.

Further Examples of Formulas

Figure 2. Further examples of Math formulas.

Don't worry if advanced mathematical concepts like calculus mean nothing to you—at least the capability is always there if you need it!

Additional Math Features

Math has a number of additional capabilities, in addition to the creation of simple formulas:
  1. Math can help you to create a series of sequentially numbered formulas, which is very useful if you need to produce a report containing mathematical expressions. Simply type fn and then press function key F3 to create a numbered equation in a Writer document.
  2. You can import or export formulas in MathML format (Mathematical Markup Language), which is the accepted standard for the representation of mathematical expressions. MathML is a W3C standard, details of which are available at www.w3c.org/Math
  3. The default appearance of a formula may be overridden by applying custom fonts, colors and text sizes.
  4. OpenOffice.org can export documents containing formulas in Adobe PDF form, which enables them to be read by anyone having the free Adobe Reader application, or browser plug-in.
  5. Documents may also be saved as HTML files, which will cause any embedded formulas to be saved as bitmap images.

The Sales Pitch

This article is based on material taken from Chapter 34 of the eBook Learning OpenOffice.org for Windows--the FREE Application Suite for Home and Office.

If you have found this article interesting then why not download the eBook? At only $18.50 USD and with more than 900 full-color pages it represents tremendous value for money.

You will find this eBook packed with insights into OpenOffice.org, enabling you to get the most out of this superb and FREE alternative to Microsoft Office. Please click here for more details.

See Also

  1. eBook: Learning OpenOffice.org for Windows (ToC) / About
    Chapter 34: Using Math to Create and Edit Formulas > Further Examples of Formula Syntax > Automatically Numbering Equations
  2. Hints and Tips: How do I create automatically numbered formulas?
  3. Hints and Tips: How do I use chapter numbers with automatically numbered formulas?

No comments: