Difference between revisions of "Common problem areas"
(→Numbering equations) |
|||
(6 intermediate revisions by 4 users not shown) | |||
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\ | + | |<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>\ | + | |<tt>sum to infinity 2^{-n}</tt>||<math>\sum_{ }^{\infin} 2^{-n}</math> |
|- | |- | ||
|} | |} | ||
− | {{ | + | {{Note|For more details on integrals and sums, see the [[Documentation/OOo3_User_Guides/Math_Guide/Math_commands_reference#Operators|Math commands reference]].}} |
== Brackets with matrices look ugly! == | == Brackets with matrices look ugly! == | ||
Line 29: | Line 29: | ||
|} | |} | ||
− | {{ | + | {{Note|Rows are separated by two #'s and entries within each row are separated by one #.}} |
The first problem people have with matrices is that brackets do not “scale" with the matrix: | The first problem people have with matrices is that brackets do not “scale" with the matrix: | ||
Line 41: | Line 41: | ||
|} | |} | ||
− | OOoMath provides “scalable" brackets. That is, the brackets grow in size to match the size of their contents. Use the commands | + | OOoMath provides “scalable" brackets. That is, the brackets grow in size to match the size of their contents. Use the commands <tt>left(</tt> and <tt>right)</tt> to make scalable brackets. |
{|border="1" cellpadding=4 style="border-collapse:collapse;" | {|border="1" cellpadding=4 style="border-collapse:collapse;" | ||
Line 52: | Line 52: | ||
|} | |} | ||
− | {{ | + | {{Tip|Use <tt>left[</tt> and <tt>right]</tt> to obtain square brackets.}} |
== How do I make a derivative? == | == How do I make a derivative? == | ||
Making derivatives essentially comes down to one trick: ''Tell OOo it's a fraction''. | Making derivatives essentially comes down to one trick: ''Tell OOo it's a fraction''. | ||
− | In other words, you have to use the | + | In other words, you have to use the <tt>over</tt> command. Combine this with either the letter “d" (for a total derivative) or the <tt>partial</tt> command (for a partial derivative) to achieve the effect of a derivative. |
{|border="1" cellpadding=4 style="border-collapse:collapse;" | {|border="1" cellpadding=4 style="border-collapse:collapse;" | ||
Line 63: | Line 63: | ||
!Markup!!Result | !Markup!!Result | ||
|- | |- | ||
− | |<tt>{df} over {dx}</tt>||<math>\frac{ | + | |<tt>{df} over {dx}</tt>||<math>\frac{df}{dx}</math> |
|- | |- | ||
|<tt>{partial f} over {partial y}</tt>||<math>\frac{\partial f}{\partial y}</math> | |<tt>{partial f} over {partial y}</tt>||<math>\frac{\partial f}{\partial y}</math> | ||
Line 71: | Line 71: | ||
|} | |} | ||
− | {{ | + | {{Note|Notice that we have to use braces (squiggly brackets) to make the derivative.}} |
== Numbering equations == | == Numbering equations == | ||
Line 79: | Line 79: | ||
# Type “fn" and then press ''F3''. | # Type “fn" and then press ''F3''. | ||
The “fn" is replaced by a numbered formula: | The “fn" is replaced by a numbered formula: | ||
− | |||
:<math>E=mc^2</math> (2) | :<math>E=mc^2</math> (2) | ||
− | |||
Now you can double-click on the formula to edit it. For example, here is the Riemann Zeta function: | Now you can double-click on the formula to edit it. For example, here is the Riemann Zeta function: | ||
− | |||
:<math>\zeta (z) = \sum_{n=1}^\infin \frac{1}{n^z}</math> (3) | :<math>\zeta (z) = \sum_{n=1}^\infin \frac{1}{n^z}</math> (3) | ||
− | |||
You can reference an equation (“as shown in Equation (2)") with these steps: | You can reference an equation (“as shown in Equation (2)") with these steps: | ||
Line 103: | Line 99: | ||
: [[Image:Frame15.png]] | : [[Image:Frame15.png]] | ||
− | {{ | + | {{Tip|To insert the equation number without parenthesis around it, choose ''Numbering'' under ''Format'' instead of ''Reference.''}} |
+ | [[Category:Documentation]] |
Latest revision as of 16:54, 14 July 2018
Contents
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} |
For more details on integrals and sums, see the Math commands reference. |
Brackets with matrices look ugly!
For background, we start with an overview of the matrix command:
Markup | Result |
---|---|
matrix { a # b ## c # d } |
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) |
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} |
Numbering equations
Equation numbering is one of OOoMath's best hidden features. The steps are simple, but obscure:
- Start a new line.
- 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:
- Insert > Cross-reference..
- Click on the References tab (Figure 15).
- Under Type, select Text.
- Under Selection, pick the equation number.
- Under Format, choose Reference.
- 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.