|
|
(34 intermediate revisions by 8 users not shown) |
Line 1: |
Line 1: |
− | ==How can I get a left bracket without a right bracket?==
| + | {{DISPLAYTITLE:{{OOo}} Math FAQ}}__NOTOC__{{Documentation/FAQTOC}}{{Note| A useful first resource is the '''[[Documentation/Reference/Math_commands|OpenOffice Math Syntax Reference]]'''.}} |
− | Since brackets have a grouping function they must always match and
| + | Search the FAQs: <googlefaq/> |
− | be correctly nested.
| + | This list is ordered by popularity. The most popular FAQs are at the top. But also have a look at the bottom to find any new entries. |
| | | |
− | To get a single bracket without a matching bracket partner you
| + | Below the list you can find some more FAQs that have special characters in the title. |
− | have to escape the bracket with a backslash. For example to get a "[" | + | |
− | without a corresponding "]" you should enter "'''\['''".
| + | |
| | | |
− | Thus to typeset the interval [3;8) you should enter <font color="brown">'''\[3 ";" 8\)'''</font>. The quotation marks around the semicolon ensures that it
| + | <DPL> |
− | is not typeset in italic. (You're right, this has nothing to do with
| + | category=Documentation/FAQ/Formula |
− | brackets!)
| + | ordermethod=counter |
| + | order=descending |
| + | replaceintitle=/Documentation.*\//, |
| + | secseparators=<br> |
| + | </DPL> |
| | | |
− | For scalable brackets it is essential that '''left''' and
| + | <div style="background-color:#EEE;border:solid 1pt #AAA;padding:10px;margin-top:20px"> |
− | '''right''' matches, since the content that the brackets | + | ===Add a new FAQ entry=== |
− | encloses must be well defined.
| + | <inputbox> |
− | | + | bgcolor=#EEE |
− | In this case you can use the invisible bracket '''none''' to
| + | type=create |
− | get a single bracket. For example to get a scalable "["
| + | default=Documentation/FAQ/Formula/<FAQ_TITLE> |
− | without a corresponding "]" you should enter <font color="brown">'''left [
| + | preload=Documentation/FAQ_Template |
− | ... right none'''</font>.
| + | buttonlabel=Add new FAQ |
− | | + | break=no |
− | Thus to typeset
| + | </inputbox> |
− | [[Image:001a.gif]]you
| + | '''Instructions''' |
− | should enter<font color="brown">''' x=left lbrace binom -5 3 right none'''</font>.
| + | * Do '''not ask questions''' here, but '''give answers'''. |
| + | * If you have a '''question to ask''', go to the [http://user.services.openoffice.org User Forum]. |
| + | * Replace ''<FAQ_TITLE>'' part in the input box above by the title you would like to give the FAQ item and click '''Add New FAQ''' |
| + | </div> |
| | | |
| ==I enter <font color="brown">'''x^*'''</font> to typeset x<SUP>*</SUP>, but get an error message. Why?== | | ==I enter <font color="brown">'''x^*'''</font> to typeset x<SUP>*</SUP>, but get an error message. Why?== |
Line 46: |
Line 51: |
| *The symbol<font color="brown">''' # '''</font>is used in stacks and matrices. | | *The symbol<font color="brown">''' # '''</font>is used in stacks and matrices. |
| *The symbols<font color="brown">''' & '''</font>and<font color="brown">''' | '''</font>are used for logical and and logical or. | | *The symbols<font color="brown">''' & '''</font>and<font color="brown">''' | '''</font>are used for logical and and logical or. |
− | *The symbols<font color="brown">''' ^ '''</font>and<font color="brown">''' _ '''</font>are used for | + | *The symbols<font color="brown">''' ^ '''</font>and<font color="brown">''' _ '''</font>are used for subscripts and superscripts. |
− | subscripts and superscripts.
| + | |
− | | + | |
| | | |
| To use them in your formula you can put them in quotation marks, | | To use them in your formula you can put them in quotation marks, |
Line 62: |
Line 65: |
| | | |
| Not really. What happens here is, that Math uses multi-letter | | Not really. What happens here is, that Math uses multi-letter |
− | variables, which are common in some disciplines, like economy. The | + | variables, which are common in some disciplines, like economics. The |
| rule is that a variable consists of a sequence of letters, numbers | | rule is that a variable consists of a sequence of letters, numbers |
| and dots (the first character can not be a dot). | | and dots (the first character can not be a dot). |
Line 73: |
Line 76: |
| times y is<font color="brown">''' 3 x y '''</font>(with spaces between the characters). | | times y is<font color="brown">''' 3 x y '''</font>(with spaces between the characters). |
| | | |
− | ==How do I align my equations at the equality sign?==
| |
− |
| |
− | Currently ''Math'' does not have an alignment construction.
| |
− | Instead you can use a matrix.
| |
− |
| |
− | For example to typeset the equation
| |
− | [[Image:005a.gif]]
| |
− |
| |
− | you should enter the following:
| |
− | <pre>
| |
− | matrix{
| |
− | alignr x+y # {}={} # alignl 2 ##
| |
− | alignr x # {}={} # alignl 2-y
| |
− | }
| |
− | </pre>
| |
− | The empty braces around = are necessary because = is a binary
| |
− | operator and thus needs an expression on each side.
| |
− |
| |
− | You can reduce the spacing around = if you change the inter-column
| |
− | spacing of the matrix:
| |
− |
| |
− |
| |
− | *Select '''Format-Spacing'''
| |
− | *Click ''''Category'''' and choose'''Matrixes''' in the pop-up menu.
| |
− | *Now enter<font color="brown">''' 0% '''</font>under ''''Column spacing''''.
| |
− |
| |
− |
| |
− | Here is another example using a different solution:
| |
− |
| |
− | To typeset the equation
| |
− |
| |
− | [[Image:005b.gif]]
| |
− |
| |
− | the trick is to use <font color="brown">'''phantom'''</font> as follows:
| |
− |
| |
− | <pre>""3(x+4)-2(x-1)=3 x+12-(2 x-2) newline
| |
− | ""phantom {3(x+4)-2(x-1)}=3 x+12-2 x+2 newline
| |
− | ""phantom {3(x+4)-2(x-1)}=x+14</pre>
| |
− |
| |
− | <P STYLE="margin-top: 0.2cm; margin-bottom: 0.21cm; font-weight: medium">
| |
− | The effect of the empty quotation marks is to left justify the line -
| |
− | a line starting with text (even an empty text) will always be left
| |
− | justified.</P>
| |
− |
| |
− | You can replace<font color="brown">''' "" '''</font>with <font color="brown">'''alignl'''</font>.
| |
| | | |
| ==I want to use a binary operator (like <font color="brown">'''union'''</font> or<font color="brown"> '''otimes'''</font>) as a large operator (like <font color="brown">'''int'''</font> or <font color="brown">'''sum'''</font>). How can I do that?== | | ==I want to use a binary operator (like <font color="brown">'''union'''</font> or<font color="brown"> '''otimes'''</font>) as a large operator (like <font color="brown">'''int'''</font> or <font color="brown">'''sum'''</font>). How can I do that?== |
Line 140: |
Line 98: |
| preceded with<font color="brown">''' oper '''</font>as in the example.</P> | | preceded with<font color="brown">''' oper '''</font>as in the example.</P> |
| | | |
− | ==How do I typeset functions, such as max, det, that ''Math'' does not know about?==
| |
− |
| |
− | ''Math'' has a number of standard functions built-in, such as
| |
− | cos, log etc.
| |
− |
| |
− | These functions are typeset in an upright shape according to
| |
− | typographical traditions.
| |
− |
| |
− | To typeset other functions this way you can simply preceed the
| |
− | function with<font color="brown">''' func'''</font>. Example:
| |
− |
| |
− | *To typeset max(''a,b'') you should enter<font color="brown">''' func
| |
− | max(a,b)'''</font>.
| |
− |
| |
− | ==How do I change the fonts used in my formula?==
| |
− | ''Math'' uses 7 different text fonts to typeset formulas -
| |
− | in addition to symbol fonts (mainly the StarMath font).
| |
− |
| |
− | The basic fonts are:
| |
− |
| |
− | *''Variables''. Variables (such as<font color="brown">''' x'''</font>, <font color="brown">'''a'''</font> etc.) are usually typeset in italics; the default is Times New Roman, italics.
| |
− | *''Functions''. Functions (such as<font color="brown">''' cos'''</font>, <font color="brown">'''log'''</font> etc.) are usually typeset in upright shape; the default is Times New Roman.
| |
− | *''Numbers''. Numbers (such as<font color="brown">''' 217'''</font> are usually typeset in upright shape; the default is Times New Roman.
| |
− | *''Text''. Text (such as<font color="brown">''' "abc"'''</font>) is usually typeset in upright shape; the default is Times New Roman.
| |
− | *''Serif'' is an additional, serifed font. The default is Times New Roman.
| |
− | *''Sans'' is an additional, sans serif font. The default is Helvetica/Arial.
| |
− | *''Fixed'' is an additional fixed with font. The default is Courier.
| |
− |
| |
− |
| |
− | You can read about how to use these fonts in [[FAQ:Formula#How_do_I_change_the_font of a subformula?]].
| |
− |
| |
− | To change one of the fonts follow these steps:
| |
− |
| |
− | *Select '''Format-Fonts...'''.
| |
− | *Click ''''Modify'''' and select the font you wish to modify in the pop-up menu.
| |
− | *Select the font in the list. You can also check one or both the checkboxes ''''Bold'''' and ''''Italic''''.
| |
− | *Close the dialog with ''''OK''''.
| |
− |
| |
− |
| |
− | This will change the font for the current formula. The next time
| |
− | you want to use the same font it will already be in the list box; you
| |
− | don't have to click modify again.
| |
− |
| |
− | To change the default fonts follow these steps:
| |
− |
| |
− | *Select '''Format-Fonts'''.
| |
− | *Choose the seven fonts as described above.
| |
− | *Click ''''Default''''.
| |
− |
| |
− | This will save your settings as the default fonts to be used in a
| |
− | new formula.
| |
− |
| |
− | To change the base size of the formula select '''Format-Font Size...'''
| |
− | and enter the size you want. All other font sizes are relative to the
| |
− | base size. The default is 12 pt.
| |
− |
| |
− | This will change the base size for the current formula. To change
| |
− | the default base size you should click ''''Default'''' before you close the
| |
− | dialog.
| |
− |
| |
− | ==How do I change the font of a subformula?==
| |
− | You can use one of the following font attributes:
| |
− |
| |
− |
| |
− | *<font color="brown">'''italic a '''</font>typesets<font color="brown">''' a '''</font>in italic shape.
| |
− | *so does<font color="brown">''' ital a'''</font>>.
| |
− | *<font color="brown">'''nitalic a '''</font>typesets<font color="brown">''' a '''</font>in upright shape (abbreviation for not italic).
| |
− | *<font color="brown">'''bold a '''</font>typesets<font color="brown">''' a '''</font>in boldface.
| |
− | *<font color="brown">'''nbold a '''</font>typesets<font color="brown">''' a '''</font>with normal weight (abbreviation for not bold).
| |
− |
| |
− |
| |
− | In addition ''Math'' uses a set of three generic font families,
| |
− | which are used as follows:
| |
− |
| |
− | *<font color="brown">'''font serif a '''</font>typesets<font color="brown">''' a '''</font>in a serifed font, usually Times.
| |
− | *<font color="brown">'''font sans a '''</font>typesets<font color="brown">''' a '''</font>in a sans serif font, usually Helvetica or Arial.
| |
− | *<font color="brown">'''font fixed a '''</font>typesets<font color="brown">''' a '''</font>in a fixed font, usually Courier.
| |
− |
| |
− |
| |
− | Font attributes can be combined as in this example:
| |
− |
| |
− | *Enter<font color="brown">''' bold font sans A '''</font>to get <B><FONT FACE="Arial, sans-serif">A</FONT></B>.
| |
− |
| |
− | You can apply font attributes to an entire subformula if you group
| |
− | it with<font color="brown">''' { } '''</font>or other brackets. Example:
| |
− |
| |
− |
| |
− | *Enter<font color="brown">''' a b bold {c d} e '''</font>to typeset ab<B>cd</B>e.
| |
− |
| |
− | When several font attributes are applied, the innermost takes
| |
− | precedence as shown in this example:
| |
− |
| |
− | *Enter<font color="brown">''' bold {a b nbold c d} '''</font>to get <B>ab</B>c<B>d</B>.
| |
− |
| |
− |
| |
− | To change the fonts used in ''Math'' see [[FAQ:Formula#How_do_I_change_the_fonts_used_in_my_formula?|How do I change the fonts used in my formula?]]
| |
− |
| |
− | ==How do I change the size of a subformula?==
| |
− | There are five variants of the size-changing command:
| |
− |
| |
− | *<font color="brown">'''size 20 a '''</font>typesets a with the font size 20 pt.
| |
− | *<font color="brown">'''size +5 a '''</font>typesets a with current font size plus 5pt.
| |
− | *<font color="brown">'''size -5 a '''</font>typesets a with current font size minus 5pt.
| |
− | *<font color="brown">'''size *1.5 a '''</font>typesets a with current font size times 1.5.
| |
− | *<font color="brown">'''size /1.5 a '''</font>typesets a with current font size divided by 1.5.
| |
− |
| |
− | You can change the font size of an entire subformula if you group
| |
− | it with<font color="brown">''' { } '''</font>or other brackets. Example:
| |
− |
| |
− | *Enter<font color="brown">''' a b size *2 {c d} e '''</font>to typeset ab<FONT SIZE=6>cd</FONT>e.
| |
− |
| |
− | When several font size changes are applied, the innermost takes
| |
− | precedence as shown in this example:
| |
− |
| |
− | *Enter<font color="brown">''' size *1.5 {a size 12 b size *1.5 c d} '''</font>to get <FONT SIZE=5>a<FONT SIZE=3>b</FONT><FONT SIZE=6>c</FONT>d</FONT>.
| |
− |
| |
− |
| |
− | To change the base font size used in Math see [[FAQ:Formula#How_do_I_change_the_fonts_used_in_my_formula?|How do I change the fonts used in my formula?]]
| |
− |
| |
− | ==How do I change the color of a subformula?==
| |
− | You can use the color command as follows:
| |
− |
| |
− |
| |
− | *<font color="brown">'''color red ABC '''</font>typesets <FONT COLOR="#ff0000">ABC</FONT>.
| |
− |
| |
− | There are eight different colors to choose from:
| |
− |
| |
− | *white, black, cyan, magenta, red, blue, green, yellow.
| |
− |
| |
− |
| |
− | You can apply a color to an entire subformula if you group it with
| |
− | { } or other brackets. Example:
| |
− |
| |
− | *Enter<font color="brown">''' A B color green {C D} E '''</font>to typeset AB<FONT COLOR="#00ff00">CD</FONT>E.
| |
− |
| |
− | When several colors are applied, the innermost takes precedence as
| |
− | shown in this example:
| |
− |
| |
− | *Enter<font color="brown">''' color blue {A B color yellow C D} '''</font>to get
| |
− | <FONT COLOR="#0000ff">AB<FONT COLOR="#ffff00">C</FONT>D</FONT>.
| |
− |
| |
− |
| |
− | You cannot select the background color; a ''Math'' formula is
| |
− | always transparent. This means that it inherits the background color
| |
− | from the document (for example a writer document) it is contained in.
| |
− |
| |
− | ==I need a symbol that ''Math'' does not provide. What can I do?==
| |
− | If you have a font containing the symbol you can define a userdefined symbol.
| |
− |
| |
− | <P STYLE="font-style: normal">Follow these steps:</P>
| |
− |
| |
− | *Open the Symbols dialog ('''Tools-Catalog...''').
| |
− | *Click ''''Edit''''.
| |
− | *Type a name for the new symbol in the combobox <B>'Symbol'</B>.
| |
− | *Type a new name or select
| |
− | an existing name in the combobox <B>'Symbol set</B>. This is the
| |
− | symbol set you want your symbol to appear in.
| |
− | *Select the font in the listbox <B>'Font'</B>, for example the
| |
− | StarMath font.
| |
− | *Select the formatting (normal, bold, bold-italic or italic)
| |
− | in the listbox <B>'Typeface'</B>.
| |
− | *Click on the symbol in the table.
| |
− | *Click <b>'Add'</b> to add your symbol.
| |
− |
| |
− | You can now use your symbol like any other symbol by selecting it
| |
− | in the Symbols dialog or entering<font color="brown"> %thenameofthesymbol '''</font>directly.
| |
− |
| |
− | If you don't have the symbol try looking in the StarMath font
| |
− | first; it contains about 25 additional symbols.
| |
− |
| |
− | Another source of symbols is the so-called AMS fonts of the
| |
− | American Mathematical society.
| |
− |
| |
− | You can download these in Postscript type 1 format from
| |
− | [http://www.ams.org/tex/amsfonts.html www.ams.org/tex/amsfonts.html].
| |
− |
| |
− | If you use Microsoft Windows you might prefer to download the unofficial BaKoMa Truetype versions from [http://www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/ www.ctan.org/tex-archive/fonts/cm/ps-type1/bakoma/].
| |
− |
| |
− | Refer to the documentation distributed with the fonts for
| |
− | conditions of use.
| |
− |
| |
− | ==Can I find all the constructions of ''Math'' in the selection window?==
| |
− | There are a few constructions without a corresponding template in
| |
− | the selection window:
| |
− |
| |
− | '''''Additional binary operators:'''''
| |
− | {| border=1
| |
− | |a oplus b
| |
− | |[[Image:013a.gif|none]]
| |
− | |----
| |
− | |a ominus b
| |
− | |[[Image:013b.gif|none]]
| |
− | |----
| |
− | |a otimes b
| |
− | |[[Image:013c.gif|middle]]
| |
− | |----
| |
− | |a odot b
| |
− | |[[Image:013d.gif|none]]
| |
− | |----
| |
− | |a odivide b
| |
− | |[[Image:013e.gif|none]]
| |
− | |----
| |
− | |a wideslash b
| |
− | |[[Image:013f.gif|none]]
| |
− | |----
| |
− | |a widebslash b
| |
− | |[[Image:013g.gif|middle]]
| |
− | |}
| |
− |
| |
− | In addition, if<font color="brown">''' %symbol '''</Font>is a userdefined symbol you can
| |
− | use it as a unary or binary operator as follows:
| |
− |
| |
− | *<font color="brown">'''uoper %symbol a '''</Font>uses<font color="brown">''' %symbol '''</Font>as a unary operator.
| |
− | *<font color="brown">'''a boper %symbol b '''</Font>uses<font color="brown">''' %symbol '''</Font>as a binary operator.
| |
− |
| |
− | '''''Additional relations:'''''
| |
− | {| border=1
| |
− | |a << b
| |
− | |[[Image:013h.gif|none]]
| |
− | |----
| |
− | |a >> b
| |
− | |[[Image:013i.gif|none]]
| |
− | |----
| |
− | |a def b
| |
− | |[[Image:013j.gif|none]]
| |
− | |----
| |
− | |a transl b
| |
− | |[[Image:013k.gif|none]]
| |
− | |----
| |
− | |a transr b
| |
− | |[[Image:013l.gif|none]]
| |
− | |}
| |
− |
| |
− | '''''Additional operators:'''''
| |
− | {| border=1
| |
− | |liminf f
| |
− | |lim inf ''f''
| |
− | |----
| |
− | |limsub f
| |
− | |lim sub ''f''
| |
− | |}
| |
− |
| |
− |
| |
− | In addition, if<font color="brown">''' %symbol '''</Font>is a userdefined symbol you can
| |
− | use it as an operator as follows:
| |
− |
| |
− | *<font color="brown">'''oper %symbol a '''</Font>uses<font color="brown">''' %symbol '''</Font>as an operator.
| |
− |
| |
− | You can read more about this in [[FAQ:Formula#I_want_to_use_a_binary_operator_.28like_union_or_otimes.29_as_a_large_operator_.28like_int_or_sum.29._How_can_I_do_that.3F|
| |
− | I want to use a binary operator like '''union''' or '''otimes''' as a large operator like '''int''' or '''sum'''. How can I do that?]]
| |
− |
| |
− | '''''Additional brackets:'''''
| |
− | {| border=1
| |
− | |lfloor a rfloor
| |
− | |[[Image:013m.gif|none]]
| |
− | |----
| |
− | |lceil a rceil
| |
− | |[[Image:013n.gif|none]]
| |
− | |}
| |
− |
| |
− | Since brackets have a grouping function they must always match and
| |
− | be correctly nested. For scalable brackets it is essential that <font color="brown">'''left'''</Font>
| |
− | and <font color="brown">'''right'''</Font> matches, but the brackets can be freely
| |
− | combined. Example:
| |
− |
| |
− | *You can enter<font color="brown">''' left ( a right [ '''</Font>to typeset (a[.
| |
− |
| |
− | You can read more about single brackets in [[FAQ:Formula#How_can_I_get_a_left_bracket_without_a_right_bracket.3F|How can I get a left bracket without a right bracket?]]
| |
− |
| |
− | '''''Additional symbols:'''''
| |
− | {|
| |
− | |width=90|
| |
− | |
| |
− | |----
| |
− | |backepsilon
| |
− | |[[Image:013o.gif|none]]
| |
− | |}
| |
− |
| |
− |
| |
− | '''''Additional functions:'''''
| |
− |
| |
− | In addition to the functions that ''Math'' knows, you can
| |
− | typeset other functions if you preceed the function name with func,
| |
− | such as<font color="brown">''' func max'''</Font>. You can read more about this in [[FAQ:Formula#How_do_I_typeset_functions.2C_such_as_max.2C_det.2C_that_Math_does_not_know_about.3F| How do I typeset functions such as max, det, that Math does not know about?]]
| |
− |
| |
− | '''''Additional font changing commands:'''''
| |
− |
| |
− | *<font color="brown">'''nitalic a '''</Font>typesets<font color="brown">''' a '''</Font>in upright shape (abbreviation for not italic).
| |
− | *<font color="brown">'''nbold a '''</Font>typesets<font color="brown">''' a '''</Font>with normal weight (abbreviation for not bold).
| |
− | *<font color="brown">'''phantom a '''</Font>typesets a invisible.
| |
− |
| |
− | The command color is used to change the color of a subformula, see
| |
− | [[FAQ:Formula#How_do_I_change_the_color_of_a_subformula.3F|How do I change the color of a subformula?]] for details.
| |
− |
| |
− | A complete reference on the ''Math'' input language is being worked on.
| |
− |
| |
− |
| |
− | ==The fractions are too large for inline formulas. How can I make them smaller?==
| |
− | Select '''Format-Text Mode'''.
| |
− |
| |
− | This will change the formatting of your formula such that
| |
− | fractions and large operators (such as integral signs) are smaller.
| |
− | Furthermore the limits of large operators are placed to the right of
| |
− | the operator rather than above and below.
| |
− |
| |
− | Example:
| |
− | [[Image:014a.gif]]becomes [[Image:014b.gif]]in textmode.
| |
| | | |
− | This setting is reversed if you select '''Format-Text Mode'''
| + | [[Category: Documentation/FAQ]] |
− | again.
| + | [[Category:User FAQ]] |
This list is ordered by popularity. The most popular FAQs are at the top. But also have a look at the bottom to find any new entries.
Below the list you can find some more FAQs that have special characters in the title.
If you use this construction a lot you might want to define the
symbol as a userdefined symbol. See I need a symbol that Math does not provide. What can I do?.
If you have defined the * as a userdefined symbol, say %ast,
you can enter x^%ast.
This answer applies to a lot of other symbols as well. Some operators, such as +, are unary, that is there only has to be an expression to the right of the symbol. To typeset x+ you can enter x^{+{}}< or, of course, x^"+".
To use them in your formula you can put them in quotation marks,
which means that you insert them as text.
If you want to use the symbol "|" you should consider
whether the construction you need is one of the the following:
Not really. What happens here is, that Math uses multi-letter
variables, which are common in some disciplines, like economics. The
rule is that a variable consists of a sequence of letters, numbers
and dots (the first character can not be a dot).
So when you enter 3xy this is considered a variable - and
variables are typeset in italics. The only odd thing here is, that a
variable can start with a number.
You have to define the symbol you want to use as a user-defined
symbol first. See <A HREF="012.html">FAQ #012</A> for instructions;
most of the symbols used by Math are part of the StarMath
font.