Difference between revisions of "Common problem areas"
Line 4: | Line 4: | ||
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. | 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. | ||
− | {| | + | {|border="1" cellpadding=4 style="border-collapse:collapse;" |
− | | | + | |-bgcolor=#EDEDED |
+ | !Markup!!Result | ||
|- | |- | ||
− | + | |<tt>sum from k = 1 to n a_k</tt><br/>||[[Image:Object21.png]] | |
|- | |- | ||
− | + | |<tt>int from 0 to x f(t) dt</tt><br/>or <br/><tt>int_0^x f(t) dt</tt>||[[Image:Object22.png]] or [[Image:Object267.png]] | |
|- | |- | ||
− | + | |<tt>int from Re f</tt>||[[Image:Object24.png]] | |
|- | |- | ||
− | + | |<tt>sum to infinity 2^{-n}</tt>||[[Image:Object28.png]] | |
|- | |- | ||
|} | |} | ||
− | + | {{Documentation/Note|For more details on integrals and sums, see the [[Writer Guide]].}} | |
− | + | ||
− | + | ||
== Brackets with matrices look ugly! == | == Brackets with matrices look ugly! == | ||
For background, we start with an overview of the matrix command: | For background, we start with an overview of the matrix command: | ||
− | {| | + | {|border="1" cellpadding=4 style="border-collapse:collapse;" |
− | | | + | |-bgcolor=#EDEDED |
+ | !Markup!!Result | ||
|- | |- | ||
− | + | |<tt>matrix { a # b ## c # d }</tt>||[[Image:Object69.png]] | |
|- | |- | ||
|} | |} | ||
− | + | {{Documentation/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: | ||
− | {| | + | {|border="1" cellpadding=4 style="border-collapse:collapse;" |
− | | | + | |-bgcolor=#EDEDED |
+ | !Markup!!Result | ||
|- | |- | ||
− | + | |<tt>( matrix { a # b ## c # d } ) </tt>||[[Image:Object217.png]] | |
|- | |- | ||
|} | |} | ||
Line 44: | Line 45: | ||
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. | 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. | ||
− | {| | + | {|border="1" cellpadding=4 style="border-collapse:collapse;" |
− | | | + | |-bgcolor=#EDEDED |
+ | !Markup!!Result | ||
|- | |- | ||
− | + | |<tt>left( matrix { a # b ## c # d } right)</tt>||[[Image:Object218.png]] | |
|- | |- | ||
|} | |} | ||
− | + | {{Documentation/Tip|Use ''left['' and ''right]'' to obtain square brackets.]] | |
− | + | ||
== How do I make a derivative? == | == How do I make a derivative? == | ||
Line 59: | Line 60: | ||
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. | 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. | ||
− | {| | + | {|border="1" cellpadding=4 style="border-collapse:collapse;" |
− | | | + | |-bgcolor=#EDEDED |
+ | !Markup!!Result | ||
|- | |- | ||
− | + | |<tt>{df} over {dx}</tt>||[[Image:Object219.png]] | |
|- | |- | ||
− | + | |<tt>{partial f} over {partial y}</tt>||[[Image:Object264.png]] | |
|- | |- | ||
− | | ||<tt>{partial^2 f} over {partial t^2}</tt>|| | + | | ||<tt>{partial^2 f} over {partial t^2}</tt>||Image:Object265.png]] |
|- | |- | ||
|} | |} | ||
− | + | {{Documentation/Note|Notice that we had to use squiggly brackets to make the derivative.}} | |
− | + | ||
== Numbering equations == | == Numbering equations == | ||
Line 81: | Line 82: | ||
{| | {| | ||
− | | | + | |[[Image:Objekt4.png || (2) |
|- | |- | ||
|} | |} | ||
Line 88: | Line 89: | ||
{| | {| | ||
− | | | + | |[[Image:Object266.png || (3) |
|- | |- | ||
|} | |} | ||
Line 100: | Line 101: | ||
# Under ''Format'', choose ''Reference''. | # Under ''Format'', choose ''Reference''. | ||
# Click '''Insert'''. | # 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. | 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. | ||
− | : | + | : [[Image:Frame15.png]] |
− | + | {{Documentation/Tip|To insert the equation number without parenthesis around it, choose ''Numbering'' under ''Format'' instead of ''Reference.''}} |
Revision as of 10:00, 9 November 2007
Contents
Common problem areas
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 |
File:Object21.png |
int from 0 to x f(t) dt or int_0^x f(t) dt |
File:Object22.png or File:Object267.png |
int from Re f | File:Object24.png |
sum to infinity 2^{-n} | File:Object28.png |
Brackets with matrices look ugly!
For background, we start with an overview of the matrix command:
Markup | Result |
---|---|
matrix { a # b ## c # d } | File:Object69.png |
The first problem people have with matrices is that brackets do not “scale" with the matrix:
Markup | Result |
---|---|
( matrix { a # b ## c # d } ) | File:Object217.png |
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) | File:Object218.png |
{{Documentation/Tip|Use left[ and right] to obtain square brackets.]]
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} | File:Object219.png | |
{partial f} over {partial y} | File:Object264.png | |
{partial^2 f} over {partial t^2} | Image:Object265.png]] |
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:
[[Image:Objekt4.png | (2) |
Now you can double-click on the formula to edit it. For example, here is the Riemann Zeta function:
[[Image:Object266.png | (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.