Formula layout

From Wiki
Jump to navigationJump to search

The most difficult part of using OOo Math comes when writing complicated formulas. This section provides some advice.


Brackets are your friends

OOo Math knows nothing about order of operation. You must use brackets to state the order of operations explicitly. Consider the following example:

Markup Result
2 over x + 1 <math>{2 \over x} + 1</math>
2 over {x + 1} <math>2 \over {x + 1}</math>

Equations over more than one line

Suppose you want to type an equation covering more than one line. For example:

<math>x = 3\,\!</math>

<math>y = 1\,\!</math>

Your first reaction would be to simply press the Enter key. However, if you press the Enter key, though the markup goes to a new line, the resulting equation does not. You must type the newline command explicitly. This is illustrated in the table below.

Markup Result
x = 3
y = 1
<math>x = 3 \ y = 1</math>
x = 3 newline
y = 1
<math>x = 3\,\!</math>

<math>y = 1\,\!</math>


See Also