Difference between revisions of "Common problem areas"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Numbering equations)
m (How do I add limits to my sum/integral?: fix reversed integration limits, sum not displaying)
Line 8: Line 8:
 
|<tt>sum from k = 1 to n a_k</tt><br/>||<math>\sum_{k=1}^n a_k</math>
 
|<tt>sum from k = 1 to n a_k</tt><br/>||<math>\sum_{k=1}^n a_k</math>
 
|-
 
|-
|<tt>int from 0 to x f(t) dt</tt><br/>or <br/><tt>int_0^x f(t) dt</tt>||<math>\int\limits_x^0 f(t) dt</math> or <math>\int_x ^0 f(t) dt</math>
+
|<tt>int from 0 to x f(t) dt</tt><br/>or <br/><tt>int_0^x f(t) dt</tt>||<math>\int\limits_0^x f(t) dt</math> or <math>\int_0^x f(t) dt</math>
 
|-
 
|-
 
|<tt>int from Re f</tt>||<math>\int\limits_\Re f</math>
 
|<tt>int from Re f</tt>||<math>\int\limits_\Re f</math>
 
|-
 
|-
|<tt>sum to infinity 2^{-n}</tt>||<math>\sum^\infin 2^{-n}</math>
+
|<tt>sum to infinity 2^{-n}</tt>||<math>\sum_{ }^{\infin} 2^{-n}</math>
 
|-
 
|-
 
|}
 
|}

Revision as of 13:54, 10 August 2009

How do I add limits to my sum/integral?

The “sum" and “int" commands can (optionally) take in the parameters “from" and “to". These are used for lower and upper limits respectively. These parameters can be used singly or together. Limits for integrals are usually treated as subscripts and superscripts.

Markup Result
sum from k = 1 to n a_k
int from 0 to x f(t) dt
or
int_0^x f(t) dt
or
int from Re f
sum to infinity 2^{-n}

Template:Documentation/Note

Brackets with matrices look ugly!

For background, we start with an overview of the matrix command:

Markup Result
matrix { a # b ## c # d }

Template:Documentation/Note

The first problem people have with matrices is that brackets do not “scale" with the matrix:

Markup Result
( matrix { a # b ## c # d } ) ()

OOoMath provides “scalable" brackets. That is, the brackets grow in size to match the size of their contents. Use the commands left( and right) to make scalable brackets.

Markup Result
left( matrix { a # b ## c # d } right)

Template:Documentation/Tip

How do I make a derivative?

Making derivatives essentially comes down to one trick: Tell OOo it's a fraction.

In other words, you have to use the “over" command. Combine this with either the letter “d" (for a total derivative) or the “partial" command (for a partial derivative) to achieve the effect of a derivative.

Markup Result
{df} over {dx}
{partial f} over {partial y}
{partial^2 f} over {partial t^2}

Template:Documentation/Note

Numbering equations

Equation numbering is one of OOoMath's best hidden features. The steps are simple, but obscure:

  1. Start a new line.
  2. Type “fn" and then press F3.

The “fn" is replaced by a numbered formula:

(2)

Now you can double-click on the formula to edit it. For example, here is the Riemann Zeta function:

(3)

You can reference an equation (“as shown in Equation (2)") with these steps:

  1. Insert > Cross-reference..
  2. Click on the References tab (Figure 15).
  3. Under Type, select Text.
  4. Under Selection, pick the equation number.
  5. Under Format, choose Reference.
  6. Click Insert.

Done! If you later add more equations to the paper before the referenced equation, all the equations will automatically renumber and the cross-references will update.

Frame15.png

Template:Documentation/Tip

Personal tools